diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordClient.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordClient.java index a294c6512..6721bec69 100644 --- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordClient.java +++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordClient.java @@ -22,8 +22,10 @@ import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; import java.util.List; +import java.util.Map; /** * 货位 Feign接口类 @@ -43,7 +45,8 @@ public interface IAftersalesAbnormalRecordClient { void addAbnormalRecord(@RequestBody AftersalesAbnormalRecordEntity warehouseAbnormalRecordEntity); @GetMapping(API_PREFIX+"/findAbnormalList") - List findAbnormalList(String carsNo); - + List findAbnormalList(@RequestParam("carsNo") String carsNo); + @GetMapping(API_PREFIX+"/findListByCarsNoAndUpWarehouseId") + Map findListByCarsNoAndUpWarehouseId(@RequestParam("carsNo") String carsNo, @RequestParam("warehouseId") Long warehouseId); } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadEntity.java index 7cc524197..96f5d8b40 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadEntity.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadEntity.java @@ -198,4 +198,8 @@ public class TrunklineCarsLoadEntity extends TenantEntity { /** 签收时间 */ @ApiModelProperty(name = "签收时间",notes = "") private Date signTime; + + /** 直发商家个数 */ + @ApiModelProperty(name = "直发商家个数",notes = "") + private Integer customerNum; } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadLineEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadLineEntity.java index f317c3605..47a235b7a 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadLineEntity.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadLineEntity.java @@ -156,5 +156,17 @@ public class TrunklineCarsLoadLineEntity extends TenantEntity { /** 路桥费 */ @ApiModelProperty(name = "路桥费",notes = "") private BigDecimal tollFee ; + /** 卸车报告状态0无 1有 */ + @ApiModelProperty(name = "卸车报告状态0无 1有",notes = "") + private Integer unloadReportStatus; + /** 卸车报告第一段 */ + @ApiModelProperty(name = "卸车报告第一段",notes = "") + private String reportOne; + /** 卸车报告第二段 */ + @ApiModelProperty(name = "卸车报告第二段",notes = "") + private String reportTwo; + /** 卸车报告第三段 */ + @ApiModelProperty(name = "卸车报告第三段",notes = "") + private String reportThree; } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadReportVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadReportVO.java new file mode 100644 index 000000000..3734e7b04 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadReportVO.java @@ -0,0 +1,17 @@ +package com.logpm.trunkline.vo; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class UnloadReportVO implements Serializable { + + private Integer loadingNum; + private Integer unloadNum; + private Integer noDataNum; + private Integer noPlanNum; + private Integer noUnloadNum; + private Integer manualNum; + +} diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java index 62c7f78a6..99942a6a2 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java @@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; import java.util.List; +import java.util.Map; @ApiIgnore() @RestController @@ -28,4 +29,9 @@ public class AftersalesAbnormalRecordClient implements IAftersalesAbnormalRecord .eq("abnormal_status",0); return aftersalesAbnormalRecordService.list(queryWrapper); } + + @Override + public Map findListByCarsNoAndUpWarehouseId(String carsNo, Long warehouseId) { + return aftersalesAbnormalRecordService.findListByCarsNoAndUpWarehouseId(carsNo,warehouseId); + } } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.java index 96755dd0b..5ba277203 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.java @@ -7,10 +7,13 @@ import com.logpm.aftersales.entity.AftersalesAbnormalRecordEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.Map; + @Mapper public interface AftersalesAbnormalRecordMapper extends BaseMapper { IPage findPageList(IPage page, @Param("param") AbnormalRecordDTO abnormalRecordDTO); + Map findListByCarsNoAndUpWarehouseId(@Param("carsNo") String carsNo, @Param("warehouseId") Long warehouseId); } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.xml index 41b9c80f0..d34507952 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.xml @@ -42,4 +42,12 @@ order by up_time desc + + diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordService.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordService.java index 3714a652c..d8791e2de 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordService.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordService.java @@ -5,9 +5,12 @@ import com.logpm.aftersales.entity.AftersalesAbnormalRecordEntity; import org.springblade.core.mp.base.BaseService; import org.springblade.core.tool.api.R; +import java.util.Map; + public interface IAftersalesAbnormalRecordService extends BaseService { R findPageList(AbnormalRecordDTO abnormalRecordDTO); R dealAbnormal(AbnormalRecordDTO abnormalRecordDTO); + Map findListByCarsNoAndUpWarehouseId(String carsNo, Long warehouseId); } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java index 99908c77b..bd238e5d3 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java @@ -15,6 +15,7 @@ import org.springblade.core.tool.api.R; import org.springframework.stereotype.Service; import java.util.Date; +import java.util.Map; import java.util.Objects; @Slf4j @@ -75,4 +76,9 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl findListByCarsNoAndUpWarehouseId(String carsNo, Long warehouseId) { + return baseMapper.findListByCarsNoAndUpWarehouseId(carsNo,warehouseId); + } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java index edd5e07c6..34b76990e 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java @@ -2285,6 +2285,35 @@ public class CarsLoadController { } } + @ResponseBody + @PostMapping("/findWarehouseUnloadReport") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "查询运配载节点卸车报告", notes = "传入loadCarsDTO") + public R findWarehouseUnloadReport(@RequestBody LoadCarsDTO loadCarsDTO) { + String method = "############findWarehouseUnloadReport: "; + log.info(method + "请求参数{}", loadCarsDTO); + Long loadId = loadCarsDTO.getLoadId(); + try{ + //当前登录人选择的仓库 + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if(Objects.isNull(myCurrentWarehouse)){ + log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); + return R.fail(405,"仓库信息为空"); + } + loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); + if(ObjectUtil.isNull(loadId)){ + log.warn(method+"配载id为空 loadId={}",loadId); + return R.fail(405,"配载id为空"); + } + return carsLoadService.findWarehouseUnloadReport(loadCarsDTO); + }catch (CustomerException e){ + log.error(e.message,e); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error(method+"系统异常",e); + return R.fail(500,"系统异常"); + } + } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java index c9d209b22..15dae2f56 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java @@ -130,4 +130,6 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper loadingDetailExport(@Param("param") LoadCarsDTO loadCarsDTO); Integer findSignNumByLoadId(@Param("loadId") Long loadId); + + UnloadReportVO findUnloadReport(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml index 7503b0500..8b1b98d13 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml @@ -628,4 +628,17 @@ and scan_status = '3' + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java index 4dbc8c71e..8f40bfd92 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java @@ -125,4 +125,6 @@ public interface ITrunklineCarsLoadScanService extends BaseService loadingDetailExport(LoadCarsDTO loadCarsDTO); Integer findSignNumByLoadId(Long loadId); + + UnloadReportVO findUnloadReport(Long loadId, Long warehouseId); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java index f8038fc9c..634ca90b8 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java @@ -212,4 +212,6 @@ public interface ITrunklineCarsLoadService extends BaseService noUnloadList = trunklineCarsLoadScanService.findUnloadCheckAbnormalNoUnloadList(loadId,warehouseId); for (TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity : noUnloadList) { String loadCode = trunklineCarsLoadScanEntity.getLoadCode(); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java index 79475f87e..7f7c2668e 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java @@ -308,4 +308,9 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl orderPackageCodes = trunklineCarsLoadScanService.findUnloadByLoadIdAndWarehouseId(loadId, warehouseId); @@ -4512,6 +4519,41 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl map = new HashMap<>(); + map.put("one",carsLoadLineEntity.getReportOne()); + map.put("two",carsLoadLineEntity.getReportTwo()); + + Map abnormalRecord = abnormalRecordClient.findListByCarsNoAndUpWarehouseId(carsNo,warehouseId); + map.put("three","当前待处理异常 "+abnormalRecord.get("dealwithNum")+" 条、已处理异常 "+abnormalRecord.get("noDealwithNum")+" 条"); + + return R.data(map); + } + @Override public R loadingTrayInfo(LoadCarsDTO loadCarsDTO) { log.info("##############loadingTrayInfo: 查询托盘的货物信息"); @@ -4833,6 +4875,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl