Browse Source

备货查询数量信息

single_db
caoyizhong 1 year ago
parent
commit
15b6a1fb83
  1. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingVO.java
  2. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  3. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingVO.java

@ -61,7 +61,9 @@ public class DistrilbutionBillLadingVO extends DistrilbutionBillLadingEntity {
private String assignStatusName;
private Integer treatNum; //待
private Integer signedFor ; //已签收
private Integer stopNum; //已
private Integer sumTotal; //总数
@ApiModelProperty(value = "提货状态")
private String conditionName;

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -370,7 +370,7 @@
select DISTINCT (select count(conditions)
from logpm_distrilbution_bill_lading
<where>
conditions IN (10) and is_deleted = '0'
conditions IN (10,20) and is_deleted = '0' and warehouse_id = #{param.warehouseId}
<if test="param.startDate != null">and pick_up_time between #{param.startDate} and #{param.entDate}</if>
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if>
</where>
@ -378,16 +378,18 @@
(select count(conditions)
from logpm_distrilbution_bill_lading
<where>
conditions IN (20) and is_deleted = '0'
conditions IN (30) and is_deleted = '0' and warehouse_id = #{param.warehouseId}
<if test="param.startDate != null">and pick_up_time between #{param.startDate} and #{param.entDate}</if>
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if>
</where>
) stopNum
from logpm_distrilbution_bill_lading
) stopNum, COUNT(ldbls.id) signedFor,COUNT(ldbp.id) sumTotal
from logpm_distrilbution_bill_lading ldbl
LEFT JOIN logpm_distrilbution_bill_package ldbp on ldbp.bill_lading_id = ldbl.id
LEFT JOIN logpm_distribution_bill_lading_scan ldbls on ldbls.parcel_list_id = ldbp.parce_list_id
<where>
is_deleted = '0'
<if test="param.startDate != null">and pick_up_time between #{param.startDate} and #{param.entDate}</if>
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if>
ldbl.is_deleted = '0' and ldbl.warehouse_id = #{param.warehouseId}
<if test="param.startDate != null">and ldbl.pick_up_time between #{param.startDate} and #{param.entDate}</if>
<if test="param.startDate == null">and DATE(ldbl.pick_up_time) = CURDATE()</if>
</where>
</select>

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -1690,6 +1690,10 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
@Override
public DistrilbutionBillLadingVO listNum(Map<String, Object> distrilbutionBillLading) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(ObjectUtils.isNotNull(myCurrentWarehouse)){
distrilbutionBillLading.put("warehouse_id",myCurrentWarehouse.getId());
}
DistrilbutionBillLadingDTO billLadingEntity = JSONObject.parseObject(JSONObject.toJSONString(distrilbutionBillLading), DistrilbutionBillLadingDTO.class);
DistrilbutionBillLadingVO billLadingVO = baseMapper.getBillLadingNum(billLadingEntity); //查询
@ -1698,7 +1702,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}
/**
* 查询详细信息
* 查询详细信息 1 2 3 4 5 6 7 8 9
*
* @param id
* @return
@ -2125,13 +2129,12 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
list2.add(distributionPrintEntity);
});
distributionPrintService.saveBatch(list2);
}
//修改数据
if(ObjectUtils.isNotNull(billLadingAppDTO.getRemark())){
DistrilbutionBillLadingEntity billLadingEntity = new DistrilbutionBillLadingEntity();
billLadingEntity.setId(billLadingAppDTO.getBillLadingId());
billLadingEntity.setRemark(billLadingAppDTO.getRemark());
baseMapper.updateById(billLadingEntity);
}
return R.status(true);
}
return R.status(false);

Loading…
Cancel
Save