| | |
| | | } |
| | | if (!signUserId && !signDeptId){ |
| | | if (getRole().getId()==1){ |
| | | wrapper.or().eq("host_id",1); |
| | | wrapper.or().eq("host_id",getHostId()); |
| | | }else if (getRole().getId()==2){ |
| | | wrapper.eq("dept_id",getDeptId()); |
| | | }else { |
| | |
| | | } |
| | | } |
| | | if (signHostId){ |
| | | wrapper.or().eq("host_id",1); |
| | | wrapper.or().eq("host_id",getHostId()); |
| | | } |
| | | } |
| | | @RequestMapping(value = "/reimburseOnline/from/add/auth") |
| | |
| | | @Transactional |
| | | public R formModify(@RequestBody ReimburseOnlineDomainParam param){ |
| | | |
| | | long planId = 0; |
| | | if (!param.getTemplateName().equals("非项目型报销")){ |
| | | if (Cools.isEmpty(param.getOrderNo())){ |
| | | return R.error("修改失败!"+param.getTemplateName()+"需要关联项目号"); |
| | | } |
| | | String[] split = param.getOrderNo().split("---"); |
| | | planId = Long.parseLong(split[1]); |
| | | } |
| | | // long planId = 0; |
| | | // if (!param.getTemplateName().equals("非项目型报销")){ |
| | | // if (Cools.isEmpty(param.getOrderNo())){ |
| | | // return R.error("修改失败!"+param.getTemplateName()+"需要关联项目号"); |
| | | // } |
| | | // String[] split = param.getOrderNo().split("---"); |
| | | // planId = Long.parseLong(split[1]); |
| | | // } |
| | | Date now = new Date(); |
| | | ReimburseOnline reimburseOnline = reimburseOnlineService.selectById(param.getReimburseId()); |
| | | |
| | | if (!reimburseOnline.getSettle().equals(0)){ |
| | | return R.error("修改失败!提交之后禁止修改!"); |
| | | if (!reimburseOnline.getSettle().equals(1)){ |
| | | return R.error("修改失败!部门经理审核之后禁止修改!"); |
| | | } |
| | | if (!reimburseOnline.getUserId().equals(getUserId())){ |
| | | return R.error("非创建人员禁止修改!"); |
| | |
| | | |
| | | reimburseOnline.setCheckData(param.getCheckData()); |
| | | reimburseOnline.setTemplateName(param.getTemplateName()); |
| | | reimburseOnline.setItemId(planId); |
| | | // reimburseOnline.setItemId(planId); |
| | | reimburseOnline.setName(param.getName()); |
| | | reimburseOnline.setUpdateTime(new Date()); |
| | | |