|
@@ -171,6 +171,7 @@ public class CheckStandardServiceImpl extends BaseServiceImpl<CheckStandardMappe
|
|
if(model.getEnable() == null){
|
|
if(model.getEnable() == null){
|
|
model.setEnable(1);
|
|
model.setEnable(1);
|
|
}
|
|
}
|
|
|
|
+
|
|
// 设置编码
|
|
// 设置编码
|
|
Weekend<CheckStandard> weekend = new Weekend<>(CheckStandard.class);
|
|
Weekend<CheckStandard> weekend = new Weekend<>(CheckStandard.class);
|
|
weekend.weekendCriteria().andIsNotNull(CheckStandard::getId);
|
|
weekend.weekendCriteria().andIsNotNull(CheckStandard::getId);
|
|
@@ -183,7 +184,16 @@ public class CheckStandardServiceImpl extends BaseServiceImpl<CheckStandardMappe
|
|
String str1 = String.format("%05d", count);
|
|
String str1 = String.format("%05d", count);
|
|
model.setNo(str1);
|
|
model.setNo(str1);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ if (model.getCheckUserType()==3){
|
|
|
|
+ if (model.getSbId()!=null) {
|
|
|
|
+ SbInfo sbInfo = sbInfoMapper.selectByPrimaryKey(model.getSbId());
|
|
|
|
+ if (sbInfo!=null) {
|
|
|
|
+ model.setCheckUserId(sbInfo.getRepairUser());
|
|
|
|
+ }else {
|
|
|
|
+ throw new BusinessException("所选设备已不存在!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
CheckStandard checkStandard = super.saveModelByDTO(model);
|
|
CheckStandard checkStandard = super.saveModelByDTO(model);
|
|
this.saveFile(model);
|
|
this.saveFile(model);
|
|
this.saveImage(model);
|
|
this.saveImage(model);
|
|
@@ -217,6 +227,17 @@ public class CheckStandardServiceImpl extends BaseServiceImpl<CheckStandardMappe
|
|
@Override
|
|
@Override
|
|
public void modModelByDTO(CheckStandardDTO model) {
|
|
public void modModelByDTO(CheckStandardDTO model) {
|
|
|
|
|
|
|
|
+ if (model.getCheckUserType()==3){
|
|
|
|
+ if (model.getSbId()!=null) {
|
|
|
|
+ SbInfo sbInfo = sbInfoMapper.selectByPrimaryKey(model.getSbId());
|
|
|
|
+ if (sbInfo!=null) {
|
|
|
|
+ model.setCheckUserId(sbInfo.getRepairUser());
|
|
|
|
+ }else {
|
|
|
|
+ throw new BusinessException("所选设备已不存在!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
super.modModelByDTO(model);
|
|
super.modModelByDTO(model);
|
|
|
|
|
|
// 先删后插,前端删除的不存在与ids里面,说明被删掉了,需要删除
|
|
// 先删后插,前端删除的不存在与ids里面,说明被删掉了,需要删除
|