Merge branch 'huacheng_test' into huacheng
| | |
| | | @ApiOperation(value = "查询当前用户党员信息") |
| | | @GetMapping("/getPartyMember") |
| | | public R getPartyMember(@RequestParam("type")Integer type){ |
| | | return partyBuildingService.getPartyMember(this.getUserId(),type); |
| | | return partyBuildingService.getPartyMember(this.getLoginUserInfo().getPhone(),type); |
| | | } |
| | | @ApiOperation(value = "查询报道单位详情") |
| | | @GetMapping("/comPbCheckUnit/detailByPhone") |
| | |
| | | public Long getCommunityId() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null == communityId || 0 == communityId) { |
| | | if (null == communityId) { |
| | | throw new ServiceException("用户未绑定社区"); |
| | | } |
| | | return communityId; |
| | |
| | | @ApiModelProperty(value = "管理员电话") |
| | | private String adminPhone; |
| | | @ApiModelProperty(value = "其他") |
| | | private String otherMark; |
| | | private String otherRemark; |
| | | @ApiModelProperty(value = "单位所属") |
| | | private String belongTo; |
| | | } |
| | |
| | | @ApiModelProperty(value = "管理员电话") |
| | | private String adminPhone; |
| | | @ApiModelProperty(value = "其他") |
| | | private String otherMark; |
| | | private String otherRemark; |
| | | @ApiModelProperty(value = "单位所属") |
| | | private String belongTo; |
| | | } |
| | |
| | | private Integer isHelp; |
| | | |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("接单类型 1单位 2个人") |
| | | private Integer orderType; |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | |
| | | @ApiModelProperty(value = "管理员电话") |
| | | private String adminPhone; |
| | | @ApiModelProperty(value = "其他") |
| | | private String otherMark; |
| | | private String otherRemark; |
| | | @ApiModelProperty(value = "单位所属") |
| | | private String belongTo; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)") |
| | | private Integer belongType; |
| | | @ApiModelProperty("处理状态 0 否 1是") |
| | | @ApiModelProperty("处理状态 0待接收 1正在求助 2待处理 3待评价 4已评价") |
| | | private Integer solveStatus; |
| | | |
| | | @ApiModelProperty("预计服务时长") |
| | |
| | | @ApiModelProperty("结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | @ApiModelProperty(value = "特长类别") |
| | | private String specialtyName; |
| | | } |
| | |
| | | |
| | | 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(value = "帮扶社区联系人") |
| | | private String helpCommunityContactsName; |
| | | @ApiModelProperty(value = "小区id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long villageId; |
| | | @ApiModelProperty(value = "小区名字") |
| | | private String villageName; |
| | |
| | | |
| | | |
| | | @GetMapping("/partybuildIng/getPartyMember") |
| | | public R getPartyMember(@RequestParam("userId")Long userId,@RequestParam("type")Integer type); |
| | | public R getPartyMember(@RequestParam("phone")String phone,@RequestParam("type")Integer type); |
| | | |
| | | @GetMapping("/partybuildIng/memberDetail") |
| | | public R memberDetail(@RequestParam("id")Long id); |
| | |
| | | @ApiOperation(value = "分页查询报道单位", response = ComPbCheckUnitVo.class) |
| | | @PostMapping("/page") |
| | | public R queryByPage(@RequestBody PageComPbCheckUnitDto comPbCheckUnit) { |
| | | comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | //comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | return this.comPbCheckUnitService.queryByPage(comPbCheckUnit); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "新增报道单位") |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody AddComPbCheckUnitDto comPbCheckUnit) { |
| | | comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | //comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | comPbCheckUnit.setCreateBy(this.getUserId()); |
| | | comPbCheckUnit.setCreateAt(new Date()); |
| | | return this.comPbCheckUnitService.insert(comPbCheckUnit); |
| | |
| | | @ApiOperation(value = "编辑报道单位") |
| | | @PutMapping("/edit") |
| | | public R edit(@RequestBody EditComPbCheckUnitDto comPbCheckUnit) { |
| | | comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | //comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | comPbCheckUnit.setUpdateBy(this.getUserId()); |
| | | comPbCheckUnit.setUpdateAt(new Date()); |
| | | return this.comPbCheckUnitService.update(comPbCheckUnit); |
| | |
| | | @ApiOperation(value = "查询报道单位列表", response = ComPbCheckUnitVo.class) |
| | | @PostMapping("/list") |
| | | public R queryByList(@RequestBody PageComPbCheckUnitDto comPbCheckUnit) { |
| | | comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | //comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | return this.comPbCheckUnitService.queryByList(comPbCheckUnit); |
| | | } |
| | | |
| | |
| | | @PostMapping("addpartybuildingmember") |
| | | public R addPartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) { |
| | | Long communityId = this.getCommunityId(); |
| | | partyBuildingMemberVO.setCommunityId(communityId); |
| | | R r = partyBuildingService.addPartyBuildingMember(partyBuildingMemberVO); |
| | | if (R.isOk(r)) { |
| | | R r1 = userService.updateUserIsPartymemberByPhone(partyBuildingMemberVO.getPhone()); |
| | |
| | | @ApiOperation(value = "党员管理分页查询", response = PartyBuildingMemberVO.class) |
| | | @PostMapping("pagepartyorganization") |
| | | public R pagePartyOrganization(@RequestBody PagePartyOrganizationVO pagePartyOrganizationVO) { |
| | | pagePartyOrganizationVO.setCommunityId(this.getCommunityId()); |
| | | //pagePartyOrganizationVO.setCommunityId(this.getCommunityId()); |
| | | return partyBuildingService.pagePartyOrganization(pagePartyOrganizationVO); |
| | | } |
| | | @ApiOperation(value = "党员时长信息导出", response = PartyBuildingMemberVO.class) |
| | |
| | | public R listVillage(@RequestBody ComMngVillageVO comMngVillageVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | comMngVillageVO.setCommunityId(communityId); |
| | | if(communityId!=0){ |
| | | comMngVillageVO.setCommunityId(communityId); |
| | | } |
| | | return communityService.listVillage(comMngVillageVO); |
| | | } |
| | | |
| | |
| | | if(StringUtils.isNotEmpty(comMngVillageVO.getName())){ |
| | | param.like(ComMngVillageDO::getName, comMngVillageVO.getName()); |
| | | } |
| | | param.eq(ComMngVillageDO::getCommunityId, comMngVillageVO.getCommunityId()); |
| | | if(comMngVillageVO.getCommunityId()!=0){ |
| | | param.eq(ComMngVillageDO::getCommunityId, comMngVillageVO.getCommunityId()); |
| | | } |
| | | List<ComMngVillageDO> comMngVillageDOS = comActVillageDAO.selectList(param); |
| | | BeanUtils.copyProperties(comMngVillageDOS, vos); |
| | | return R.ok(comMngVillageDOS); |
| | |
| | | } |
| | | |
| | | @GetMapping("/getPartyMember") |
| | | public R getPartyMember(@RequestParam("userId")Long userId,@RequestParam("type")Integer type){ |
| | | return comPbMemberService.getPartyMember(userId,type); |
| | | public R getPartyMember(@RequestParam("phone")String phone,@RequestParam("type")Integer type){ |
| | | return comPbMemberService.getPartyMember(phone,type); |
| | | } |
| | | @GetMapping("/memberDetail") |
| | | public R memberDetail(@RequestParam("id")Long id){ |
| | |
| | | * @date 2022-02-16 16:22:18 |
| | | */ |
| | | List<ComPbCheckUnitVo> queryAllByList(@Param("dto") PageComPbCheckUnitDto comPbCheckUnit); |
| | | |
| | | Long selectCommunityId(@Param("area") String area,@Param("town")String town,@Param("community")String community); |
| | | } |
| | | |
| | |
| | | */ |
| | | PartyBuildingMemberVO getDetailByApp(Long id); |
| | | |
| | | PartyBuildingMemberVO selectDetail(@Param("userId") Long userId,@Param("type")Integer type); |
| | | PartyBuildingMemberVO selectDetail(@Param("phone") String phone,@Param("type")Integer type); |
| | | } |
| | |
| | | |
| | | private String adminPhone; |
| | | |
| | | private String otherMark; |
| | | private String otherRemark; |
| | | |
| | | private String belongTo; |
| | | } |
| | |
| | | |
| | | R getPagePbMember(PartyBuildingMemberVO partyBuildingMemberVO); |
| | | |
| | | R getPartyMember(Long userId,Integer type); |
| | | R getPartyMember(String phone,Integer type); |
| | | |
| | | R memberDetail(Long id); |
| | | } |
| | |
| | | @Override |
| | | @Transactional |
| | | public R insert(AddComPbCheckUnitDto comPbCheckUnit) { |
| | | Long communityId=this.baseMapper.selectCommunityId(comPbCheckUnit.getHelpCommunityName().split(",")[0],comPbCheckUnit.getHelpCommunityName().split(",")[1],comPbCheckUnit.getHelpCommunityName().split(",")[2]); |
| | | ComPbCheckUnit entity = new ComPbCheckUnit(); |
| | | BeanUtils.copyProperties(comPbCheckUnit, entity); |
| | | if(communityId!=null){ |
| | | entity.setCommunityId(communityId); |
| | | } |
| | | if (this.baseMapper.insert(entity) > 0) { |
| | | return R.ok(); |
| | | } |
| | |
| | | if(StringUtils.isEmpty(member.getCheckUnitName())){ |
| | | member.setCheckUnitName("待编辑报到单位"); |
| | | } |
| | | member.setName(SensitiveUtil.replaceName(member.getName())); |
| | | //member.setName(SensitiveUtil.replaceName(member.getName())); |
| | | }); |
| | | return R.ok(memberPage); |
| | | } |
| | | |
| | | @Override |
| | | public R getPartyMember(Long userId,Integer type) { |
| | | public R getPartyMember(String phone,Integer type) { |
| | | |
| | | return R.ok(comPbMemberDAO.selectDetail(userId,type)); |
| | | return R.ok(comPbMemberDAO.selectDetail(phone,type)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | and cpcu.community_id = #{dto.communityId} |
| | | </if> |
| | | <if test="dto.keyWord != null and dto.keyWord != ''"> |
| | | and cpcu.org_name like concat(#{dto.keyWord},'%') |
| | | and (cpcu.contacts like concat(#{dto.keyWord},'%') or cpcu.`name` like concat('%',#{dto.name},'%') or cpcu.phone like concat(#{dto.keyWord},'%')) |
| | | </if> |
| | | <if test="dto.name != null and dto.name != ''"> |
| | | and cpcu.`name` like concat('%',#{dto.name},'%') |
| | | </if> |
| | | <if test="dto.contacts != null and dto.contacts != ''"> |
| | | and cpcu.`contacts` like concat(#{dto.contacts},'%') |
| | | </if> |
| | | <if test="dto.specialtyName != null and dto.specialtyName != ''"> |
| | | and cpcu.specialty_name like concat(#{dto.specialtyName},'%') |
| | | </if> |
| | | </where> |
| | | order by cpcu.create_at desc |
| | |
| | | <if test="dto.phone != null and dto.phone != ''"> |
| | | and cpcu.phone = #{dto.phone} |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | <if test="dto.communityId != null and dto.communityId !=0"> |
| | | and cpcu.community_id = #{dto.communityId} |
| | | </if> |
| | | </where> |
| | | order by cpcu.create_at desc |
| | | </select> |
| | | |
| | | <select id="selectCommunityId" resultType="Long"> |
| | | select community_id from com_area_town_community where area=#{area} and town=#{town} and community=#{community} |
| | | </select> |
| | | |
| | | </mapper> |
| | | |
| | |
| | | select |
| | | m.id, m.org_id, m.name, m.id_card, m.photo_path, m.join_time, m.employment_time, m.audit_result, m.create_at, m.update_at, |
| | | m.community_id, u.user_id, m.refuse_reason, m.phone, m.type, m.position, m.check_unit_id, m.function, m.specialty_category, |
| | | m.specialty_name, m.position_two, m.org_name,cpcu.name as checkUnitName,t2.partyTime,t2.partyInterval, |
| | | m.specialty_name, m.position_two, m.org_name,cpcu.name as checkUnitName,t2.partyTime,t2.partyInterval,cmv.name as villageName,ca.name as communityName, |
| | | TIMESTAMPDIFF( |
| | | YEAR, |
| | | m.employment_time, |
| | |
| | | LEFT JOIN sys_user u ON m.id_card = u.id_card and u.type = 1 |
| | | LEFT JOIN com_pb_org o ON m.org_id = o.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 |
| | | LEFT JOIN (select t1.user_id,sum(t.duration) as partyTime,sum(t.reward_integral) as partyInterval from com_act_activity t LEFT JOIN com_act_act_regist t1 on t.id = t1.activity_id where t.type = 3 |
| | | <if test="dto.startTime !=null"> |
| | | and t.begin_at between #{dto.startTime} and #{dto.endTime} |
| | |
| | | <if test="dto.checkUnitId != null"> |
| | | and m.check_unit_id = #{dto.checkUnitId} |
| | | </if> |
| | | <if test="dto.specialtyCategory != null"> |
| | | and m.specialty_category = #{dto.specialtyCategory} |
| | | <if test="dto.specialtyName != null and dto.specialtyName !=''"> |
| | | and m.specialty_name like concat('%',#{dto.specialtyName},'%') |
| | | </if> |
| | | </where> |
| | | order by m.create_at desc |
| | |
| | | t1.contacts as helpCommunityContactsName, |
| | | t1.phone as helpCommunityContacts, |
| | | t4.name as communityName, |
| | | t1.address |
| | | t1.address, |
| | | t1.village_name as unitVillageName |
| | | from com_pb_member t |
| | | left join com_pb_check_unit t1 on t.check_unit_id = t1.id |
| | | left join com_mng_village t2 on t.village_id = t2.village_id |
| | | left join com_act t3 on t.help_community_id = t3.community_id |
| | | left join com_act t4 on t.community_id = t4.community_id |
| | | where t.user_id = #{userId} |
| | | and t.type = #{type} |
| | | where t.phone = #{phone} |
| | | and t.type = #{type} limit 1 |
| | | </select> |
| | | <select id="getDetailByApp" resultType="com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO"> |
| | | select t.*,t1.village_name as unitVillageName,t1.help_community_name as helpCommunityName,t1.help_community_contacts as helpCommunityContacts,t1.help_community_contacts_name as helpCommunityContactsName,t1.nature_name,t2.name as villageName |
| | | from com_pb_member t left join com_pb_check_unit t1 on t.check_unit_id = t1.id |
| | | left join com_mng_village t2 on t.village_id = t2.village_id where t.id = #{id} |
| | | select t.*, |
| | | t1.contacts as contactsName, |
| | | t1.phone as contacts, |
| | | t1.name as checkUnitName, |
| | | t2.name as villageName, |
| | | t1.contacts as helpCommunityContactsName, |
| | | t1.phone as helpCommunityContacts, |
| | | t4.name as communityName, |
| | | t1.address, |
| | | t1.village_name as unitVillageName |
| | | from com_pb_member t |
| | | left join com_pb_check_unit t1 on t.check_unit_id = t1.id |
| | | left join com_mng_village t2 on t.village_id = t2.village_id |
| | | left join com_act t4 on t.community_id = t4.community_id where t.id = #{id} |
| | | </select> |
| | | </mapper> |
| | | |