Showing
14 changed files
with
83 additions
and
29 deletions
| ... | @@ -5,8 +5,8 @@ import com.fedex.connect.common.dependencies.date.vo.ResponseVo; | ... | @@ -5,8 +5,8 @@ import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 5 | import com.fedex.connect.common.model.sys.User; | 5 | import com.fedex.connect.common.model.sys.User; |
| 6 | import com.fedex.connect.customer.controller.base.BaseController; | 6 | import com.fedex.connect.customer.controller.base.BaseController; |
| 7 | import com.fedex.connect.customer.controller.biz.IConsignmentQueryController; | 7 | import com.fedex.connect.customer.controller.biz.IConsignmentQueryController; |
| 8 | -import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; | ||
| 9 | import com.fedex.connect.customer.data.query.ConsignmentQuery; | 8 | import com.fedex.connect.customer.data.query.ConsignmentQuery; |
| 9 | +import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; | ||
| 10 | import io.swagger.annotations.Api; | 10 | import io.swagger.annotations.Api; |
| 11 | import io.swagger.annotations.ApiOperation; | 11 | import io.swagger.annotations.ApiOperation; |
| 12 | import io.swagger.annotations.ApiParam; | 12 | import io.swagger.annotations.ApiParam; |
| ... | @@ -36,7 +36,7 @@ public class ConsignmentQueryController extends BaseController implements IConsi | ... | @@ -36,7 +36,7 @@ public class ConsignmentQueryController extends BaseController implements IConsi |
| 36 | ConsignmentQuery query = ConsignmentQuery.dataProcessing(consignmentQuery); | 36 | ConsignmentQuery query = ConsignmentQuery.dataProcessing(consignmentQuery); |
| 37 | query.setUserId(user.getId()); | 37 | query.setUserId(user.getId()); |
| 38 | query.setUuid(user.getUserUuid()); | 38 | query.setUuid(user.getUserUuid()); |
| 39 | - return consignmentQueryService.findConsignments(query); | 39 | + return consignmentQueryService.findConsignments(query,user); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | @Override | 42 | @Override | ... | ... |
| ... | @@ -5,7 +5,7 @@ import com.fedex.connect.common.dependencies.date.vo.ResponseVo; | ... | @@ -5,7 +5,7 @@ import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 5 | import com.fedex.connect.common.model.sys.User; | 5 | import com.fedex.connect.common.model.sys.User; |
| 6 | import com.fedex.connect.customer.controller.base.BaseController; | 6 | import com.fedex.connect.customer.controller.base.BaseController; |
| 7 | import com.fedex.connect.customer.controller.biz.IUploadRecordController; | 7 | import com.fedex.connect.customer.controller.biz.IUploadRecordController; |
| 8 | -import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; | 8 | +import com.fedex.connect.customer.data.query.AttachmentHistoryQuery; |
| 9 | import io.swagger.annotations.Api; | 9 | import io.swagger.annotations.Api; |
| 10 | import io.swagger.annotations.ApiOperation; | 10 | import io.swagger.annotations.ApiOperation; |
| 11 | import io.swagger.annotations.ApiParam; | 11 | import io.swagger.annotations.ApiParam; |
| ... | @@ -31,18 +31,15 @@ public class UploadRecordController extends BaseController implements IUploadRec | ... | @@ -31,18 +31,15 @@ public class UploadRecordController extends BaseController implements IUploadRec |
| 31 | @ApiOperation(value = "ResponseVo", notes = "运单历史上传记录查询") | 31 | @ApiOperation(value = "ResponseVo", notes = "运单历史上传记录查询") |
| 32 | @OperationMethodLog(describe = "business_log_20006") | 32 | @OperationMethodLog(describe = "business_log_20006") |
| 33 | public ResponseVo queryHistoryList(@ApiParam(value="运单ID",required = true) @PathVariable(value = "consignmentId") Long consignmentId) { | 33 | public ResponseVo queryHistoryList(@ApiParam(value="运单ID",required = true) @PathVariable(value = "consignmentId") Long consignmentId) { |
| 34 | + AttachmentHistoryQuery attachmentHistoryQuery = AttachmentHistoryQuery.getInstance(consignmentId); | ||
| 34 | /** | 35 | /** |
| 35 | * 运单id非空校验 | 36 | * 运单id非空校验 |
| 36 | */ | 37 | */ |
| 37 | - consignmentInfoValidate.validateConsignmentId(consignmentId); | 38 | + consignmentInfoValidate.validateConsignmentId(attachmentHistoryQuery.getConsignmentId()); |
| 38 | /** | 39 | /** |
| 39 | * 获取当前用户信息 | 40 | * 获取当前用户信息 |
| 40 | */ | 41 | */ |
| 41 | User user = this.getCurrentUserInfo(); | 42 | User user = this.getCurrentUserInfo(); |
| 42 | - /** | 43 | + return uploadRecordService.findHistory(attachmentHistoryQuery,user); |
| 43 | - * 构造查询对象 | ||
| 44 | - */ | ||
| 45 | - UserConsignmentInfoQuery userConsignmentInfoQuery = UserConsignmentInfoQuery.getInstance(user,consignmentId); | ||
| 46 | - return uploadRecordService.findHistory(userConsignmentInfoQuery); | ||
| 47 | } | 44 | } |
| 48 | } | 45 | } | ... | ... |
server/biz-customer/src/main/java/com/fedex/connect/customer/data/query/AttachmentHistoryQuery.java
0 → 100644
| 1 | +package com.fedex.connect.customer.data.query; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.customer.data.PageBase; | ||
| 4 | +import lombok.Data; | ||
| 5 | +/** | ||
| 6 | + * @Author Szl | ||
| 7 | + * @Description 类说明 用于运单的附件历史上传查询 | ||
| 8 | + * @Date 2024/11/12 | ||
| 9 | + */ | ||
| 10 | +@Data | ||
| 11 | +public class AttachmentHistoryQuery extends PageBase { | ||
| 12 | + | ||
| 13 | + private Long consignmentId; | ||
| 14 | + | ||
| 15 | + /** | ||
| 16 | + * @Author Szl | ||
| 17 | + * @Description 功能说明 实例化查询对象 | ||
| 18 | + * @Date 2024/11/12 | ||
| 19 | + * @param consignmentId | ||
| 20 | + * @return com.fedex.connect.customer.data.query.AttachmentHistoryQuery | ||
| 21 | + */ | ||
| 22 | + public static AttachmentHistoryQuery getInstance(Long consignmentId){ | ||
| 23 | + AttachmentHistoryQuery attachmentHistoryQuery = new AttachmentHistoryQuery(); | ||
| 24 | + attachmentHistoryQuery.setConsignmentId(consignmentId); | ||
| 25 | + attachmentHistoryQuery.setStart(attachmentHistoryQuery.getStart()); | ||
| 26 | + return attachmentHistoryQuery; | ||
| 27 | + } | ||
| 28 | +} |
server/biz-customer/src/main/java/com/fedex/connect/customer/repository/dao/AttachmentExtMapper.java
| ... | @@ -2,6 +2,7 @@ package com.fedex.connect.customer.repository.dao; | ... | @@ -2,6 +2,7 @@ package com.fedex.connect.customer.repository.dao; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.model.biz.Attachment; | 3 | import com.fedex.connect.common.model.biz.Attachment; |
| 4 | 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.AttachmentHistoryQuery; | ||
| 5 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; | 6 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; |
| 6 | import org.apache.ibatis.annotations.Mapper; | 7 | import org.apache.ibatis.annotations.Mapper; |
| 7 | import org.apache.ibatis.annotations.Param; | 8 | import org.apache.ibatis.annotations.Param; |
| ... | @@ -11,7 +12,7 @@ import java.util.List; | ... | @@ -11,7 +12,7 @@ import java.util.List; |
| 11 | 12 | ||
| 12 | @Mapper | 13 | @Mapper |
| 13 | public interface AttachmentExtMapper { | 14 | public interface AttachmentExtMapper { |
| 14 | - List<AttachmentHistoryDto> findHistory(@Param("bizId") Long bizId); | 15 | + List<AttachmentHistoryDto> findHistory(AttachmentHistoryQuery attachmentHistoryQuery); |
| 15 | 16 | ||
| 16 | @Select("SELECT * FROM T_BIZ_ATTACHMENT WHERE UPLOAD_RECORD_ID = " + | 17 | @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 | "(SELECT MAX(ID) FROM T_BIZ_UPLOAD_RECORD WHERE CREATE_USER_ID = #{query.userId} " + | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -28,7 +28,7 @@ | ... | @@ -28,7 +28,7 @@ |
| 28 | c.CREATE_TIME, | 28 | c.CREATE_TIME, |
| 29 | c.COMMIT_TIME, | 29 | c.COMMIT_TIME, |
| 30 | c.STATUS_NAME | 30 | c.STATUS_NAME |
| 31 | -</sql> | 31 | + </sql> |
| 32 | 32 | ||
| 33 | <select id="findConsignments" resultType="com.fedex.connect.customer.data.dto.FindConsignmentsDto"> | 33 | <select id="findConsignments" resultType="com.fedex.connect.customer.data.dto.FindConsignmentsDto"> |
| 34 | <include refid="OracleDialectPrefix"/> | 34 | <include refid="OracleDialectPrefix"/> | ... | ... |
| ... | @@ -2,12 +2,13 @@ package com.fedex.connect.customer.repository.repo; | ... | @@ -2,12 +2,13 @@ package com.fedex.connect.customer.repository.repo; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.model.biz.Attachment; | 3 | import com.fedex.connect.common.model.biz.Attachment; |
| 4 | 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.AttachmentHistoryQuery; | ||
| 5 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; | 6 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; |
| 6 | 7 | ||
| 7 | import java.util.List; | 8 | import java.util.List; |
| 8 | 9 | ||
| 9 | public interface IAttachmentRepository { | 10 | public interface IAttachmentRepository { |
| 10 | - List<AttachmentHistoryDto> findHistory(Long bizId); | 11 | + List<AttachmentHistoryDto> findHistory(AttachmentHistoryQuery attachmentHistoryQuery); |
| 11 | 12 | ||
| 12 | Attachment queryInfo(UserConsignmentInfoQuery userConsignmentInfoQuery); | 13 | Attachment queryInfo(UserConsignmentInfoQuery userConsignmentInfoQuery); |
| 13 | } | 14 | } |
| ... | \ 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.Consignment; | 3 | import com.fedex.connect.common.model.biz.Consignment; |
| 4 | +import com.fedex.connect.common.model.sys.User; | ||
| 4 | import com.fedex.connect.customer.data.dto.FindConsignmentsDto; | 5 | import com.fedex.connect.customer.data.dto.FindConsignmentsDto; |
| 5 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; | 6 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; |
| 6 | import com.fedex.connect.customer.data.query.ConsignmentQuery; | 7 | import com.fedex.connect.customer.data.query.ConsignmentQuery; |
| ... | @@ -8,7 +9,7 @@ import com.fedex.connect.customer.data.query.ConsignmentQuery; | ... | @@ -8,7 +9,7 @@ import com.fedex.connect.customer.data.query.ConsignmentQuery; |
| 8 | import java.util.List; | 9 | import java.util.List; |
| 9 | 10 | ||
| 10 | public interface IConsignmentRepository { | 11 | public interface IConsignmentRepository { |
| 11 | - List<FindConsignmentsDto> findConsignments(ConsignmentQuery query); | 12 | + List<FindConsignmentsDto> findConsignments(ConsignmentQuery query, User user); |
| 12 | 13 | ||
| 13 | Long findAllCount(ConsignmentQuery query); | 14 | Long findAllCount(ConsignmentQuery query); |
| 14 | 15 | ... | ... |
| ... | @@ -2,6 +2,7 @@ package com.fedex.connect.customer.repository.repo.impl; | ... | @@ -2,6 +2,7 @@ package com.fedex.connect.customer.repository.repo.impl; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.model.biz.Attachment; | 3 | import com.fedex.connect.common.model.biz.Attachment; |
| 4 | 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.AttachmentHistoryQuery; | ||
| 5 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; | 6 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; |
| 6 | import com.fedex.connect.customer.repository.base.BaseDao; | 7 | import com.fedex.connect.customer.repository.base.BaseDao; |
| 7 | import com.fedex.connect.customer.repository.repo.IAttachmentRepository; | 8 | import com.fedex.connect.customer.repository.repo.IAttachmentRepository; |
| ... | @@ -12,8 +13,8 @@ import java.util.List; | ... | @@ -12,8 +13,8 @@ import java.util.List; |
| 12 | @Repository | 13 | @Repository |
| 13 | public class AttachmentRepositoryImpl extends BaseDao implements IAttachmentRepository { | 14 | public class AttachmentRepositoryImpl extends BaseDao implements IAttachmentRepository { |
| 14 | @Override | 15 | @Override |
| 15 | - public List<AttachmentHistoryDto> findHistory(Long consignmentId) { | 16 | + public List<AttachmentHistoryDto> findHistory(AttachmentHistoryQuery attachmentHistoryQuery) { |
| 16 | - return attachmentExtMapper.findHistory(consignmentId); | 17 | + return attachmentExtMapper.findHistory(attachmentHistoryQuery); |
| 17 | } | 18 | } |
| 18 | 19 | ||
| 19 | /** | 20 | /** | ... | ... |
| 1 | package com.fedex.connect.customer.repository.repo.impl; | 1 | 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.common.model.sys.User; | ||
| 4 | import com.fedex.connect.customer.data.dto.FindConsignmentsDto; | 5 | import com.fedex.connect.customer.data.dto.FindConsignmentsDto; |
| 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.data.query.UserConsignmentInfoQuery; | ||
| 7 | import com.fedex.connect.customer.repository.base.BaseDao; | 8 | import com.fedex.connect.customer.repository.base.BaseDao; |
| 8 | import com.fedex.connect.customer.repository.repo.IConsignmentRepository; | 9 | import com.fedex.connect.customer.repository.repo.IConsignmentRepository; |
| 10 | +import org.apache.commons.lang3.StringUtils; | ||
| 9 | import org.springframework.stereotype.Repository; | 11 | import org.springframework.stereotype.Repository; |
| 10 | 12 | ||
| 13 | +import java.util.Collections; | ||
| 11 | import java.util.List; | 14 | import java.util.List; |
| 12 | 15 | ||
| 13 | @Repository | 16 | @Repository |
| 14 | public class ConsignmentRepositoryImpl extends BaseDao implements IConsignmentRepository { | 17 | public class ConsignmentRepositoryImpl extends BaseDao implements IConsignmentRepository { |
| 15 | 18 | ||
| 19 | + /** | ||
| 20 | + * @Author Szl | ||
| 21 | + * @Description 功能说明 运单创建人如果为空则取当前用户 | ||
| 22 | + * @Date 2024/11/12 | ||
| 23 | + * @param query | ||
| 24 | + * @param user | ||
| 25 | + * @return java.util.List<com.fedex.connect.customer.data.dto.FindConsignmentsDto> | ||
| 26 | + */ | ||
| 16 | @Override | 27 | @Override |
| 17 | - public List<FindConsignmentsDto> findConsignments(ConsignmentQuery query) { | 28 | + public List<FindConsignmentsDto> findConsignments(ConsignmentQuery query, User user) { |
| 18 | - return consignmentExtMapper.findConsignments(query); | 29 | + List<FindConsignmentsDto> consignments = consignmentExtMapper.findConsignments(query); |
| 30 | + if (consignments == null) { | ||
| 31 | + return Collections.emptyList(); | ||
| 32 | + } | ||
| 33 | + consignments.forEach(consignment -> { | ||
| 34 | + if (StringUtils.isBlank(consignment.getCreateUserName())) { | ||
| 35 | + consignment.setCreateUserName(user.getUserName()); | ||
| 36 | + } | ||
| 37 | + }); | ||
| 38 | + return consignments; | ||
| 19 | } | 39 | } |
| 20 | 40 | ||
| 21 | @Override | 41 | @Override | ... | ... |
| 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.common.model.sys.User; | ||
| 4 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; | 5 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; |
| 5 | import com.fedex.connect.customer.data.query.ConsignmentQuery; | 6 | import com.fedex.connect.customer.data.query.ConsignmentQuery; |
| 6 | 7 | ||
| ... | @@ -12,7 +13,7 @@ public interface IConsignmentQueryService { | ... | @@ -12,7 +13,7 @@ public interface IConsignmentQueryService { |
| 12 | * @param query | 13 | * @param query |
| 13 | * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo | 14 | * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo |
| 14 | */ | 15 | */ |
| 15 | - ResponseVo findConsignments(ConsignmentQuery query); | 16 | + ResponseVo findConsignments(ConsignmentQuery query,User user); |
| 16 | 17 | ||
| 17 | /** | 18 | /** |
| 18 | * @Author mt | 19 | * @Author mt | ... | ... |
| 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 | +import com.fedex.connect.common.model.sys.User; |
| 5 | +import com.fedex.connect.customer.data.query.AttachmentHistoryQuery; | ||
| 5 | 6 | ||
| 6 | public interface IUploadRecordService { | 7 | public interface IUploadRecordService { |
| 7 | - ResponseVo findHistory(UserConsignmentInfoQuery userConsignmentInfoQuery); | 8 | + ResponseVo findHistory(AttachmentHistoryQuery attachmentHistoryQuery, User user); |
| 8 | } | 9 | } | ... | ... |
| ... | @@ -5,6 +5,7 @@ import com.fedex.connect.common.dependencies.date.vo.PageResult; | ... | @@ -5,6 +5,7 @@ import com.fedex.connect.common.dependencies.date.vo.PageResult; |
| 5 | import com.fedex.connect.common.dependencies.date.vo.ResponseVo; | 5 | 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.common.model.sys.User; | ||
| 8 | import com.fedex.connect.customer.data.dto.FindConsignmentsDto; | 9 | import com.fedex.connect.customer.data.dto.FindConsignmentsDto; |
| 9 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; | 10 | import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; |
| 10 | import com.fedex.connect.customer.data.query.ConsignmentQuery; | 11 | import com.fedex.connect.customer.data.query.ConsignmentQuery; |
| ... | @@ -30,7 +31,7 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign | ... | @@ -30,7 +31,7 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign |
| 30 | * @param query | 31 | * @param query |
| 31 | * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo | 32 | * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo |
| 32 | */ | 33 | */ |
| 33 | - public ResponseVo findConsignments(ConsignmentQuery query) { | 34 | + public ResponseVo findConsignments(ConsignmentQuery query, User user) { |
| 34 | List<String> consignmentCodeList = query.getConsignmentCodeList(); | 35 | List<String> consignmentCodeList = query.getConsignmentCodeList(); |
| 35 | if (Utils.isNotEmpty(consignmentCodeList) && consignmentCodeList.size() > GlobalConstantFedex.DECLARE_COUNT) { | 36 | if (Utils.isNotEmpty(consignmentCodeList) && consignmentCodeList.size() > GlobalConstantFedex.DECLARE_COUNT) { |
| 36 | responseUtils.fail(ResponseCode.MESSAGE_CODE_30002); | 37 | responseUtils.fail(ResponseCode.MESSAGE_CODE_30002); |
| ... | @@ -44,7 +45,7 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign | ... | @@ -44,7 +45,7 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign |
| 44 | pageResult.setPage(query.getPage()); | 45 | pageResult.setPage(query.getPage()); |
| 45 | pageResult.setSize(query.getSize()); | 46 | pageResult.setSize(query.getSize()); |
| 46 | if (total != null && total > 0) { | 47 | if (total != null && total > 0) { |
| 47 | - List<FindConsignmentsDto> consignments = consignmentRepository.findConsignments(query); | 48 | + List<FindConsignmentsDto> consignments = consignmentRepository.findConsignments(query,user); |
| 48 | pageResult.setList(consignments); | 49 | pageResult.setList(consignments); |
| 49 | } | 50 | } |
| 50 | return responseUtils.success(pageResult); | 51 | return responseUtils.success(pageResult); | ... | ... |
| ... | @@ -3,10 +3,10 @@ package com.fedex.connect.customer.service.biz.impl; | ... | @@ -3,10 +3,10 @@ package com.fedex.connect.customer.service.biz.impl; |
| 3 | import com.fedex.connect.common.dependencies.contants.DigitConstants; | 3 | import com.fedex.connect.common.dependencies.contants.DigitConstants; |
| 4 | import com.fedex.connect.common.dependencies.date.vo.PageResult; | 4 | import com.fedex.connect.common.dependencies.date.vo.PageResult; |
| 5 | import com.fedex.connect.common.dependencies.date.vo.ResponseVo; | 5 | import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 6 | +import com.fedex.connect.common.model.sys.User; | ||
| 6 | import com.fedex.connect.customer.data.dto.AttachmentHistoryDto; | 7 | import com.fedex.connect.customer.data.dto.AttachmentHistoryDto; |
| 7 | -import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery; | 8 | +import com.fedex.connect.customer.data.query.AttachmentHistoryQuery; |
| 8 | import com.fedex.connect.customer.service.base.BaseService; | 9 | 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; | 10 | import com.fedex.connect.customer.service.biz.IUploadRecordService; |
| 11 | import org.springframework.stereotype.Service; | 11 | import org.springframework.stereotype.Service; |
| 12 | 12 | ||
| ... | @@ -25,23 +25,25 @@ public class UploadRecordServiceImpl extends BaseService implements IUploadRecor | ... | @@ -25,23 +25,25 @@ public class UploadRecordServiceImpl extends BaseService implements IUploadRecor |
| 25 | * @Author Szl | 25 | * @Author Szl |
| 26 | * @Description 功能说明 查询该运单历史数据 | 26 | * @Description 功能说明 查询该运单历史数据 |
| 27 | * @Date 2024/11/5 | 27 | * @Date 2024/11/5 |
| 28 | - * @param userConsignmentInfoQuery | 28 | + * @param attachmentHistoryQuery |
| 29 | * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo | 29 | * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo |
| 30 | */ | 30 | */ |
| 31 | - public ResponseVo findHistory(UserConsignmentInfoQuery userConsignmentInfoQuery) { | 31 | + public ResponseVo findHistory(AttachmentHistoryQuery attachmentHistoryQuery, User user) { |
| 32 | - List<AttachmentHistoryDto> history = attachmentRepository.findHistory(userConsignmentInfoQuery.getConsignmentId()); | 32 | + List<AttachmentHistoryDto> history = attachmentRepository.findHistory(attachmentHistoryQuery); |
| 33 | 33 | ||
| 34 | if (history != null) { | 34 | if (history != null) { |
| 35 | history.forEach(attachmentHistoryDto -> | 35 | history.forEach(attachmentHistoryDto -> |
| 36 | attachmentHistoryDto.setCreatorFlag( | 36 | attachmentHistoryDto.setCreatorFlag( |
| 37 | (attachmentHistoryDto.getUploadUserId() != null && | 37 | (attachmentHistoryDto.getUploadUserId() != null && |
| 38 | - attachmentHistoryDto.getUploadUserId().equals(userConsignmentInfoQuery.getUserId())) ? | 38 | + attachmentHistoryDto.getUploadUserId().equals(user.getId())) ? |
| 39 | DigitConstants.DIGIT_ONE : DigitConstants.DIGIT_ZERO | 39 | DigitConstants.DIGIT_ONE : DigitConstants.DIGIT_ZERO |
| 40 | ) | 40 | ) |
| 41 | ); | 41 | ); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | PageResult pageResult = new PageResult(); | 44 | PageResult pageResult = new PageResult(); |
| 45 | + pageResult.setPage(attachmentHistoryQuery.getPage()); | ||
| 46 | + pageResult.setSize(attachmentHistoryQuery.getSize()); | ||
| 45 | pageResult.setList(history != null ? history : Collections.emptyList()); | 47 | pageResult.setList(history != null ? history : Collections.emptyList()); |
| 46 | 48 | ||
| 47 | return responseUtils.success(pageResult); | 49 | return responseUtils.success(pageResult); | ... | ... |
-
Please register or login to post a comment