|
@@ -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("只有待提交和待完善的需求可以修改");
|
|
|
}
|