Merge branch 'huacheng_test' into haucheng_panzhihua
| | |
| | | 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, |
| | |
| | | @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); |
| | |
| | | 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) |
| | |
| | | } |
| | | |
| | | entity.setId(null); |
| | | entity.setDepartmentId(sysUser.getDepartmentId()); |
| | | entity.setDepartmentId(entity.getDepartmentId()); |
| | | entity.setCreateUserId(sysUser.getUserId()+""); |
| | | |
| | | return toAjax(iReplyTemplateService.insertConfig(entity)); |
| | |
| | | @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)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 办事指南根据分类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)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | |
| | | 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())) |
| | | { |
| | | //提示用户名或密码错误 |
| | |
| | | @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; |
| | | |
| | | } |
| | |
| | | { |
| | | 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(); |
| | | } |
| | |
| | | List<TransactionEvent> selectListByIds(String[] list); |
| | | |
| | | /** |
| | | * 根据分类筛选数据 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<TransactionEvent> selectClassifyList(List<String> ids); |
| | | |
| | | /** |
| | | * 根据部门判断是否有事项名称重复 |
| | | */ |
| | | String selectDataIfExist(@Param("departmentId") String departmentId, |
| | |
| | | import java.lang.reflect.Method; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 自定义拦截器,判断此次请求是否有权限 |
| | |
| | | //如果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); |
| | |
| | | import org.springframework.web.method.support.ModelAndViewContainer; |
| | | import org.springframework.web.multipart.support.MissingServletRequestPartException; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 增加方法注入,将含有CurrentUser注解的方法参数注入当前登录用户 |
| | | */ |
| | |
| | | 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); |
| | |
| | | { |
| | | 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(); |
| | | } |
| | |
| | | List<String> selectclassifyId(String classifyId); |
| | | |
| | | |
| | | /** |
| | | * 根据分类筛选数据 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<TransactionEvent> selectClassifyList(List<String> ids); |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @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); |
| | | } |
| | | |
| | |
| | | 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(); |
| | |
| | | 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) |
| | | { |
| | |
| | | return baseMapper.selectclassifyId(classifyId); |
| | | } |
| | | |
| | | @Override |
| | | public List<TransactionEvent> selectClassifyList(List<String> ids) { |
| | | return baseMapper.selectClassifyList(ids); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int countNumByMatterName(String 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 in |
| | | (SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%'))) ) |
| | | (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} |
| | |
| | | <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 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 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} |
| | |
| | | <id property="updateUserId" column="update_user_id" /> |
| | | <id property="areaList" column="area_list" /> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectOrganizationChartVo"> |
| | |
| | | <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"> |
| | |
| | | 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 < (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, |
| | |
| | | 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 |
| | |
| | | <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> |
| | |
| | | #{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> |
| | | |
| | |
| | | <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> |
| | |
| | | <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 |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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} |
| | |
| | | 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, |
| | |
| | | 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, |
| | |
| | | </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"/> |
| | |
| | | </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"> |
| | |
| | | @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("暂无权限"); |
| | |
| | | * @return |
| | | */ |
| | | SysUserVO selectUser(@Param("phone") String phone); |
| | | |
| | | /** |
| | | * 插入一条人大代表记录 |
| | | * */ |
| | | int insertComActDpc(@Param("comActDpc") ComActDpc comActDpc); |
| | | } |
| | |
| | | * @param easyId |
| | | * @return |
| | | */ |
| | | |
| | | List<ComActEasyPhotoFeedbackVO> getPhotoFeedbackListForDpc(@Param("easyId") Long easyId); |
| | | } |
| | |
| | | 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; |
| | |
| | | import com.panzhihua.service_community.service.ComActDpcService; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 人大代表(ComActDpc)表服务实现类 |
| | |
| | | |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | @Resource |
| | | private ComActDpcDAO comActDpcDAO; |
| | | |
| | | /** |
| | | * 新增人大代表 |
| | |
| | | } |
| | | } |
| | | 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(); |
| | |
| | | cmActEasyPhotoDO.setTransferTime(nowDate); |
| | | |
| | | } else { |
| | | cmActEasyPhotoDO.setIsReportUrban(ComActEasyPhotoVO.isReportUrban.no); |
| | | cmActEasyPhotoDO.setIsReportUrban(ComActEasyPhotoVO.isReportUrban.no ); |
| | | } |
| | | cmActEasyPhotoDO.setExamineAt(nowDate); |
| | | cmActEasyPhotoDO.setActivityType(comActEasyPhotoVO.getActivityType()); |
| | |
| | | default: |
| | | break; |
| | | } |
| | | if (!ObjectUtils.isEmpty(comActEasyPhotoVO.getIsReportDpc())){ |
| | | cmActEasyPhotoDO.setIsReportDpc(comActEasyPhotoVO.getIsReportDpc()); |
| | | } |
| | | if (!type.equals(3)) { |
| | | int update = comActEasyPhotoDAO.updateById(cmActEasyPhotoDO); |
| | | if (update > 0) { |
| | |
| | | case 1: |
| | | return "行业分中心受理"; |
| | | case 3: |
| | | return "街道调解站受理"; |
| | | return "镇/街道受理案件"; |
| | | case 2: |
| | | return "社区调解站受理"; |
| | | return "村/社区受理案件"; |
| | | case 4: |
| | | return "区三说会堂受理"; |
| | | return "区三说会堂中心受理"; |
| | | } |
| | | return null; |
| | | } |
| | |
| | | public String typeToNameExpert(Integer type){ |
| | | switch (type){ |
| | | case 1: |
| | | return "区三说会堂专家"; |
| | | return "区三说会堂中心专家"; |
| | | case 2: |
| | | return "行业分中心专家"; |
| | | case 3: |
| | | return "街道调解站专家"; |
| | | return "镇/街道调解专家"; |
| | | case 4: |
| | | return "社区调解站专家"; |
| | | return "村/社区调解专家"; |
| | | } |
| | | return null; |
| | | } |
| | |
| | | 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> |
| | | |
| | |
| | | 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> |
| | |
| | | * 当前账号是否为专家后台账号 |
| | | * */ |
| | | int isExpertAccount(String account); |
| | | |
| | | /** |
| | | * 是否为党员 |
| | | * */ |
| | | int isDpcMember(@Param("phone") String phone,@Param("name")String name); |
| | | } |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | <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> |