yanghui
2022-10-27 7044df54b1809b1b09e8f20cdf9aef653f9ed12a
Merge remote-tracking branch 'origin/haucheng_panzhihua' into haucheng_panzhihua
52个文件已修改
691 ■■■■ 已修改文件
flower_city/src/main/java/com/dg/core/api/GuideRepairOrderAppletsController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/api/OrganizationAppletsController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/api/TransactionEventAppletsController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/GuideDoController.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/HomeStatisticsController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/OrganizationController.java 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/ReplyTemplateController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/RoleManagementController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/UserController.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/entity/Agreement.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/entity/SysUser.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/mapper/HomeStatisticsMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/mapper/HuaChengSysUserMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/mapper/OrganizationChartMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/mapper/SysUserMapper.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/mapper/TransactionEventMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/interceptor/AuthorizationInterceptor.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/resolvers/CurrentUserMethodArgumentResolver.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/HomeStatisticsService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/IHuaChengSysUserService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/IOrganizationChartService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/ISysUserService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/ITransactionEventService.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/impl/HomeStatisticsImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/impl/HuaChengSysUserImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/impl/OrganizationChartImpl.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/impl/SysUserServiceImpl.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/service/impl/TransactionEventImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/util/PermissionUtil.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/application-sms.properties 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/application.properties 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/GuideRepairOrderMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/HomeStatisticsMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/OrganizationChartMapper.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/SysUserMapper.xml 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/TransactionEventMapper.xml 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActDpcApi.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDpcDAO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoFeedbackMapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDpcServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/WXMessageUtil.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDpcMapper.xml 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoFeedbackDOMapper.xml 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/api/GuideRepairOrderAppletsController.java
@@ -287,8 +287,8 @@
        guideEvolveEntity.setCreateTime(LocalDateTime.now());
        guideEvolveEntity.setUpdateTime(LocalDateTime.now());
        guideEvolveEntity.setState("13");
        guideEvolveEntity.setDepartmentalId(sysUser.getDepartmentId());
        guideEvolveEntity.setToUserId(sysUser.getUserId()+"");
        guideEvolveEntity.setFromDepartmentalId(sysUser.getDepartmentId());
        guideEvolveEntity.setFromUserId(sysUser.getUserId()+"");
        guideEvolveEntity.setGuideId(entity.getId().toString());
        int i = iGuideRepairOrderService.updateConfig(entity);
        if (i>0)
flower_city/src/main/java/com/dg/core/api/OrganizationAppletsController.java
@@ -28,7 +28,7 @@
    @GetMapping("/getList")
    public TableDataInfo selectConfigList()
    {
        return getDataTable(iOrganizationChartService.selectConfigList("",""));
        return getDataTable(iOrganizationChartService.selectConfigList("","" ,null));
    }
flower_city/src/main/java/com/dg/core/api/TransactionEventAppletsController.java
@@ -50,9 +50,9 @@
     */
    @ApiOperation(value = "导办事物列表(不分页)",response = TransactionEvent.class)
    @GetMapping("/selectList")
    public TableDataInfo selectList()
    public TableDataInfo selectList(@RequestParam(value = "keyWord",required = false) String keyWord)
    {
        return getDataTable(iTransactionEventService.selectList());
        return getDataTable(iTransactionEventService.selectList(keyWord));
    }
