Commit 4b70bbea authored by Allen Chen's avatar Allen Chen

commit

parent 564617e9
...@@ -5,10 +5,12 @@ import com.alibaba.fastjson.JSONObject; ...@@ -5,10 +5,12 @@ import com.alibaba.fastjson.JSONObject;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.ta.pddserver.entity.CollectOutMailDetailEntity; import org.ta.pddserver.entity.CollectOutMailDetailEntity;
import org.ta.pddserver.entity.CollectReceiverDetailEntity;
import org.ta.pddserver.model.api.request.*; import org.ta.pddserver.model.api.request.*;
import org.ta.pddserver.model.api.response.LogOrderListResponse; import org.ta.pddserver.model.api.response.LogOrderListResponse;
import org.ta.pddserver.model.api.response.LogOrderMailDetailListResponse; import org.ta.pddserver.model.api.response.LogOrderMailDetailListResponse;
...@@ -45,6 +47,8 @@ public class PddLocalController { ...@@ -45,6 +47,8 @@ public class PddLocalController {
private static final String WAREHOUSE_CODE = "HJJY001"; private static final String WAREHOUSE_CODE = "HJJY001";
private static final String CLIENT_ID = "d0217707e1194c46b57e696ac7619a06"; private static final String CLIENT_ID = "d0217707e1194c46b57e696ac7619a06";
private static final String CLIENT_SECRET = "a5aba84483d8387030899f01276b06a194942470"; private static final String CLIENT_SECRET = "a5aba84483d8387030899f01276b06a194942470";
@Autowired
private CollectReceiverDetailImpl collectReceiverDetailImpl;
/*集运单列表*/ /*集运单列表*/
...@@ -127,6 +131,8 @@ public class PddLocalController { ...@@ -127,6 +131,8 @@ public class PddLocalController {
PddServiceConsoInboundRequest notifyRequest = new PddServiceConsoInboundRequest(); PddServiceConsoInboundRequest notifyRequest = new PddServiceConsoInboundRequest();
// 查询orderNO 下所有mailNo,判断是全部还是部分
notifyRequest.setProviderCode(PROVIDER_CODE); notifyRequest.setProviderCode(PROVIDER_CODE);
notifyRequest.setLogisticsOrderCode(mailNoResponse.getLogisticsOrderCode()); notifyRequest.setLogisticsOrderCode(mailNoResponse.getLogisticsOrderCode());
...@@ -134,7 +140,7 @@ public class PddLocalController { ...@@ -134,7 +140,7 @@ public class PddLocalController {
notifyRequest.setTimeZone("UTC+8"); notifyRequest.setTimeZone("UTC+8");
notifyRequest.setStatus("FULL_INBOUND"); notifyRequest.setStatus("FULL_INBOUND");
notifyRequest.setPackageQuantity(1L); notifyRequest.setPackageQuantity(1L); // 已入库数量 + 1
notifyRequest.setPackageInfo(new PddServiceConsoInboundRequest.PackageInfo()); notifyRequest.setPackageInfo(new PddServiceConsoInboundRequest.PackageInfo());
notifyRequest.getPackageInfo().setMailNo(mailNoResponse.getMailNo()); notifyRequest.getPackageInfo().setMailNo(mailNoResponse.getMailNo());
...@@ -220,7 +226,7 @@ public class PddLocalController { ...@@ -220,7 +226,7 @@ public class PddLocalController {
CollectOutMailDetailEntity collectOutMailDetailEntity = collectcOutMailDetailImpl.getInfoByMailNo(outBoundRequest.getMailNo()); CollectOutMailDetailEntity collectOutMailDetailEntity = collectcOutMailDetailImpl.getInfoByMailNo(outBoundRequest.getMailNo());
notifyRequest.setProviderCode(PROVIDER_CODE); notifyRequest.setProviderCode(PROVIDER_CODE);
notifyRequest.setOrderCode(outBoundRequest.getOrderCode()); notifyRequest.setOrderCode(collectOutMailDetailEntity.getOrderCode());
notifyRequest.setSegmentCode("SENDTORECEVER"); notifyRequest.setSegmentCode("SENDTORECEVER");
notifyRequest.setExecuteTime(timeTool.getNowString()); notifyRequest.setExecuteTime(timeTool.getNowString());
notifyRequest.setTimeZone("UTC+8"); notifyRequest.setTimeZone("UTC+8");
...@@ -245,14 +251,16 @@ public class PddLocalController { ...@@ -245,14 +251,16 @@ public class PddLocalController {
notifyRequest.getSenderDetail().setDistrict("兰山区"); notifyRequest.getSenderDetail().setDistrict("兰山区");
notifyRequest.getSenderDetail().setDetailAddress("山东省临沂市兰山区横九路与纵十路交汇兰山财金智慧云仓五期二层二号仓"); notifyRequest.getSenderDetail().setDetailAddress("山东省临沂市兰山区横九路与纵十路交汇兰山财金智慧云仓五期二层二号仓");
CollectReceiverDetailEntity collectReceiverDetailEntity = collectReceiverDetailImpl.getInfoByMailNo(collectOutMailDetailEntity.getOrderCode());
notifyRequest.setReceiverDetail(new PddServiceConsoOutboundRequest.ReceiverDetail()); notifyRequest.setReceiverDetail(new PddServiceConsoOutboundRequest.ReceiverDetail());
notifyRequest.getReceiverDetail().setName("nanjiexi"); notifyRequest.getReceiverDetail().setName(collectReceiverDetailEntity.getName());
notifyRequest.getReceiverDetail().setTelePhone("01099999999"); notifyRequest.getReceiverDetail().setTelePhone(collectReceiverDetailEntity.getTelePhone());
notifyRequest.getReceiverDetail().setCountry("KR"); notifyRequest.getReceiverDetail().setCountry(collectReceiverDetailEntity.getCountry());
notifyRequest.getReceiverDetail().setProvince("서울특별시"); notifyRequest.getReceiverDetail().setProvince(collectReceiverDetailEntity.getProvince());
notifyRequest.getReceiverDetail().setCity("강북구"); notifyRequest.getReceiverDetail().setCity(collectReceiverDetailEntity.getCity());
notifyRequest.getReceiverDetail().setDistrict("우이동"); notifyRequest.getReceiverDetail().setDistrict(collectReceiverDetailEntity.getDistrict());
notifyRequest.getReceiverDetail().setDetailAddress("서울특별시测试地址"); notifyRequest.getReceiverDetail().setDetailAddress(collectReceiverDetailEntity.getDetailAddress());
notifyRequest.setResult(new PddServiceConsoOutboundRequest.Result()); notifyRequest.setResult(new PddServiceConsoOutboundRequest.Result());
notifyRequest.getResult().setCode(0); notifyRequest.getResult().setCode(0);
......
...@@ -2,8 +2,12 @@ package org.ta.pddserver.mapper; ...@@ -2,8 +2,12 @@ package org.ta.pddserver.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.ta.pddserver.entity.CollectReceiverDetailEntity; import org.ta.pddserver.entity.CollectReceiverDetailEntity;
@Mapper @Mapper
public interface CollectReceiverDetailMapper extends BaseMapper<CollectReceiverDetailEntity> { public interface CollectReceiverDetailMapper extends BaseMapper<CollectReceiverDetailEntity> {
@Select("SELECT * FROM `collect_order_receiver_detail` WHERE `orderCode` = #{orderCode} AND `state` > 0")
CollectReceiverDetailEntity getInfoByMailNo(@Param("orderCode") String orderCode);
} }
...@@ -11,4 +11,7 @@ import org.ta.pddserver.service.CollectReceiverDetailService; ...@@ -11,4 +11,7 @@ import org.ta.pddserver.service.CollectReceiverDetailService;
public class CollectReceiverDetailImpl extends ServiceImpl<CollectReceiverDetailMapper, CollectReceiverDetailEntity> implements CollectReceiverDetailService { public class CollectReceiverDetailImpl extends ServiceImpl<CollectReceiverDetailMapper, CollectReceiverDetailEntity> implements CollectReceiverDetailService {
public CollectReceiverDetailEntity getInfoByMailNo(String orderCode) {
return baseMapper.getInfoByMailNo(orderCode);
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment