|
@@ -6,6 +6,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
+import cn.ezhizao.common.constant.HttpStatus;
|
|
import cn.ezhizao.common.exception.ServiceException;
|
|
import cn.ezhizao.common.exception.ServiceException;
|
|
import cn.ezhizao.common.utils.SecurityUtils;
|
|
import cn.ezhizao.common.utils.SecurityUtils;
|
|
import cn.ezhizao.common.utils.StringUtils;
|
|
import cn.ezhizao.common.utils.StringUtils;
|
|
@@ -313,6 +314,9 @@ public class BizArchiveInputServiceImpl extends ServiceImpl<BizArchiveInputMappe
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public boolean save(BizArchiveInput bizArchiveInput) {
|
|
public boolean save(BizArchiveInput bizArchiveInput) {
|
|
|
|
+ // 判断是否重复订单号
|
|
|
|
+ if(this.query().eq("contract_no", bizArchiveInput.getContractNo()).ne("id", bizArchiveInput.getId() == null ? 0L :bizArchiveInput.getId()).count() > 0) throw new ServiceException("订单号不能重复", HttpStatus.ERROR);
|
|
|
|
+
|
|
boolean saveStatus = super.save(bizArchiveInput);
|
|
boolean saveStatus = super.save(bizArchiveInput);
|
|
List<BizArchiveInputDetail> bizArchiveInputDetails = bizArchiveInput.getDetails();
|
|
List<BizArchiveInputDetail> bizArchiveInputDetails = bizArchiveInput.getDetails();
|
|
List<BizArchiveInputDetailProcess> bizArchiveInputDetailProcesses = new ArrayList<>();
|
|
List<BizArchiveInputDetailProcess> bizArchiveInputDetailProcesses = new ArrayList<>();
|
|
@@ -343,6 +347,9 @@ public class BizArchiveInputServiceImpl extends ServiceImpl<BizArchiveInputMappe
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public boolean updateById(BizArchiveInput bizArchiveInput) {
|
|
public boolean updateById(BizArchiveInput bizArchiveInput) {
|
|
|
|
+ // 判断是否重复订单号
|
|
|
|
+ if(this.query().eq("contract_no", bizArchiveInput.getContractNo()).ne("id", bizArchiveInput.getId() == null ? 0L :bizArchiveInput.getId()).count() > 0) throw new ServiceException("订单号不能重复", HttpStatus.ERROR);
|
|
|
|
+
|
|
boolean saveStatus = super.updateById(bizArchiveInput);
|
|
boolean saveStatus = super.updateById(bizArchiveInput);
|
|
List<BizArchiveInputDetail> bizArchiveInputDetails = bizArchiveInput.getDetails();
|
|
List<BizArchiveInputDetail> bizArchiveInputDetails = bizArchiveInput.getDetails();
|
|
List<BizArchiveInputDetailProcess> bizArchiveInputDetailProcesses = new ArrayList<>();
|
|
List<BizArchiveInputDetailProcess> bizArchiveInputDetailProcesses = new ArrayList<>();
|