|
|
|
@ -43,6 +43,10 @@ public class ProofingInformationServiceImpl implements ProofingInformationServic |
|
|
|
* 打样文档与 getCopyDocumentFileList 等查询一致 |
|
|
|
*/ |
|
|
|
private static final String PROOF_OSS_REFTYPE = "项目文档"; |
|
|
|
/** |
|
|
|
* 编码打印分类不进入 Tracking 对齐链路:该类打样单允许未同步 Tracking 直接下达。 |
|
|
|
*/ |
|
|
|
private static final String CODE_PRINT_DRY_WET_TYPE = "编码打印"; |
|
|
|
private final Object uploadFilterCacheLock = new Object(); |
|
|
|
private volatile long uploadFilterCacheAt = 0L; |
|
|
|
private volatile List<ProofDocumentData> uploadFilterCacheList = null; |
|
|
|
@ -120,7 +124,7 @@ public class ProofingInformationServiceImpl implements ProofingInformationServic |
|
|
|
// 根据Id拿到旧数据 |
|
|
|
ProofingInformationData proofingInformationData = proofingInformationMapper.selecProofingOne(data.getProofingId()); |
|
|
|
boolean issueNeedTrackingSync = shouldSyncTrackingStatusForIssue(data); |
|
|
|
// RF/RFID 下达时,NPI 与产品打样记录跟踪必须先对齐同 id 的打样单。 |
|
|
|
// RF/RFID 下达时,NPI 与产品打样记录跟踪必须先对齐同 id 的打样单;编码打印分类除外。 |
|
|
|
if (issueNeedTrackingSync && !proofTrackingExists(data.getProofingId())) { |
|
|
|
return R.error("产品打样记录跟踪未维护该打样单,请维护后再下达"); |
|
|
|
} |
|
|
|
@ -657,9 +661,24 @@ public class ProofingInformationServiceImpl implements ProofingInformationServic |
|
|
|
if (data == null || !Objects.equals(data.getType(), 1)) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
// 分类以项目物料落库值为准,避免前端漏传 dry_wet_type 时误拦下达。 |
|
|
|
if (isCodePrintDryWetType(resolveIssueDryWetType(data))) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
return isRfOrRfidBuNo(resolveIssueBuNo(data)); |
|
|
|
} |
|
|
|
|
|
|
|
private String resolveIssueDryWetType(ProofingInformationData data) { |
|
|
|
if (data == null || data.getProofingId() == null) { |
|
|
|
return ""; |
|
|
|
} |
|
|
|
return normalizeText(proofingInformationMapper.selectDryWetTypeByProofingId(data.getProofingId())); |
|
|
|
} |
|
|
|
|
|
|
|
private boolean isCodePrintDryWetType(String dryWetType) { |
|
|
|
return CODE_PRINT_DRY_WET_TYPE.equals(normalizeText(dryWetType)); |
|
|
|
} |
|
|
|
|
|
|
|
private String resolveIssueBuNo(ProofingInformationData data) { |
|
|
|
String buNo = normalizeText(data.getBuNo()); |
|
|
|
if (!buNo.isEmpty()) { |
|
|
|
|