flower_city/src/main/java/com/dg/core/controller/GuideDoController.java
@@ -3,9 +3,12 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dg.core.ResultData;
import com.dg.core.annotation.Authorization;
import com.dg.core.annotation.CurrentUser;
import com.dg.core.db.gen.entity.SysUser;
import com.dg.core.service.IGuideRepairOrderService;
import com.dg.core.service.IOrganizationChartService;
import com.dg.core.service.ISysUserService;
import com.dg.core.util.PermissionUtil;
import com.dg.core.util.Snowflake;
import com.dg.core.util.TableDataInfo;
import io.swagger.annotations.Api;
@@ -33,6 +36,9 @@
    @Autowired
    IGuideRepairOrderService iGuideRepairOrderService;
    @Autowired
    IOrganizationChartService iOrganizationChartService;
    /**
     * 查询列表
     *
@@ -43,14 +49,16 @@
    @Authorization
    public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum,
                                          @RequestParam(value = "pageSize",required = false) Integer pageSize,
                                          @RequestParam(value = "keyword",required = false) String keyword)
                                          @RequestParam(value = "keyword",required = false) String keyword,
                                          @CurrentUser SysUser sysUser)
    {
        Assert.notNull(pageNum, "pageNum can not be empty");
        Assert.notNull(pageSize, "pageSize can not be empty");
        Page<SysUser> pageParam = new Page<>(pageNum,pageSize);
        List<SysUser> list = IUserService.selectConfigList(pageParam,pageSize,"2",keyword);
        List<String> ids= PermissionUtil.getPermission(sysUser,iOrganizationChartService);
        List<SysUser> list = IUserService.selectConfigList(pageParam,pageSize,"2",keyword,ids);
        int num=IUserService.selectNum("2",keyword);
        int num=IUserService.selectNum("2",keyword,ids);
        return getDataTable(list,num);
    }
@@ -104,7 +112,7 @@
            user.setPhonenumber(config.getPhonenumber());
            user.setLoginName(config.getLoginName());
            user.setMasterIds(config.getMasterIds());
            user.setRoleIds(2+"");
            user.setRoleIds("2");
            user.setUserType("2");
            user.setStatus(config.getStatus());
            user.setUpdateTime(LocalDateTime.now());
@@ -170,8 +178,10 @@
        {
            return error("该人员有工单未处理完不能删除");
        }
        return toAjax(IUserService.deleteConfigById(userId));
        SysUser user=IUserService.selectData(userId,null,null);
        user.setUserType("3");
        user.setRoleIds("3");
        return toAjax(IUserService.updateConfig(user));
    }
    /**
@@ -222,4 +232,5 @@
    public  ResultData  queryList(@RequestParam(value = "keyWord",required = false) String keyWord){
        return  ResultData.success(IUserService.queryList(2,keyWord));
    }
}
flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java
@@ -373,19 +373,24 @@
        Assert.notNull(pageSize, "pageSize 不能为空");
        Page<GuideRepairOrder> pageParam = new Page<>(pageNum,pageSize);
        List<String> ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService);
        List<String> ids=null;
        String userId=null;
        if( StringUtils.equals("2",sysUser.getRoleIds()))
        {
            if(StringUtils.equals("1",sysUser.getIsDivisionHead()))
            {
                userId=null;
            }
            else
            {
                ids=null;
                userId=sysUser.getUserId()+"";
            }
//            if(StringUtils.equals("1",sysUser.getIsDivisionHead()))
//            {
//                userId=null;
//            }
//            else
//            {
//                ids=null;
//                userId=sysUser.getUserId()+"";
//            }
            userId=sysUser.getUserId()+"";
        }
        else
        {
            ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService);
        }
        List<GuideRepairOrder> list = iGuideRepairOrderService.selectConfigList(pageParam,pageSize,
flower_city/src/main/java/com/dg/core/controller/HomeStatisticsController.java
@@ -352,7 +352,7 @@
            int num=0;
            if(ids!=null&&ids.size()>0)
            {
                num=iGuideRepairOrderService.countStatisticsNum(null,ids,null,null,null,null,null,null);
                num=homeStatisticsService.rangeStatistics(ids);
            }
            range.setNum(num+"");
            rangeStatistics.add(range);
flower_city/src/main/java/com/dg/core/controller/OrganizationController.java
@@ -9,6 +9,7 @@
import com.dg.core.db.gen.entity.TransactionEvent;
import com.dg.core.service.IOrganizationChartService;
import com.dg.core.service.ITransactionEventService;
import com.dg.core.util.PermissionUtil;
import com.dg.core.util.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -41,7 +42,19 @@
    @GetMapping("/getList")
    public TableDataInfo selectConfigList()
    {
        return getDataTable(iOrganizationChartService.selectConfigList("",""));
        return getDataTable(iOrganizationChartService.selectConfigList("","",null));
    }
    /**
     * 查询机构列表(权限)
     */
    @ApiOperation(value = "查询机构列表(权限 选择用 ) ",response = OrganizationChartEntity.class)
    @GetMapping("/selectJurisdiction")
    @Authorization
    public TableDataInfo selectJurisdiction(@CurrentUser SysUser sysUser)
    {
        return getDataTable(iOrganizationChartService.selectConfigList(sysUser.getDepartmentId(),"",null));
    }
    /**
@@ -138,11 +151,14 @@
    @Authorization
    public TableDataInfo queryList(@RequestParam(value = "pageNum",required = false) Integer pageNum,
                                            @RequestParam(value = "pageSize",required = false) Integer pageSize,
                                            @RequestParam(value = "organizationName",required = false)String organizationName){
                                            @RequestParam(value = "organizationName",required = false)String organizationName,
                                   @CurrentUser SysUser sysUser){
        Assert.notNull(pageNum, "pageNum can not be empty");
        Assert.notNull(pageSize, "pageSize can not be empty");
        Page<OrganizationChartEntity> pageParam = new Page<>(pageNum,pageSize);
        return getDataTable(iOrganizationChartService.queryList(pageParam,pageSize,organizationName),iOrganizationChartService.countList(organizationName));
        List<String> ids= PermissionUtil.getPermission(sysUser,iOrganizationChartService);
        return getDataTable(iOrganizationChartService.queryList(pageParam,pageSize,organizationName,ids),
                            iOrganizationChartService.countList(organizationName,ids));
    }
@@ -156,7 +172,17 @@
    public TableDataInfo getOrganizations(@RequestParam(value = "department",required = false) String departmentId)
    {
        List<OrganizationChartEntity> ids=new ArrayList<>();
        List<OrganizationChartEntity> lists = iOrganizationChartService.selectParentList(departmentId,"");
        List<OrganizationChartEntity> lists=null;
        if(StringUtils.isEmpty(departmentId))
        {
            lists= iOrganizationChartService.selectParentList(null,"1");
        }
        else
        {
            lists= iOrganizationChartService.selectParentList(departmentId,null);
        }
        if(lists.size()<1)
        {
            lists.add(iOrganizationChartService.selectConfigById(departmentId));
@@ -166,7 +192,12 @@
        {
            return null;
        }
        ids.add(iOrganizationChartService.selectConfigById(departmentId));
        if(!StringUtils.isEmpty(departmentId))
        {
            ids.add(iOrganizationChartService.selectConfigById(departmentId));
        }
        return getDataTable(ids);
    }
flower_city/src/main/java/com/dg/core/controller/ReplyTemplateController.java
@@ -44,11 +44,7 @@
                                          @CurrentUser SysUser sysUser)
    {
        Page<ReplyTemplateEntity> pageParam = new Page<>(pageNum,pageSize);
        List<String> ids= PermissionUtil.getPermission(sysUser,iOrganizationChartService);
        if(ids==null || ids.size()<1)
        {
            return getDataTable("您没有权限查看该数据");
        }
        List<String> ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService);
        List<ReplyTemplateEntity> list = iReplyTemplateService.selectConfigList(pageParam,pageSize,Name,ids);
        int num=iReplyTemplateService.countNum(Name,ids);
        return getDataTable(list,num);
@@ -91,12 +87,12 @@
            return ResultData.error("模板名称不能为空");
        }
        if(StringUtils.isEmpty(sysUser.getDepartmentId()))
        if(StringUtils.isEmpty(entity.getDepartmentId()))
        {
            return ResultData.error("部门id不能为空  请分配部门id");
        }
        List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId());
        List<String> ids=iOrganizationChartService.getIds(entity.getDepartmentId());
        int num=iReplyTemplateService.countNum(entity.getName(),ids);
        if(num>0)
@@ -105,7 +101,7 @@
        }
        entity.setId(null);
        entity.setDepartmentId(sysUser.getDepartmentId());
        entity.setDepartmentId(entity.getDepartmentId());
        entity.setCreateUserId(sysUser.getUserId()+"");
        return toAjax(iReplyTemplateService.insertConfig(entity));
flower_city/src/main/java/com/dg/core/controller/RoleManagementController.java
@@ -77,9 +77,9 @@
    @ApiOperation("编辑角色")
    @PostMapping("/update")
    @Authorization
    public ResultData updateConfig(@RequestBody RoleManagementEntity entity)
    public ResultData updateConfig(@RequestBody RoleManagementEntity entity,@CurrentUser SysUser sysUser)
    {
//        entity.setUpdateUserId(sysUser.getUserId()+"");
        entity.setUpdateUserId(sysUser.getUserId()+"");
        return toAjax(iRoleManagementService.updateConfig(entity));
    }
flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java
@@ -66,10 +66,10 @@
        Assert.notNull(pageNum, "pageNum 不能为空");
        Assert.notNull(pageSize, "pageSize 不能为空");
        Page<TransactionEvent> pageParam = new Page<>(pageNum,pageSize);
        List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId());
//        List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId());
        List<TransactionEvent> list = iTransactionEventService.selectConfigList(pageParam,pageSize,keyword,
                classifyGrade,ids);
        int num=iTransactionEventService.countNum(keyword,classifyGrade,ids);
                classifyGrade,null);
        int num=iTransactionEventService.countNum(keyword,classifyGrade,null);
        return getDataTable(list,num);
    }
@@ -80,9 +80,9 @@
     */
    @ApiOperation(value = "导办事物列表(不分页)",response = TransactionEvent.class)
    @GetMapping("/selectList")
    public TableDataInfo selectList()
    public TableDataInfo selectList(@RequestParam(value = "keyWord",required = false) String keyWord)
    {
        return getDataTable(iTransactionEventService.selectList());
        return getDataTable(iTransactionEventService.selectList(keyWord));
    }
    /**
@@ -244,7 +244,8 @@
     */
    @ApiOperation(value = "办事指南复制",response = ResultData.class)
    @GetMapping("/copy")
    public ResultData copy(@RequestParam("Id") String Id)
    @Authorization
    public ResultData copy(@RequestParam("Id") String Id,@CurrentUser SysUser sysUser)
    {
        if(StringUtils.isEmpty(Id))
        {
@@ -256,6 +257,8 @@
        {
            return ResultData.error("复制项不存在");
        }
        transactionEvent.setDepartmentId(sysUser.getDepartmentId());
        transactionEvent.setMatterName(transactionEvent.getMatterName()+"(副本)");
        transactionEvent.setId(null);
@@ -263,6 +266,19 @@
    }
    /**
     * 办事指南根据分类id筛选
     * @return
     */
    @ApiOperation(value = "办事指南根据分类id筛选",response = ResultData.class)
    @GetMapping("/selectClassifyList")
    @Authorization
    public TableDataInfo<TransactionEvent> selectClassifyList(@RequestParam("ids") List<String> ids)
    {
        return getDataTable(iTransactionEventService.selectClassifyList(ids));
    }
flower_city/src/main/java/com/dg/core/controller/UserController.java
@@ -56,7 +56,14 @@
        if(user==null)
        {
            HuaChengSysUser huaChengSysUser=iHuaChengSysUserService.selectData("",account,"");
            List<HuaChengSysUser> list=iHuaChengSysUserService.selectData("",account,"");
            HuaChengSysUser huaChengSysUser=null;
            if(list!=null || list.size()>0 )
            {
                huaChengSysUser=list.get(0);
            }
            if(huaChengSysUser==null || !password.equals(huaChengSysUser.getPassword()))
            {
                //提示用户名或密码错误
@@ -182,9 +189,9 @@
        Assert.notNull(pageNum, "pageNum can not be empty");
        Assert.notNull(pageSize, "pageSize can not be empty");
        Page<SysUser> pageParam = new Page<>(pageNum,pageSize);
        List<SysUser> list = IUserService.selectConfigList(pageParam,pageSize,"3",keyword);
        List<SysUser> list = IUserService.selectConfigList(pageParam,pageSize,"3",keyword,null);
        int num=IUserService.selectNum("3",keyword);
        int num=IUserService.selectNum("3",keyword,null);
        return getDataTable(list,num);
    }
flower_city/src/main/java/com/dg/core/db/gen/entity/Agreement.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -49,12 +50,14 @@
     * 修改时间
     */
    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
flower_city/src/main/java/com/dg/core/db/gen/entity/SysUser.java
@@ -260,4 +260,18 @@
    @ApiModelProperty("是否是部门领导(1是  2不是)")
    private String isDivisionHead;
    @ApiModelProperty("办理事项ids")
    private String mattersIds;
    @TableField(exist = false)
    @ApiModelProperty("办理事项名称")
    private String mattersNames;
    @TableField(exist = false)
    @ApiModelProperty("办结事项数目")
    private String transactionEndNum;
}
flower_city/src/main/java/com/dg/core/db/gen/mapper/HomeStatisticsMapper.java
@@ -90,6 +90,9 @@
    List<String> countId(String district);
    int rangeStatistics(List<String> ids);
    /**
     * 首页统计用
     * @return
flower_city/src/main/java/com/dg/core/db/gen/mapper/HuaChengSysUserMapper.java
@@ -18,7 +18,7 @@
{
    public List<HuaChengSysUser> selectConfigList();
    public HuaChengSysUser selectData(@Param("userId") String userId,@Param("account")  String account,@Param("phone") String phone);
    public List<HuaChengSysUser> selectData(@Param("userId") String userId,@Param("account")  String account,@Param("phone") String phone);
    public int selectNum();
}
flower_city/src/main/java/com/dg/core/db/gen/mapper/OrganizationChartMapper.java
@@ -14,7 +14,8 @@
     * 查询机构列表
     */
    public List<OrganizationChartEntity> selectConfigList(@Param("parentId") String parentId,
                                                          @Param("grade") String grade);
                                                          @Param("grade") String grade,
                                                          @Param("ids") List<String> ids);
    /**
     * 新增机构
@@ -50,13 +51,14 @@
    /**
     * 查询机构列表(分页)
     */
    List<OrganizationChartEntity> queryList(IPage<OrganizationChartEntity> page, Integer state, String organizationName);
    List<OrganizationChartEntity> queryList(IPage<OrganizationChartEntity> page, Integer state,
                                            @Param("organizationName") String organizationName,@Param("ids") List<String> ids);
    /**
     * 统计数量(部门应用)
     */
    int countList(String organizationName);
    int countList(@Param("organizationName") String organizationName,@Param("ids") List<String> ids);
    /**
flower_city/src/main/java/com/dg/core/db/gen/mapper/SysUserMapper.java
@@ -28,7 +28,8 @@
     */
    public List<SysUser> selectConfigList(IPage<SysUser> page, Integer state,
                                          @Param("userType") String userType,
                                          @Param("userName") String userName);
                                          @Param("userName") String userName,
                                          @Param("ids") List<String> ids);
