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. 21
      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 String assignStatusName;
private Integer treatNum; //待 private Integer treatNum; //待
private Integer signedFor ; //已签收
private Integer stopNum; //已 private Integer stopNum; //已
private Integer sumTotal; //总数
@ApiModelProperty(value = "提货状态") @ApiModelProperty(value = "提货状态")
private String conditionName; 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) select DISTINCT (select count(conditions)
from logpm_distrilbution_bill_lading from logpm_distrilbution_bill_lading
<where> <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 pick_up_time between #{param.startDate} and #{param.entDate}</if>
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if> <if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if>
</where> </where>
@ -378,16 +378,18 @@
(select count(conditions) (select count(conditions)
from logpm_distrilbution_bill_lading from logpm_distrilbution_bill_lading
<where> <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 pick_up_time between #{param.startDate} and #{param.entDate}</if>
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if> <if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if>
</where> </where>
) stopNum ) stopNum, COUNT(ldbls.id) signedFor,COUNT(ldbp.id) sumTotal
from logpm_distrilbution_bill_lading 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> <where>
is_deleted = '0' ldbl.is_deleted = '0' and ldbl.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 ldbl.pick_up_time between #{param.startDate} and #{param.entDate}</if>
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if> <if test="param.startDate == null">and DATE(ldbl.pick_up_time) = CURDATE()</if>
</where> </where>
</select> </select>

21
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 @Override
public DistrilbutionBillLadingVO listNum(Map<String, Object> distrilbutionBillLading) { 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); DistrilbutionBillLadingDTO billLadingEntity = JSONObject.parseObject(JSONObject.toJSONString(distrilbutionBillLading), DistrilbutionBillLadingDTO.class);
DistrilbutionBillLadingVO billLadingVO = baseMapper.getBillLadingNum(billLadingEntity); //查询 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 * @param id
* @return * @return
@ -2125,16 +2129,15 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
list2.add(distributionPrintEntity); list2.add(distributionPrintEntity);
}); });
distributionPrintService.saveBatch(list2); distributionPrintService.saveBatch(list2);
} if(ObjectUtils.isNotNull(billLadingAppDTO.getRemark())){
//修改数据 DistrilbutionBillLadingEntity billLadingEntity = new DistrilbutionBillLadingEntity();
if(ObjectUtils.isNotNull(billLadingAppDTO.getRemark())){ billLadingEntity.setId(billLadingAppDTO.getBillLadingId());
DistrilbutionBillLadingEntity billLadingEntity = new DistrilbutionBillLadingEntity(); billLadingEntity.setRemark(billLadingAppDTO.getRemark());
billLadingEntity.setId(billLadingAppDTO.getBillLadingId()); baseMapper.updateById(billLadingEntity);
billLadingEntity.setRemark(billLadingAppDTO.getRemark()); }
baseMapper.updateById(billLadingEntity);
return R.status(true); return R.status(true);
} }
return R.status(false); return R.status(false);
} }
/** /**

Loading…
Cancel
Save