|
|
|
@ -452,6 +452,16 @@ public class ProofingInformationServiceImpl extends ServiceImpl<ProofingInformat |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void proofingInformationEditStatus(ProofingInformationVo data) { |
|
|
|
// 幂等检查:仅草稿状态可下达,防止并发重复提交 |
|
|
|
ProofingInformationEntity current = baseMapper.selectOne( |
|
|
|
new LambdaQueryWrapper<ProofingInformationEntity>() |
|
|
|
.eq(ProofingInformationEntity::getSite, data.getSite()) |
|
|
|
.eq(ProofingInformationEntity::getProofingNo, data.getProofingNo()) |
|
|
|
); |
|
|
|
if (current == null || !"草稿".equals(current.getProofingStatus())) { |
|
|
|
throw new RuntimeException("该打样单已提交或状态异常,请勿重复下达!"); |
|
|
|
} |
|
|
|
|
|
|
|
UpdateWrapper<ProofingInformationEntity> updateInformationWrapper = new UpdateWrapper<>(); |
|
|
|
updateInformationWrapper.eq("site", data.getSite()); |
|
|
|
updateInformationWrapper.eq("proofing_no", data.getProofingNo()); |
|
|
|
|