@@ -67,7 +68,9 @@
     *
     * @return 结果
     */
    public int selectNum(@Param("userType") String userType,@Param("userName") String userName);
    public int selectNum(@Param("userType") String userType,
                         @Param("userName") String userName,
                         @Param("ids") List<String> ids);
    /**
     * 根据部门id及分类id获取导办用户
flower_city/src/main/java/com/dg/core/db/gen/mapper/TransactionEventMapper.java
@@ -178,6 +178,13 @@
    List<TransactionEvent> selectListByIds(String[] list);
    /**
     * 根据分类筛选数据
     * @param ids
     * @return
     */
    List<TransactionEvent> selectClassifyList(List<String> ids);
    /**
     * 根据部门判断是否有事项名称重复
     */
    String selectDataIfExist(@Param("departmentId") String departmentId,
flower_city/src/main/java/com/dg/core/interceptor/AuthorizationInterceptor.java
@@ -19,6 +19,7 @@
import java.lang.reflect.Method;
import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime;
import java.util.List;
/**
 * 自定义拦截器,判断此次请求是否有权限
@@ -65,7 +66,15 @@
                //如果token验证成功,权限检查通过,将token对应的用户id存在request中,便于之后注入
                request.setAttribute(Constant.CURRENT_USER_ID, manager.getHCUserId(HCtoken));
                System.out.println("花城用户id:"+manager.getHCUserId(HCtoken));
                HuaChengSysUser huaChengSysUser=iHuaChengSysUserService.selectData(manager.getHCUserId(HCtoken)+"","","");
                List<HuaChengSysUser> list=iHuaChengSysUserService.selectData(manager.getHCUserId(HCtoken)+"","","");
                HuaChengSysUser huaChengSysUser=null;
                if(list!=null || list.size()>0 )
                {
                    huaChengSysUser=list.get(0);
                }
                if(huaChengSysUser!=null && !StringUtils.isEmpty(huaChengSysUser.getUserId()) )
                {
                    SysUser sysUser = IUserService.selectData(null,huaChengSysUser.getPhone(),null);
flower_city/src/main/java/com/dg/core/resolvers/CurrentUserMethodArgumentResolver.java
@@ -16,6 +16,8 @@
import org.springframework.web.method.support.ModelAndViewContainer;
import org.springframework.web.multipart.support.MissingServletRequestPartException;
import java.util.List;
/**
 * 增加方法注入,将含有CurrentUser注解的方法参数注入当前登录用户
 */
@@ -53,7 +55,14 @@
                return sysUser;
            }
            HuaChengSysUser huaChengSysUser=iHuaChengSysUserService.selectData(currentUserId+"","","");
            List<HuaChengSysUser> list=iHuaChengSysUserService.selectData(currentUserId+"","","");
            HuaChengSysUser huaChengSysUser=null;
            if(list!=null || list.size()>0 )
            {
                huaChengSysUser=list.get(0);
            }
            if(huaChengSysUser!=null)
            {
                sysUser=userService.selectData(null,huaChengSysUser.getPhone(),null);
flower_city/src/main/java/com/dg/core/service/HomeStatisticsService.java
@@ -93,4 +93,7 @@
     */
    int reversionRate(String state,String isTimeout);
    int rangeStatistics(List<String> ids);
}
flower_city/src/main/java/com/dg/core/service/IHuaChengSysUserService.java
@@ -8,7 +8,7 @@
{
    public List<HuaChengSysUser> selectConfigList();
    public HuaChengSysUser selectData(String userId,String account,String phone);
    public List<HuaChengSysUser> selectData(String userId,String account,String phone);
    public int selectNum();
}
flower_city/src/main/java/com/dg/core/service/IOrganizationChartService.java
@@ -10,7 +10,7 @@
    /**
     * 查询机构列表
     */
    public List<OrganizationChartEntity> selectConfigList(String parentId,String grade);
    public List<OrganizationChartEntity> selectConfigList(String parentId,String grade,List<String> ids);
    /**
     * 新增机构
@@ -46,13 +46,13 @@
    /**
     * 查询机构列表(分页)
     */
    List<OrganizationChartEntity> queryList(IPage<OrganizationChartEntity> page, Integer state, String organizationName);
    List<OrganizationChartEntity> queryList(IPage<OrganizationChartEntity> page, Integer state, String organizationName,List<String> ids);
    /**
     * 统计数量(部门应用)
     */
    int countList(String organizationName);
    int countList(String organizationName,List<String> ids);
    /**
     * 获取部门下子部门的全部id
flower_city/src/main/java/com/dg/core/service/ISysUserService.java
@@ -14,7 +14,8 @@
     *
     * @return 参数配置信息
     */
    public List<SysUser> selectConfigList(IPage<SysUser> page, Integer state,String userType,String userName);
    public List<SysUser> selectConfigList(IPage<SysUser> page, Integer state,String userType,
                                          String userName,List<String> ids);
    SysUser selectData(String userId,String phonenumber,String loginName);
