Browse Source

1.bug修复

dist.1.3.0
zhenghaoyu 8 months ago
parent
commit
ebe8b88ed4
  1. 2
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataDriverArteryClient.java
  2. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BillladingDTO.java
  3. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataDriverArteryClient.java
  4. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java
  5. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml
  6. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataDriverArteryService.java
  7. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
  8. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataDriverArteryServiceImpl.java
  9. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java
  10. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java
  11. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
  12. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingService.java
  13. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java
  14. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  15. 26
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java
  16. 22
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  17. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java

2
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataDriverArteryClient.java

@ -59,7 +59,7 @@ public interface IBasicdataDriverArteryClient {
BasicdataDriverArteryEntity getDriverArtery(@RequestParam Long id);
@GetMapping(API_PREFIX+"/findDriverListByName")
List<JSONObject> findDriverListByName(@RequestParam String driverName);
List<JSONObject> findDriverListByName(@RequestParam String driverName,@RequestParam String jobType);
@GetMapping(API_PREFIX+"/getDriverArteryById")
BasicdataDriverArteryEntity getDriverArteryById(Long id);

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

@ -37,6 +37,7 @@ public class BillladingDTO extends TrunklineBillladingEntity {
private Integer enterNum;
private String clientName;
private String jobType;
private String startDateStr;

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataDriverArteryClient.java

@ -71,8 +71,8 @@ public class BasicdataDriverArteryClient implements IBasicdataDriverArteryClient
}
@Override
public List<JSONObject> findDriverListByName(String driverName) {
List<BasicdataDriverArteryVO> ls = basicdataDriverArteryService.findDriverListByName(driverName);
public List<JSONObject> findDriverListByName(String driverName,String jobType) {
List<BasicdataDriverArteryVO> ls = basicdataDriverArteryService.findDriverListByName(driverName,jobType);
List<JSONObject> list = new ArrayList<>();
for (BasicdataDriverArteryVO driverArteryEntity:ls){
JSONObject jsonObject = new JSONObject();

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java

@ -57,7 +57,7 @@ public interface BasicdataDriverArteryMapper extends BaseMapper<BasicdataDriverA
*/
List<BasicdataDriverArteryVO> selectBasicdataDictionary();
List<BasicdataDriverArteryVO> findDriverListByName(@Param("driverName") String driverName);
List<BasicdataDriverArteryVO> findDriverListByName(@Param("driverName") String driverName,@Param("jobType") String jobType);
void updateIsdeletedByPhone(@Param("phone") String phone);

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml

@ -166,7 +166,10 @@
from logpm_basicdata_driver_artery lbda
left join logpm_basicdata_drivermiddle lbdm on lbdm.driver_id = lbda.id
left join logpm_basicdata_vehicle lbv on lbv.id = lbdm.brand_id
where `name` like concat('%',#{driverName},'%')
where lbda.`name` like concat('%',#{driverName},'%')
<if test="jobType != null and jobType = ''">
and lbda.job_type = #{jobType}
</if>
group by lbda.id,
lbda.name,
lbda.phone,

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataDriverArteryService.java

@ -70,5 +70,5 @@ public interface IBasicdataDriverArteryService extends BaseService<BasicdataDriv
void importDriverArtery(List<BasicdataDriverArteryImproterExcel> data);
List<BasicdataDriverArteryVO> findDriverListByName(String driverName);
List<BasicdataDriverArteryVO> findDriverListByName(String driverName,String jobType);
}

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java

@ -457,7 +457,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
basicdataCodeRecordEntity.setNum(inrc);
basicdataCodeRecordService.updateById(basicdataCodeRecordEntity);
String trayCode = code + year + CommonUtil.geFourNumber(month.longValue(), 2) + inrc;
String trayCode = code+ warehouseCode + (year%100) + inrc;
String trayName = desName + abbreviation + inrc;
return trayCode+"&&"+trayName;

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataDriverArteryServiceImpl.java

@ -327,7 +327,7 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
@Override
public List<BasicdataDriverArteryVO> findDriverListByName(String driverName) {
return baseMapper.findDriverListByName(driverName);
public List<BasicdataDriverArteryVO> findDriverListByName(String driverName,String jobType) {
return baseMapper.findDriverListByName(driverName,jobType);
}
}

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java

@ -499,8 +499,9 @@ public class BillladingController {
String method = "############findDriverListByName: ";
log.info(method + "请求参数{}", billladingDTO);
String driverName = billladingDTO.getDriverName();
String jobType = billladingDTO.getJobType();
try{
return trunklineBillladingService.findDriverListByName(driverName);
return trunklineBillladingService.findDriverListByName(driverName,jobType);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);

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

@ -64,4 +64,6 @@ public interface TrunklineCarsOrderMapper extends BaseMapper<TrunklineCarsOrderE
void updateNoCustomer(@Param("updateCarsOrderIdList") List<Long> updateCarsOrderIdList);
List<TrunklineCarsOrderVO> findMallOrderList(@Param("carsOrderIdList") List<Long> carsOrderIdList);
void deleteNoRealNumByLoadIdAndWarehouseId(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
}

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml

@ -349,5 +349,11 @@
</foreach>
</select>
<delete id="deleteNoRealNumByLoadIdAndWarehouseId" >
delete from logpm_trunkline_cars_order
where load_id = #{loadId}
and node_id = #{warehouseId}
and real_num = 0
</delete>
</mapper>

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

@ -35,7 +35,7 @@ public interface ITrunklineBillladingService extends BaseService<TrunklineBillla
R findCarListByName(String carNumber);
R findDriverListByName(String driverName);
R findDriverListByName(String driverName,String jobType);
R findBillladingClientByName(String clientName);

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java

@ -61,4 +61,7 @@ public interface ITrunklineCarsOrderService extends BaseService<TrunklineCarsOrd
void updateNoCustomer(List<Long> updateCarsOrderIdList);
List<TrunklineCarsOrderVO> findMallOrderList(List<Long> carsOrderIdList);
void deleteNoRealNumByLoadIdAndWarehouseId(Long loadId, Long warehouseId);
}

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

@ -4402,7 +4402,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
parcelNumberEntity.setStockArticleId(orderId);
parcelNumberEntity.setWarehouseId(entity.getWarehouseId());
parcelNumberEntity.setParcelListId(aLong);
parcelNumberEntity.setHandQuantity(0);
parcelNumberEntity.setHandQuantity(entity.getQuantity());
parcelNumberEntity.setQuantity(entity.getQuantity());
parcelNumberEntity.setDeliveryQuantity(0);
parcelNumberEntity.setSigninQuantity(0);

26
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java

@ -690,20 +690,25 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
}
Long waybillId = warehouseWaybillEntity.getId();
Integer totalCount = warehouseWaybillEntity.getTotalCount();
//查询运单有多少提货数量
Integer finishNum = billladingWaybillService.getFinishNumByWaybillId(waybillId);
if(finishNum+enterNum > totalCount){
log.warn("#############addWaybillToBillladingId: 总提货数大于运单总数量 totalCount={} finishNum={} enterNum={}",totalCount,finishNum,enterNum);
return R.fail(405,"总提货数大于运单总数量");
Long departureWarehouseId = warehouseWaybillEntity.getDepartureWarehouseId();
Integer billladingNum = warehouseWaybillEntity.getBillladingNum();
if(departureWarehouseId.equals(warehouseId)){
log.warn("#############addWaybillToBillladingId: 运单始发仓不是当前仓 waybillNo={}",waybillNo);
return R.fail(405,"运单始发仓不是当前仓");
}
TrunklineBillladingWaybillEntity entity = billladingWaybillService.findEntityByWaybillIdAndBillladingId(waybillId, billladingId);
if(!Objects.isNull(entity)){
log.warn("#############addWaybillToBillladingId: 运单已绑定到该提货单 totalCount={} finishNum={} enterNum={}",totalCount,finishNum,enterNum);
log.warn("#############addWaybillToBillladingId: 运单已绑定到该提货单 totalCount={} enterNum={}",totalCount,enterNum);
return R.fail(405,"运单已绑定到该提货单");
}
if(billladingNum+enterNum > totalCount){
log.warn("#############addWaybillToBillladingId: 总提货数大于运单总数量 totalCount={} billladingNum={} enterNum={}",totalCount,billladingNum,enterNum);
return R.fail(405,"总提货数大于运单总数量");
}
entity = new TrunklineBillladingWaybillEntity();
entity.setWarehouseId(warehouseId);
entity.setWarehouseName(warehouseName);
@ -749,8 +754,11 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
}
@Override
public R findDriverListByName(String driverName) {
List<JSONObject> ls = basicdataDriverArteryClient.findDriverListByName(driverName);
public R findDriverListByName(String driverName,String jobType) {
if(StringUtil.isBlank(jobType)){
jobType = "";
}
List<JSONObject> ls = basicdataDriverArteryClient.findDriverListByName(driverName,jobType);
return R.data(ls);
}

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

@ -351,6 +351,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
try {
//更新关联订单数据的发车数量
trunklineCarsOrderService.updateStartNumByLoadIdAndWarehouseId(loadId, warehouseId);
//删除没有装车的计划数据
trunklineCarsOrderService.deleteNoRealNumByLoadIdAndWarehouseId(loadId, warehouseId);
//更新关联订单数据的发车数量
updateNumByLoadId(loadId);
//生成直发商家签收单
// createCustomerSignOrder(loadId, warehouseId);
//生成异常列表
@ -6732,8 +6737,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//需要补装车扫记录
TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity = new TrunklineCarsLoadScanEntity();
trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
// trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
// trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
trunklineCarsLoadScanEntity.setOrderCode(advanceDetailEntity.getOrderCode());
trunklineCarsLoadScanEntity.setWaybillId(advanceDetailEntity.getWaybillId());
trunklineCarsLoadScanEntity.setWaybillNo(advanceDetailEntity.getWaybillNo());
@ -6771,8 +6776,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//需要补装车扫记录
TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity = new TrunklineCarsLoadScanEntity();
trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
// trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
// trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
trunklineCarsLoadScanEntity.setOrderCode(advanceDetailEntity.getOrderCode());
trunklineCarsLoadScanEntity.setWaybillId(advanceDetailEntity.getWaybillId());
trunklineCarsLoadScanEntity.setWaybillNo(advanceDetailEntity.getWaybillNo());
@ -6916,8 +6921,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}else{
//需要补装车扫记录
TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity = new TrunklineCarsLoadScanEntity();
trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
// trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
// trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
trunklineCarsLoadScanEntity.setLoadId(loadId);
trunklineCarsLoadScanEntity.setLoadCode(loadCode);
trunklineCarsLoadScanEntity.setOrderCode("--");
@ -6949,6 +6954,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
} else {
//没装车记录,有包件信息
String waybillNumber = parcelListEntity.getWaybillNumber();
orderCode = parcelListEntity.getOrderCode();
Long wid = parcelListEntity.getWarehouseId();
@ -6965,8 +6971,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//需要补装车扫记录
TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity = new TrunklineCarsLoadScanEntity();
trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
// trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
// trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
trunklineCarsLoadScanEntity.setLoadId(loadId);
trunklineCarsLoadScanEntity.setLoadCode(loadCode);
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNumber);

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

@ -148,4 +148,9 @@ public class TrunklineCarsOrderEntityServiceImpl extends BaseServiceImpl<Trunkli
return baseMapper.findMallOrderList(carsOrderIdList);
}
@Override
public void deleteNoRealNumByLoadIdAndWarehouseId(Long loadId, Long warehouseId) {
baseMapper.deleteNoRealNumByLoadIdAndWarehouseId(loadId,warehouseId);
}
}

Loading…
Cancel
Save