Showing
5 changed files
with
18 additions
and
6 deletions
| ... | @@ -31,4 +31,6 @@ public class ConsignmentBo { | ... | @@ -31,4 +31,6 @@ public class ConsignmentBo { |
| 31 | //文件业务类型AWB,INV,PKL,OTH(分运单,发票,箱单和其它这四种类型) | 31 | //文件业务类型AWB,INV,PKL,OTH(分运单,发票,箱单和其它这四种类型) |
| 32 | @BaseNotBlank(describe = "business_field_31008") | 32 | @BaseNotBlank(describe = "business_field_31008") |
| 33 | private List<Attachment> attachmentBizTypeList; | 33 | private List<Attachment> attachmentBizTypeList; |
| 34 | + //是否使用DM005标志 | ||
| 35 | + private Long ceFlag; | ||
| 34 | } | 36 | } | ... | ... |
| ... | @@ -146,7 +146,7 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS | ... | @@ -146,7 +146,7 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS |
| 146 | /** | 146 | /** |
| 147 | * 保存运单相关信息 | 147 | * 保存运单相关信息 |
| 148 | */ | 148 | */ |
| 149 | - consignmentUtil.submitInfo(consignment,attachmentList,uploadRecord,user); | 149 | + consignmentUtil.submitInfo(consignment,attachmentList,uploadRecord,user,consignmentBo.getCeFlag()); |
| 150 | }catch(OpErrorException ex){ | 150 | }catch(OpErrorException ex){ |
| 151 | /** | 151 | /** |
| 152 | * 提交异常,需要删除对应已上传附件,已上传文件不进行删除 | 152 | * 提交异常,需要删除对应已上传附件,已上传文件不进行删除 | ... | ... |
| 1 | package com.fedex.connect.customer.util.service.biz; | 1 | package com.fedex.connect.customer.util.service.biz; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.model.biz.Consignment; | 3 | import com.fedex.connect.common.model.biz.Consignment; |
| 4 | +import com.fedex.connect.common.model.biz.UserConsignmentMapping; | ||
| 4 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; | 5 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; |
| 6 | +import com.fedex.connect.customer.repository.repo.IUserConsignmentMappingRepository; | ||
| 5 | import lombok.extern.slf4j.Slf4j; | 7 | import lombok.extern.slf4j.Slf4j; |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 6 | import org.springframework.stereotype.Component; | 9 | import org.springframework.stereotype.Component; |
| 7 | 10 | ||
| 8 | import java.util.Objects; | 11 | import java.util.Objects; |
| ... | @@ -15,6 +18,8 @@ import java.util.Objects; | ... | @@ -15,6 +18,8 @@ import java.util.Objects; |
| 15 | @Slf4j | 18 | @Slf4j |
| 16 | @Component | 19 | @Component |
| 17 | public class ConsignmentQueryUtil { | 20 | public class ConsignmentQueryUtil { |
| 21 | + @Autowired | ||
| 22 | + protected IUserConsignmentMappingRepository userConsignmentMappingRepository; | ||
| 18 | /** | 23 | /** |
| 19 | * @Author mt | 24 | * @Author mt |
| 20 | * @Description 运单查询数据筛选 | 25 | * @Description 运单查询数据筛选 |
| ... | @@ -24,11 +29,14 @@ public class ConsignmentQueryUtil { | ... | @@ -24,11 +29,14 @@ public class ConsignmentQueryUtil { |
| 24 | * @return com.fedex.connect.common.model.biz.Consignment | 29 | * @return com.fedex.connect.common.model.biz.Consignment |
| 25 | */ | 30 | */ |
| 26 | public Consignment findConsignment(UserConsignmentInfoQuery userConsignmentInfoQuery,Consignment consignment){ | 31 | public Consignment findConsignment(UserConsignmentInfoQuery userConsignmentInfoQuery,Consignment consignment){ |
| 32 | + /** | ||
| 33 | + * 查询mapping表 | ||
| 34 | + */ | ||
| 35 | + UserConsignmentMapping byUserIdAndConsignmentCode = userConsignmentMappingRepository.findByUserIdAndConsignmentCode(userConsignmentInfoQuery.getUserId(), consignment.getConsignmentCode()); | ||
| 27 | Consignment resultConsignment = null; | 36 | Consignment resultConsignment = null; |
| 28 | if(Objects.nonNull(consignment)){ | 37 | if(Objects.nonNull(consignment)){ |
| 29 | //uuid相同,则将运单所有信息返回给到前端 | 38 | //uuid相同,则将运单所有信息返回给到前端 |
| 30 | - if((Objects.nonNull(userConsignmentInfoQuery.getUserUuid()) && userConsignmentInfoQuery.getUserUuid().equals(consignment.getUserUuid())) || | 39 | + if(Objects.equals(userConsignmentInfoQuery.getUserUuid(),consignment.getUserUuid()) || (byUserIdAndConsignmentCode.getCeFlag() != null &&byUserIdAndConsignmentCode.getCeFlag() == 1L)){ |
| 31 | - (Objects.nonNull(userConsignmentInfoQuery.getShipperAccount()) && userConsignmentInfoQuery.getShipperAccount().equals(consignment.getShipperAccount()))){ | ||
| 32 | //1:如果运单UUID与登录账号UUID相同或者用户shipperAccount与运单shipperAccount相同,则显示运单、收发件人信息,以及501信息 | 40 | //1:如果运单UUID与登录账号UUID相同或者用户shipperAccount与运单shipperAccount相同,则显示运单、收发件人信息,以及501信息 |
| 33 | resultConsignment = consignment; | 41 | resultConsignment = consignment; |
| 34 | }else { | 42 | }else { | ... | ... |
| ... | @@ -278,7 +278,8 @@ public class ConsignmentUtil { | ... | @@ -278,7 +278,8 @@ public class ConsignmentUtil { |
| 278 | public void submitInfo(Consignment consignment, | 278 | public void submitInfo(Consignment consignment, |
| 279 | List<Attachment> attachmentList, | 279 | List<Attachment> attachmentList, |
| 280 | UploadRecord uploadRecord, | 280 | UploadRecord uploadRecord, |
| 281 | - User user) throws Exception{ | 281 | + User user, |
| 282 | + Long ceFlag) throws Exception{ | ||
| 282 | if(Objects.nonNull(consignment) && Objects.nonNull(consignment.getId())){ | 283 | if(Objects.nonNull(consignment) && Objects.nonNull(consignment.getId())){ |
| 283 | try{ | 284 | try{ |
| 284 | //增加行级锁 | 285 | //增加行级锁 |
| ... | @@ -316,7 +317,7 @@ public class ConsignmentUtil { | ... | @@ -316,7 +317,7 @@ public class ConsignmentUtil { |
| 316 | /** | 317 | /** |
| 317 | * 初始化插入预清关文件推送任务日志 | 318 | * 初始化插入预清关文件推送任务日志 |
| 318 | */ | 319 | */ |
| 319 | - userConsignmentMapping = userConsignmentMappingUtil.initUserConsignmentMapping(user.getId(),consignment.getId()); | 320 | + userConsignmentMapping = userConsignmentMappingUtil.initUserConsignmentMapping(user.getId(),consignment.getId(),ceFlag); |
| 320 | /** | 321 | /** |
| 321 | * 初始化插入预清关文件推送任务日志 | 322 | * 初始化插入预清关文件推送任务日志 |
| 322 | */ | 323 | */ | ... | ... |
| ... | @@ -22,11 +22,12 @@ public class UserConsignmentMappingUtil { | ... | @@ -22,11 +22,12 @@ public class UserConsignmentMappingUtil { |
| 22 | * @param | 22 | * @param |
| 23 | * @return com.fedex.connect.common.model.biz.PushOb | 23 | * @return com.fedex.connect.common.model.biz.PushOb |
| 24 | */ | 24 | */ |
| 25 | - public UserConsignmentMapping initUserConsignmentMapping(Long userId,Long consignmentId) throws Exception{ | 25 | + public UserConsignmentMapping initUserConsignmentMapping(Long userId,Long consignmentId,Long ceFlag) throws Exception{ |
| 26 | UserConsignmentMapping userConsignmentMapping = new UserConsignmentMapping(); | 26 | UserConsignmentMapping userConsignmentMapping = new UserConsignmentMapping(); |
| 27 | userConsignmentMapping.setUserId(userId); | 27 | userConsignmentMapping.setUserId(userId); |
| 28 | userConsignmentMapping.setConsignmentId(consignmentId); | 28 | userConsignmentMapping.setConsignmentId(consignmentId); |
| 29 | userConsignmentMapping.setStatus(StatusEnum.YES.getCode()); | 29 | userConsignmentMapping.setStatus(StatusEnum.YES.getCode()); |
| 30 | + userConsignmentMapping.setCeFlag(ceFlag); | ||
| 30 | AssignmentFieldUtils.assignmentTableBaseField(userConsignmentMapping); | 31 | AssignmentFieldUtils.assignmentTableBaseField(userConsignmentMapping); |
| 31 | return userConsignmentMapping; | 32 | return userConsignmentMapping; |
| 32 | } | 33 | } | ... | ... |
-
Please register or login to post a comment