Browse Source

1.干线bug修复

dist.1.3.0
zhenghaoyu 6 months ago
parent
commit
efe896c29d
  1. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/AdvanceDTO.java
  2. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  3. 23
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java
  4. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml
  5. 42
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  6. 13
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/AdvanceDTO.java

@ -14,6 +14,7 @@ public class AdvanceDTO implements Serializable {
private Integer pageSize; private Integer pageSize;
private Long warehouseId; private Long warehouseId;
private List<Long> warehouseIds;
private Long advanceId; private Long advanceId;

12
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java

@ -1801,12 +1801,12 @@ public class CarsLoadController {
try{ try{
//当前登录人选择的仓库 //当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); // BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){ // if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); // log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"多仓权限无法操作,请选择仓库"); // return R.fail(400,"多仓权限无法操作,请选择仓库");
} // }
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); // loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){ if(Objects.isNull(loadId)){
log.warn(method+"配载id为空 loadId={}",loadId); log.warn(method+"配载id为空 loadId={}",loadId);

23
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java

@ -55,10 +55,17 @@ public class OpenOrderController {
try{ try{
//当前登录人选择的仓库 //当前登录人选择的仓库
List<Long> warehouseIds = new ArrayList<>();
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(!Objects.isNull(myCurrentWarehouse)){ if(!Objects.isNull(myCurrentWarehouse)){
advanceDTO.setWarehouseId(myCurrentWarehouse.getId()); warehouseIds.add(myCurrentWarehouse.getId());
}else{
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
myWatchWarehouse.forEach(warehouse -> {
warehouseIds.add(warehouse.getId());
});
} }
advanceDTO.setWarehouseIds(warehouseIds);
if(Objects.isNull(pageNum)){ if(Objects.isNull(pageNum)){
advanceDTO.setPageNum(1); advanceDTO.setPageNum(1);
@ -1318,13 +1325,13 @@ public class OpenOrderController {
try{ try{
//当前登录人选择的仓库 //当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); // BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){ // if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); // log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"多仓权限无法操作,请选择仓库"); // return R.fail(403,"多仓权限无法操作,请选择仓库");
} // }
openOrderDTO.setWarehouseId(myCurrentWarehouse.getId()); // openOrderDTO.setWarehouseId(myCurrentWarehouse.getId());
openOrderDTO.setWarehouseName(myCurrentWarehouse.getName()); // openOrderDTO.setWarehouseName(myCurrentWarehouse.getName());
return openOrderService.findBrandList(openOrderDTO); return openOrderService.findBrandList(openOrderDTO);
}catch (CustomerException e){ }catch (CustomerException e){

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml

@ -20,8 +20,11 @@
where lta.is_deleted = 0 where lta.is_deleted = 0
and lta.waybill_status = 0 and lta.waybill_status = 0
and lta.freeze_status = #{param.freezeStatus} and lta.freeze_status = #{param.freezeStatus}
<if test="param.warehouseId != null"> <if test="param.warehouseIds != null and param.warehouseIds.size() > 0">
and lta.warehouse_id = #{param.warehouseId} and lta.warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if> </if>
<if test="param.hasPackage != null"> <if test="param.hasPackage != null">
and lta.has_package = #{param.hasPackage} and lta.has_package = #{param.hasPackage}

42
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -3533,6 +3533,30 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
msgList.add(editOrderMsgVO); msgList.add(editOrderMsgVO);
} }
BigDecimal newVolume = waybillDetailDTO.getVolume();
BigDecimal volume = warehouseWayBillDetail.getVolume();
if(!ObjectUtil.equals(volume,newVolume)){
// stringBuilder.append("明细更新:").append(warehouseWayBillDetail.getProductName()).append(" 单价修改").append(price).append("-->").append(newPrice).append(";");
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
editOrderMsgVO.setItemName("明细更新 "+warehouseWayBillDetail.getProductName() +" 体积修改 ");
editOrderMsgVO.setOldValue(volume.toPlainString());
editOrderMsgVO.setNewValue(newVolume.toPlainString());
msgList.add(editOrderMsgVO);
}
BigDecimal newWeight = waybillDetailDTO.getWeight();
BigDecimal weight = warehouseWayBillDetail.getWeight();
if(!ObjectUtil.equals(weight,newWeight)){
// stringBuilder.append("明细更新:").append(warehouseWayBillDetail.getProductName()).append(" 单价修改").append(price).append("-->").append(newPrice).append(";");
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
editOrderMsgVO.setItemName("明细更新 "+warehouseWayBillDetail.getProductName() +" 重量修改 ");
editOrderMsgVO.setOldValue(weight.toPlainString());
editOrderMsgVO.setNewValue(newWeight.toPlainString());
msgList.add(editOrderMsgVO);
}
BigDecimal newPrice = waybillDetailDTO.getPrice(); BigDecimal newPrice = waybillDetailDTO.getPrice();
BigDecimal price = warehouseWayBillDetail.getPrice(); BigDecimal price = warehouseWayBillDetail.getPrice();
if(price.compareTo(newPrice) != 0){ if(price.compareTo(newPrice) != 0){
@ -3544,6 +3568,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
msgList.add(editOrderMsgVO); msgList.add(editOrderMsgVO);
} }
Integer newChargeType = waybillDetailDTO.getChargeType(); Integer newChargeType = waybillDetailDTO.getChargeType();
Integer chargeType = warehouseWayBillDetail.getChargeType(); Integer chargeType = warehouseWayBillDetail.getChargeType();
if(!ObjectUtil.equals(chargeType,newChargeType)){ if(!ObjectUtil.equals(chargeType,newChargeType)){
@ -4075,6 +4100,21 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
warehouseWayBillDetail.setNum(newNum); warehouseWayBillDetail.setNum(newNum);
} }
BigDecimal newVolume = waybillDetailDTO.getVolume();
BigDecimal volume = warehouseWayBillDetail.getVolume();
if(!ObjectUtil.equals(volume,newVolume)){
stringBuilder.append("明细更新:").append(warehouseWayBillDetail.getProductName()).append(" 体积修改").append(volume).append("-->").append(newVolume).append(";");
warehouseWayBillDetail.setVolume(newVolume);
}
BigDecimal newWeight = waybillDetailDTO.getWeight();
BigDecimal weight = warehouseWayBillDetail.getWeight();
if(!ObjectUtil.equals(weight,newWeight)){
stringBuilder.append("明细更新:").append(warehouseWayBillDetail.getProductName()).append(" 重量修改").append(weight).append("-->").append(newWeight).append(";");
warehouseWayBillDetail.setWeight(newWeight);
}
BigDecimal newPrice = waybillDetailDTO.getPrice(); BigDecimal newPrice = waybillDetailDTO.getPrice();
BigDecimal price = warehouseWayBillDetail.getPrice(); BigDecimal price = warehouseWayBillDetail.getPrice();
if (price.compareTo(newPrice) != 0) { if (price.compareTo(newPrice) != 0) {
@ -4189,7 +4229,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
String newPayWay = openOrderDTO.getPayWay(); String newPayWay = openOrderDTO.getPayWay();
String payWay = waybillEntity.getPayWay(); String payWay = waybillEntity.getPayWay();
if (!ObjectUtil.equals(payType,newPayType)) { if (!ObjectUtil.equals(payWay,newPayWay)) {
stringBuilder.append("付款方式:").append(payWay).append("-->").append(newPayWay).append(";"); stringBuilder.append("付款方式:").append(payWay).append("-->").append(newPayWay).append(";");
waybillEntity.setPayWay(newPayWay); waybillEntity.setPayWay(newPayWay);
} }

13
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -6485,8 +6485,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
public R removeCarsLoadScan(List<Long> carsLoadScanIds, Long warehouseId) { public R removeCarsLoadScan(List<Long> carsLoadScanIds, Long warehouseId) {
QueryWrapper<TrunklineCarsLoadScanEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<TrunklineCarsLoadScanEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.in("id", carsLoadScanIds) queryWrapper.in("id", carsLoadScanIds);
.eq("scan_status", "1");
List<TrunklineCarsLoadScanEntity> carsLoadScanEntityList = trunklineCarsLoadScanService.list(queryWrapper); List<TrunklineCarsLoadScanEntity> carsLoadScanEntityList = trunklineCarsLoadScanService.list(queryWrapper);
if (CollUtil.isEmpty(carsLoadScanEntityList)) { if (CollUtil.isEmpty(carsLoadScanEntityList)) {
log.warn("##################removeCarsLoadScan: 没有删除的数据 carsLoadScanIds={}", carsLoadScanIds); log.warn("##################removeCarsLoadScan: 没有删除的数据 carsLoadScanIds={}", carsLoadScanIds);
@ -8440,7 +8439,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
updateNumByLoadId(loadId); updateNumByLoadId(loadId);
return R.success("卸车成功"); JSONObject jsonObject = trunklineCarsLoadScanService.findUnloadNumAudio(loadId,warehouseId);
Integer totalUnloadNum = jsonObject.getInteger("totalUnloadNum");
Integer abnormalUnloadNum = jsonObject.getInteger("abnormalUnloadNum");
StringBuilder audio = new StringBuilder();
audio.append("卸车").append(totalUnloadNum).append("件");
if(!Objects.isNull(abnormalUnloadNum) && !abnormalUnloadNum.equals(0)){
audio.append("异常卸车").append(abnormalUnloadNum).append("件");
}
return Resp.scanSuccess("卸车成功", audio.toString());
} }

Loading…
Cancel
Save