Browse Source

Merge branch 'dev' into pre-production

master
pref_mail@163.com 9 months ago
parent
commit
73a372aea2
  1. 10
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordClient.java
  2. 13
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java
  3. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadAllOrderVO.java
  4. 14
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java
  5. 19
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java
  6. 44
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/jobhandler/AftersalesXxlJob.java
  7. 5
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.java
  8. 6
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.xml
  9. 5
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordService.java
  10. 4
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java
  11. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataBrandMapper.xml
  12. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataBrandServiceImpl.java
  13. 10
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java
  14. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  15. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  16. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java
  17. 31
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  18. 125
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  19. 8
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

10
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordClient.java

@ -16,6 +16,7 @@
*/
package com.logpm.aftersales.feign;
import com.alibaba.fastjson.JSONObject;
import com.logpm.aftersales.entity.AftersalesAbnormalRecordEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
@ -48,5 +49,12 @@ public interface IAftersalesAbnormalRecordClient {
List<AftersalesAbnormalRecordEntity> findAbnormalList(@RequestParam("carsNo") String carsNo);
@GetMapping(API_PREFIX+"/findListByCarsNoAndUpWarehouseId")
Map<String, Integer> findListByCarsNoAndUpWarehouseId(@RequestParam("carsNo") String carsNo, @RequestParam("warehouseId") Long warehouseId);
JSONObject findListByCarsNoAndUpWarehouseId(@RequestParam("carsNo") String carsNo, @RequestParam("warehouseId") Long warehouseId);
@GetMapping(API_PREFIX+"/findOrderPackageAndAbnormalStatus")
List<AftersalesAbnormalRecordEntity> findOrderPackageAndAbnormalStatus(@RequestParam("orderPackageCode") String orderPackageCode, @RequestParam("abnormalStatus") String abnormalStatus);
@PostMapping(API_PREFIX+"/updateList")
void updateList(@RequestBody List<AftersalesAbnormalRecordEntity> abnormalRecordEntities);
}

13
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java

