tao.mo

common-dependencies、kafka-cndc-server、manager-server、biz-customer | 修改 | 运单提交

mt
2024年11月11日11:20:26
Showing 48 changed files with 455 additions and 276 deletions
...@@ -4,10 +4,7 @@ package com.fedex.connect.customer.controller.base; ...@@ -4,10 +4,7 @@ package com.fedex.connect.customer.controller.base;
4 import com.fedex.connect.common.dependencies.common.BasicController; 4 import com.fedex.connect.common.dependencies.common.BasicController;
5 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; 5 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
6 import com.fedex.connect.common.model.sys.User; 6 import com.fedex.connect.common.model.sys.User;
7 -import com.fedex.connect.customer.service.biz.IAttachmentQueryService; 7 +import com.fedex.connect.customer.service.biz.*;
8 -import com.fedex.connect.customer.service.biz.IAttachmentService;
9 -import com.fedex.connect.customer.service.biz.IConsignmentQueryService;
10 -import com.fedex.connect.customer.service.biz.IConsignmentService;
11 import com.fedex.connect.customer.validate.controller.biz.AttachmentValidate; 8 import com.fedex.connect.customer.validate.controller.biz.AttachmentValidate;
12 import com.fedex.connect.customer.validate.controller.biz.ConsignmentInfoValidate; 9 import com.fedex.connect.customer.validate.controller.biz.ConsignmentInfoValidate;
13 import com.fedex.connect.customer.validate.controller.biz.ConsignmentValidate; 10 import com.fedex.connect.customer.validate.controller.biz.ConsignmentValidate;
...@@ -38,6 +35,10 @@ public class BaseController extends BasicController { ...@@ -38,6 +35,10 @@ public class BaseController extends BasicController {
38 protected IAttachmentQueryService attachmentQueryService; 35 protected IAttachmentQueryService attachmentQueryService;
39 36
40 @Autowired 37 @Autowired
38 + protected IUploadRecordService uploadRecordService;
39 +
40 + /*********************数据校验*********************/
41 + @Autowired
41 protected AttachmentValidate attachmentValidate; 42 protected AttachmentValidate attachmentValidate;
42 43
43 @Autowired 44 @Autowired
......
1 package com.fedex.connect.customer.controller.biz; 1 package com.fedex.connect.customer.controller.biz;
2 2
3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 -import com.fedex.connect.customer.data.bo.LongBo;
5 4
6 public interface IAttachmentQueryController { 5 public interface IAttachmentQueryController {
7 - ResponseVo findHistory(LongBo bo); 6 + ResponseVo queryInfo(Long consignmentId);
8 } 7 }
......
1 package com.fedex.connect.customer.controller.biz; 1 package com.fedex.connect.customer.controller.biz;
2 2
3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 -import com.fedex.connect.customer.data.bo.AddBo; 4 +import com.fedex.connect.customer.data.bo.ConsignmentBo;
5 import org.springframework.web.bind.annotation.RequestBody; 5 import org.springframework.web.bind.annotation.RequestBody;
6 +import org.springframework.web.bind.annotation.RequestParam;
7 +import org.springframework.web.multipart.MultipartFile;
6 8
7 public interface IConsignmentController { 9 public interface IConsignmentController {
8 - ResponseVo addConsignment(@RequestBody AddBo bo); 10 + ResponseVo addConsignment(@RequestBody ConsignmentBo bo);
11 + ResponseVo submitConsignment(@RequestParam("fileUpload") MultipartFile[] files,
12 + @RequestParam("consignmentJson") String consignmentJson);
9 } 13 }
......
...@@ -5,5 +5,5 @@ import com.fedex.connect.customer.data.query.ConsignmentQuery; ...@@ -5,5 +5,5 @@ import com.fedex.connect.customer.data.query.ConsignmentQuery;
5 5
6 public interface IConsignmentQueryController { 6 public interface IConsignmentQueryController {
7 ResponseVo findConsignmentList(ConsignmentQuery consignmentQuery); 7 ResponseVo findConsignmentList(ConsignmentQuery consignmentQuery);
8 - ResponseVo findConsignmentInfo(Long id); 8 + ResponseVo findConsignmentInfo(Long consignmentId);
9 } 9 }
...\ No newline at end of file ...\ No newline at end of file
......
1 +package com.fedex.connect.customer.controller.biz;
2 +
3 +import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 +
5 +public interface IUploadRecordController {
6 + ResponseVo queryHistoryList(Long consignmentId);
7 +}
1 package com.fedex.connect.customer.controller.biz.impl; 1 package com.fedex.connect.customer.controller.biz.impl;
2 2
3 -import com.fedex.connect.common.dependencies.date.model.LogShowModel;
4 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
5 -import com.fedex.connect.common.dependencies.enums.BaseResponseCode;
6 -import com.fedex.connect.common.dependencies.util.CurrentUserInfo;
7 import com.fedex.connect.common.model.sys.User; 4 import com.fedex.connect.common.model.sys.User;
8 import com.fedex.connect.customer.controller.base.BaseController; 5 import com.fedex.connect.customer.controller.base.BaseController;
9 import com.fedex.connect.customer.controller.biz.IAttachmentQueryController; 6 import com.fedex.connect.customer.controller.biz.IAttachmentQueryController;
10 import com.fedex.connect.customer.data.bo.LongBo; 7 import com.fedex.connect.customer.data.bo.LongBo;
8 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
11 import io.swagger.annotations.Api; 9 import io.swagger.annotations.Api;
12 import io.swagger.annotations.ApiOperation; 10 import io.swagger.annotations.ApiOperation;
11 +import io.swagger.annotations.ApiParam;
13 import lombok.extern.slf4j.Slf4j; 12 import lombok.extern.slf4j.Slf4j;
14 -import oracle.jdbc.proxy.annotation.Post; 13 +import org.springframework.web.bind.annotation.*;
15 -import org.springframework.web.bind.annotation.PostMapping;
16 -import org.springframework.web.bind.annotation.RequestBody;
17 -import org.springframework.web.bind.annotation.RequestMapping;
18 -import org.springframework.web.bind.annotation.RestController;
19 14
20 /** 15 /**
21 * @Author Szl 16 * @Author Szl
...@@ -28,33 +23,22 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -28,33 +23,22 @@ import org.springframework.web.bind.annotation.RestController;
28 @Api(value = "AttachmentQueryController", tags = {"附件查询相关"}) 23 @Api(value = "AttachmentQueryController", tags = {"附件查询相关"})
29 public class AttachmentQueryController extends BaseController implements IAttachmentQueryController { 24 public class AttachmentQueryController extends BaseController implements IAttachmentQueryController {
30 25
31 - @PostMapping("/history")
32 - @ApiOperation(value = "历史上传记录查询")
33 @Override 26 @Override
34 - public ResponseVo findHistory(@RequestBody LongBo bo) { 27 + @PostMapping("/queryInfo/{consignmentId}")
35 - ResponseVo responseResultVo = attachmentValidate.preCheckForFindHistory(bo); 28 + @ApiOperation(value = "ResponseVo", notes = "根据运单ID查询用户上传记录")
36 - if (responseResultVo != null){ 29 + public ResponseVo queryInfo(@ApiParam(value="运单ID",required = true) @PathVariable(value = "consignmentId") Long consignmentId) {
37 - return responseResultVo; 30 + /**
38 - } 31 + * 运单id非空校验
32 + */
33 + consignmentInfoValidate.validateConsignmentId(consignmentId);
39 /** 34 /**
40 * 获取当前用户信息 35 * 获取当前用户信息
41 */ 36 */
42 User user = this.getCurrentUserInfo(); 37 User user = this.getCurrentUserInfo();
43 - return attachmentQueryService.findHistory(user.getId(),bo.getId()); 38 + /**
39 + * 构造查询对象
40 + */
41 + UserConsignmentInfoQuery userConsignmentInfoQuery = UserConsignmentInfoQuery.getInstance(user,consignmentId);
42 + return attachmentQueryService.queryInfo(userConsignmentInfoQuery);
44 } 43 }
45 -
46 -// @PostMapping("/history")
47 -// @ApiOperation(value = "历史上传记录查询")
48 -// @Override
49 -// public ResponseVo findHistory(@RequestBody LongBo bo) {
50 -// ResponseVo responseResultVo = attachmentValidate.preCheckForFindHistory(bo);
51 -// if (responseResultVo != null){
52 -// return responseResultVo;
53 -// }
54 -// /**
55 -// * 获取当前用户信息
56 -// */
57 -// User user = this.getCurrentUserInfo();
58 -// return attachmentQueryService.findHistory(user.getId(),bo.getId());
59 -// }
60 } 44 }
......
1 package com.fedex.connect.customer.controller.biz.impl; 1 package com.fedex.connect.customer.controller.biz.impl;
2 2
3 +import com.alibaba.fastjson.JSONObject;
3 import com.fedex.connect.common.dependencies.annotation.OperationMethodLog; 4 import com.fedex.connect.common.dependencies.annotation.OperationMethodLog;
4 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 5 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
5 import com.fedex.connect.common.model.sys.User; 6 import com.fedex.connect.common.model.sys.User;
6 import com.fedex.connect.customer.controller.base.BaseController; 7 import com.fedex.connect.customer.controller.base.BaseController;
7 import com.fedex.connect.customer.controller.biz.IConsignmentController; 8 import com.fedex.connect.customer.controller.biz.IConsignmentController;
8 -import com.fedex.connect.customer.data.bo.AddBo; 9 +import com.fedex.connect.customer.data.bo.ConsignmentBo;
10 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
9 import io.swagger.annotations.Api; 11 import io.swagger.annotations.Api;
10 import io.swagger.annotations.ApiOperation; 12 import io.swagger.annotations.ApiOperation;
11 -import org.slf4j.Logger; 13 +import org.springframework.web.bind.annotation.*;
12 -import org.slf4j.LoggerFactory; 14 +import org.springframework.web.multipart.MultipartFile;
13 -import org.springframework.web.bind.annotation.PostMapping;
14 -import org.springframework.web.bind.annotation.RequestBody;
15 -import org.springframework.web.bind.annotation.RequestMapping;
16 -import org.springframework.web.bind.annotation.RestController;
17 15
18 /** 16 /**
19 * @Author Szl 17 * @Author Szl
...@@ -24,13 +22,12 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -24,13 +22,12 @@ import org.springframework.web.bind.annotation.RestController;
24 @RequestMapping(value = "/consignment", name = "运单操作相关") 22 @RequestMapping(value = "/consignment", name = "运单操作相关")
25 @Api(value = "ConsignmentController", tags = {"运单操作相关"}) 23 @Api(value = "ConsignmentController", tags = {"运单操作相关"})
26 public class ConsignmentController extends BaseController implements IConsignmentController { 24 public class ConsignmentController extends BaseController implements IConsignmentController {
27 - private static final Logger logger = LoggerFactory.getLogger(ConsignmentController.class);
28 25
26 + @Override
29 @PostMapping("/add") 27 @PostMapping("/add")
30 - @ApiOperation("上传运单") 28 + @ApiOperation(value = "ResponseVo", notes = "上传运单")
31 @OperationMethodLog(describe = "con_add_oper") 29 @OperationMethodLog(describe = "con_add_oper")
32 - @Override 30 + public ResponseVo addConsignment(@RequestBody ConsignmentBo bo){
33 - public ResponseVo addConsignment(@RequestBody AddBo bo){
34 ResponseVo responseResultVo = consignmentValidate.preCheckAdd(bo); 31 ResponseVo responseResultVo = consignmentValidate.preCheckAdd(bo);
35 if (responseResultVo != null){ 32 if (responseResultVo != null){
36 return responseResultVo; 33 return responseResultVo;
...@@ -41,4 +38,27 @@ public class ConsignmentController extends BaseController implements IConsignmen ...@@ -41,4 +38,27 @@ public class ConsignmentController extends BaseController implements IConsignmen
41 User user = this.getCurrentUserInfo(); 38 User user = this.getCurrentUserInfo();
42 return consignmentService.add(bo,user); 39 return consignmentService.add(bo,user);
43 } 40 }
41 +
42 + @Override
43 + @PostMapping("/submit")
44 + @ApiOperation(value = "ResponseVo", notes = "运单提交")
45 + @OperationMethodLog(describe = "con_submit_oper")
46 + public ResponseVo submitConsignment(@RequestParam("fileUpload") MultipartFile[] files,
47 + @RequestParam("consignmentJson") String consignmentJson) {
48 + ConsignmentBo consignmentBo = JSONObject.parseObject(consignmentJson,ConsignmentBo.class);
49 + /**
50 + * 运单id非空校验
51 + */
52 +// consignmentValidate.validateConsignmentId(consignmentId);
53 + /**
54 + * 获取当前用户信息
55 + */
56 + User user = this.getCurrentUserInfo();
57 + /**
58 + * 构造查询对象
59 + */
60 +// UserConsignmentInfoQuery userConsignmentInfoQuery = UserConsignmentInfoQuery.getInstance(user,consignmentId);
61 +// return uploadRecordService.findHistory(userConsignmentInfoQuery);
62 + return null;
63 + }
44 } 64 }
......
...@@ -4,7 +4,7 @@ import com.fedex.connect.common.dependencies.date.vo.ResponseVo; ...@@ -4,7 +4,7 @@ import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 import com.fedex.connect.common.model.sys.User; 4 import com.fedex.connect.common.model.sys.User;
5 import com.fedex.connect.customer.controller.base.BaseController; 5 import com.fedex.connect.customer.controller.base.BaseController;
6 import com.fedex.connect.customer.controller.biz.IConsignmentQueryController; 6 import com.fedex.connect.customer.controller.biz.IConsignmentQueryController;
7 -import com.fedex.connect.customer.data.query.ConsignmentInfoQuery; 7 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
8 import com.fedex.connect.customer.data.query.ConsignmentQuery; 8 import com.fedex.connect.customer.data.query.ConsignmentQuery;
9 import io.swagger.annotations.Api; 9 import io.swagger.annotations.Api;
10 import io.swagger.annotations.ApiOperation; 10 import io.swagger.annotations.ApiOperation;
...@@ -23,9 +23,9 @@ import org.springframework.web.bind.annotation.*; ...@@ -23,9 +23,9 @@ import org.springframework.web.bind.annotation.*;
23 @Api(value = "ConsignmentQueryController", tags = {"运单查询相关"}) 23 @Api(value = "ConsignmentQueryController", tags = {"运单查询相关"})
24 public class ConsignmentQueryController extends BaseController implements IConsignmentQueryController { 24 public class ConsignmentQueryController extends BaseController implements IConsignmentQueryController {
25 25
26 - @PostMapping("/list")
27 - @ApiOperation(value = "运单查询")
28 @Override 26 @Override
27 + @PostMapping("/list")
28 + @ApiOperation(value = "ResponseVo", notes = "运单查询")
29 public ResponseVo findConsignmentList(@RequestBody ConsignmentQuery consignmentQuery) { 29 public ResponseVo findConsignmentList(@RequestBody ConsignmentQuery consignmentQuery) {
30 /** 30 /**
31 * 获取当前用户信息 31 * 获取当前用户信息
...@@ -37,25 +37,25 @@ public class ConsignmentQueryController extends BaseController implements IConsi ...@@ -37,25 +37,25 @@ public class ConsignmentQueryController extends BaseController implements IConsi
37 return consignmentQueryService.findConsignments(query); 37 return consignmentQueryService.findConsignments(query);
38 } 38 }
39 39
40 - @PostMapping("/info/{id}")
41 - @ApiOperation(value = "运单详细信息查询")
42 @Override 40 @Override
43 - public ResponseVo findConsignmentInfo(@ApiParam(value="运单ID",required = true) @PathVariable(value = "id") Long id) { 41 + @PostMapping("/info/{consignmentId}")
42 + @ApiOperation(value = "ResponseVo", notes = "运单详细信息查询")
43 + public ResponseVo findConsignmentInfo(@ApiParam(value="运单ID",required = true) @PathVariable(value = "consignmentId") Long consignmentId) {
44 /** 44 /**
45 - * 运单id校验 45 + * 运单id非空校验
46 */ 46 */
47 - consignmentInfoValidate.validateConsignmentId(id); 47 + consignmentInfoValidate.validateConsignmentId(consignmentId);
48 /** 48 /**
49 * 获取当前用户信息 49 * 获取当前用户信息
50 */ 50 */
51 User user = this.getCurrentUserInfo(); 51 User user = this.getCurrentUserInfo();
52 - ConsignmentInfoQuery consignmentInfoQuery = new ConsignmentInfoQuery(); 52 + /**
53 - consignmentInfoQuery.setUserId(user.getId()); 53 + * 构造查询对象
54 - consignmentInfoQuery.setUserUuid(user.getUserUuid()); 54 + */
55 - consignmentInfoQuery.setConsignmentId(id); 55 + UserConsignmentInfoQuery userConsignmentInfoQuery = UserConsignmentInfoQuery.getInstance(user,consignmentId);
56 /** 56 /**
57 * 运单信息查询 57 * 运单信息查询
58 */ 58 */
59 - return consignmentQueryService.findConsignmentInfo(consignmentInfoQuery); 59 + return consignmentQueryService.findConsignmentInfo(userConsignmentInfoQuery);
60 } 60 }
61 } 61 }
......
1 +package com.fedex.connect.customer.controller.biz.impl;
2 +
3 +import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 +import com.fedex.connect.common.model.sys.User;
5 +import com.fedex.connect.customer.controller.base.BaseController;
6 +import com.fedex.connect.customer.controller.biz.IUploadRecordController;
7 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
8 +import io.swagger.annotations.Api;
9 +import io.swagger.annotations.ApiOperation;
10 +import io.swagger.annotations.ApiParam;
11 +import lombok.extern.slf4j.Slf4j;
12 +import org.springframework.web.bind.annotation.PathVariable;
13 +import org.springframework.web.bind.annotation.PostMapping;
14 +import org.springframework.web.bind.annotation.RequestMapping;
15 +import org.springframework.web.bind.annotation.RestController;
16 +
17 +/**
18 + * @Author mt
19 + * @Description 上传记录操作类
20 + * @Date 2024/11/8
21 + */
22 +@Slf4j
23 +@RestController
24 +@RequestMapping(value = "/uploadRecord", name = "上传记录操作相关")
25 +@Api(value = "UploadRecordController", tags = {"上传记录操作相关"})
26 +public class UploadRecordController extends BaseController implements IUploadRecordController {
27 +
28 + @Override
29 + @PostMapping("/queryHistoryList/{consignmentId}")
30 + @ApiOperation(value = "ResponseVo", notes = "运单历史上传记录查询")
31 + public ResponseVo queryHistoryList(@ApiParam(value="运单ID",required = true) @PathVariable(value = "consignmentId") Long consignmentId) {
32 + /**
33 + * 运单id非空校验
34 + */
35 + consignmentInfoValidate.validateConsignmentId(consignmentId);
36 + /**
37 + * 获取当前用户信息
38 + */
39 + User user = this.getCurrentUserInfo();
40 + /**
41 + * 构造查询对象
42 + */
43 + UserConsignmentInfoQuery userConsignmentInfoQuery = UserConsignmentInfoQuery.getInstance(user,consignmentId);
44 + return uploadRecordService.findHistory(userConsignmentInfoQuery);
45 + }
46 +}
1 -package com.fedex.connect.customer.data.bo;
2 -
3 -import lombok.Data;
4 -
5 -@Data
6 -public class AddBo {
7 - private String ConsignmentCode;
8 -
9 - private String shipperAccount;
10 -
11 - private String shipperCountry;
12 -
13 - private String recipientCountry;
14 -}
1 +package com.fedex.connect.customer.data.bo;
2 +
3 +import lombok.Data;
4 +
5 +@Data
6 +public class ConsignmentBo {
7 + //运单id
8 + private Integer id;
9 + //运单号
10 + private String consignmentCode;
11 + //用户录入shipperAccount
12 + private String shipperAccount;
13 + //原产国code
14 + private String originCountryCode;
15 + //原产国全程
16 + private String originCountry;
17 + //目的国code
18 + private String destinationCountryCode;
19 + //目的国全称
20 + private String destinationCountry;
21 + //文件业务类型AWB,INV,PKL,OTH(分运单,发票,箱单和其它这四种类型)
22 + private String[] fileBizType;
23 +}
1 package com.fedex.connect.customer.data.query; 1 package com.fedex.connect.customer.data.query;
2 2
3 +import com.fedex.connect.common.model.sys.User;
3 import lombok.Data; 4 import lombok.Data;
4 5
5 /** 6 /**
...@@ -8,11 +9,27 @@ import lombok.Data; ...@@ -8,11 +9,27 @@ import lombok.Data;
8 * @Date 2024/11/6 9 * @Date 2024/11/6
9 */ 10 */
10 @Data 11 @Data
11 -public class ConsignmentInfoQuery { 12 +public class UserConsignmentInfoQuery {
12 //用户id 13 //用户id
13 private Long userId; 14 private Long userId;
14 //用户uuid 15 //用户uuid
15 private String userUuid; 16 private String userUuid;
16 //运单id 17 //运单id
17 private Long consignmentId; 18 private Long consignmentId;
19 +
20 + /**
21 + * @Author mt
22 + * @Description 实例化查询对象
23 + * @Date 2024/11/8
24 + * @param user
25 + * @param consignmentId
26 + * @return com.fedex.connect.customer.data.query.UserConsignmentInfoQuery
27 + */
28 + public static UserConsignmentInfoQuery getInstance(User user,Long consignmentId){
29 + UserConsignmentInfoQuery userConsignmentInfoQuery = new UserConsignmentInfoQuery();
30 + userConsignmentInfoQuery.setUserId(user.getId());
31 + userConsignmentInfoQuery.setUserUuid(user.getUserUuid());
32 + userConsignmentInfoQuery.setConsignmentId(consignmentId);
33 + return userConsignmentInfoQuery;
34 + }
18 } 35 }
......
1 package com.fedex.connect.customer.repository.dao; 1 package com.fedex.connect.customer.repository.dao;
2 2
3 +import com.fedex.connect.common.model.biz.Attachment;
3 import com.fedex.connect.customer.data.dto.AttachmentHistoryDto; 4 import com.fedex.connect.customer.data.dto.AttachmentHistoryDto;
5 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
4 import org.apache.ibatis.annotations.Mapper; 6 import org.apache.ibatis.annotations.Mapper;
5 import org.apache.ibatis.annotations.Param; 7 import org.apache.ibatis.annotations.Param;
8 +import org.apache.ibatis.annotations.Select;
6 9
7 import java.util.List; 10 import java.util.List;
8 11
9 @Mapper 12 @Mapper
10 public interface AttachmentExtMapper { 13 public interface AttachmentExtMapper {
11 List<AttachmentHistoryDto> findHistory(@Param("bizId") Long bizId); 14 List<AttachmentHistoryDto> findHistory(@Param("bizId") Long bizId);
15 +
16 + @Select("SELECT * FROM T_BIZ_ATTACHMENT WHERE UPLOAD_RECORD_ID = " +
17 + "(SELECT MAX(ID) FROM T_BIZ_UPLOAD_RECORD WHERE CREATE_USER_ID = #{query.userId} " +
18 + "AND CONSIGNMENT_ID = #{query.consignmentId}) AND STATUS = 1")
19 + Attachment queryInfo(@Param("query") UserConsignmentInfoQuery query);
12 } 20 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,7 +2,7 @@ package com.fedex.connect.customer.repository.dao; ...@@ -2,7 +2,7 @@ package com.fedex.connect.customer.repository.dao;
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.customer.data.dto.FindConsignmentsDto; 4 import com.fedex.connect.customer.data.dto.FindConsignmentsDto;
5 -import com.fedex.connect.customer.data.query.ConsignmentInfoQuery; 5 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
6 import com.fedex.connect.customer.data.query.ConsignmentQuery; 6 import com.fedex.connect.customer.data.query.ConsignmentQuery;
7 import org.apache.ibatis.annotations.Mapper; 7 import org.apache.ibatis.annotations.Mapper;
8 import org.apache.ibatis.annotations.Param; 8 import org.apache.ibatis.annotations.Param;
...@@ -26,5 +26,5 @@ public interface ConsignmentExtMapper { ...@@ -26,5 +26,5 @@ public interface ConsignmentExtMapper {
26 26
27 @Select("SELECT BC.* FROM T_BIZ_CONSIGNMENT BC INNER JOIN T_BIZ_USER_CONSIGNMENT_MAPPING BUCM ON(BC.ID = BUCM.CONSIGNMENT_ID) " + 27 @Select("SELECT BC.* FROM T_BIZ_CONSIGNMENT BC INNER JOIN T_BIZ_USER_CONSIGNMENT_MAPPING BUCM ON(BC.ID = BUCM.CONSIGNMENT_ID) " +
28 "WHERE BC.ID = #{query.consignmentId} AND (BC.USER_UUID = #{query.userUuid} AND BUCM.USER_ID = #{query.userId})") 28 "WHERE BC.ID = #{query.consignmentId} AND (BC.USER_UUID = #{query.userUuid} AND BUCM.USER_ID = #{query.userId})")
29 - Consignment findConsignmentInfo(@Param("query") ConsignmentInfoQuery query); 29 + Consignment findConsignmentInfo(@Param("query") UserConsignmentInfoQuery query);
30 } 30 }
......
1 +package com.fedex.connect.customer.repository.dao;
2 +
3 +import org.apache.ibatis.annotations.Mapper;
4 +
5 +@Mapper
6 +public interface UploadRecordExtMapper {
7 +}
...@@ -413,6 +413,6 @@ ...@@ -413,6 +413,6 @@
413 ON 413 ON
414 a.BIZ_ID = c.ID 414 a.BIZ_ID = c.ID
415 WHERE 415 WHERE
416 - c.ID = #{bizId} 416 + c.ID = #{consignmentId}
417 </select> 417 </select>
418 </mapper> 418 </mapper>
...\ No newline at end of file ...\ No newline at end of file
......
1 package com.fedex.connect.customer.repository.repo; 1 package com.fedex.connect.customer.repository.repo;
2 2
3 +import com.fedex.connect.common.model.biz.Attachment;
3 import com.fedex.connect.customer.data.dto.AttachmentHistoryDto; 4 import com.fedex.connect.customer.data.dto.AttachmentHistoryDto;
5 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
4 6
5 import java.util.List; 7 import java.util.List;
6 8
7 -public interface IAttachmentExtRepository { 9 +public interface IAttachmentRepository {
8 List<AttachmentHistoryDto> findHistory(Long bizId); 10 List<AttachmentHistoryDto> findHistory(Long bizId);
11 +
12 + Attachment queryInfo(UserConsignmentInfoQuery userConsignmentInfoQuery);
9 } 13 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,17 +2,17 @@ package com.fedex.connect.customer.repository.repo; ...@@ -2,17 +2,17 @@ package com.fedex.connect.customer.repository.repo;
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.customer.data.dto.FindConsignmentsDto; 4 import com.fedex.connect.customer.data.dto.FindConsignmentsDto;
5 -import com.fedex.connect.customer.data.query.ConsignmentInfoQuery; 5 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
6 import com.fedex.connect.customer.data.query.ConsignmentQuery; 6 import com.fedex.connect.customer.data.query.ConsignmentQuery;
7 7
8 import java.util.List; 8 import java.util.List;
9 9
10 -public interface IConsignmentExtRepository { 10 +public interface IConsignmentRepository {
11 List<FindConsignmentsDto> findConsignments(ConsignmentQuery query); 11 List<FindConsignmentsDto> findConsignments(ConsignmentQuery query);
12 12
13 Long findAllCount(ConsignmentQuery query); 13 Long findAllCount(ConsignmentQuery query);
14 14
15 Consignment findByConsignmentCode(String consignmentCode); 15 Consignment findByConsignmentCode(String consignmentCode);
16 16
17 - Consignment findConsignmentInfo(ConsignmentInfoQuery consignmentInfoQuery); 17 + Consignment findConsignmentInfo(UserConsignmentInfoQuery consignmentInfoQuery);
18 } 18 }
......
1 +package com.fedex.connect.customer.repository.repo;
2 +
3 +public interface IUploadRecordRepository {
4 +
5 +}
1 -package com.fedex.connect.customer.repository.repo.impl;
2 -
3 -import com.fedex.connect.customer.data.dto.AttachmentHistoryDto;
4 -import com.fedex.connect.customer.repository.base.BaseDao;
5 -import com.fedex.connect.customer.repository.repo.IAttachmentExtRepository;
6 -import org.springframework.stereotype.Repository;
7 -
8 -import java.util.List;
9 -
10 -@Repository
11 -public class AttachmentExtRepositoryImpl extends BaseDao implements IAttachmentExtRepository {
12 - @Override
13 - public List<AttachmentHistoryDto> findHistory(Long bizId) {
14 - return attachmentExtMapper.findHistory(bizId);
15 - }
16 -}
1 +package com.fedex.connect.customer.repository.repo.impl;
2 +
3 +import com.fedex.connect.common.model.biz.Attachment;
4 +import com.fedex.connect.customer.data.dto.AttachmentHistoryDto;
5 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
6 +import com.fedex.connect.customer.repository.base.BaseDao;
7 +import com.fedex.connect.customer.repository.repo.IAttachmentRepository;
8 +import org.springframework.stereotype.Repository;
9 +
10 +import java.util.List;
11 +
12 +@Repository
13 +public class AttachmentRepositoryImpl extends BaseDao implements IAttachmentRepository {
14 + @Override
15 + public List<AttachmentHistoryDto> findHistory(Long consignmentId) {
16 + return attachmentExtMapper.findHistory(consignmentId);
17 + }
18 +
19 + /**
20 + * @Author mt
21 + * @Description 根据运单ID查询用户上传记录
22 + * @Date 2024/11/8
23 + * @param userConsignmentInfoQuery
24 + * @return com.fedex.connect.common.model.biz.Attachment
25 + */
26 + @Override
27 + public Attachment queryInfo(UserConsignmentInfoQuery userConsignmentInfoQuery){
28 + return attachmentExtMapper.queryInfo(userConsignmentInfoQuery);
29 + }
30 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -2,16 +2,16 @@ package com.fedex.connect.customer.repository.repo.impl; ...@@ -2,16 +2,16 @@ package com.fedex.connect.customer.repository.repo.impl;
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.customer.data.dto.FindConsignmentsDto; 4 import com.fedex.connect.customer.data.dto.FindConsignmentsDto;
5 -import com.fedex.connect.customer.data.query.ConsignmentInfoQuery; 5 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
6 import com.fedex.connect.customer.data.query.ConsignmentQuery; 6 import com.fedex.connect.customer.data.query.ConsignmentQuery;
7 import com.fedex.connect.customer.repository.base.BaseDao; 7 import com.fedex.connect.customer.repository.base.BaseDao;
8 -import com.fedex.connect.customer.repository.repo.IConsignmentExtRepository; 8 +import com.fedex.connect.customer.repository.repo.IConsignmentRepository;
9 import org.springframework.stereotype.Repository; 9 import org.springframework.stereotype.Repository;
10 10
11 import java.util.List; 11 import java.util.List;
12 12
13 @Repository 13 @Repository
14 -public class ConsignmentExtRepositoryImpl extends BaseDao implements IConsignmentExtRepository { 14 +public class ConsignmentRepositoryImpl extends BaseDao implements IConsignmentRepository {
15 15
16 @Override 16 @Override
17 public List<FindConsignmentsDto> findConsignments(ConsignmentQuery query) { 17 public List<FindConsignmentsDto> findConsignments(ConsignmentQuery query) {
...@@ -28,7 +28,7 @@ public class ConsignmentExtRepositoryImpl extends BaseDao implements IConsignmen ...@@ -28,7 +28,7 @@ public class ConsignmentExtRepositoryImpl extends BaseDao implements IConsignmen
28 return consignmentExtMapper.findByConsignmentCode(consignmentCode); 28 return consignmentExtMapper.findByConsignmentCode(consignmentCode);
29 } 29 }
30 30
31 - public Consignment findConsignmentInfo(ConsignmentInfoQuery consignmentInfoQuery){ 31 + public Consignment findConsignmentInfo(UserConsignmentInfoQuery userConsignmentInfoQuery){
32 - return consignmentExtMapper.findConsignmentInfo(consignmentInfoQuery); 32 + return consignmentExtMapper.findConsignmentInfo(userConsignmentInfoQuery);
33 } 33 }
34 } 34 }
......
1 +package com.fedex.connect.customer.repository.repo.impl;
2 +
3 +import com.fedex.connect.customer.repository.base.BaseDao;
4 +import com.fedex.connect.customer.repository.repo.IUploadRecordRepository;
5 +import org.springframework.stereotype.Repository;
6 +
7 +@Repository
8 +public class UploadRecordRepositoryImpl extends BaseDao implements IUploadRecordRepository {
9 +
10 +}
1 package com.fedex.connect.customer.service.base; 1 package com.fedex.connect.customer.service.base;
2 2
3 -
4 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; 3 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
5 -import com.fedex.connect.customer.repository.repo.IAttachmentExtRepository; 4 +import com.fedex.connect.customer.repository.repo.IAttachmentRepository;
6 -import com.fedex.connect.customer.repository.repo.IConsignmentExtRepository; 5 +import com.fedex.connect.customer.repository.repo.IConsignmentRepository;
6 +import com.fedex.connect.customer.repository.repo.IUploadRecordRepository;
7 import org.springframework.beans.factory.annotation.Autowired; 7 import org.springframework.beans.factory.annotation.Autowired;
8 -
9 import javax.annotation.Resource; 8 import javax.annotation.Resource;
10 9
11 public class BaseService { 10 public class BaseService {
...@@ -14,23 +13,11 @@ public class BaseService { ...@@ -14,23 +13,11 @@ public class BaseService {
14 protected LocaleMessageUtil localeMessageUtil; 13 protected LocaleMessageUtil localeMessageUtil;
15 14
16 @Autowired 15 @Autowired
17 - protected IConsignmentExtRepository consignmentExtRepository; 16 + protected IConsignmentRepository consignmentRepository;
18 17
19 @Autowired 18 @Autowired
20 - protected IAttachmentExtRepository attachmentRepository; 19 + protected IAttachmentRepository attachmentRepository;
21 -
22 - /**
23 - * repository
24 - */
25 -
26 -
27 - /**
28 - * Mapper---------------------------------------------
29 - */
30 -
31 -
32 - /**
33 - * MapperExt---------------------------------------------
34 - */
35 20
21 + @Autowired
22 + protected IUploadRecordRepository uploadRecordRepository;
36 } 23 }
...\ No newline at end of file ...\ No newline at end of file
......
1 package com.fedex.connect.customer.service.biz; 1 package com.fedex.connect.customer.service.biz;
2 2
3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
4 5
5 public interface IAttachmentQueryService { 6 public interface IAttachmentQueryService {
6 - ResponseVo findHistory(Long userId, Long bizId); 7 + ResponseVo queryInfo(UserConsignmentInfoQuery userConsignmentInfoQuery);
7 } 8 }
......
1 package com.fedex.connect.customer.service.biz; 1 package com.fedex.connect.customer.service.biz;
2 2
3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 -import com.fedex.connect.customer.data.query.ConsignmentInfoQuery; 4 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
5 import com.fedex.connect.customer.data.query.ConsignmentQuery; 5 import com.fedex.connect.customer.data.query.ConsignmentQuery;
6 6
7 public interface IConsignmentQueryService { 7 public interface IConsignmentQueryService {
...@@ -18,8 +18,8 @@ public interface IConsignmentQueryService { ...@@ -18,8 +18,8 @@ public interface IConsignmentQueryService {
18 * @Author mt 18 * @Author mt
19 * @Description 运单信息查询 19 * @Description 运单信息查询
20 * @Date 2024/11/7 20 * @Date 2024/11/7
21 - * @param consignmentInfoQuery 21 + * @param userConsignmentInfoQuery
22 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo 22 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
23 */ 23 */
24 - ResponseVo findConsignmentInfo(ConsignmentInfoQuery consignmentInfoQuery); 24 + ResponseVo findConsignmentInfo(UserConsignmentInfoQuery userConsignmentInfoQuery);
25 } 25 }
......
...@@ -2,7 +2,7 @@ package com.fedex.connect.customer.service.biz; ...@@ -2,7 +2,7 @@ package com.fedex.connect.customer.service.biz;
2 2
3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 import com.fedex.connect.common.model.sys.User; 4 import com.fedex.connect.common.model.sys.User;
5 -import com.fedex.connect.customer.data.bo.AddBo; 5 +import com.fedex.connect.customer.data.bo.ConsignmentBo;
6 6
7 public interface IConsignmentService { 7 public interface IConsignmentService {
8 8
...@@ -14,5 +14,5 @@ public interface IConsignmentService { ...@@ -14,5 +14,5 @@ public interface IConsignmentService {
14 * @param user 14 * @param user
15 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo 15 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
16 */ 16 */
17 - ResponseVo add(AddBo bo, User user); 17 + ResponseVo add(ConsignmentBo bo, User user);
18 } 18 }
......
1 +package com.fedex.connect.customer.service.biz;
2 +
3 +import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
5 +
6 +public interface IUploadRecordService {
7 + ResponseVo findHistory(UserConsignmentInfoQuery userConsignmentInfoQuery);
8 +}
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;
4 -import com.fedex.connect.common.dependencies.date.vo.PageResult;
5 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
6 -import com.fedex.connect.customer.data.dto.AttachmentHistoryDto; 4 +import com.fedex.connect.common.model.biz.Attachment;
5 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
7 import com.fedex.connect.customer.service.base.BaseService; 6 import com.fedex.connect.customer.service.base.BaseService;
8 import com.fedex.connect.customer.service.biz.IAttachmentQueryService; 7 import com.fedex.connect.customer.service.biz.IAttachmentQueryService;
9 import org.springframework.stereotype.Service; 8 import org.springframework.stereotype.Service;
10 9
11 -import java.util.Collections;
12 -import java.util.List;
13 -
14 /** 10 /**
15 * @Author Szl 11 * @Author Szl
16 * @Description 类说明 附件查询相关service 12 * @Description 类说明 附件查询相关service
...@@ -18,31 +14,16 @@ import java.util.List; ...@@ -18,31 +14,16 @@ import java.util.List;
18 */ 14 */
19 @Service 15 @Service
20 public class AttachmentQueryServiceImpl extends BaseService implements IAttachmentQueryService { 16 public class AttachmentQueryServiceImpl extends BaseService implements IAttachmentQueryService {
17 +
21 /** 18 /**
22 - * @Author Szl 19 + * @Author mt
23 - * @Description 功能说明 查询该运单历史数据 20 + * @Description 根据运单ID查询用户上传记录
24 - * @Date 2024/11/5 21 + * @Date 2024/11/8
25 - * @param userId 22 + * @param userConsignmentInfoQuery
26 - * @param bizId
27 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo 23 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
28 */ 24 */
29 - public ResponseVo findHistory(Long userId, Long bizId) { 25 + public ResponseVo queryInfo(UserConsignmentInfoQuery userConsignmentInfoQuery){
30 - List<AttachmentHistoryDto> history = attachmentRepository.findHistory(bizId); 26 + Attachment attachment = attachmentRepository.queryInfo(userConsignmentInfoQuery);
31 - 27 + return ResponseVo.succ(attachment);
32 - if (history != null) {
33 - history.forEach(attachmentHistoryDto ->
34 - attachmentHistoryDto.setCreatorFlag(
35 - (attachmentHistoryDto.getUploadUserId() != null &&
36 - attachmentHistoryDto.getUploadUserId().equals(userId)) ?
37 - DigitConstants.DIGIT_ONE : DigitConstants.DIGIT_ZERO
38 - )
39 - );
40 } 28 }
41 -
42 - PageResult pageResult = new PageResult();
43 - pageResult.setList(history != null ? history : Collections.emptyList());
44 -
45 - return ResponseVo.succ(pageResult);
46 - }
47 -
48 } 29 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -6,7 +6,7 @@ import com.fedex.connect.common.dependencies.date.vo.ResponseVo; ...@@ -6,7 +6,7 @@ import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
6 import com.fedex.connect.common.dependencies.util.Utils; 6 import com.fedex.connect.common.dependencies.util.Utils;
7 import com.fedex.connect.common.model.biz.Consignment; 7 import com.fedex.connect.common.model.biz.Consignment;
8 import com.fedex.connect.customer.data.dto.FindConsignmentsDto; 8 import com.fedex.connect.customer.data.dto.FindConsignmentsDto;
9 -import com.fedex.connect.customer.data.query.ConsignmentInfoQuery; 9 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
10 import com.fedex.connect.customer.data.query.ConsignmentQuery; 10 import com.fedex.connect.customer.data.query.ConsignmentQuery;
11 import com.fedex.connect.customer.service.base.BaseService; 11 import com.fedex.connect.customer.service.base.BaseService;
12 import com.fedex.connect.customer.service.biz.IConsignmentQueryService; 12 import com.fedex.connect.customer.service.biz.IConsignmentQueryService;
...@@ -36,14 +36,14 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign ...@@ -36,14 +36,14 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign
36 } 36 }
37 37
38 //查询数量 38 //查询数量
39 - Long total = consignmentExtRepository.findAllCount(query); 39 + Long total = consignmentRepository.findAllCount(query);
40 40
41 PageResult pageResult = new PageResult(); 41 PageResult pageResult = new PageResult();
42 pageResult.setTotal(total); 42 pageResult.setTotal(total);
43 pageResult.setPage(query.getPage()); 43 pageResult.setPage(query.getPage());
44 pageResult.setSize(query.getSize()); 44 pageResult.setSize(query.getSize());
45 if (total != null && total > 0) { 45 if (total != null && total > 0) {
46 - List<FindConsignmentsDto> consignments = consignmentExtRepository.findConsignments(query); 46 + List<FindConsignmentsDto> consignments = consignmentRepository.findConsignments(query);
47 pageResult.setList(consignments); 47 pageResult.setList(consignments);
48 } 48 }
49 return ResponseVo.succ(pageResult); 49 return ResponseVo.succ(pageResult);
...@@ -55,12 +55,12 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign ...@@ -55,12 +55,12 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign
55 * 如果运单UUID与登录账号UUID相同,则显示运单、收发件人信息 55 * 如果运单UUID与登录账号UUID相同,则显示运单、收发件人信息
56 * 如果运单UUID与登录账号UUID不同,则只显示 运单号、shipperAccount、始发国、目的国 56 * 如果运单UUID与登录账号UUID不同,则只显示 运单号、shipperAccount、始发国、目的国
57 * @Date 2024/11/7 57 * @Date 2024/11/7
58 - * @param consignmentInfoQuery 58 + * @param userConsignmentInfoQuery
59 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo 59 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
60 */ 60 */
61 - public ResponseVo findConsignmentInfo(ConsignmentInfoQuery consignmentInfoQuery){ 61 + public ResponseVo findConsignmentInfo(UserConsignmentInfoQuery userConsignmentInfoQuery){
62 - Consignment consignment = consignmentExtRepository.findConsignmentInfo(consignmentInfoQuery); 62 + Consignment consignment = consignmentRepository.findConsignmentInfo(userConsignmentInfoQuery);
63 - if(Objects.nonNull(consignment) && !consignment.getUserUuid().equals(consignmentInfoQuery.getUserUuid())){ 63 + if(Objects.nonNull(consignment) && !consignment.getUserUuid().equals(userConsignmentInfoQuery.getUserUuid())){
64 Consignment consignmentTemp = new Consignment(); 64 Consignment consignmentTemp = new Consignment();
65 consignmentTemp.setId(consignment.getId()); 65 consignmentTemp.setId(consignment.getId());
66 consignmentTemp.setConsignmentCode(consignment.getConsignmentCode()); 66 consignmentTemp.setConsignmentCode(consignment.getConsignmentCode());
......
...@@ -3,7 +3,7 @@ package com.fedex.connect.customer.service.biz.impl; ...@@ -3,7 +3,7 @@ package com.fedex.connect.customer.service.biz.impl;
3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 import com.fedex.connect.common.model.biz.Consignment; 4 import com.fedex.connect.common.model.biz.Consignment;
5 import com.fedex.connect.common.model.sys.User; 5 import com.fedex.connect.common.model.sys.User;
6 -import com.fedex.connect.customer.data.bo.AddBo; 6 +import com.fedex.connect.customer.data.bo.ConsignmentBo;
7 import com.fedex.connect.customer.service.base.BaseService; 7 import com.fedex.connect.customer.service.base.BaseService;
8 import com.fedex.connect.customer.service.biz.IConsignmentService; 8 import com.fedex.connect.customer.service.biz.IConsignmentService;
9 import com.fedex.connect.customer.util.service.biz.ConsignmentUtil; 9 import com.fedex.connect.customer.util.service.biz.ConsignmentUtil;
...@@ -29,9 +29,9 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS ...@@ -29,9 +29,9 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
29 * @param user 29 * @param user
30 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo 30 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
31 */ 31 */
32 - public ResponseVo add(AddBo bo, User user){ 32 + public ResponseVo add(ConsignmentBo bo, User user){
33 //查询运单表是否存在已提交的运单 33 //查询运单表是否存在已提交的运单
34 - Consignment consignment = consignmentExtRepository.findByConsignmentCode(bo.getConsignmentCode()); 34 + Consignment consignment = consignmentRepository.findByConsignmentCode(bo.getConsignmentCode());
35 if (consignment != null && consignment.getId() != null){ 35 if (consignment != null && consignment.getId() != null){
36 //如果存在则进行bo基础校验 36 //如果存在则进行bo基础校验
37 ResponseVo responseResultVo = consignmentUtil.consignmentCreatorCheck(consignment,bo); 37 ResponseVo responseResultVo = consignmentUtil.consignmentCreatorCheck(consignment,bo);
......
1 +package com.fedex.connect.customer.service.biz.impl;
2 +
3 +import com.fedex.connect.common.dependencies.contants.DigitConstants;
4 +import com.fedex.connect.common.dependencies.date.vo.PageResult;
5 +import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
6 +import com.fedex.connect.customer.data.dto.AttachmentHistoryDto;
7 +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
8 +import com.fedex.connect.customer.service.base.BaseService;
9 +import com.fedex.connect.customer.service.biz.IAttachmentQueryService;
10 +import com.fedex.connect.customer.service.biz.IUploadRecordService;
11 +import org.springframework.stereotype.Service;
12 +
13 +import java.util.Collections;
14 +import java.util.List;
15 +
16 +/**
17 + * @Author Szl
18 + * @Description 类说明 附件查询相关service
19 + * @Date 2024/11/4
20 + */
21 +@Service
22 +public class UploadRecordServiceImpl extends BaseService implements IUploadRecordService {
23 +
24 + /**
25 + * @Author Szl
26 + * @Description 功能说明 查询该运单历史数据
27 + * @Date 2024/11/5
28 + * @param userConsignmentInfoQuery
29 + * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
30 + */
31 + public ResponseVo findHistory(UserConsignmentInfoQuery userConsignmentInfoQuery) {
32 + List<AttachmentHistoryDto> history = attachmentRepository.findHistory(userConsignmentInfoQuery.getConsignmentId());
33 +
34 + if (history != null) {
35 + history.forEach(attachmentHistoryDto ->
36 + attachmentHistoryDto.setCreatorFlag(
37 + (attachmentHistoryDto.getUploadUserId() != null &&
38 + attachmentHistoryDto.getUploadUserId().equals(userConsignmentInfoQuery.getUserId())) ?
39 + DigitConstants.DIGIT_ONE : DigitConstants.DIGIT_ZERO
40 + )
41 + );
42 + }
43 +
44 + PageResult pageResult = new PageResult();
45 + pageResult.setList(history != null ? history : Collections.emptyList());
46 +
47 + return ResponseVo.succ(pageResult);
48 + }
49 +}
...@@ -6,7 +6,7 @@ import com.fedex.connect.common.dependencies.enums.BaseResponseCode; ...@@ -6,7 +6,7 @@ import com.fedex.connect.common.dependencies.enums.BaseResponseCode;
6 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; 6 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
7 import com.fedex.connect.common.model.biz.Consignment; 7 import com.fedex.connect.common.model.biz.Consignment;
8 import com.fedex.connect.common.model.sys.User; 8 import com.fedex.connect.common.model.sys.User;
9 -import com.fedex.connect.customer.data.bo.AddBo; 9 +import com.fedex.connect.customer.data.bo.ConsignmentBo;
10 import com.fedex.connect.customer.data.dto.ConsignmentAddDto; 10 import com.fedex.connect.customer.data.dto.ConsignmentAddDto;
11 import org.springframework.beans.factory.annotation.Autowired; 11 import org.springframework.beans.factory.annotation.Autowired;
12 import org.springframework.stereotype.Component; 12 import org.springframework.stereotype.Component;
...@@ -31,7 +31,7 @@ public class ConsignmentUtil { ...@@ -31,7 +31,7 @@ public class ConsignmentUtil {
31 * @param consignment 31 * @param consignment
32 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo 32 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
33 */ 33 */
34 - public ResponseVo consignmentCreatorCheck(Consignment consignment, AddBo bo) { 34 + public ResponseVo consignmentCreatorCheck(Consignment consignment, ConsignmentBo bo) {
35 List<String> errList = new ArrayList<>(); 35 List<String> errList = new ArrayList<>();
36 36
37 // 校验字段是否匹配,并将错误信息添加到errList中 37 // 校验字段是否匹配,并将错误信息添加到errList中
......
1 package com.fedex.connect.customer.validate.controller.biz; 1 package com.fedex.connect.customer.validate.controller.biz;
2 2
3 -import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 -import com.fedex.connect.common.dependencies.enums.BaseResponseCode;
5 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; 3 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
6 -import com.fedex.connect.customer.data.bo.LongBo;
7 import org.springframework.beans.factory.annotation.Autowired; 4 import org.springframework.beans.factory.annotation.Autowired;
8 import org.springframework.stereotype.Component; 5 import org.springframework.stereotype.Component;
9 6
...@@ -17,17 +14,4 @@ public class AttachmentValidate { ...@@ -17,17 +14,4 @@ public class AttachmentValidate {
17 @Autowired 14 @Autowired
18 protected LocaleMessageUtil localeMessageUtil; 15 protected LocaleMessageUtil localeMessageUtil;
19 16
20 - /**
21 - * @Author Szl
22 - * @Description 功能说明 历史数据输入校验
23 - * @Date 2024/11/5
24 - * @param bo
25 - * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
26 - */
27 - public ResponseVo preCheckForFindHistory(LongBo bo){
28 - if (bo == null || bo.getId() == null){
29 - return ResponseVo.fail(localeMessageUtil.getMessage(BaseResponseCode.REQUEST_PARAM_NULL.getMsg()));
30 - }
31 - return null;
32 - }
33 } 17 }
......
...@@ -3,7 +3,7 @@ package com.fedex.connect.customer.validate.controller.biz; ...@@ -3,7 +3,7 @@ package com.fedex.connect.customer.validate.controller.biz;
3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo; 3 import com.fedex.connect.common.dependencies.date.vo.ResponseVo;
4 import com.fedex.connect.common.dependencies.enums.BaseResponseCode; 4 import com.fedex.connect.common.dependencies.enums.BaseResponseCode;
5 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; 5 import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil;
6 -import com.fedex.connect.customer.data.bo.AddBo; 6 +import com.fedex.connect.customer.data.bo.ConsignmentBo;
7 import org.springframework.beans.factory.annotation.Autowired; 7 import org.springframework.beans.factory.annotation.Autowired;
8 import org.springframework.stereotype.Component; 8 import org.springframework.stereotype.Component;
9 import org.springframework.util.StringUtils; 9 import org.springframework.util.StringUtils;
...@@ -25,10 +25,10 @@ public class ConsignmentValidate { ...@@ -25,10 +25,10 @@ public class ConsignmentValidate {
25 * @param bo 25 * @param bo
26 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo 26 * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo
27 */ 27 */
28 - public ResponseVo preCheckAdd(AddBo bo){ 28 + public ResponseVo preCheckAdd(ConsignmentBo bo){
29 if (bo == null || StringUtils.isEmpty(bo.getConsignmentCode()) || 29 if (bo == null || StringUtils.isEmpty(bo.getConsignmentCode()) ||
30 - StringUtils.isEmpty(bo.getRecipientCountry()) || StringUtils.isEmpty(bo.getShipperAccount()) || 30 + StringUtils.isEmpty(bo.getOriginCountryCode()) || StringUtils.isEmpty(bo.getShipperAccount()) ||
31 - StringUtils.isEmpty(bo.getShipperCountry())){ 31 + StringUtils.isEmpty(bo.getDestinationCountryCode())){
32 return ResponseVo.fail(localeMessageUtil.getMessage(BaseResponseCode.REQUEST_PARAM_NULL.getMsg())); 32 return ResponseVo.fail(localeMessageUtil.getMessage(BaseResponseCode.REQUEST_PARAM_NULL.getMsg()));
33 } 33 }
34 return null; 34 return null;
......
1 -conl_cus_declare_count_max=單次最多可查詢1000個運單號碼 1 +#******************系统操作日志记录,中文展示******************
2 +con_add_oper=添加运单
3 +con_submit_oper=提交运单
4 +config_aspect_length_error=提示信息过长,未保存成功
2 5
6 +#******************鉴权相关提示,需要做国际化******************
3 #authentication包 7 #authentication包
4 -auth_exc_no_auth=沒有訪問許可權 8 +auth_exc_no_auth=没有访问权限
5 -auth_exc_no_pass_auth=沒有通過許可權認證 9 +auth_exc_no_pass_auth=没有通过权限认证
6 -auth_filter_user_error=登錄身份異常 10 +auth_filter_user_error=登录身份异常
7 -auth_filter_timeout=登錄超過8小時,請重新登錄 11 +auth_filter_timeout=登录超过8小时,请重新登录
8 -auth_filter_stale_dated=登錄已過期 12 +auth_filter_stale_dated=登录已过期
9 - 13 +enum_res_code_301=登录身份异常
10 -enum_res_code_301=登錄身份異常 14 +enum_res_code_305=登录已过期,请重新登录
11 -enum_res_code_305=登錄已過期,請重新登錄
12 15
16 +#******************业务相关、需要做国际化******************
13 enum_res_code_601=不正确,请重新输入 17 enum_res_code_601=不正确,请重新输入
14 enum_res_code_602=The waybill you entered is generated by another user, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation. 18 enum_res_code_602=The waybill you entered is generated by another user, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
15 enum_res_code_603=The waybill you entered is generated by another account, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation. 19 enum_res_code_603=The waybill you entered is generated by another account, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
16 20
21 +conl_cus_declare_count_max=單次最多可查詢1000個運單號碼
22 +
17 con_shipperAccount=发货人计费账号 23 con_shipperAccount=发货人计费账号
18 con_shipperCountry=始发国 24 con_shipperCountry=始发国
19 con_recipientCountry=目的国 25 con_recipientCountry=目的国
20 -
21 -con_add_oper=添加运单
...\ No newline at end of file ...\ No newline at end of file
......
1 -conl_cus_declare_count_max=單次最多可查詢1000個運單號碼 1 +#******************系统操作日志记录,中文展示******************
2 +con_add_oper=添加运单
3 +con_submit_oper=提交运单
4 +config_aspect_length_error=提示信息过长,未保存成功
2 5
6 +#******************鉴权相关提示,需要做国际化******************
3 #authentication包 7 #authentication包
4 -auth_exc_no_auth=沒有訪問許可權 8 +auth_exc_no_auth=没有访问权限
5 -auth_exc_no_pass_auth=沒有通過許可權認證 9 +auth_exc_no_pass_auth=没有通过权限认证
6 -auth_filter_user_error=登錄身份異常 10 +auth_filter_user_error=登录身份异常
7 -auth_filter_timeout=登錄超過8小時,請重新登錄 11 +auth_filter_timeout=登录超过8小时,请重新登录
8 -auth_filter_stale_dated=登錄已過期 12 +auth_filter_stale_dated=登录已过期
9 - 13 +enum_res_code_301=登录身份异常
10 -enum_res_code_301=登錄身份異常 14 +enum_res_code_305=登录已过期,请重新登录
11 -enum_res_code_305=登錄已過期,請重新登錄
12 15
16 +#******************业务相关、需要做国际化******************
13 enum_res_code_601=不正确,请重新输入 17 enum_res_code_601=不正确,请重新输入
14 enum_res_code_602=The waybill you entered is generated by another user, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation. 18 enum_res_code_602=The waybill you entered is generated by another user, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
15 enum_res_code_603=The waybill you entered is generated by another account, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation. 19 enum_res_code_603=The waybill you entered is generated by another account, whether continue uploading? Confirm, Cancel. No more prompts in the future for the same situation.
16 20
21 +conl_cus_declare_count_max=單次最多可查詢1000個運單號碼
22 +
17 con_shipperAccount=发货人计费账号 23 con_shipperAccount=发货人计费账号
18 con_shipperCountry=始发国 24 con_shipperCountry=始发国
19 con_recipientCountry=目的国 25 con_recipientCountry=目的国
20 -
21 -con_add_oper=添加运单
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -32,5 +32,12 @@ public interface BaseConstants { ...@@ -32,5 +32,12 @@ public interface BaseConstants {
32 String SHIPPER_ACCOUNT = "shipperAccount"; 32 String SHIPPER_ACCOUNT = "shipperAccount";
33 //目的国全称 33 //目的国全称
34 String DESTINATION_COUNTRY = "destinationCountry"; 34 String DESTINATION_COUNTRY = "destinationCountry";
35 + //用户录入发货人计费账号
36 + String USER_INPUT_SHIPPER_ACCOUNT = "userInputShipperAccount";
37 + //用户录入原产国全称ID,
38 + //关联数据字典表。指定字典目录CODE:COUNTRY
39 + String USER_INPUT_ORIGIN_COUNTRY_CODE = "userInputOriginCountryCode";
40 + //用户录入原产国全称
41 + String USER_INPUT_ORIGIN_COUNTRY = "userInputOriginCountry";
35 } 42 }
36 } 43 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -51,10 +51,9 @@ public interface Constant { ...@@ -51,10 +51,9 @@ public interface Constant {
51 //ceInfo转换为consignment忽略字段 51 //ceInfo转换为consignment忽略字段
52 interface CE_CONSIGNMENT_COPY_IGNORE_PROP_KEYS{ 52 interface CE_CONSIGNMENT_COPY_IGNORE_PROP_KEYS{
53 String[] IGNORE_PROPERTIES = { 53 String[] IGNORE_PROPERTIES = {
54 - BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.SHIP_DATE, 54 + BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.USER_INPUT_SHIPPER_ACCOUNT,
55 - BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.ORIGIN_COUNTRY, 55 + BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.USER_INPUT_ORIGIN_COUNTRY_ID,
56 - BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.SHIPPER_ACCOUNT, 56 + BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.USER_INPUT_ORIGIN_COUNTRY,
57 - BaseConstants.CONSIGNMENT_TABLE_COLUMN_KEYS.DESTINATION_COUNTRY,
58 BaseConstants.BASE_TABLE_COLUMN_KEYS.CREATE_TIME, 57 BaseConstants.BASE_TABLE_COLUMN_KEYS.CREATE_TIME,
59 BaseConstants.BASE_TABLE_COLUMN_KEYS.CREATE_USER_ID, 58 BaseConstants.BASE_TABLE_COLUMN_KEYS.CREATE_USER_ID,
60 BaseConstants.BASE_TABLE_COLUMN_KEYS.CREATE_USER_NAME, 59 BaseConstants.BASE_TABLE_COLUMN_KEYS.CREATE_USER_NAME,
......
...@@ -28,7 +28,7 @@ public class KafkaController extends BaseController implements IKafkaController ...@@ -28,7 +28,7 @@ public class KafkaController extends BaseController implements IKafkaController
28 private String env; 28 private String env;
29 29
30 @PostMapping("/rpcKafkaReceive") 30 @PostMapping("/rpcKafkaReceive")
31 - @ApiOperation(value = "重新消费dm报文", notes = "重新消费dm报文") 31 + @ApiOperation(value = "void", notes = "重新消费dm报文")
32 public void rpcKafkaReceive(@RequestBody String json) { 32 public void rpcKafkaReceive(@RequestBody String json) {
33 //接收需要重新消费报文 33 //接收需要重新消费报文
34 Map<String, List<String>> map = JsonToJava.json2map(json); 34 Map<String, List<String>> map = JsonToJava.json2map(json);
...@@ -37,7 +37,7 @@ public class KafkaController extends BaseController implements IKafkaController ...@@ -37,7 +37,7 @@ public class KafkaController extends BaseController implements IKafkaController
37 } 37 }
38 38
39 @PostMapping("/sendDm501") 39 @PostMapping("/sendDm501")
40 - @ApiOperation(value = "发送DM501", notes = "发送DM501") 40 + @ApiOperation(value = "String", notes = "发送DM501")
41 public String sendDm001(@RequestBody String json) { 41 public String sendDm001(@RequestBody String json) {
42 String result = Constant.RESULT_KEYS.SUCCESS; 42 String result = Constant.RESULT_KEYS.SUCCESS;
43 try { 43 try {
...@@ -62,7 +62,7 @@ public class KafkaController extends BaseController implements IKafkaController ...@@ -62,7 +62,7 @@ public class KafkaController extends BaseController implements IKafkaController
62 } 62 }
63 63
64 @PostMapping("/sendDmJson") 64 @PostMapping("/sendDmJson")
65 - @ApiOperation(value = "发送kafka报文DmJson内容到kafka", notes = "发送kafka报文DmJson内容到kafka") 65 + @ApiOperation(value = "String", notes = "发送kafka报文DmJson内容到kafka")
66 public String sendDmJson(@RequestBody String json) { 66 public String sendDmJson(@RequestBody String json) {
67 String result = Constant.RESULT_KEYS.SUCCESS; 67 String result = Constant.RESULT_KEYS.SUCCESS;
68 try { 68 try {
......
...@@ -51,6 +51,10 @@ public class Dm501Consignments implements Serializable { ...@@ -51,6 +51,10 @@ public class Dm501Consignments implements Serializable {
51 String destIataCode; 51 String destIataCode;
52 //扫描状态日期 52 //扫描状态日期
53 Date scanDate; 53 Date scanDate;
54 + //用户uuid
55 + String uuid;
56 + //发件人邮箱
57 + String shipperEmail;
54 58
55 /** 59 /**
56 * @Author mt 60 * @Author mt
......
...@@ -107,6 +107,10 @@ public class Dm501Util { ...@@ -107,6 +107,10 @@ public class Dm501Util {
107 } 107 }
108 //重量单位 108 //重量单位
109 ceInfo.setWeightunit(dm501Consignment.getWeightUnit()); 109 ceInfo.setWeightunit(dm501Consignment.getWeightUnit());
110 + //用户uuid
111 + ceInfo.setUserUuid(dm501Consignment.getUuid());
112 + //发件人邮箱
113 + ceInfo.setShipperEmail(dm501Consignment.getShipperEmail());
110 /** 114 /**
111 * 初始化表基础字段 115 * 初始化表基础字段
112 */ 116 */
...@@ -122,16 +126,7 @@ public class Dm501Util { ...@@ -122,16 +126,7 @@ public class Dm501Util {
122 */ 126 */
123 private void generateCeInfoShipper(CeInfo ceInfo,Dm501ConAddresses shipperAddress){ 127 private void generateCeInfoShipper(CeInfo ceInfo,Dm501ConAddresses shipperAddress){
124 //发件人国家(二字码) 128 //发件人国家(二字码)
125 - String shipperCountry = shipperAddress.getCountry(); 129 + ceInfo.setShipperCountry(shipperAddress.getCountry());
126 - //始发国(二字码)
127 - ceInfo.setShipperCountry(shipperCountry);
128 - //根据发件人国家二字码获取字典
129 - DictionaryEntries shipperCountryEntries = cacheSystem.getDicCountryByExt1(shipperCountry);
130 - //根据二字码能获取到二字码则赋值始发国全称
131 - if(Objects.nonNull(shipperCountryEntries)){
132 - //原产国全称
133 - ceInfo.setOriginCountry(shipperCountryEntries.getEnglishName());
134 - }
135 //发货联系人姓名 130 //发货联系人姓名
136 ceInfo.setShipperContactName(shipperAddress.getContactName()); 131 ceInfo.setShipperContactName(shipperAddress.getContactName());
137 //发货人手机号 132 //发货人手机号
...@@ -158,17 +153,8 @@ public class Dm501Util { ...@@ -158,17 +153,8 @@ public class Dm501Util {
158 * @return void 153 * @return void
159 */ 154 */
160 private void generateCeInfoRecipient(CeInfo ceInfo,Dm501ConAddresses recipientAddress){ 155 private void generateCeInfoRecipient(CeInfo ceInfo,Dm501ConAddresses recipientAddress){
161 - //收件人国家 156 + //收件人国家(二字码)
162 - String recipientCountry = recipientAddress.getCountry(); 157 + ceInfo.setRecipientCountry(recipientAddress.getCountry());
163 -// //目的国家二字码
164 - ceInfo.setRecipientCountry(recipientCountry);
165 - //根据发件人国家二字码获取字典
166 - DictionaryEntries countryEntries = cacheSystem.getDicCountryByExt1(recipientCountry);
167 - //根据二字码能获取到二字码则赋值目的国全称
168 - if(Objects.nonNull(countryEntries)){
169 - //目的国全称
170 - ceInfo.setDestinationCountry(countryEntries.getEnglishName());
171 - }
172 //收件联系人姓名 158 //收件联系人姓名
173 ceInfo.setRecipientContactName(recipientAddress.getContactName()); 159 ceInfo.setRecipientContactName(recipientAddress.getContactName());
174 //收件人手机号 160 //收件人手机号
...@@ -205,7 +191,7 @@ public class Dm501Util { ...@@ -205,7 +191,7 @@ public class Dm501Util {
205 BeanUtils.copyProperties(ceInfo,resultConsignment); 191 BeanUtils.copyProperties(ceInfo,resultConsignment);
206 //运单状态赋值为"待上传" 192 //运单状态赋值为"待上传"
207 DictionaryEntries consignmentDicEntries = cacheSystem.getDicConsignmentStatus(ConsignmentStatusEnum.CONSIGNMENT_STATUS_01.getCode()); 193 DictionaryEntries consignmentDicEntries = cacheSystem.getDicConsignmentStatus(ConsignmentStatusEnum.CONSIGNMENT_STATUS_01.getCode());
208 - resultConsignment.setStatusId(consignmentDicEntries.getId()); 194 + resultConsignment.setStatusCode(consignmentDicEntries.getCode());
209 resultConsignment.setStatusName(consignmentDicEntries.getDescription()); 195 resultConsignment.setStatusName(consignmentDicEntries.getDescription());
210 /** 196 /**
211 * 初始化表基础字段 197 * 初始化表基础字段
...@@ -217,6 +203,24 @@ public class Dm501Util { ...@@ -217,6 +203,24 @@ public class Dm501Util {
217 String[] ignoreProperties = Constant.CE_CONSIGNMENT_COPY_IGNORE_PROP_KEYS.IGNORE_PROPERTIES; 203 String[] ignoreProperties = Constant.CE_CONSIGNMENT_COPY_IGNORE_PROP_KEYS.IGNORE_PROPERTIES;
218 //字段拷贝 204 //字段拷贝
219 BeanUtils.copyProperties(ceInfo,consignment,ignoreProperties); 205 BeanUtils.copyProperties(ceInfo,consignment,ignoreProperties);
206 + //根据发件人国家二字码获取字典
207 + DictionaryEntries shipperCountryEntries = cacheSystem.getDicCountryByExt1(ceInfo.getShipperCountry());
208 + //根据二字码能获取到二字码则赋值始发国全称
209 + if(Objects.nonNull(shipperCountryEntries)){
210 + //原产国全称CODE
211 + consignment.setOriginCountryCode(shipperCountryEntries.getCode());
212 + //原产国全称
213 + consignment.setOriginCountry(shipperCountryEntries.getEnglishName());
214 + }
215 + //根据发件人国家二字码获取字典
216 + DictionaryEntries countryEntries = cacheSystem.getDicCountryByExt1(ceInfo.getRecipientCountry());
217 + //根据二字码能获取到二字码则赋值目的国全称
218 + if(Objects.nonNull(countryEntries)){
219 + //目的国全称CODE
220 + consignment.setDestinationCountryCode(countryEntries.getCode());
221 + //目的国全称
222 + consignment.setDestinationCountry(countryEntries.getEnglishName());
223 + }
220 rsConsignment = consignment; 224 rsConsignment = consignment;
221 } 225 }
222 return rsConsignment; 226 return rsConsignment;
......
1 -#authentication包 1 +#******************系统操作日志记录,中文展示******************
2 -auth_exc_no_auth=沒有訪問許可權 2 +config_aspect_length_error=提示信息过长,未保存成功
3 -auth_exc_no_pass_auth=沒有通過許可權認證
4 -auth_filter_user_error=登錄身份異常
5 -auth_filter_timeout=登錄超過8小時,請重新登錄
6 -auth_filter_stale_dated=登錄已過期
7 3
8 -enum_res_code_301=登錄身份異常
9 -enum_res_code_305=登錄已過期,請重新登錄
...\ No newline at end of file ...\ No newline at end of file
4 +#******************鉴权相关提示,需要做国际化******************
5 +#authentication包
6 +auth_exc_no_auth=没有访问权限
7 +auth_exc_no_pass_auth=没有通过权限认证
8 +auth_filter_user_error=登录身份异常
9 +auth_filter_timeout=登录超过8小时,请重新登录
10 +auth_filter_stale_dated=登录已过期
11 +enum_res_code_301=登录身份异常
12 +enum_res_code_305=登录已过期,请重新登录
......
1 -#authentication包 1 +#******************系统操作日志记录,中文展示******************
2 -auth_exc_no_auth=沒有訪問許可權 2 +config_aspect_length_error=提示信息过长,未保存成功
3 -auth_exc_no_pass_auth=沒有通過許可權認證
4 -auth_filter_user_error=登錄身份異常
5 -auth_filter_timeout=登錄超過8小時,請重新登錄
6 -auth_filter_stale_dated=登錄已過期
7 3
8 -enum_res_code_301=登錄身份異常
9 -enum_res_code_305=登錄已過期,請重新登錄
...\ No newline at end of file ...\ No newline at end of file
4 +#******************鉴权相关提示,需要做国际化******************
5 +#authentication包
6 +auth_exc_no_auth=没有访问权限
7 +auth_exc_no_pass_auth=没有通过权限认证
8 +auth_filter_user_error=登录身份异常
9 +auth_filter_timeout=登录超过8小时,请重新登录
10 +auth_filter_stale_dated=登录已过期
11 +enum_res_code_301=登录身份异常
12 +enum_res_code_305=登录已过期,请重新登录
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -18,7 +18,7 @@ import java.util.List; ...@@ -18,7 +18,7 @@ import java.util.List;
18 public class DicEntriesController extends BaseController implements IDicEntriesController { 18 public class DicEntriesController extends BaseController implements IDicEntriesController {
19 19
20 @GetMapping("/getCountryAll") 20 @GetMapping("/getCountryAll")
21 - @ApiOperation(value = "获取所有国家字典信息") 21 + @ApiOperation(value = "ResponseVo", notes = "获取所有国家字典信息")
22 public ResponseVo getCountryAll(){ 22 public ResponseVo getCountryAll(){
23 List<DictionaryEntries> countryList = dicEntriesService.getCountryAll(); 23 List<DictionaryEntries> countryList = dicEntriesService.getCountryAll();
24 return ResponseVo.succ(countryList); 24 return ResponseVo.succ(countryList);
......
...@@ -48,14 +48,14 @@ public class SysAuthController extends BaseController implements ISysAuthControl ...@@ -48,14 +48,14 @@ public class SysAuthController extends BaseController implements ISysAuthControl
48 private String fclIndexLoginUrl; 48 private String fclIndexLoginUrl;
49 49
50 @PostMapping("/init") 50 @PostMapping("/init")
51 - @ApiOperation(value = "初始化进入首页获取FCL登录地址") 51 + @ApiOperation(value = "ResponseVo", notes = "初始化进入首页获取FCL登录地址")
52 public ResponseVo init(){ 52 public ResponseVo init(){
53 return ResponseVo.succ(fclIndexLoginUrl); 53 return ResponseVo.succ(fclIndexLoginUrl);
54 } 54 }
55 55
56 56
57 - @RequestMapping(value = "/wlgnForward") 57 + @GetMapping(value = "/wlgnForward")
58 - @ApiOperation(value = "FCL中转Cookie地址") 58 + @ApiOperation(value = "ResponseVo", notes = "FCL中转Cookie地址")
59 public void wlgnForward(HttpServletRequest request, HttpServletResponse res){ 59 public void wlgnForward(HttpServletRequest request, HttpServletResponse res){
60 printRequestInfo(request); 60 printRequestInfo(request);
61 try { 61 try {
...@@ -100,7 +100,7 @@ public class SysAuthController extends BaseController implements ISysAuthControl ...@@ -100,7 +100,7 @@ public class SysAuthController extends BaseController implements ISysAuthControl
100 } 100 }
101 101
102 @GetMapping(value = "/wlgnLogin") 102 @GetMapping(value = "/wlgnLogin")
103 - @ApiOperation(value = "FCL登录") 103 + @ApiOperation(value = "ResponseVo", notes = "FCL登录")
104 public void wlgnLogin(HttpServletRequest request, HttpServletResponse res) { 104 public void wlgnLogin(HttpServletRequest request, HttpServletResponse res) {
105 log.info("wlgnLogin____________________start"); 105 log.info("wlgnLogin____________________start");
106 106
......
1 +#******************鉴权相关提示,需要做国际化******************
1 #authentication包 2 #authentication包
2 -auth_exc_no_auth=沒有訪問許可權
3 -auth_exc_no_pass_auth=沒有通過許可權認證
4 -auth_filter_user_error=登錄身份異常
5 -auth_filter_timeout=登錄超過8小時,請重新登錄
6 -auth_filter_stale_dated=登錄已過期
...\ No newline at end of file ...\ No newline at end of file
3 +auth_exc_no_auth=没有访问权限
4 +auth_exc_no_pass_auth=没有通过权限认证
5 +auth_filter_user_error=登录身份异常
6 +auth_filter_timeout=登录超过8小时,请重新登录
7 +auth_filter_stale_dated=登录已过期
8 +enum_res_code_301=登录身份异常
9 +enum_res_code_305=登录已过期,请重新登录
......
1 +#******************鉴权相关提示,需要做国际化******************
1 #authentication包 2 #authentication包
2 -auth_exc_no_auth=沒有訪問許可權
3 -auth_exc_no_pass_auth=沒有通過許可權認證
4 -auth_filter_user_error=登錄身份異常
5 -auth_filter_timeout=登錄超過8小時,請重新登錄
6 -auth_filter_stale_dated=登錄已過期
...\ No newline at end of file ...\ No newline at end of file
3 +auth_exc_no_auth=没有访问权限
4 +auth_exc_no_pass_auth=没有通过权限认证
5 +auth_filter_user_error=登录身份异常
6 +auth_filter_timeout=登录超过8小时,请重新登录
7 +auth_filter_stale_dated=登录已过期
8 +enum_res_code_301=登录身份异常
9 +enum_res_code_305=登录已过期,请重新登录
......