Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev-warehouse
0.0 2 years ago
parent
commit
6d173c0011
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java
  2. 13
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/controller/FactoryCommonController.java
  3. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/dto/MtUnLoadCarNumDTO.java
  4. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/IMtFactoryDataService.java
  5. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java
  6. 14
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java

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

@ -8,7 +8,7 @@ public interface ModuleNameConstant {
/**
* 如果不需要 ""
*/
public static final String DEVAUTH ="";
public static final String DEVAUTH ="-pref";
/**

13
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/controller/FactoryCommonController.java

@ -17,11 +17,14 @@ import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@ -155,9 +158,13 @@ public class FactoryCommonController {
public R sendUnloadCarComInfo(@RequestBody UnloadCarDTO receiveInfoDTO) {
log.info("############sendUnloadCarComInfo: 请求参数{}", receiveInfoDTO);
//处理数据
// R r = factoryCommonService.sendReceiveInfo(receiveInfoDTO);
try {
if (StringUtil.isBlank(receiveInfoDTO.getCompleteDate())) {
String data = DateUtil.format(new Date(), "yyyy-mm-dd HH:mm:ss");
receiveInfoDTO.setCompleteDate(data);
}
//先保存原始请求数据
OrderStatusLog orderStatusLog = new OrderStatusLog();
orderStatusLog.setArgs(JSONObject.toJSONString(receiveInfoDTO));
@ -184,8 +191,4 @@ public class FactoryCommonController {
}
}

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/dto/MtUnLoadCarNumDTO.java

@ -15,6 +15,6 @@ public class MtUnLoadCarNumDTO implements Serializable {
@JsonProperty("确认收货时间")
private Date invoiceTime;
private String invoiceTime;
}

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/IMtFactoryDataService.java

@ -30,5 +30,5 @@ public interface IMtFactoryDataService {
* @param data 确认收货时间
* @return
*/
R sendUnloadCarNum(String unloadCarNum, Date data) throws ParseException, JsonProcessingException, NoSuchAlgorithmException;
R sendUnloadCarNum(String unloadCarNum, String data) throws ParseException, JsonProcessingException, NoSuchAlgorithmException;
}

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java

@ -486,7 +486,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
@Override
public R sendUnloadCarNum(String unloadCarNum, Date data) throws ParseException, JsonProcessingException, NoSuchAlgorithmException {
public R sendUnloadCarNum(String unloadCarNum, String data) throws ParseException, JsonProcessingException, NoSuchAlgorithmException {
MtUnLoadCarNumDTO unLoadCarNumDTO = new MtUnLoadCarNumDTO();

14
blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java

@ -12,6 +12,7 @@ import com.logpm.oldproject.entity.AdvanceDetailEntity;
import com.logpm.oldproject.feign.IAdvanceClient;
import com.logpm.oldproject.feign.IAdvanceDetailClient;
import com.rabbitmq.client.Channel;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.RabbitConstant;
import org.springblade.core.tool.api.R;
@ -60,12 +61,16 @@ public class UnloadCarComHandler {
4.查询包间对应的梦天发给我们的批次号
*/
UnloadCarDTO unloadCarDTO = (UnloadCarDTO) map.get("messageData");
log.info("##################unloadCarComDataHandler:消费内容{}",unloadCarDTO);
/*
2.通过车次查询来系统中车次绑定的运单
3.通过运单查询货物上的包件
4.需要过滤出来 只要梦天的
*/
List<AdvanceDetailEntity> carNumList = advanceDetailClient.getByCarNum(unloadCarDTO.getUnloadCarNum());
log.info("##################unloadCarComDataHandler carNumList:{}",carNumList);
/**
* 安装品类进行分组
@ -109,13 +114,13 @@ public class UnloadCarComHandler {
}
if (isPush) {
try {
Date data = new SimpleDateFormat().parse(unloadCarDTO.getCompleteDate());
R r = mtFactoryDataService.sendUnloadCarNum(unloadCarDTO.getUnloadCarNum(), data);
R r = mtFactoryDataService.sendUnloadCarNum(unloadCarDTO.getUnloadCarNum(), unloadCarDTO.getCompleteDate());
if(r.isSuccess()){
// 更新订单状态
UpdateChainWrapper<MtFactoryOrderMain> updateChainWrapper =new UpdateChainWrapper<MtFactoryOrderMain>(MtFactoryOrderMain.class);
updateChainWrapper.set("push_status","1");
updateChainWrapper.set("push_time",data);
updateChainWrapper.set("push_time",new Date());
updateChainWrapper.eq("invoice_order_code",unloadCarDTO.getUnloadCarNum());
mtFactoryOrderMainService.update(updateChainWrapper);
}
@ -130,6 +135,9 @@ public class UnloadCarComHandler {
}
}else {
log.info("##################{} 车次 没有匹配需要推送的数据", unloadCarDTO.getUnloadCarNum());
}

Loading…
Cancel
Save