中扬CRM客户关系管理系统
#
LSH
2023-12-01 49ab626b5cb89219a4b4b86b5f1774f4705df51c
src/main/java/com/zy/crm/manager/controller/ReimburseOnlineController.java
@@ -141,7 +141,7 @@
        }
        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 {
@@ -149,7 +149,7 @@
            }
        }
        if (signHostId){
            wrapper.or().eq("host_id",1);
            wrapper.or().eq("host_id",getHostId());
        }
    }
    @RequestMapping(value = "/reimburseOnline/from/add/auth")
@@ -218,19 +218,19 @@
    @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("非创建人员禁止修改!");
@@ -239,7 +239,7 @@
        reimburseOnline.setCheckData(param.getCheckData());
        reimburseOnline.setTemplateName(param.getTemplateName());
        reimburseOnline.setItemId(planId);
//        reimburseOnline.setItemId(planId);
        reimburseOnline.setName(param.getName());
        reimburseOnline.setUpdateTime(new Date());