@@ -48,7 +49,7 @@
     *
     * @return 结果
     */
    public int selectNum(String userType,String userName);
    public int selectNum(String userType,String userName,List<String> ids);
    /**
     * 发送验证码(如果没有该用户则新建用户)
flower_city/src/main/java/com/dg/core/service/ITransactionEventService.java
@@ -122,7 +122,7 @@
     * 导办事物列表(不分页)
     * @return
     */
    List<TransactionEvent> selectList();
    List<TransactionEvent> selectList(String keyWord);
    /**
     * 智能咨询
@@ -144,4 +144,11 @@
    List<String> selectclassifyId(String classifyId);
    /**
     * 根据分类筛选数据
     * @param ids
     * @return
     */
    List<TransactionEvent> selectClassifyList(List<String> ids);
}
flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java
@@ -315,7 +315,7 @@
                DateTime dateTime = td.nextWeekDay(dateTimeUser);
                Calendar calendar = dateTime.toCalendar();
                LocalDateTime localDateTime = LocalDateTime.of(calendar.get(Calendar.YEAR),
                        calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE),
                        calendar.get(Calendar.MONTH)+1, calendar.get(Calendar.DATE),
                        9 + automessageSysSettings.getTimeoutNotificationNum(), 0);//设置时间为下一个工作日时间的9点+设置超时时间
                guideRepairOrder.setTimeoutTime(localDateTime);
            }
@@ -324,7 +324,7 @@
            DateTime dateTime = td.nextWeekDay(dateTimeUser);
            Calendar calendar = dateTime.toCalendar();
            LocalDateTime localDateTime = LocalDateTime.of(calendar.get(Calendar.YEAR),
                    calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE),
                    calendar.get(Calendar.MONTH)+1, calendar.get(Calendar.DATE),
                    9 + automessageSysSettings.getTimeoutNotificationNum(), 0);//设置时间为下一个工作日时间的9点+设置超时时间
            guideRepairOrder.setTimeoutTime(localDateTime);
        }
