Merge branch 'huacheng_test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into huacheng_test
| | |
| | | */ |
| | | @ApiOperation(value = "通过协议名获取相关协议",response = Agreement.class) |
| | | @GetMapping(value = "/queryByAgreement") |
| | | @Authorization |
| | | public ResultData queryByAgreement(@RequestParam("agreement") String agreement) { |
| | | return ResultData.success(agreementService.queryByAgreement(agreement)); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取常见问题列表(不分页查找) |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取常见问题列表(不分页查找)",response = AutomessageCommonProblem.class) |
| | | @GetMapping("/queryList") |
| | | public ResultData queryList(@RequestParam(value = "title") String title){ |
| | | return ResultData.success(iAutomessageCommonProblemService.selectConfigList(title,null)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("获取分类根据id 如果是二级id则获取的是办事指南,不传参默认是0") |
| | | @GetMapping("/queryListById") |
| | | @Authorization |
| | | ResultData queryListById(@RequestParam(value = "id",required = false) Integer id){ |
| | | if(id==null) |
| | | id=0; |
| | |
| | | */ |
| | | @ApiOperation(value = "根据id查取消组织机构",response = OrganizationChartEntity.class) |
| | | @GetMapping("/selectById") |
| | | @Authorization |
| | | ResultData selectConfigById(@RequestParam("id") String id){ |
| | | return ResultData.success(iOrganizationChartService.selectConfigById(id)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("查询导办事务详情") |
| | | @GetMapping("/getData") |
| | | @Authorization |
| | | public ResultData selectConfigData(@RequestParam("Id") String Id,@CurrentUser SysUser sysUser) |
| | | { |
| | | Assert.notNull(Id, "Id 不能为空"); |
| | |
| | | */ |
| | | @ApiOperation(value = "导办事务搜索(无分页用于小程序)",response = QueryResults.class) |
| | | @GetMapping("/queryKeyWord") |
| | | @Authorization |
| | | public QueryResults queryKeyWord(@RequestParam(value = "keyWord",required = false) String keyWord) |
| | | { |
| | | QueryResults queryResults = iTransactionEventService.queryMatterNameList(keyWord); |
| | |
| | | */ |
| | | @ApiOperation(value = "智能咨询",response = RecommendResult.class) |
| | | @GetMapping("/smartConsulting") |
| | | @Authorization |
| | | public RecommendResult smartConsulting(@RequestParam("keyWord") String keyWord){ |
| | | return iTransactionEventService.smartConsulting(keyWord); |
| | | |
| | |
| | | */ |
| | | @ApiOperation(value = "通过协议名获取相关协议",response = Agreement.class) |
| | | @GetMapping(value = "/queryByAgreement") |
| | | @Authorization |
| | | public ResultData queryByAgreement(@RequestParam("agreement") String agreement) { |
| | | return ResultData.success(agreementService.queryByAgreement(agreement)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("获取分类根据id 如果是二级id则获取的是办事指南,不传参默认是0") |
| | | @GetMapping("/queryListById") |
| | | @Authorization |
| | | ResultData queryListById(@RequestParam(value = "id",required = false) Integer id){ |
| | | if(id==null) |
| | | id=0; |
| | |
| | | return toAjax(IUserService.updateConfig(config)); |
| | | } |
| | | |
| | | /** |
| | | * 根据部门id及分类id获取导办用户 |
| | | * |
| | | * @return 结果 |
| | | */ |
| | | @ApiOperation("根据部门id及分类id获取导办用户") |
| | | @GetMapping("/selectListByDepartmentId") |
| | | @Authorization |
| | | public ResultData selectListByDepartmentId(@RequestParam("departmentId") String departmentId, @RequestParam("classifyId") String classifyId){ |
| | | return ResultData.success(IUserService.selectListByDepartmentId(departmentId,classifyId)); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.dg.core.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.GuideEvolveEntity; |
| | | import com.dg.core.db.gen.entity.GuideRepairOrder; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.db.gen.entity.*; |
| | | import com.dg.core.service.IGuideEvolveService; |
| | | import com.dg.core.service.IGuideRepairOrderService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.Assert; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 工单管理 |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取工单列表(分页) |
| | | * @param matterName |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取工单列表(分页)",response = GuideRepairOrder.class) |
| | | @GetMapping("/getList") |
| | | @Authorization |
| | | public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam(value = "matterName",required = false) String matterName) |
| | | { |
| | | Assert.notNull(pageNum, "pageNum 不能为空"); |
| | | Assert.notNull(pageSize, "pageSize 不能为空"); |
| | | Page<GuideRepairOrder> pageParam = new Page<>(pageNum,pageSize); |
| | | List<GuideRepairOrder> list = iGuideRepairOrderService.selectConfigList(pageParam,pageSize,matterName); |
| | | int num=iGuideRepairOrderService.countConfigList(matterName); |
| | | return getDataTable(list,num); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @ApiOperation(value = "根据id查取消组织机构",response = OrganizationChartEntity.class) |
| | | @GetMapping("/selectById") |
| | | @Authorization |
| | | ResultData selectConfigById(@RequestParam("id") String id){ |
| | | return ResultData.success(iOrganizationChartService.selectConfigById(id)); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("查询导办事务详情") |
| | | @GetMapping("/getData") |
| | | @Authorization |
| | | public ResultData selectConfigData(@RequestParam("Id") String Id,@CurrentUser SysUser sysUser) |
| | | { |
| | | Assert.notNull(Id, "Id 不能为空"); |
| | |
| | | */ |
| | | @ApiOperation(value = "智能咨询",response = RecommendResult.class) |
| | | @GetMapping("/smartConsulting") |
| | | @Authorization |
| | | public RecommendResult smartConsulting(@RequestParam("keyWord") String keyWord){ |
| | | return iTransactionEventService.smartConsulting(keyWord); |
| | | |
| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.repository.query.Param; |
| | | import org.springframework.util.Assert; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(name = "serviceState", value = "服务状态(1.已解决 2.未解决)") |
| | | private Integer serviceState; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(name = "sumClassifyName", value = "完整分类名称") |
| | | private String sumClassifyName; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(name = "consultUser", value = "咨询人姓名+电话") |
| | | private String consultUser; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(name = "submitUser", value = "提交人姓名+电话") |
| | | private String submitUser; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(name = "guideUser", value = "导办人姓名+电话") |
| | | private String guideUser; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(name = "organizationName", value = "创建部门") |
| | | private String organizationName; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(name = "guideDepartmentName", value = "导办部门") |
| | | private String guideDepartmentName; |
| | | |
| | | @Override |
| | | public String toString() { |
| | |
| | | */ |
| | | List<AutomessageCommonProblem> selectConfigList(IPage<AutomessageCommonProblem> page, Integer state, @Param("title") String title, @Param("content") String content); |
| | | |
| | | /** |
| | | * 获取常见问题列表(不分页查找) |
| | | * @return |
| | | */ |
| | | List<AutomessageCommonProblem> selectConfigList(@Param("title") String title, @Param("content") String content); |
| | | |
| | | /** |
| | | * 获取常见问题列表统计数量 |
| | |
| | | package com.dg.core.db.gen.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.dg.core.db.gen.entity.AutomessageCommonProblem; |
| | | import com.dg.core.db.gen.entity.GuideRepairOrder; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.springframework.data.repository.query.Param; |
| | |
| | | */ |
| | | List<GuideRepairOrder> selectBySubmitId(String submitUserId); |
| | | |
| | | /** |
| | | * 获取工单列表(分页) |
| | | * @param matterName |
| | | * @return |
| | | */ |
| | | List<GuideRepairOrder> selectConfigList(IPage<GuideRepairOrder> page, Integer state,@Param("matterName") String matterName); |
| | | |
| | | /** |
| | | * 获取工单列表(求和) |
| | | * @param matterName |
| | | * @return |
| | | */ |
| | | int countConfigList(@Param("matterName") String matterName); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int selectNum(String userType); |
| | | |
| | | /** |
| | | * 根据部门id及分类id获取导办用户 |
| | | * |
| | | * @return 结果 |
| | | */ |
| | | List<SysUser> selectListByDepartmentId(@Param("departmentId") String departmentId,@Param("classifyId") String classifyId); |
| | | } |
| | |
| | | */ |
| | | List<AutomessageCommonProblem> selectConfigList(IPage<AutomessageCommonProblem> page, Integer state, String title, String content); |
| | | |
| | | /** |
| | | * 获取常见问题列表(不分页查找) |
| | | * @return |
| | | */ |
| | | List<AutomessageCommonProblem> selectConfigList(String title, String content); |
| | | |
| | | |
| | | /** |
| | | * 获取常见问题列表统计数量 |
| | |
| | | package com.dg.core.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.dg.core.db.gen.entity.AutomessageCommonProblem; |
| | | import com.dg.core.db.gen.entity.GuideRepairOrder; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | |
| | | */ |
| | | List<GuideRepairOrder> selectBySubmitId(String submitUserId); |
| | | |
| | | /** |
| | | * 获取工单列表(分页) |
| | | * @param matterName |
| | | * @return |
| | | */ |
| | | List<GuideRepairOrder> selectConfigList(IPage<GuideRepairOrder> page, Integer state,String matterName); |
| | | |
| | | |
| | | /** |
| | | * 获取工单列表(求和) |
| | | * @param matterName |
| | | * @return |
| | | */ |
| | | int countConfigList(@Param("matterName") String matterName); |
| | | |
| | | } |
| | |
| | | */ |
| | | ResultData loginByAccount(String phonenumber, String code); |
| | | |
| | | /** |
| | | * 根据部门id及分类id获取导办用户 |
| | | * |
| | | * @return 结果 |
| | | */ |
| | | List<SysUser> selectListByDepartmentId(String departmentId,String classifyId); |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<AutomessageCommonProblem> selectConfigList(String title, String content) { |
| | | return baseMapper.selectConfigList(title,content); |
| | | } |
| | | |
| | | @Override |
| | | public Integer countAutomessageCommonProblem( String title, String content){ |
| | | return baseMapper.countConfigList(title,content); |
| | | } |
| | |
| | | package com.dg.core.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dg.core.db.gen.entity.GuideRepairOrder; |
| | | import com.dg.core.db.gen.entity.GuideRepairOrderImage; |
| | | import com.dg.core.db.gen.entity.Slideshow; |
| | | import com.dg.core.db.gen.entity.TransactionEvent; |
| | | import com.dg.core.db.gen.entity.*; |
| | | import com.dg.core.db.gen.mapper.GuideRepairOrderImageMapper; |
| | | import com.dg.core.db.gen.mapper.GuideRepairOrderMapper; |
| | | import com.dg.core.db.gen.mapper.TransactionEventMapper; |
| | |
| | | return baseMapper.selectBySubmitId(submitUserId); |
| | | } |
| | | |
| | | @Override |
| | | public List<GuideRepairOrder> selectConfigList(IPage<GuideRepairOrder> page, Integer state, String matterName) { |
| | | return baseMapper.selectConfigList(page,state,matterName); |
| | | } |
| | | |
| | | @Override |
| | | public int countConfigList(String matterName) { |
| | | return baseMapper.countConfigList(matterName); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<SysUser> selectListByDepartmentId(String departmentId, String classifyId) { |
| | | return baseMapper.selectListByDepartmentId(departmentId,classifyId); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysUser> selectConfigList(IPage<SysUser> page, Integer state,String userType) { |
| | | return baseMapper.selectConfigList(page, state,userType); |
| | | } |
| | |
| | | order_num, |
| | | matter_id, |
| | | matter_name, |
| | | (select organization_name from automessage_organization_chart where a.department_id=id)organizationName, |
| | | concat( |
| | | (select classify_name from automessage_classify_administration where id=(select parent_id from automessage_classify_administration where id=a.classify_id)), |
| | | '-',(select classify_name from automessage_classify_administration where id=a.classify_id) |
| | | ) sumClassifyName, |
| | | department_id, |
| | | classify_id, |
| | | consult_content, |
| | | concat(consult_user_name,consult_user_phone) consultUser, |
| | | consult_user_name, |
| | | concat((select user_name from automessage_sys_user where a.submit_user_id=user_id ), submit_user_phone) submitUser, |
| | | submit_user_id, |
| | | concat((select user_name from automessage_sys_user where a.guide_user_id=user_id ), guide_user_phone) guideUser, |
| | | guide_user_id, |
| | | (select organization_name from automessage_organization_chart where a.guide_department_id=id)guideDepartmentName, |
| | | guide_department_id, |
| | | state, |
| | | consult_user_phone, |
| | |
| | | video, |
| | | images |
| | | FROM |
| | | automessage_guide_repair_order |
| | | automessage_guide_repair_order a |
| | | </sql> |
| | | |
| | | <select id="selectConfigList" resultMap="GuideRepairOrderResult"> |
| | | <include refid="selectGuideRepairOrderVo"/> |
| | | <where> |
| | | <if test="matterName != null and matterName != ''"> |
| | | AND matterName=#{matterName} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="countConfigList" resultType="integer"> |
| | | select count(id) from automessage_guide_repair_order |
| | | <where> |
| | | <if test="matterName != null and matterName != ''"> |
| | | AND matterName=#{matterName} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectConfigData" resultMap="GuideRepairOrderResult"> |
| | | <include refid="selectGuideRepairOrderVo"/> |
| | | <where> |
| | |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectListByDepartmentId" resultMap="SysUserResult"> |
| | | <include refid="selectSysUserVo"/> |
| | | where department_id=#{departmentId} and master_ids like concat('%',#{classifyId}, '%') |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertConfig" parameterType="com.dg.core.db.gen.entity.SysUser"> |
| | | insert into automessage_sys_user ( |
| | |
| | | @PostMapping("/page") |
| | | public R page(@RequestBody ComEventPageRequestVO comEventPageRequestVO) { |
| | | ComEventVO comEventVO = CopyUtil.copyProperties(comEventPageRequestVO, ComEventVO.class); |
| | | comEventPageRequestVO.setCreateBy(getUserId()); |
| | | return comEventService.page(comEventVO, comEventVO.getPageNo(), comEventVO.getPageSize()); |
| | | } |
| | | |
| | |
| | | import javax.crypto.NoSuchPaddingException; |
| | | |
| | | import com.panzhihua.auth.config.MyAESUtil; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.AES; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 登录认证 |
| | |
| | | private UserService userService; |
| | | @Resource |
| | | private RedisTemplate redisTemplate; |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | private static String LOGIN_FAIL="LOGIN_FAIL_"; |
| | | |
| | |
| | | } |
| | | // 维护最后登录时间 |
| | | userService.putUserLastLoginTime(loginUserInfoVO.getUserId()); |
| | | //是否为专家登陆 |
| | | if (nonNull(loginUserInfoVO.getPhone())){ |
| | | R r1 = communityService.isExpert(loginUserInfoVO.getPhone()); |
| | | if (r1.getCode()== Constants.SUCCESS){ |
| | | loginUserInfoVO.setType(13); |
| | | } |
| | | } |
| | | return new UsernamePasswordAuthenticationToken(loginUserInfoVO, password, grantedAuthorityList); |
| | | } |
| | | else { |
| | |
| | | } |
| | | // 维护最后登录时间 |
| | | userService.putUserLastLoginTime(loginUserInfoVO.getUserId()); |
| | | //是否为专家登陆 |
| | | if (nonNull(loginUserInfoVO.getPhone())){ |
| | | R r1 = communityService.isExpert(loginUserInfoVO.getPhone()); |
| | | if (r1.getCode()== Constants.SUCCESS){ |
| | | loginUserInfoVO.setType(13); |
| | | } |
| | | } |
| | | return new UsernamePasswordAuthenticationToken(loginUserInfoVO, password, grantedAuthorityList); |
| | | |
| | | } |
| | |
| | | /**当前机构下处理人ID*/ |
| | | @ApiModelProperty(name = "currentProcessUserId", value = "当前机构下处理人ID") |
| | | private Long currentProcessUserId; |
| | | |
| | | private Long createBy; |
| | | private Long pageNo; |
| | | private Long pageSize; |
| | | private String keyword; |
| | |
| | | |
| | | @PostMapping("/repassStreet") |
| | | R repassStreet(@RequestBody ComStreetVO comActVO); |
| | | |
| | | /** |
| | | * 是否有绑定手机号码的专家账号 |
| | | * */ |
| | | @GetMapping("/sanshuo/expert/checkExpert") |
| | | R isExpert(@RequestParam(value = "number",required = false) String number); |
| | | } |
| | |
| | | @PostMapping("/addComPbCheckUser") |
| | | R addComPbCheckUser(@RequestBody ComPbCheckUserDTO comPbCheckUserDTO); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 是否为专家登陆小程序 |
| | | * */ |
| | | @GetMapping("/isSanShuoExpert") |
| | | R isExpert(@RequestParam("number") String number); |
| | | } |
| | |
| | | return commediateTypeService.addOrUpdate(comMediateTypeDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除事件 |
| | | * */ |
| | |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.service_community.entity.ComEvent; |
| | | import com.panzhihua.service_community.entity.ComSanshuoExpert; |
| | | import com.panzhihua.service_community.service.ComSanShuoExpertService; |
| | | import com.panzhihua.service_community.service.IComEventService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.xml.crypto.Data; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * 三说会堂调解专家控制器 |
| | |
| | | private ComSanShuoExpertService comSanShuoExpertService; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private IComEventService comEventService; |
| | | |
| | | /** |
| | | * 添加专家 |
| | |
| | | @DeleteMapping("/remove") |
| | | public R remove(@RequestParam("id")Long id){ |
| | | //TODO 是否有为解决事件 |
| | | List<ComEvent> list = comEventService.list(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, id).in(ComEvent::getEventProcessStatus, (1), (2), (5))); |
| | | if (list.size()!=0){ |
| | | return R.fail("有未调解完成事件,无法删除!"); |
| | | } |
| | | ComSanshuoExpert expert = comSanShuoExpertService.getById(id); |
| | | expert.setStatus(0); |
| | | expert.setDelFlag(0); |
| | |
| | | public R resetPassword(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){ |
| | | ComSanshuoExpert expert = comSanShuoExpertService.getById(comSanshuoExpertDTO.getId()); |
| | | expert.setPassword(comSanshuoExpertDTO.getPassword()); |
| | | userService.sanShuoResetPassword(comSanshuoExpertDTO.getAccount(),comSanshuoExpertDTO.getPassword() ); |
| | | return R.ok(comSanShuoExpertService.updateById(expert)); |
| | | } |
| | | |
| | |
| | | public R expertShow(){ |
| | | return comSanShuoExpertService.expertShow(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @RequestParam(value = "id",required = false)Long id){ |
| | | return comSanShuoExpertService.expertShowList(level,id); |
| | | } |
| | | |
| | | /** |
| | | * 是否为专家登陆小程序 |
| | | * */ |
| | | @GetMapping("/checkExpert") |
| | | public R checkExpert(@RequestParam("number") String number){ |
| | | ComSanshuoExpert expert = comSanShuoExpertService.getOne(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getPhone, number)); |
| | | if (nonNull(expert)){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanShuoIndustryCenterDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.entity.ComEvent; |
| | | import com.panzhihua.service_community.entity.ComSanshuoIndustryCenter; |
| | | import com.panzhihua.service_community.service.ComSanShuoIndustryCenterService; |
| | | import com.panzhihua.service_community.service.IComEventService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 三说会堂业务中心管理控制器 |
| | |
| | | private ComSanShuoIndustryCenterService comSanShuoIndustryCenterService; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private IComEventService comEventService; |
| | | |
| | | @GetMapping("/list") |
| | | public R list(@RequestParam(value = "keyWord", required = false) String keyWord, |
| | |
| | | */ |
| | | @DeleteMapping("/remove") |
| | | public R remove(@RequestParam("id") Long id) { |
| | | List<ComEvent> list = comEventService.list(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, id).in(ComEvent::getEventProcessStatus, (1), (2), (5))); |
| | | if (list.size()!=0){ |
| | | return R.fail("有未调解完成事件,无法删除!"); |
| | | } |
| | | ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getById(id); |
| | | center.setDelFlag(0); |
| | | center.setStatus(0); |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoExpertDTO; |
| | | import com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO; |
| | | import com.panzhihua.common.model.vos.sanshuo.ExpertShowVO; |
| | | import com.panzhihua.service_community.entity.ComSanshuoExpert; |
| | |
| | | * 小程序获取专家列表 |
| | | * */ |
| | | List<ComSanshuoExpert> selectExpertList(); |
| | | |
| | | /** |
| | | * 是否重名,重复手机号,重复账号 |
| | | * */ |
| | | List<ComSanshuoExpert> selectExpertByNameOrPhoneOrAccount(@Param("dto") ComSanshuoExpertDTO comSanshuoExpertDTO); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | private String unit; |
| | | |
| | | private String unitId; |
| | | |
| | | @TableField(exist = false) |
| | | private Integer count; |
| | | @TableField(exist = false) |
| | |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import cn.hutool.crypto.digest.MD5; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | * */ |
| | | @Override |
| | | public R addExpert(ComSanshuoExpertDTO comSanshuoExpertDTO) { |
| | | //是否重名 |
| | | List<ComSanshuoExpert> checkExpert=comSanshuoExpertDao.selectExpertByNameOrPhoneOrAccount(comSanshuoExpertDTO); |
| | | if (checkExpert.size() != 0){ |
| | | return R.fail("账号信息有重复"); |
| | | } |
| | | ComSanshuoExpert expert=new ComSanshuoExpert(); |
| | | BeanUtil.copyProperties(comSanshuoExpertDTO,expert); |
| | | //处理id |
| | | if (nonNull(comSanshuoExpertDTO.getUnit())){ |
| | | String id = comSanshuoExpertDTO.getUnit(); |
| | | String[] split = id.split(","); |
| | | comSanshuoExpertDTO.setUnitId(split[split.length-1]); |
| | | expert.setUnitId(split[split.length-1]); |
| | | } |
| | | expert.setId(Snowflake.getId()); |
| | | expert.setCreateTime(new Date()); |
| | | if (expert.getLevel()==2){ |
| | | expert.setIndustryCenterId(Long.parseLong(comSanshuoExpertDTO.getUnitId())); |
| | | expert.setUnit(comSanshuoIndustryCenterDao.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | }else if(expert.getLevel()==3){ |
| | | expert.setStreetId(Long.parseLong(comSanshuoExpertDTO.getUnitId())); |
| | | expert.setUnit(comStreetDAO.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | }else if(expert.getLevel()==4){ |
| | | expert.setCommunityId(Long.parseLong(comSanshuoExpertDTO.getUnitId())); |
| | | expert.setUnit(comActDAO.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | } |
| | | expert.setStatus(1); |
| | | expert.setDelFlag(1); |
| | | int insert = comSanshuoExpertDao.insert(expert); |
| | | if (insert>0){ |
| | | try { |
| | | comSanshuoExpertDTO.setPassword(MyAESUtil.Encrypt(comSanshuoExpertDTO.getPassword(),"Ryo7M3n8loC5Abcd")); |
| | | comSanshuoExpertDTO.setPassword(comSanshuoExpertDTO.getPassword()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | vo.setLevel(i); |
| | | if (i==2){ |
| | | //设置行业分中心为childList |
| | | vo.setId(2L); |
| | | vo.setChildList(comSanshuoIndustryCenterDao.indstryList()); |
| | | vo.setName("行业分中心"); |
| | | }else if (i==3){ |
| | | vo.setId(3L); |
| | | vo.setChildList(comSanshuoIndustryCenterDao.streetList()); |
| | | vo.setName("街道调解站"); |
| | | }else if (i==4){ |
| | | vo.setId(4L); |
| | | vo.setChildList(comSanshuoIndustryCenterDao.communityList()); |
| | | vo.setName("社区调解站"); |
| | | }else if(i==1){ |
| | | vo.setName("三说话会堂"); |
| | | vo.setId(1L); |
| | | vo.setName("三说会堂"); |
| | | } |
| | | list.add(vo); |
| | | } |
| | |
| | | user.setName(comSanShuoIndustryCenterDTO.getName()); |
| | | user.setType(12); |
| | | try { |
| | | user.setPassword(MyAESUtil.Encrypt(comSanShuoIndustryCenterDTO.getPassword(),"Ryo7M3n8loC5Abcd")); |
| | | user.setPassword(comSanShuoIndustryCenterDTO.getPassword()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | @Override |
| | | public R resetPassword(ComSanshuoIndustryCenter center) { |
| | | try { |
| | | String pass=MyAESUtil.Encrypt(center.getPassword(), "Ryo7M3n8loC5Abcd"); |
| | | return userService.sanShuoResetPassword(center.getAccount(), pass); |
| | | return userService.sanShuoResetPassword(center.getAccount(), center.getPassword()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | <where> |
| | | event_process_status !=9 |
| | | <if test="comEvent.keyword != null and comEvent.keyword!=''" > |
| | | and ( order_sn = #{comEvent.keyword} or request_user_tel =#{comEvent.keyword} or current_org_name=#{comEvent.keyword}) |
| | | AND ( order_sn = #{comEvent.keyword} or request_user_tel =#{comEvent.keyword} or current_org_name=#{comEvent.keyword}) |
| | | </if> |
| | | <if test="comEvent.createBy != null and comEvent.createBy!=''" > |
| | | AND create_by = #{comEvent.createBy} |
| | | </if> |
| | | <if test="comEvent.eventCategory != null"> |
| | | AND event_category = #{comEvent.eventCategory} |
| | |
| | | select event_process_status as status ,count(1) as sum |
| | | from com_sanshuo_event_info |
| | | group by event_process_status |
| | | having event_process_status not in (9) |
| | | </select> |
| | | <select id="dateAnalysis" resultType="com.panzhihua.common.model.vos.sanshuo.IndexDateVO"> |
| | | SELECT |
| | |
| | | password,status,del_flag, |
| | | create_time,create_by,update_time, |
| | | introduction,street_id,industry_center_id, |
| | | param1,unit from com_sanshuo_expert |
| | | unit_id,unit from com_sanshuo_expert |
| | | where del_flag=1 |
| | | <if test="keyWord != null and keyWord != ''"> |
| | | AND unit like concat('%',#{keyWord},'%') |
| | |
| | | where t.level=2 and t.status=1 and t.del_flag=1 |
| | | group by t1.name |
| | | </select> |
| | | |
| | | |
| | | <select id="selectExpertStreet" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO"> |
| | | select count(t.id) as 'count',t1.name,t1.street_id as id from com_sanshuo_expert t |
| | | left join com_street t1 on t.street_id=t1.street_id |
| | |
| | | left join com_sanshuo_event_info t1 on t.id=t1.specialist_id |
| | | where t.status=1 and t.del_flag=1 |
| | | </select> |
| | | <select id="selectExpertByNameOrPhoneOrAccount" |
| | | resultType="com.panzhihua.service_community.entity.ComSanshuoExpert"> |
| | | select * from com_sanshuo_expert where name=#{dto.name} or phone=#{dto.phone} or account=#{dto.account} |
| | | and status=1 and del_flag=1 |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="pageIndustryCenter" |
| | | resultType="com.panzhihua.common.model.vos.sanshuo.ComSanShuoIndustryCenterVO"> |
| | | <include refid="Base_Column_List"/> |
| | | <where> |
| | | where del_flag=1 |
| | | <if test="keyWord != null and keyWord != ''"> |
| | | name like concat('%',#{keyWord},'%') |
| | | AND name like concat('%',#{keyWord},'%') |
| | | OR phone like concat('%',#{keyWord},'%') |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | <select id="indstryList" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertRangeVO"> |
| | |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.ComPbCheckUserDTO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | private UserService userService; |
| | | @Resource |
| | | private SysUserInputService sysUserInputService; |
| | | |
| | | |
| | | /** |
| | | * 新增微信用户 |
| | |
| | | return userService.resetPassExpertOrIndustryCenter(account,password); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/accept") |
| | | public R accept(@RequestParam("userId")Long userId){ |
| | | return userService.accept(userId); |
| | |
| | | public R addComPbCheckUser(@RequestBody ComPbCheckUserDTO comPbCheckUserDTO){ |
| | | return userService.addComPbCheckUser(comPbCheckUserDTO); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | sysUserDO.setCreateAt(new Date()); |
| | | sysUserDO.setUserId(administratorsUserVO.getUserId()); |
| | | sysUserDO.setAccount(administratorsUserVO.getAccount()); |
| | | sysUserDO.setPassword(administratorsUserVO.getPassword()); |
| | | sysUserDO.setPassword(new BCryptPasswordEncoder().encode(administratorsUserVO.getPassword())); |
| | | sysUserDO.setName(administratorsUserVO.getName()); |
| | | if (nonNull(administratorsUserVO.getImageUrl())){ |
| | | sysUserDO.setImageUrl(administratorsUserVO.getImageUrl()); |
| | |
| | | public R resetPassExpertOrIndustryCenter(String account,String password) { |
| | | SysUserDO sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().eq("account", account)); |
| | | if (nonNull(sysUserDO)){ |
| | | sysUserDO.setPassword(password); |
| | | sysUserDO.setPassword(new BCryptPasswordEncoder().encode(password)); |
| | | userDao.updateById(sysUserDO); |
| | | return R.ok(); |
| | | } |