zelong.shao

customer|add部分调整

1 package com.fedex.connect.customer.service.biz.impl; 1 package com.fedex.connect.customer.service.biz.impl;
2 2
3 +import com.fedex.connect.common.dependencies.contants.DigitConstants;
3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 4 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 import com.fedex.connect.common.model.biz.*; 5 import com.fedex.connect.common.model.biz.*;
5 import com.fedex.connect.common.model.sys.User; 6 import com.fedex.connect.common.model.sys.User;
6 import com.fedex.connect.customer.data.bo.AddBo; 7 import com.fedex.connect.customer.data.bo.AddBo;
7 import com.fedex.connect.customer.data.bo.ConsignmentBo; 8 import com.fedex.connect.customer.data.bo.ConsignmentBo;
9 +import com.fedex.connect.customer.data.dto.ConsignmentAddDto;
8 import com.fedex.connect.customer.enums.ResponseCode; 10 import com.fedex.connect.customer.enums.ResponseCode;
9 import com.fedex.connect.customer.service.base.BaseService; 11 import com.fedex.connect.customer.service.base.BaseService;
10 import com.fedex.connect.customer.service.biz.IAttachmentService; 12 import com.fedex.connect.customer.service.biz.IAttachmentService;
...@@ -62,20 +64,22 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS ...@@ -62,20 +64,22 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
62 * 不存在则直接返回 64 * 不存在则直接返回
63 */ 65 */
64 if (consignment == null){ 66 if (consignment == null){
65 - if (!StringUtils.isEmpty(bo.getShipperAccount())){ 67 + ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto();
68 + consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ZERO);
69 + if (!StringUtils.isEmpty(bo.getShipperAccount())){
66 if (Objects.equals(user.getAccountNo(),bo.getShipperAccount())){ 70 if (Objects.equals(user.getAccountNo(),bo.getShipperAccount())){
67 - return responseUtils.success(); 71 + return responseUtils.success(consignmentAddDto);
68 }else { 72 }else {
69 /** 73 /**
70 * 不存在运单,并且没有填写shipperAccount,则直接返回 74 * 不存在运单,并且没有填写shipperAccount,则直接返回
71 */ 75 */
72 - return responseUtils.success(); 76 + return responseUtils.success(consignmentAddDto);
73 } 77 }
74 }else { 78 }else {
75 /** 79 /**
76 * 不存在运单,并且没有填写shipperAccount,则直接返回 80 * 不存在运单,并且没有填写shipperAccount,则直接返回
77 */ 81 */
78 - return responseUtils.success(); 82 + return responseUtils.success(consignmentAddDto);
79 } 83 }
80 } 84 }
81 /** 85 /**
...@@ -85,7 +89,7 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS ...@@ -85,7 +89,7 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
85 /** 89 /**
86 * 非501数据 90 * 非501数据
87 */ 91 */
88 - return consignmentUtil.consignmentCheckWithNotCe(consignment,bo,user); 92 + return consignmentUtil.consignmentCheckWithNotCe(consignment,bo);
89 }else { 93 }else {
90 /** 94 /**
91 * 501数据 95 * 501数据
......
...@@ -95,17 +95,17 @@ public class ConsignmentUtil { ...@@ -95,17 +95,17 @@ public class ConsignmentUtil {
95 * @Date 2024/11/12 95 * @Date 2024/11/12
96 * @param consignment 96 * @param consignment
97 * @param bo 97 * @param bo
98 - * @param user
99 * @return void 98 * @return void
100 */ 99 */
101 - public ResponseVo consignmentCheckWithNotCe(Consignment consignment, AddBo bo, User user){ 100 + public ResponseVo consignmentCheckWithNotCe(Consignment consignment, AddBo bo){
102 ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto(); 101 ConsignmentAddDto consignmentAddDto = new ConsignmentAddDto();
103 consignmentAddDto.setConsignment(consignment); 102 consignmentAddDto.setConsignment(consignment);
104 if (isShipperAccountMatch(bo.getShipperAccount(), consignment.getShipperAccount())){ 103 if (isShipperAccountMatch(bo.getShipperAccount(), consignment.getShipperAccount())){
105 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE); 104 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE);
106 return responseUtils.success(consignmentAddDto); 105 return responseUtils.success(consignmentAddDto);
107 }else { 106 }else {
108 - return responseUtils.success(ResponseCode.MESSAGE_CODE_30011); 107 + consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_FOUR);
108 + return responseUtils.success(ResponseCode.MESSAGE_CODE_30011,consignmentAddDto);
109 } 109 }
110 } 110 }
111 111
...@@ -143,6 +143,7 @@ public class ConsignmentUtil { ...@@ -143,6 +143,7 @@ public class ConsignmentUtil {
143 */ 143 */
144 if (!StringUtils.hasText(bo.getShipperAccount())){ 144 if (!StringUtils.hasText(bo.getShipperAccount())){
145 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO); 145 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO);
146 + consignmentAddDto.setConsignment(null);
146 return responseUtils.success(ResponseCode.MESSAGE_CODE_30012,consignmentAddDto); 147 return responseUtils.success(ResponseCode.MESSAGE_CODE_30012,consignmentAddDto);
147 } 148 }
148 149
...@@ -160,7 +161,9 @@ public class ConsignmentUtil { ...@@ -160,7 +161,9 @@ public class ConsignmentUtil {
160 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE); 161 consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE);
161 return responseUtils.success(consignmentAddDto); 162 return responseUtils.success(consignmentAddDto);
162 }else { 163 }else {
163 - return responseUtils.success(ResponseCode.MESSAGE_CODE_30011); 164 + consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_FOUR);
165 + consignmentAddDto.setConsignment(null);
166 + return responseUtils.success(ResponseCode.MESSAGE_CODE_30011,consignmentAddDto);
164 } 167 }
165 } 168 }
166 169
......