|
|
|
@ -59,6 +59,8 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
@ -136,11 +138,18 @@ public class ProofingInformationServiceImpl extends ServiceImpl<ProofingInformat |
|
|
|
// 获取项目料号 |
|
|
|
String[] testPartNoList = data.getTestPartNo().split(";"); |
|
|
|
String docNo = ""; |
|
|
|
String proofingBatchNoPrefix = "DY" + LocalDate.now().format(DateTimeFormatter.BASIC_ISO_DATE); |
|
|
|
String proofingBatchNo = proofingInformationMapper.getProofingBatchNo(data.getSite(), proofingBatchNoPrefix); |
|
|
|
if (!StringUtils.hasText(proofingBatchNo)) { |
|
|
|
proofingBatchNo = proofingBatchNoPrefix + "001"; |
|
|
|
} |
|
|
|
data.setProofingBatchNo(proofingBatchNo); |
|
|
|
// 新增 |
|
|
|
for (String testPartNo : testPartNoList) { |
|
|
|
// 获取打样单号 |
|
|
|
String proofingNo = "DY" + proofingInformationMapper.getProofingNo(data); |
|
|
|
data.setProofingNo(proofingNo); |
|
|
|
data.setProofingBatchNo(proofingBatchNo); |
|
|
|
data.setTestPartNo(testPartNo); |
|
|
|
data.setStepId(10); |
|
|
|
data.setProofingResultStatus(data.getProofingResultStatus()); |
|
|
|
|