32 changed files with 886 additions and 147 deletions
@ -0,0 +1,47 @@
|
||||
package com.logpm.trunkline.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
@Data |
||||
@TableName("logpm_trunkline_waybill_return") |
||||
@ApiModel(value = "TrunklineWaybillReturn对象", description = "运单回单记录表") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class TrunklineWaybillReturnEntity extends TenantEntity { |
||||
|
||||
/** 预留1 */ |
||||
@ApiModelProperty(name = "预留1",notes = "") |
||||
private String reserve1 ; |
||||
/** 预留2 */ |
||||
@ApiModelProperty(name = "预留2",notes = "") |
||||
private String reserve2 ; |
||||
/** 预留3 */ |
||||
@ApiModelProperty(name = "预留3",notes = "") |
||||
private String reserve3 ; |
||||
/** 预留4 */ |
||||
@ApiModelProperty(name = "预留4",notes = "") |
||||
private String reserve4 ; |
||||
/** 预留5 */ |
||||
@ApiModelProperty(name = "预留5",notes = "") |
||||
private String reserve5 ; |
||||
|
||||
/** 仓库id */ |
||||
@ApiModelProperty(name = "仓库id",notes = "") |
||||
private Long warehouseId ; |
||||
|
||||
/** 运单id */ |
||||
@ApiModelProperty(name = "运单id",notes = "") |
||||
private Long waybillId ; |
||||
|
||||
/** 地址 */ |
||||
@ApiModelProperty(name = "地址",notes = "") |
||||
private String url; |
||||
/** 创建人名称 */ |
||||
@ApiModelProperty(name = "创建人名称",notes = "") |
||||
private String createUserName ; |
||||
|
||||
} |
@ -0,0 +1,19 @@
|
||||
package com.logpm.trunkline.feign; |
||||
|
||||
import org.springblade.common.constant.ModuleNameConstant; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
||||
@FeignClient( |
||||
value = ModuleNameConstant.APPLICATION_TRUNKLINE_NAME |
||||
) |
||||
public interface ITrunklineWaybillTrackClient { |
||||
|
||||
String API_PREFIX = "trunklineWaybillOrder/client"; |
||||
|
||||
@GetMapping(API_PREFIX+"/addWaybillLog") |
||||
R addWaybillLog(@RequestParam Long waybillId, @RequestParam String waybillNo, @RequestParam String trackType, @RequestParam String refer, @RequestParam String operationRemark, @RequestParam String nickName, @RequestParam Long userId,@RequestParam Long warehouseId,@RequestParam String warehouseName); |
||||
|
||||
} |
@ -0,0 +1,16 @@
|
||||
package com.logpm.trunkline.vo; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
@Data |
||||
public class LoadScanWaybillVO implements Serializable { |
||||
|
||||
private String waybillNo; |
||||
|
||||
private Integer num; |
||||
|
||||
private Integer unloadNum; |
||||
|
||||
} |
@ -0,0 +1,25 @@
|
||||
package com.logpm.trunkline.feign; |
||||
|
||||
|
||||
import com.logpm.trunkline.service.IOpenOrderAsyncService; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
@Slf4j |
||||
@ApiIgnore() |
||||
@RestController |
||||
@AllArgsConstructor |
||||
public class TrunklineWaybillTrackClient implements ITrunklineWaybillTrackClient { |
||||
|
||||
private final IOpenOrderAsyncService openOrderAsyncService; |
||||
|
||||
@Override |
||||
public R addWaybillLog(Long waybillId, String waybillNo, String trackType, String refer, String operationRemark, String nickName,Long userId,Long warehouseId, String warehouseName) { |
||||
openOrderAsyncService.saveLog(waybillId,waybillNo,trackType,refer,operationRemark,nickName,userId,warehouseId,warehouseName); |
||||
|
||||
return R.success("调用成功"); |
||||
} |
||||
} |
@ -0,0 +1,9 @@
|
||||
package com.logpm.trunkline.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.logpm.trunkline.entity.TrunklineWaybillReturnEntity; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
|
||||
@Mapper |
||||
public interface TrunklineWaybillReturnMapper extends BaseMapper<TrunklineWaybillReturnEntity> { |
||||
} |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.logpm.trunkline.mapper.TrunklineWaybillReturnMapper"> |
||||
|
||||
|
||||
</mapper> |
@ -0,0 +1,10 @@
|
||||
package com.logpm.trunkline.service; |
||||
|
||||
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity; |
||||
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity; |
||||
|
||||
public interface ICarsLoadAsyncService { |
||||
|
||||
void saveLog(TrunklineCarsLoadEntity carsLoadEntity, TrunklineCarsLoadLineEntity carsLoadLineEntity, int cardLoadType,String nickName,Long userId); |
||||
|
||||
} |
@ -0,0 +1,18 @@
|
||||
package com.logpm.trunkline.service; |
||||
|
||||
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity; |
||||
|
||||
public interface IOpenOrderAsyncService { |
||||
void saveLog(Long waybillId, String waybillNo, String trackType, String refer, String operationRemark, String nickName,Long userId,Long warehouseId,String warehouseName); |
||||
|
||||
void saveStartCarLog(TrunklineCarsLoadLineEntity carsLoadLineEntity,String nickName,Long userId); |
||||
|
||||
void saveCancelStartCarLog(TrunklineCarsLoadLineEntity currentCarsLoadLineEntity, String nickName,Long userId); |
||||
|
||||
void saveArriveCarLog(TrunklineCarsLoadLineEntity carsLoadLineEntity, String nickName,Long userId); |
||||
|
||||
void saveCancelArriveCarLog(TrunklineCarsLoadLineEntity currentCarsLoadLineEntity, String nickName,Long userId); |
||||
|
||||
void saveUnloadStartCarLog(TrunklineCarsLoadLineEntity currentCarsLoadLineEntity, String nickName,Long userId); |
||||
|
||||
} |
@ -0,0 +1,7 @@
|
||||
package com.logpm.trunkline.service; |
||||
|
||||
import com.logpm.trunkline.entity.TrunklineWaybillReturnEntity; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
public interface ITrunklineWaybillReturnService extends BaseService<TrunklineWaybillReturnEntity> { |
||||
} |
@ -0,0 +1,137 @@
|
||||
package com.logpm.trunkline.service.impl; |
||||
|
||||
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity; |
||||
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity; |
||||
import com.logpm.trunkline.entity.TrunklineCarsLoadLogEntity; |
||||
import com.logpm.trunkline.service.ICarsLoadAsyncService; |
||||
import com.logpm.trunkline.service.ITrunklineCarsLoadLogService; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.common.constant.TenantNum; |
||||
import org.springblade.common.constant.carsload.CarsLoadLogTypeConstant; |
||||
import org.springblade.common.utils.CommonUtil; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springframework.scheduling.annotation.Async; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.Date; |
||||
import java.util.Objects; |
||||
|
||||
@Slf4j |
||||
@AllArgsConstructor |
||||
@Service |
||||
public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { |
||||
|
||||
private final ITrunklineCarsLoadLogService trunklineCarsLoadLogService; |
||||
|
||||
@Async |
||||
@Override |
||||
public void saveLog(TrunklineCarsLoadEntity carsLoadEntity, TrunklineCarsLoadLineEntity carsLoadLineEntity, int cardLoadType,String nickName,Long userId) { |
||||
String nodeName = null; |
||||
Integer planLoadingNumber = null; |
||||
Integer realLoadingNumber = null; |
||||
Date startDate = null; |
||||
Long nodeId = null; |
||||
if(!Objects.isNull(carsLoadLineEntity)){ |
||||
nodeName = carsLoadLineEntity.getNodeName(); |
||||
planLoadingNumber = carsLoadLineEntity.getPlanLoadingNumber(); |
||||
realLoadingNumber = carsLoadLineEntity.getRealLoadingNumber(); |
||||
startDate = carsLoadLineEntity.getStartDate(); |
||||
nodeId = carsLoadLineEntity.getNodeId(); |
||||
} |
||||
String carsNo = carsLoadEntity.getCarsNo(); |
||||
String carNumber = carsLoadEntity.getCarNumber(); |
||||
String driverName = carsLoadEntity.getDriverName(); |
||||
String driverMobile = carsLoadEntity.getDriverMobile(); |
||||
String carsLineName = carsLoadEntity.getCarsLineName(); |
||||
|
||||
String now = CommonUtil.dateToString(new Date()); |
||||
TrunklineCarsLoadLogEntity carsLoadLogEntity = new TrunklineCarsLoadLogEntity(); |
||||
carsLoadLogEntity.setNodeId(nodeId); |
||||
carsLoadLogEntity.setNodeName(nodeName); |
||||
carsLoadLogEntity.setLoadId(carsLoadEntity.getId()); |
||||
carsLoadLogEntity.setLoadCode(carsNo); |
||||
carsLoadLogEntity.setCarNumber(carNumber); |
||||
carsLoadLogEntity.setDriverName(driverName); |
||||
carsLoadLogEntity.setDriverMobile(driverMobile); |
||||
carsLoadLogEntity.setCreateUserName(nickName); |
||||
carsLoadLogEntity.setCreateUser(userId); |
||||
carsLoadLogEntity.setUpdateUser(userId); |
||||
carsLoadLogEntity.setTenantId(TenantNum.HUITONGCODE); |
||||
carsLoadLogEntity.setAbstText(CarsLoadLogTypeConstant.getName(cardLoadType)); |
||||
String content = ""; |
||||
switch (cardLoadType){ |
||||
case 0: |
||||
content = "【"+nodeName+"】取消配载计划,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile; |
||||
break; |
||||
case 1: |
||||
content = "【"+nodeName+"】创建配载计划,路线:"+carsLineName+",车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile; |
||||
break; |
||||
case 2: |
||||
content = "【"+nodeName+"】修改配载计划,路线:"+carsLineName+",车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile; |
||||
break; |
||||
case 3: |
||||
content = "【"+nodeName+"】始发仓装车,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",计划发货:"+planLoadingNumber+",实际装车:"+realLoadingNumber+",装车时间:"+ now; |
||||
break; |
||||
case 4: |
||||
content = "【"+nodeName+"】始发仓发车,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",计划发货:"+planLoadingNumber+",实际装车:"+realLoadingNumber+",发车时间:"+ CommonUtil.dateToString(startDate); |
||||
break; |
||||
case 5: |
||||
content = "【"+nodeName+"】始发仓取消发车,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",取消时间:"+ now; |
||||
break; |
||||
case 6: |
||||
content = "【"+nodeName+"】网点到车,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",网点到车时间:"+ now; |
||||
break; |
||||
case 7: |
||||
content = "【"+nodeName+"】网点取消到车,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",网点取消到车时间:"+ now; |
||||
break; |
||||
case 8: |
||||
content = "【"+nodeName+"】网点卸车,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",网点卸车时间:"+ now; |
||||
break; |
||||
case 9: |
||||
content = "【"+nodeName+"】网点修改配载,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",网点修改配载时间:"+ now; |
||||
break; |
||||
case 10: |
||||
content = "【"+nodeName+"】网点装车,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",网点装车时间:"+ now; |
||||
break; |
||||
case 11: |
||||
content = "【"+nodeName+"】网点发车,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",网点发车时间:"+ now; |
||||
break; |
||||
case 12: |
||||
content = "【"+nodeName+"】网点取消发车,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",网点取消发车时间:"+ now; |
||||
break; |
||||
case 13: |
||||
content = "【"+nodeName+"】终点到达,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",终点到达时间:"+ now; |
||||
break; |
||||
case 14: |
||||
content = "【"+nodeName+"】终点取消到达,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",终点取消到达时间:"+ now; |
||||
break; |
||||
case 15: |
||||
content = "【"+nodeName+"】终点卸车,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile+",终点卸车时间:"+ now; |
||||
break; |
||||
default: |
||||
content = "【"+nodeName+"】其他日志,车次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+ |
||||
",司机手机号:"+driverMobile; |
||||
} |
||||
carsLoadLogEntity.setContent(content); |
||||
carsLoadLogEntity.setType(cardLoadType); |
||||
trunklineCarsLoadLogService.save(carsLoadLogEntity); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,222 @@
|
||||
package com.logpm.trunkline.service.impl; |
||||
|
||||
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity; |
||||
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity; |
||||
import com.logpm.trunkline.entity.TrunklineWaybillTrackEntity; |
||||
import com.logpm.trunkline.service.*; |
||||
import com.logpm.trunkline.vo.LoadScanWaybillVO; |
||||
import com.logpm.warehouse.entity.WarehouseWaybillEntity; |
||||
import com.logpm.warehouse.feign.IWarehouseWaybillClient; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.common.constant.TenantNum; |
||||
import org.springblade.common.utils.CommonUtil; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.context.annotation.Lazy; |
||||
import org.springframework.scheduling.annotation.Async; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
import java.util.Objects; |
||||
|
||||
@Service |
||||
@Slf4j |
||||
public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService { |
||||
|
||||
@Autowired |
||||
private ITrunklineWaybillTrackService trunklineWaybillTrackService; |
||||
@Lazy |
||||
@Autowired |
||||
private ITrunklineCarsLoadService trunklineCarsLoadService; |
||||
@Autowired |
||||
private ITrunklineCarsLoadScanService trunklineCarsLoadScanService; |
||||
@Autowired |
||||
private IWarehouseWaybillClient warehouseWaybillClient; |
||||
@Autowired |
||||
private ITrunklineCarsLoadLineService trunklineCarsLoadLineService; |
||||
|
||||
@Async |
||||
@Override |
||||
public void saveLog(Long waybillId, String waybillNo, String trackType, String refer, String operationRemark, String nickName,Long userId,Long warehouseId,String warehouseName) { |
||||
TrunklineWaybillTrackEntity waybillTrackEntity = new TrunklineWaybillTrackEntity(); |
||||
waybillTrackEntity.setWarehouseId(warehouseId); |
||||
waybillTrackEntity.setWarehouseName(warehouseName); |
||||
waybillTrackEntity.setWaybillId(waybillId); |
||||
waybillTrackEntity.setWaybillNo(waybillNo); |
||||
waybillTrackEntity.setTrackType(trackType); |
||||
waybillTrackEntity.setRefer(refer); |
||||
waybillTrackEntity.setOperationRemark(operationRemark); |
||||
waybillTrackEntity.setCreateUserName(nickName); |
||||
waybillTrackEntity.setTenantId(TenantNum.HUITONGCODE); |
||||
waybillTrackEntity.setCreateUser(userId); |
||||
waybillTrackEntity.setUpdateUser(userId); |
||||
trunklineWaybillTrackService.save(waybillTrackEntity); |
||||
} |
||||
|
||||
@Async |
||||
@Override |
||||
public void saveStartCarLog(TrunklineCarsLoadLineEntity carsLoadLineEntity,String nickName,Long userId) { |
||||
Long loadId = carsLoadLineEntity.getLoadId(); |
||||
Integer sort = carsLoadLineEntity.getSort(); |
||||
TrunklineCarsLoadEntity carsLoadEntity = trunklineCarsLoadService.getById(loadId); |
||||
if(Objects.isNull(carsLoadEntity)){ |
||||
log.warn("##############saveStartCarLog: 配载信息不存在 loadId={}",loadId); |
||||
return; |
||||
} |
||||
String carsNo = carsLoadEntity.getCarsNo(); |
||||
String carNumber = carsLoadEntity.getCarNumber(); |
||||
String driverName = carsLoadEntity.getDriverName(); |
||||
String driverMobile = carsLoadEntity.getDriverMobile(); |
||||
|
||||
Long nodeId = carsLoadLineEntity.getNodeId(); |
||||
String nodeName = carsLoadLineEntity.getNodeName(); |
||||
|
||||
String nextWarehouseName = ""; |
||||
TrunklineCarsLoadLineEntity nextCarsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndSort(loadId, sort + 1); |
||||
if(!Objects.isNull(nextCarsLoadLineEntity)){ |
||||
nextWarehouseName = nextCarsLoadLineEntity.getNodeName(); |
||||
} |
||||
|
||||
List<LoadScanWaybillVO> list = trunklineCarsLoadScanService.findLoadScanWaybillList(loadId,nodeId); |
||||
|
||||
for (LoadScanWaybillVO loadScanWaybillVO : list) { |
||||
String waybillNo = loadScanWaybillVO.getWaybillNo(); |
||||
Integer num = loadScanWaybillVO.getNum(); |
||||
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo); |
||||
if(Objects.isNull(waybillEntity)){ |
||||
log.warn("##############saveStartCarLog: 运单信息不存在 waybillNo={}",waybillNo); |
||||
continue; |
||||
} |
||||
Long waybillId = waybillEntity.getId(); |
||||
|
||||
String operationRemark = "运单装车"+num+"件 干线批次号:"+carsNo+",车牌号:"+carNumber+",司机姓名:"+driverName+",司机手机:"+driverMobile; |
||||
saveLog(waybillId,waybillNo,"30",nodeName+" 干线装车",operationRemark,nickName,userId,nodeId,nodeName); |
||||
|
||||
operationRemark = "干线从"+nodeName+"发车,实际发车时间"+ CommonUtil.dateToStringGeneral(new Date()); |
||||
saveLog(waybillId,waybillNo,"40",nodeName+"已发车到"+nextWarehouseName,operationRemark,nickName,userId,nodeId,nodeName); |
||||
} |
||||
|
||||
} |
||||
|
||||
@Async |
||||
@Override |
||||
public void saveCancelStartCarLog(TrunklineCarsLoadLineEntity carsLoadLineEntity, String nickName,Long userId) { |
||||
Long loadId = carsLoadLineEntity.getLoadId(); |
||||
TrunklineCarsLoadEntity carsLoadEntity = trunklineCarsLoadService.getById(loadId); |
||||
if(Objects.isNull(carsLoadEntity)){ |
||||
log.warn("##############saveCancelStartCarLog: 配载信息不存在 loadId={}",loadId); |
||||
return; |
||||
} |
||||
|
||||
Long nodeId = carsLoadLineEntity.getNodeId(); |
||||
String nodeName = carsLoadLineEntity.getNodeName(); |
||||
|
||||
|
||||
List<LoadScanWaybillVO> list = trunklineCarsLoadScanService.findLoadScanWaybillList(loadId,nodeId); |
||||
|
||||
for (LoadScanWaybillVO loadScanWaybillVO : list) { |
||||
String waybillNo = loadScanWaybillVO.getWaybillNo(); |
||||
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo); |
||||
if(Objects.isNull(waybillEntity)){ |
||||
log.warn("##############saveCancelStartCarLog: 运单信息不存在 waybillNo={}",waybillNo); |
||||
continue; |
||||
} |
||||
Long waybillId = waybillEntity.getId(); |
||||
|
||||
String operationRemark = "干线"+nodeName+"取消发车,取消时间"+ CommonUtil.dateToStringGeneral(new Date()); |
||||
saveLog(waybillId,waybillNo,"50",nodeName+" 干线取消发车",operationRemark,nickName,userId,nodeId,nodeName); |
||||
} |
||||
} |
||||
|
||||
@Async |
||||
@Override |
||||
public void saveArriveCarLog(TrunklineCarsLoadLineEntity carsLoadLineEntity, String nickName,Long userId) { |
||||
Long loadId = carsLoadLineEntity.getLoadId(); |
||||
TrunklineCarsLoadEntity carsLoadEntity = trunklineCarsLoadService.getById(loadId); |
||||
if(Objects.isNull(carsLoadEntity)){ |
||||
log.warn("##############saveCancelStartCarLog: 配载信息不存在 loadId={}",loadId); |
||||
return; |
||||
} |
||||
|
||||
Long nodeId = carsLoadLineEntity.getNodeId(); |
||||
String nodeName = carsLoadLineEntity.getNodeName(); |
||||
|
||||
|
||||
List<LoadScanWaybillVO> list = trunklineCarsLoadScanService.findArriveLoadScanWaybillList(loadId,nodeId); |
||||
|
||||
for (LoadScanWaybillVO loadScanWaybillVO : list) { |
||||
String waybillNo = loadScanWaybillVO.getWaybillNo(); |
||||
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo); |
||||
if(Objects.isNull(waybillEntity)){ |
||||
log.warn("##############saveCancelStartCarLog: 运单信息不存在 waybillNo={}",waybillNo); |
||||
continue; |
||||
} |
||||
Long waybillId = waybillEntity.getId(); |
||||
|
||||
String operationRemark = "干线到达"+nodeName+",到达时间"+ CommonUtil.dateToStringGeneral(new Date()); |
||||
saveLog(waybillId,waybillNo,"60",nodeName+" 已到达",operationRemark,nickName,userId,nodeId,nodeName); |
||||
} |
||||
} |
||||
|
||||
@Async |
||||
@Override |
||||
public void saveCancelArriveCarLog(TrunklineCarsLoadLineEntity carsLoadLineEntity, String nickName,Long userId) { |
||||
Long loadId = carsLoadLineEntity.getLoadId(); |
||||
TrunklineCarsLoadEntity carsLoadEntity = trunklineCarsLoadService.getById(loadId); |
||||
if(Objects.isNull(carsLoadEntity)){ |
||||
log.warn("##############saveCancelStartCarLog: 配载信息不存在 loadId={}",loadId); |
||||
return; |
||||
} |
||||
|
||||
Long nodeId = carsLoadLineEntity.getNodeId(); |
||||
String nodeName = carsLoadLineEntity.getNodeName(); |
||||
|
||||
|
||||
List<LoadScanWaybillVO> list = trunklineCarsLoadScanService.findArriveLoadScanWaybillList(loadId,nodeId); |
||||
|
||||
for (LoadScanWaybillVO loadScanWaybillVO : list) { |
||||
String waybillNo = loadScanWaybillVO.getWaybillNo(); |
||||
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo); |
||||
if(Objects.isNull(waybillEntity)){ |
||||
log.warn("##############saveCancelStartCarLog: 运单信息不存在 waybillNo={}",waybillNo); |
||||
continue; |
||||
} |
||||
Long waybillId = waybillEntity.getId(); |
||||
|
||||
String operationRemark = nodeName+"干线取消到达,取消时间"+ CommonUtil.dateToStringGeneral(new Date()); |
||||
saveLog(waybillId,waybillNo,"70",nodeName+" 取消到达",operationRemark,nickName,userId,nodeId,nodeName); |
||||
} |
||||
} |
||||
|
||||
@Async |
||||
@Override |
||||
public void saveUnloadStartCarLog(TrunklineCarsLoadLineEntity carsLoadLineEntity, String nickName,Long userId) { |
||||
Long loadId = carsLoadLineEntity.getLoadId(); |
||||
TrunklineCarsLoadEntity carsLoadEntity = trunklineCarsLoadService.getById(loadId); |
||||
if(Objects.isNull(carsLoadEntity)){ |
||||
log.warn("##############saveUnloadStartCarLog: 配载信息不存在 loadId={}",loadId); |
||||
return; |
||||
} |
||||
|
||||
Long nodeId = carsLoadLineEntity.getNodeId(); |
||||
String nodeName = carsLoadLineEntity.getNodeName(); |
||||
|
||||
|
||||
List<LoadScanWaybillVO> list = trunklineCarsLoadScanService.findUnloadLoadScanWaybillList(loadId,nodeId); |
||||
|
||||
for (LoadScanWaybillVO loadScanWaybillVO : list) { |
||||
String waybillNo = loadScanWaybillVO.getWaybillNo(); |
||||
Integer num = loadScanWaybillVO.getNum(); |
||||
Integer unloadNum = loadScanWaybillVO.getUnloadNum(); |
||||
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo); |
||||
if(Objects.isNull(waybillEntity)){ |
||||
log.warn("##############saveUnloadStartCarLog: 运单信息不存在 waybillNo={}",waybillNo); |
||||
continue; |
||||
} |
||||
Long waybillId = waybillEntity.getId(); |
||||
|
||||
String operationRemark = nodeName+"干线卸车确认,到车/卸车:"+num+"/"+unloadNum+",卸车时间"+ CommonUtil.dateToStringGeneral(new Date()); |
||||
saveLog(waybillId,waybillNo,"80",nodeName+" 干线卸车",operationRemark,nickName,userId,nodeId,nodeName); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,16 @@
|
||||
package com.logpm.trunkline.service.impl; |
||||
|
||||
import com.logpm.trunkline.entity.TrunklineWaybillReturnEntity; |
||||
import com.logpm.trunkline.mapper.TrunklineWaybillReturnMapper; |
||||
import com.logpm.trunkline.service.ITrunklineWaybillReturnService; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
@Slf4j |
||||
@Service |
||||
@AllArgsConstructor |
||||
public class TrunklineWaybillReturnServiceImpl extends BaseServiceImpl<TrunklineWaybillReturnMapper, TrunklineWaybillReturnEntity> implements ITrunklineWaybillReturnService { |
||||
|
||||
} |
Loading…
Reference in new issue