Browse Source

1.干线bug修复

visual
zhenghaoyu 6 months ago
parent
commit
60f0b4ebcf
  1. 2
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  2. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadEntity.java
  3. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  4. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java
  5. 13
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  6. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
  7. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java
  8. 22
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

2
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java

@ -71,6 +71,8 @@ public class LoadCarsDTO implements Serializable {
private String trayCode;
private String trayName;
private String unloadTrayName;
private String unloadTrayCode;
private String trayType;
private Integer isZero;
private String scanCode;

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadEntity.java

@ -130,6 +130,9 @@ public class TrunklineCarsLoadEntity extends TenantEntity {
/** 卸车件数 */
@ApiModelProperty(name = "卸车件数",notes = "")
private Integer unloadNumber ;
/** 卸车件数 */
@ApiModelProperty(name = "在车件数",notes = "")
private Integer stockNumber ;
/** 异常件数 */
@ApiModelProperty(name = "异常件数",notes = "")
private Integer abnormalNum ;

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -8,6 +8,7 @@
ltcl.cars_line_name carsLineName,
ltcl.plan_loading_number planLoadingNumber,
ltcl.real_loading_number realLoadingNumber,
ltcl.stock_number stockCarsNum,
ltcl.unload_number unloadNumber,
ltcl.loading_type loadingType,
ltcl.full_load_rate fullLoadRate,
@ -107,6 +108,7 @@
ltcl.cars_no carsNo,
ltcl.plan_loading_number planLoadingNumber,
ltcl.real_loading_number realLoadingNumber,
ltcl.stock_number stockCarsNum,
ltcl.unload_number unloadNumber,
ltcl.full_load_rate fullLoadRate,
ltcl.is_customer isCustomer,

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java

@ -185,4 +185,6 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper<TrunklineCarsLoa
List<Long> findAllIdListByLoadIdAndScanStatus(@Param("loadId") Long loadId, @Param("scanStatus") String scanStatus);
CustmoerUnloadNumVO findCarsLoadCustomeNumByLoadIdAndUnloadWarehouseId(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
Integer findStockNumByLoadId(@Param("loadId") Long loadId);
}

13
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -115,6 +115,12 @@
<if test="param.trayCode != null and param.trayCode != ''">
and Locate(#{param.trayCode},cls.tray_code) > 0
</if>
<if test="param.unloadTrayName != null and param.unloadTrayName != ''">
and Locate(#{param.unloadTrayName},cls.unload_tray_name) > 0
</if>
<if test="param.unloadTrayCode != null and param.unloadTrayCode != ''">
and Locate(#{param.unloadTrayCode},cls.unload_tray_code) > 0
</if>
<if test="param.unloadNodeName != null and param.unloadNodeName != ''">
and Locate(#{param.unloadNodeName},cls.unload_node_name) > 0
</if>
@ -995,5 +1001,12 @@
and sign_order_id is not null
</select>
<select id="findStockNumByLoadId" resultType="int">
select IFNULL(sum(num),0)
from logpm_trunkline_cars_load_scan
where load_id = #{loadId}
and scan_status = '1'
</select>
</mapper>

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java

@ -181,4 +181,6 @@ public interface ITrunklineCarsLoadScanService extends BaseService<TrunklineCars
List<Long> findAllIdListByLoadIdAndScanStatus(Long loadId, String scanStatus);
CustmoerUnloadNumVO findCarsLoadCustomeNumByLoadIdAndUnloadWarehouseId(Long loadId, Long warehouseId);
Integer findStockNumByLoadId(Long loadId);
}

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java

@ -464,4 +464,9 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl<TrunklineC
return baseMapper.findCarsLoadCustomeNumByLoadIdAndUnloadWarehouseId(loadId,warehouseId);
}
@Override
public Integer findStockNumByLoadId(Long loadId) {
return baseMapper.findStockNumByLoadId(loadId);
}
}

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

@ -1481,6 +1481,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadEntity.setPlanLoadingNumber(0);
carsLoadEntity.setRealLoadingNumber(0);
carsLoadEntity.setUnloadNumber(0);
carsLoadEntity.setStockNumber(0);
carsLoadEntity.setAbnormalNum(0);
carsLoadEntity.setNowWarehouseId(warehouseId);
carsLoadEntity.setIsSettlement("1");
@ -1579,15 +1580,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsLoadLineService.updatePlanLoadingNumberByLoadLineId(planNum, loadLineId);
}
carsLoadEntity.setPlanLoadingNumber(loadPlanNum);
updateById(carsLoadEntity);
// updateById(carsLoadEntity);
//装车 卸车数量
Integer realLoadingNum = trunklineCarsLoadScanService.findNumByLoadId(loadId);//配载计划实际装车数量
Integer realUnloadingNum = trunklineCarsLoadScanService.findUnloadNumByLoadId(loadId);//配载计划实际卸车数量
Integer stockCarNum = trunklineCarsLoadScanService.findStockNumByLoadId(loadId);//配载计划在车件数
Integer abnormalNum = trunklineCarsLoadScanService.findAbnormalNumByLoadId(loadId);//配载计划装车异常数量
// Integer unloadAbnormalNum = trunklineCarsUnloadLogService.findAbnormalNumByLoadId(loadId);//配载计划卸车异常数量
carsLoadEntity.setRealLoadingNumber(realLoadingNum);
carsLoadEntity.setUnloadNumber(realUnloadingNum);
carsLoadEntity.setStockNumber(stockCarNum);
carsLoadEntity.setAbnormalNum(abnormalNum);
updateById(carsLoadEntity);
@ -4154,7 +4157,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String value = DictBizCache.getValue(DictBizConstant.CARS_LOAD_STATUS, loadStatus);
Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber();
Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber();
trunklineCarsLoadVO.setRealLoadingNumber(realLoadingNumber - unloadNumber);
Integer stockCarsNum = trunklineCarsLoadVO.getStockNumber();
trunklineCarsLoadVO.setRealLoadingNumber(stockCarsNum);
trunklineCarsLoadVO.setLoadStatus(value);
}
pageList.setRecords(records);
@ -8127,11 +8131,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String loadStatus = trunklineCarsLoadVO.getLoadStatus();
trunklineCarsLoadVO.setLoadStatus(DictBizCache.getValue(DictBizConstant.CARS_LOAD_STATUS, loadStatus));
int i = realLoadingNumber - unloadNumber;
if(i < 0) {
i = 0;
}
trunklineCarsLoadVO.setStockCarsNum(i);
// int i = realLoadingNumber - unloadNumber;
// if(i < 0) {
// i = 0;
// }
trunklineCarsLoadVO.setStockCarsNum(carsLoadEntity.getStockNumber());
trunklineCarsLoadVO.setLoadScanOrderList(loadScanOrderList);
trunklineCarsLoadVO.setZeroList(zeroList);
trunklineCarsLoadVO.setExceptionList(exceptionList);
@ -8489,8 +8493,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber();
Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber();
int stockCarNumber = realLoadingNumber - unloadNumber;
trunklineCarsLoadVO.setRealLoadingNumber(stockCarNumber<0?0:stockCarNumber);
Integer stockCarNumber = trunklineCarsLoadVO.getStockNumber();
trunklineCarsLoadVO.setRealLoadingNumber(stockCarNumber);
trunklineCarsLoadVO.setTotalLoadingNum(realLoadingNumber);
}
pageList.setRecords(records);

Loading…
Cancel
Save