Browse Source

字典需求管理-默认排序修改

yucheng 3 years ago
parent
commit
56038e2b92

+ 4 - 4
dmp-business/dmp-rwd-version/src/main/java/com/persagy/dmp/rwd/demand/controller/DictionaryDemandController.java

@@ -60,8 +60,8 @@ public class DictionaryDemandController {
     public CommonResult<DictionaryDemand> save(@Valid @RequestBody DictionaryDemand vo) {
         ParamCheckUtil.checkParam(CommonConstant.QUERY_USERID);
         // 校验
-        boolean canEdit = vo.getBillState() != null && (DemandBillState.SAVING.getIndex().equals(vo.getBillState())
-                || DemandBillState.SEND_BACK.getIndex().equals(vo.getBillState()));
+        boolean canEdit = vo.getBillState() == null || DemandBillState.SAVING.getIndex().equals(vo.getBillState())
+                || DemandBillState.SEND_BACK.getIndex().equals(vo.getBillState());
         if(!canEdit) {
             throw new BusinessException("只有待提交和待完善的需求可以修改");
         }
@@ -78,8 +78,8 @@ public class DictionaryDemandController {
     public CommonResult<DictionaryDemand> submit(@Valid @RequestBody DictionaryDemand vo) {
         ParamCheckUtil.checkParam(CommonConstant.QUERY_USERID);
         // 校验
-        boolean canEdit = vo.getBillState() != null && (DemandBillState.SAVING.getIndex().equals(vo.getBillState())
-                || DemandBillState.SEND_BACK.getIndex().equals(vo.getBillState()));
+        boolean canEdit = vo.getBillState() == null || DemandBillState.SAVING.getIndex().equals(vo.getBillState())
+                || DemandBillState.SEND_BACK.getIndex().equals(vo.getBillState());
         if(!canEdit) {
             throw new BusinessException("只有待提交和待完善的需求可以修改");
         }