@ -1,5 +1,6 @@
package com.logpm.trunkline.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@ -28,8 +29,8 @@ public class OpenOrderDTO implements Serializable {
private List<Long> advanceIds;//暂存单ids
private String orderCode;//订单号
private String openOrderDate;//开单时间
private String dearCode;//商场编码
private String dearName;//商场名称
private String dealerCode;//商场编码
private String dealerName;//商场名称
private Long shipperId;//发货单位id
private String shipper;//发货单位
@ -106,4 +107,12 @@ public class OpenOrderDTO implements Serializable {
private String editResonCode;//改单原因编码
private String editReson;//改单原因
private Integer pickupCompleteOrNot;//提货是否整车 0否 1是
private Integer trunklineCompleteOrNot;//干线是否整车 0否 1是
private String trunklineVehicleType;//提货车型
private String pickupVehicleType;//提货车型
}

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadAllOrderVO.java

@ -11,6 +11,7 @@ public class CarsLoadAllOrderVO implements Serializable {
private Long carsOrderId;//id
private String orderCode;//订单号
private Long waybillId;//运单id
private String waybillNo;//运单号
private Date createTime;//创建时间
private String destination;//到站

14
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java

@ -452,11 +452,21 @@ public class WarehouseWaybillEntity extends TenantEntity {
private String departureCode;
@ApiModelProperty(value = "商场编码")
private String dearCode;
private String dealerCode;
@ApiModelProperty(value = "商场名称")
private String dearName;
private String dealerName;
@ApiModelProperty(value = "提货是否整车 0否 1是")
private Integer pickupCompleteOrNot;
@ApiModelProperty(value = "干线是否整车 0否 1是")
private Integer trunklineCompleteOrNot;
@ApiModelProperty(value = "干线车型 ")
private String trunklineVehicleType;
@ApiModelProperty(value = "提货车型 ")
private String pickupVehicleType;
}

19
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java

@ -1,5 +1,6 @@
package com.logpm.aftersales.feign;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.aftersales.entity.AftersalesAbnormalRecordEntity;
import com.logpm.aftersales.service.IAftersalesAbnormalRecordService;
@ -8,7 +9,6 @@ import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.Map;
@ApiIgnore()
@RestController
@ -31,7 +31,22 @@ public class AftersalesAbnormalRecordClient implements IAftersalesAbnormalRecord
}
@Override
public Map<String, Integer> findListByCarsNoAndUpWarehouseId(String carsNo, Long warehouseId) {
public JSONObject findListByCarsNoAndUpWarehouseId(String carsNo, Long warehouseId) {
return aftersalesAbnormalRecordService.findListByCarsNoAndUpWarehouseId(carsNo,warehouseId);
}
@Override
public List<AftersalesAbnormalRecordEntity> findOrderPackageAndAbnormalStatus(String orderPackageCode, String abnormalStatus) {
//查询AftersalesAbnormalRecordEntity的list通过aftersalesAbnormalRecordService使用orderPackageCode和abnormalStatus
//返回list
QueryWrapper<AftersalesAbnormalRecordEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("order_package_code",orderPackageCode)
.eq("abnormal_status",abnormalStatus);
return aftersalesAbnormalRecordService.list(queryWrapper);
}
@Override
public void updateList(List<AftersalesAbnormalRecordEntity> abnormalRecordEntities) {
aftersalesAbnormalRecordService.updateBatchById(abnormalRecordEntities);
}
}

44
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/jobhandler/AftersalesXxlJob.java

@ -119,13 +119,15 @@ public class AftersalesXxlJob {
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(basicdataWarehouseEntity.getId());
if (ObjectUtil.isNotEmpty(warehouseEntity)) {
basicdataWarehouseEntity.setCode(warehouseEntity.getCode());
basicdataWarehouseEntity.setWarehouseCode(warehouseEntity.getWarehouseCode());
}
// 完善数据
List<AftersalesAbnormalPackageEntity> packageEntityList = new ArrayList<>();
AftersalesAbnormalPackageEntity aftersalesAbnormalPackageEntity = new AftersalesAbnormalPackageEntity();
aftersalesAbnormalPackageEntity.setTenantId(bladeUser.getTenantId());
aftersalesAbnormalPackageEntity.setCreateUser(bladeUser.getUserId());
aftersalesAbnormalPackageEntity.setPackageCode(aftersalesAbnormalRecordEntity.getOrderPackageCode());
aftersalesAbnormalPackageEntity.setWaybillNumber(aftersalesAbnormalRecordEntity.getWaybillNo());
aftersalesAbnormalPackageEntity.setOrderCode(aftersalesAbnormalRecordEntity.getOrderCode());
@ -147,7 +149,7 @@ public class AftersalesXxlJob {
aftersalesWorkOrder.setWaybillNumber(aftersalesAbnormalRecordEntity.getWaybillNo());
aftersalesWorkOrder.setOrderCode(aftersalesAbnormalRecordEntity.getOrderCode());
WarehouseWaybillEntity byWaybillNo = wallBillOrderService.findByWaybillNo(aftersalesWorkOrder.getWorkOrderNumber());
WarehouseWaybillEntity byWaybillNo = wallBillOrderService.findByWaybillNo(aftersalesWorkOrder.getWaybillNumber());
if (byWaybillNo != null) {
aftersalesWorkOrder.setWaybillMall(byWaybillNo.getConsignee());
}
@ -158,21 +160,47 @@ public class AftersalesXxlJob {
List<AftersalesProcessorEntity> processorEntityList = new ArrayList<>();
AftersalesProcessorEntity aftersalesProcessorEntity = new AftersalesProcessorEntity();
aftersalesProcessorEntity.setWarehouseId(entityByCarsNo.getStartWarehouseId());
//责任方
aftersalesProcessorEntity.setTypesOf("1");
AftersalesProcessorEntity aftersalesProcessorEntity = new AftersalesProcessorEntity();
aftersalesProcessorEntity.setWarehouseId(warehouseEntity.getId());
aftersalesProcessorEntity.setBusinessId(entityByCarsNo.getStartWarehouseId());
BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(entityByCarsNo.getStartWarehouseId());
if(entityWarehouseId!=null){
aftersalesProcessorEntity.setBusinessName(entityWarehouseId.getName());
}
aftersalesProcessorEntity.setTypesOf("1");
aftersalesProcessorEntity.setTenantId(bladeUser.getTenantId());
aftersalesProcessorEntity.setCreateUser(bladeUser.getUserId());
aftersalesProcessorEntity.setConditions("1");
processorEntityList.add(aftersalesProcessorEntity);
// 处理方
AftersalesProcessorEntity aftersalesProcessorEntity1 = new AftersalesProcessorEntity();
aftersalesProcessorEntity1.setWarehouseId(warehouseEntity.getId());
aftersalesProcessorEntity1.setBusinessName(warehouseEntity.getName());
aftersalesProcessorEntity1.setBusinessId(warehouseEntity.getId());
aftersalesProcessorEntity1.setTypesOf("2");
aftersalesProcessorEntity1.setTenantId(bladeUser.getTenantId());
aftersalesProcessorEntity1.setCreateUser(bladeUser.getUserId());
aftersalesProcessorEntity1.setConditions("1");
processorEntityList.add(aftersalesProcessorEntity1);
aftersalesWorkOrder.setProcessorEntityList(processorEntityList);
//责任人
//责任人
List<AftersalesPersonResponsibleDTO> personResponsibleDTO = new ArrayList<>();
AftersalesPersonResponsibleDTO aftersalesPersonResponsibleDTO = new AftersalesPersonResponsibleDTO();
aftersalesPersonResponsibleDTO.setTenantId(bladeUser.getTenantId());
aftersalesPersonResponsibleDTO.setCreateUser(aftersalesAbnormalRecordEntity.getCreateUser());
aftersalesPersonResponsibleDTO.setTypesOf("1");
// 需要获取到仓库的负责人
@ -182,7 +210,7 @@ public class AftersalesXxlJob {
aftersalesPersonResponsibleDTO.setPersonResponsibleId(wareManagerUser.get("userId").toString());
aftersalesPersonResponsibleDTO.setPersonResponsibleName(wareManagerUser.get("userName").toString());
}
warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(aftersalesProcessorEntity.getWarehouseId());
// warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(aftersalesProcessorEntity.getWarehouseId());
aftersalesPersonResponsibleDTO.setResponsibilityRatio("100");
aftersalesPersonResponsibleDTO.setTypesOf("1");
aftersalesPersonResponsibleDTO.setDifference("1");

5
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.java

@ -1,5 +1,6 @@
package com.logpm.aftersales.mapper;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.aftersales.dto.AbnormalRecordDTO;
@ -7,13 +8,11 @@ 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<AftersalesAbnormalRecordEntity> {
IPage<AftersalesAbnormalRecordEntity> findPageList(IPage<Object> page, @Param("param") AbnormalRecordDTO abnormalRecordDTO);
Map<String, Integer> findListByCarsNoAndUpWarehouseId(@Param("carsNo") String carsNo, @Param("warehouseId") Long warehouseId);
JSONObject findListByCarsNoAndUpWarehouseId(@Param("carsNo") String carsNo, @Param("warehouseId") Long warehouseId);
}

6
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.xml

@ -42,9 +42,9 @@
order by up_time desc
</select>
<select id="findListByCarsNoAndUpWarehouseId" resultType="java.util.Map">
select sum(IF(abnormal_status != 1,1,0)) dealwithNum,
sum(IF(abnormal_status = 1,1,0)) noDealwithNum
<select id="findListByCarsNoAndUpWarehouseId" resultType="com.alibaba.fastjson.JSONObject">
select IFNULL(sum(IF(abnormal_status != 1,1,0)),0) dealwithNum,
IFNULL(sum(IF(abnormal_status = 1,1,0)),0) noDealwithNum
from logpm_aftersales_abnormal_record
where cars_no = #{carsNo}
and up_warehouse_id = #{warehouseId}

5
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordService.java

@ -1,16 +1,15 @@
package com.logpm.aftersales.service;
import com.alibaba.fastjson.JSONObject;
import com.logpm.aftersales.dto.AbnormalRecordDTO;
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<AftersalesAbnormalRecordEntity> {
R findPageList(AbnormalRecordDTO abnormalRecordDTO);
R dealAbnormal(AbnormalRecordDTO abnormalRecordDTO);
Map<String, Integer> findListByCarsNoAndUpWarehouseId(String carsNo, Long warehouseId);
JSONObject findListByCarsNoAndUpWarehouseId(String carsNo, Long warehouseId);
}

4
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.aftersales.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.aftersales.dto.AbnormalRecordDTO;
@ -15,7 +16,6 @@ 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
@ -78,7 +78,7 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
}
@Override
public Map<String, Integer> findListByCarsNoAndUpWarehouseId(String carsNo, Long warehouseId) {
public JSONObject findListByCarsNoAndUpWarehouseId(String carsNo, Long warehouseId) {
return baseMapper.findListByCarsNoAndUpWarehouseId(carsNo,warehouseId);
}
}

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataBrandMapper.xml

@ -17,7 +17,8 @@
</select>
<select id="findAllList" resultType="com.alibaba.fastjson.JSONObject">
select brand_name brandName
select brand_name brandName,
id brandId
from logpm_basicdata_brand
</select>

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataBrandServiceImpl.java

@ -57,6 +57,7 @@ public class BasicdataBrandServiceImpl extends BaseServiceImpl<BasicdataBrandMap
public List<JSONObject> findAllList() {
List<JSONObject> allList = baseMapper.findAllList();
JSONObject jsonObject = new JSONObject();
jsonObject.put("brandId",0);
jsonObject.put("brandName","零担");
allList.add(0,jsonObject);
return allList;

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

@ -639,14 +639,14 @@ public class OpenOrderController {
// }
BigDecimal subtotalFreight = waybillDetailDTO.getSubtotalFreight();
if(subtotalFreight.compareTo(BigDecimal.ZERO) <= 0){
if(subtotalFreight.compareTo(BigDecimal.ZERO) < 0){
log.warn("#################openZeroOrderParamVerify: 货物运费小计不正确 subtotalFreight={} ",subtotalFreight);
throw new CustomerException(405,"货物运费小计不正确");
}
}
BigDecimal totalFreight = openOrderDTO.getTotalFreight();
if(totalFreight.compareTo(BigDecimal.ZERO) <= 0){
if(totalFreight.compareTo(BigDecimal.ZERO) < 0){
log.warn("#################openZeroOrderParamVerify: 运费不正确 totalFreight={} ",totalFreight);
throw new CustomerException(405,"运费不正确");
}
@ -916,14 +916,14 @@ public class OpenOrderController {
// }
BigDecimal subtotalFreight = waybillDetailDTO.getSubtotalFreight();
if(subtotalFreight.compareTo(BigDecimal.ZERO) <= 0){
if(subtotalFreight.compareTo(BigDecimal.ZERO) < 0){
log.warn("#################openOrderParamVerify: 货物运费小计不正确 subtotalFreight={} ",subtotalFreight);
throw new CustomerException(405,"货物运费小计不正确");
}
}
BigDecimal totalFreight = openOrderDTO.getTotalFreight();
if(totalFreight.compareTo(BigDecimal.ZERO) <= 0){
if(totalFreight.compareTo(BigDecimal.ZERO) < 0){
log.warn("#################openOrderParamVerify: 运费不正确 totalFreight={} ",totalFreight);
throw new CustomerException(405,"运费不正确");
}
@ -1284,7 +1284,7 @@ public class OpenOrderController {
@PostMapping("/updateWaybill")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "改单", notes = "传入openOrderDTO")
public R updateWaybill(@RequestBody OpenOrderDTO openOrderDTO) {
public R updateWaybill(@RequestBody OpenOrderDTO openOrderDTO) {
String method = "############updateWaybill: ";
log.info(method + "请求参数{}", openOrderDTO);
Long waybillId = openOrderDTO.getWaybillId();

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

@ -127,6 +127,7 @@
<select id="findAllOrderList" resultType="com.logpm.trunkline.vo.CarsLoadAllOrderVO">
select t.order_code orderCode,
t.waybill_id waybillId,
t.waybill_number waybillNo,
t.entry_time_end warehouseEntryTimeEnd,
lww.create_time createTime,
@ -146,6 +147,7 @@
IFNULL(TRUNCATE(lww.total_freight/lww.total_count,4),0) price,
IFNULL(TRUNCATE(lww.total_freight/lww.total_count,4),0)*(IFNULL( t.stock_num, 0 )-IFNULL( l.planNum,0)) freight
from (select ldpl.order_code,
ldpl.waybill_id,
ldpl.waybill_number,
ldsa.is_zero,
IF(ldsa.is_zero = 1,ldsa.hand_quantity,count(ldpl.id)) stock_num,
@ -181,6 +183,7 @@
and ldsa.type_service != '4'
</if>
group by ldpl.order_code,
ldpl.waybill_id,
ldpl.waybill_number,
ldsa.is_zero,
ldsa.hand_quantity) t
@ -289,6 +292,7 @@
<select id="findUseOrderListNoPage" resultType="com.logpm.trunkline.vo.CarsLoadAllOrderVO">
select ltco.id carsOrderId,
ltco.order_code orderCode,
ltco.waybill_id waybillId,
ltco.waybill_no waybillNo,
lww.create_time createTime,
lww.destination destination,
@ -316,6 +320,7 @@
</if>
group by ltco.id,
ltco.order_code,
ltco.waybill_id,
ltco.waybill_no,
lww.create_time,
lww.destination,

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

@ -637,8 +637,8 @@
sum(IF(ltcls.final_node_id = #{warehouseId} and ltcls.scan_status = '1',ltcls.num,0))+sum(IF(ltcls.final_node_id = #{warehouseId} and ltcls.scan_status != '1',ltcls.num-ltcls.unload_num,0)) noUnloadNum,
sum(IF(ltcls.unload_node_id = #{warehouseId} and ltcls.type = 2 and ltcls.scan_status = '1',ltcls.unload_num,0)) manualNum
from logpm_trunkline_cars_load_scan ltcls
left join logpm_trunkline_cars_order ltco on ltco.waybill_id = ltcls.waybill_id and ltco.order_code = ltcls.order_code
where ltcls.load_id = #{loadId}
left join logpm_trunkline_cars_order ltco on ltco.waybill_id = ltcls.waybill_id and ltco.order_code = ltcls.order_code and ltco.load_id = #{loadId}
where ltcls.load_id =
</select>
</mapper>

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java

@ -17,4 +17,5 @@ public interface ICarsLoadAsyncService {
void abnormalListUnloadCheckByLoadIdAndWarehouseId(Long loadId, Long warehouseId, String nodeName, String tenantId, Long userId, String nickName, Long firstLong);
void dealwithAfterAbnormalPackage(String orderPackageCode, Long warehouseId, String warehouseName, String carsNo, Long userId, Long aLong, String nickName);
}

31
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java

@ -2,6 +2,7 @@ package com.logpm.trunkline.service.impl;
import com.logpm.aftersales.entity.AftersalesAbnormalRecordEntity;
import com.logpm.aftersales.feign.IAftersalesAbnormalRecordClient;
import com.logpm.aftersales.feign.IAftersalesWorkOrderClient;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
@ -50,6 +51,8 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
@Lazy
@Autowired
private IAftersalesAbnormalRecordClient abnormalRecordClient;
@Autowired
private IAftersalesWorkOrderClient aftersalesWorkOrderClient;
@Async
@Override
@ -411,8 +414,8 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId);
if(!Objects.isNull(carsLoadLineEntity)){
carsLoadLineEntity.setUnloadReportStatus(1);
carsLoadLineEntity.setReportOne("本次装车件数 "+unloadReportVO.getLoadingNum()+" 件,实际卸车件数 "+unloadReportVO.getUnloadNum()+" 件");
carsLoadLineEntity.setReportTwo("无基础数据货物 "+unloadReportVO.getNoDataNum()+" 件、非计划内货物 "+unloadReportVO.getNoPlanNum()+" 件、少货 "+unloadReportVO.getNoUnloadNum()+" 件、手动确认入库 "+unloadReportVO.getManualNum()+" 件");
carsLoadLineEntity.setReportOne("本次装车件数 "+unloadReportVO.getLoadingNum()+" 件,实际卸车件数 "+unloadReportVO.getUnloadNum()+" 件,计划未卸车数量 "+(unloadReportVO.getLoadingNum()-unloadReportVO.getUnloadNum())+" 件");
carsLoadLineEntity.setReportTwo("无基础数据货物 "+unloadReportVO.getNoDataNum()+" 件、非计划内货物 "+unloadReportVO.getNoPlanNum()+" 件、手动确认入库 "+unloadReportVO.getManualNum()+" 件");
trunklineCarsLoadLineService.updateById(carsLoadLineEntity);
}
@ -442,6 +445,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
abnormalRecordEntity.setUpUserId(userId);
abnormalRecordEntity.setUpUserName(nickName);
abnormalRecordEntity.setAbnormalStatus(0);
abnormalRecordEntity.setSendOrderStatus(0);
abnormalRecordEntity.setUpTime(new Date());
abnormalRecordEntity.setAssociationId(scanId);
abnormalRecordEntity.setAssociationType(1);
@ -474,6 +478,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
abnormalRecordEntity.setUpUserId(userId);
abnormalRecordEntity.setUpUserName(nickName);
abnormalRecordEntity.setAbnormalStatus(0);
abnormalRecordEntity.setSendOrderStatus(0);
abnormalRecordEntity.setUpTime(new Date());
abnormalRecordEntity.setAssociationId(scanId);
abnormalRecordEntity.setAssociationType(1);
@ -482,4 +487,26 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
}
}
@Override
public void dealwithAfterAbnormalPackage(String orderPackageCode, Long warehouseId, String warehouseName, String carsNo, Long userId, Long aLong, String nickName) {
List<AftersalesAbnormalRecordEntity> abnormalRecordEntities = abnormalRecordClient.findOrderPackageAndAbnormalStatus(orderPackageCode,"0");
//循环abnormalRecordEntities把abnormalStatus改为1
//如果send_order_status = 1 则修改工单记录
for (AftersalesAbnormalRecordEntity abnormalRecordEntity : abnormalRecordEntities) {
Integer sendOrderStatus = abnormalRecordEntity.getSendOrderStatus();
if(sendOrderStatus == 1){
//修改对应工单记录
aftersalesWorkOrderClient.updateWorkOrderStatus(warehouseId,orderPackageCode,1);
}
abnormalRecordEntity.setAbnormalStatus(1);
abnormalRecordEntity.setDealUserId(userId);
abnormalRecordEntity.setDealUserName(nickName);
abnormalRecordEntity.setRemark("包件已在 "+warehouseName+" 车次号:"+carsNo+" 中被卸车");
}
abnormalRecordClient.updateList(abnormalRecordEntities);
}
}

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

@ -379,8 +379,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setTotalCount(openOrderDTO.getTotalCount());
waybillEntity.setTotalVolume(openOrderDTO.getTotalVolume());
waybillEntity.setTotalWeight(openOrderDTO.getTotalWeghit());
waybillEntity.setDearCode(openOrderDTO.getDearCode());
waybillEntity.setDearName(openOrderDTO.getDearName());
waybillEntity.setDealerCode(openOrderDTO.getDealerCode());
waybillEntity.setDealerName(openOrderDTO.getDealerName());
//统计当前订单的在库数
List<Long> advanceIds = openOrderDTO.getAdvanceIds();
AdvanceDetailStockNumVO advanceDetailStockNumVO = advanceDetailService.findStockNumByAdvanceIds(advanceIds);
@ -421,7 +421,10 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setAgent(AuthUtil.getUserName());
waybillEntity.setAgentId(AuthUtil.getUserId());
waybillEntity.setDocumentMakingTime(CommonUtil.StringToDate(openOrderDTO.getOpenOrderDate()));
waybillEntity.setPickupCompleteOrNot(openOrderDTO.getPickupCompleteOrNot());
waybillEntity.setTrunklineCompleteOrNot(openOrderDTO.getTrunklineCompleteOrNot());
waybillEntity.setTrunklineVehicleType(openOrderDTO.getTrunklineVehicleType());
waybillEntity.setPickupVehicleType(openOrderDTO.getPickupVehicleType());
Long waybillId = warehouseWaybillClient.addEnntity(waybillEntity);
if (!Objects.isNull(waybillId)) {
@ -608,6 +611,16 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
WarehouseWaybillEntity waybillEntity = new WarehouseWaybillEntity();
waybillEntity.setWaybillNo(waybillNo);
waybillEntity.setBrandId(openOrderDTO.getBrandId());
waybillEntity.setBrand(openOrderDTO.getBrand());
waybillEntity.setDeparture(openOrderDTO.getDeparture());
waybillEntity.setDepartureCode(openOrderDTO.getDepartureCode());
waybillEntity.setDealerCode(openOrderDTO.getDealerCode());
waybillEntity.setDealerName(openOrderDTO.getDealerName());
waybillEntity.setPickupCompleteOrNot(openOrderDTO.getPickupCompleteOrNot());
waybillEntity.setTrunklineCompleteOrNot(openOrderDTO.getTrunklineCompleteOrNot());
waybillEntity.setTrunklineVehicleType(openOrderDTO.getTrunklineVehicleType());
waybillEntity.setPickupVehicleType(openOrderDTO.getPickupVehicleType());
waybillEntity.setDepartureWarehouseId(openOrderDTO.getDepartureWarehouseId());
waybillEntity.setDepartureWarehouseName(openOrderDTO.getDepartureWarehouseName());
waybillEntity.setDestinationWarehouseId(openOrderDTO.getDestinationWarehouseId());
@ -2140,6 +2153,74 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
log.info("###################verifyData: 验证改单数据");
StringBuilder stringBuilder = new StringBuilder();
List<EditOrderMsgVO> msgList = new ArrayList<>();
String newDeparture = openOrderDTO.getDeparture();
String departure = waybillEntity.getDeparture();
if(!ObjectUtil.equals(newDeparture,departure)){
// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
editOrderMsgVO.setItemName("发站");
editOrderMsgVO.setOldValue(departure);
editOrderMsgVO.setNewValue(newDeparture);
msgList.add(editOrderMsgVO);
}
// String newDepartureCode = openOrderDTO.getDepartureCode();
// String departureCode = waybillEntity.getDepartureCode();
// if(!ObjectUtil.equals(newDepartureCode,departureCode)){
//// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
// EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
// editOrderMsgVO.setItemName("发站");
// editOrderMsgVO.setOldValue(departure);
// editOrderMsgVO.setNewValue(newDeparture);
// msgList.add(editOrderMsgVO);
// }
Integer newPickupCompleteOrNot = openOrderDTO.getPickupCompleteOrNot();
Integer pickupCompleteOrNot = waybillEntity.getPickupCompleteOrNot();
if(!ObjectUtil.equals(newPickupCompleteOrNot,pickupCompleteOrNot)){
// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
editOrderMsgVO.setItemName("提货是否整车");
editOrderMsgVO.setOldValue(pickupCompleteOrNot==1?"是":"否");
editOrderMsgVO.setNewValue(newPickupCompleteOrNot==1?"是":"否");
msgList.add(editOrderMsgVO);
}
Integer newTrunklineCompleteOrNot = openOrderDTO.getTrunklineCompleteOrNot();
Integer trunklineCompleteOrNot = waybillEntity.getTrunklineCompleteOrNot();
if(!ObjectUtil.equals(newTrunklineCompleteOrNot,trunklineCompleteOrNot)){
// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
editOrderMsgVO.setItemName("干线是否整车");
editOrderMsgVO.setOldValue(trunklineCompleteOrNot==1?"是":"否");
editOrderMsgVO.setNewValue(newTrunklineCompleteOrNot==1?"是":"否");
msgList.add(editOrderMsgVO);
}
String newTrunklineVehicleType = openOrderDTO.getTrunklineVehicleType();
String trunklineVehicleType = waybillEntity.getTrunklineVehicleType();
if(!ObjectUtil.equals(newTrunklineVehicleType,trunklineVehicleType)){
// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
editOrderMsgVO.setItemName("干线车型");
editOrderMsgVO.setOldValue(DictBizCache.getValue("price_vehicle_type",trunklineVehicleType));
editOrderMsgVO.setNewValue(DictBizCache.getValue("price_vehicle_type",newTrunklineVehicleType));
msgList.add(editOrderMsgVO);
}
String newPickupVehicleType = openOrderDTO.getPickupVehicleType();
String pickupVehicleType = waybillEntity.getPickupVehicleType();
if(!ObjectUtil.equals(newPickupVehicleType,pickupVehicleType)){
// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
editOrderMsgVO.setItemName("提货车型");
editOrderMsgVO.setOldValue(DictBizCache.getValue("price_vehicle_type",pickupVehicleType));
editOrderMsgVO.setNewValue(DictBizCache.getValue("price_vehicle_type",newPickupVehicleType));
msgList.add(editOrderMsgVO);
}
String newDestination = openOrderDTO.getDestination();
String destination = waybillEntity.getDestination();
if(!ObjectUtil.equals(newDestination,destination)){
@ -2639,6 +2720,44 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
private String verifyUpdateData(OpenOrderDTO openOrderDTO, WarehouseWaybillEntity waybillEntity) {
log.info("###################verifyUpdateData: 验证改单数据");
StringBuilder stringBuilder = new StringBuilder();
String newDeparture = openOrderDTO.getDeparture();
String departure = waybillEntity.getDeparture();
if(!ObjectUtil.equals(newDeparture,departure)){
stringBuilder.append("发站:").append(departure).append("-->").append(newDeparture).append(";");
waybillEntity.setDeparture(newDeparture);
waybillEntity.setDepartureCode(openOrderDTO.getDepartureCode());
}
Integer newPickupCompleteOrNot = openOrderDTO.getPickupCompleteOrNot();
Integer pickupCompleteOrNot = waybillEntity.getPickupCompleteOrNot();
if(!ObjectUtil.equals(newPickupCompleteOrNot,pickupCompleteOrNot)){
stringBuilder.append("提货是否整车:").append(pickupCompleteOrNot==1?"是":"否").append("-->").append(newPickupCompleteOrNot==1?"是":"否").append(";");
waybillEntity.setPickupCompleteOrNot(newPickupCompleteOrNot);
}
Integer newTrunklineCompleteOrNot = openOrderDTO.getTrunklineCompleteOrNot();
Integer trunklineCompleteOrNot = waybillEntity.getTrunklineCompleteOrNot();
if(!ObjectUtil.equals(newTrunklineCompleteOrNot,trunklineCompleteOrNot)){
stringBuilder.append("干线是否整车:").append(trunklineCompleteOrNot==1?"是":"否").append("-->").append(newTrunklineCompleteOrNot==1?"是":"否").append(";");
waybillEntity.setTrunklineCompleteOrNot(newTrunklineCompleteOrNot);
}
String newTrunklineVehicleType = openOrderDTO.getTrunklineVehicleType();
String trunklineVehicleType = waybillEntity.getTrunklineVehicleType();
if(!ObjectUtil.equals(newTrunklineVehicleType,trunklineVehicleType)){
stringBuilder.append("干线车型:").append(DictBizCache.getValue("price_vehicle_type",trunklineVehicleType)).append("-->").append(DictBizCache.getValue("price_vehicle_type",newTrunklineVehicleType)).append(";");
waybillEntity.setTrunklineVehicleType(newTrunklineVehicleType);
}
String newPickupVehicleType = openOrderDTO.getPickupVehicleType();
String pickupVehicleType = waybillEntity.getPickupVehicleType();
if(!ObjectUtil.equals(newPickupVehicleType,pickupVehicleType)){
stringBuilder.append("提货车型:").append(DictBizCache.getValue("price_vehicle_type",pickupVehicleType)).append("-->").append(DictBizCache.getValue("price_vehicle_type",newPickupVehicleType)).append(";");
waybillEntity.setPickupVehicleType(newPickupVehicleType);
}
String newDestination = openOrderDTO.getDestination();
String destination = waybillEntity.getDestination();
if (!destination.equals(newDestination)) {

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

@ -4548,8 +4548,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
map.put("one",carsLoadLineEntity.getReportOne());
map.put("two",carsLoadLineEntity.getReportTwo());
Map<String,Integer> abnormalRecord = abnormalRecordClient.findListByCarsNoAndUpWarehouseId(carsNo,warehouseId);
map.put("three","当前待处理异常 "+abnormalRecord.get("dealwithNum")+" 条、已处理异常 "+abnormalRecord.get("noDealwithNum")+" 条");
JSONObject abnormalRecord = abnormalRecordClient.findListByCarsNoAndUpWarehouseId(carsNo,warehouseId);
map.put("three","当前待处理异常 "+abnormalRecord.getInteger("dealwithNum")+" 条、已处理异常 "+abnormalRecord.getInteger("noDealwithNum")+" 条");
return R.data(map);
}
@ -5257,6 +5258,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
updateNumByLoadId(loadId);
try {
carsLoadAsyncService.dealwithAfterAbnormalPackage(orderPackageCode,warehouseId,warehouseName,carsLoadEntity.getCarsNo(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName());
List<String> orderPackageCodes = new ArrayList<>();
orderPackageCodes.add(orderPackageCode);

Loading…
Cancel
Save