Merge branch 'huacheng_test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into huacheng_test
| | |
| | | { |
| | | return ResultData.error("满意程度不能为空!"); |
| | | } |
| | | |
| | | //已办结 |
| | | entity.setState("3"); |
| | | //新增已办结记录 |
| | |
| | | guideEvolveEntity.setState("3"); |
| | | guideEvolveEntity.setFromDepartmentalId(sysUser.getDepartmentId()); |
| | | guideEvolveEntity.setFromUserId(sysUser.getUserId()+""); |
| | | iGuideEvolveService.insertConfig(guideEvolveEntity); |
| | | |
| | | return toAjax(iGuideRepairOrderService.updateConfig(entity)); |
| | | int i = iGuideRepairOrderService.updateConfig(entity); |
| | | if (i>0) |
| | | return toAjax( iGuideEvolveService.insertConfig(guideEvolveEntity)); |
| | | else |
| | | return ResultData.error(); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiOperation("查询导办事务详情") |
| | | @GetMapping("/getData") |
| | | @Authorization |
| | | public ResultData selectConfigData(@RequestParam("Id") String Id,@CurrentUser SysUser sysUser) |
| | | { |
| | | Assert.notNull(Id, "Id 不能为空"); |
| | |
| | | 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.ElseAccessoryEntity; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IElseAccessoryService; |
| | | import com.dg.core.service.IOrganizationChartService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @Autowired |
| | | IElseAccessoryService iElseAccessoryService; |
| | | |
| | | @Autowired |
| | | IOrganizationChartService iOrganizationChartService; |
| | | |
| | | /** |
| | | * 获取附件列表 |
| | |
| | | @Authorization |
| | | public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam(value = "Name",required = false) String Name) |
| | | @RequestParam(value = "Name",required = false) String Name, |
| | | @CurrentUser SysUser sysUser) |
| | | { |
| | | Page<ElseAccessoryEntity> pageParam = new Page<>(pageNum,pageSize); |
| | | List<ElseAccessoryEntity> list = iElseAccessoryService.selectConfigList(pageParam,pageSize,Name); |
| | | int num=iElseAccessoryService.countNum(Name); |
| | | List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId()); |
| | | List<ElseAccessoryEntity> list = iElseAccessoryService.selectConfigList(pageParam,pageSize,Name,ids); |
| | | int num=iElseAccessoryService.countNum(Name,ids); |
| | | return getDataTable(list,num); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation("获取附件列表接口(全部)") |
| | | @GetMapping(path = "/getAllList") |
| | | public TableDataInfo selectConfigListAll(@RequestParam(value = "Name",required = false) String Name) |
| | | @Authorization |
| | | public TableDataInfo selectConfigListAll(@RequestParam(value = "Name",required = false) String Name, |
| | | @CurrentUser SysUser sysUser) |
| | | { |
| | | List<ElseAccessoryEntity> list = iElseAccessoryService.selectConfigList(Name); |
| | | int num=iElseAccessoryService.countNum(Name); |
| | | List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId()); |
| | | List<ElseAccessoryEntity> list = iElseAccessoryService.selectConfigList(Name,ids); |
| | | int num=iElseAccessoryService.countNum(Name,ids); |
| | | return getDataTable(list,num); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 删除聊天记录 |
| | | * 删除导办用户接口 |
| | | * |
| | | * @return 结果 |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 修改空闲状态 |
| | | * 修改导办用户空闲状态接口 |
| | | * |
| | | * @param config 参数配置信息 |
| | | * @return 结果 |
| | |
| | | import com.dg.core.db.gen.entity.*; |
| | | import com.dg.core.service.IGuideEvolveService; |
| | | import com.dg.core.service.IGuideRepairOrderService; |
| | | import com.dg.core.service.IOrganizationChartService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Autowired |
| | | private IGuideEvolveService iGuideEvolveService; |
| | | |
| | | @Autowired |
| | | IOrganizationChartService iOrganizationChartService; |
| | | |
| | | /** |
| | | * 提交导办订单 |
| | |
| | | guideEvolveEntity.setFromDepartmentalId(sysUser.getDepartmentId()); |
| | | guideEvolveEntity.setFromUserId(sysUser.getUserId()+""); |
| | | guideEvolveEntity.setGuideId(entity.getId().toString()); |
| | | iGuideEvolveService.insertConfig(guideEvolveEntity); |
| | | |
| | | return toAjax(iGuideRepairOrderService.updateConfig(entity)); |
| | | int i = iGuideRepairOrderService.updateConfig(entity); |
| | | if (i>0) |
| | | return toAjax( iGuideEvolveService.insertConfig(guideEvolveEntity)); |
| | | else |
| | | return ResultData.error(); |
| | | } |
| | | |
| | | /** |
| | |
| | | @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) |
| | | @RequestParam(value = "matterName",required = false) String matterName, |
| | | @CurrentUser SysUser sysUser) |
| | | { |
| | | 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); |
| | | |
| | | List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId()); |
| | | List<GuideRepairOrder> list = iGuideRepairOrderService.selectConfigList(pageParam,pageSize,matterName,ids); |
| | | int num=iGuideRepairOrderService.countConfigList(matterName,ids); |
| | | return getDataTable(list,num); |
| | | } |
| | | |
| | |
| | | public ResultData deleteConfigById(@RequestParam(value = "Id",required = false) String Id) |
| | | { |
| | | Assert.notNull(Id, "Id 不能为空"); |
| | | List<OrganizationChartEntity> list=iOrganizationChartService.selectParentList(Id,""); |
| | | |
| | | if(list!=null && list.size()>0) |
| | | { |
| | | return ResultData.error("该机构下存在其他部门!请先删除子部门"); |
| | | } |
| | | return toAjax(iOrganizationChartService.deleteConfigById(Id)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation(value = "通过父级id查询对应机构下的全部部门",response = OrganizationChartEntity.class) |
| | | @GetMapping("/getdepartment") |
| | | public TableDataInfo getIds(@RequestParam(value = "department",required = false) String departmentId) |
| | | public TableDataInfo getOrganizations(@RequestParam(value = "department",required = false) String departmentId) |
| | | { |
| | | List<OrganizationChartEntity> ids=new ArrayList<>(); |
| | | List<OrganizationChartEntity> lists = iOrganizationChartService.selectConfigList(departmentId,""); |
| | | List<OrganizationChartEntity> lists = iOrganizationChartService.selectParentList(departmentId,""); |
| | | if(lists.size()<1) |
| | | { |
| | | lists.add(iOrganizationChartService.selectConfigById(departmentId)); |
| | | } |
| | | ids=disposestreetId(lists); |
| | | ids=disposestreet(lists); |
| | | if(ids.size()<1) |
| | | { |
| | | return null; |
| | | } |
| | | // ids.add(streetId); |
| | | ids.add(iOrganizationChartService.selectConfigById(departmentId)); |
| | | return getDataTable(ids); |
| | | } |
| | | |
| | | |
| | | //递归取id |
| | | private List<OrganizationChartEntity> disposestreetId(List<OrganizationChartEntity> lists) |
| | | private List<OrganizationChartEntity> disposestreet(List<OrganizationChartEntity> lists) |
| | | { |
| | | List<OrganizationChartEntity> ids=new ArrayList<>(); |
| | | for (OrganizationChartEntity sysStreet:lists) |
| | |
| | | ids.add(sysStreet); |
| | | if(sysStreet.getChild()!=null && sysStreet.getChild().size()>0) |
| | | { |
| | | ids.addAll(disposestreetId(sysStreet.getChild())); |
| | | ids.addAll(disposestreet(sysStreet.getChild())); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | return ids; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.db.gen.entity.ReplyTemplateEntity; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IOrganizationChartService; |
| | | import com.dg.core.service.IReplyTemplateService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @Autowired |
| | | IReplyTemplateService iReplyTemplateService; |
| | | |
| | | @Autowired |
| | | IOrganizationChartService iOrganizationChartService; |
| | | |
| | | |
| | | /** |
| | | * 获取模板列表 |
| | | * @return |
| | |
| | | @Authorization |
| | | public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam(value = "Name",required = false) String Name) |
| | | @RequestParam(value = "Name",required = false) String Name, |
| | | @CurrentUser SysUser sysUser) |
| | | { |
| | | Page<ReplyTemplateEntity> pageParam = new Page<>(pageNum,pageSize); |
| | | List<ReplyTemplateEntity> list = iReplyTemplateService.selectConfigList(pageParam,pageSize,Name); |
| | | int num=iReplyTemplateService.countNum(Name); |
| | | List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId()); |
| | | List<ReplyTemplateEntity> list = iReplyTemplateService.selectConfigList(pageParam,pageSize,Name,ids); |
| | | int num=iReplyTemplateService.countNum(Name,ids); |
| | | return getDataTable(list,num); |
| | | } |
| | | |
| | |
| | | import com.dg.core.db.manual.pojo.QueryResults; |
| | | import com.dg.core.db.manual.pojo.RecommendResult; |
| | | import com.dg.core.db.manual.pojo.Search; |
| | | import com.dg.core.service.IOrganizationChartService; |
| | | import com.dg.core.service.ITransactionEventService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @Autowired(required = true) |
| | | ITransactionEventService iTransactionEventService; |
| | | |
| | | |
| | | @Autowired(required = true) |
| | | IOrganizationChartService iOrganizationChartService; |
| | | |
| | | /** |
| | | * 查询导办事务详情 |
| | | * @param Id |
| | |
| | | */ |
| | | @ApiOperation("查询导办事务详情") |
| | | @GetMapping("/getData") |
| | | @Authorization |
| | | |
| | | public ResultData selectConfigData(@RequestParam("Id") String Id,@CurrentUser SysUser sysUser) |
| | | { |
| | | Assert.notNull(Id, "Id 不能为空"); |
| | |
| | | */ |
| | | @ApiOperation("导办事物列表") |
| | | @GetMapping("/getList") |
| | | @Authorization |
| | | public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam(value = "matterAndUser",required = false) String matterAndUser, |
| | | @RequestParam(value = "classifyGrade",required = false) String classifyGrade) |
| | | @RequestParam(value = "classifyGrade",required = false) String classifyGrade, |
| | | @CurrentUser SysUser sysUser) |
| | | { |
| | | Assert.notNull(pageNum, "pageNum 不能为空"); |
| | | Assert.notNull(pageSize, "pageSize 不能为空"); |
| | | Page<TransactionEvent> pageParam = new Page<>(pageNum,pageSize); |
| | | List<TransactionEvent> list = iTransactionEventService.selectConfigList(pageParam,pageSize,matterAndUser,classifyGrade); |
| | | int num=iTransactionEventService.countNum(matterAndUser,classifyGrade); |
| | | List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId()); |
| | | List<TransactionEvent> list = iTransactionEventService.selectConfigList(pageParam,pageSize,matterAndUser, |
| | | classifyGrade,ids); |
| | | int num=iTransactionEventService.countNum(matterAndUser,classifyGrade,ids); |
| | | return getDataTable(list,num); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation(value = "导办事务搜索",response = QueryResults.class) |
| | | @GetMapping("/queryKeyWordList") |
| | | @Authorization |
| | | public QueryResults queryMatterNameList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam(value = "recommendSize",required = false) Integer recommendSize, |
| | |
| | | |
| | | SysUser user=null; |
| | | //管理员登录 |
| | | if(StringUtils.equals("zigonggaoadmin",account)) |
| | | if(StringUtils.equals("zigonggaoadmin",account) || StringUtils.equals("ceshirenyuan",account) ) |
| | | { |
| | | user= IUserService.getUserByAccount(account); |
| | | |
| | |
| | | newSysUser.setAvatar(huaChengSysUser.getImageUrl()); |
| | | newSysUser.setCreateTime(LocalDateTime.now()); |
| | | newSysUser.setUpdateTime(LocalDateTime.now()); |
| | | newSysUser.setOpenid(huaChengSysUser.getOpenid()); |
| | | IUserService.insertConfig(newSysUser); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | String token = tokenManager.getTokenByUserId(user.getUserId()); |
| | | // String token = tokenManager.createToken(user.getUserId(), user.getRoleId()); |
| | | System.out.println("token "+token); |
| | | if (token == null) { |
| | | //生成一个token,保存用户登录状态 |
| | |
| | | return ResultData.success(map); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("发送登录短信验证码") |
| | | @PostMapping(value = "/sendSms", consumes = "application/json") |
| | | public ResultData smsSend(@RequestBody SysUser user) { |
| | | return IUserService.smsSend(user); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("账号密码验证登录") |
| | | @GetMapping(value = "/loginByAccount") |
| | | public ResultData loginByAccount(@RequestParam String phonenumber,@RequestParam String code) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * 区划代码 |
| | | */ |
| | | @ApiModelProperty("区划代码") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long code; |
| | | |
| | | /** |
| | |
| | | * 父级区划代码 |
| | | */ |
| | | @ApiModelProperty("父级区划代码") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long pcode; |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty("用户id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long userId; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty("主键id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | * 父节点id |
| | | */ |
| | | @ApiModelProperty("父节点id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long parentId; |
| | | |
| | | } |
| | |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty("用户id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long userId; |
| | | |
| | | |
| | |
| | | @ApiModelProperty("办结事项名称") |
| | | private String transactionNames; |
| | | |
| | | /** |
| | | * 微信小程序id |
| | | */ |
| | | @ApiModelProperty("微信小程序id") |
| | | private String openid; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | * @param Name |
| | | * @return |
| | | */ |
| | | public List<ElseAccessoryEntity> selectConfigList(IPage<ElseAccessoryEntity> page, Integer state, @Param("Name") String Name); |
| | | public List<ElseAccessoryEntity> selectConfigList(IPage<ElseAccessoryEntity> page, Integer state, |
| | | @Param("Name") String Name, |
| | | @Param("ids") List<String> ids); |
| | | |
| | | /** |
| | | * 获取附件列表全部 |
| | | * @param Name |
| | | * @return |
| | | */ |
| | | public List<ElseAccessoryEntity> selectConfigList(@Param("Name") String Name); |
| | | public List<ElseAccessoryEntity> selectConfigList(@Param("Name") String Name, |
| | | @Param("ids") List<String> ids); |
| | | |
| | | |
| | | /** |
| | |
| | | * @param Name |
| | | * @return |
| | | */ |
| | | public int countNum(String Name); |
| | | public int countNum(@Param("Name") String Name,@Param("ids") List<String> ids); |
| | | |
| | | /** |
| | | * 按ids查找相关附件列表 |
| | |
| | | * @param matterName |
| | | * @return |
| | | */ |
| | | List<GuideRepairOrder> selectConfigList(IPage<GuideRepairOrder> page, Integer state,@Param("matterName") String matterName); |
| | | List<GuideRepairOrder> selectConfigList(IPage<GuideRepairOrder> page, Integer state,@Param("matterName") String matterName, |
| | | @Param("ids") List<String> ids); |
| | | |
| | | /** |
| | | * 获取工单列表(求和) |
| | | * @param matterName |
| | | * @return |
| | | */ |
| | | int countConfigList(@Param("matterName") String matterName); |
| | | int countConfigList(@Param("matterName") String matterName,@Param("ids") List<String> ids); |
| | | |
| | | |
| | | |
| | |
| | | * 获取模板列表 |
| | | * @return |
| | | */ |
| | | public List<ReplyTemplateEntity> selectConfigList(IPage<ReplyTemplateEntity> page, Integer state, @Param("Name") String Name); |
| | | public List<ReplyTemplateEntity> selectConfigList(IPage<ReplyTemplateEntity> page, Integer state, |
| | | @Param("Name") String Name, |
| | | @Param("ids") List<String> ids); |
| | | |
| | | |
| | | /** |
| | |
| | | * 获取数量 |
| | | * @return |
| | | */ |
| | | public int countNum(String Name); |
| | | public int countNum(@Param("Name") String Name,@Param("ids") List<String> ids); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public List<TransactionEvent> selectConfigList(IPage<TransactionEvent> page, Integer state, |
| | | @Param("matterAndUser") String matterAndUser, |
| | | @Param("classifyGrade") String classifyGrade); |
| | | @Param("classifyGrade") String classifyGrade, |
| | | @Param("ids") List<String> ids); |
| | | |
| | | /** |
| | | * 新增导办事务 |
| | |
| | | * @return |
| | | */ |
| | | public int countNum(@Param("matterAndUser") String matterAndUser, |
| | | @Param("classifyGrade") String classifyGrade); |
| | | @Param("classifyGrade") String classifyGrade, |
| | | @Param("ids") List<String> ids); |
| | | |
| | | /** |
| | | * 导办事务搜索 |
| | |
| | | |
| | | import com.dg.core.Constant; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.db.gen.entity.HuaChengSysUser; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.manager.TokenManager; |
| | | import com.dg.core.service.IHuaChengSysUserService; |
| | | import org.apache.catalina.connector.ResponseFacade; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.lang.reflect.Method; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.ZoneId; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 自定义拦截器,判断此次请求是否有权限 |
| | |
| | | |
| | | @Autowired |
| | | com.dg.core.service.ISysUserService IUserService; |
| | | |
| | | /** |
| | | * 花城e+用户接口 |
| | | */ |
| | | @Autowired |
| | | IHuaChengSysUserService iHuaChengSysUserService; |
| | | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { |
| | |
| | | |
| | | if(StringUtils.isEmpty(token)) |
| | | { |
| | | // if(StringUtils.isEmpty(HCtoken)) |
| | | // { |
| | | // String reponse = "{\"result\": 448, \"message\": \"token not is null \"}"; |
| | | // response.setStatus(200); |
| | | // response.setCharacterEncoding(StandardCharsets.UTF_8.toString()); |
| | | // ResponseFacade facade = (ResponseFacade) response; |
| | | // facade.setContentLength(reponse.getBytes(StandardCharsets.UTF_8).length); |
| | | // facade.getWriter().write(reponse); |
| | | // return false; |
| | | // } |
| | | // else |
| | | // { |
| | | // |
| | | // } |
| | | |
| | | //花城e+ token |
| | | if (manager.checkHCToken(HCtoken)) { |
| | | //如果token验证成功,权限检查通过,将token对应的用户id存在request中,便于之后注入 |
| | | request.setAttribute(Constant.CURRENT_USER_ID, manager.getHCUserId(HCtoken)); |
| | | // SysUser ss = IUserService.selectData(manager.getHCUserId(HCtoken)+""); |
| | | System.out.println("花城用户id:"+manager.getHCUserId(HCtoken)); |
| | | SysUser ss = IUserService.selectData(manager.getHCUserId(HCtoken)+""); |
| | | if(ss==null) |
| | | { |
| | | HuaChengSysUser huaChengSysUser=iHuaChengSysUserService.selectData(manager.getHCUserId(HCtoken)+"","",""); |
| | | if(huaChengSysUser!=null) |
| | | { |
| | | //本地没有此用户 新用户 |
| | | SysUser newSysUser=new SysUser(); |
| | | //默认 1系统后台用户 |
| | | newSysUser.setUserType("1"); |
| | | newSysUser.setPhonenumber(huaChengSysUser.getPhone()); |
| | | newSysUser.setUserId(huaChengSysUser.getUserId()); |
| | | newSysUser.setUserName(huaChengSysUser.getNickName()); |
| | | newSysUser.setSex(huaChengSysUser.getSex()); |
| | | newSysUser.setAvatar(huaChengSysUser.getImageUrl()); |
| | | newSysUser.setCreateTime(LocalDateTime.now()); |
| | | newSysUser.setUpdateTime(LocalDateTime.now()); |
| | | newSysUser.setOpenid(huaChengSysUser.getOpenid()); |
| | | IUserService.insertConfig(newSysUser); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | //如果验证token失败,并且方法或类注明了Authorization,返回401错误 |
| | | if (method.getAnnotation(Authorization.class) != null || |
| | | bean.getClass().getAnnotation(Authorization.class) != null) |
| | | { |
| | | String reponse = "{\"result\": 449, \"message\": \"Overdue token\"}"; |
| | | response.setStatus(200); |
| | | response.setCharacterEncoding(StandardCharsets.UTF_8.toString()); |
| | | ResponseFacade facade = (ResponseFacade) response; |
| | | facade.setContentLength(reponse.getBytes(StandardCharsets.UTF_8).length); |
| | | facade.getWriter().write(reponse); |
| | | return false; |
| | | // if(!StringUtils.isEmpty(token)) |
| | | // { |
| | | //如果验证token失败,并且方法或类注明了Authorization,返回401错误 |
| | | if (method.getAnnotation(Authorization.class) != null || |
| | | bean.getClass().getAnnotation(Authorization.class) != null) |
| | | { |
| | | String reponse = "{\"result\": 449, \"message\": \"Overdue token\"}"; |
| | | response.setStatus(200); |
| | | response.setCharacterEncoding(StandardCharsets.UTF_8.toString()); |
| | | ResponseFacade facade = (ResponseFacade) response; |
| | | facade.setContentLength(reponse.getBytes(StandardCharsets.UTF_8).length); |
| | | facade.getWriter().write(reponse); |
| | | return false; |
| | | // } |
| | | } |
| | | return true; |
| | | } |
| | |
| | | |
| | | import com.dg.core.Constant; |
| | | import io.jsonwebtoken.Claims; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | |
| | | } |
| | | |
| | | public boolean checkToken(String token) { |
| | | if (token == null) { |
| | | if (StringUtils.isEmpty(token)) { |
| | | return false; |
| | | } |
| | | String userId = redis.boundValueOps(token).get(); |
| | |
| | | */ |
| | | @Override |
| | | public boolean checkHCToken(String token) { |
| | | if (token == null) { |
| | | if (StringUtils.isEmpty(token)) { |
| | | return false; |
| | | } |
| | | // token解析 |
| | |
| | | //从数据库中查询并返回 |
| | | return userService.selectData(currentUserId+""); |
| | | } |
| | | throw new MissingServletRequestPartException(Constant.CURRENT_USER_ID); |
| | | return null; |
| | | // throw new MissingServletRequestPartException(Constant.CURRENT_USER_ID); |
| | | } |
| | | } |
| | |
| | | * @param Name |
| | | * @return |
| | | */ |
| | | public List<ElseAccessoryEntity> selectConfigList(IPage<ElseAccessoryEntity> page, Integer state, @Param("Name") String Name); |
| | | public List<ElseAccessoryEntity> selectConfigList(IPage<ElseAccessoryEntity> page, Integer state, |
| | | String Name,List<String> ids); |
| | | |
| | | /** |
| | | * 获取附件列表全部 |
| | | * @param Name |
| | | * @return |
| | | */ |
| | | public List<ElseAccessoryEntity> selectConfigList(String Name); |
| | | public List<ElseAccessoryEntity> selectConfigList(String Name,List<String> ids); |
| | | |
| | | |
| | | /** |
| | |
| | | * @param Name |
| | | * @return |
| | | */ |
| | | public int countNum(String Name); |
| | | public int countNum(String Name,List<String> ids); |
| | | |
| | | |
| | | } |
| | |
| | | * @param matterName |
| | | * @return |
| | | */ |
| | | List<GuideRepairOrder> selectConfigList(IPage<GuideRepairOrder> page, Integer state,String matterName); |
| | | List<GuideRepairOrder> selectConfigList(IPage<GuideRepairOrder> page, Integer state,String matterName,List<String> ids); |
| | | |
| | | |
| | | /** |
| | |
| | | * @param matterName |
| | | * @return |
| | | */ |
| | | int countConfigList(@Param("matterName") String matterName); |
| | | int countConfigList(String matterName,List<String> ids); |
| | | |
| | | } |
| | |
| | | */ |
| | | int countList(String organizationName); |
| | | |
| | | /** |
| | | * 获取部门下子部门的全部id |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<String> getIds(String id); |
| | | |
| | | |
| | | /** |
| | | * 根据id 查询是否有子部门 |
| | | * @param parentId |
| | | * @param grade |
| | | * @return |
| | | */ |
| | | public List<OrganizationChartEntity> selectParentList(String parentId,String grade); |
| | | |
| | | } |
| | |
| | | * 获取模板列表 |
| | | * @return |
| | | */ |
| | | public List<ReplyTemplateEntity> selectConfigList(IPage<ReplyTemplateEntity> page, Integer state,String Name); |
| | | public List<ReplyTemplateEntity> selectConfigList(IPage<ReplyTemplateEntity> page, Integer state, |
| | | String Name,List<String> ids); |
| | | |
| | | /** |
| | | * 获取详情 |
| | |
| | | * 获取数量 |
| | | * @return |
| | | */ |
| | | public int countNum(String Name); |
| | | public int countNum(String Name,List<String> ids); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public List<TransactionEvent> selectConfigList(IPage<TransactionEvent> page, Integer state, |
| | | String matterAndUser, String classifyGrade); |
| | | String matterAndUser, String classifyGrade, |
| | | List<String> ids); |
| | | |
| | | /** |
| | | * 新增导办事务 |
| | |
| | | * 统计数量 |
| | | * @return |
| | | */ |
| | | public int countNum(String matterAndUser,String classifyGrade); |
| | | public int countNum(String matterAndUser,String classifyGrade,List<String> ids); |
| | | |
| | | /** |
| | | * 导办事务搜索 |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | |
| | | |
| | | @Override |
| | | public List<AreaCode2022> getAreaCodeByTransactionId(Integer transactionId){ |
| | | // HashMap<Object, Object> objectObjectHashMap = new HashMap<>(); |
| | | TransactionEvent transactionEvent = transactionEventMapper.selectOne(new QueryWrapper<TransactionEvent>().lambda(). |
| | | eq(TransactionEvent::getId, transactionId)); |
| | | OrganizationChartEntity organizationChartEntity = organizationChartMapper.selectOne(new QueryWrapper<OrganizationChartEntity>().lambda() |
| | |
| | | { |
| | | |
| | | @Override |
| | | public List<ElseAccessoryEntity> selectConfigList(IPage<ElseAccessoryEntity> page, Integer state, String Name) { |
| | | return baseMapper.selectConfigList(page,state,Name); |
| | | public List<ElseAccessoryEntity> selectConfigList(IPage<ElseAccessoryEntity> page, Integer state, |
| | | String Name,List<String> ids) { |
| | | return baseMapper.selectConfigList(page,state,Name, ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<ElseAccessoryEntity> selectConfigList(String Name) { |
| | | return baseMapper.selectConfigList(Name); |
| | | public List<ElseAccessoryEntity> selectConfigList(String Name,List<String> ids) { |
| | | return baseMapper.selectConfigList(Name,ids); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int countNum(String Name) { |
| | | return baseMapper.countNum(Name); |
| | | public int countNum(String Name,List<String> ids) { |
| | | return baseMapper.countNum(Name,ids); |
| | | } |
| | | } |
| | |
| | | guideRepairOrder.setMatterName(transactionEvent.getMatterName()); |
| | | guideRepairOrder.setDepartmentId(transactionEvent.getDepartmentId()); |
| | | guideRepairOrder.setClassifyId(transactionEvent.getClassifyId()); |
| | | sysUserMapper.selectListByDepartmentId(null, "," + guideRepairOrder.getMatterId(), guideRepairOrder.getMatterId() + ","); |
| | | guideRepairOrder.setState("1"); |
| | | guideRepairOrder.setCreateTime(LocalDateTime.now()); |
| | | guideRepairOrder.setUpdateTime(LocalDateTime.now()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<GuideRepairOrder> selectConfigList(IPage<GuideRepairOrder> page, Integer state, String matterName) { |
| | | return baseMapper.selectConfigList(page,state,matterName); |
| | | public List<GuideRepairOrder> selectConfigList(IPage<GuideRepairOrder> page, Integer state, String matterName,List<String> ids) { |
| | | return baseMapper.selectConfigList(page,state,matterName, ids); |
| | | } |
| | | |
| | | @Override |
| | | public int countConfigList(String matterName) { |
| | | return baseMapper.countConfigList(matterName); |
| | | public int countConfigList(String matterName,List<String> ids) { |
| | | return baseMapper.countConfigList(matterName,ids); |
| | | } |
| | | |
| | | |
| | |
| | | import com.dg.core.service.IOrganizationChartService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | |
| | | public int countList(String organizationName) { |
| | | return baseMapper.countList(organizationName); |
| | | } |
| | | |
| | | /** |
| | | * 递归获取id 内部使用 |
| | | * @param departmentId |
| | | * @return |
| | | */ |
| | | |
| | | @Override |
| | | public List<String> getIds(String id) |
| | | { |
| | | List<String> ids=new ArrayList<>(); |
| | | List<OrganizationChartEntity> lists = baseMapper.selectConfigList(id,""); |
| | | if(lists.size()<1) |
| | | { |
| | | lists.add(baseMapper.selectConfigById(id)); |
| | | } |
| | | ids=disposestreetId(lists); |
| | | if(ids.size()<1) |
| | | { |
| | | return null; |
| | | } |
| | | ids.add(id); |
| | | return ids; |
| | | } |
| | | |
| | | @Override |
| | | public List<OrganizationChartEntity> selectParentList(String parentId, String grade) { |
| | | return baseMapper.selectConfigList(parentId,grade); |
| | | } |
| | | |
| | | //递归取id |
| | | private List<String> disposestreetId(List<OrganizationChartEntity> lists) |
| | | { |
| | | List<String> ids=new ArrayList<>(); |
| | | if(lists==null || lists.size()<1) |
| | | { |
| | | return ids; |
| | | } |
| | | |
| | | for (OrganizationChartEntity sysStreet:lists) |
| | | { |
| | | ids.add(sysStreet.getId()+""); |
| | | if(sysStreet.getChild()!=null && sysStreet.getChild().size()>0) |
| | | { |
| | | ids.addAll(disposestreetId(sysStreet.getChild())); |
| | | } |
| | | else |
| | | { |
| | | ids.add(sysStreet.getId()+""); |
| | | } |
| | | } |
| | | return ids; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | { |
| | | |
| | | @Override |
| | | public List<ReplyTemplateEntity> selectConfigList(IPage<ReplyTemplateEntity> page, Integer state,String Name) { |
| | | return baseMapper.selectConfigList(page,state,Name); |
| | | public List<ReplyTemplateEntity> selectConfigList(IPage<ReplyTemplateEntity> page, |
| | | Integer state,String Name,List<String> ids) { |
| | | return baseMapper.selectConfigList(page,state,Name,ids); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int countNum(String Name) { |
| | | return baseMapper.countNum(Name); |
| | | public int countNum(String Name,List<String> ids) { |
| | | return baseMapper.countNum(Name,ids); |
| | | } |
| | | } |
| | |
| | | newUser.setSex("1"); |
| | | newUser.setCreateTime(LocalDateTime.now()); |
| | | newUser.setUpdateTime(LocalDateTime.now()); |
| | | baseMapper.insert(newUser); |
| | | baseMapper.insertConfig(newUser); |
| | | } |
| | | else |
| | | { |
| | |
| | | newUser.setAvatar(huaChengSysUser.getImageUrl()); |
| | | newUser.setCreateTime(LocalDateTime.now()); |
| | | newUser.setUpdateTime(LocalDateTime.now()); |
| | | baseMapper.insert(newUser); |
| | | newUser.setOpenid(huaChengSysUser.getOpenid()); |
| | | baseMapper.insertConfig(newUser); |
| | | } |
| | | } |
| | | |
| | |
| | | @Override |
| | | public TransactionEvent selectConfigData(String Id,SysUser sysUser) { |
| | | TransactionEvent transactionEvent = baseMapper.selectConfigData(Id); |
| | | LocalDateTime startTime = LocalDate.now().atTime(0, 0, 0); |
| | | LocalDateTime endTime = LocalDate.now().atTime(23, 59, 59); |
| | | AutomessageTransactionEventInterview automessageTransactionEventInterview = automessageTransactionEventInterviewMapper.selectOne(new QueryWrapper<AutomessageTransactionEventInterview>() |
| | | //如果当前没有登录用户则不增加浏览次数 |
| | | if (sysUser!=null){ |
| | | LocalDateTime startTime = LocalDate.now().atTime(0, 0, 0); |
| | | LocalDateTime endTime = LocalDate.now().atTime(23, 59, 59); |
| | | AutomessageTransactionEventInterview automessageTransactionEventInterview = automessageTransactionEventInterviewMapper.selectOne(new QueryWrapper<AutomessageTransactionEventInterview>() |
| | | .lambda().eq(AutomessageTransactionEventInterview::getTransactionEventId, Id) |
| | | .eq(AutomessageTransactionEventInterview::getUserId, sysUser.getUserId()) |
| | | .orderByDesc(AutomessageTransactionEventInterview::getInterviewTime) |
| | | .last("limit 1")); |
| | | transactionEvent.setQueryTime(LocalDateTime.now()); |
| | | //判断上次访问时间是不是今天 如果 |
| | | if (automessageTransactionEventInterview==null||(!(transactionEvent.getQueryTime().isAfter(startTime)&&transactionEvent.getQueryTime().isBefore(endTime)))) { |
| | | transactionEvent.setBrowseNum(transactionEvent.getBrowseNum()+1); |
| | | baseMapper.updateById(transactionEvent); |
| | | AutomessageTransactionEventInterview automessageTransactionEventInterviewNew = |
| | | transactionEvent.setQueryTime(LocalDateTime.now()); |
| | | //判断上次访问时间是不是今天 如果是今天不增加浏览次数 |
| | | if (automessageTransactionEventInterview==null||(!(transactionEvent.getQueryTime().isAfter(startTime)&&transactionEvent.getQueryTime().isBefore(endTime)))) { |
| | | transactionEvent.setBrowseNum(transactionEvent.getBrowseNum()+1); |
| | | baseMapper.updateById(transactionEvent); |
| | | AutomessageTransactionEventInterview automessageTransactionEventInterviewNew = |
| | | new AutomessageTransactionEventInterview(); |
| | | automessageTransactionEventInterviewNew.setTransactionEventId(Integer.valueOf(Id)); |
| | | automessageTransactionEventInterviewNew.setUserId(new Long(sysUser.getUserId())); |
| | | automessageTransactionEventInterviewNew.setInterviewTime(LocalDateTime.now()); |
| | | automessageTransactionEventInterviewMapper.insert(automessageTransactionEventInterviewNew); |
| | | automessageTransactionEventInterviewNew.setTransactionEventId(Integer.valueOf(Id)); |
| | | automessageTransactionEventInterviewNew.setUserId(new Long(sysUser.getUserId())); |
| | | automessageTransactionEventInterviewNew.setInterviewTime(LocalDateTime.now()); |
| | | automessageTransactionEventInterviewMapper.insert(automessageTransactionEventInterviewNew); |
| | | } |
| | | } |
| | | return transactionEvent; |
| | | } |
| | | |
| | | @Override |
| | | public List<TransactionEvent> selectConfigList(IPage<TransactionEvent> page, Integer state, |
| | | String matterAndUser, String classifyGrade) { |
| | | return baseMapper.selectConfigList(page, state, matterAndUser, classifyGrade); |
| | | String matterAndUser, String classifyGrade,List<String> ids) { |
| | | return baseMapper.selectConfigList(page, state, matterAndUser, classifyGrade,ids); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int countNum(String matterAndUser,String classifyGrade) { |
| | | return baseMapper.countNum( matterAndUser, classifyGrade); |
| | | public int countNum(String matterAndUser,String classifyGrade,List<String> ids) { |
| | | return baseMapper.countNum( matterAndUser, classifyGrade, ids); |
| | | } |
| | | |
| | | @Override |
| | |
| | | spring.datasource.url=jdbc:mysql://182.151.2.19:3306/huacheng_smart_life?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 |
| | | |
| | | |
| | | #datasource: |
| | | #type: com.alibaba.druid.pool.DruidDataSource |
| | | #driverClassName: com.mysql.cj.jdbc.Driver |
| | | #url: jdbc:mysql://182.151.2.19:3306/huacheng_smart_life?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 |
| | | #username: root |
| | | #password: nahanMysqlPwd&&RemoteRemote2019nahan |
| | | |
| | | |
| | | server.port=8187 |
| | | #server.port=8088 |
| | | |
| | |
| | | <foreach collection="list" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | order by level |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="Name != null and Name != ''"> |
| | | AND automessage_else_accessory.name like concat('%', #{Name}, '%') |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | |
| | | <if test="Name != null and Name != ''"> |
| | | AND automessage_else_accessory.name like concat('%', #{Name}, '%') |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="matterName != null and matterName != ''"> |
| | | AND matter_name like concat('%', #{matterName}, '%') |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | order by update_time desc , create_time desc |
| | | </select> |
| | |
| | | <if test="matterName != null and matterName != ''"> |
| | | AND matter_name like concat('%', #{matterName}, '%') |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <select id="selectData" parameterType="string" resultMap="SysUserResult"> |
| | | <include refid="selectSysUserVo"/> |
| | | <where> |
| | | app_id='wx118de8a734d269f0' |
| | | <if test="userId!=null and userId!=''"> |
| | | and user_id=#{userId} |
| | | </if> |
| | |
| | | update_time, |
| | | parent_id, |
| | | update_user_id, |
| | | (select user_name from automessage_sys_user where user_id=automessage_organization_chart.update_user_id)updateUserName, |
| | | (select user_name from automessage_sys_user where user_id=automessage_organization_chart.update_user_id) as updateUserName, |
| | | (select organization_name from automessage_organization_chart as oc where oc.id=automessage_organization_chart.parent_id) as parentName, |
| | | city, |
| | | district, |
| | |
| | | (select name from area_code_2022 where village=area_code_2022.code) as villageName, |
| | | detailed_address, |
| | | grade, |
| | | resume,contact_number,area_list |
| | | area_list |
| | | FROM |
| | | automessage_organization_chart |
| | | </sql> |
| | |
| | | or resume like concat('%', #{keyWord}, '%') or #{keyWord} like concat('%', resume, '%') |
| | | </select> |
| | | |
| | | |
| | | |
| | | <insert id="insertConfig" parameterType="com.dg.core.db.gen.entity.OrganizationChartEntity"> |
| | | insert into automessage_organization_chart ( |
| | | <if test="id != null">id,</if> |
| | |
| | | <if test="detailedAddress != null and detailedAddress != '' ">detailed_address,</if> |
| | | <if test="grade != null and grade != '' ">grade,</if> |
| | | <if test="areaList != null and areaList != '' ">area_list,</if> |
| | | <if test="contactNumber != null and contactNumber != '' ">contact_number,</if> |
| | | <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application,</if> |
| | | <if test="updateUserId != null and updateUserId != '' ">update_user_id,</if> |
| | | <if test="resume != null and resume != '' ">resume,</if> |
| | | update_time, |
| | | create_time |
| | | )values( |
| | |
| | | <if test="detailedAddress != null and detailedAddress != '' ">#{detailedAddress},</if> |
| | | <if test="grade != null and grade != '' ">#{grade},</if> |
| | | <if test="areaList != null and areaList != '' ">#{areaList},</if> |
| | | <if test="contactNumber != null and contactNumber != '' ">#{contactNumber},</if> |
| | | <if test="departmentalApplication != null and departmentalApplication != '' ">#{departmentalApplication},</if> |
| | | <if test="updateUserId != null and updateUserId != '' ">#{updateUserId},</if> |
| | | <if test="resume != null and resume != '' ">#{resume},</if> |
| | | sysdate(), |
| | | sysdate() |
| | | ) |
| | |
| | | <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application=#{departmentalApplication},</if> |
| | | <if test="updateUserId != null">update_user_id=#{updateUserId},</if> |
| | | <if test="areaList != null and areaList != '' ">area_list=#{areaList},</if> |
| | | <if test="contactNumber != null and contactNumber != '' ">contact_number=#{contactNumber},</if> |
| | | <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application=#{departmentalApplication},</if> |
| | | <if test="updateUserId != null and updateUserId != '' ">update_user_id=#{updateUserId},</if> |
| | | <if test="resume != null and resume != '' ">resume=#{resume},</if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id= #{id} |
| | |
| | | <if test="Name != null and Name != ''"> |
| | | AND name=#{Name} |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | |
| | | <if test="Name != null and Name != ''"> |
| | | AND name=#{Name} |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dg.core.db.gen.mapper.SysUserMapper"> |
| | | |
| | | <resultMap type="com.dg.core.db.gen.entity.SysUser" id="SysUserResult"> |
| | | <id property="id" column="id" /> |
| | | <id property="userId" column="user_id" /> |
| | |
| | | <result property="masterNames" column="master_names" /> |
| | | <result property="transactionIds" column="transaction_ids" /> |
| | | <result property="transactionNames" column="transaction_names" /> |
| | | <result property="openid" column="openid" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSysUserVo"> |
| | |
| | | master_names, |
| | | transaction_ids, |
| | | transaction_names, |
| | | openid, |
| | | (select organization_name from automessage_organization_chart where automessage_sys_user.department_id=automessage_organization_chart.id) as department_name |
| | | FROM |
| | | automessage_sys_user |
| | | </sql> |
| | | |
| | | |
| | | <select id="selectNum" parameterType="string" resultType="integer"> |
| | | select count(user_id) from automessage_sys_user |
| | |
| | | <include refid="selectSysUserVo"/> |
| | | <where> |
| | | <if test="list!=null"> |
| | | department_id in |
| | | <foreach collection="list" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | department_id in |
| | | <foreach collection="list" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | and (master_ids like concat('%',#{classifyIdFront}, '%') or master_ids like concat('%',#{classifyIdAfter}, '%')) |
| | | </where> |
| | |
| | | <if test="masterNames != null and masterNames != '' ">,master_names</if> |
| | | <if test="transactionIds != null and transactionIds != '' ">,transaction_ids</if> |
| | | <if test="transactionNames != null and transactionNames != '' ">,transaction_names</if> |
| | | <if test="openid != null and openid != '' ">,openid</if> |
| | | )values( |
| | | sysdate() |
| | | <if test="userId != null and userId != '' ">,#{userId}</if> |
| | |
| | | <if test="masterNames != null and masterNames != '' ">,#{masterNames}</if> |
| | | <if test="transactionIds != null and transactionIds != '' ">,#{transactionIds}</if> |
| | | <if test="transactionNames != null and transactionNames != '' ">,#{transactionNames}</if> |
| | | <if test="openid != null and openid != '' ">,#{openid}</if> |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="masterNames != null and masterNames != '' ">,master_names=#{masterNames}</if> |
| | | <if test="transactionIds != null and transactionIds != '' ">,transaction_ids=#{transactionIds}</if> |
| | | <if test="transactionNames != null and transactionNames != '' ">,transaction_names=#{transactionNames}</if> |
| | | <if test="openid != null and openid != '' ">,openid=#{openid}</if> |
| | | ,update_time=sysdate() |
| | | </set> |
| | | where user_id= #{userId} |
| | |
| | | <if test="classifyGrade != null and classifyGrade != ''"> |
| | | AND (select classify_grade from automessage_classify_administration where automessage_classify_administration.id=classify_id) = #{classifyGrade} |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | |
| | | <if test="classifyGrade != null and classifyGrade != ''"> |
| | | AND (select classify_grade from classify_administration where classify_grade.id=classify_id) = #{classifyGrade} |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.panzhihua.applets.model.dtos.IDTO; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation("详情接口") |
| | | @PostMapping("/detail") |
| | | public R selectDetail(@RequestBody IDTO idto) { |
| | | return this.propertyService.comPropertyRepairSelectOne(idto.getId()); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation("详情接口") |
| | | @GetMapping("/{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return this.propertyService.comPropertyRepairSelectOne(id); |
| | |
| | | Map map=umfPayUtil.pay(orderid, DateUtils.getCurrentDateString(),openid,amount); |
| | | return R.ok(map); |
| | | } |
| | | @ApiOperation("无水洗车下单接口") |
| | | @GetMapping("/wsPay") |
| | | public R wsPay(@RequestParam("orderid") String orderid,@RequestParam("openid")String openid,@RequestParam("amount")String amount){ |
| | | Map map=umfPayUtil.pay2(orderid, DateUtils.getCurrentDateString(),openid,amount); |
| | | return R.ok(map); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | @ApiOperation("ws洗车推送") |
| | | @PostMapping("/wsPush") |
| | | public R wsPush(@RequestBody String aesString){ |
| | | try { |
| | | Map<String, String> aesMap= (Map<String, String>) JSON.parse(aesString); |
| | | String desString=MyAESUtil.Decrypt(aesMap.get("aesString"),"Ryo7M3n8loC5Abcd"); |
| | | Map<String,String> desMap= (Map) JSON.parse(desString); |
| | | return userService.wsPush(desMap.get("washer_mobile"),desMap.get("phone"),desMap.get("washer_name"),Integer.parseInt(desMap.get("order_status"))); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return R.fail("推送失败"); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 电动车商城商品购买支付回调 |
New file |
| | |
| | | package com.panzhihua.applets.model.dtos; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class IDTO { |
| | | private Long id; |
| | | } |
| | |
| | | Map respMap = instance.miniProgramPayMap(reqMapPublic); |
| | | return respMap; |
| | | } |
| | | public Map pay2(String orderid,String merdate,String openid,String amount){ |
| | | Map reqMapPublic = preparePublic2(orderid,merdate,openid,amount,notifyUrl); |
| | | UmfService instance = new UmfServiceImpl("53461",file); |
| | | Map respMap = instance.miniProgramPayMap(reqMapPublic); |
| | | return respMap; |
| | | } |
| | | public Map repay(String orderid,String merdate,String refundNo,String refundAmount,String orgAmount){ |
| | | Map reqMapPublic=prepareRepay(orderid,merdate,refundNo,refundAmount,orgAmount); |
| | | UmfService instance = new UmfServiceImpl("53461",file); |
| | |
| | | return reqMap; |
| | | } |
| | | //小程序支付请求参数 |
| | | public static Map preparePublic2(String orderid,String merdate,String openid,String amount,String notifyUrl) { |
| | | Map reqMap = new HashMap(); |
| | | reqMap.put("mer_id","53461"); |
| | | reqMap.put("notify_url",notifyUrl); |
| | | reqMap.put("goods_inf","无水洗车服务"); |
| | | reqMap.put("order_id",orderid); |
| | | reqMap.put("mer_date",merdate); |
| | | reqMap.put("amount",amount); |
| | | reqMap.put("app_id","wx98d62711dfbd8425"); |
| | | reqMap.put("open_id",openid); |
| | | reqMap.put("scancode_type","WECHAT"); |
| | | return reqMap; |
| | | } |
| | | //小程序支付请求参数 |
| | | public static Map prepareRepay(String orderid,String merdate,String refundNo,String refundAmount,String orgAmount) { |
| | | Map reqMap = new HashMap(); |
| | | reqMap.put("mer_id","53461"); |
| | |
| | | |
| | | @ApiModelProperty("时间类型名称") |
| | | private String categoryName; |
| | | @ApiModelProperty("当前调解部门") |
| | | private String currentOrgName; |
| | | @ApiModelProperty("用户取消时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date revokeDate; |
| | | @ApiModelProperty("调解站电话") |
| | | private String contact; |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/uuPush") |
| | | R uuPush(@RequestParam("washPhone")String washPhone,@RequestParam("phone")String phone,@RequestParam("washName")String washName,@RequestParam("orderStatus")Integer orderStatus); |
| | | |
| | | /** |
| | | * 无水洗车推送 |
| | | * @param washPhone |
| | | * @param phone |
| | | * @param washName |
| | | * @param orderStatus |
| | | * @return |
| | | */ |
| | | @GetMapping("/wsPush") |
| | | R wsPush(@RequestParam("washPhone")String washPhone,@RequestParam("phone")String phone,@RequestParam("washName")String washName,@RequestParam("orderStatus")Integer orderStatus); |
| | | @GetMapping("/communityList") |
| | | R communityList(@RequestParam("name") String name, @RequestParam("id") Long id); |
| | | |
| | |
| | | } |
| | | return accessToken; |
| | | } |
| | | |
| | | public String getWsAccessToken() throws Exception { |
| | | String accessToken = "0"; |
| | | try { |
| | | log.info("获取微信token参数:appid=" + APP_ID + ",appSecret=" + APP_SECRET); |
| | | String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + APP_ID + "&secret=" + APP_SECRET; |
| | | String result = HttpClientUtil.httpGet(accessTokenUrl, null, null); |
| | | Map<String, Object> resultMap = JSON.parseObject(result, Map.class); |
| | | if (resultMap.containsKey("access_token")) { |
| | | accessToken = resultMap.get("access_token").toString(); |
| | | } |
| | | } catch (IOException ioe) { |
| | | log.error("小程序http请求异常"); |
| | | ioe.printStackTrace(); |
| | | } |
| | | return accessToken; |
| | | } |
| | | /** |
| | | * 获取西区社区通微信token |
| | | * @return 西区社区通微信token |
| | |
| | | @PostMapping("/page") |
| | | public R queryByPage(@RequestBody PageComPbCheckUnitDto comPbCheckUnit) { |
| | | //comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | comPbCheckUnit.setBelongTo(this.getLoginUserInfo().getName()); |
| | | } |
| | |
| | | public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo", required = false) String choice) { |
| | | String belongTo = ""; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | belongTo = this.getLoginUserInfo().getName(); |
| | | } |
| | |
| | | @ApiOperation(value = "报到单位统计", response = PbCheckUnitStatisticsVo.class) |
| | | @PostMapping("/statistics") |
| | | public R unitStatistics(@RequestBody PagePbCheckUnitCommonDto commonDto) { |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | commonDto.setBelongTo(this.getLoginUserInfo().getName()); |
| | | } |
| | |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId) { |
| | | String belongTo = ""; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | belongTo = this.getLoginUserInfo().getName(); |
| | | } |
| | |
| | | @ApiOperation(value = "报到党员统计-按单位归属统计", response = PbCheckUnitStatisticsVo.class) |
| | | @PostMapping("/pbStatistics/belong") |
| | | public R pbStatisticsBelong(@RequestBody PagePbCheckUnitCommonDto commonDto) { |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | commonDto.setBelongTo(this.getLoginUserInfo().getName()); |
| | | } |
| | |
| | | @ApiOperation(value = "报到党员统计-按单位统计", response = ComPbCheckUnitVo.class) |
| | | @PostMapping("/pbStatistics/unit") |
| | | public R pbStatisticsUnit(@RequestBody PagePbCheckUnitCommonDto commonDto) { |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | commonDto.setBelongTo(this.getLoginUserInfo().getName()); |
| | | } |
| | |
| | | sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is); |
| | | log.info("上传成功"); |
| | | sftp.logout(); |
| | | log.info("上传完成"); |
| | | return R.ok(url + "/idcard/" + name); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "minio上传文件测试") |
| | | @PostMapping(value = "/minio/upload/file", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | |
| | | } |
| | | return R.fail("未查询到数据"); |
| | | } |
| | | |
| | | @PostMapping("/test/noToken") |
| | | public R testInterface(@RequestBody String body){ |
| | | log.info("参数====="+body); |
| | | return R.ok(body); |
| | | } |
| | | } |
| | |
| | | @ApiOperation(value = "新增党员") |
| | | @PostMapping("addpartybuildingmember") |
| | | public R addPartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) { |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | partyBuildingMemberVO.setBelongTo(this.getLoginUserInfo().getName()); |
| | | } |
| | |
| | | @PostMapping("pagepartyorganization") |
| | | public R pagePartyOrganization(@RequestBody PagePartyOrganizationVO pagePartyOrganizationVO) { |
| | | //pagePartyOrganizationVO.setCommunityId(this.getCommunityId()); |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | pagePartyOrganizationVO.setBelongTo(this.getLoginUserInfo().getName()); |
| | | } |
| | |
| | | public R rejectRequest(@RequestParam("id") Long id) { |
| | | ComEvent comEvent = new ComEvent(); |
| | | comEvent.setId(id); |
| | | comEvent.setEventProcessStatus(SanShuoEventStatusEnum.REJECT.getCode()); |
| | | comEvent.setEventProcessStatus(SanShuoEventStatusEnum.VALID.getCode()); |
| | | return comEventService.updateComEvent(comEvent); |
| | | } |
| | | |
| | |
| | | @PostMapping |
| | | public R add(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){ |
| | | comSanshuoExpertDTO.setCreateBy(this.getLoginUserInfo().getName()); |
| | | return comSanShuoExpertService.addExpert(comSanshuoExpertDTO); |
| | | return comSanShuoExpertService.addOrUpdateExpert(comSanshuoExpertDTO); |
| | | } |
| | | |
| | | @GetMapping("/detail") |
| | |
| | | * */ |
| | | @PutMapping |
| | | public R update(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){ |
| | | ComSanshuoExpert expert=new ComSanshuoExpert(); |
| | | BeanUtil.copyProperties(comSanshuoExpertDTO,expert); |
| | | expert.setUpdateTime(new Date()); |
| | | return R.ok(comSanShuoExpertService.updateById(expert)); |
| | | return R.ok(comSanShuoExpertService.addOrUpdateExpert(comSanshuoExpertDTO)); |
| | | } |
| | | |
| | | |
| | |
| | | * */ |
| | | @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("有未调解完成事件,无法删除!"); |
| | |
| | | /**当前调解处理结果*/ |
| | | @ApiModelProperty(name = "currentEventProcessResult", value = "当前调解处理结果") |
| | | private String currentEventProcessResult; |
| | | /**调解是否成果1未成果2已成果*/ |
| | | /**调解是否成果1未成功2已成果*/ |
| | | @ApiModelProperty(name = "eventSucceed", value = "调解是否成果1未成功2已成功") |
| | | private Integer eventSucceed; |
| | | /**事件结果(1、调解失败2、调解成功)*/ |
| | |
| | | @TableField(exist = false) |
| | | private String keyword; |
| | | @TableField(exist = false) |
| | | private String userType; |
| | | private Integer userType; |
| | | @ApiModelProperty("取消时间") |
| | | private Date revokeDate; |
| | | |
| | | } |
| | |
| | | private String processResultData; |
| | | /**处理时间*/ |
| | | @ApiModelProperty(name = "processDate", value = "处理时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date processDate; |
| | | /**(1、行业分中心2、社区3、是街道4、区)下的处理人ID*/ |
| | | @ApiModelProperty(name = "processBy", value = "(1、行业分中心2、社区3、是街道4、区)下的处理人ID") |
| | |
| | | * @param comSanshuoExpertDTO |
| | | * @return 处理结果 |
| | | * */ |
| | | R addExpert(ComSanshuoExpertDTO comSanshuoExpertDTO); |
| | | R addOrUpdateExpert(ComSanshuoExpertDTO comSanshuoExpertDTO); |
| | | |
| | | /** |
| | | * 后台获取专家列表 |
| | |
| | | @Resource |
| | | private CommediateTypeService commediateTypeService; |
| | | |
| | | |
| | | @Override |
| | | public R pageByComEvent(ComEvent comEvent, Page pagination,LoginUserInfoVO loginUserInfoVO) { |
| | | if (nonNull(comEvent.getUserType())){ |
| | | if (comEvent.getUserType().equals(1)){ |
| | | comEvent.setRequestUserId(loginUserInfoVO.getUserId()); |
| | | }else if (comEvent.getUserType().equals(2)){ |
| | | comEvent.setSpecialistId(loginUserInfoVO.getUserId()); |
| | | ComSanshuoExpert expert = comSanShuoExpertService.getOne(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getPhone, loginUserInfoVO.getPhone())); |
| | | if (nonNull(expert)){ |
| | | comEvent.setSpecialistId(expert.getId()); |
| | | } |
| | | } |
| | | } |
| | | IPage<ComEvent> list = baseMapper.pageByComEvent(comEvent, pagination); |
| | |
| | | comEvent.setEventSucceed(comEventConciliationVO.getEventSucceed()); |
| | | comEvent.setEventResult(comEventConciliationVO.getEventResult()); |
| | | comEvent.setReportSuperior(comEventConciliationVO.getReportSuperior()); |
| | | if(comEventConciliationVO.getEventSucceed() ==2){ |
| | | if(comEventConciliationVO.getEventSucceed().equals(2)){ |
| | | comEvent.setEventProcessStatus(6); |
| | | } |
| | | comEvent.setCurrentEventProcessResult(comEventConciliationVO.getCurrentEventProcessResult()); |
| | |
| | | return flag > 0 ? R.ok() : R.fail(ReturnMsgConstants.UPDATE_FALSE); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R cancelRequest(Long id) { |
| | |
| | | comEvent.setUserEventStatus(4); |
| | | comEvent.setEventProcessStatus(8); |
| | | comEvent.setRevokeDes("用户手动取消"); |
| | | comEvent.setRevokeDate(new Date()); |
| | | int flag = baseMapper.updateById(comEvent); |
| | | return flag > 0 ? R.ok() : R.fail(ReturnMsgConstants.UPDATE_FALSE); |
| | | } else { |
| | |
| | | import com.panzhihua.service_community.service.ComStreetService; |
| | | import com.panzhihua.service_community.util.MyAESUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | @Service |
| | |
| | | * @return 处理结果 |
| | | * */ |
| | | @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); |
| | | if (nonNull(comSanshuoExpertDTO.getUnit())){ |
| | | String id = comSanshuoExpertDTO.getUnit(); |
| | | String[] split = id.split(","); |
| | | expert.setUnitId(split[split.length-1]); |
| | | } |
| | | expert.setId(Snowflake.getId()); |
| | | expert.setCreateTime(new Date()); |
| | | if (expert.getLevel()==2){ |
| | | expert.setIndustryCenterId(Long.parseLong(expert.getUnitId())); |
| | | expert.setUnit(comSanshuoIndustryCenterDao.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | }else if(expert.getLevel()==3){ |
| | | expert.setStreetId(Long.parseLong(expert.getUnitId())); |
| | | expert.setUnit(comStreetDAO.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | }else if(expert.getLevel()==4){ |
| | | expert.setCommunityId(Long.parseLong(expert.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(comSanshuoExpertDTO.getPassword()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addOrUpdateExpert(ComSanshuoExpertDTO comSanshuoExpertDTO) { |
| | | if (isNull(comSanshuoExpertDTO.getId())){ |
| | | //是否重名 |
| | | List<ComSanshuoExpert> checkExpert=comSanshuoExpertDao.selectExpertByNameOrPhoneOrAccount(comSanshuoExpertDTO); |
| | | if (checkExpert.size() != 0){ |
| | | return R.fail("账号信息有重复"); |
| | | } |
| | | //生成后台账号 |
| | | AdministratorsUserVO user=new AdministratorsUserVO(); |
| | | user.setUserId(Snowflake.getId()); |
| | | user.setAccount(comSanshuoExpertDTO.getAccount()); |
| | | user.setPassword(comSanshuoExpertDTO.getPassword()); |
| | | user.setName(comSanshuoExpertDTO.getName()); |
| | | user.setType(11); |
| | | user.setImageUrl(comSanshuoExpertDTO.getAvatar()); |
| | | return userService.sanShuoAddUser(user); |
| | | ComSanshuoExpert expert=new ComSanshuoExpert(); |
| | | BeanUtil.copyProperties(comSanshuoExpertDTO,expert); |
| | | if (nonNull(comSanshuoExpertDTO.getUnit())){ |
| | | String id = comSanshuoExpertDTO.getUnit(); |
| | | String[] split = id.split(","); |
| | | expert.setUnitId(split[split.length-1]); |
| | | } |
| | | expert.setId(Snowflake.getId()); |
| | | expert.setCreateTime(new Date()); |
| | | if (expert.getLevel()==2){ |
| | | expert.setIndustryCenterId(Long.parseLong(expert.getUnitId())); |
| | | expert.setUnit(comSanshuoIndustryCenterDao.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | }else if(expert.getLevel()==3){ |
| | | expert.setStreetId(Long.parseLong(expert.getUnitId())); |
| | | expert.setUnit(comStreetDAO.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | }else if(expert.getLevel()==4){ |
| | | expert.setCommunityId(Long.parseLong(expert.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(comSanshuoExpertDTO.getPassword()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | //生成后台账号 |
| | | AdministratorsUserVO user=new AdministratorsUserVO(); |
| | | user.setUserId(Snowflake.getId()); |
| | | user.setAccount(comSanshuoExpertDTO.getAccount()); |
| | | user.setPassword(comSanshuoExpertDTO.getPassword()); |
| | | user.setName(comSanshuoExpertDTO.getName()); |
| | | user.setType(11); |
| | | user.setImageUrl(comSanshuoExpertDTO.getAvatar()); |
| | | return R.ok(userService.sanShuoAddUser(user)); |
| | | } |
| | | }else { |
| | | ComSanshuoExpert expert=new ComSanshuoExpert(); |
| | | BeanUtil.copyProperties(comSanshuoExpertDTO,expert); |
| | | if (nonNull(comSanshuoExpertDTO.getUnit())){ |
| | | String id = comSanshuoExpertDTO.getUnit(); |
| | | String[] split = id.split(","); |
| | | expert.setUnitId(split[split.length-1]); |
| | | } |
| | | expert.setUpdateTime(new Date()); |
| | | if (expert.getLevel()==2){ |
| | | expert.setIndustryCenterId(Long.parseLong(expert.getUnitId())); |
| | | expert.setUnit(comSanshuoIndustryCenterDao.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | }else if(expert.getLevel()==3){ |
| | | expert.setStreetId(Long.parseLong(expert.getUnitId())); |
| | | expert.setUnit(comStreetDAO.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | }else if(expert.getLevel()==4){ |
| | | expert.setCommunityId(Long.parseLong(expert.getUnitId())); |
| | | expert.setUnit(comActDAO.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | } |
| | | return R.ok(comSanshuoExpertDao.updateById(expert)); |
| | | } |
| | | return R.fail("添加失败"); |
| | | |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 后台获取专家列表 |
| | | * @param page |
| | |
| | | left join com_sanshuo_expert t1 on t.specialist_id=t1.id |
| | | where t.event_process_status not in(7.8) |
| | | group by t1.level |
| | | having type is not null |
| | | </select> |
| | | <select id="mediateTypeRate" resultType="com.panzhihua.common.model.vos.sanshuo.EventRateVO"> |
| | | select count(t.id) as count,t1.name from com_sanshuo_event_info t |
| | |
| | | select id,name from com_sanshuo_industry_center where status=1 and del_flag=1 |
| | | </select> |
| | | <select id="streetList" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertRangeVO"> |
| | | select street_id as id,name from com_street |
| | | select street_id as id,name from com_street where app_id='wx0cef797390444b75' |
| | | </select> |
| | | <select id="communityList" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertRangeVO"> |
| | | select community_id as id,name from com_act |
| | | where app_id='wx0cef797390444b75' |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | } |
| | | ComPropertyRepairVO vo=comPropertyRepairVO; |
| | | try { |
| | | comPropertyRepairVO.setRepairName(RSAUtils.decrypt(comPropertyRepairVO.getRepairName(), Constants.PRIVATE_KEY)); |
| | | comPropertyRepairVO.setRepairPhone(RSAUtils.decrypt(comPropertyRepairVO.getRepairPhone(), Constants.PRIVATE_KEY)); |
| | | comPropertyRepair.setRepairName(RSAUtils.decrypt(comPropertyRepairVO.getRepairName(), Constants.PRIVATE_KEY)); |
| | | comPropertyRepair.setRepairPhone(RSAUtils.decrypt(comPropertyRepairVO.getRepairPhone(), Constants.PRIVATE_KEY)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | comPropertyRepairVO.setRepairName(vo.getRepairName()); |
| | | comPropertyRepairVO.setRepairPhone(vo.getRepairPhone()); |
| | | comPropertyRepair.setRepairName(comPropertyRepairVO.getRepairName()); |
| | | comPropertyRepair.setRepairPhone(comPropertyRepairVO.getRepairPhone()); |
| | | } |
| | | return R.ok(this.comPropertyRepairService.save(comPropertyRepair)); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.vos.MenuVO; |
| | |
| | | **/ |
| | | @RestController |
| | | @RequestMapping("/role/") |
| | | public class RoleApi { |
| | | public class RoleApi extends BaseController { |
| | | @Resource |
| | | private RoleService roleService; |
| | | |
| | |
| | | */ |
| | | @PostMapping("listmenubackstage") |
| | | public R listMenuBackstage(@RequestParam("communityId") Long communityId) { |
| | | return roleService.listMenuBackstage(communityId); |
| | | return roleService.listMenuBackstage(communityId,this.getAppId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | return userService.uuPush(washPhone,phone,washName,orderStatus); |
| | | } |
| | | |
| | | /** |
| | | * 无水洗车推送 |
| | | * @param washPhone |
| | | * @param phone |
| | | * @param washName |
| | | * @param orderStatus |
| | | * @return |
| | | */ |
| | | @GetMapping("/wsPush") |
| | | public R wsPush(@RequestParam(value = "washPhone",required = false)String washPhone,@RequestParam("phone")String phone,@RequestParam(value = "washName",required = false)String washName,@RequestParam("orderStatus")Integer orderStatus){ |
| | | return userService.wsPush(washPhone,phone,washName,orderStatus); |
| | | } |
| | | |
| | | @GetMapping("/indexData/getAreaAndStreet") |
| | | public R getAreaAndStreet(){ |
| | | return userService.getAreaAndStreet(); |
| | |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidCheckRecordVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidMemberVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO; |
| | | import com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | List<CommunityVO> selectCommunityByStreetName(String name); |
| | | |
| | | StreetVOS selectStreetByName(String name); |
| | | |
| | | /** |
| | | * 是否为专家 |
| | | * */ |
| | | ComSanshuoExpertVO isExpert(String phone); |
| | | } |
| | |
| | | * 社区id 0 运营平台 |
| | | * @return 菜单集合 |
| | | */ |
| | | R listMenuBackstage(Long communityId); |
| | | R listMenuBackstage(Long communityId,String appId); |
| | | |
| | | /** |
| | | * 设置角色的权限 |
| | |
| | | R uuPush(@RequestParam("washPhone")String washPhone,@RequestParam("phone")String phone,@RequestParam("washName")String washName,@RequestParam("orderStatus")Integer orderStatus); |
| | | |
| | | /** |
| | | * 无水洗车通知推送 |
| | | * @param phone |
| | | * @param orderStatus |
| | | * @return |
| | | */ |
| | | R wsPush(@RequestParam("washPhone")String washPhone,@RequestParam("phone")String phone,@RequestParam("washName")String washName,@RequestParam("orderStatus")Integer orderStatus); |
| | | |
| | | /** |
| | | * 获取城镇或村落列表 |
| | | * */ |
| | | R getCommunityList(String name,Long id); |
| | |
| | | * @return 菜单集合 |
| | | */ |
| | | @Override |
| | | public R listMenuBackstage(Long communityId) { |
| | | public R listMenuBackstage(Long communityId,String appId) { |
| | | if("wx118de8a734d269f0".equals(appId)){ |
| | | communityId=2L; |
| | | } |
| | | else { |
| | | communityId=1552661941170868228L; |
| | | } |
| | | List<SysMenuVO> sysMenuVOS = new ArrayList<>(); |
| | | List<SysMenuDO> sysMenuDOS = |
| | | sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getParentId, 0) |
| | |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidMemberVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsLoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.*; |
| | | import com.panzhihua.service_user.dao.*; |
| | | import com.panzhihua.service_user.entity.SysAppConfig; |
| | |
| | | }else if (isNull(loginUserInfoVO.getLevel())){ |
| | | loginUserInfoVO.setLevel(1); |
| | | } |
| | | //是否为三说会堂专家 |
| | | ComSanshuoExpertVO expertVO=userDao.isExpert(loginUserInfoVO.getPhone()); |
| | | if (nonNull(expertVO)){ |
| | | loginUserInfoVO.setType(13); |
| | | } |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改用户登录密码 |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R wsPush(String washPhone,String phone,String washName,Integer orderStatus) { |
| | | if(StringUtils.isNotEmpty(phone)){ |
| | | SysUserDO sysUserDO=userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone,phone).eq(SysUserDO::getAppId,"wx98d62711dfbd8425").orderByDesc(SysUserDO::getCreateAt).last("limit 1")); |
| | | if(sysUserDO!=null&&StringUtils.isNotEmpty(sysUserDO.getOpenid())){ |
| | | String status=""; |
| | | String accessToken=""; |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | accessToken = util.getWsAccessToken(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | switch (orderStatus){ |
| | | case 3 : status="已分配车美"; |
| | | WxUtil.sendUuWash3(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"sU18zbyzxFldHAdOREaQCR5uq_uMvCKTmGtklO1xw-w"); |
| | | break; |
| | | case 4 : status="车美已开始服务"; |
| | | WxUtil.sendUuWash4(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"Eft5ksvsnOQANy2uNOGY43CC3pb33eDGA_lgCEoxuiw"); |
| | | break; |
| | | case 6 : status="订单确认完成"; |
| | | WxUtil.sendUuWash6(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"k1aV97H3pDNNcNcDTeZBD9jQemNDADnRE801HhTXweI"); |
| | | break; |
| | | case 9 : status="订单已取消"; |
| | | WxUtil.sendUuWash(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"9_2FhQPDxZoUqmAuIZ1L1zjjYXokdNvu7A0gzKfvruI"); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | @Override |
| | | public R getCommunityList(String name,Long id) { |
| | | //区级账号名 |
| | |
| | | where su.account=#{name} |
| | | limit 1 |
| | | </select> |
| | | <select id="isExpert" resultType="com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO"> |
| | | select * from com_sanshuo_expert where phone=#{phone} |
| | | </select> |
| | | </mapper> |