Browse Source

1.广播bug修复

master
zhenghaoyu 6 months ago
parent
commit
01d335feee
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java
  2. 8
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  3. 3
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/NodeWorkHandler.java
  4. 4
      blade-service/logpm-factory/src/main/resources/application-dev.yml
  5. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java
  6. 27
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  7. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java
  8. 11
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  9. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillTrackMapper.xml
  10. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
  11. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java
  12. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  13. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java
  14. 33
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

2
blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java

@ -165,7 +165,7 @@ public abstract class FanoutConstants {
interface signfor{
String EXCHANGE = "fanout.distribution.signfor" + ModuleNameConstant.DEVAUTH;
interface QUEUE {
String FACTORY_NODE_WORK_DISTRIBUTION_SIGNFOR_QUERY = "fanout.factory.node_work.distribution.signfor_query"+ ModuleNameConstant.DEVAUTH;
String FACTORY_NODE_WORK_DISTRIBUTION_SIGNFOR_QUERY = "fanout.factory.nodework.distribution.signforquery"+ ModuleNameConstant.DEVAUTH;
}
}

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

@ -31,12 +31,19 @@ public class LoadCarsDTO implements Serializable {
private String loadCarsNo;
private String loadStatus;
private String carrierName;
private String carrierOrderCode;
private String startWarehouseName;
private String deliveryType;
private String operator;
private String settlementPerson;
private Long warehouseId;
private Integer startCarType;
private Integer loadingType;
private Integer unloadType;
private Integer isSettlement;
private List<TrunklineCarsOrderDTO> carsOrderList = new ArrayList<>();
@ -63,6 +70,7 @@ public class LoadCarsDTO implements Serializable {
private Integer isZero;
private String scanCode;
private String scanStatus;
private String payMethod;
private List<LoadingPackageDTO> packageList = new ArrayList<>();
private List<LoadingZeroDTO> zeroList = new ArrayList<>();

3
blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/NodeWorkHandler.java

@ -3,18 +3,15 @@ package com.logpm.factory.receiver;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.logpm.factory.mt.service.IMtFactoryDataService;
import com.logpm.factorydata.enums.BrandEnums;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.broadcast.FanoutConstants;
import org.springblade.common.model.BroadcastNodeData;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
/**
* 作业节点数据监听

4
blade-service/logpm-factory/src/main/resources/application-dev.yml

@ -12,10 +12,10 @@ server:
spring:
#rabbitmq配置
rabbitmq:
host: 192.168.2.46
host: 192.168.3.100
port: 5672
username: admin
password: admin
password: 123456
#虚拟host 可以不设置,使用server默认host
virtual-host: /
#确认消息已发送到队列(Queue)

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

@ -1011,8 +1011,15 @@ public class OpenOrderController {
log.warn(method+"订单号为空 orderCode={}",orderCode);
throw new CustomerException(405,"订单号为空");
}
String brand = openLabelDTO.getBrand();
if(StringUtil.isBlank(brand)){
log.warn(method+"品牌为空 brand={}",brand);
throw new CustomerException(405,"品牌为空");
}
Integer totalNumber = openLabelDTO.getTotalNumber();
if(totalNumber == 0){
if(totalNumber == 0 && !"曼好家".equals(brand)){
log.warn(method+"总数量不正确 totalNumber={}",totalNumber);
throw new CustomerException(405,"总数量不正确");
}
@ -1021,11 +1028,7 @@ public class OpenOrderController {
log.warn(method+"一级品类为空 firsts={}",firsts);
throw new CustomerException(405,"一级品类为空");
}
String brand = openLabelDTO.getBrand();
if(StringUtil.isBlank(brand)){
log.warn(method+"品牌为空 brand={}",brand);
throw new CustomerException(405,"品牌为空");
}
String dealerName = openLabelDTO.getDealerName();
if(StringUtil.isBlank(dealerName)){
log.warn(method+"商场为空 dealerName={}",dealerName);

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

@ -400,6 +400,33 @@
<if test="param.loadCarsNo != null and param.loadCarsNo != ''">
and Locate(#{param.loadCarsNo},ltcl.cars_no) > 0
</if>
<if test="param.carrierName != null and param.carrierName != ''">
and Locate(#{param.carrierName},ltcl.carrier_name) > 0
</if>
<if test="param.payMethod != null">
and ltcl.pay_method = #{param.payMethod}
</if>
<if test="param.carrierOrderCode != null and param.carrierOrderCode != ''">
and Locate(#{param.carrierOrderCode},ltcl.carrier_order_code) > 0
</if>
<if test="param.startWarehouseName != null and param.startWarehouseName != ''">
and Locate(#{param.startWarehouseName},ltcl.start_warehouse_name) > 0
</if>
<if test="param.loadStatus != null">
and ltcl.load_status = #{param.loadStatus}
</if>
<if test="param.isSettlement != null">
and ltcl.is_settlement = #{param.isSettlement}
</if>
<if test="param.deliveryType != null">
and ltcl.delivery_type = #{param.deliveryType}
</if>
<if test="param.operator != null and param.operator != ''">
and Locate(#{param.operator},ltcl.operator) > 0
</if>
<if test="param.settlementPerson != null and param.settlementPerson != ''">
and Locate(#{param.settlementPerson},ltcl.settlement_person) > 0
</if>
group by ltcl.id
order by ltcl.create_time desc
</select>

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

@ -118,7 +118,7 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper<TrunklineCarsLoa
List<String> findUnloadByLoadIdAndWarehouseId(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
void updateScanStatusByLoadId(@Param("loadId") Long loadId, @Param("scanStatus") String scanStatus, @Param("unloadTime") Date unloadTime);
void updateScanStatusByLoadId(@Param("loadId") Long loadId, @Param("scanStatus") String scanStatus, @Param("unloadTime") Date unloadTime,@Param("signUserName") String signUserName);
List<String> findSignListOrderPackageCodes(@Param("loadId") Long loadId);

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

@ -473,12 +473,7 @@
set scan_status = #{scanStatus},
sign_time = #{unloadTime},
sign_user_name = #{signUserName},
unload_abnormal = 0,
unload_num = num,
unload_user_name = #{signUserName},
unload_time = #{unloadTime},
unload_node_id = #{warehouseId},
unload_node_name = #{warehouseName}
sign_abnormal = 0
where 1=1
<if test="loadScanIds != null and loadScanIds.size() > 0">
and id in
@ -590,7 +585,9 @@
<update id="updateScanStatusByLoadId" >
update logpm_trunkline_cars_load_scan
set scan_status = #{scanStatus},
sign_time = #{unloadTime}
sign_time = #{unloadTime},
sign_user_name = #{signUserName},
sign_abnormal = 0
where load_id = #{loadId}
</update>

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillTrackMapper.xml

@ -23,7 +23,8 @@
</select>
<select id="findUpdateWaybillList" resultType="com.logpm.trunkline.vo.TrunklineWaybillTrackVO">
select ltwt.waybill_no waybillNo,
select lww.id waybillId,
ltwt.waybill_no waybillNo,
lww.departure_warehouse_name openWarehouseName,
ltwt.check_status checkStatus,
lww.waybill_type waybillType,

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

@ -113,7 +113,7 @@ public interface ITrunklineCarsLoadScanService extends BaseService<TrunklineCars
List<String> findUnloadByLoadIdAndWarehouseId(Long loadId, Long warehouseId);
void updateScanStatusByLoadId(Long loadId, String scanStatus, Date unloadTime);
void updateScanStatusByLoadId(Long loadId, String scanStatus, Date unloadTime,String signUserName);
List<String> findSignListOrderPackageCodes(Long loadId);

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java

@ -411,7 +411,7 @@ public class InComingServiceImpl implements IInComingService {
//已入库包件
if (incomingType != 1) {
log.warn("############incomingPackage: 包件已入库 orderPackageCodes={} warehouseId={}", orderPackageCodes, warehouseId);
throw new CustomerException(405, "包件" + orderPackageCodes + "已入库");
throw new CustomerException(405, "包件已入库");
} else {
// if (!Objects.isNull(billladingId)) {
// //先判断该包件是否已经有提货记录了
@ -723,7 +723,7 @@ public class InComingServiceImpl implements IInComingService {
waybillEntityList.forEach(wb -> {
Integer totalCount = wb.getTotalCount();
Integer stockCount = wb.getStockCount();
openOrderAsyncService.saveLog(waybillEntity.getId(), waybillEntity.getWaybillNo(), "20", "已入库", "运单入库:"+stockCount+"/"+totalCount+",入库类型:【"+IncomingTypeEnum.getValue(incomingType)+"】,入库时间:"+ CommonUtil.dateToStringGeneral(new Date()), AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName);
openOrderAsyncService.saveLog(wb.getId(), wb.getWaybillNo(), "20", "已入库", "运单入库:"+stockCount+"/"+totalCount+",入库类型:【"+IncomingTypeEnum.getValue(incomingType)+"】,入库时间:"+ CommonUtil.dateToStringGeneral(new Date()), AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName);
});
}

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

@ -3334,12 +3334,12 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Long newDestinationWarehouseId = openOrderDTO.getDestinationWarehouseId();
String newDestinationWarehouseName = openOrderDTO.getDestinationWarehouseName();
Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId();
String departureWarehouseName = waybillEntity.getDepartureWarehouseName();
String destinationWarehouseName = waybillEntity.getDestinationWarehouseName();
if(!ObjectUtil.equals(destinationWarehouseId,newDestinationWarehouseId)){
// stringBuilder.append("目的仓:").append(departureWarehouseName).append("-->").append(newDestinationWarehouseName).append(";");
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
editOrderMsgVO.setItemName("目的仓");
editOrderMsgVO.setOldValue(departureWarehouseName);
editOrderMsgVO.setOldValue(destinationWarehouseName);
editOrderMsgVO.setNewValue(newDestinationWarehouseName);
msgList.add(editOrderMsgVO);
}

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

@ -269,8 +269,8 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl<TrunklineC
}
@Override
public void updateScanStatusByLoadId(Long loadId, String scanStatus, Date unloadTime) {
baseMapper.updateScanStatusByLoadId(loadId,scanStatus,unloadTime);
public void updateScanStatusByLoadId(Long loadId, String scanStatus, Date unloadTime, String signUserName) {
baseMapper.updateScanStatusByLoadId(loadId,scanStatus,unloadTime,signUserName);
}
@Override

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

@ -2188,7 +2188,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadEntity.setLoadStatus("90");
updateById(carsLoadEntity);
trunklineCarsLoadScanService.updateScanStatusByLoadId(loadId, "3", new Date());
trunklineCarsLoadScanService.updateScanStatusByLoadId(loadId, "3", new Date(),AuthUtil.getNickName());
try {
trunklineCarsLoadLogService.saveLog(carsLoadEntity, carsLoadLineEntity, CarsLoadLogTypeConstant.TRIPARTITE_TRANSFER_SIGN.getValue());
@ -2226,13 +2226,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
throw new CustomerException(400, "暂未有权限进行操作");
}
TrunklineCarsLoadLineEntity carsLoadLine = trunklineCarsLoadLineService.findStartNodeByLoadId(loadId);
carsLoadEntity.setIsSettlement("2");
carsLoadEntity.setSettlementValue(settlementValue);
carsLoadEntity.setSettlementPerson(AuthUtil.getUserName());
carsLoadEntity.setSettlementPerson(AuthUtil.getNickName());
carsLoadEntity.setSettlementPersonId(AuthUtil.getUserId());
updateById(carsLoadEntity);
trunklineCarsLoadLogService.saveLog(carsLoadEntity, null, CarsLoadLogTypeConstant.TRIPARTITE_TRANSFER_SETTLEMENT.getValue());
trunklineCarsLoadLogService.saveLog(carsLoadEntity, carsLoadLine, CarsLoadLogTypeConstant.TRIPARTITE_TRANSFER_SETTLEMENT.getValue());
return R.success("结算成功");
}
@ -2255,7 +2258,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
@Override
public R loadingScan(Long loadId, Long warehouseId, String orderPackageCode, String trayCode, String remark) {
public R loadingScan(Long loadId, Long warehouseId, String orderPackageCode, String trayCode, String remark) {
log.info("#################loadingScan: 装车扫描");
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
@ -2470,6 +2473,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
isAbnormal = 1;
remark = "有数据,在本仓,不在配载计划中,异常装车";
audio = "无计划装车";
String loadType = carsLoadEntity.getLoadType();
if("4".equals(loadType)){
carsLoadScanEntity.setFinalNodeId(warehouseId);
carsLoadScanEntity.setFinalNodeName(warehouseName);
}
} else {
//有计划
Integer planNum = carsOrderEntity.getPlanNum();
@ -2491,8 +2499,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
if (!Objects.isNull(finalNode)) {
finalNodeName = finalNode.getName();
}
carsLoadScanEntity.setFinalNodeId(finalNodeId);
carsLoadScanEntity.setFinalNodeName(finalNodeName);
String loadType = carsLoadEntity.getLoadType();
if("4".equals(loadType)){
carsLoadScanEntity.setFinalNodeId(warehouseId);
carsLoadScanEntity.setFinalNodeName(warehouseName);
}else{
carsLoadScanEntity.setFinalNodeId(finalNodeId);
carsLoadScanEntity.setFinalNodeName(finalNodeName);
}
}
distributionParcelListClient.updateOrderPackageCodeById(packageId, "60");
distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
@ -3706,6 +3720,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setUnloadNodeName(warehouseName);
carsLoadScanEntity.setUnloadNum(carsLoadScanEntity.getNum());
carsLoadScanEntity.setUnloadTime(new Date());
carsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
carsLoadScanEntity.setScanStatus("2");
trayCode = carsLoadScanEntity.getTrayCode();
if (!StringUtil.isBlank(trayCode)) {
@ -5298,10 +5313,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadEntity.setSignTime(date);
carsLoadEntity.setLoadStatus("90");
} else {
if (num == 1) {
carsLoadEntity.setSignTime(date);
carsLoadEntity.setLoadStatus("91");
}
carsLoadEntity.setSignTime(date);
carsLoadEntity.setLoadStatus("91");
}
updateById(carsLoadEntity);

Loading…
Cancel
Save