zelong.shao

customer|流程代码调整

......@@ -62,6 +62,7 @@
#{item}
</foreach>
</if>
ORDER BY c.CREATE_TIME DESC
<include refid="OracleDialectSuffix" />
</select>
......
......@@ -7,15 +7,14 @@ import com.fedex.connect.common.dependencies.util.Utils;
import com.fedex.connect.common.model.biz.Consignment;
import com.fedex.connect.common.model.sys.User;
import com.fedex.connect.customer.data.dto.FindConsignmentsDto;
import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
import com.fedex.connect.customer.data.query.ConsignmentQuery;
import com.fedex.connect.customer.data.query.UserConsignmentInfoQuery;
import com.fedex.connect.customer.enums.ResponseCode;
import com.fedex.connect.customer.service.base.BaseService;
import com.fedex.connect.customer.service.biz.IConsignmentQueryService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Objects;
/**
* @Author Szl
......@@ -62,17 +61,6 @@ public class ConsignmentQueryServiceImpl extends BaseService implements IConsign
*/
public ResponseVo findConsignmentInfo(UserConsignmentInfoQuery userConsignmentInfoQuery) {
Consignment consignment = consignmentRepository.findConsignmentInfo(userConsignmentInfoQuery);
if (consignment != null
&& !Objects.equals(consignment.getUserUuid(), userConsignmentInfoQuery.getUserUuid())
&& !Objects.equals(consignment.getShipperAccount(), userConsignmentInfoQuery.getShipperAccount())) {
Consignment consignmentTemp = new Consignment();
consignmentTemp.setId(consignment.getId());
consignmentTemp.setConsignmentCode(consignment.getConsignmentCode());
consignmentTemp.setShipperAccount(consignment.getShipperAccount());
consignmentTemp.setOriginCountry(consignment.getOriginCountry());
consignmentTemp.setDestinationCountry(consignment.getDestinationCountry());
consignment = consignmentTemp;
}
return responseUtils.success(consignment);
}
}
......
......@@ -38,7 +38,7 @@ public class UploadRecordServiceImpl extends BaseService implements IUploadRecor
AttachmentHistoryDto attachmentHistoryDto = new AttachmentHistoryDto();
attachmentHistoryDto.setUploadRecord(uploadRecord);
attachmentHistoryDto.setCreatorFlag(
(uploadRecord.getCreateUserId() != null) ?
(uploadRecord.getCreateUserId() != null) && uploadRecord.getCreateUserId().equals(user.getId()) ?
DigitConstants.DIGIT_ONE : DigitConstants.DIGIT_ZERO
);
attachmentHistoryDtos.add(attachmentHistoryDto);
......
......@@ -50,7 +50,7 @@ public class AttachmentUtil {
* @return void
*/
private void initAttachment(Attachment attachment,String bizType,User user) throws Exception{
DictionaryEntries attachmentBizTypeEntries = cacheSystem.getDicAttachmentBizType(AttachmentBizTypeEnum.getCodeByExt1(bizType));
DictionaryEntries attachmentBizTypeEntries = cacheSystem.getDicAttachmentBizType(bizType);
attachment.setBizTypeCode(attachmentBizTypeEntries.getCode());
attachment.setBizTypeName(attachmentBizTypeEntries.getDescription());
DictionaryEntries attachmentFileTypeEntries = cacheSystem.getDicAttachmentFileType(AttachmentFileTypeEnum.FILE.getCode());
......@@ -108,7 +108,7 @@ public class AttachmentUtil {
//用户上传原文件名称
attachment.setSourceFileName(sourceFileName);
//生成系统文件名称例子:AWB_123456789012_20241023164532982_001.pdf
String fileName = bizType + BaseSeparatorConstants.SEPARATOR_UNDERLINE +
String fileName = AttachmentBizTypeEnum.getExt1ByCode(bizType) + BaseSeparatorConstants.SEPARATOR_UNDERLINE +
consignmentCode + BaseSeparatorConstants.SEPARATOR_UNDERLINE + fileSuffix + suffix;
//系统生成文件名称
attachment.setFileName(fileName);
......
......@@ -61,9 +61,6 @@ public class ConsignmentUtil {
//始发国编码
consignment.setUserInputOriginCountryCode(consignmentBo.getOriginCountryCode());
/******提交信息记录******/
consignment.setFirstSubmitTime(nowDate);
consignment.setFirstSubmitter(user.getUserName());
consignment.setFirstSubmitterId(user.getId());
consignment.setCreateTime(nowDate);
consignment.setCreateUserName(user.getUserName());
consignment.setCreateUserId(user.getId());
......@@ -72,6 +69,11 @@ public class ConsignmentUtil {
consignment.setModifyUserName(user.getUserName());
consignment.setModifyUserId(user.getId());
}
if (!StringUtils.isEmpty(consignment.getFirstSubmitter())){
consignment.setFirstSubmitTime(nowDate);
consignment.setFirstSubmitter(user.getUserName());
consignment.setFirstSubmitterId(user.getId());
}
//记录当前提交人信息
consignment.setSubmitTime(nowDate);
consignment.setSubmitter(user.getUserName());
......@@ -172,7 +174,8 @@ public class ConsignmentUtil {
* 都不一致,但是输入了shipperAccount,则给出提示
*/
if (StringUtils.hasText(bo.getShipperAccount())) {
consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_ONE);
consignmentAddDto.setIsCreatorFlag(DigitConstants.DIGIT_TWO);
consignmentAddDto.setConsignmentId(null);
return responseUtils.success(ResponseCode.MESSAGE_CODE_30005,consignmentAddDto);
}
......