中扬CRM客户关系管理系统
#
luxiaotao1123
2022-11-28 5528e869fc25354fe62fbb228cfdd40e0df94dbc
#
5个文件已修改
91 ■■■■ 已修改文件
src/main/java/com/zy/crm/manager/controller/PlanController.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/CstmrMapper.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/OrderMapper.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/PlanMapper.xml 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/manager/controller/PlanController.java
@@ -8,6 +8,7 @@
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.core.common.R;
import com.core.domain.KeyValueVo;
import com.core.exception.CoolException;
@@ -190,8 +191,27 @@
                        throw new CoolException("未查找到规划组长,请联系管理员");
                    }
                    // 修改 settle 步骤数据 todo
                    plan.setSettleMsg(JSON.toJSONString(SettleDto.init(plan, manager)));
                    // 修改 settle 步骤数据
                    List<SettleDto> list = JSON.parseArray(plan.getSettleMsg(), SettleDto.class);
                    for (SettleDto dto : list) {
                        switch (dto.getStep()) {
                            case 1:
                                dto.setCurr(Boolean.FALSE);
                                break;
                            case 2:
                                dto.setCurr(Boolean.TRUE);
                                dto.setMsg("本组组长" + manager.getNickname() + "审批通过");
                                dto.setTime(DateUtils.convert(new Date()));
                                break;
                            case 3:
                                dto.setUserId(planLeader.getId());
                                dto.setUsername(planLeader.getNickname());
                                break;
                            default:
                                break;
                        }
                    }
                    plan.setSettleMsg(JSON.toJSONString(list));
                    // 修改规划单状态
                    plan.setSettle(2);  // 规划组长待审
src/main/resources/application.yml
@@ -9,12 +9,12 @@
    name: @pom.build.finalName@
  datasource:
    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#    url: jdbc:sqlserver://47.97.1.152:51433;databasename=zy_crm
#    username: sa
#    password: Zoneyung@zy56$
    url: jdbc:sqlserver://localhost:1433;databasename=zy_crm
    url: jdbc:sqlserver://47.97.1.152:51433;databasename=zy_crm
    username: sa
    password: sa@123
    password: Zoneyung@zy56$
#    url: jdbc:sqlserver://localhost:1433;databasename=zy_crm
#    username: sa
#    password: sa@123
  mvc:
    static-path-pattern: /**
  redis:
src/main/resources/mapper/CstmrMapper.xml
@@ -60,6 +60,19 @@
        <choose>
            <when test="deptId != null and deptId != ''">
                AND (CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId})
                or
                (
                    user_id = #{userId}
                    or
                    mc.id in
                    (
                        select
                        cstmr_id
                        from man_cstmr_foll
                        where 1=1
                        and user_id = #{userId}
                    )
                )
            </when>
            <otherwise>
                and
src/main/resources/mapper/OrderMapper.xml
@@ -57,6 +57,19 @@
        <choose>
            <when test="deptId != null and deptId != ''">
                AND (CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId})
                or
                (
                    user_id = #{userId}
                    or
                    mo.id in
                    (
                        select
                        order_id
                        from man_order_foll
                        where 1=1
                        and user_id = #{userId}
                    )
                )
            </when>
            <otherwise>
                and
src/main/resources/mapper/PlanMapper.xml
@@ -64,19 +64,32 @@
        <choose>
            <when test="deptId != null and deptId != ''">
                AND (CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId})
                or
                (
                    user_id = #{userId}
                    or
                    mp.id in
                    (
                        select
                        plan_id
                        from man_plan_foll
                        where 1=1
                        and user_id = #{userId}
                    )
                )
            </when>
            <otherwise>
                and
                (
                user_id = #{userId}
                or
                mp.id in
                (
                    select
                    plan_id
                    from man_plan_foll
                    where 1=1
                    and user_id = #{userId}
                    user_id = #{userId}
                    or
                    mp.id in
                    (
                        select
                        plan_id
                        from man_plan_foll
                        where 1=1
                        and user_id = #{userId}
                    )
                )
            </otherwise>