|
|
@ -358,7 +358,6 @@ public class GspServiceImpl extends ServiceImpl implements IGspS |
|
|
} else if (!gspOld.getBjzt().equals(BjEnum.wbj.getValue())) { |
|
|
} else if (!gspOld.getBjzt().equals(BjEnum.wbj.getValue())) { |
|
|
throw new ServiceException("供试品【" + gspOld.getMc() + "】已经提交编辑申请,请等待审核"); |
|
|
throw new ServiceException("供试品【" + gspOld.getMc() + "】已经提交编辑申请,请等待审核"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(gspOld, form); |
|
|
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(gspOld, form); |
|
|
if (fieldChanges.size() == 0) { |
|
|
if (fieldChanges.size() == 0) { |
|
|
throw new ServiceException("你没有修改任何内容"); |
|
|
throw new ServiceException("你没有修改任何内容"); |
|
|
@ -466,6 +465,7 @@ public class GspServiceImpl extends ServiceImpl implements IGspS |
|
|
gspOld.setJsrqbj(null); |
|
|
gspOld.setJsrqbj(null); |
|
|
gspOld.setCctjbj(null); |
|
|
gspOld.setCctjbj(null); |
|
|
gspOld.setZysxbj(null); |
|
|
gspOld.setZysxbj(null); |
|
|
|
|
|
gspOld.setBjbz(null); |
|
|
gspOld.setBjzt(BjEnum.wbj.getValue()); |
|
|
gspOld.setBjzt(BjEnum.wbj.getValue()); |
|
|
this.updateById(gspOld); |
|
|
this.updateById(gspOld); |
|
|
//endregion |
|
|
//endregion |
|
|
@ -750,7 +750,7 @@ public class GspServiceImpl extends ServiceImpl implements IGspS |
|
|
if (form.getId() == null || form.getId().longValue() < 0) { |
|
|
if (form.getId() == null || form.getId().longValue() < 0) { |
|
|
throw new ServiceException("参数id不正确"); |
|
|
throw new ServiceException("参数id不正确"); |
|
|
} |
|
|
} |
|
|
Gsp gspOld = this.getById(form.getId()); |
|
|
|
|
|
|
|
|
Gsp gspOld = this.queryInfo(form.getId()); |
|
|
if (gspOld == null) { |
|
|
if (gspOld == null) { |
|
|
throw new ServiceException("供试品不存在或已删除"); |
|
|
throw new ServiceException("供试品不存在或已删除"); |
|
|
} |
|
|
} |
|
|
@ -760,7 +760,13 @@ public class GspServiceImpl extends ServiceImpl implements IGspS |
|
|
if (!(gspOld.getZjzt().equals(ZjztEnum.rk.getValue()) || gspOld.getZjzt().equals(ZjztEnum.yff.getValue()))) { |
|
|
if (!(gspOld.getZjzt().equals(ZjztEnum.rk.getValue()) || gspOld.getZjzt().equals(ZjztEnum.yff.getValue()))) { |
|
|
throw new ServiceException("供试品【" + gspOld.getMc() + "】不是入库状态,不能修改库存"); |
|
|
throw new ServiceException("供试品【" + gspOld.getMc() + "】不是入库状态,不能修改库存"); |
|
|
} |
|
|
} |
|
|
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(gspOld, form); |
|
|
|
|
|
|
|
|
if(StringUtils.equals(form.getKc(), gspOld.getKc()) && StringUtils.equals(form.getKcdw(), gspOld.getKcdw())) { |
|
|
|
|
|
throw new ServiceException("库存未进行任何修改"); |
|
|
|
|
|
} |
|
|
|
|
|
Gsp gspCompare = new Gsp(); |
|
|
|
|
|
gspCompare.setKc(gspOld.getKc()); |
|
|
|
|
|
gspCompare.setKcdw(gspOld.getKcdw()); |
|
|
|
|
|
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjects(gspCompare, form); |
|
|
if (fieldChanges.size() == 0) { |
|
|
if (fieldChanges.size() == 0) { |
|
|
throw new ServiceException("你没有修改任何内容"); |
|
|
throw new ServiceException("你没有修改任何内容"); |
|
|
} |
|
|
} |
|
|
|