Merge branch 'huacheng' into huacheng_test
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PagePartyOrganizationVO.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/ComPbCheckUnitFeign.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java
# springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPbCheckUnitApi.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComAreaTownCommunityApi.java
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/ComPbCheckUnitController.java
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbCheckUnitMapper.java
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/ComPbCheckUnitService.java
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbMemberMapper.xml
| | |
| | | <dependency> |
| | | <groupId>com.github.binarywang</groupId> |
| | | <artifactId>weixin-java-miniapp</artifactId> |
| | | <version>3.9.9.B</version> |
| | | <version>4.3.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.github.xiaoymin</groupId> |
| | |
| | | @ApiOperation(value = "7项常规统计",response = FiveCount.class) |
| | | @GetMapping("fiveCountPlus") |
| | | public R fiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity") String localCity){ |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date,localCity); |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date,localCity,null); |
| | | } |
| | | @ApiOperation(value = "新版查看详情",response = ComActAcidRecordVO.class) |
| | | @GetMapping("/detailByApp") |
| | |
| | | @RequestParam(value = "size",required = false) Integer size, |
| | | @RequestParam(value = "belongTo",required = false) String belongTo, |
| | | @RequestParam(value = "unitId",required = false) Long unitId){ |
| | | return communityService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo,unitId); |
| | | return communityService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo,unitId,this.getLoginUserInfo().getAccount()); |
| | | } |
| | | |
| | | |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.user.UuLoginVO; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import cn.binarywang.wx.miniapp.config.WxMaConfig; |
| | | import cn.binarywang.wx.miniapp.config.impl.WxMaRedisBetterConfigImpl; |
| | | import cn.binarywang.wx.miniapp.config.impl.WxMaRedisConfigImpl; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.user.SysAppConfigVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps; |
| | | import me.chanjar.weixin.common.redis.WxRedisOps; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaService; |
| | |
| | | private WxMaRHProperties wxMaRHProperties; |
| | | |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | public WxMaService getMaService(String appid) { |
| | | WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl(); |
| | | WxRedisOps redisOps = new RedisTemplateWxRedisOps(stringRedisTemplate); |
| | | WxMaRedisBetterConfigImpl config = new WxMaRedisBetterConfigImpl(redisOps, "access_token"); |
| | | if(StringUtils.isNotEmpty(appid)){ |
| | | R<SysAppConfigVO> r=userService.selectByAppid(appid); |
| | | if(R.isOk(r)){ |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | public class UserApi extends BaseController { |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | @ApiOperation(value = "当前登录用户信息", response = LoginUserInfoVO.class) |
| | | @GetMapping("info") |
| | |
| | | Long userId = this.getUserId(); |
| | | return userService.listmenu(userId); |
| | | } |
| | | @ApiOperation("重置密码") |
| | | @GetMapping("/unlock") |
| | | public R unlock(@RequestParam("type")Integer type,@RequestParam("isReset")Integer isReset,@RequestParam("account")String account){ |
| | | stringRedisTemplate.delete("LOGIN_FAIL_"+account+"_"+type); |
| | | if(isReset==1){ |
| | | userService.resetPasswordAccount(type,account); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | public static final String INSERT="insert"; |
| | | public static final String QUERY="query"; |
| | | public static final String DELETE="delete"; |
| | | public static final String VILLAGE="村"; |
| | | } |
| | |
| | | public Long getAreaId() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long areaId = loginUserInfo.getAreaId(); |
| | | if (null == areaId) { |
| | | throw new ServiceException("用户未绑定小区"); |
| | | } |
| | | return areaId; |
| | | } |
| | | /** |
| | |
| | | @ApiModelProperty("区级") |
| | | private String belongTo; |
| | | |
| | | @ApiModelProperty("单位性质") |
| | | private String natureName; |
| | | |
| | | } |
| | | |
| | |
| | | package com.panzhihua.common.model.dtos.community.acid; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | private String checkStatus; |
| | | @ApiModelProperty("id数组") |
| | | private String ids; |
| | | @ApiModelProperty("登录的账号名") |
| | | private String loginAccount; |
| | | private Integer type; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.user; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | @Data |
| | | @ApiModel |
| | | public class AreaVOS implements Serializable { |
| | | @ApiModelProperty("区县名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("区县code") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("下属街道列表") |
| | | private List<StreetVOS> childList; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.user; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class CommunityVO implements Serializable { |
| | | |
| | | @ApiModelProperty("社区/村落名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("社区/村落id") |
| | | private String id; |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel |
| | |
| | | |
| | | @ApiModelProperty("街道名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("下属社区列表") |
| | | private List<CommunityVO> communityList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.user; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class StreetVOS { |
| | | @ApiModelProperty("街道id") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("街道名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("下属社区列表") |
| | | private List<CommunityVO> childList; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/comActAcidRecord/fiveCountPlus") |
| | | R comActAcidRecordFiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity")String localCity); |
| | | R comActAcidRecordFiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity")String localCity,@RequestParam(value = "loginAccount",required = false)String loginAccount); |
| | | |
| | | @GetMapping("/comActAcidRecord/statics") |
| | | R comActAcidRecordStatics(@RequestParam("date")String date); |
| | |
| | | * 报到单位统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | @GetMapping("/statistics/top") |
| | | R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, @RequestParam(value = "belongTo") String belongTo); |
| | | R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "choice", required = false) String choice); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | * 报到党员统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | @GetMapping("/pbStatistics/top") |
| | | R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, @RequestParam(value = "belongTo") String belongTo); |
| | | R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId); |
| | | |
| | | /** |
| | | * 报到党员统计-按单位归属统计 |
| | |
| | | @GetMapping("resetPassword") |
| | | R resetPassword(@RequestParam("userId") Long userId); |
| | | |
| | | @GetMapping("/resetPasswordAccount") |
| | | R resetPasswordAccount(@RequestParam("type")Integer type,@RequestParam("account")String account); |
| | | |
| | | /** |
| | | * 批量重置密码用户登录密码默认admin123456 |
| | | * |
| | |
| | | */ |
| | | @GetMapping("/uuPush") |
| | | R uuPush(@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); |
| | | } |
| | |
| | | private static String APP_IMAGE_NAME = "5.jpg"; |
| | | @Resource |
| | | private RedisTemplate redisTemplate; |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | UserService userService; |
| | | |
| | | private static WxXCXTempSend wxXCXTempSend; |
| | |
| | | * @return |
| | | */ |
| | | public String getAccessToken() throws Exception { |
| | | String appid=this.getAppId(); |
| | | String accessToken = ""; |
| | | Boolean aBoolean = wxXCXTempSend.redisTemplate.hasKey(SecurityConstants.APPLETS_ACCESS_TOKEN+"_"+appid); |
| | | ValueOperations<String, String> valueOperations = wxXCXTempSend.redisTemplate.opsForValue(); |
| | | if(aBoolean){ |
| | | Long expireTime = Long.parseLong(valueOperations.get(SecurityConstants.APPLETS_ACCESS_TOKEN_TIME+"_"+appid)); |
| | | if(expireTime <= System.currentTimeMillis()){ |
| | | wxXCXTempSend.redisTemplate.delete(SecurityConstants.APPLETS_ACCESS_TOKEN+"_"+appid);//如果过期则删除 |
| | | wxXCXTempSend.redisTemplate.delete(SecurityConstants.APPLETS_ACCESS_TOKEN_TIME+"_"+appid);//如果过期则删除 |
| | | |
| | | valueOperations.set(SecurityConstants.APPLETS_ACCESS_TOKEN+"_"+appid, getAppAccessToken(appid)); |
| | | valueOperations.set(SecurityConstants.APPLETS_ACCESS_TOKEN_TIME+"_"+appid, System.currentTimeMillis() + 1100000 + ""); |
| | | }else{ |
| | | accessToken = valueOperations.get(SecurityConstants.APPLETS_ACCESS_TOKEN+"_"+appid); |
| | | } |
| | | }else{ |
| | | accessToken = getAppAccessToken(appid); |
| | | valueOperations.set(SecurityConstants.APPLETS_ACCESS_TOKEN+"_"+appid, accessToken); |
| | | valueOperations.set(SecurityConstants.APPLETS_ACCESS_TOKEN_TIME+"_"+appid, System.currentTimeMillis() + 1100000 + ""); |
| | | } |
| | | accessToken=stringRedisTemplate.boundValueOps("access_token:access_token:"+this.getAppId()).get(); |
| | | return accessToken; |
| | | } |
| | | |
| | | public String getAppAccessToken(String appid) throws Exception { |
| | | R<SysAppConfigVO> sysAppConfigVOR=userService.selectByAppid(appid); |
| | | public String getAppAccessToken() throws Exception { |
| | | String accessToken = "0"; |
| | | try { |
| | | log.info("获取微信token参数:appid=" + APP_ID + ",appSecret=" + APP_SECRET); |
| | | String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + sysAppConfigVOR.getData().getAppId() + "&secret=" + sysAppConfigVOR.getData().getSecret(); |
| | | 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")) { |
| | |
| | | public void init() { |
| | | wxXCXTempSend = this; |
| | | wxXCXTempSend.redisTemplate = this.redisTemplate; |
| | | wxXCXTempSend.stringRedisTemplate=this.stringRedisTemplate; |
| | | } |
| | | |
| | | } |
| | |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询",response = ComActAcidCheckRecordVO.class) |
| | | @OperLog(operModul = "分页查询排查数据",operType = 1) |
| | | //@OperLog(operModul = "分页查询排查数据",operType = 1) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody ComActAcidCheckRecordDTO comActAcidCheckRecordDTO) { |
| | | return this.communityService.selectAllComActAcidCheckRecord(comActAcidCheckRecordDTO); |
| | |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @OperLog(operModul = "查询单条排查数据",operType = 1) |
| | | //@OperLog(operModul = "查询单条排查数据",operType = 1) |
| | | @ApiOperation(value = "通过主键查询单条数据",response = ComActAcidCheckRecordVO.class) |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | |
| | | * @param comActAcidCheckRecordVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @OperLog(operModul = "新增排查数据",operType = 1) |
| | | //@OperLog(operModul = "新增排查数据",operType = 1) |
| | | @ApiOperation(value = "新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActAcidCheckRecordVO comActAcidCheckRecordVO) { |
| | |
| | | * @param comActAcidCheckRecordVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @OperLog(operModul = "修改排查数据",operType = 1,businessType = Constants.UPDATE) |
| | | //@OperLog(operModul = "修改排查数据",operType = 1,businessType = Constants.UPDATE) |
| | | @ApiOperation(value = "修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActAcidCheckRecordVO comActAcidCheckRecordVO) { |
| | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @OperLog(operModul = "后台查询风险人员",operType = 1) |
| | | //@OperLog(operModul = "后台查询风险人员",operType = 1) |
| | | @ApiOperation(value = "后台分页查询风险人员", response = ComActAcidDangerMemberVO.class) |
| | | @PostMapping("/queryAll") |
| | | public R pageDangerMember(@RequestBody @Valid ComActAcidDangerMemberDTO pageDangerMemberDTO) { |
| | |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @OperLog(operModul = "分页查询防疫工作人员列表",operType = 1) |
| | | //@OperLog(operModul = "分页查询防疫工作人员列表",operType = 1) |
| | | @ApiOperation(value = "分页查询列表",response = ComActAcidMemberVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody ComActAcidMemberDTO commonPage) { |
| | |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @OperLog(operModul = "查询单条防疫工作人员信息",operType = 1) |
| | | //@OperLog(operModul = "查询单条防疫工作人员信息",operType = 1) |
| | | @ApiOperation("通过主键查询单条数据") |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | |
| | | * @param comActAcidMemberVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @OperLog(operModul = "新增防疫工作人员记录",operType = 1) |
| | | //@OperLog(operModul = "新增防疫工作人员记录",operType = 1) |
| | | @ApiOperation("新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActAcidMemberVO comActAcidMemberVO) { |
| | |
| | | * @param comActAcidMemberVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @OperLog(operModul = "修改防疫工作人员信息",operType = 1,businessType = Constants.UPDATE) |
| | | //@OperLog(operModul = "修改防疫工作人员信息",operType = 1,businessType = Constants.UPDATE) |
| | | @ApiOperation("修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActAcidMemberVO comActAcidMemberVO) { |
| | |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @OperLog(operModul = "删除防疫工作人员信息",operType = 1) |
| | | //@OperLog(operModul = "删除防疫工作人员信息",operType = 1) |
| | | @ApiOperation("删除数据") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.model.dtos.community.acid.ComActAcidRecordDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.acid.ComAcidStaticVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordExcelReturn; |
| | |
| | | } |
| | | |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | comActAcidRecordDTO.setLoginAccount(loginUserInfo.getAccount()); |
| | | return this.communityService.selectAllComActAcidRecord(comActAcidRecordDTO); |
| | | } |
| | | |
| | |
| | | @GetMapping("fiveCountPlus") |
| | | public R fiveCountPlus(@RequestParam("date")String date,@RequestParam(value = "localCity",required = false)String localCity){ |
| | | if(StringUtils.isNotEmpty(localCity)){ |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date,localCity); |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date,localCity,this.getLoginUserInfo().getAccount()); |
| | | } |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date,this.getLoginUserInfo().getName()); |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date,this.getLoginUserInfo().getName(),this.getLoginUserInfo().getAccount()); |
| | | } |
| | | |
| | | |
| | |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "报到单位统计-顶部数据", response = PbCheckUnitStatisticsVo.class) |
| | | @ApiImplicitParam(name = "communityId", value = "社区id") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "communityId", value = "社区id"), |
| | | @ApiImplicitParam(name = "choice", value = "单位归属选择") |
| | | }) |
| | | @GetMapping("/statistics/top") |
| | | public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId) { |
| | | public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo", required = false) String choice) { |
| | | String belongTo = ""; |
| | | String[] area={"东区","仁和区","米易县","盐边县"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | belongTo = this.getLoginUserInfo().getName(); |
| | | } |
| | | return this.comPbCheckUnitService.unitStatisticsTop(communityId, belongTo); |
| | | return this.comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice); |
| | | } |
| | | |
| | | @ApiOperation(value = "报到单位统计", response = PbCheckUnitStatisticsVo.class) |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "报到党员统计-顶部数据", response = PbCheckUnitStatisticsVo.class) |
| | | @ApiImplicitParam(name = "communityId", value = "社区id") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "communityId", value = "社区id"), |
| | | @ApiImplicitParam(name = "choice", value = "单位归属选择"), |
| | | @ApiImplicitParam(name = "checkUnitId", value = "单位id") |
| | | }) |
| | | @GetMapping("/pbStatistics/top") |
| | | public R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId) { |
| | | public R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId) { |
| | | String belongTo = ""; |
| | | String[] area={"东区","仁和区","米易县","盐边县"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | belongTo = this.getLoginUserInfo().getName(); |
| | | } |
| | | return this.comPbCheckUnitService.pbStatisticsTop(communityId, belongTo); |
| | | return this.comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId); |
| | | } |
| | | |
| | | @ApiOperation(value = "报到党员统计-按单位归属统计", response = PbCheckUnitStatisticsVo.class) |
| | |
| | | @RequestParam(value = "communityId",required = false) Long communityId, |
| | | @RequestParam(value = "belongTo",required = false) String belongTo, |
| | | @RequestParam(value = "page",required = false) Integer page, |
| | | @RequestParam(value = "size",required = false) Integer size, @RequestParam(value = "unitId",required = false) Long unitId){ |
| | | return communityService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo,unitId); |
| | | @RequestParam(value = "size",required = false) Integer size, |
| | | @RequestParam(value = "unitId",required = false) Long unitId){ |
| | | return communityService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo,unitId,this.getLoginUserInfo().getAccount()); |
| | | } |
| | | } |
| | |
| | | return partyBuildingService.getPbOrgAllList(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 1) |
| | | //@OperLog(operModul = "党支部管理", operType = 1) |
| | | @ApiOperation(value = "新增党支部") |
| | | @PostMapping("addpartyorganization") |
| | | public R addPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | |
| | | return r; |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 2) |
| | | //@OperLog(operModul = "党支部管理", operType = 2) |
| | | @ApiOperation(value = "编辑党支部") |
| | | @PostMapping("updatepartyorganization") |
| | | public R updatePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | |
| | | return partyBuildingService.updatePartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 3) |
| | | //@OperLog(operModul = "党支部管理", operType = 3) |
| | | @ApiOperation(value = "启用、禁用党支部") |
| | | @PutMapping("resetpartyorganization") |
| | | public R resetPartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | |
| | | return partyBuildingService.resetPartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党支部管理", operType = 4) |
| | | //@OperLog(operModul = "党支部管理", operType = 4) |
| | | @ApiOperation(value = "删除党支部") |
| | | @DeleteMapping("deletepartyorganization") |
| | | public R deletePartyOrganization(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | |
| | | return partyBuildingService.deletePartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党员管理", operType = 1) |
| | | //@OperLog(operModul = "党员管理", operType = 1) |
| | | @ApiOperation(value = "新增党员") |
| | | @PostMapping("addpartybuildingmember") |
| | | public R addPartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) { |
| | |
| | | return r; |
| | | } |
| | | |
| | | @OperLog(operModul = "党员管理", operType = 2) |
| | | //@OperLog(operModul = "党员管理", operType = 2) |
| | | @ApiOperation(value = "编辑党员") |
| | | @PutMapping("updatepartybuildingmember") |
| | | public R updatePartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) { |
| | |
| | | return userService.listIdentity(communityId); |
| | | } |
| | | |
| | | @OperLog(operModul = "党委管理", operType = 1) |
| | | //@OperLog(operModul = "党委管理", operType = 1) |
| | | @ApiOperation(value = "新增党委") |
| | | @PostMapping("addpartycommittee") |
| | | public R addPartyCommittee(@RequestBody @Validated(AddGroup.class) PartyCommitteeVO partyCommitteeVO) { |
| | |
| | | return r; |
| | | } |
| | | |
| | | @OperLog(operModul = "党委管理", operType = 2) |
| | | //@OperLog(operModul = "党委管理", operType = 2) |
| | | @ApiOperation(value = "编辑党委") |
| | | @PutMapping("updatepartycommittee") |
| | | public R updatePartyCommittee(@RequestBody @Validated(AddGroup.class) PartyCommitteeVO partyCommitteeVO) { |
| | |
| | | return partyBuildingService.updatePartyCommittee(partyCommitteeVO); |
| | | } |
| | | |
| | | @OperLog(operModul = "党委管理", operType = 3) |
| | | //@OperLog(operModul = "党委管理", operType = 3) |
| | | @ApiOperation(value = "删除党委") |
| | | @DeleteMapping("deletepartycommittee") |
| | | public R deletePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) { |
| | |
| | | return partyBuildingWestService.deleteYnamic(id); |
| | | } |
| | | |
| | | @OperLog(operModul = "党员管理", operType = 3) |
| | | //@OperLog(operModul = "党员管理", operType = 3) |
| | | @ApiOperation(value = "删除党员") |
| | | @DeleteMapping("deletepartybuildingmember") |
| | | public R deleteDynUser(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) { |
| | |
| | | return partyBuildingService.checkMember(idCard); |
| | | } |
| | | |
| | | @OperLog(operModul = "党员管理", operType = 1) |
| | | //@OperLog(operModul = "党员管理", operType = 1) |
| | | @ApiOperation(value = "分页查询党员列表",response = PartyBuildingMemberVO.class) |
| | | @PostMapping("/page/member") |
| | | public R pageMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) { |
| | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.model.vos.user.IndexDataAnalysisVO; |
| | | import com.panzhihua.common.model.vos.user.StreetVO; |
| | | import com.panzhihua.common.utlis.AES; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.context.request.RequestAttributes; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | } |
| | | return r; |
| | | } |
| | | @GetMapping("/communityList") |
| | | @ApiOperation(value = "获取当前账号下的社区/村落列表",response = StreetVO.class) |
| | | public R communityList(){ |
| | | return userService.communityList(this.getLoginUserInfo().getAccount(),this.getUserId()); |
| | | } |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "新增社区后台账户") |
| | | @PostMapping("user") |
| | | @OperLog(operModul = "用户管理", operType = 1) |
| | | //@OperLog(operModul = "用户管理", operType = 1) |
| | | public R addUser(@RequestBody @Validated(AddGroup.class) AdministratorsUserVO administratorsUserVO) { |
| | | administratorsUserVO.setType(3); |
| | | administratorsUserVO.setAreaId(null); |
| | |
| | | |
| | | @ApiOperation(value = "编辑社区后台账户") |
| | | @PutMapping("user") |
| | | @OperLog(operModul = "用户管理", operType = 2) |
| | | //@OperLog(operModul = "用户管理", operType = 2) |
| | | public R putUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) { |
| | | Long userId = administratorsUserVO.getUserId(); |
| | | if (null == userId || 0 == userId) { |
| | |
| | | |
| | | @ApiOperation(value = "删除后台用户") |
| | | @DeleteMapping("user") |
| | | @OperLog(operModul = "用户管理", operType = 3) |
| | | //@OperLog(operModul = "用户管理", operType = 3) |
| | | public R deleteUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) { |
| | | Long userId = administratorsUserVO.getUserId(); |
| | | if (null == userId || 0 == userId) { |
| | |
| | | |
| | | @ApiOperation(value = "删除角色") |
| | | @DeleteMapping("role") |
| | | @OperLog(operModul = "角色管理", operType = 3) |
| | | //@OperLog(operModul = "角色管理", operType = 3) |
| | | public R deleteRoleBackstage(@RequestBody RoleVO roleVO) { |
| | | Long roleId = roleVO.getRoleId(); |
| | | if (null == roleId || 0 == roleId) { |
| | |
| | | |
| | | @ApiOperation(value = "新增角色-设置角色的权限") |
| | | @PostMapping("menu") |
| | | @OperLog(operModul = "角色管理", operType = 1) |
| | | //@OperLog(operModul = "角色管理", operType = 1) |
| | | public R addMenuRole(@RequestBody @Validated MenuRoleVO menuRoleVO) { |
| | | RoleVO roleVO = new RoleVO(); |
| | | String roleName = menuRoleVO.getRoleName(); |
| | |
| | | |
| | | @ApiOperation(value = "设置角色的权限") |
| | | @PutMapping("menu") |
| | | @OperLog(operModul = "角色管理", operType = 2) |
| | | //@OperLog(operModul = "角色管理", operType = 2) |
| | | public R putMenuRole(@RequestBody @Validated MenuRoleVO menuRoleVO) { |
| | | menuRoleVO.setCommunityId(this.getCommunityId()); |
| | | return userService.putMenuRole(menuRoleVO); |
| | |
| | | |
| | | @ApiOperation(value = "编辑用户协议") |
| | | @PutMapping("agreement") |
| | | @OperLog(operModul = "用户协议", operType = 2) |
| | | //@OperLog(operModul = "用户协议", operType = 2) |
| | | public R putAgreement(@RequestBody SysUserAgreementVO sysUserAgreementVO) { |
| | | Long id = sysUserAgreementVO.getId(); |
| | | if (null == id || id == 0) { |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("fiveCountPlus") |
| | | public R fiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity")String localCity){ |
| | | return this.comActAcidRecordService.fiveCountPlus(date,localCity); |
| | | public R fiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity")String localCity,@RequestParam(value = "loginAccount",required = false)String loginAccount){ |
| | | return this.comActAcidRecordService.fiveCountPlus(date,localCity,loginAccount); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | @GetMapping("/areaTownCommunity") |
| | | public R test(@RequestParam("name")String name,@RequestParam("userId")Long userId){ |
| | | Long[] idArray={4L,17959L,16522L,16196L,16214L,17949L,17237L}; |
| | | Long[] idArray={4L,17959L,16522L,16196L,16214L,17949L,89234L}; |
| | | if("panzhihua".equals(name)){ |
| | | List<ComAreaCounty> list=comAreaTownCommunityDao.selectArea(); |
| | | list.forEach(lis->{ |
| | |
| | | @RequestParam(value = "page",required = false) Integer page, |
| | | @RequestParam(value = "belongTo",required = false) String belongTo, |
| | | @RequestParam(value = "size",required = false) Integer size, |
| | | @RequestParam(value = "unitId",required = false) Long unitId ){ |
| | | @RequestParam(value = "unitId",required = false) Long unitId, |
| | | @RequestParam(value = "loginAccount",required = false) String loginAccount){ |
| | | return this.comActNeighborCircleService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo,unitId); |
| | | } |
| | | |
| | |
| | | * @param localCity |
| | | * @return |
| | | */ |
| | | FiveCount fiveCountPlus(@Param("date") String date,@Param("localCity") String localCity); |
| | | FiveCount fiveCountPlus(@Param("date") String date,@Param("localCity") String localCity,@Param("type") Integer type); |
| | | |
| | | /** |
| | | * 统计查询 |
| | |
| | | // + "AND a.is_volunteer=#{activitySignVO.type}-1 " + " </if> " + " order by a.create_at desc " + "</script>") |
| | | IPage<ActivitySignVO> listActivitySign(Page page, @Param("activitySignVO") ActivitySignVO activitySignVO); |
| | | |
| | | IPage<ActivitySignVO> listActivitySignParty(Page page, @Param("activitySignVO") ActivitySignVO activitySignVO); |
| | | |
| | | @Select("<script> " + "SELECT " + "u.user_id id, " + "u.image_url, " + "u.name, " + "u.nick_name, u.openid, " |
| | | + "CASE WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity, " |
| | | + "u.phone, " + "u.tags, " + "a.create_at, " + "a.is_volunteer, a.status , a.reason, t.limit " + "FROM " + "com_act_act_sign a " |
| | |
| | | * 5项统计 |
| | | * @return |
| | | */ |
| | | R fiveCountPlus(String date,String localCity); |
| | | R fiveCountPlus(String date,String localCity,String loginAccount); |
| | | |
| | | /** |
| | | * 图标统计 |
| | |
| | | |
| | | @Override |
| | | public R pageList(ComActAcidRecordDTO comActAcidRecordDTO) { |
| | | //是否需要筛选 |
| | | comActAcidRecordDTO.setType(isVilliage(comActAcidRecordDTO.getLoginAccount())); |
| | | log.info("搜索条件=========="+comActAcidRecordDTO); |
| | | //获取当前登录账号的社区名 |
| | | return R.ok(this.baseMapper.pageList(new Page<>(comActAcidRecordDTO.getPage(), comActAcidRecordDTO.getSize()),comActAcidRecordDTO)); |
| | | } |
| | | |
| | |
| | | return R.ok(this.baseMapper.fiveCount(localCity)); |
| | | } |
| | | @Override |
| | | public R fiveCountPlus(String date,String localCity) { |
| | | return R.ok(this.baseMapper.fiveCountPlus(date,localCity)); |
| | | public R fiveCountPlus(String date,String localCity,String loginAccount) { |
| | | Integer type=3; |
| | | if (StringUtils.isNotEmpty(loginAccount)){ |
| | | type = isVilliage(loginAccount); |
| | | } |
| | | return R.ok(this.baseMapper.fiveCountPlus(date,localCity,type)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | case "盐边县": comStreetDO.setAreaCode(510422); break; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 是否需要区分村落/社区 |
| | | * */ |
| | | private Integer isVilliage(String name){ |
| | | if ("fangyipingtai".equals(name)){ |
| | | return 3; |
| | | }else if ("pandashujuzhongxin".equals(name)){ |
| | | return 1; |
| | | }else if ("pannongyenongcunju".equals(name)){ |
| | | return 2; |
| | | } |
| | | return 3; |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public R listActivitySign(ActivitySignVO activitySignVO) { |
| | | |
| | | ComActActivityDO comActActivityDO=comActActivityDAO.selectById(activitySignVO.getActivityId()); |
| | | if(comActActivityDO!=null){ |
| | | if(comActActivityDO.getType()==3||comActActivityDO.getType()==5){ |
| | | IPage<ActivitySignVO> activitySignVOS = comActActSignDAO |
| | | .listActivitySignParty(new Page(activitySignVO.getPageNum(), activitySignVO.getPageSize()), activitySignVO); |
| | | return R.ok(activitySignVOS); |
| | | } |
| | | } |
| | | IPage<ActivitySignVO> activitySignVOS = comActActSignDAO |
| | | .listActivitySign(new Page(activitySignVO.getPageNum(), activitySignVO.getPageSize()), activitySignVO); |
| | | // List<ActivitySignVO> activitySignVOS = comActActSignDAO.listActivitySign(activitySignVO); |
| | | return R.ok(activitySignVOS); |
| | | } |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActPasswordVo; |
| | | import com.panzhihua.service_community.util.MyAESUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | @Override |
| | | public R getCommunityPassword(Long communityId){ |
| | | return R.ok(comActDAO.getCommunityPassword(communityId)); |
| | | ComActPasswordVo comActPasswordVo=comActDAO.getCommunityPassword(communityId); |
| | | try { |
| | | comActPasswordVo.setPassword(MyAESUtil.Decrypt(comActPasswordVo.getPassword(),"Ryo7M3n8loC5Abcd")); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return R.ok(comActPasswordVo); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.util; |
| | | |
| | | import sun.misc.BASE64Decoder; |
| | | import sun.misc.BASE64Encoder; |
| | | |
| | | import javax.crypto.Cipher; |
| | | import javax.crypto.spec.SecretKeySpec; |
| | | |
| | | public class MyAESUtil { |
| | | |
| | | // 加密 |
| | | public static String Encrypt(String sSrc, String sKey) throws Exception { |
| | | if (sKey == null) { |
| | | System.out.print("Key为空null"); |
| | | return null; |
| | | } |
| | | // 判断Key是否为16位 |
| | | if (sKey.length() != 16) { |
| | | System.out.print("Key长度不是16位"); |
| | | return null; |
| | | } |
| | | byte[] raw = sKey.getBytes("utf-8"); |
| | | SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES"); |
| | | Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式" |
| | | cipher.init(Cipher.ENCRYPT_MODE, skeySpec); |
| | | byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8")); |
| | | return new BASE64Encoder().encode(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。 |
| | | } |
| | | |
| | | // 解密 |
| | | public static String Decrypt(String sSrc, String sKey) throws Exception { |
| | | try { |
| | | // 判断Key是否正确 |
| | | if (sKey == null) { |
| | | System.out.print("Key为空null"); |
| | | return null; |
| | | } |
| | | // 判断Key是否为16位 |
| | | if (sKey.length() != 16) { |
| | | System.out.print("Key长度不是16位"); |
| | | return null; |
| | | } |
| | | byte[] raw = sKey.getBytes("utf-8"); |
| | | SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES"); |
| | | Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); |
| | | cipher.init(Cipher.DECRYPT_MODE, skeySpec); |
| | | byte[] encrypted1 = new BASE64Decoder().decodeBuffer(sSrc);//先用base64解密 |
| | | try { |
| | | byte[] original = cipher.doFinal(encrypted1); |
| | | String originalString = new String(original,"utf-8"); |
| | | return originalString; |
| | | } catch (Exception e) { |
| | | System.out.println(e.toString()); |
| | | return null; |
| | | } |
| | | } catch (Exception ex) { |
| | | System.out.println(ex.toString()); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | |
| | | <if test="commonPage.stopTime!=null"> |
| | | AND concat(SUBSTR(#{commonPage.stopTime} FROM 1 FOR 10),' 23:59:59') >= checkTime |
| | | </if> |
| | | order by checkTime desc |
| | | order by checkTime asc,reportTime desc |
| | | </if> |
| | | <if test="commonPage.type == 2"> |
| | | <if test="commonPage.startTime!=null"> |
| | |
| | | <if test="commonPage.travelCard !=null and commonPage.travelCard !=''"> |
| | | and travel_card like concat('%',#{commonPage.travelCard},'%') |
| | | </if> |
| | | <if test="commonPage.type == 1"> |
| | | and local_city like concat('%','社区') |
| | | </if> |
| | | <if test="commonPage.type == 2"> |
| | | and local_city like concat('%','村') |
| | | </if> |
| | | </where> |
| | | order by check_status asc,create_time desc |
| | | </select> |
| | |
| | | |
| | | <select id="fiveCountPlus" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> |
| | | select (select count(*) from com_act_acid_record where 1=1 and is_del=0 |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if> |
| | | <if test="date!=null and date!=''">and |
| | | create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) allCount, |
| | | concat('%',#{localCity},'%') |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if></if>) allCount, |
| | | (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) dangerCount, |
| | | concat('%',#{localCity},'%') |
| | | </if>) dangerCount, |
| | | (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) greenMark, |
| | | concat('%',#{localCity},'%')</if> |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if>) greenMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) redMark, |
| | | concat('%',#{localCity},'%') |
| | | </if>) redMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if> |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) yellowMark, |
| | | concat('%',#{localCity},'%') |
| | | </if>) yellowMark, |
| | | (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if> |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) travelCount, |
| | | concat('%',#{localCity},'%') |
| | | </if>) travelCount, |
| | | (select count(*) from com_act_acid_record where outside_city = '是' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if> |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) outsideCount |
| | | concat('%',#{localCity},'%') |
| | | </if>) outsideCount |
| | | </select> |
| | | |
| | | <select id="pushStatics" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> |
| | |
| | | </if> |
| | | order by a.create_at desc |
| | | </select> |
| | | <select id="listActivitySignParty" resultType="com.panzhihua.common.model.vos.community.ActivitySignVO"> |
| | | SELECT u.user_id id, u.image_url, cpm.name, u.nick_name, |
| | | CASE WHEN t.type = 1 and a.is_volunteer = 1 THEN '志愿者' WHEN t.type = 1 and a.is_volunteer = 0 THEN '居民' WHEN t.type=2 THEN '居民' ELSE '党员' END identity, |
| | | u.phone, u.tags, a.create_at, a.is_volunteer, a.status , a.times, |
| | | a.reason, IF(r.times IS NULL, 0, r.award * r.times) AS award, t.limit |
| | | FROM com_act_act_sign a |
| | | JOIN sys_user u ON a.user_id = u.user_id |
| | | JOIN com_pb_member cpm on a.user_id = cpm.user_id |
| | | left join com_act_activity t on a.activity_id = t.id |
| | | LEFT JOIN ( |
| | | SELECT * FROM ( |
| | | SELECT * FROM com_act_act_regist |
| | | WHERE activity_id = #{activitySignVO.activityId} |
| | | ORDER BY id DESC LIMIT 1000000 |
| | | ) temp GROUP BY activity_id, user_id |
| | | ) r ON a.activity_id = r.activity_id AND a.user_id = r.user_id |
| | | WHERE a.activity_id = #{activitySignVO.activityId} |
| | | <if test='activitySignVO.phone != null and activitySignVO.phone != ""'> |
| | | AND u.phone = #{activitySignVO.phone} |
| | | </if> |
| | | <if test='activitySignVO.status != null'> |
| | | AND a.status = #{activitySignVO.status} |
| | | </if> |
| | | <if test='activitySignVO.tags != null and activitySignVO.tags != ""'> |
| | | AND u.tags like concat('%',#{activitySignVO.tags},'%') |
| | | </if> |
| | | <if test='activitySignVO.name != null and activitySignVO.name != ""'> |
| | | AND u.`name` = #{activitySignVO.name} |
| | | </if> |
| | | <if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==1'> |
| | | AND u.is_partymember = 0 and a.is_volunteer=0 |
| | | </if> |
| | | <if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==2'> |
| | | AND u.is_partymember = 1 |
| | | </if> |
| | | <if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==3'> |
| | | AND a.is_volunteer=1 |
| | | </if> |
| | | <if test='activitySignVO.type != null and activitySignVO.type != 0'> |
| | | AND a.is_volunteer=#{activitySignVO.type}-1 |
| | | </if> |
| | | order by a.create_at desc |
| | | </select> |
| | | <select id="selectList" resultType="com.panzhihua.common.model.vos.community.ActivitySignVO"> |
| | | SELECT s.id,s.activity_id,s.user_id,s.create_at,s.is_volunteer, r.times, r.times * r.award AS award FROM `com_act_act_sign` s |
| | | LEFT JOIN ( |
| | |
| | | * 报到单位统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | @GetMapping("/statistics/top") |
| | | public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo") String belongTo) { |
| | | return comPbCheckUnitService.unitStatisticsTop(communityId, belongTo); |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "belongTo", required = false) String choice) { |
| | | return comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice); |
| | | } |
| | | |
| | | /** |
| | |
| | | * 报到党员统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | @GetMapping("/pbStatistics/top") |
| | | public R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo") String belongTo) { |
| | | return comPbCheckUnitService.pbStatisticsTop(communityId, belongTo); |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId) { |
| | | return comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * 报到单位统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | PbCheckUnitStatisticsVo unitStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo); |
| | | PbCheckUnitStatisticsVo unitStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo, @Param("choice") String choice); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | * 报到党员统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | PbCheckUnitStatisticsVo pbStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo); |
| | | PbCheckUnitStatisticsVo pbStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo, @Param("choice") String choice, @Param("checkUnitId") Long checkUnitId); |
| | | |
| | | /** |
| | | * 报到党员统计-按单位归属统计 |
| | |
| | | * 报到单位统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | R unitStatisticsTop(Long communityId, String belongTo); |
| | | R unitStatisticsTop(Long communityId, String belongTo, String choice); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | * 报到党员统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | R pbStatisticsTop(Long communityId, String belongTo); |
| | | R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId); |
| | | |
| | | /** |
| | | * 报到党员统计-按单位归属统计 |
| | |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.enums.ComPbCheckUnitTypeEnum; |
| | | import com.panzhihua.common.model.vos.common.ComPbCheckUnitVo; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitErrorExcelVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitExcelVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | |
| | | * 报到单位统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R unitStatisticsTop(Long communityId, String belongTo) { |
| | | return R.ok(this.baseMapper.unitStatisticsTop(communityId, belongTo)); |
| | | public R unitStatisticsTop(Long communityId, String belongTo, String choice) { |
| | | return R.ok(this.baseMapper.unitStatisticsTop(communityId, belongTo, choice)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * 报到党员统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pbStatisticsTop(Long communityId, String belongTo) { |
| | | return R.ok(this.baseMapper.pbStatisticsTop(communityId, belongTo)); |
| | | public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId) { |
| | | return R.ok(this.baseMapper.pbStatisticsTop(communityId, belongTo, choice, checkUnitId)); |
| | | } |
| | | |
| | | /** |
| | |
| | | <if test="dto.belongTo != null and dto.belongTo != ''"> |
| | | and cpcu.belong_to =#{dto.belongTo} |
| | | </if> |
| | | <if test="dto.natureName != null and dto.natureName != ''"> |
| | | and cpcu.nature_name = #{dto.natureName} |
| | | </if> |
| | | </where> |
| | | order by cpcu.create_at desc |
| | | </select> |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND belong_to = #{choice} |
| | | </if> |
| | | ) AS unitTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '机关单位' |
| | | <if test="communityId != null"> |
| | |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND belong_to = #{choice} |
| | | </if> |
| | | ) AS organTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位' |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND belong_to = #{choice} |
| | | </if> |
| | | ) AS businessTotal, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | <if test="communityId != null"> |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND cpcu.belong_to = #{choice} |
| | | </if> |
| | | ) AS partyMemberTotal |
| | | </select> |
| | | <select id="unitStatistics" resultType="com.panzhihua.common.model.vos.common.PbCheckUnitStatisticsVo"> |
| | | SELECT temp.*, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '机关单位' AND belong_to = temp.belong_to) AS organTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位' AND belong_to = temp.belong_to) AS businessTotal, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 AND cpcu.belong_to = temp.belong_to) AS partyMemberTotal |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '机关单位' |
| | | <if test="commonDto.communityId != null"> |
| | | AND community_id = #{commonDto.communityId} |
| | | </if> |
| | | AND belong_to = temp.belong_to) AS organTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位' |
| | | <if test="commonDto.communityId != null"> |
| | | AND community_id = #{commonDto.communityId} |
| | | </if> |
| | | AND belong_to = temp.belong_to) AS businessTotal, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | <if test="commonDto.communityId != null"> |
| | | AND m.community_id = #{commonDto.communityId} |
| | | </if> |
| | | AND cpcu.belong_to = temp.belong_to) AS partyMemberTotal |
| | | FROM (SELECT belong_to,COUNT( id ) AS unitTotal FROM com_pb_check_unit WHERE 1=1 |
| | | <if test="commonDto.communityId != null"> |
| | | AND community_id = #{commonDto.communityId} |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND cpcu.belong_to = #{choice} |
| | | </if> |
| | | <if test="checkUnitId != null"> |
| | | AND m.check_unit_id = #{checkUnitId} |
| | | </if> |
| | | ) AS organTotal, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | AND cpcu.nature_name = '企事业单位' |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND cpcu.belong_to = #{choice} |
| | | </if> |
| | | <if test="checkUnitId != null"> |
| | | AND m.check_unit_id = #{checkUnitId} |
| | | </if> |
| | | ) AS businessTotal, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | <if test="communityId != null"> |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND cpcu.belong_to = #{choice} |
| | | </if> |
| | | <if test="checkUnitId != null"> |
| | | AND m.check_unit_id = #{checkUnitId} |
| | | </if> |
| | | ) AS partyMemberTotal |
| | | </select> |
| | | <select id="pbStatisticsBelong" resultType="com.panzhihua.common.model.vos.common.PbCheckUnitStatisticsVo"> |
| | | SELECT temp.*, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | <if test="commonDto.communityId != null"> |
| | | AND m.community_id = #{commonDto.communityId} |
| | | </if> |
| | | AND cpcu.nature_name = '机关单位' AND cpcu.belong_to = temp.belong_to) AS organTotal, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | <if test="commonDto.communityId != null"> |
| | | AND m.community_id = #{commonDto.communityId} |
| | | </if> |
| | | AND cpcu.nature_name = '企事业单位' AND cpcu.belong_to = temp.belong_to) AS businessTotal |
| | | FROM (SELECT cpcu.belong_to,COUNT( m.id ) AS partyMemberTotal FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | <if test="commonDto.communityId != null"> |
| | |
| | | </select> |
| | | <select id="pbStatisticsUnit" resultType="com.panzhihua.common.model.vos.common.ComPbCheckUnitVo"> |
| | | SELECT |
| | | cpcu.id, |
| | | cpcu.`name`, |
| | | cpcu.nature_name, |
| | | cpcu.belong_to, |
| | |
| | | su.nick_name |
| | | from com_pb_member as m |
| | | LEFT JOIN com_pb_org o ON m.org_id = o.id |
| | | LEFT JOIN sys_user su ON o.user_id = su.user_id |
| | | LEFT JOIN sys_user su ON m.user_id = su.user_id |
| | | LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id |
| | | LEFT JOIN com_mng_village cmv on m.village_id = cmv.village_id |
| | | LEFT JOIN com_act ca on m.community_id = ca.community_id |
| | |
| | | </if> |
| | | <if test="dto.natureName !=null and dto.natureName !=''"> |
| | | and cpcu.nature_name = #{dto.natureName} |
| | | </if> |
| | | <if test="dto.workUnitName !=null and dto.workUnitName !=''"> |
| | | and cpcu.name = #{dto.workUnitName} |
| | | </if> |
| | | <if test="dto.isRegister !=null"> |
| | | <if test="dto.isRegister == 1"> |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.panzhihua.common.model.dtos.DataKanBansDto; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO; |
| | |
| | | public R getAreaAndStreet(){ |
| | | return userService.getAreaAndStreet(); |
| | | } |
| | | |
| | | @GetMapping("/communityList") |
| | | public R getCommunityList(@RequestParam("name") String name, @RequestParam(value = "id",required = false) Long id){ |
| | | return userService.getCommunityList(name,id); |
| | | } |
| | | |
| | | @GetMapping("/resetPasswordAccount") |
| | | public R resetPasswordAccount(@RequestParam("type")Integer type,@RequestParam("account")String account){ |
| | | return userService.resetPassword(type,account); |
| | | } |
| | | } |
| | |
| | | Map<String,Long> getDailyAddAndActive(@Param("date") Date date,@Param("id") Long streetId,@Param("areaCode") Long areaCode); |
| | | |
| | | |
| | | List<StreetVO> selectStreetByAreaCode(Integer code); |
| | | List<StreetVOS> selectStreetByAreaCode(Integer code); |
| | | |
| | | List<StreetVO> selectStreetsByAreaCode(Integer code); |
| | | |
| | | ComActAcidCheckRecordVO selectComActAcidCheckRecordById(Long id); |
| | | |
| | |
| | | * */ |
| | | Integer getMonthUsers(@Param("streetId") Long streetId,@Param("areaCode") Long areaCode,@Param("range") String range); |
| | | |
| | | /** |
| | | * 获取街道下属村/社区 |
| | | * */ |
| | | List<CommunityVO> selectCommunityByStreetId(@Param("id") Integer streetId,@Param("type") Integer type); |
| | | |
| | | /** |
| | | * 获取账户id |
| | | * */ |
| | | List<Integer> selectIdsByAccount(@Param("array") String[] streetList); |
| | | |
| | | List<CommunityVO> selectCommunityByStreetName(String name); |
| | | |
| | | StreetVOS selectStreetByName(String name); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R uuPush(@RequestParam("washPhone")String washPhone,@RequestParam("phone")String phone,@RequestParam("washName")String washName,@RequestParam("orderStatus")Integer orderStatus); |
| | | |
| | | /** |
| | | * 获取城镇或村落列表 |
| | | * */ |
| | | R getCommunityList(String name,Long id); |
| | | |
| | | /** |
| | | * 重置密码 |
| | | * @param type |
| | | * @param account |
| | | * @return |
| | | */ |
| | | R resetPassword(Integer type,String account); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.collection.ListUtil; |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | |
| | | return R.ok(vo); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R uuPush(String washPhone,String phone,String washName,Integer orderStatus) { |
| | | if(StringUtils.isNotEmpty(phone)){ |
| | |
| | | return R.ok(); |
| | | } |
| | | @Override |
| | | public R getCommunityList(String name,Long id) { |
| | | //区级账号名 |
| | | String[] streetList={"bingcaogangjiedao","donghuajiedao","nongnongpingjiedao","dadukoujiedaojiedao","guazipingjiedao", |
| | | "yinjiangzhen","qingxiangpingjiedao","yuquanjiedao","hemenkoujiedao","dabaodingjiedao","taojiadujiedao","gelipinzhen","dahezhonglujiedao", |
| | | "jingjiangzhen","renhezhen","pingdizhen","datianzhen","tongdezhen","futianzhen","qianjinzhen","panlianzhen","binguzhen","baimazhen", |
| | | "salianzhen","puweizhen","deshizhen","wanqiuyizuxiang","caochangzhen","xinshanlisuzuxiang","tongzilinzhen","yongxingzhen","yumenzhen", |
| | | "honggezhen","hongguoyizuxiang"}; |
| | | List<Integer> ids = userDao.selectIdsByAccount(streetList); |
| | | //村或社区账号 |
| | | Integer type=isVilliage(name); |
| | | //是否为市级账号 |
| | | Boolean cityAccount = isCityAccount(name); |
| | | if (cityAccount){ |
| | | List<Integer> areaList=areaCodeList(); |
| | | List<AreaVOS> areaVOList=new ArrayList<>(); |
| | | for (Integer code : areaList) { |
| | | AreaVOS areaVO=new AreaVOS(); |
| | | areaVO.setId(code); |
| | | areaVO.setName(areaCodeToName(code.longValue())); |
| | | List<StreetVOS> streetVOS = userDao.selectStreetByAreaCode(code); |
| | | Iterator<StreetVOS> iterator = streetVOS.listIterator(); |
| | | while (iterator.hasNext()){ |
| | | StreetVOS vo = iterator.next(); |
| | | List<CommunityVO> communityVOS = userDao.selectCommunityByStreetId(vo.getId(), type); |
| | | vo.setChildList(communityVOS); |
| | | if (type!=3){ |
| | | if (communityVOS==null || communityVOS.size()==0){ |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | } |
| | | areaVO.setChildList(streetVOS); |
| | | areaVOList.add(areaVO); |
| | | } |
| | | return R.ok(areaVOList); |
| | | }else{ |
| | | Boolean areaAccount = isAreaAccount(name); |
| | | if (areaAccount){ |
| | | Integer areaCode = accountToCode(name); |
| | | List<Integer> areaList=new ArrayList<>(); |
| | | areaList.add(areaCode); |
| | | List<AreaVOS> areaVOList=new ArrayList<>(); |
| | | for (Integer code : areaList) { |
| | | AreaVOS areaVO=new AreaVOS(); |
| | | areaVO.setId(code); |
| | | areaVO.setName(areaCodeToName(code.longValue())); |
| | | List<StreetVOS> streetVOS = userDao.selectStreetByAreaCode(code); |
| | | Iterator<StreetVOS> iterator = streetVOS.listIterator(); |
| | | while (iterator.hasNext()){ |
| | | StreetVOS vo = iterator.next(); |
| | | List<CommunityVO> communityVOS = userDao.selectCommunityByStreetId(vo.getId(), type); |
| | | vo.setChildList(communityVOS); |
| | | } |
| | | areaVO.setChildList(streetVOS); |
| | | areaVOList.add(areaVO); |
| | | } |
| | | return R.ok(areaVOList); |
| | | }else{ |
| | | //非区县账号,只看街道下属社区 |
| | | if (ArrayUtil.contains(streetList, name)){ |
| | | List<StreetVOS> list=new ArrayList<>(); |
| | | //只看当前街道下属社区 |
| | | StreetVOS streetVOS = userDao.selectStreetByName(name); |
| | | List<CommunityVO> communityVOS = userDao.selectCommunityByStreetName(name); |
| | | if (org.apache.commons.lang3.ObjectUtils.isNotEmpty(streetVOS)) { |
| | | streetVOS.setChildList(communityVOS); |
| | | } |
| | | list.add(streetVOS); |
| | | return R.ok(list); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(null); |
| | | } |
| | | |
| | | @Override |
| | | public R resetPassword(Integer type, String account) { |
| | | SysUserDO sysUserDO=userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getAccount,account).eq(SysUserDO::getType,type)); |
| | | if(sysUserDO!=null){ |
| | | sysUserDO.setPassword("$2a$10$F/2lE2NMhKNHJfi5.FLmfu7jIr7ImRWgCTTeO6m3IRNR2V4sv8YR."); |
| | | userDao.updateById(sysUserDO); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R getAreaAndStreet() { |
| | | List<Integer> areaCodeList=areaCodeList(); |
| | | List<AreaVO> areaVOList=new ArrayList<>(); |
| | |
| | | AreaVO vo=new AreaVO(); |
| | | vo.setId(code); |
| | | vo.setName(areaCodeToName(code.longValue())); |
| | | vo.setStreetList(userDao.selectStreetByAreaCode(code)); |
| | | vo.setStreetList(userDao.selectStreetsByAreaCode(code)); |
| | | areaVOList.add(vo); |
| | | } |
| | | return R.ok(areaVOList); |
| | |
| | | case "510422": |
| | | name="盐边县"; |
| | | break; |
| | | case "510424": |
| | | name="钒钛新区"; |
| | | break; |
| | | } |
| | | return name; |
| | | } |
| | |
| | | * */ |
| | | private List<Integer> areaCodeList(){ |
| | | List<Integer> list=new ArrayList<>(); |
| | | list.add(510423); |
| | | list.add(510402); |
| | | list.add(510423); |
| | | list.add(510411); |
| | | list.add(510421); |
| | | list.add(510422); |
| | | list.add(510424); |
| | | return list; |
| | | } |
| | | |
| | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 是否需要区分村落/社区 |
| | | * */ |
| | | private Integer isVilliage(String name){ |
| | | if ("fangyipingtai".equals(name)){ |
| | | return 3; |
| | | }else if ("pandashujuzhongxin".equals(name)){ |
| | | return 1; |
| | | }else if ("pannongyenongcunju".equals(name)){ |
| | | return 2; |
| | | } |
| | | return 3; |
| | | } |
| | | |
| | | /** |
| | | * 是否为市级账号 |
| | | * */ |
| | | private Boolean isCityAccount(String name){ |
| | | if(("fangyipingtai").equals(name) || ("pandashujuzhongxin").equals(name) || ("pannongyenongcunju").equals(name)){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 是否为区级账号 |
| | | * */ |
| | | private Boolean isAreaAccount(String name){ |
| | | Boolean flag=false; |
| | | switch (name){ |
| | | case "dongqu": |
| | | case "xiqu": |
| | | case "renhequ": |
| | | case "miyixian": |
| | | case "yanbianxian": |
| | | flag=true; |
| | | break; |
| | | } |
| | | return flag; |
| | | } |
| | | |
| | | /** |
| | | * account转区areaCode |
| | | * */ |
| | | private Integer accountToCode(String code){ |
| | | String name="100000"; |
| | | switch (code){ |
| | | case "xiqu" : |
| | | name= "510423"; |
| | | break; |
| | | case "dongqu": |
| | | name="510402"; |
| | | break; |
| | | case "renhequ": |
| | | name="510411"; |
| | | break; |
| | | case "miyixian": |
| | | name="510421"; |
| | | break; |
| | | case "yanbianxian": |
| | | name="510422"; |
| | | break; |
| | | case "fantaixinqu": |
| | | name="510424"; |
| | | break; |
| | | } |
| | | return Integer.parseInt(name); |
| | | } |
| | | |
| | | } |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectStreetByAreaCode" resultType="com.panzhihua.common.model.vos.user.StreetVO"> |
| | | <select id="selectStreetByAreaCode" resultType="com.panzhihua.common.model.vos.user.StreetVOS"> |
| | | select street_id as id,name as name from com_street where area_code=#{code} |
| | | </select> |
| | | <select id="selectStreetsByAreaCode" resultType="com.panzhihua.common.model.vos.user.StreetVO"> |
| | | select street_id as id,name as name from com_street where area_code=#{code} |
| | | </select> |
| | | <select id="selectComActAcidCheckRecordById" |
| | |
| | | and t.create_at >= #{range} |
| | | </if> |
| | | </select> |
| | | <select id="selectCommunityByStreetId" resultType="com.panzhihua.common.model.vos.user.CommunityVO"> |
| | | select community_id as id,name from com_act where street_id =#{id} |
| | | <if test="type == 1"> |
| | | and name like concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and name like concat('%','村') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectIdsByAccount" resultType="java.lang.Integer"> |
| | | select user_id from sys_user where account in |
| | | <foreach collection="array" item="name" separator="," open="(" close=")" > |
| | | #{name} |
| | | </foreach> |
| | | </select> |
| | | <select id="selectCommunityByStreetName" resultType="com.panzhihua.common.model.vos.user.CommunityVO"> |
| | | select ca.community_id as id,ca.name as name |
| | | from sys_user as su |
| | | left join com_street as cs on cs.name=su.name |
| | | left join com_act as ca on ca.street_id=cs.street_id |
| | | where su.account=#{name} |
| | | </select> |
| | | <select id="selectStreetByName" resultType="com.panzhihua.common.model.vos.user.StreetVOS"> |
| | | select cs.street_id as id,cs.name as name |
| | | from sys_user as su |
| | | left join com_street as cs on su.name=cs.name |
| | | where su.account=#{name} |
| | | limit 1 |
| | | </select> |
| | | </mapper> |