flower_city/src/main/java/com/dg/core/service/impl/HomeStatisticsImpl.java
@@ -85,4 +85,9 @@
        return baseMapper.reversionRate(state,isTimeout);
    }
    @Override
    public int rangeStatistics(List<String> ids) {
        return baseMapper.rangeStatistics(ids);
    }
}
flower_city/src/main/java/com/dg/core/service/impl/HuaChengSysUserImpl.java
@@ -18,7 +18,7 @@
    }
    @Override
    public HuaChengSysUser selectData(String userId,String account,String phone) {
    public List<HuaChengSysUser> selectData(String userId,String account,String phone) {
        return baseMapper.selectData(userId,account,phone);
    }
flower_city/src/main/java/com/dg/core/service/impl/OrganizationChartImpl.java
@@ -6,6 +6,7 @@
import com.dg.core.db.gen.entity.OrganizationChartEntity;
import com.dg.core.db.gen.mapper.OrganizationChartMapper;
import com.dg.core.service.IOrganizationChartService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@@ -17,13 +18,20 @@
{
    @Override
    public List<OrganizationChartEntity> selectConfigList(String parentId,String grade)
    public List<OrganizationChartEntity> selectConfigList(String parentId,String grade,List<String> ids)
    {
        List<OrganizationChartEntity> ocList=baseMapper.selectConfigList("","1");
        List<OrganizationChartEntity> ocList=baseMapper.selectConfigList(parentId,"1",ids);
        if(ocList==null || ocList.size()<1)
        {
            List<String> id=new ArrayList<>();
            id.add(parentId);
            ocList=baseMapper.selectConfigList(null,null,id);
        }
        for (OrganizationChartEntity entity:ocList)
        {
            entity.setChild(baseMapper.selectConfigList(entity.getId()+"",""));
            entity.setChild(baseMapper.selectConfigList(entity.getId()+"","",null));
            if (entity.getChild()!=null)
            {
@@ -57,9 +65,9 @@
    public List<OrganizationChartEntity> selectConfigList(String parentsId) {
        List<OrganizationChartEntity> list =baseMapper.selectConfigList(parentsId,"");
        List<OrganizationChartEntity> list =baseMapper.selectConfigList(parentsId,"",null);
        for (OrganizationChartEntity sysStreet:list) {
            sysStreet.setChild(baseMapper.selectConfigList(sysStreet.getId().toString(),""));
            sysStreet.setChild(baseMapper.selectConfigList(sysStreet.getId().toString(),"",null));
            if (sysStreet.getChild()!=null)
            {
                sysStreet.setChild(this.selectConfigList(sysStreet.getId().toString()));
@@ -80,19 +88,20 @@
    }
    @Override
    public List<OrganizationChartEntity> queryList(IPage<OrganizationChartEntity> page, Integer state, String organizationName) {
        return baseMapper.queryList(page,state,organizationName);
    public List<OrganizationChartEntity> queryList(IPage<OrganizationChartEntity> page, Integer state,
                                                   String organizationName,List<String> ids) {
        return baseMapper.queryList(page,state,organizationName,ids);
    }
    @Override
    public int countList(String organizationName) {
        return baseMapper.countList(organizationName);
    public int countList(String organizationName,List<String> ids) {
        return baseMapper.countList(organizationName,ids);
    }
    @Override
    public List<OrganizationChartEntity> selectParentList(String parentId, String grade) {
        return baseMapper.selectConfigList(parentId,grade);
        return baseMapper.selectConfigList(parentId,grade,null);
    }
    /**
@@ -105,7 +114,7 @@
    public List<String> getIds(String id)
    {
        List<String> ids=new ArrayList<>();
        List<OrganizationChartEntity> lists = baseMapper.selectConfigList(id,"");
        List<OrganizationChartEntity> lists = baseMapper.selectConfigList(id,"",null);
        if(lists.size()<1)
        {
            lists.add(baseMapper.selectConfigById(id));
flower_city/src/main/java/com/dg/core/service/impl/SysUserServiceImpl.java
@@ -65,7 +65,14 @@
        SysUser sysUser = baseMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getPhonenumber, phonenumber));
        if (sysUser==null){
            //查询花城e+是否存在此用户
            HuaChengSysUser huaChengSysUser=iHuaChengSysUserService.selectData("","",phonenumber);
            List<HuaChengSysUser> list=iHuaChengSysUserService.selectData("","",phonenumber);
            HuaChengSysUser huaChengSysUser=null;
            if(list!=null || list.size()>0 )
            {
                huaChengSysUser=list.get(0);
            }
            if(huaChengSysUser==null)
            {
                SysUser newUser = new SysUser();
@@ -154,7 +161,14 @@
        SysUser sysUser = baseMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getPhonenumber, phonenumber));
        if (sysUser==null){
            //查询花城e+是否存在此用户
            HuaChengSysUser huaChengSysUser=iHuaChengSysUserService.selectData("","",phonenumber);
            List<HuaChengSysUser> list=iHuaChengSysUserService.selectData("","",phonenumber);
            HuaChengSysUser huaChengSysUser=null;
            if(list!=null || list.size()>0 )
            {
                huaChengSysUser=list.get(0);
            }
            SysUser newUser = new SysUser();
            if(huaChengSysUser==null)
            {
@@ -240,8 +254,8 @@
    }
    @Override
    public List<SysUser> selectConfigList(IPage<SysUser> page, Integer state,String userType,String userName) {
        return baseMapper.selectConfigList(page, state,userType,userName);
    public List<SysUser> selectConfigList(IPage<SysUser> page, Integer state,String userType,String userName,List<String> ids) {
        return baseMapper.selectConfigList(page, state,userType,userName,ids);
    }
    @Override
@@ -284,8 +298,8 @@
    }
    @Override
    public int selectNum(String userType,String userName) {
        return baseMapper.selectNum(userType,userName);
    public int selectNum(String userType,String userName,List<String> ids) {
        return baseMapper.selectNum(userType,userName,ids);
    }
flower_city/src/main/java/com/dg/core/service/impl/TransactionEventImpl.java
@@ -190,6 +190,11 @@
        return baseMapper.selectclassifyId(classifyId);
    }
    @Override
    public List<TransactionEvent> selectClassifyList(List<String> ids) {
        return baseMapper.selectClassifyList(ids);
    }
    @Override
    public int countNumByMatterName(String matterName) {
@@ -229,7 +234,12 @@
    }
    @Override
    public List<TransactionEvent> selectList() {
    public List<TransactionEvent> selectList(String keyWord) {
        if (keyWord!=null&&keyWord!=""){
            return baseMapper.selectList(new QueryWrapper<TransactionEvent>().lambda().like(TransactionEvent::getMatterName,keyWord));
        }
        else {
        return baseMapper.selectList(new QueryWrapper<TransactionEvent>().lambda());
        }
    }
}
flower_city/src/main/java/com/dg/core/util/PermissionUtil.java
@@ -18,7 +18,7 @@
    public static List<String> getPermission(SysUser sysUser,IOrganizationChartService iOrganizationChartService)
    {
        if (StringUtils.equals("3", sysUser.getRoleIds())) {
        if (StringUtils.equals("3", sysUser.getUserType())) {
            if (StringUtils.isEmpty(sysUser.getDataPermission())) {
                return null;
            }
@@ -37,13 +37,13 @@
                return ids;
            }
        }
        else if(StringUtils.equals("2", sysUser.getRoleIds()))
        else if(StringUtils.equals("2", sysUser.getUserType()))
        {
            //导办人员
            List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId());
            return ids;
        }
        else if(StringUtils.equals("1", sysUser.getRoleIds()))
        else if(StringUtils.equals("1", sysUser.getUserType()))
        {
            //管理员
            List<String> ids=iOrganizationChartService.getIds("");
flower_city/src/main/resources/application-sms.properties
@@ -7,19 +7,19 @@
#??????????,???????????????????????????????????
#??????
#aliyun.TemplateCodeOvertime=SMS_254460011
aliyun.TemplateCodeOvertime=SMS_254460011
#??????
aliyun.TemplateCodeOvertime=SMS_254460012
#aliyun.TemplateCodeOvertime=SMS_254460012
#??????
#aliyun.TemplateCodeComplete=SMS_254875101
aliyun.TemplateCodeComplete=SMS_254875101
#??????
aliyun.TemplateCodeComplete=SMS_254875102
#aliyun.TemplateCodeComplete=SMS_254875102
#??????
#aliyun.TemplateCodeSubmit=SMS_254880764
aliyun.TemplateCodeSubmit=SMS_254880764
#??????
aliyun.TemplateCodeSubmit=SMS_254880763
#aliyun.TemplateCodeSubmit=SMS_254880763
flower_city/src/main/resources/application.properties
@@ -22,8 +22,8 @@
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
spring.servlet.multipart.max-file-size=20MB
spring.servlet.multipart.max-request-size=50MB
spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=150MB
flower_city/src/main/resources/mapper/GuideRepairOrderMapper.xml
@@ -85,8 +85,13 @@
            <if test="matterName != null and matterName != ''">
                AND (matter_name like concat('%', #{matterName}, '%')) or
                ( classify_id in ( SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%') ) )
                or (classify_id in (SELECT id FROM automessage_classify_administration WHERE automessage_classify_administration.parent_id=
                (SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%'))) )
                or (classify_id in (SELECT id FROM automessage_classify_administration WHERE automessage_classify_administration.parent_id in
                (SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%')))
                or  (select user_name from automessage_sys_user where a.guide_user_id=automessage_sys_user.user_id ) like concat('%', #{matterName}, '%')
                 or order_num like concat('%', #{matterName}, '%')   or
                (select user_name from automessage_sys_user where a.submit_user_id=automessage_sys_user.user_id ) like concat('%',  #{matterName}, '%')
                or consult_user_name like concat('%',  #{matterName}, '%')        or
                guide_department_id   in (SELECT id  FROM automessage_organization_chart  WHERE organization_name like concat('%',  #{matterName}, '%')    )  )
            </if>
            <if test="status != null and status != ''">
                AND a.state=#{status}
@@ -110,8 +115,13 @@
            <if test="matterName != null and matterName != ''">
                AND (matter_name like concat('%', #{matterName}, '%')) or
                ( classify_id in ( SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%') ) )
                 or (classify_id in (SELECT id FROM automessage_classify_administration WHERE automessage_classify_administration.parent_id=
                 (SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%'))) )
                or (classify_id in (SELECT id FROM automessage_classify_administration WHERE automessage_classify_administration.parent_id in
                (SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%')))
                or  (select user_name from automessage_sys_user where automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id ) like concat('%', #{matterName}, '%')
                or order_num like concat('%', #{matterName}, '%')   or
                (select user_name from automessage_sys_user where automessage_guide_repair_order.submit_user_id=automessage_sys_user.user_id ) like concat('%',  #{matterName}, '%')
                or consult_user_name like concat('%',  #{matterName}, '%')        or
                guide_department_id   in (SELECT id  FROM automessage_organization_chart  WHERE organization_name like concat('%',  #{matterName}, '%')    )  )
            </if>
            <if test="status != null and status != ''">
                AND automessage_guide_repair_order.state=#{status}
flower_city/src/main/resources/mapper/HomeStatisticsMapper.xml
@@ -155,5 +155,19 @@
    <!--  首页统计 区域统计 勿动  -->
    <select id="rangeStatistics" parameterType="string" resultType="integer">
        select count(id) from automessage_guide_repair_order
        <where>
            <if test="ids != null">
                and guide_department_id IN
                <foreach collection="ids" item="param"  open="(" close=")" separator=",">
                    #{param}
                </foreach>
            </if>
        </where>
    </select>
</mapper>
flower_city/src/main/resources/mapper/OrganizationChartMapper.xml
@@ -19,7 +19,6 @@
        <id     property="updateUserId"      column="update_user_id"      />
        <id     property="areaList"      column="area_list"      />
    </resultMap>
    <sql id="selectOrganizationChartVo">
@@ -59,6 +58,12 @@
            <if test="organizationName != null and organizationName != ''">
                AND organization_name like concat('%', #{organizationName}, '%')
            </if>
            <if test="ids != null">
                and id IN
                <foreach collection="ids" item="param"  open="(" close=")" separator=",">
                    #{param}
                </foreach>
            </if>
        </where>
    </select>
@@ -67,6 +72,12 @@
        <where>
            <if test="organizationName != null and organizationName != ''">
                AND organization_name like concat('%', #{organizationName}, '%')
            </if>
            <if test="ids != null">
                and id IN
                <foreach collection="ids" item="param"  open="(" close=")" separator=",">
                    #{param}
                </foreach>
            </if>
        </where>
    </select>
@@ -77,10 +88,15 @@
            <if test="parentId != null and parentId != ''">
                AND parent_id=#{parentId}
            </if>
            <if test="grade != null and grade != ''">
                AND grade=#{grade}
            </if>
            <if test="ids != null">
                and id IN
                <foreach collection="ids" item="param"  open="(" close=")" separator=",">
                    #{param}
                </foreach>
            </if>
        </where>
    </select>
flower_city/src/main/resources/mapper/SysUserMapper.xml
@@ -37,6 +37,7 @@
        <result property="openid"      column="openid"      />
        <result property="transactionNum"      column="transaction_num"      />
        <result property="isDivisionHead"      column="is_division_head"      />
        <result property="mattersIds"      column="matters_ids"      />
    </resultMap>
    <sql id="selectSysUserVo">
@@ -66,12 +67,20 @@
            department_id,
            stair_id,
            second_level_id,
            matters_ids,
            (SELECT GROUP_CONCAT(matter_name) FROM automessage_transaction_event WHERE id in (SELECT
              substring_index(substring_index(matters_ids,',', b.help_topic_id + 1), ',', -1) result
          FROM
              mysql.help_topic b
          where
                  b.help_topic_id &lt; (LENGTH(matters_ids) - LENGTH(REPLACE(matters_ids, ',', '')) + 1))) as mattersNames,
            concat(
                    IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select city from automessage_organization_chart
                    IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select city from automessage_organization_chart
                            where automessage_organization_chart.id=department_id)),''),
                    IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select district from automessage_organization_chart
                    IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select district from automessage_organization_chart
                            where automessage_organization_chart.id=department_id)),''),
                    IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select village from automessage_organization_chart
                    IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select village from automessage_organization_chart
                            where automessage_organization_chart.id=department_id)),'')
                ) AS department_area,
            leisure_state,
@@ -88,6 +97,8 @@
            openid,
            (select user_name from automessage_sys_user where automessage_sys_user.user_id=create_by) as createName,
            transaction_num,
            (select count(id) from automessage_guide_repair_order where automessage_guide_repair_order.state='3'
             and automessage_guide_repair_order.guide_user_id=user_id) as transactionEndNum,
            (select role_name from automessage_role_management where automessage_role_management.id=role_ids) as roleName,
            (select permission from automessage_role_management where automessage_role_management.id=role_ids) as permission,
            (select organization_name from automessage_organization_chart where automessage_sys_user.department_id=automessage_organization_chart.id) as department_name
@@ -98,15 +109,22 @@
    <select id="selectNum" parameterType="string" resultType="integer">
        select count(user_id) from automessage_sys_user
        <where>
            <if test="userName != null and userName != ''">
                AND user_name like concat('%', #{userName}, '%') or
                (department_id in (SELECT id FROM automessage_organization_chart
                WHERE organization_name like concat('%', #{userName}, '%'))) or
                phonenumber like concat('%', #{userName}, '%')
            </if>
            <if test="userType != null and userType != ''">
                AND user_type=#{userType}
            </if>
            <if test="ids != null">
                and department_id IN
                <foreach collection="ids" item="param"  open="(" close=")" separator=",">
                    #{param}
                </foreach>
            </if>
            <if test="userName != null and userName != ''">
                AND (user_name like concat('%', #{userName}, '%') or
                (department_id in (SELECT id FROM automessage_organization_chart
                WHERE organization_name like concat('%', #{userName}, '%'))) or
                phonenumber like concat('%', #{userName}, '%'))
            </if>
        </where>
    </select>
@@ -124,16 +142,21 @@
    <select id="selectConfigList" parameterType="string" resultMap="SysUserResult">
        <include refid="selectSysUserVo"/>
        <where>
            <if test="userName != null and userName != ''">
                AND user_name like concat('%', #{userName}, '%') or
                (department_id in (SELECT id FROM automessage_organization_chart
                WHERE organization_name like concat('%', #{userName}, '%'))) or
                phonenumber like concat('%', #{userName}, '%')
            </if>
            <if test="userType != null and userType != ''">
                AND user_type=#{userType}
            </if>
            <if test="ids != null">
                and department_id IN
                <foreach collection="ids" item="param"  open="(" close=")" separator=",">
                    #{param}
                </foreach>
            </if>
            <if test="userName != null and userName != ''">
                AND (user_name like concat('%', #{userName}, '%') or
                (department_id in (SELECT id FROM automessage_organization_chart
                WHERE organization_name like concat('%', #{userName}, '%'))) or
                phonenumber like concat('%', #{userName}, '%'))
            </if>
        </where>
        order by create_time desc
    </select>
@@ -221,6 +244,7 @@
        <if test="transactionNames != null and transactionNames != '' ">,transaction_names</if>
        <if test="openid != null and openid != '' ">,openid</if>
        <if test="isDivisionHead != null and isDivisionHead != '' ">,is_division_head</if>
        <if test="mattersIds != null and mattersIds != '' ">,matters_ids</if>
        )values(
        sysdate()
        <if test="userId != null and userId != '' ">,#{userId}</if>
@@ -255,6 +279,7 @@
        <if test="transactionNames != null and transactionNames != '' ">,#{transactionNames}</if>
        <if test="openid != null and openid != '' ">,#{openid}</if>
        <if test="isDivisionHead != null and isDivisionHead != '' ">,#{isDivisionHead}</if>
        <if test="mattersIds != null and mattersIds != '' ">,#{mattersIds}</if>
        )
    </insert>
@@ -293,6 +318,7 @@
            <if test="transactionNames != null and transactionNames != '' ">,transaction_names=#{transactionNames}</if>
            <if test="openid != null and openid != '' ">,openid=#{openid}</if>
            <if test="isDivisionHead != null and isDivisionHead != '' ">,is_division_head=#{isDivisionHead}</if>
            <if test="mattersIds != null and mattersIds != '' ">,matters_ids=#{mattersIds}</if>
            ,update_time=sysdate()
        </set>
        where user_id= #{userId}
flower_city/src/main/resources/mapper/TransactionEventMapper.xml
@@ -56,11 +56,11 @@
            id,
            department_id,
            concat(
                IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select city from automessage_organization_chart
                IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select city from automessage_organization_chart
                        where automessage_organization_chart.id=department_id)),''),
                IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select district from automessage_organization_chart
                IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select district from automessage_organization_chart
                        where automessage_organization_chart.id=department_id)),''),
                IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select village from automessage_organization_chart
                IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select village from automessage_organization_chart
                where automessage_organization_chart.id=department_id)),'')
            ) AS department_area,
            (select contact_number from automessage_organization_chart where automessage_organization_chart.id=department_id) as contactNumber,
@@ -120,11 +120,11 @@
            id,
            department_id,
            concat(
                    IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select city from automessage_organization_chart
                    IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select city from automessage_organization_chart
                                                                                       where automessage_organization_chart.id=department_id)),''),
                    IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select district from automessage_organization_chart
                    IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select district from automessage_organization_chart
                                                                                       where automessage_organization_chart.id=department_id)),''),
                    IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select village from automessage_organization_chart
                    IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select village from automessage_organization_chart
                                                                                       where automessage_organization_chart.id=department_id)),'')
                ) AS department_area,
            classify_id,
@@ -170,6 +170,22 @@
        </where>
        order by create_time desc
    </select>
    <!-- 根据分类筛选数据 -->
    <select id="selectClassifyList"  resultMap="TransactionEventEntityResult">
        <include refid="selectTransactionEventList"/>
        <where>
            <if test="ids != null">
                and classify_id IN
                <foreach collection="ids" item="param"  open="(" close=")" separator=",">
                    #{param}
                </foreach>
            </if>
        </where>
        order by create_time desc
    </select>
    <select id="selectListByIds"  resultMap="TransactionEventEntityResult">
        <include refid="selectTransactionEventList"/>
@@ -425,14 +441,11 @@
    </select>
    <select id="selectSearchList" resultType="com.dg.core.db.manual.pojo.Search">
        select distinct   classify_id, content, type   FROM(
           select id,classify_name title,ifnull(concat((select classify_name from automessage_classify_administration where c.parent_id=id),'/',classify_name),classify_name)  content,id classify_id,4 type  from automessage_classify_administration c UNION
           select  id,matter_name title,concat((select classify_name from  automessage_classify_administration
                                                where id=(select parent_id from  automessage_classify_administration  where id=automessage_transaction_event.classify_id)),
                                               '/',(select classify_name from  automessage_classify_administration  where id=automessage_transaction_event.classify_id)) content,classify_id,
                   2 type from automessage_transaction_event) k
        where  k.title like concat('%',#{keyWord}, '%')
        select  id, title, content,classify_id, type  from   ( select  id,matter_name title,concat((select classify_name from  automessage_classify_administration
                                                                                                    where id=(select parent_id from  automessage_classify_administration  where id=automessage_transaction_event.classify_id)),
                                                                                                   '/',(select classify_name from  automessage_classify_administration  where id=automessage_transaction_event.classify_id)) content,classify_id,
                                                                       2 type from automessage_transaction_event) k
        where  k.title like concat('%',#{keyWord}, '%') or k.content like concat('%',#{keyWord}, '%')
    </select>
    <select id="selectSearchAssociate" resultType="com.dg.core.db.manual.pojo.Search">
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActDpcApi.java
@@ -78,7 +78,7 @@
    @ApiOperation(value = "人大代表反馈随手拍")
    @PostMapping("/feedback")
    public R addFeedback(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        LoginUserInfoVO loginUserInfo = userService.getUserInfoByUserId(this.getLoginUserInfo().getUserId().toString()).getData();
        Integer isDpcMember = loginUserInfo.getIsDpcMember();
        if (isNull(isDpcMember) || !isDpcMember.equals(1)) {
            return R.fail("暂无权限");
@@ -121,3 +121,5 @@
        return r;
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java
@@ -750,6 +750,7 @@
        Long communityId = this.getCommunityId();
        comActDynVO.setCommunityId(communityId);
        Integer category = comActDynVO.getCategory();
        log.info("当前登录的社区id"+communityId);
        if (isNull(category)) {
            comActDynVO.setCategory(1);
        }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDpcDAO.java
@@ -62,4 +62,9 @@
     * @return
     */
    SysUserVO selectUser(@Param("phone") String phone);
    /**
     * 插入一条人大代表记录
     * */
    int insertComActDpc(@Param("comActDpc") ComActDpc comActDpc);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoFeedbackMapper.java
@@ -24,5 +24,6 @@
     * @param easyId
     * @return
     */
    List<ComActEasyPhotoFeedbackVO> getPhotoFeedbackListForDpc(@Param("easyId") Long easyId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDpcServiceImpl.java
@@ -6,6 +6,7 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.constants.UserConstants;
import com.panzhihua.common.model.vos.user.SysUserVO;
import com.panzhihua.common.utlis.Snowflake;
import org.springframework.beans.BeanUtils;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
@@ -21,6 +22,7 @@
import com.panzhihua.service_community.service.ComActDpcService;
import javax.annotation.Resource;
import java.util.Date;
/**
 * 人大代表(ComActDpc)表服务实现类
@@ -33,6 +35,8 @@
    @Resource
    private StringRedisTemplate stringRedisTemplate;
    @Resource
    private ComActDpcDAO comActDpcDAO;
    /**
     * 新增人大代表
@@ -52,8 +56,10 @@
            }
        }
        dpc = new ComActDpc();
        dpc.setId(Snowflake.getId());
        dpc.setCreatedAt(new Date());
        BeanUtils.copyProperties(addDpcDTO, dpc);
        int result = this.baseMapper.insert(dpc);
        int result = comActDpcDAO.insertComActDpc(dpc);
        if (result > 0) {
            refreshAssociateUserCash(addDpcDTO.getPhone());
            return R.ok();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -308,7 +308,7 @@
                    cmActEasyPhotoDO.setTransferTime(nowDate);
                } else {
                    cmActEasyPhotoDO.setIsReportUrban(ComActEasyPhotoVO.isReportUrban.no);
                    cmActEasyPhotoDO.setIsReportUrban(ComActEasyPhotoVO.isReportUrban.no );
                }
                cmActEasyPhotoDO.setExamineAt(nowDate);
                cmActEasyPhotoDO.setActivityType(comActEasyPhotoVO.getActivityType());
@@ -390,6 +390,9 @@
            default:
                break;
        }
        if (!ObjectUtils.isEmpty(comActEasyPhotoVO.getIsReportDpc())){
            cmActEasyPhotoDO.setIsReportDpc(comActEasyPhotoVO.getIsReportDpc());
        }
        if (!type.equals(3)) {
            int update = comActEasyPhotoDAO.updateById(cmActEasyPhotoDO);
            if (update > 0) {
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
@@ -373,7 +373,8 @@
                    comEvent.setSolve(0);
                    comEvent.setDistribution(0);
                    //comEvent.setChangeExpert(0);
                    comEvent.setArchive(0);
                    //comEvent.setArchive(0);
                    comEvent.setConciliation(0);
                }
                else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventSucceed().equals(2)){
                    //调解完成,可以归档,查看
@@ -617,14 +618,14 @@
            comEvent.setCurrentOrgId(community.getCommunityId().toString());
            comEvent.setCurrentProcessType(5);
        }
        if (!StringUtils.isEmpty(comEvent.getCenterId())) {
        if (!StringUtils.isEmpty(comEvent.getCenterId()))   {
            //创建时处理级别都是专家
            ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getById(comEvent.getCenterId());
            comEvent.setCurrentOrgName(center.getName());
            comEvent.setCurrentOrgId(center.getId().toString());
            comEvent.setCurrentProcessType(5);
        }
        if (nonNull(comEvent.getCenterId())){
        if (StringUtils.isNotEmpty(comEvent.getCenterId())){
            comEvent.setRequestUserCommunity(null);
        }
        comEvent.setUserEventStatus(2);
@@ -658,11 +659,12 @@
        ComSanshuoExpert expert = comSanShuoExpertService.getById(expertId);
        SysUser sysUser = sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getPhone, expert.getPhone()).eq(SysUser::getType, 1).eq(SysUser::getAppId,"wx0cef797390444b75" ));
        SanShuoMessageVO vo=new SanShuoMessageVO();
        if (nonNull(sysUser)){
            if (isNull(sysUser.getOpenid())){
                log.info("专家未登陆APP,无法推送");
                return;
            }
        if (isNull(sysUser)){
            return;
        }
        if (isNull(sysUser.getOpenid())){
           log.info("专家未登陆APP,无法推送");
           return;
        }
        vo.setTouser(sysUser.getOpenid());
        vo.setThing1(commediateTypeService.getById(comEvent.getEventCategory()).getName());
@@ -851,7 +853,7 @@
                || comEvent.getEventProcessStatus() == SanShuoEventStatusEnum.VALID.getCode().intValue()) {
            comEvent.setId(id);
            comEvent.setUserEventStatus(4);
            comEvent.setEventProcessStatus(8);
            comEvent.setEventProcessStatus(9);
            comEvent.setRevokeDes("用户手动取消");
            comEvent.setRevokeDate(new Date());
            int flag = baseMapper.updateById(comEvent);
@@ -913,6 +915,8 @@
            return contactsPhone;
        }
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
@@ -1141,11 +1145,11 @@
            case 1:
                return "行业分中心受理";
            case 3:
                return "街道调解站受理";
                return "镇/街道受理案件";
            case 2:
                return "社区调解站受理";
                return "村/社区受理案件";
            case 4:
                return "区三说会堂受理";
                return "区三说会堂中心受理";
        }
        return null;
    }
@@ -1153,13 +1157,13 @@
    public String typeToNameExpert(Integer type){
        switch (type){
            case 1:
                return "区三说会堂专家";
                return "区三说会堂中心专家";
            case 2:
                return "行业分中心专家";
            case 3:
                return "街道调解站专家";
                return "镇/街道调解专家";
            case 4:
                return "社区调解站专家";
                return "村/社区调解专家";
        }
        return null;
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/util/WXMessageUtil.java
@@ -32,6 +32,7 @@
            Map<String,Object> param=new HashMap<>();
            param.put("touser", vo.getTouser());
            param.put("template_id", TEMPLATE_ID);
            param.put("page","packageE/page/sanShuo/mediationRoom/mediationRoom");
            Map<String,Object> data=new HashMap<>();
            data.put("thing1", formData(vo.getThing1()));
            data.put("thing5", formData(vo.getThing5()));
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDpcMapper.xml
@@ -64,6 +64,92 @@
        SELECT user_id, `name`, phone
        FROM sys_user WHERE `type` = 1 AND phone = #{phone}
    </select>
    <insert id="insertComActDpc">
        insert into com_act_dpc
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="comActDpc.id != null">
                id,
            </if>
            <if test="comActDpc.name != null and comActDpc.name != ''">
                name,
            </if>
            <if test="comActDpc.phone != null and comActDpc.phone != ''">
                phone,
            </if>
            <if test="comActDpc.nation != null and comActDpc.nation != ''">
            nation,
            </if>
            <if test="comActDpc.sex != null">
                sex,
            </if>
            <if test="comActDpc.area != null and comActDpc.area != ''">
                area,
            </if>
            <if test="comActDpc.belong != null and comActDpc.belong != ''">
                belong,
            </if>
            <if test="comActDpc.category != null and comActDpc.category != ''">
                category,
            </if>
            <if test="comActDpc.position != null and comActDpc.position != ''">
                position,
            </if>
            <if test="comActDpc.photo != null and comActDpc.photo != ''">
                photo,
            </if>
            <if test="comActDpc.communityId != null">
                community_id,
            </if>
            <if test="comActDpc.createdBy != null ">
                created_by,
            </if>
            <if test="comActDpc.createdAt != null ">
                created_at,
            </if>
        </trim>
        values
        <trim prefix="("  suffix=")" suffixOverrides=",">
            <if test="comActDpc.id != null">
                #{comActDpc.id},
            </if>
            <if test="comActDpc.name != null and comActDpc.name != ''">
                #{comActDpc.name},
            </if>
            <if test="comActDpc.phone != null and comActDpc.phone != ''">
                #{comActDpc.phone},
            </if>
            <if test="comActDpc.nation != null and comActDpc.nation != ''">
              #{comActDpc.nation},
            </if>
            <if test="comActDpc.sex != null">
                #{comActDpc.sex},
            </if>
            <if test="comActDpc.area != null and comActDpc.area != ''">
                #{comActDpc.area},
            </if>
            <if test="comActDpc.belong != null and comActDpc.belong != ''">
                #{comActDpc.belong},
            </if>
            <if test="comActDpc.category != null and comActDpc.category != ''">
                #{comActDpc.category},
            </if>
            <if test="comActDpc.position != null and comActDpc.position != ''">
                #{comActDpc.position},
            </if>
            <if test="comActDpc.photo != null and comActDpc.photo != ''">
                #{comActDpc.photo},
            </if>
            <if test="comActDpc.communityId != null ">
                #{comActDpc.communityId},
            </if>
            <if test="comActDpc.createdBy != null ">
                #{comActDpc.createdBy},
            </if>
            <if test="comActDpc.createdAt != null ">
                #{comActDpc.createdAt},
            </if>
        </trim>
    </insert>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoFeedbackDOMapper.xml
@@ -35,4 +35,25 @@
        ORDER BY caepf.create_at desc
    </select>
    <select id="getPhotoFeedbackListForDpc"
            resultType="com.panzhihua.common.model.vos.community.ComActEasyPhotoFeedbackVO">
        SELECT
            caepf.id,
            caepf.easy_id,
            caepf.feedback_content,
            caepf.feedback_img,
            caepf.create_at,
            caepf.create_by,
            dpc.`name` as createByName,
            dpc.photo as createByImage
        FROM
            com_act_easy_photo_feedback AS caepf
            LEFT JOIN sys_user AS su ON su.user_id = caepf.create_by
            LEFT JOIN com_act_dpc dpc ON su.phone = dpc.phone
        WHERE
            caepf.easy_id = #{easyId} AND caepf.type = 2
        ORDER BY caepf.create_at desc
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
@@ -401,4 +401,9 @@
     * 当前账号是否为专家后台账号
     * */
    int isExpertAccount(String account);
    /**
     * 是否为党员
     * */
    int isDpcMember(@Param("phone") String phone,@Param("name")String name);
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -364,6 +364,13 @@
                set.add(sysRoleDO.getRoleKey());
            });
        }
        //是否为人大代表
        if (StringUtils.isNotEmpty(sysUserDO.getPhone()) && StringUtils.isNotEmpty(sysUserDO.getName())){
            int i = userDao.isDpcMember(sysUserDO.getPhone(), sysUserDO.getName());
            if (i>0){
                loginUserInfoVO.setIsDpcMember(1);
            }
        }
        return R.ok(loginUserInfoVO);
    }
@@ -511,6 +518,13 @@
        if (nonNull(expertVO)){
            loginUserInfoVO.setType(13);
        }
        //是否为人大代表
        if (StringUtils.isNotEmpty(phone) && StringUtils.isNotEmpty(sysUserDO.getName())){
            int i = userDao.isDpcMember(phone, sysUserDO.getName());
            if (i>0){
                loginUserInfoVO.setIsDpcMember(1);
            }
        }
        return R.ok(loginUserInfoVO);
    }
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml
@@ -824,4 +824,8 @@
    <select id="isExpertAccount" resultType="Integer">
        select count(id) from com_sanshuo_expert where account=#{account}
    </select>
    <select id="isDpcMember" resultType="Integer">
         select count(id) from com_act_dpc where name =#{name} and phone=#{phone}
    </select>
</mapper>