biz-customer、task-schedule | 修改 | 推送IMP001报文代码调整
mt 2024年12月18日17:39:06
Showing
39 changed files
with
462 additions
and
211 deletions
| ... | @@ -196,13 +196,13 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS | ... | @@ -196,13 +196,13 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS |
| 196 | } | 196 | } |
| 197 | } | 197 | } |
| 198 | /** | 198 | /** |
| 199 | - * Todo 初始化插入预清关文件推送任务日志,szl添加 | 199 | + * Todo 初始化插入预清关文件推送邮件任务日志,szl添加 |
| 200 | */ | 200 | */ |
| 201 | 201 | ||
| 202 | /** | 202 | /** |
| 203 | - * 初始化插入预清关文件邮件推送日志,mt添加 | 203 | + * 初始化插入预清关文件推送日志,mt添加 |
| 204 | */ | 204 | */ |
| 205 | - PushOb pushOb = pushObUtil.initPushOb(consignment,user); | 205 | + PushOb pushOb = pushObUtil.initPushOb(consignment,uploadRecord,user); |
| 206 | /** | 206 | /** |
| 207 | * 初始化插入提醒发件人邮件日志 | 207 | * 初始化插入提醒发件人邮件日志 |
| 208 | */ | 208 | */ | ... | ... |
| ... | @@ -52,10 +52,10 @@ public class AttachmentUtil { | ... | @@ -52,10 +52,10 @@ public class AttachmentUtil { |
| 52 | private void initAttachment(Attachment attachment,String bizType,User user) throws Exception{ | 52 | private void initAttachment(Attachment attachment,String bizType,User user) throws Exception{ |
| 53 | DictionaryEntries attachmentBizTypeEntries = cacheSystem.getDicAttachmentBizType(AttachmentBizTypeEnum.getCodeByExt1(bizType)); | 53 | DictionaryEntries attachmentBizTypeEntries = cacheSystem.getDicAttachmentBizType(AttachmentBizTypeEnum.getCodeByExt1(bizType)); |
| 54 | attachment.setBizTypeCode(attachmentBizTypeEntries.getCode()); | 54 | attachment.setBizTypeCode(attachmentBizTypeEntries.getCode()); |
| 55 | - attachment.setBizTypeName(attachmentBizTypeEntries.getEnglishName()); | 55 | + attachment.setBizTypeName(attachmentBizTypeEntries.getDescription()); |
| 56 | DictionaryEntries attachmentFileTypeEntries = cacheSystem.getDicAttachmentFileType(AttachmentFileTypeEnum.FILE.getCode()); | 56 | DictionaryEntries attachmentFileTypeEntries = cacheSystem.getDicAttachmentFileType(AttachmentFileTypeEnum.FILE.getCode()); |
| 57 | attachment.setFileTypeCode(attachmentFileTypeEntries.getCode()); | 57 | attachment.setFileTypeCode(attachmentFileTypeEntries.getCode()); |
| 58 | - attachment.setFileTypeName(attachmentFileTypeEntries.getEnglishName()); | 58 | + attachment.setFileTypeName(attachmentFileTypeEntries.getDescription()); |
| 59 | attachment.setStatus(StatusEnum.YES.getCode()); | 59 | attachment.setStatus(StatusEnum.YES.getCode()); |
| 60 | attachment.setCreateUserId(user.getId()); | 60 | attachment.setCreateUserId(user.getId()); |
| 61 | attachment.setCreateUserName(user.getUserName()); | 61 | attachment.setCreateUserName(user.getUserName()); | ... | ... |
| ... | @@ -7,6 +7,7 @@ import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils; | ... | @@ -7,6 +7,7 @@ import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils; |
| 7 | import com.fedex.connect.common.model.bi.DictionaryEntries; | 7 | import com.fedex.connect.common.model.bi.DictionaryEntries; |
| 8 | import com.fedex.connect.common.model.biz.Consignment; | 8 | import com.fedex.connect.common.model.biz.Consignment; |
| 9 | import com.fedex.connect.common.model.biz.PushOb; | 9 | import com.fedex.connect.common.model.biz.PushOb; |
| 10 | +import com.fedex.connect.common.model.biz.UploadRecord; | ||
| 10 | import com.fedex.connect.common.model.sys.User; | 11 | import com.fedex.connect.common.model.sys.User; |
| 11 | import lombok.extern.slf4j.Slf4j; | 12 | import lombok.extern.slf4j.Slf4j; |
| 12 | import org.springframework.beans.factory.annotation.Autowired; | 13 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | @@ -29,14 +30,15 @@ public class PushObUtil { | ... | @@ -29,14 +30,15 @@ public class PushObUtil { |
| 29 | * @param | 30 | * @param |
| 30 | * @return com.fedex.connect.common.model.biz.PushOb | 31 | * @return com.fedex.connect.common.model.biz.PushOb |
| 31 | */ | 32 | */ |
| 32 | - public PushOb initPushOb(Consignment consignment, User user) throws Exception{ | 33 | + public PushOb initPushOb(Consignment consignment, UploadRecord uploadRecord, User user) throws Exception{ |
| 33 | DictionaryEntries pushObStatus = cacheSystem.getDicPushObStatus(PushObStatusEnum.TO_BE_SENT.getCode()); | 34 | DictionaryEntries pushObStatus = cacheSystem.getDicPushObStatus(PushObStatusEnum.TO_BE_SENT.getCode()); |
| 34 | PushOb pushOb = new PushOb(); | 35 | PushOb pushOb = new PushOb(); |
| 35 | pushOb.setConsignmentId(consignment.getId()); | 36 | pushOb.setConsignmentId(consignment.getId()); |
| 36 | pushOb.setConsignmentCode(consignment.getConsignmentCode()); | 37 | pushOb.setConsignmentCode(consignment.getConsignmentCode()); |
| 37 | pushOb.setPushNum(DigitConstants.DIGIT_ZERO_LONG); | 38 | pushOb.setPushNum(DigitConstants.DIGIT_ZERO_LONG); |
| 38 | pushOb.setStatusCode(pushObStatus.getCode()); | 39 | pushOb.setStatusCode(pushObStatus.getCode()); |
| 39 | - pushOb.setStatusName(pushObStatus.getEnglishName()); | 40 | + pushOb.setStatusName(pushObStatus.getDescription()); |
| 41 | + pushOb.setUploadRecordId(uploadRecord.getId()); | ||
| 40 | pushOb.setCreateUserId(user.getId()); | 42 | pushOb.setCreateUserId(user.getId()); |
| 41 | pushOb.setCreateUserName(user.getUserName()); | 43 | pushOb.setCreateUserName(user.getUserName()); |
| 42 | pushOb.setModifyUserId(user.getId()); | 44 | pushOb.setModifyUserId(user.getId()); | ... | ... |
| ... | @@ -38,4 +38,4 @@ export: | ... | @@ -38,4 +38,4 @@ export: |
| 38 | 38 | ||
| 39 | upload: | 39 | upload: |
| 40 | path: | 40 | path: |
| 41 | - attachment: /app/Oracle/Middleware/user_projects/domains/base_domain/iclearConnect/upload/attachment | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 41 | + attachment: /var/share/iclearConnect/upload/attachment | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -19,6 +19,7 @@ | ... | @@ -19,6 +19,7 @@ |
| 19 | <result column="MODIFY_TIME" jdbcType="TIMESTAMP" property="modifyTime" /> | 19 | <result column="MODIFY_TIME" jdbcType="TIMESTAMP" property="modifyTime" /> |
| 20 | <result column="MODIFY_USER_ID" jdbcType="NUMERIC" property="modifyUserId" /> | 20 | <result column="MODIFY_USER_ID" jdbcType="NUMERIC" property="modifyUserId" /> |
| 21 | <result column="MODIFY_USER_NAME" jdbcType="VARCHAR" property="modifyUserName" /> | 21 | <result column="MODIFY_USER_NAME" jdbcType="VARCHAR" property="modifyUserName" /> |
| 22 | + <result column="UPLOAD_RECORD_ID" jdbcType="NUMERIC" property="uploadRecordId" /> | ||
| 22 | </resultMap> | 23 | </resultMap> |
| 23 | <sql id="Example_Where_Clause"> | 24 | <sql id="Example_Where_Clause"> |
| 24 | <where> | 25 | <where> |
| ... | @@ -81,7 +82,7 @@ | ... | @@ -81,7 +82,7 @@ |
| 81 | <sql id="Base_Column_List"> | 82 | <sql id="Base_Column_List"> |
| 82 | ID, CONSIGNMENT_CODE, CONSIGNMENT_ID, PUSH_TIME, STATUS_CODE, STATUS_NAME, PUSH_NUM, | 83 | ID, CONSIGNMENT_CODE, CONSIGNMENT_ID, PUSH_TIME, STATUS_CODE, STATUS_NAME, PUSH_NUM, |
| 83 | FILE_PATH, FILE_BACK_PATH, FILE_NAME, REMARK, CREATE_TIME, CREATE_USER_ID, CREATE_USER_NAME, | 84 | FILE_PATH, FILE_BACK_PATH, FILE_NAME, REMARK, CREATE_TIME, CREATE_USER_ID, CREATE_USER_NAME, |
| 84 | - MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME | 85 | + MODIFY_TIME, MODIFY_USER_ID, MODIFY_USER_NAME, UPLOAD_RECORD_ID |
| 85 | </sql> | 86 | </sql> |
| 86 | <select id="selectByExample" parameterType="com.fedex.connect.common.model.biz.PushObExample" resultMap="BaseResultMap"> | 87 | <select id="selectByExample" parameterType="com.fedex.connect.common.model.biz.PushObExample" resultMap="BaseResultMap"> |
| 87 | <include refid="OracleDialectPrefix" /> | 88 | <include refid="OracleDialectPrefix" /> |
| ... | @@ -125,13 +126,15 @@ | ... | @@ -125,13 +126,15 @@ |
| 125 | PUSH_NUM, FILE_PATH, FILE_BACK_PATH, | 126 | PUSH_NUM, FILE_PATH, FILE_BACK_PATH, |
| 126 | FILE_NAME, REMARK, CREATE_TIME, | 127 | FILE_NAME, REMARK, CREATE_TIME, |
| 127 | CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME, | 128 | CREATE_USER_ID, CREATE_USER_NAME, MODIFY_TIME, |
| 128 | - MODIFY_USER_ID, MODIFY_USER_NAME) | 129 | + MODIFY_USER_ID, MODIFY_USER_NAME, UPLOAD_RECORD_ID |
| 130 | + ) | ||
| 129 | values (#{id,jdbcType=NUMERIC}, #{consignmentCode,jdbcType=VARCHAR}, #{consignmentId,jdbcType=NUMERIC}, | 131 | values (#{id,jdbcType=NUMERIC}, #{consignmentCode,jdbcType=VARCHAR}, #{consignmentId,jdbcType=NUMERIC}, |
| 130 | #{pushTime,jdbcType=TIMESTAMP}, #{statusCode,jdbcType=VARCHAR}, #{statusName,jdbcType=VARCHAR}, | 132 | #{pushTime,jdbcType=TIMESTAMP}, #{statusCode,jdbcType=VARCHAR}, #{statusName,jdbcType=VARCHAR}, |
| 131 | #{pushNum,jdbcType=NUMERIC}, #{filePath,jdbcType=VARCHAR}, #{fileBackPath,jdbcType=VARCHAR}, | 133 | #{pushNum,jdbcType=NUMERIC}, #{filePath,jdbcType=VARCHAR}, #{fileBackPath,jdbcType=VARCHAR}, |
| 132 | #{fileName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, | 134 | #{fileName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, |
| 133 | #{createUserId,jdbcType=NUMERIC}, #{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, | 135 | #{createUserId,jdbcType=NUMERIC}, #{createUserName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, |
| 134 | - #{modifyUserId,jdbcType=NUMERIC}, #{modifyUserName,jdbcType=VARCHAR}) | 136 | + #{modifyUserId,jdbcType=NUMERIC}, #{modifyUserName,jdbcType=VARCHAR}, #{uploadRecordId,jdbcType=NUMERIC} |
| 137 | + ) | ||
| 135 | </insert> | 138 | </insert> |
| 136 | <insert id="insertSelective" parameterType="com.fedex.connect.common.model.biz.PushOb"> | 139 | <insert id="insertSelective" parameterType="com.fedex.connect.common.model.biz.PushOb"> |
| 137 | <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> | 140 | <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> |
| ... | @@ -188,6 +191,9 @@ | ... | @@ -188,6 +191,9 @@ |
| 188 | <if test="modifyUserName != null"> | 191 | <if test="modifyUserName != null"> |
| 189 | MODIFY_USER_NAME, | 192 | MODIFY_USER_NAME, |
| 190 | </if> | 193 | </if> |
| 194 | + <if test="uploadRecordId != null"> | ||
| 195 | + UPLOAD_RECORD_ID, | ||
| 196 | + </if> | ||
| 191 | </trim> | 197 | </trim> |
| 192 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 198 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 193 | #{id,jdbcType=NUMERIC}, | 199 | #{id,jdbcType=NUMERIC}, |
| ... | @@ -239,6 +245,9 @@ | ... | @@ -239,6 +245,9 @@ |
| 239 | <if test="modifyUserName != null"> | 245 | <if test="modifyUserName != null"> |
| 240 | #{modifyUserName,jdbcType=VARCHAR}, | 246 | #{modifyUserName,jdbcType=VARCHAR}, |
| 241 | </if> | 247 | </if> |
| 248 | + <if test="uploadRecordId != null"> | ||
| 249 | + #{uploadRecordId,jdbcType=NUMERIC}, | ||
| 250 | + </if> | ||
| 242 | </trim> | 251 | </trim> |
| 243 | </insert> | 252 | </insert> |
| 244 | <select id="countByExample" parameterType="com.fedex.connect.common.model.biz.PushObExample" resultType="java.lang.Long"> | 253 | <select id="countByExample" parameterType="com.fedex.connect.common.model.biz.PushObExample" resultType="java.lang.Long"> |
| ... | @@ -301,6 +310,9 @@ | ... | @@ -301,6 +310,9 @@ |
| 301 | <if test="record.modifyUserName != null"> | 310 | <if test="record.modifyUserName != null"> |
| 302 | MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR}, | 311 | MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR}, |
| 303 | </if> | 312 | </if> |
| 313 | + <if test="record.uploadRecordId != null"> | ||
| 314 | + UPLOAD_RECORD_ID = #{record.uploadRecordId,jdbcType=NUMERIC}, | ||
| 315 | + </if> | ||
| 304 | </set> | 316 | </set> |
| 305 | <if test="_parameter != null"> | 317 | <if test="_parameter != null"> |
| 306 | <include refid="Update_By_Example_Where_Clause" /> | 318 | <include refid="Update_By_Example_Where_Clause" /> |
| ... | @@ -324,7 +336,8 @@ | ... | @@ -324,7 +336,8 @@ |
| 324 | CREATE_USER_NAME = #{record.createUserName,jdbcType=VARCHAR}, | 336 | CREATE_USER_NAME = #{record.createUserName,jdbcType=VARCHAR}, |
| 325 | MODIFY_TIME = #{record.modifyTime,jdbcType=TIMESTAMP}, | 337 | MODIFY_TIME = #{record.modifyTime,jdbcType=TIMESTAMP}, |
| 326 | MODIFY_USER_ID = #{record.modifyUserId,jdbcType=NUMERIC}, | 338 | MODIFY_USER_ID = #{record.modifyUserId,jdbcType=NUMERIC}, |
| 327 | - MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR} | 339 | + MODIFY_USER_NAME = #{record.modifyUserName,jdbcType=VARCHAR}, |
| 340 | + UPLOAD_RECORD_ID = #{record.uploadRecordId,jdbcType=NUMERIC} | ||
| 328 | <if test="_parameter != null"> | 341 | <if test="_parameter != null"> |
| 329 | <include refid="Update_By_Example_Where_Clause" /> | 342 | <include refid="Update_By_Example_Where_Clause" /> |
| 330 | </if> | 343 | </if> |
| ... | @@ -380,6 +393,9 @@ | ... | @@ -380,6 +393,9 @@ |
| 380 | <if test="modifyUserName != null"> | 393 | <if test="modifyUserName != null"> |
| 381 | MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR}, | 394 | MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR}, |
| 382 | </if> | 395 | </if> |
| 396 | + <if test="uploadRecordId != null"> | ||
| 397 | + UPLOAD_RECORD_ID = #{uploadRecordId,jdbcType=NUMERIC}, | ||
| 398 | + </if> | ||
| 383 | </set> | 399 | </set> |
| 384 | where ID = #{id,jdbcType=NUMERIC} | 400 | where ID = #{id,jdbcType=NUMERIC} |
| 385 | </update> | 401 | </update> |
| ... | @@ -400,7 +416,8 @@ | ... | @@ -400,7 +416,8 @@ |
| 400 | CREATE_USER_NAME = #{createUserName,jdbcType=VARCHAR}, | 416 | CREATE_USER_NAME = #{createUserName,jdbcType=VARCHAR}, |
| 401 | MODIFY_TIME = #{modifyTime,jdbcType=TIMESTAMP}, | 417 | MODIFY_TIME = #{modifyTime,jdbcType=TIMESTAMP}, |
| 402 | MODIFY_USER_ID = #{modifyUserId,jdbcType=NUMERIC}, | 418 | MODIFY_USER_ID = #{modifyUserId,jdbcType=NUMERIC}, |
| 403 | - MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR} | 419 | + MODIFY_USER_NAME = #{modifyUserName,jdbcType=VARCHAR}, |
| 420 | + UPLOAD_RECORD_ID = #{uploadRecordId,jdbcType=NUMERIC} | ||
| 404 | where ID = #{id,jdbcType=NUMERIC} | 421 | where ID = #{id,jdbcType=NUMERIC} |
| 405 | </update> | 422 | </update> |
| 406 | <sql id="OracleDialectPrefix"> | 423 | <sql id="OracleDialectPrefix"> | ... | ... |
| ... | @@ -94,6 +94,11 @@ public class PushOb implements Serializable { | ... | @@ -94,6 +94,11 @@ public class PushOb implements Serializable { |
| 94 | */ | 94 | */ |
| 95 | private String modifyUserName; | 95 | private String modifyUserName; |
| 96 | 96 | ||
| 97 | + /** | ||
| 98 | + * 用户上传记录表ID | ||
| 99 | + */ | ||
| 100 | + private Long uploadRecordId; | ||
| 101 | + | ||
| 97 | private static final long serialVersionUID = 1L; | 102 | private static final long serialVersionUID = 1L; |
| 98 | 103 | ||
| 99 | public Long getId() { | 104 | public Long getId() { |
| ... | @@ -232,6 +237,14 @@ public class PushOb implements Serializable { | ... | @@ -232,6 +237,14 @@ public class PushOb implements Serializable { |
| 232 | this.modifyUserName = modifyUserName == null ? null : modifyUserName.trim(); | 237 | this.modifyUserName = modifyUserName == null ? null : modifyUserName.trim(); |
| 233 | } | 238 | } |
| 234 | 239 | ||
| 240 | + public Long getUploadRecordId() { | ||
| 241 | + return uploadRecordId; | ||
| 242 | + } | ||
| 243 | + | ||
| 244 | + public void setUploadRecordId(Long uploadRecordId) { | ||
| 245 | + this.uploadRecordId = uploadRecordId; | ||
| 246 | + } | ||
| 247 | + | ||
| 235 | @Override | 248 | @Override |
| 236 | public String toString() { | 249 | public String toString() { |
| 237 | StringBuilder sb = new StringBuilder(); | 250 | StringBuilder sb = new StringBuilder(); |
| ... | @@ -255,6 +268,7 @@ public class PushOb implements Serializable { | ... | @@ -255,6 +268,7 @@ public class PushOb implements Serializable { |
| 255 | sb.append(", modifyTime=").append(modifyTime); | 268 | sb.append(", modifyTime=").append(modifyTime); |
| 256 | sb.append(", modifyUserId=").append(modifyUserId); | 269 | sb.append(", modifyUserId=").append(modifyUserId); |
| 257 | sb.append(", modifyUserName=").append(modifyUserName); | 270 | sb.append(", modifyUserName=").append(modifyUserName); |
| 271 | + sb.append(", uploadRecordId=").append(uploadRecordId); | ||
| 258 | sb.append(", serialVersionUID=").append(serialVersionUID); | 272 | sb.append(", serialVersionUID=").append(serialVersionUID); |
| 259 | sb.append("]"); | 273 | sb.append("]"); |
| 260 | return sb.toString(); | 274 | return sb.toString(); | ... | ... |
| ... | @@ -35,12 +35,12 @@ public class PushObDetail implements Serializable { | ... | @@ -35,12 +35,12 @@ public class PushObDetail implements Serializable { |
| 35 | private String statusName; | 35 | private String statusName; |
| 36 | 36 | ||
| 37 | /** | 37 | /** |
| 38 | - * 推送文件类型字典CODE,关联数据字典表。指定字典目录CODE:PUSH_OB_FILE_TYPE | 38 | + * 推送文件类型字典CODE,关联数据字典表。指定字典目录CODE:ATTACHMENT_BIZ_TYPE,取值Ext1 字段值 |
| 39 | */ | 39 | */ |
| 40 | private String fileTypeCode; | 40 | private String fileTypeCode; |
| 41 | 41 | ||
| 42 | /** | 42 | /** |
| 43 | - * 推送文件类型名称(XXX、XXX) | 43 | + * 推送文件类型名称(AWB、INV、PKL、OTH) |
| 44 | */ | 44 | */ |
| 45 | private String fileType; | 45 | private String fileType; |
| 46 | 46 | ... | ... |
| ... | @@ -1234,6 +1234,66 @@ public class PushObExample { | ... | @@ -1234,6 +1234,66 @@ public class PushObExample { |
| 1234 | addCriterion("MODIFY_USER_NAME not between", value1, value2, "modifyUserName"); | 1234 | addCriterion("MODIFY_USER_NAME not between", value1, value2, "modifyUserName"); |
| 1235 | return (Criteria) this; | 1235 | return (Criteria) this; |
| 1236 | } | 1236 | } |
| 1237 | + | ||
| 1238 | + public Criteria andUploadRecordIdIsNull() { | ||
| 1239 | + addCriterion("UPLOAD_RECORD_ID is null"); | ||
| 1240 | + return (Criteria) this; | ||
| 1241 | + } | ||
| 1242 | + | ||
| 1243 | + public Criteria andUploadRecordIdIsNotNull() { | ||
| 1244 | + addCriterion("UPLOAD_RECORD_ID is not null"); | ||
| 1245 | + return (Criteria) this; | ||
| 1246 | + } | ||
| 1247 | + | ||
| 1248 | + public Criteria andUploadRecordIdEqualTo(Long value) { | ||
| 1249 | + addCriterion("UPLOAD_RECORD_ID =", value, "uploadRecordId"); | ||
| 1250 | + return (Criteria) this; | ||
| 1251 | + } | ||
| 1252 | + | ||
| 1253 | + public Criteria andUploadRecordIdNotEqualTo(Long value) { | ||
| 1254 | + addCriterion("UPLOAD_RECORD_ID <>", value, "uploadRecordId"); | ||
| 1255 | + return (Criteria) this; | ||
| 1256 | + } | ||
| 1257 | + | ||
| 1258 | + public Criteria andUploadRecordIdGreaterThan(Long value) { | ||
| 1259 | + addCriterion("UPLOAD_RECORD_ID >", value, "uploadRecordId"); | ||
| 1260 | + return (Criteria) this; | ||
| 1261 | + } | ||
| 1262 | + | ||
| 1263 | + public Criteria andUploadRecordIdGreaterThanOrEqualTo(Long value) { | ||
| 1264 | + addCriterion("UPLOAD_RECORD_ID >=", value, "uploadRecordId"); | ||
| 1265 | + return (Criteria) this; | ||
| 1266 | + } | ||
| 1267 | + | ||
| 1268 | + public Criteria andUploadRecordIdLessThan(Long value) { | ||
| 1269 | + addCriterion("UPLOAD_RECORD_ID <", value, "uploadRecordId"); | ||
| 1270 | + return (Criteria) this; | ||
| 1271 | + } | ||
| 1272 | + | ||
| 1273 | + public Criteria andUploadRecordIdLessThanOrEqualTo(Long value) { | ||
| 1274 | + addCriterion("UPLOAD_RECORD_ID <=", value, "uploadRecordId"); | ||
| 1275 | + return (Criteria) this; | ||
| 1276 | + } | ||
| 1277 | + | ||
| 1278 | + public Criteria andUploadRecordIdIn(List<Long> values) { | ||
| 1279 | + addCriterion("UPLOAD_RECORD_ID in", values, "uploadRecordId"); | ||
| 1280 | + return (Criteria) this; | ||
| 1281 | + } | ||
| 1282 | + | ||
| 1283 | + public Criteria andUploadRecordIdNotIn(List<Long> values) { | ||
| 1284 | + addCriterion("UPLOAD_RECORD_ID not in", values, "uploadRecordId"); | ||
| 1285 | + return (Criteria) this; | ||
| 1286 | + } | ||
| 1287 | + | ||
| 1288 | + public Criteria andUploadRecordIdBetween(Long value1, Long value2) { | ||
| 1289 | + addCriterion("UPLOAD_RECORD_ID between", value1, value2, "uploadRecordId"); | ||
| 1290 | + return (Criteria) this; | ||
| 1291 | + } | ||
| 1292 | + | ||
| 1293 | + public Criteria andUploadRecordIdNotBetween(Long value1, Long value2) { | ||
| 1294 | + addCriterion("UPLOAD_RECORD_ID not between", value1, value2, "uploadRecordId"); | ||
| 1295 | + return (Criteria) this; | ||
| 1296 | + } | ||
| 1237 | } | 1297 | } |
| 1238 | 1298 | ||
| 1239 | public static class Criteria extends GeneratedCriteria { | 1299 | public static class Criteria extends GeneratedCriteria { | ... | ... |
| ... | @@ -40,7 +40,7 @@ | ... | @@ -40,7 +40,7 @@ |
| 40 | sys:系统 系统相关表,例如kafka表 | 40 | sys:系统 系统相关表,例如kafka表 |
| 41 | log: 日志 日志记录表,例如邮件发送日志表 | 41 | log: 日志 日志记录表,例如邮件发送日志表 |
| 42 | --> | 42 | --> |
| 43 | - <javaModelGenerator targetPackage="com.fedex.connect.common.model.sys" targetProject="src/main/java"> | 43 | + <javaModelGenerator targetPackage="com.fedex.connect.common.model.biz" targetProject="src/main/java"> |
| 44 | <!---enableSubPackages:如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性--> | 44 | <!---enableSubPackages:如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性--> |
| 45 | <property name="enableSubPackages" value="false"/> | 45 | <property name="enableSubPackages" value="false"/> |
| 46 | <!--该属性只对MyBatis3有效,如果true就会使用构造方法入参,如果false就会使用setter方式。默认为false--> | 46 | <!--该属性只对MyBatis3有效,如果true就会使用构造方法入参,如果false就会使用setter方式。默认为false--> |
| ... | @@ -52,13 +52,13 @@ | ... | @@ -52,13 +52,13 @@ |
| 52 | </javaModelGenerator> | 52 | </javaModelGenerator> |
| 53 | 53 | ||
| 54 | <!-- 生成映射文件*.xml的位置--> | 54 | <!-- 生成映射文件*.xml的位置--> |
| 55 | - <sqlMapGenerator targetPackage="mapper.sys" targetProject="src/main/java/com/fedex/connect/common"> | 55 | + <sqlMapGenerator targetPackage="mapper.biz" targetProject="src/main/java/com/fedex/connect/common"> |
| 56 | <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false--> | 56 | <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false--> |
| 57 | <property name="enableSubPackages" value="false"/> | 57 | <property name="enableSubPackages" value="false"/> |
| 58 | </sqlMapGenerator> | 58 | </sqlMapGenerator> |
| 59 | 59 | ||
| 60 | <!-- 生成DAO的包名和位置 --> | 60 | <!-- 生成DAO的包名和位置 --> |
| 61 | - <javaClientGenerator type="XMLMAPPER" targetPackage="com.fedex.connect.common.dao.sys" targetProject="src/main/java"> | 61 | + <javaClientGenerator type="XMLMAPPER" targetPackage="com.fedex.connect.common.dao.biz" targetProject="src/main/java"> |
| 62 | <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false--> | 62 | <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false--> |
| 63 | <property name="enableSubPackages" value="false"/> | 63 | <property name="enableSubPackages" value="false"/> |
| 64 | </javaClientGenerator> | 64 | </javaClientGenerator> |
| ... | @@ -135,14 +135,12 @@ | ... | @@ -135,14 +135,12 @@ |
| 135 | <!-- selectByExampleQueryId="true">--> | 135 | <!-- selectByExampleQueryId="true">--> |
| 136 | <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB.NEXTVAL FROM DUAL" />--> | 136 | <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB.NEXTVAL FROM DUAL" />--> |
| 137 | <!-- </table>--> | 137 | <!-- </table>--> |
| 138 | -<!-- <table tableName="T_BIZ_PUSH_OB_DETAIL" domainObjectName="PushObDetail"--> | 138 | + <table tableName="T_BIZ_PUSH_OB_DETAIL" domainObjectName="PushObDetail" |
| 139 | -<!-- enableCountByExample="true" enableUpdateByExample="true"--> | 139 | + enableCountByExample="true" enableUpdateByExample="true" |
| 140 | -<!-- enableDeleteByExample="true" enableSelectByExample="true"--> | 140 | + enableDeleteByExample="true" enableSelectByExample="true" |
| 141 | -<!-- selectByExampleQueryId="true">--> | 141 | + selectByExampleQueryId="true"> |
| 142 | -<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB_DETAIL.NEXTVAL FROM DUAL" />--> | 142 | + <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB_DETAIL.NEXTVAL FROM DUAL" /> |
| 143 | -<!-- </table>--> | 143 | + </table> |
| 144 | - | ||
| 145 | - | ||
| 146 | 144 | ||
| 147 | <!-- <table tableName="T_BI_PORTCLEAR_EMAIL_MAPPING" domainObjectName="PortclearEmailMapping"--> | 145 | <!-- <table tableName="T_BI_PORTCLEAR_EMAIL_MAPPING" domainObjectName="PortclearEmailMapping"--> |
| 148 | <!-- enableCountByExample="true" enableUpdateByExample="true"--> | 146 | <!-- enableCountByExample="true" enableUpdateByExample="true"--> |
| ... | @@ -169,12 +167,12 @@ | ... | @@ -169,12 +167,12 @@ |
| 169 | <!-- selectByExampleQueryId="true">--> | 167 | <!-- selectByExampleQueryId="true">--> |
| 170 | <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL" />--> | 168 | <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL" />--> |
| 171 | <!-- </table>--> | 169 | <!-- </table>--> |
| 172 | - <table schema="ICLEARIMP" tableName="T_SYS_PARAM_CONFIG" domainObjectName="ParamConfig" | 170 | +<!-- <table schema="ICLEARIMP" tableName="T_SYS_PARAM_CONFIG" domainObjectName="ParamConfig"--> |
| 173 | - enableCountByExample="true" enableUpdateByExample="true" | 171 | +<!-- enableCountByExample="true" enableUpdateByExample="true"--> |
| 174 | - enableDeleteByExample="true" enableSelectByExample="true" | 172 | +<!-- enableDeleteByExample="true" enableSelectByExample="true"--> |
| 175 | - selectByExampleQueryId="true"> | 173 | +<!-- selectByExampleQueryId="true">--> |
| 176 | - <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL" /> | 174 | +<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL" />--> |
| 177 | - </table> | 175 | +<!-- </table>--> |
| 178 | <!-- <table tableName="T_SYS_PRIVILEGE" domainObjectName="Privilege"--> | 176 | <!-- <table tableName="T_SYS_PRIVILEGE" domainObjectName="Privilege"--> |
| 179 | <!-- enableCountByExample="true" enableUpdateByExample="true"--> | 177 | <!-- enableCountByExample="true" enableUpdateByExample="true"--> |
| 180 | <!-- enableDeleteByExample="true" enableSelectByExample="true"--> | 178 | <!-- enableDeleteByExample="true" enableSelectByExample="true"--> |
| ... | @@ -193,12 +191,12 @@ | ... | @@ -193,12 +191,12 @@ |
| 193 | <!-- selectByExampleQueryId="true">--> | 191 | <!-- selectByExampleQueryId="true">--> |
| 194 | <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_ROLE_PRIVILEGE.NEXTVAL FROM DUAL" />--> | 192 | <!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_ROLE_PRIVILEGE.NEXTVAL FROM DUAL" />--> |
| 195 | <!-- </table>--> | 193 | <!-- </table>--> |
| 196 | - <table schema="ICLEARIMP" tableName="T_SYS_USER" domainObjectName="User" | 194 | +<!-- <table schema="ICLEARIMP" tableName="T_SYS_USER" domainObjectName="User"--> |
| 197 | - enableCountByExample="true" enableUpdateByExample="true" | 195 | +<!-- enableCountByExample="true" enableUpdateByExample="true"--> |
| 198 | - enableDeleteByExample="true" enableSelectByExample="true" | 196 | +<!-- enableDeleteByExample="true" enableSelectByExample="true"--> |
| 199 | - selectByExampleQueryId="true"> | 197 | +<!-- selectByExampleQueryId="true">--> |
| 200 | - <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL" /> | 198 | +<!-- <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL" />--> |
| 201 | - </table> | 199 | +<!-- </table>--> |
| 202 | <!-- <table schema="ICLEARIMP" tableName="T_SYS_USER_ROLE" domainObjectName="UserRole"--> | 200 | <!-- <table schema="ICLEARIMP" tableName="T_SYS_USER_ROLE" domainObjectName="UserRole"--> |
| 203 | <!-- enableCountByExample="true" enableUpdateByExample="true"--> | 201 | <!-- enableCountByExample="true" enableUpdateByExample="true"--> |
| 204 | <!-- enableDeleteByExample="true" enableSelectByExample="true"--> | 202 | <!-- enableDeleteByExample="true" enableSelectByExample="true"--> | ... | ... |
| ... | @@ -70,7 +70,7 @@ public interface BaseSeparatorConstants { | ... | @@ -70,7 +70,7 @@ public interface BaseSeparatorConstants { |
| 70 | String SEPARATOR_ASTERISK = "*"; | 70 | String SEPARATOR_ASTERISK = "*"; |
| 71 | 71 | ||
| 72 | /** | 72 | /** |
| 73 | - * @Description 星号 | 73 | + * @Description 反斜杠 |
| 74 | * @Author mt | 74 | * @Author mt |
| 75 | * @Date 2024-11-11 | 75 | * @Date 2024-11-11 |
| 76 | */ | 76 | */ | ... | ... |
| ... | @@ -24,6 +24,7 @@ public class DateUtil { | ... | @@ -24,6 +24,7 @@ public class DateUtil { |
| 24 | public static final String PATTERN_DATE_TIME_ORACLE = "yyyy-MM-dd hh:mi:ss"; | 24 | public static final String PATTERN_DATE_TIME_ORACLE = "yyyy-MM-dd hh:mi:ss"; |
| 25 | public static final String PATTERN_DATE_TIME_MS = "yyyy-mm-dd hh24:mi:ss"; | 25 | public static final String PATTERN_DATE_TIME_MS = "yyyy-mm-dd hh24:mi:ss"; |
| 26 | public static final String PATTERN_yyyyMMddHHmmss = "yyyyMMddHHmmss"; | 26 | public static final String PATTERN_yyyyMMddHHmmss = "yyyyMMddHHmmss"; |
| 27 | + public static final String YYYYMMDDHH24MMSSSSS = "yyyyMMddHHmmssSSS"; | ||
| 27 | 28 | ||
| 28 | private static SimpleDateFormat dateFormat = new SimpleDateFormat(); | 29 | private static SimpleDateFormat dateFormat = new SimpleDateFormat(); |
| 29 | 30 | ||
| ... | @@ -47,6 +48,19 @@ public class DateUtil { | ... | @@ -47,6 +48,19 @@ public class DateUtil { |
| 47 | dateFormat.applyPattern(PATTERN_DATE_TIME); | 48 | dateFormat.applyPattern(PATTERN_DATE_TIME); |
| 48 | return dateFormat.format(date); | 49 | return dateFormat.format(date); |
| 49 | } | 50 | } |
| 51 | + | ||
| 52 | + /** | ||
| 53 | + * 用默认格式格式化日期 | ||
| 54 | + * | ||
| 55 | + * @param date | ||
| 56 | + * @return | ||
| 57 | + */ | ||
| 58 | + public static String yyyyMMddHH24mmssSSS(Date date) { | ||
| 59 | + SimpleDateFormat dateFormat = new SimpleDateFormat(); | ||
| 60 | + dateFormat.applyPattern(YYYYMMDDHH24MMSSSSS); | ||
| 61 | + return dateFormat.format(date); | ||
| 62 | + } | ||
| 63 | + | ||
| 50 | /** | 64 | /** |
| 51 | * 用指定格式格式化日期 | 65 | * 用指定格式格式化日期 |
| 52 | * | 66 | * | ... | ... |
| ... | @@ -262,4 +262,43 @@ public class NIOFileUtils { | ... | @@ -262,4 +262,43 @@ public class NIOFileUtils { |
| 262 | } | 262 | } |
| 263 | return false; | 263 | return false; |
| 264 | } | 264 | } |
| 265 | + | ||
| 266 | + /** | ||
| 267 | + * @Author mt | ||
| 268 | + * @Description 移动文件 | ||
| 269 | + * @Date 2024/5/30 | ||
| 270 | + * @param sourcePath | ||
| 271 | + * @param targetPath | ||
| 272 | + * @return void | ||
| 273 | + */ | ||
| 274 | + public void moveFile(String sourcePath,String targetPath) throws Exception{ | ||
| 275 | + //覆盖方式移动 | ||
| 276 | + Files.move(Paths.get(sourcePath),Paths.get(targetPath),StandardCopyOption.REPLACE_EXISTING); | ||
| 277 | + } | ||
| 278 | + | ||
| 279 | + /** | ||
| 280 | + * @Author mt | ||
| 281 | + * @Description 判断文件是否存在 | ||
| 282 | + * @Date 2024/9/10 | ||
| 283 | + * @param filePath | ||
| 284 | + * @return boolean | ||
| 285 | + */ | ||
| 286 | + public boolean fileExists(String filePath){ | ||
| 287 | + return new File(filePath).exists(); | ||
| 288 | + } | ||
| 289 | + | ||
| 290 | + /** | ||
| 291 | + * @Author mt | ||
| 292 | + * @Description 如果文件夹不存在则创建文件夹 | ||
| 293 | + * @Date 2024/5/29 | ||
| 294 | + * @param targetFolder | ||
| 295 | + * @return void | ||
| 296 | + */ | ||
| 297 | + public void mkdirs(String targetFolder){ | ||
| 298 | + File folder = new File(targetFolder); | ||
| 299 | + // 文件夹不存在,则创建文件夹 | ||
| 300 | + if (!folder.exists()) { | ||
| 301 | + folder.mkdirs(); | ||
| 302 | + } | ||
| 303 | + } | ||
| 265 | } | 304 | } | ... | ... |
| ... | @@ -497,7 +497,7 @@ public class StringExtUtil { | ... | @@ -497,7 +497,7 @@ public class StringExtUtil { |
| 497 | * @param val ID值 | 497 | * @param val ID值 |
| 498 | * @return | 498 | * @return |
| 499 | */ | 499 | */ |
| 500 | - public static String idLeftPadStr(Long val){ | 500 | + public static String idLeftPadStr(Long val, Integer len){ |
| 501 | if (val == null){ | 501 | if (val == null){ |
| 502 | return null; | 502 | return null; |
| 503 | } | 503 | } |
| ... | @@ -505,9 +505,8 @@ public class StringExtUtil { | ... | @@ -505,9 +505,8 @@ public class StringExtUtil { |
| 505 | return "0"; | 505 | return "0"; |
| 506 | } | 506 | } |
| 507 | String valStr = val.toString(); | 507 | String valStr = val.toString(); |
| 508 | - int len = valStr.length(); | 508 | + if (valStr.length() <= len){ |
| 509 | - if (valStr.length() <= 10){ | 509 | + return StringUtils.leftPad(valStr,len,"0"); |
| 510 | - return StringUtils.leftPad(valStr,10,"0"); | ||
| 511 | } else { | 510 | } else { |
| 512 | return valStr; | 511 | return valStr; |
| 513 | } | 512 | } |
| ... | @@ -554,4 +553,10 @@ public class StringExtUtil { | ... | @@ -554,4 +553,10 @@ public class StringExtUtil { |
| 554 | } | 553 | } |
| 555 | } | 554 | } |
| 556 | 555 | ||
| 556 | + public static void main(String[] args){ | ||
| 557 | + String fileName = "202410271_20241027113156.pdf"; | ||
| 558 | + String f = fileName.substring(fileName.lastIndexOf(".")); | ||
| 559 | + System.out.println(f); | ||
| 560 | + } | ||
| 561 | + | ||
| 557 | } | 562 | } | ... | ... |
| ... | @@ -75,4 +75,17 @@ public class PropertiesConfig { | ... | @@ -75,4 +75,17 @@ public class PropertiesConfig { |
| 75 | 75 | ||
| 76 | @Value("${export.mail.sendEmail.password}") | 76 | @Value("${export.mail.sendEmail.password}") |
| 77 | String emailPassword; | 77 | String emailPassword; |
| 78 | + | ||
| 79 | + //基础路径 | ||
| 80 | + @Value("${imp001.path.work}") | ||
| 81 | + String imp001PathWork; | ||
| 82 | + //zip输出目录 | ||
| 83 | + @Value("${imp001.path.final}") | ||
| 84 | + String imp001PathFinal; | ||
| 85 | + //文件备份目录 | ||
| 86 | + @Value("${imp001.path.bak}") | ||
| 87 | + String imp001PathBak; | ||
| 88 | + //文件异常文件存放目录 | ||
| 89 | + @Value("${imp001.path.error}") | ||
| 90 | + String imp001PathError; | ||
| 78 | } | 91 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -6,7 +6,11 @@ package com.fedex.connect.task.constants; | ... | @@ -6,7 +6,11 @@ package com.fedex.connect.task.constants; |
| 6 | * @Date 2024/4/18 | 6 | * @Date 2024/4/18 |
| 7 | */ | 7 | */ |
| 8 | public interface Constant { | 8 | public interface Constant { |
| 9 | - //TW001表头信息 | 9 | + /** |
| 10 | + * @Author mt | ||
| 11 | + * @Description IMP001表头信息 | ||
| 12 | + * @Date 2024/12/18 | ||
| 13 | + */ | ||
| 10 | interface IMP001_HEAD_KEYS{ | 14 | interface IMP001_HEAD_KEYS{ |
| 11 | /** | 15 | /** |
| 12 | * 消息代码:IMP001报文标志 | 16 | * 消息代码:IMP001报文标志 |
| ... | @@ -15,14 +19,18 @@ public interface Constant { | ... | @@ -15,14 +19,18 @@ public interface Constant { |
| 15 | /** | 19 | /** |
| 16 | * 发送程序ID:TWEXP | 20 | * 发送程序ID:TWEXP |
| 17 | */ | 21 | */ |
| 18 | - String SENDER_ID = "TWEXP"; | 22 | + String SENDER_ID = "PreCLR"; |
| 19 | /** | 23 | /** |
| 20 | * 接受程序ID:IMP | 24 | * 接受程序ID:IMP |
| 21 | */ | 25 | */ |
| 22 | String RECEIVER_ID = "IMP"; | 26 | String RECEIVER_ID = "IMP"; |
| 23 | } | 27 | } |
| 24 | 28 | ||
| 25 | - //文件后缀字符串keys | 29 | + /** |
| 30 | + * @Author mt | ||
| 31 | + * @Description 文件后缀字符串keys | ||
| 32 | + * @Date 2024/12/18 | ||
| 33 | + */ | ||
| 26 | interface FILE_SUFFIX_KEYS{ | 34 | interface FILE_SUFFIX_KEYS{ |
| 27 | /** | 35 | /** |
| 28 | * json字符串 | 36 | * json字符串 | ... | ... |
server/task-schedule/src/main/java/com/fedex/connect/task/data/bo/Imp001FileInfoBo.java
deleted
100644 → 0
| 1 | -package com.fedex.connect.task.data.bo; | ||
| 2 | - | ||
| 3 | -import lombok.Data; | ||
| 4 | - | ||
| 5 | -import java.util.Date; | ||
| 6 | - | ||
| 7 | -/** | ||
| 8 | - * @Author mt | ||
| 9 | - * @Description 类说明 文件信息bo | ||
| 10 | - * @Date 2024/5/30 | ||
| 11 | - */ | ||
| 12 | -@Data | ||
| 13 | -public class Imp001FileInfoBo { | ||
| 14 | - //文件类型id | ||
| 15 | - Long fileTypeId; | ||
| 16 | - //文件类型名称 | ||
| 17 | - String fileTypeName; | ||
| 18 | - //文件名称 | ||
| 19 | - String fileName; | ||
| 20 | - //生成时间 | ||
| 21 | - Date pushTime; | ||
| 22 | -} |
| 1 | package com.fedex.connect.task.data.bo; | 1 | package com.fedex.connect.task.data.bo; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.model.bi.DictionaryEntries; | 3 | +import com.fedex.connect.task.data.dto.imp001.Imp001Files; |
| 4 | import com.fedex.connect.task.data.dto.imp001.Imp001RootJsonDto; | 4 | import com.fedex.connect.task.data.dto.imp001.Imp001RootJsonDto; |
| 5 | import lombok.Data; | 5 | import lombok.Data; |
| 6 | 6 | ||
| 7 | -import java.util.Dictionary; | ||
| 8 | -import java.util.List; | ||
| 9 | - | ||
| 10 | /** | 7 | /** |
| 11 | * @Author mt | 8 | * @Author mt |
| 12 | - * @Description 类说明 tw001生成bo | 9 | + * @Description 类说明 imp001生成bo |
| 13 | * @Date 2024/5/24 | 10 | * @Date 2024/5/24 |
| 14 | */ | 11 | */ |
| 15 | @Data | 12 | @Data |
| 16 | public class Imp001GenerateBo { | 13 | public class Imp001GenerateBo { |
| 17 | - //tw001报文对象 | 14 | + //运单号 |
| 15 | + String consignmentCode; | ||
| 16 | + //运单ID | ||
| 17 | + Long consignmentId; | ||
| 18 | + //imp001报文对象 | ||
| 18 | Imp001RootJsonDto imp001RootJsonDto; | 19 | Imp001RootJsonDto imp001RootJsonDto; |
| 19 | - //tw001临时文件夹目录 | 20 | + //imp001临时文件夹目录 |
| 20 | String workFilePath; | 21 | String workFilePath; |
| 21 | //需要打包压缩包文件信息名称 | 22 | //需要打包压缩包文件信息名称 |
| 22 | - List<Imp001FileInfoBo> fileInfoList; | 23 | + Imp001Files[] fileInfos; |
| 23 | - //json Dir对象 | ||
| 24 | - DictionaryEntries jsonDictionary; | ||
| 25 | //zip文件名称 | 24 | //zip文件名称 |
| 26 | String zipFileName; | 25 | String zipFileName; |
| 27 | //zip推送目标目录 | 26 | //zip推送目标目录 | ... | ... |
| ... | @@ -13,15 +13,14 @@ import java.io.Serializable; | ... | @@ -13,15 +13,14 @@ import java.io.Serializable; |
| 13 | public class Imp001Consignment implements Serializable { | 13 | public class Imp001Consignment implements Serializable { |
| 14 | /** | 14 | /** |
| 15 | * @Author mt | 15 | * @Author mt |
| 16 | - * @Description 提单号码 | 16 | + * @Description 每个报文只有一个12位运单号 |
| 17 | - * 12位数字,提单号码,可以重复 | 17 | + * @Date 2024年12月18日 |
| 18 | - * @Date 2024/5/23 | ||
| 19 | */ | 18 | */ |
| 20 | private String deliveryNo; | 19 | private String deliveryNo; |
| 21 | /** | 20 | /** |
| 22 | * @Author mt | 21 | * @Author mt |
| 23 | - * @Description 联络人 | 22 | + * @Description 运单附带文件数量 |
| 24 | - * @Date 2024/5/23 | 23 | + * @Date 2024年12月18日 |
| 25 | */ | 24 | */ |
| 26 | private Integer attachedFilesCount; | 25 | private Integer attachedFilesCount; |
| 27 | } | 26 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -24,7 +24,7 @@ public class Imp001Job { | ... | @@ -24,7 +24,7 @@ public class Imp001Job { |
| 24 | @ProcessingInterval(paramCode = ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_INTERVAL) | 24 | @ProcessingInterval(paramCode = ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_INTERVAL) |
| 25 | @Scheduled(cron = "${export.task.allocation.sendOb}") | 25 | @Scheduled(cron = "${export.task.allocation.sendOb}") |
| 26 | public void sendObTask() { | 26 | public void sendObTask() { |
| 27 | - //sendObService.sendOb(); | 27 | + sendObService.sendOb(); |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | /** | 30 | /** |
| ... | @@ -33,6 +33,6 @@ public class Imp001Job { | ... | @@ -33,6 +33,6 @@ public class Imp001Job { |
| 33 | @ProcessingInterval | 33 | @ProcessingInterval |
| 34 | @Scheduled(cron = "${export.task.allocation.sendObRetry}") | 34 | @Scheduled(cron = "${export.task.allocation.sendObRetry}") |
| 35 | public void sendObRetryTask() { | 35 | public void sendObRetryTask() { |
| 36 | - //sendObService.sendObRetry(); | 36 | + sendObService.sendObRetry(); |
| 37 | } | 37 | } |
| 38 | } | 38 | } | ... | ... |
server/task-schedule/src/main/java/com/fedex/connect/task/repository/base/AbstractDaoRepository.java
| 1 | package com.fedex.connect.task.repository.base; | 1 | package com.fedex.connect.task.repository.base; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dao.biz.AttachmentMapper; | 3 | +import com.fedex.connect.common.dao.biz.*; |
| 4 | -import com.fedex.connect.common.dao.biz.ConsignmentMapper; | ||
| 5 | -import com.fedex.connect.common.dao.biz.EmailMapper; | ||
| 6 | -import com.fedex.connect.common.dao.biz.PushObMapper; | ||
| 7 | import com.fedex.connect.common.dao.log.EmailHistoryMapper; | 4 | import com.fedex.connect.common.dao.log.EmailHistoryMapper; |
| 8 | import com.fedex.connect.common.dao.sys.KafkaStorageHistoryMapper; | 5 | import com.fedex.connect.common.dao.sys.KafkaStorageHistoryMapper; |
| 9 | import com.fedex.connect.common.dao.sys.KafkaTemporaryStorageMapper; | 6 | import com.fedex.connect.common.dao.sys.KafkaTemporaryStorageMapper; |
| ... | @@ -23,6 +20,8 @@ public class AbstractDaoRepository { | ... | @@ -23,6 +20,8 @@ public class AbstractDaoRepository { |
| 23 | @Autowired | 20 | @Autowired |
| 24 | protected PushObMapper pushObMapper; | 21 | protected PushObMapper pushObMapper; |
| 25 | @Autowired | 22 | @Autowired |
| 23 | + protected PushObDetailMapper pushObDetailMapper; | ||
| 24 | + @Autowired | ||
| 26 | protected KafkaTemporaryStorageMapperExt kafkaTemporaryStorageMapperExt; | 25 | protected KafkaTemporaryStorageMapperExt kafkaTemporaryStorageMapperExt; |
| 27 | @Autowired | 26 | @Autowired |
| 28 | protected RedisSlabMapperExt redisSlabMapperExt; | 27 | protected RedisSlabMapperExt redisSlabMapperExt; | ... | ... |
| ... | @@ -15,10 +15,8 @@ public interface AttachmentExtMapper { | ... | @@ -15,10 +15,8 @@ public interface AttachmentExtMapper { |
| 15 | "WHERE a.BIZ_ID = #{bizId}") | 15 | "WHERE a.BIZ_ID = #{bizId}") |
| 16 | List<PushZipEmailDto> findAttachmentDetailsByBizId(@Param("bizId") Long bizId); | 16 | List<PushZipEmailDto> findAttachmentDetailsByBizId(@Param("bizId") Long bizId); |
| 17 | 17 | ||
| 18 | - @Select("SELECT * FROM T_BIZ_ATTACHMENT WHERE UPLOAD_RECORD_ID = " + | 18 | + @Select("SELECT * FROM T_BIZ_ATTACHMENT WHERE UPLOAD_RECORD_ID = #{uploadRecordId} AND BIZ_ID = #{consignmentId} AND STATUS = 1") |
| 19 | - "(SELECT MAX(ID) FROM T_BIZ_UPLOAD_RECORD WHERE " + | 19 | + List<Attachment> queryAttachmentInfo(@Param("uploadRecordId") Long uploadRecordId,@Param("consignmentId") Long consignmentId); |
| 20 | - " CONSIGNMENT_ID = #{consignmentId}) AND STATUS = 1") | ||
| 21 | - List<Attachment> queryAttachmentInfo(@Param("consignmentId") Long consignmentId); | ||
| 22 | 20 | ||
| 23 | /** | 21 | /** |
| 24 | * 根据修改日期查询数据 | 22 | * 根据修改日期查询数据 |
| ... | @@ -26,6 +24,6 @@ public interface AttachmentExtMapper { | ... | @@ -26,6 +24,6 @@ public interface AttachmentExtMapper { |
| 26 | * @return | 24 | * @return |
| 27 | */ | 25 | */ |
| 28 | @Select("SELECT * FROM T_BIZ_ATTACHMENT " + | 26 | @Select("SELECT * FROM T_BIZ_ATTACHMENT " + |
| 29 | - "WHERE MODIFY_TIME < TO_DATE(#{date}, 'YYYY-MM-DD') AND STATUS = 1") | 27 | + "WHERE MODIFY_TIME < TO_DATE(#{date}, 'YYYY-MM-DD') AND STATUS = 1") |
| 30 | List<Attachment> findAttachmentsOlderThan(@Param("date") String date); | 28 | List<Attachment> findAttachmentsOlderThan(@Param("date") String date); |
| 31 | } | 29 | } | ... | ... |
| ... | @@ -10,7 +10,7 @@ public interface IAttachmentRepository { | ... | @@ -10,7 +10,7 @@ public interface IAttachmentRepository { |
| 10 | 10 | ||
| 11 | List<PushZipEmailDto> findAttachmentDetailsByBizId(@Param("bizId") Long bizId); | 11 | List<PushZipEmailDto> findAttachmentDetailsByBizId(@Param("bizId") Long bizId); |
| 12 | 12 | ||
| 13 | - List<Attachment> queryAttachmentInfo(Long consignmentId); | 13 | + List<Attachment> queryAttachmentInfo(Long uploadRecordId,Long consignmentId); |
| 14 | 14 | ||
| 15 | List<Attachment> findAttachmentsOlderThan(String date); | 15 | List<Attachment> findAttachmentsOlderThan(String date); |
| 16 | 16 | ... | ... |
| 1 | +package com.fedex.connect.task.repository.repo.biz; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.common.model.biz.PushObDetail; | ||
| 4 | + | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +public interface IPushObDetailRepository { | ||
| 8 | + /** | ||
| 9 | + * @Author mt | ||
| 10 | + * @Description 功能说明 批量插入 | ||
| 11 | + * @Date 2024/5/30 | ||
| 12 | + * @param record | ||
| 13 | + * @return void | ||
| 14 | + */ | ||
| 15 | + void batchInsert(List<PushObDetail> record); | ||
| 16 | +} |
| ... | @@ -17,8 +17,8 @@ public class AttachmentRepositoryImpl extends AbstractDaoRepository implements I | ... | @@ -17,8 +17,8 @@ public class AttachmentRepositoryImpl extends AbstractDaoRepository implements I |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | @Override | 19 | @Override |
| 20 | - public List<Attachment> queryAttachmentInfo(Long consignmentId){ | 20 | + public List<Attachment> queryAttachmentInfo(Long uploadRecordId,Long consignmentId){ |
| 21 | - return attachmentExtMapper.queryAttachmentInfo(consignmentId); | 21 | + return attachmentExtMapper.queryAttachmentInfo(uploadRecordId,consignmentId); |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | @Override | 24 | @Override | ... | ... |
| 1 | +package com.fedex.connect.task.repository.repo.biz.impl; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.common.dependencies.util.Utils; | ||
| 4 | +import com.fedex.connect.common.model.biz.PushObDetail; | ||
| 5 | +import com.fedex.connect.task.repository.base.AbstractDaoRepository; | ||
| 6 | +import com.fedex.connect.task.repository.repo.biz.IPushObDetailRepository; | ||
| 7 | +import org.springframework.stereotype.Repository; | ||
| 8 | + | ||
| 9 | +import java.util.List; | ||
| 10 | +import java.util.Objects; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * @Author mt | ||
| 14 | + * @Description 推送明细日志repository | ||
| 15 | + * @Date 2024/5/30 | ||
| 16 | + */ | ||
| 17 | +@Repository | ||
| 18 | +public class PushObDetailRepository extends AbstractDaoRepository implements IPushObDetailRepository { | ||
| 19 | + /** | ||
| 20 | + * @Author mt | ||
| 21 | + * @Description 功能说明 批量插入 | ||
| 22 | + * @Date 2024/5/30 | ||
| 23 | + * @param record | ||
| 24 | + * @return void | ||
| 25 | + */ | ||
| 26 | + public void batchInsert(List<PushObDetail> record){ | ||
| 27 | + Utils.listOf(record).stream().filter(Objects::nonNull).forEach(r->{ | ||
| 28 | + pushObDetailMapper.insert(r); | ||
| 29 | + }); | ||
| 30 | + } | ||
| 31 | +} |
| ... | @@ -3,6 +3,7 @@ package com.fedex.connect.task.service.base; | ... | @@ -3,6 +3,7 @@ package com.fedex.connect.task.service.base; |
| 3 | import com.fedex.connect.common.dependencies.repository.repo.sys.IRedisSlabRepository; | 3 | import com.fedex.connect.common.dependencies.repository.repo.sys.IRedisSlabRepository; |
| 4 | import com.fedex.connect.task.repository.repo.biz.IAttachmentRepository; | 4 | import com.fedex.connect.task.repository.repo.biz.IAttachmentRepository; |
| 5 | import com.fedex.connect.task.repository.repo.biz.IEmailRepository; | 5 | import com.fedex.connect.task.repository.repo.biz.IEmailRepository; |
| 6 | +import com.fedex.connect.task.repository.repo.biz.IPushObDetailRepository; | ||
| 6 | import com.fedex.connect.task.repository.repo.biz.IPushObRepository; | 7 | import com.fedex.connect.task.repository.repo.biz.IPushObRepository; |
| 7 | import com.fedex.connect.task.repository.repo.sys.IKafkaStorageHistoryRepository; | 8 | import com.fedex.connect.task.repository.repo.sys.IKafkaStorageHistoryRepository; |
| 8 | import com.fedex.connect.task.repository.repo.sys.IKafkaTemporaryStorageRepository; | 9 | import com.fedex.connect.task.repository.repo.sys.IKafkaTemporaryStorageRepository; |
| ... | @@ -31,5 +32,7 @@ public class BaseService { | ... | @@ -31,5 +32,7 @@ public class BaseService { |
| 31 | @Autowired | 32 | @Autowired |
| 32 | protected IPushObRepository pushObRepository; | 33 | protected IPushObRepository pushObRepository; |
| 33 | @Autowired | 34 | @Autowired |
| 35 | + protected IPushObDetailRepository pushObDetailRepository; | ||
| 36 | + @Autowired | ||
| 34 | protected IParamConfigRepository paramConfigRepository; | 37 | protected IParamConfigRepository paramConfigRepository; |
| 35 | } | 38 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
server/task-schedule/src/main/java/com/fedex/connect/task/service/biz/IPushObDetailService.java
0 → 100644
| 1 | +package com.fedex.connect.task.service.biz; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.common.model.biz.PushObDetail; | ||
| 4 | + | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +public interface IPushObDetailService { | ||
| 8 | + /** | ||
| 9 | + * @Author mt | ||
| 10 | + * @Description 功能说明 批量插入 | ||
| 11 | + * @Date 2024/5/30 | ||
| 12 | + * @param record | ||
| 13 | + * @return void | ||
| 14 | + */ | ||
| 15 | + void batchInsert(List<PushObDetail> record); | ||
| 16 | +} |
| 1 | package com.fedex.connect.task.service.biz; | 1 | package com.fedex.connect.task.service.biz; |
| 2 | 2 | ||
| 3 | public interface IPushObService { | 3 | public interface IPushObService { |
| 4 | - ///** | 4 | + /** |
| 5 | - // * @Author mt | 5 | + * @Author mt |
| 6 | - // * @Description 推送Imp001报文数据zip包文件 | 6 | + * @Description 推送Imp001报文数据zip包文件 |
| 7 | - // * @Date 2024/8/2 | 7 | + * @Date 2024/8/2 |
| 8 | - // * @param | 8 | + * @param |
| 9 | - // * @return void | 9 | + * @return void |
| 10 | - // */ | 10 | + */ |
| 11 | - //void sendOb(); | 11 | + void sendOb(); |
| 12 | - ///** | 12 | + /** |
| 13 | - // * @Author mt | 13 | + * @Author mt |
| 14 | - // * @Description 推送Imp001文件错误重试 | 14 | + * @Description 推送Imp001文件错误重试 |
| 15 | - // * @Date 2024/8/2 | 15 | + * @Date 2024/8/2 |
| 16 | - // * @param | 16 | + * @param |
| 17 | - // * @return void | 17 | + * @return void |
| 18 | - // */ | 18 | + */ |
| 19 | - //void sendObRetry(); | 19 | + void sendObRetry(); |
| 20 | } | 20 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | +package com.fedex.connect.task.service.biz.impl; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.common.model.biz.PushObDetail; | ||
| 4 | +import com.fedex.connect.task.service.base.BaseService; | ||
| 5 | +import com.fedex.connect.task.service.biz.IPushObDetailService; | ||
| 6 | +import org.springframework.stereotype.Service; | ||
| 7 | + | ||
| 8 | +import java.util.List; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author mt | ||
| 12 | + * @Description 类说明 推送明细日志 | ||
| 13 | + * @Date 2024/5/30 | ||
| 14 | + */ | ||
| 15 | +@Service | ||
| 16 | +public class PushObDetailServiceImpl extends BaseService implements IPushObDetailService { | ||
| 17 | + /** | ||
| 18 | + * @Author mt | ||
| 19 | + * @Description 功能说明 批量插入 | ||
| 20 | + * @Date 2024/5/30 | ||
| 21 | + * @param record | ||
| 22 | + * @return void | ||
| 23 | + */ | ||
| 24 | + public void batchInsert(List<PushObDetail> record){ | ||
| 25 | + pushObDetailRepository.batchInsert(record); | ||
| 26 | + } | ||
| 27 | +} |
| 1 | package com.fedex.connect.task.service.biz.impl; | 1 | package com.fedex.connect.task.service.biz.impl; |
| 2 | 2 | ||
| 3 | +import com.fedex.connect.common.dependencies.cache.CacheSystem; | ||
| 3 | import com.fedex.connect.common.dependencies.contants.ParamConfigConstants; | 4 | import com.fedex.connect.common.dependencies.contants.ParamConfigConstants; |
| 4 | import com.fedex.connect.common.dependencies.enums.biz.PushObStatusEnum; | 5 | import com.fedex.connect.common.dependencies.enums.biz.PushObStatusEnum; |
| 5 | import com.fedex.connect.common.dependencies.util.Utils; | 6 | import com.fedex.connect.common.dependencies.util.Utils; |
| 7 | +import com.fedex.connect.common.model.bi.DictionaryEntries; | ||
| 6 | import com.fedex.connect.common.model.biz.PushOb; | 8 | import com.fedex.connect.common.model.biz.PushOb; |
| 7 | import com.fedex.connect.common.model.sys.ParamConfig; | 9 | import com.fedex.connect.common.model.sys.ParamConfig; |
| 8 | import com.fedex.connect.task.data.bo.Imp001GenerateBo; | 10 | import com.fedex.connect.task.data.bo.Imp001GenerateBo; |
| 9 | import com.fedex.connect.task.service.base.BaseService; | 11 | import com.fedex.connect.task.service.base.BaseService; |
| 10 | import com.fedex.connect.task.service.biz.IPushObService; | 12 | import com.fedex.connect.task.service.biz.IPushObService; |
| 11 | 13 | ||
| 14 | +import com.fedex.connect.task.utils.biz.imp001.Imp001GenerateUtil; | ||
| 15 | +import com.fedex.connect.task.utils.biz.imp001.Imp001PushUtil; | ||
| 16 | +import com.fedex.connect.task.utils.biz.imp001.Imp001RecordLogUtil; | ||
| 12 | import lombok.extern.slf4j.Slf4j; | 17 | import lombok.extern.slf4j.Slf4j; |
| 13 | import org.springframework.beans.factory.annotation.Autowired; | 18 | import org.springframework.beans.factory.annotation.Autowired; |
| 14 | import org.springframework.stereotype.Service; | 19 | import org.springframework.stereotype.Service; |
| ... | @@ -20,92 +25,102 @@ import java.util.Objects; | ... | @@ -20,92 +25,102 @@ import java.util.Objects; |
| 20 | /** | 25 | /** |
| 21 | * @Author mt | 26 | * @Author mt |
| 22 | * @Description 发送Imp001到进口组 | 27 | * @Description 发送Imp001到进口组 |
| 23 | - * @Date 2024/5/24 | 28 | + * @Date 2024年12月18日 |
| 24 | */ | 29 | */ |
| 25 | @Slf4j | 30 | @Slf4j |
| 26 | @Service | 31 | @Service |
| 27 | public class PushObServiceImpl extends BaseService implements IPushObService { | 32 | public class PushObServiceImpl extends BaseService implements IPushObService { |
| 28 | - //@Autowired | 33 | + @Autowired |
| 29 | - //Imp001GenerateUtil imp001GenerateUtil; | 34 | + Imp001GenerateUtil imp001GenerateUtil; |
| 30 | - //@Autowired | 35 | + @Autowired |
| 31 | - //Imp001PushUtil imp001PushUtil; | 36 | + Imp001PushUtil imp001PushUtil; |
| 32 | - //@Autowired | 37 | + @Autowired |
| 33 | - //Imp001RecordLogUtil imp001RecordLogUtil; | 38 | + Imp001RecordLogUtil imp001RecordLogUtil; |
| 34 | - // | 39 | + @Autowired |
| 35 | - ///** | 40 | + CacheSystem cacheSystem; |
| 36 | - // * 推送OB报文数据zip包文件 | 41 | + |
| 37 | - // */ | 42 | + /** |
| 38 | - //@Override | 43 | + * 推送OB报文数据zip包文件 |
| 39 | - //public void sendOb() { | 44 | + */ |
| 40 | - // //获取每次处理数据量量参数 | 45 | + @Override |
| 41 | - // ParamConfig paramConfig = paramConfigRepository.findValueByCode(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_NUMBER); | 46 | + public void sendOb() { |
| 42 | - // Long rownum = Long.parseLong(paramConfig.getValue()); | 47 | + //获取每次处理数据量量参数 |
| 43 | - // //获取需要处理的记录 | 48 | + ParamConfig paramConfig = paramConfigRepository.findValueByCode(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_NUMBER); |
| 44 | - // List<PushOb> pushObList = pushObRepository.findPushOb(PushObStatusEnum.TO_BE_SENT.getCode(),rownum); | 49 | + Long rownum = Long.parseLong(paramConfig.getValue()); |
| 45 | - // //推送imp001数据 | 50 | + //获取需要处理的记录 |
| 46 | - // this.pushOb(pushObList); | 51 | + List<PushOb> pushObList = pushObRepository.findPushOb(PushObStatusEnum.TO_BE_SENT.getCode(),rownum); |
| 47 | - //} | 52 | + //推送imp001数据 |
| 48 | - // | 53 | + this.pushOb(pushObList); |
| 49 | - ///** | 54 | + } |
| 50 | - // * 推送OB文件错误重试 | 55 | + |
| 51 | - // */ | 56 | + /** |
| 52 | - //@Override | 57 | + * 推送OB文件错误重试 |
| 53 | - //public void sendObRetry() { | 58 | + */ |
| 54 | - // //获取每次处理数据量量参数 | 59 | + @Override |
| 55 | - // Map<String,ParamConfig> paramConfig = paramConfigRepository.findValueByCodes(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_NUMBER, | 60 | + public void sendObRetry() { |
| 56 | - // ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_RETRY_NUMBER); | 61 | + //获取每次处理数据量量参数 |
| 57 | - // //推送IMP001重试处理数量 | 62 | + Map<String,ParamConfig> paramConfig = paramConfigRepository.findValueByCodes(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_NUMBER, |
| 58 | - // ParamConfig retryNumConfig = paramConfig.get(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_RETRY_NUMBER); | 63 | + ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_RETRY_NUMBER); |
| 59 | - // Long retryNum = Long.parseLong(retryNumConfig.getCode()); | 64 | + //推送IMP001重试处理数量 |
| 60 | - // //推送IMP001定时任务处理数量 | 65 | + ParamConfig retryNumConfig = paramConfig.get(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_RETRY_NUMBER); |
| 61 | - // ParamConfig rownumConfig = paramConfig.get(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_NUMBER); | 66 | + Long retryNum = Long.parseLong(retryNumConfig.getCode()); |
| 62 | - // Long rownum = Long.parseLong(rownumConfig.getCode()); | 67 | + //推送IMP001定时任务处理数量 |
| 63 | - // //获取需要重新处理的记录:处理4次以下,并且推送失败的 | 68 | + ParamConfig rownumConfig = paramConfig.get(ParamConfigConstants.TASK_PARAM_KEYS.PUSH_IMP001_NUMBER); |
| 64 | - // List<PushOb> errPushObLog = pushObRepository.findErrPushOb(retryNum, PushObStatusEnum.PUSH_FAILED.getCode(),rownum); | 69 | + Long rownum = Long.parseLong(rownumConfig.getCode()); |
| 65 | - // if (errPushObLog!=null && !errPushObLog.isEmpty()){ | 70 | + //获取需要重新处理的记录:处理4次以下,并且推送失败的 |
| 66 | - // log.info("sendObRetryTask : sendObRetry size: "+errPushObLog.size()); | 71 | + List<PushOb> errPushObLog = pushObRepository.findErrPushOb(retryNum, PushObStatusEnum.PUSH_FAILED.getCode(),rownum); |
| 67 | - // //重新推送tw001数据 | 72 | + if (errPushObLog!=null && !errPushObLog.isEmpty()){ |
| 68 | - // this.pushOb(errPushObLog); | 73 | + log.info("sendObRetryTask : sendObRetry size: "+errPushObLog.size()); |
| 69 | - // }else{ | 74 | + //重新推送tw001数据 |
| 70 | - // log.info("sendObRetryTask : No data found for sendObRetry!"); | 75 | + this.pushOb(errPushObLog); |
| 71 | - // } | 76 | + }else{ |
| 72 | - //} | 77 | + log.info("sendObRetryTask : No data found for sendObRetry!"); |
| 73 | - // | 78 | + } |
| 74 | - ///** | 79 | + } |
| 75 | - // * @Author mt | 80 | + |
| 76 | - // * @Description 推送tw001数据 | 81 | + /** |
| 77 | - // * @Date 2024/5/29 | 82 | + * @Author mt |
| 78 | - // * @param pushObList | 83 | + * @Description 推送imp001数据 |
| 79 | - // * @return void | 84 | + * @Date 2024/5/29 |
| 80 | - // */ | 85 | + * @param pushObList |
| 81 | - //private void pushOb(List<PushOb> pushObList){ | 86 | + * @return void |
| 82 | - // Utils.listOf(pushObList).stream().filter(Objects::nonNull).forEach(ob ->{ | 87 | + */ |
| 83 | - // boolean flag = false; | 88 | + private void pushOb(List<PushOb> pushObList){ |
| 84 | - // String errorMsg = ""; | 89 | + /** |
| 85 | - // Imp001GenerateBo imp001GenerateBo = null; | 90 | + * 推送成功状态字典 |
| 86 | - // try { | 91 | + */ |
| 87 | - // //生成tw001 json对象dto | 92 | + DictionaryEntries pushSuccessEntries = cacheSystem.getDicPushObStatus(PushObStatusEnum.PUSH_SUCCESSFUL.getCode()); |
| 88 | - // imp001GenerateBo = imp001GenerateUtil.generateImp001Json(ob); | 93 | + /** |
| 89 | - // //根据tw001 json对象生成并且推送zip包 | 94 | + * 推送失败状态字典 |
| 90 | - // imp001PushUtil.pushImp001(imp001GenerateBo); | 95 | + */ |
| 91 | - // flag = true; | 96 | + DictionaryEntries pushFailedEntries = cacheSystem.getDicPushObStatus(PushObStatusEnum.PUSH_FAILED.getCode()); |
| 92 | - // }catch(Exception ex){ | 97 | + Utils.listOf(pushObList).stream().filter(Objects::nonNull).forEach(ob ->{ |
| 93 | - // log.error("pushOb error : ",ex); | 98 | + boolean flag = false; |
| 94 | - // errorMsg = ex.getMessage(); | 99 | + String errorMsg = ""; |
| 95 | - // flag = false; | 100 | + Imp001GenerateBo imp001GenerateBo = null; |
| 96 | - // }finally{ | 101 | + try { |
| 97 | - // /** | 102 | + //生成imp001 json对象dto |
| 98 | - // * 如果生成失败,推送失败,则不会记录推送日志明细,更新推送日志表。 | 103 | + imp001GenerateBo = imp001GenerateUtil.generateImp001Json(ob); |
| 99 | - // * 记录日志,并且备份 | 104 | + //根据imp001 json对象生成并且推送zip包 |
| 100 | - // */ | 105 | + imp001PushUtil.pushImp001(imp001GenerateBo); |
| 101 | - // if(flag){ | 106 | + flag = true; |
| 102 | - // //推送成功 | 107 | + }catch(Exception ex){ |
| 103 | - // imp001RecordLogUtil.pushSuccessRecordLog(imp001GenerateBo, ob); | 108 | + log.error("pushOb error : ",ex); |
| 104 | - // }else{ | 109 | + errorMsg = ex.getMessage(); |
| 105 | - // //推送失败 | 110 | + flag = false; |
| 106 | - // imp001RecordLogUtil.pushFailRecordLog(imp001GenerateBo, ob, errorMsg); | 111 | + }finally{ |
| 107 | - // } | 112 | + /** |
| 108 | - // } | 113 | + * 如果生成失败,推送失败,则不会记录推送日志明细,更新推送日志表。 |
| 109 | - // }); | 114 | + * 记录日志,并且备份 |
| 110 | - //} | 115 | + */ |
| 116 | + if(flag){ | ||
| 117 | + //推送成功 | ||
| 118 | + imp001RecordLogUtil.pushSuccessRecordLog(imp001GenerateBo, ob, pushSuccessEntries); | ||
| 119 | + }else{ | ||
| 120 | + //推送失败 | ||
| 121 | + imp001RecordLogUtil.pushFailRecordLog(imp001GenerateBo, ob, pushFailedEntries, errorMsg); | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + }); | ||
| 125 | + } | ||
| 111 | } | 126 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
| ... | @@ -268,15 +268,15 @@ public class ConFileEmailUtil { | ... | @@ -268,15 +268,15 @@ public class ConFileEmailUtil { |
| 268 | //如果失败次数小于三则更新为待处理,继续处理 | 268 | //如果失败次数小于三则更新为待处理,继续处理 |
| 269 | if (result){ | 269 | if (result){ |
| 270 | conPushEmail.setTypeCode(success.getCode()); | 270 | conPushEmail.setTypeCode(success.getCode()); |
| 271 | - conPushEmail.setTypeName(success.getEnglishName()); | 271 | + conPushEmail.setTypeName(success.getDescription()); |
| 272 | }else { | 272 | }else { |
| 273 | if (conPushEmail.getSendNum()<3){ | 273 | if (conPushEmail.getSendNum()<3){ |
| 274 | conPushEmail.setTypeCode(pending.getCode()); | 274 | conPushEmail.setTypeCode(pending.getCode()); |
| 275 | - conPushEmail.setTypeName(pending.getEnglishName()); | 275 | + conPushEmail.setTypeName(pending.getDescription()); |
| 276 | conPushEmail.setSendNum(conPushEmail.getSendNum()+1); | 276 | conPushEmail.setSendNum(conPushEmail.getSendNum()+1); |
| 277 | }else { | 277 | }else { |
| 278 | conPushEmail.setTypeCode(failed.getCode()); | 278 | conPushEmail.setTypeCode(failed.getCode()); |
| 279 | - conPushEmail.setTypeName(failed.getEnglishName()); | 279 | + conPushEmail.setTypeName(failed.getDescription()); |
| 280 | } | 280 | } |
| 281 | } | 281 | } |
| 282 | } | 282 | } | ... | ... |
| ... | @@ -122,15 +122,15 @@ public class DuplicateEmailUtil { | ... | @@ -122,15 +122,15 @@ public class DuplicateEmailUtil { |
| 122 | email.setSendTime(new Date()); | 122 | email.setSendTime(new Date()); |
| 123 | if (result){ | 123 | if (result){ |
| 124 | email.setStatusCode(success.getCode()); | 124 | email.setStatusCode(success.getCode()); |
| 125 | - email.setStatusName(success.getEnglishName()); | 125 | + email.setStatusName(success.getDescription()); |
| 126 | }else { | 126 | }else { |
| 127 | if (email.getSendNum()<3){ | 127 | if (email.getSendNum()<3){ |
| 128 | email.setStatusCode(pending.getCode()); | 128 | email.setStatusCode(pending.getCode()); |
| 129 | - email.setStatusName(pending.getEnglishName()); | 129 | + email.setStatusName(pending.getDescription()); |
| 130 | email.setSendNum(email.getSendNum()+1); | 130 | email.setSendNum(email.getSendNum()+1); |
| 131 | }else { | 131 | }else { |
| 132 | email.setStatusCode(failed.getCode()); | 132 | email.setStatusCode(failed.getCode()); |
| 133 | - email.setStatusName(failed.getEnglishName()); | 133 | + email.setStatusName(failed.getDescription()); |
| 134 | } | 134 | } |
| 135 | } | 135 | } |
| 136 | } | 136 | } | ... | ... |
| ... | @@ -41,10 +41,10 @@ rpc: | ... | @@ -41,10 +41,10 @@ rpc: |
| 41 | rpcKafkaReceive1: http://localhost:8082/kafka-cndc-server/rpcKafka/rpcKafkaReceive | 41 | rpcKafkaReceive1: http://localhost:8082/kafka-cndc-server/rpcKafka/rpcKafkaReceive |
| 42 | rpcKafkaReceive2: http://localhost:8082/kafka-cndc-server/rpcKafka/rpcKafkaReceive | 42 | rpcKafkaReceive2: http://localhost:8082/kafka-cndc-server/rpcKafka/rpcKafkaReceive |
| 43 | 43 | ||
| 44 | -tw001: | 44 | +imp001: |
| 45 | path: | 45 | path: |
| 46 | #基础路径 | 46 | #基础路径 |
| 47 | - basePath: /var/share/icleartw/TWIMPORT/ | 47 | + basePath: /var/share/iClearPreCLR/ToIMPORT/ |
| 48 | #json生成路径 | 48 | #json生成路径 |
| 49 | work: ${tw001.path.basePath}work/ | 49 | work: ${tw001.path.basePath}work/ |
| 50 | #zip输出目录 | 50 | #zip输出目录 | ... | ... |
| ... | @@ -21,10 +21,10 @@ rpc: | ... | @@ -21,10 +21,10 @@ rpc: |
| 21 | rpcKafkaReceive1: https://pjea0179.prod.apac.fedex.com:9002/icleartwkafka/rpcKafka/rpcKafkaReceive | 21 | rpcKafkaReceive1: https://pjea0179.prod.apac.fedex.com:9002/icleartwkafka/rpcKafka/rpcKafkaReceive |
| 22 | rpcKafkaReceive2: https://pjea0180.prod.apac.fedex.com:9002/icleartwkafka/rpcKafka/rpcKafkaReceive | 22 | rpcKafkaReceive2: https://pjea0180.prod.apac.fedex.com:9002/icleartwkafka/rpcKafka/rpcKafkaReceive |
| 23 | 23 | ||
| 24 | -tw001: | 24 | +imp001: |
| 25 | path: | 25 | path: |
| 26 | #基础路径 | 26 | #基础路径 |
| 27 | - basePath: /var/share/icleartw/TWIMPORT/ | 27 | + basePath: /var/share/iClearPreCLR/ToIMPORT/ |
| 28 | #json生成路径 | 28 | #json生成路径 |
| 29 | work: ${tw001.path.basePath}work/ | 29 | work: ${tw001.path.basePath}work/ |
| 30 | #zip输出目录 | 30 | #zip输出目录 | ... | ... |
| ... | @@ -21,10 +21,10 @@ rpc: | ... | @@ -21,10 +21,10 @@ rpc: |
| 21 | rpcKafkaReceive1: http://47.103.140.98:7010/icleartwkafka/rpcKafka/rpcKafkaReceive | 21 | rpcKafkaReceive1: http://47.103.140.98:7010/icleartwkafka/rpcKafka/rpcKafkaReceive |
| 22 | rpcKafkaReceive2: http://47.103.140.98:7010/icleartwkafka/rpcKafka/rpcKafkaReceive | 22 | rpcKafkaReceive2: http://47.103.140.98:7010/icleartwkafka/rpcKafka/rpcKafkaReceive |
| 23 | 23 | ||
| 24 | -tw001: | 24 | +imp001: |
| 25 | path: | 25 | path: |
| 26 | #基础路径 | 26 | #基础路径 |
| 27 | - basePath: /app/Oracle/Middleware/user_projects/domains/base_domain/exportTw/TWIMPORT/ | 27 | + basePath: /app/Oracle/Middleware/user_projects/domains/base_domain/iClearPreCLR/ToIMPORT/ |
| 28 | #json生成路径 | 28 | #json生成路径 |
| 29 | work: ${tw001.path.basePath}work/ | 29 | work: ${tw001.path.basePath}work/ |
| 30 | #zip输出目录 | 30 | #zip输出目录 | ... | ... |
| ... | @@ -21,10 +21,10 @@ rpc: | ... | @@ -21,10 +21,10 @@ rpc: |
| 21 | rpcKafkaReceive1: http://ujea0145.nonprod.apac.fedex.com:9001/icleartwkafka/rpcKafka/rpcKafkaReceive | 21 | rpcKafkaReceive1: http://ujea0145.nonprod.apac.fedex.com:9001/icleartwkafka/rpcKafka/rpcKafkaReceive |
| 22 | rpcKafkaReceive2: http://ujea0146.nonprod.apac.fedex.com:9001/icleartwkafka/rpcKafka/rpcKafkaReceive | 22 | rpcKafkaReceive2: http://ujea0146.nonprod.apac.fedex.com:9001/icleartwkafka/rpcKafka/rpcKafkaReceive |
| 23 | 23 | ||
| 24 | -tw001: | 24 | +imp001: |
| 25 | path: | 25 | path: |
| 26 | #基础路径 | 26 | #基础路径 |
| 27 | - basePath: /var/share/icleartw/TWIMPORT/ | 27 | + basePath: /var/share/iClearPreCLR/ToIMPORT/ |
| 28 | #json生成路径 | 28 | #json生成路径 |
| 29 | work: ${tw001.path.basePath}work/ | 29 | work: ${tw001.path.basePath}work/ |
| 30 | #zip输出目录 | 30 | #zip输出目录 | ... | ... |
-
Please register or login to post a comment