中扬CRM客户关系管理系统
#
LSH
2023-11-10 2a08b97f0aad3af5d981a722efb218fb201f821f
src/main/java/com/zy/crm/manager/controller/BusinessTripOtherController.java
@@ -53,7 +53,7 @@
        EntityWrapper<BusinessTripOther> wrapper = new EntityWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
//        wrapper.or().eq("member_id",getUserId());
        wrapper.or().eq("member_id",getUserId());
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        return R.ok(businessTripOtherService.selectPage(new Page<>(curr, limit), wrapper));
    }
@@ -89,7 +89,13 @@
            }
        }
        if (!signUserId && !signDeptId){
            wrapper.eq("user_id", getUserId());
            if (getRole().getId()==1){
                wrapper.or().eq("host_id",1);
            }else if (getRole().getId()==2){
                wrapper.eq("dept_id",getDeptId());
            }else {
                wrapper.eq("user_id", getUserId());
            }
        }
        if (signHostId){
            wrapper.or().eq("host_id",1);
@@ -125,6 +131,7 @@
            manager = getUser();
        }
        businessTripOther.setSettleMsg(JSON.toJSONString(SettleDto.initBusiness(manager,getUser())));
        businessTripOther.setMemberId(manager.getId());
        businessTripOtherService.insert(businessTripOther);
        return R.ok();
@@ -231,6 +238,7 @@
                    businessTripOther.setStatus(1);
                    businessTripOther.setUpdateId(getUserId());
                    businessTripOther.setUpdateTime(now);
                    businessTripOther.setMemberId(businessTripOther.getUserId());
                    if (!businessTripOtherService.updateById(businessTripOther)) {
                        throw new CoolException("审核失败,请联系管理员");
                    }