jinhui.wang
1 package com.fedex.connect.customer.data.dto; 1 package com.fedex.connect.customer.data.dto;
2 2
3 -import com.fedex.connect.common.model.biz.Consignment;
4 import lombok.Data; 3 import lombok.Data;
5 4
6 @Data 5 @Data
...@@ -8,6 +7,6 @@ public class ConsignmentAddDto { ...@@ -8,6 +7,6 @@ public class ConsignmentAddDto {
8 /** 7 /**
9 * 是否为该用户的运单 1:是 0:否 8 * 是否为该用户的运单 1:是 0:否
10 */ 9 */
11 - Integer isCreatorFlag; 10 + private Integer isCreatorFlag;
12 - Consignment consignment; 11 + private Long consignmentId;
13 } 12 }
......
...@@ -24,4 +24,14 @@ public class FindConsignmentsDto { ...@@ -24,4 +24,14 @@ public class FindConsignmentsDto {
24 private Date modifyTime; 24 private Date modifyTime;
25 25
26 private String statusName; 26 private String statusName;
27 +
28 + private String userUuid;
29 +
30 + private String userInputShipperAccount;
31 +
32 + private String shipperAccount;
33 +
34 + private String userInputOriginCountryCode;
35 +
36 + private String userInputOriginCountry;
27 } 37 }
......
...@@ -28,7 +28,12 @@ ...@@ -28,7 +28,12 @@
28 c.CREATE_USER_NAME, 28 c.CREATE_USER_NAME,
29 c.CREATE_TIME, 29 c.CREATE_TIME,
30 c.MODIFY_TIME, 30 c.MODIFY_TIME,
31 - c.STATUS_NAME 31 + c.STATUS_NAME,
32 + c.USER_UUID,
33 + c.SHIPPER_ACCOUNT,
34 + c.USER_INPUT_SHIPPER_ACCOUNT,
35 + c.USER_INPUT_ORIGIN_COUNTRY_CODE,
36 + c.USER_INPUT_ORIGIN_COUNTRY
32 </sql> 37 </sql>
33 38
34 <select id="findConsignments" resultType="com.fedex.connect.customer.data.dto.FindConsignmentsDto"> 39 <select id="findConsignments" resultType="com.fedex.connect.customer.data.dto.FindConsignmentsDto">
......
...@@ -45,6 +45,18 @@ public class ConsignmentRepositoryImpl extends BaseDao implements IConsignmentRe ...@@ -45,6 +45,18 @@ public class ConsignmentRepositoryImpl extends BaseDao implements IConsignmentRe
45 if (SystemDefaultUserConstants.SYSTEM_USER_KEYS.USER_NAME.equals(consignment.getCreateUserName())){ 45 if (SystemDefaultUserConstants.SYSTEM_USER_KEYS.USER_NAME.equals(consignment.getCreateUserName())){
46 consignment.setCreateUserName(user.getUserName()); 46 consignment.setCreateUserName(user.getUserName());
47 } 47 }
48 + if (!user.getUserUuid().equals(consignment.getUserUuid()) && !user.getAccountNo().equals(consignment.getShipperAccount())){
49 + consignment.setRecipientContactName(null);
50 + consignment.setRecipientCompany(null);
51 + consignment.setDocNondocFlag(null);
52 + consignment.setCreateUserName(null);
53 + consignment.setCreateTime(null);
54 + consignment.setModifyTime(null);
55 + consignment.setStatusName(null);
56 + consignment.setUserUuid(null);
57 + consignment.setShipperAccount(null);
58 + consignment.setOriginCountry(consignment.getUserInputOriginCountry());
59 + }
48 }); 60 });
49 return consignments; 61 return consignments;
50 } 62 }
......
...@@ -99,12 +99,13 @@ public class ConsignmentUtil { ...@@ -99,12 +99,13 @@ public class ConsignmentUtil {
99 */ 99 */
100 public ResponseVo consignmentCheckWithNotCe(Consignment consignment, AddBo bo){ 100 public ResponseVo consignmentCheckWithNotCe(Consignment consignment, AddBo bo){
101 ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto(); 101 ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto();
102 - consignmentAddDto.setConsignment(consignment); 102 + consignmentAddDto.setConsignmentId(consignment.getId());
103 if (isShipperAccountMatch(bo.getShipperAccount(), consignment.getShipperAccount())){ 103 if (isShipperAccountMatch(bo.getShipperAccount(), consignment.getShipperAccount())){
104 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE); 104 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE);
105 return responseUtils.success(consignmentAddDto); 105 return responseUtils.success(consignmentAddDto);
106 }else { 106 }else {
107 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_THREE); 107 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_THREE);
108 + consignmentAddDto.setConsignmentId(null);
108 return responseUtils.success(ResponseCode.MESSAGE_CODE_30011,consignmentAddDto); 109 return responseUtils.success(ResponseCode.MESSAGE_CODE_30011,consignmentAddDto);
109 } 110 }
110 } 111 }
...@@ -120,7 +121,7 @@ public class ConsignmentUtil { ...@@ -120,7 +121,7 @@ public class ConsignmentUtil {
120 */ 121 */
121 public ResponseVo consignmentCheckWithCe(Consignment consignment, AddBo bo, User user) { 122 public ResponseVo consignmentCheckWithCe(Consignment consignment, AddBo bo, User user) {
122 ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto(); 123 ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto();
123 - consignmentAddDto.setConsignment(consignment); 124 + consignmentAddDto.setConsignmentId(consignment.getId());
124 125
125 /** 126 /**
126 * uuid相同,直接返回所有运单信息 127 * uuid相同,直接返回所有运单信息
...@@ -143,7 +144,7 @@ public class ConsignmentUtil { ...@@ -143,7 +144,7 @@ public class ConsignmentUtil {
143 */ 144 */
144 if (!StringUtils.hasText(bo.getShipperAccount())){ 145 if (!StringUtils.hasText(bo.getShipperAccount())){
145 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO); 146 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO);
146 - consignmentAddDto.setConsignment(null); 147 + consignmentAddDto.setConsignmentId(null);
147 return responseUtils.success(ResponseCode.MESSAGE_CODE_30012,consignmentAddDto); 148 return responseUtils.success(ResponseCode.MESSAGE_CODE_30012,consignmentAddDto);
148 } 149 }
149 150
...@@ -162,7 +163,7 @@ public class ConsignmentUtil { ...@@ -162,7 +163,7 @@ public class ConsignmentUtil {
162 return responseUtils.success(consignmentAddDto); 163 return responseUtils.success(consignmentAddDto);
163 }else { 164 }else {
164 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_THREE); 165 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_THREE);
165 - consignmentAddDto.setConsignment(null); 166 + consignmentAddDto.setConsignmentId(null);
166 return responseUtils.success(ResponseCode.MESSAGE_CODE_30011,consignmentAddDto); 167 return responseUtils.success(ResponseCode.MESSAGE_CODE_30011,consignmentAddDto);
167 } 168 }
168 } 169 }
......