fengjin
2022-10-19 922a118ac36d64fd3d18a6d86e279800c92a5ccd
1.修改自动分配代码逻辑2.修改BUG
3个文件已修改
10 ■■■■■ 已修改文件
flower_city/src/main/java/com/dg/core/db/gen/mapper/OrganizationChartMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/OrganizationChartMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/mapper/OrganizationChartMapper.java
@@ -62,7 +62,7 @@
    /**
     * 根据所属地区查找部门
     */
    List<OrganizationChartEntity> selectByCode(@Param("areaCode") String areaCode);
    List<OrganizationChartEntity> selectByCode(@Param("id")String id, @Param("areaCode") String areaCode);
flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java
@@ -74,8 +74,8 @@
        }
        if (isAdd) {
            //自动分配业务代码开始
            List<OrganizationChartEntity> organizationChartEntities = organizationChartMapper.selectByCode(guideRepairOrder.getAreaCode());
            if (organizationChartEntities != null) {
            List<OrganizationChartEntity> organizationChartEntities = organizationChartMapper.selectByCode(transactionEvent.getDepartmentId(),guideRepairOrder.getAreaCode());
            if (organizationChartEntities.size() > 0) {
                for (OrganizationChartEntity organizationChart : organizationChartEntities) {
                    departmentIds.add(organizationChart.getId().toString());
                }
@@ -216,6 +216,7 @@
    @Override
    public int updateSysUserOrderNum(GuideEvolveEntity order) {
        if (order.getState() != null) {
        if (order.getState().equals("11")) {
            SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId, order.getToUserId()));
            GuideRepairOrder guideRepairOrder = baseMapper.selectOne(new QueryWrapper<GuideRepairOrder>().lambda()
@@ -246,6 +247,7 @@
            sysUserFrom.setTransactionNum(sysUserFrom.getTransactionNum() - 1);
            return sysUserMapper.updateById(sysUserFrom);
        }
         }
        return 0;
    }
flower_city/src/main/resources/mapper/OrganizationChartMapper.xml
@@ -94,7 +94,7 @@
    <select id="selectByCode" resultMap="OrganizationChartResult">
        <include refid="selectOrganizationChartVo"/>
        <where>
            city=#{areaCode} or district= #{areaCode} or village=#{areaCode}
            id=#{id}   and  (city=#{areaCode} or district= #{areaCode} or village=#{areaCode})
        </where>
    </select>