Merge branch 'test' into test_future_wangge
| | |
| | | return R.fail("请先登录"); |
| | | } |
| | | enrollByAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | enrollByAppDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.VaccinesEnrollByApp(enrollByAppDTO); |
| | | } |
| | | |
| | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | return R.fail(e.getMessage()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | return communityService.addVaccinesByAdmin(vaccinesByAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除疫苗信息") |
| | | @PostMapping("delete") |
| | | public R deleteVaccinesByAdmin(@RequestParam("id") Long id) { |
| | | return communityService.deleteVaccinesByAdmin(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | private static final int BATCH_COUNT = 100; |
| | | private static final int BATCH_COUNT = 5000; |
| | | private List<ComCvtServeExcelVO> list = new ArrayList<>(); |
| | | |
| | | @Override |
| | |
| | | public class EldersAuthFeedbackAddDTO { |
| | | |
| | | @NotNull() @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "认证ID", hidden = false, example = "1") |
| | | @ApiModelProperty(value = "认证ID", hidden = false, example = "1", required = true) |
| | | private Long authId; |
| | | |
| | | @Length(max=1024) |
| | |
| | | @NotNull |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数,默认10", example = "10") |
| | | @ApiModelProperty(value = "分页-每页记录数,默认10", example = "10", required = true) |
| | | @NotNull |
| | | private Long pageSize = 10L; |
| | | |
| | |
| | | @ApiModelProperty(value = "创建结束时间", hidden = false, example = "2021-05-02 18:05:50") |
| | | private Date createAtEnd; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = false, example = "") |
| | | private Long communityId; |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("疫苗分类列表请求参数") |
| | |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("登记时间开始") |
| | | private Date startTime; |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty("登记时间结束") |
| | | private Date endTime; |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("疫苗名称") |
| | | private String vaccines; |
| | | |
| | | @ApiModelProperty("导出id集合") |
| | | private List<Long> ids; |
| | | } |
| | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("报名用户列表") |
| | | private List<EnrollUserByAppDTO> enrollUserList; |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.vaccines; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("疫苗接种记录请求参数") |
| | | public class VaccinesInoculationByAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty("姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("身份证号") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("接种时间开始") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty("接种时间结束") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("接种剂次") |
| | | private String dosage; |
| | | |
| | | @ApiModelProperty("导出id集合") |
| | | private List<Long> ids; |
| | | } |
| | |
| | | @ApiModelProperty("评论人名字") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("评论人昵称") |
| | | private String userNickName; |
| | | |
| | | @ApiModelProperty("回复人名字") |
| | | private String userNameBack; |
| | | |
| | | @ApiModelProperty("回复人昵称") |
| | | private String userNickNameBack; |
| | | |
| | | |
| | | @ApiModelProperty("评论人手机号") |
| | | private String phone; |
| | | |
| | |
| | | @ApiModelProperty("发布人名字") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("发布人昵称") |
| | | private String userNickName; |
| | | |
| | | @ApiModelProperty("发布人头像") |
| | | private String imageUrl; |
| | | |
| | |
| | | @ApiModelProperty("发起人名字") |
| | | private String sponsorName; |
| | | |
| | | @ApiModelProperty("发布人昵称") |
| | | private String userNickName; |
| | | |
| | | @ApiModelProperty("发生地址") |
| | | @NotBlank(groups = {AddGroup.class},message = "发生地址不能为空") |
| | | private String happenAddr; |
| | |
| | | @ApiModelProperty("发起人名字") |
| | | private String sponsorName; |
| | | |
| | | @ApiModelProperty("发布人昵称") |
| | | private String userNickName; |
| | | |
| | | @ApiModelProperty("发起人头像") |
| | | private String imageUrl; |
| | | |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.*; |
| | | |
| | | import com.panzhihua.common.model.helper.sensitive.Sensitive; |
| | | import com.panzhihua.common.model.helper.sensitive.SensitiveStrategy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "更新人") |
| | |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "身份证") |
| | | @Sensitive(strategy = SensitiveStrategy.ID_CARD) |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "认证人姓名") |
| | |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "出生日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthDay; |
| | | |
| | | |
| | |
| | | @ApiModelProperty("消息标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("具体业务类型 1 社区活动 2党建活动 3微心愿通知 4随手拍服务通知 5支援者申请 6实名制审核 7人脸识别审核 8积分获取和消耗 9积分点击直接跳转积分列表 10 房屋审核通知 11 党员认证审核通知 12邻里圈审核通知") |
| | | @ApiModelProperty("具体业务类型 1 社区活动 2党建活动 3微心愿通知 4随手拍服务通知 5支援者申请 6实名制审核 7人脸识别审核 8积分获取和消耗 9积分点击直接跳转积分列表 10 房屋审核通知 11 党员认证审核通知 12邻里圈审核通知 13 高龄认证社区反馈通知") |
| | | private Integer businessType; |
| | | |
| | | @ApiModelProperty("业务标题") |
New file |
| | |
| | | package com.panzhihua.common.model.vos.vaccines; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class ComMngVaccinesEnrollExcelVo { |
| | | |
| | | @ExcelProperty(value = "姓名" ,index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "性别" ,index = 1) |
| | | private String sex; |
| | | |
| | | @ExcelProperty(value = "年龄" ,index = 2) |
| | | private Integer age; |
| | | |
| | | @ExcelProperty(value = "手机号" ,index = 3) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "身份证号" ,index = 4) |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "登记时间" ,index = 5) |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ExcelProperty(value = "疫苗分类" ,index = 6) |
| | | private String vaccines; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.vaccines; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class ComMngVaccinesInoculationExcelVo { |
| | | |
| | | @ExcelProperty(value = "姓名" ,index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "性别" ,index = 1) |
| | | private String sex; |
| | | |
| | | @ExcelProperty(value = "年龄" ,index = 2) |
| | | private Integer age; |
| | | |
| | | @ExcelProperty(value = "手机号" ,index = 3) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "身份证号" ,index = 4) |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "接种时间" ,index = 5) |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date inoculationAt; |
| | | |
| | | @ExcelProperty(value = "接种剂次" ,index = 6) |
| | | private String dosage; |
| | | |
| | | @ExcelProperty(value = "医疗机构" ,index = 7) |
| | | private String medicalInstitution; |
| | | |
| | | @ExcelProperty(value = "疫苗批号" ,index = 8) |
| | | private String vaccinesCode; |
| | | |
| | | @ExcelProperty(value = "疫苗名称" ,index = 9) |
| | | private String vaccines; |
| | | |
| | | @ExcelProperty(value = "备注" ,index = 10) |
| | | private String remark; |
| | | |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("性别(1.男 2.女 3.未知)") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty("疫苗分类") |
| | | private String vaccines; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @describe 疫苗分类信息 |
| | |
| | | @ApiModelProperty("身份证号码") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty("性别(1.男 2.女)") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty("是否已报名(1.是 2.否)") |
| | | private Integer isEnroll; |
| | | |
| | | @ApiModelProperty("是否是自己(1.是 2.否)") |
| | | private Integer isUser; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 是否已报名(1.是 2.否) |
| | | */ |
New file |
| | |
| | | package com.panzhihua.common.model.vos.vaccines; |
| | | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @describe 疫苗接种记录 |
| | | */ |
| | | @Data |
| | | @ApiModel("疫苗接种记录") |
| | | public class VaccinesInoculationByAdminVO { |
| | | |
| | | @ApiModelProperty("疫苗接种记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("性别(1.男 2.女)") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty("年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("身份证号码") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty("接种时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date inoculationAt; |
| | | |
| | | @ApiModelProperty("接种剂次") |
| | | private String dosage; |
| | | |
| | | @ApiModelProperty("医疗机构") |
| | | private String medicalInstitution; |
| | | |
| | | @ApiModelProperty("疫苗批号") |
| | | private String vaccinesCode; |
| | | |
| | | @ApiModelProperty("疫苗名称") |
| | | private String vaccines; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopGoodsDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.dtos.vaccines.*; |
| | | import com.panzhihua.common.model.vos.IPageVO; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesByAdminDTO; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollByAdminDTO; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollByAppDTO; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollUserByAppDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.SystemmanagementConfigVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | |
| | | */ |
| | | @PostMapping("detaileasyphoto") |
| | | R detailEasyPhoto(@RequestParam("id") Long id, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 随手拍删除 |
| | | * |
| | | * @param id 随手拍主键 |
| | | * @param userId 登录用户id |
| | | * @return 详情内容 |
| | | */ |
| | | @PostMapping("deleteEasyPhoto") |
| | | R deleteEasyPhoto(@RequestParam("id") Long id, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 分页查询微心愿 |
| | |
| | | R deleteOpsHouse(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 一起议-分页查询 |
| | | * 房屋租售-分页查询 |
| | | * |
| | | * @param pageComOpsHouseDTO 查询参数 |
| | | * @return ComOpsHouseVO |
| | |
| | | * @param list 便民服务集合 |
| | | */ |
| | | @PostMapping("/convenient/serve/import") |
| | | R listSaveConvenientServeExcelVO(@RequestBody List<ComCvtServeExcelVO> list, @RequestParam("communityId") Long communityId); |
| | | R listSaveConvenientServeExcelVO(@RequestBody List<ComCvtServeExcelVO> list, @RequestParam(value = "communityId",required = false) Long communityId); |
| | | |
| | | /** |
| | | * 导出房屋信息 |
| | |
| | | */ |
| | | @PostMapping("/vaccines/admin/enroll/list") |
| | | R getVaccinesEnrollListByAdmin(@RequestBody VaccinesEnrollByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | /** |
| | | * 删除疫苗分类信息 |
| | | * @param id 疫苗分类id |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/vaccines/admin/enroll/delete") |
| | | R deleteVaccinesByAdmin(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 根据条件导出登记列表 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 登记列表 |
| | | */ |
| | | @PostMapping("/vaccines/admin/enroll/export") |
| | | R exportVaccinesEnrollListByAdmin(@RequestBody VaccinesEnrollByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | /** |
| | | * 查询接种记录列表 |
| | | * @param inoculationByAdminDTO 请求参数 |
| | | * @return 接种记录列表 |
| | | */ |
| | | @PostMapping("/vaccines/admin/inoculation/list") |
| | | R getVaccinesInoculationListByAdmin(@RequestBody VaccinesInoculationByAdminDTO inoculationByAdminDTO); |
| | | |
| | | /** |
| | | * 接种记录信息导出 |
| | | * @param inoculationByAdminDTO 请求参数 |
| | | * @return 导出结果 |
| | | */ |
| | | @PostMapping("/vaccines/admin/inoculation/export") |
| | | R exportVaccinesInoculationListByAdmin(@RequestBody VaccinesInoculationByAdminDTO inoculationByAdminDTO); |
| | | |
| | | /** |
| | | * 查询疫苗分类列表 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | @PostMapping("/vaccines/admin/enroll/type/list") |
| | | R getEnrollTypeListByAdmin(); |
| | | } |
| | |
| | | return communityService.detailEasyPhoto(id, userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除随手拍", response = ComActEasyPhotoVO.class) |
| | | @DeleteMapping("easyphoto/{id}") |
| | | public R deleteEasyPhoto(@PathVariable("id") Long id) { |
| | | Long userId = this.getUserId(); |
| | | return communityService.deleteEasyPhoto(id, userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询微心愿") |
| | | @PostMapping("pagemicrowish") |
| | | public R pageMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO) { |
| | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | return R.fail(e.getMessage()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | pageQuestnaireDTO.setForMasses(null); |
| | | pageQuestnaireDTO.setForVolunteer(true); |
| | | pageQuestnaireDTO.setForParty(true); |
| | | return communityService.pageQuestnaire(pageQuestnaireDTO, 0l); |
| | | return communityService.pageQuestnaire(pageQuestnaireDTO, this.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "创建调查问卷") |
| | |
| | | */ |
| | | @PostMapping("page") |
| | | @ApiOperation(value = "查询高龄认证", response = EldersAuthVO.class) |
| | | R query(@Validated @ModelAttribute PageEldersAuthDTO pageEldersAuthDTO){ |
| | | R query(@Validated @RequestBody PageEldersAuthDTO pageEldersAuthDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(pageEldersAuthDTO); |
| | | pageEldersAuthDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.query(pageEldersAuthDTO); |
| | | } |
| | | |
| | |
| | | String uuid= UUID.randomUUID().toString().replace("-",""); |
| | | //String name=uuid+".xlsx"; |
| | | |
| | | pageEldersAuthDTO.setCommunityId(getCommunityId()); |
| | | R r = communityService.eldersAuthQuery(pageEldersAuthDTO); |
| | | if (R.isOk(r)) { |
| | | List<ExcelElderAuthDTO> excelElderAuthDTO = JSONArray.parseArray(JSONArray.toJSONString(r.getData()),ExcelElderAuthDTO.class); |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.enums.PopulIsOkEnum; |
| | | import com.panzhihua.common.enums.PopulPoliticalOutlookEnum; |
| | | import com.panzhihua.common.enums.PopulSexEnum; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollByAdminDTO; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesInoculationByAdminDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesEnrollByAdminVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationExcelVo; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVO; |
| | | import com.panzhihua.common.model.vos.vaccines.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/vaccines/") |
| | | @Api(tags = {"疫苗服务"}) |
| | | public class VaccinesApi { |
| | | public class VaccinesApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Value("${excel.userurl}") |
| | | private String excelUrl; |
| | | // FTP 登录用户名 |
| | | @Value("${ftp.username}") |
| | | private String userName; |
| | | // FTP 登录密码 |
| | | @Value("${ftp.password}") |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | @Value("${ftp.host}") |
| | | private String host; |
| | | // FTP 端口 |
| | | @Value("${ftp.port}") |
| | | private int port; |
| | | |
| | | @ApiOperation(value = "疫苗登记列表" , response = VaccinesEnrollByAdminVO.class) |
| | | @PostMapping("/enroll/list") |
| | | public R getVaccinesEnrollListByAdmin(@RequestBody VaccinesEnrollByAdminDTO vaccinesByAdminDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo != null){ |
| | | vaccinesByAdminDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | return communityService.getVaccinesEnrollListByAdmin(vaccinesByAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "疫苗登记列表导出") |
| | | @PostMapping("/enroll/export") |
| | | public R exportVaccinesEnrollListByAdmin(@RequestBody VaccinesEnrollByAdminDTO vaccinesByAdminDTO) { |
| | | //获取登陆用户 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | //获取登陆用户绑定社区id |
| | | vaccinesByAdminDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | //生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "疫苗登记记录.xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | R isok = communityService.exportVaccinesEnrollListByAdmin(vaccinesByAdminDTO); |
| | | List<ComMngVaccinesEnrollExcelVo> populList = JSON.parseArray(JSON.toJSONString(isok.getData()),ComMngVaccinesEnrollExcelVo.class); |
| | | if(populList != null && populList.size() > 0){ |
| | | for (ComMngVaccinesEnrollExcelVo popul:populList){ |
| | | //设置性别 |
| | | popul.setSex(PopulSexEnum.getCnDescByName(Integer.parseInt(popul.getSex()))); |
| | | } |
| | | } |
| | | excelWriter = EasyExcel.write(fileName, ComMngVaccinesEnrollExcelVo.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("疫苗登记导出数据").build(); |
| | | excelWriter.write(populList, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "接种信息列表" , response = VaccinesInoculationByAdminVO.class) |
| | | @PostMapping("/inoculation/list") |
| | | public R getVaccinesInoculationListByAdmin(@RequestBody VaccinesInoculationByAdminDTO inoculationByAdminDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo != null){ |
| | | inoculationByAdminDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | return communityService.getVaccinesInoculationListByAdmin(inoculationByAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "接种信息列表导出") |
| | | @PostMapping("/inoculation/export") |
| | | public R exportVaccinesInoculationListByAdmin(@RequestBody VaccinesInoculationByAdminDTO inoculationByAdminDTO) { |
| | | //获取登陆用户 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | //获取登陆用户绑定社区id |
| | | inoculationByAdminDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | //生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "接种信息记录.xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | List<ComMngVaccinesInoculationExcelVo> populList = JSON.parseArray(JSON.toJSONString(communityService.exportVaccinesInoculationListByAdmin(inoculationByAdminDTO).getData()),ComMngVaccinesInoculationExcelVo.class); |
| | | if(populList != null && populList.size() > 0){ |
| | | for (ComMngVaccinesInoculationExcelVo popul:populList){ |
| | | //设置性别 |
| | | popul.setSex(PopulSexEnum.getCnDescByName(Integer.parseInt(popul.getSex()))); |
| | | } |
| | | } |
| | | excelWriter = EasyExcel.write(fileName, ComMngVaccinesInoculationExcelVo.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("接种信息导出数据").build(); |
| | | excelWriter.write(populList, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "疫苗分类列表") |
| | | @PostMapping("/enroll/type/list") |
| | | public R getEnrollTypeListByAdmin() { |
| | | return communityService.getEnrollTypeListByAdmin(); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaireVO; |
| | | import com.panzhihua.common.model.vos.community.questnaire.UsersAnswerQuestnaireVO; |
| | | import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.model.vos.user.UserPhoneVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import com.panzhihua.common.utlis.IdCard; |
| | | import com.panzhihua.common.utlis.IdCardUtil; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | |
| | | private ComActMessageService comActMessageService; |
| | | @Resource |
| | | private ComActQuestnaireService comActQuestnaireService; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private EldersAuthService eldersAuthService; |
| | | @Resource |
| | |
| | | return comActEasyPhotoService.detailEasyPhoto(id, userId); |
| | | } |
| | | |
| | | /** |
| | | * 随手拍删除 |
| | | * |
| | | * @param id 随手拍主键 |
| | | * @param userId 登录用户 |
| | | * @return 详情内容 |
| | | */ |
| | | @PostMapping("deleteEasyPhoto") |
| | | public R deleteEasyPhoto(@RequestParam("id") Long id, @RequestParam("userId") Long userId) { |
| | | ComActEasyPhotoDO comActEasyPhotoDO = comActEasyPhotoService.getBaseMapper().selectById(id); |
| | | if(comActEasyPhotoDO==null){ |
| | | return R.fail("随手拍不存在"); |
| | | } |
| | | comActEasyPhotoDO.setDelTag(1); |
| | | int updateById = comActEasyPhotoService.getBaseMapper().updateById(comActEasyPhotoDO); |
| | | if(updateById==1){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | /** |
| | | * 分页查询微心愿 |
| | | * |
| | |
| | | @PostMapping("/eldersauth/getMyfamilyElders/{userId}") |
| | | R<List<ComMngFamilyInfoVO>> getMyfamilyElders(@PathVariable("userId") Long userId){ |
| | | List<ComMngFamilyInfoVO> list = comMngPopulationDAO.listFamilyByUserId(userId); |
| | | |
| | | List<ComMngFamilyInfoVO> listRt = new ArrayList<>(); |
| | | list.forEach(rt -> { |
| | | boolean isElders = rt.getAge()>=80; |
| | | if(isElders){ |
| | | int age = IdCard.IdNOToAge(rt.getIdCard()); |
| | | boolean isElders = age >= 80; |
| | | if (isElders) { |
| | | listRt.add(rt); |
| | | } |
| | | }); |
| | |
| | | //根据身份证查询出籍贯 出生日期 |
| | | //String domicile = IdCard.domicile(eldersAuthDO.getIdCard()); |
| | | String domicile = eldersAuthService.queryDomicile(eldersAuthDO.getIdCard()); |
| | | if(StringUtils.isEmpty(domicile)){ |
| | | domicile = "暂无"; |
| | | } |
| | | |
| | | Date birthDay = IdCard.birthDay(eldersAuthDO.getIdCard()); |
| | | eldersAuthDO.setDomicile(domicile); |
| | |
| | | @PostMapping("/eldersauth/addFeedback") |
| | | R add(@RequestBody EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eldersAuthFeedbackAddDTO); |
| | | return eldersAuthService.addFeedback(eldersAuthFeedbackAddDTO); |
| | | EldersAuthDO eldersAuthDO = eldersAuthService.getBaseMapper().selectById(eldersAuthFeedbackAddDTO.getAuthId()); |
| | | if(eldersAuthDO==null){ |
| | | return R.fail("认证记录不存在"); |
| | | } |
| | | R addR = eldersAuthService.addFeedback(eldersAuthFeedbackAddDTO); |
| | | if(R.isOk(addR)){ |
| | | SysUserNoticeVO sysUserNoticeVO=new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(eldersAuthDO.getSumitUserId()); |
| | | sysUserNoticeVO.setType(3); |
| | | sysUserNoticeVO.setTitle("高龄认证社区反馈"); |
| | | sysUserNoticeVO.setBusinessType(13); |
| | | sysUserNoticeVO.setBusinessTitle(" "); |
| | | sysUserNoticeVO.setBusinessContent("你提交【" +eldersAuthDO.getAuthUserName() + "】的高龄认证,社区反馈:" |
| | | + eldersAuthFeedbackAddDTO.getFeedBack()); |
| | | sysUserNoticeVO.setBusinessId(eldersAuthDO.getId()); |
| | | sysUserNoticeVO.setStatus(0); |
| | | sysUserNoticeVO.setBusinessStatus(2); |
| | | R r1 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r1)) { |
| | | log.info("新增用户报名党建活动通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | } |
| | | |
| | | return addR; |
| | | } |
| | | |
| | | |
| | |
| | | * @param list 服务集合 |
| | | */ |
| | | @PostMapping("/serve/import") |
| | | public R listSaveConvenientServeExcelVO(@RequestBody List<ComCvtServeExcelVO> list,@RequestParam("communityId") Long communityId){ |
| | | public R listSaveConvenientServeExcelVO(@RequestBody List<ComCvtServeExcelVO> list,@RequestParam(value = "communityId",required = false) Long communityId){ |
| | | return comCvtServeService.listSaveConvenientServeExcelVO(list,communityId); |
| | | } |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.ComOpsHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComOpsHouseDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComOpsHouseUndercarriageVO; |
| | | import com.panzhihua.common.model.vos.community.ComOpsHouseVO; |
| | | import com.panzhihua.service_community.model.dos.ComMngStructAreaDO; |
| | | import com.panzhihua.service_community.service.ComActService; |
| | | import com.panzhihua.service_community.service.ComMngStructAreaService; |
| | | import com.panzhihua.service_community.service.ComOpsHouseService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | public class HouseApi { |
| | | @Resource |
| | | private ComOpsHouseService comOpsHouseService; |
| | | @Resource |
| | | private ComMngStructAreaService comMngStructAreaService; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @PostMapping("addOpsHouse") |
| | | public R addOpsHouse(@RequestBody ComOpsHouseDTO comOpsHouseDTO){ |
| | | Long houseCommunityId = comOpsHouseDTO.getHouseCommunityId(); |
| | | if(houseCommunityId!=null) { |
| | | R<ComMngStructAreaDO> r = comMngStructAreaService.detailArea(houseCommunityId); |
| | | if(R.isOk(r)&&r.getData()!=null) { |
| | | ComMngStructAreaDO comMngStructAreaDO = r.getData(); |
| | | comOpsHouseDTO.setHouseCommunityName(comMngStructAreaDO.getAreaName()); |
| | | } |
| | | |
| | | } |
| | | return comOpsHouseService.addHouse(comOpsHouseDTO); |
| | | } |
| | | |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesByAdminDTO; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollByAdminDTO; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollByAppDTO; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollUserByAppDTO; |
| | | import com.panzhihua.common.model.dtos.vaccines.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComMngVaccinesEnrollRecordService; |
| | | import com.panzhihua.service_community.service.ComMngVaccinesInoculationRecordService; |
| | |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 登记列表 |
| | | */ |
| | | @PostMapping("admin/enroll/list") |
| | | @PostMapping("/admin/enroll/list") |
| | | public R getVaccinesEnrollListByAdmin(@RequestBody VaccinesEnrollByAdminDTO vaccinesByAdminDTO) { |
| | | return comMngVaccinesEnrollRecordService.getVaccinesEnrollListByAdmin(vaccinesByAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除疫苗分类信息 |
| | | * @param id 疫苗分类id |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/admin/enroll/delete") |
| | | public R deleteVaccinesByAdmin(@RequestParam("id") Long id) { |
| | | return comMngVaccinesService.deleteVaccinesByAdmin(id); |
| | | } |
| | | |
| | | /** |
| | | * 根据条件导出疫苗登记记录 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 导出登记列表 |
| | | */ |
| | | @PostMapping("/admin/enroll/export") |
| | | public R exportVaccinesEnrollListByAdmin(@RequestBody VaccinesEnrollByAdminDTO vaccinesByAdminDTO) { |
| | | return comMngVaccinesEnrollRecordService.exportVaccinesEnrollListByAdmin(vaccinesByAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询接种记录列表 |
| | | * @param inoculationByAdminDTO 请求参数 |
| | | * @return 接种记录列表 |
| | | */ |
| | | @PostMapping("/admin/inoculation/list") |
| | | public R getVaccinesInoculationListByAdmin(@RequestBody VaccinesInoculationByAdminDTO inoculationByAdminDTO) { |
| | | return comMngVaccinesInoculationRecordService.getVaccinesInoculationListByAdmin(inoculationByAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 接种记录信息导出 |
| | | * @param inoculationByAdminDTO 请求参数 |
| | | * @return 导出结果 |
| | | */ |
| | | @PostMapping("/admin/inoculation/export") |
| | | public R exportVaccinesInoculationListByAdmin(@RequestBody VaccinesInoculationByAdminDTO inoculationByAdminDTO) { |
| | | return comMngVaccinesInoculationRecordService.exportVaccinesInoculationListByAdmin(inoculationByAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 疫苗分类列表 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | @PostMapping("/admin/enroll/type/list") |
| | | public R getEnrollTypeListByAdmin() { |
| | | return comMngVaccinesService.getEnrollTypeListByAdmin(); |
| | | } |
| | | } |
| | |
| | | // " </if> " + |
| | | // " </where>" + |
| | | // "</script>") |
| | | @Select("select type,name,phone,image_url from sys_user where user_id=#{userId}") |
| | | @Select("select type,name,phone,image_url,nick_name from sys_user where user_id=#{userId}") |
| | | LoginUserInfoVO selectUserByUserId(Long userId); |
| | | @Select("<script> " + |
| | | "select t.* from ("+ |
| | |
| | | "d.type,\n" + |
| | | "COUNT( DISTINCT c.id ) commentNum,\n" + |
| | | "u.name userName,\n" + |
| | | "u.nick_name userNickName,\n" + |
| | | "d.create_at \n" + |
| | | "FROM\n" + |
| | | "com_act_discuss d\n" + |
| | |
| | | "select * from ("+ |
| | | "SELECT\n" + |
| | | "u.`name` userName,\n" + |
| | | "u.nick_name userNickName,\n" + |
| | | "u.phone,\n" + |
| | | "c.`comment`,\n" + |
| | | "c.`parent_id`,\n" + |
| | |
| | | "COUNT( DISTINCT c.id ) commentNum,\n" + |
| | | "COUNT( DISTINCT du.id ) signNum,\n" + |
| | | "if(u.type=1,u.name,a.name) userName,\n" + |
| | | "if(u.type=1,u.nick_name,a.name) userNickName,\n" + |
| | | "if(du.id is not null,1,0) haveSign,\n" + |
| | | "if(ou.id is not null,1,0) haveVote,\n" + |
| | | "u.image_url,\n" + |
| | |
| | | "select * from ("+ |
| | | "SELECT\n" + |
| | | "u.`name` userName,\n" + |
| | | "u.nick_name userNickName,\n" + |
| | | "u.`image_url`,\n" + |
| | | "u.phone,\n" + |
| | | "c.`comment`,\n" + |
| | |
| | | "LEFT JOIN com_act_easy_photo_comment_user u1 on m.id=u1.easy_photo_comment_id and u1.user_id=#{comActEasyPhotoCommentDTO.userId}\n" + |
| | | "where m.easy_photo_id=#{comActEasyPhotoCommentDTO.id} " + |
| | | "GROUP BY m.id\n" + |
| | | " )t order by t.num desc") |
| | | " )t order by t.num desc, t.create_at DESC ") |
| | | IPage<ComActEasyPhotoCommentVO> pageComActEasyPhotoComment(Page page, @Param("comActEasyPhotoCommentDTO") PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO); |
| | | |
| | | |
| | |
| | | "<if test='comActEasyPhotoVO.handlerName != null and comActEasyPhotoVO.handlerName.trim() != ""'>" + |
| | | "AND su.`name` like concat(#{comActEasyPhotoVO.handlerName},'%') \n" + |
| | | " </if> " + |
| | | "where p.status !=2"+ |
| | | "where p.del_tag = 0 and p.status !=2"+ |
| | | "<if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>" + |
| | | " and p.community_id=#{comActEasyPhotoVO.communityId} " + |
| | | " </if> " + |
| | |
| | | "<if test='comActEasyPhotoVO.handlerName != null and comActEasyPhotoVO.handlerName.trim() != ""'>" + |
| | | "AND su.`name` like concat(#{comActEasyPhotoVO.handlerName},'%') \n" + |
| | | " </if> " + |
| | | "where p.status=2 and p.is_need_feed_back=1 " + |
| | | "where p.del_tag = 0 and p.status=2 and p.is_need_feed_back=1 " + |
| | | "<if test='comActEasyPhotoVO.backUserId != null and comActEasyPhotoVO.backUserId != 0'>" + |
| | | "and p.handler_id=#{comActEasyPhotoVO.backUserId}"+ |
| | | " </if> " + |
| | |
| | | "p.examine_at,\n" + |
| | | "p.create_at,\n" + |
| | | "u.`name` sponsorName,\n" + |
| | | "u.nick_name userNickName,\n" + |
| | | "su.`name` handlerName,\n" + |
| | | "u.`image_url`,\n" + |
| | | "u.phone,\n" + |
| | |
| | | "JOIN sys_user u on p.sponsor_id=u.user_id\n" + |
| | | "LEFT JOIN sys_user su on p.handler_id=su.user_id\n" + |
| | | "LEFT JOIN com_act_easy_photo_user pu on p.id=pu.easy_photo_id\n" + |
| | | "WHERE p.id=#{id}") |
| | | "WHERE p.del_tag = 0 and p.id=#{id}") |
| | | ComActEasyPhotoVO detailEasyPhoto(Long id); |
| | | @Select("SELECT\n" + |
| | | "'1' type\n" + |
| | | "FROM\n" + |
| | | "com_act_easy_photo p \n" + |
| | | " com_act_easy_photo p \n" + |
| | | "WHERE\n" + |
| | | "p.community_id = #{communityId} \n" + |
| | | " p.del_tag = 0 and p.community_id = #{communityId} \n" + |
| | | "AND p.STATUS = 1 \n"+ |
| | | "\n" + |
| | | "union all \n" + |
| | |
| | | "SELECT\n" + |
| | | "'1' type\n" + |
| | | "FROM\n" + |
| | | "com_act_easy_photo p \n" + |
| | | " p.del_tag = 0 and com_act_easy_photo p \n" + |
| | | "WHERE\n" + |
| | | "p.community_id = #{communityId} \n" + |
| | | " p.del_tag = 0 and p.community_id = #{communityId} \n" + |
| | | "AND p.`status` = 2 and p.is_need_feed_back=1 and p.handler_id=#{userId}\n" |
| | | ) |
| | | List<TodoEventsVO> selectNeedToDo(@Param("communityId") Long communityId, @Param("userId") Long userId); |
| | |
| | | "SELECT\n" + |
| | | "p.id,\n" + |
| | | "u.`name` sponsor_name,\n" + |
| | | "u.nick_name userNickName,\n" + |
| | | "u.phone sponsor_phone,\n" + |
| | | "count(DISTINCT pu.id)giveThumbsUpNum,\n" + |
| | | "count(DISTINCT c.id)commentNum,\n" + |
| | |
| | | "left JOIN sys_user su ON p.handler_id = su.user_id \n" + |
| | | "left JOIN com_act_easy_photo_comment c ON p.id = c.easy_photo_id \n" + |
| | | " <where>" + |
| | | " p.del_tag = 0 " + |
| | | "<if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>" + |
| | | " and p.community_id=#{comActEasyPhotoVO.communityId} " + |
| | | " </if> " + |
| | |
| | | "SELECT\n" + |
| | | "w.id,\n" + |
| | | "u.name sponsor_name,\n" + |
| | | "u.nick_name userNickName,\n" + |
| | | "u.image_url ,\n" + |
| | | "w.sponsor_phone,\n" + |
| | | "w.wish_name,\n" + |
| | |
| | | @Select("SELECT\n" + |
| | | "w.id,\n" + |
| | | "u.name sponsor_name,\n" + |
| | | "u.nick_name userNickName,\n" + |
| | | "w.create_at,\n" + |
| | | "u.image_url,\n" + |
| | | "w.sponsor_phone,\n" + |
| | |
| | | "\tw.community_id\n") |
| | | List<TodoEventsVO> selectNeedToDo(@Param("communityId") Long communityId, @Param("userId") Long userId); |
| | | |
| | | @Update("update com_act_micro_wish set `status`=6 where `status`=5 and TIMESTAMPDIFF(HOUR, feedback_at, SYSDATE())>=72") |
| | | @Update("update com_act_micro_wish set `status`=6, evaluate_at=now() where `status`=5 and TIMESTAMPDIFF(HOUR, feedback_at, SYSDATE())>=72") |
| | | int updateStatusAutoConfirm(); |
| | | |
| | | } |
| | |
| | | @Mapper |
| | | public interface ComActQuestnaireDAO extends BaseMapper<ComActQuestnaireDO> { |
| | | @Select("<script> " + |
| | | "SELECT aq.id, aq.title, aq.state, u.name as create_user, aq.join_count, aq.create_at , aq.create_by \n" + |
| | | "SELECT DISTINCT aq.id, aq.title, aq.state, u.name as create_user, aq.join_count, aq.create_at , aq.create_by \n" + |
| | | "FROM \n" + |
| | | " com_act_questnaire aq \n" + |
| | | " LEFT JOIN sys_user u on aq.create_by = u.user_id \n" + |
| | | "<if test='pageQuestnaireDTO.userId != null '>\n" + //筛选用户已回答的问卷 |
| | | " LEFT JOIN com_act_questnaire_sub qs ON aq.id = qs.que_Id\n" + |
| | | " LEFT JOIN com_act_questnaire_answer_content ac ON qs.id = ac.sub_id AND ac.user_id=#{pageQuestnaireDTO.userId} " + |
| | | " </if> \n" + |
| | | " where aq.is_hide=0 " + |
| | | |
| | | "<if test='pageQuestnaireDTO.userId != null '>\n" + //筛选用户已回答的问卷 |
| | | " AND case when ac.id IS NULL then aq.state=0 ELSE TRUE end " + |
| | | " </if> \n" + |
| | | "<if test='communityId != null and communityId!=0l '>\n" + |
| | | " and aq.community_id = #{communityId}\n" + |
| | | " </if> " + |
| | |
| | | List<ComMngPopulationVO> listPopulation(ComMngPopulationDTO populationVO); |
| | | |
| | | |
| | | @Select("select id,user_id,relationship,`name`,id_card,phone,age,health,job,create_at,update_at,card_photo_front,card_photo_back,family_book from com_mng_family_info where user_id=#{userId}") |
| | | @Select("select id,user_id,relationship,`name`,id_card,phone,age,health,job,create_at,update_at,card_photo_front,card_photo_back,family_book from com_mng_family_info where user_id=#{userId} order by create_at desc ") |
| | | List<ComMngFamilyInfoVO> listFamilyByUserId(Long userId); |
| | | |
| | | @Select("select id,`name`,phone,relation from com_mng_population where road = #{comMngPopulationDO.road} and door_no = #{comMngPopulationDO.doorNo} and floor = #{comMngPopulationDO.floor} and unit_no = #{comMngPopulationDO.unitNo} and house_no = #{comMngPopulationDO.houseNo} and id != #{comMngPopulationDO.id}") |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollByAdminDTO; |
| | | import com.panzhihua.common.model.vos.vaccines.ComMngVaccinesEnrollExcelVo; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesEnrollByAdminVO; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesEnrollUserByAppVO; |
| | | import com.panzhihua.service_community.model.dos.ComMngVaccinesEnrollRecordDO; |
| | |
| | | @Mapper |
| | | public interface ComMngVaccinesEnrollRecordDAO extends BaseMapper<ComMngVaccinesEnrollRecordDO> { |
| | | |
| | | @Select("select cmfi.id as userId,cmfi.name,cmfi.age,cmfi.job,cmfi.phone,cmfi.id_card from com_mng_family_info as cmfi where user_id = #{userId}") |
| | | @Select("select cmfi.id as userId,cmfi.name,cmfi.age,cmfi.job,cmfi.phone,cmfi.id_card,cmfi.create_at from com_mng_family_info as cmfi where user_id = #{userId}") |
| | | List<VaccinesEnrollUserByAppVO> getFamilyUserList(@Param("userId") Long userId); |
| | | |
| | | @Select("select su.user_id,su.name,su.nick_name,su.job,su.phone,su.id_card,su.birthday from sys_user as su where user_id = #{userId}") |
| | | @Select("select su.user_id,su.name,su.nick_name,su.job,su.phone,su.id_card,su.birthday,su.sex,su.create_at from sys_user as su where user_id = #{userId}") |
| | | VaccinesEnrollUserByAppVO getSysUser(@Param("userId") Long userId); |
| | | |
| | | @Select("select cmfi.name,cmfi.age,cmfi.phone,cmfi.id_card from com_mng_family_info as cmfi where id = #{userId}") |
| | | VaccinesEnrollUserByAppVO getFamilyUser(@Param("userId") Long userId); |
| | | |
| | | @Select("<script> " + |
| | | "select cmver.id,cmv.`name`,cmver.create_at from com_mng_vaccines_enroll_record as cmver" + |
| | | "select cmver.id,cmver.name,cmver.sex,cmver.age,cmver.phone,cmver.id_card,cmver.create_at,cmv.name as vaccines from com_mng_vaccines_enroll_record as cmver " + |
| | | " left join com_mng_vaccines as cmv on cmv.id = cmver.type " + |
| | | " <where>" + |
| | | "<if test='vaccinesByAdminDTO.communityId != null'>" + |
| | | " and cmver.community_id = #{vaccinesByAdminDTO.communityId} "+ |
| | | " </if> " + |
| | | "<if test='vaccinesByAdminDTO.vaccines != null and vaccinesByAdminDTO.vaccines != ""'>" + |
| | | " and cmv.name = #{vaccinesByAdminDTO.vaccines} "+ |
| | | " </if> " + |
| | | "<if test='vaccinesByAdminDTO.name != null and vaccinesByAdminDTO.name != ""'>" + |
| | | " and cmver.name like concat('%',#{vaccinesByAdminDTO.name},'%') "+ |
| | | " </if> " + |
| | | "<if test='vaccinesByAdminDTO.idCard != null and vaccinesByAdminDTO.idCard != ""'>" + |
| | | " and cmver.id_card = #{vaccinesByAdminDTO.idCard} "+ |
| | | " </if> " + |
| | | "<if test='vaccinesByAdminDTO.phone != null and vaccinesByAdminDTO.phone != ""'>" + |
| | | " and cmver.phone = #{vaccinesByAdminDTO.phone} "+ |
| | | " </if> " + |
| | | "<if test='vaccinesByAdminDTO.startTime != null and vaccinesByAdminDTO.startTime != "" '>\n" + |
| | | " AND cmver.create_at <![CDATA[>=]]> #{vaccinesByAdminDTO.startTime} \n" + |
| | | "</if>" + |
| | | "<if test='vaccinesByAdminDTO.endTime != null and vaccinesByAdminDTO.endTime != "" '>\n" + |
| | | " AND cmver.create_at <![CDATA[<=]]> #{vaccinesByAdminDTO.endTime} " + |
| | | " </if> \n" + |
| | | " </where>" + |
| | | " order by cmver.create_at desc"+ |
| | | " </script>") |
| | | IPage<VaccinesEnrollByAdminVO> getVaccinesEnrollListByAdmin(Page page, @Param("vaccinesByAdminDTO") VaccinesEnrollByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | @Select("<script> " + |
| | | "select cmver.name,cmver.sex,cmver.age,cmver.phone,cmver.id_card,cmver.create_at,cmv.name as vaccines from com_mng_vaccines_enroll_record as cmver " + |
| | | " left join com_mng_vaccines as cmv on cmv.id = cmver.type " + |
| | | " <where>" + |
| | | "<if test='vaccinesByAdminDTO.communityId != null'>" + |
| | | " and cmver.community_id = #{vaccinesByAdminDTO.communityId} "+ |
| | | " </if> " + |
| | | "<if test='vaccinesByAdminDTO.ids != null and vaccinesByAdminDTO.ids.size > 0'>" + |
| | | " and cmver.id in " + |
| | | "<foreach item=\"item\" collection=\"vaccinesByAdminDTO.ids\" separator=\",\" open=\"(\" close=\")\" index=\"\"> \n" + |
| | | "#{item}" + |
| | | "</foreach>" + |
| | | " </if> " + |
| | | "<if test='vaccinesByAdminDTO.vaccines != null and vaccinesByAdminDTO.vaccines != ""'>" + |
| | | " and cmv.name = #{vaccinesByAdminDTO.vaccines} "+ |
| | | " </if> " + |
| | | "<if test='vaccinesByAdminDTO.name != null and vaccinesByAdminDTO.name != ""'>" + |
| | | " and cmver.name like concat('%',#{vaccinesByAdminDTO.name},'%') "+ |
| | | " </if> " + |
| | | "<if test='vaccinesByAdminDTO.idCard != null and vaccinesByAdminDTO.idCard != ""'>" + |
| | | " and cmver.id_card = #{vaccinesByAdminDTO.idCard} "+ |
| | | " </if> " + |
| | | "<if test='vaccinesByAdminDTO.phone != null and vaccinesByAdminDTO.phone != ""'>" + |
| | | " and cmver.phone = #{vaccinesByAdminDTO.phone} "+ |
| | | " </if> " + |
| | | "<if test='vaccinesByAdminDTO.startTime != null and vaccinesByAdminDTO.startTime != "" '>\n" + |
| | | " AND cmver.create_at <![CDATA[>=]]> #{vaccinesByAdminDTO.startTime} \n" + |
| | | "</if>" + |
| | | "<if test='vaccinesByAdminDTO.endTime != null and vaccinesByAdminDTO.endTime != "" '>\n" + |
| | | " AND cmver.create_at <![CDATA[<=]]> #{vaccinesByAdminDTO.endTime} " + |
| | | " </if> \n" + |
| | | " </where>" + |
| | | " order by cmver.create_at desc"+ |
| | | " </script>") |
| | | List<ComMngVaccinesEnrollExcelVo> exportVaccinesEnrollListByAdmin(@Param("vaccinesByAdminDTO") VaccinesEnrollByAdminDTO vaccinesByAdminDTO); |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesInoculationByAdminDTO; |
| | | import com.panzhihua.common.model.vos.vaccines.ComMngVaccinesInoculationExcelVo; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesInoculationByAdminVO; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesUserInoculationByAppVO; |
| | | import com.panzhihua.service_community.model.dos.ComMngVaccinesInoculationRecordDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | " </script>") |
| | | List<VaccinesUserInoculationByAppVO> getUserInoculationListByApp(@Param("ids") List<Long> ids, @Param("userId") Long userId); |
| | | |
| | | @Select("<script> " + |
| | | "select cmvir.id,cmvir.name,cmvir.sex,cmvir.age,cmvir.phone,cmvir.id_card,cmvir.inoculation_at,cmvir.dosage " + |
| | | ",cmvir.medical_institution,cmvir.vaccines_code,cmvir.vaccines,cmvir.remark from com_mng_vaccines_inoculation_record as cmvir" + |
| | | " <where>" + |
| | | "<if test='inoculationByAdminDTO.communityId != null'>" + |
| | | " and cmvir.community_id = #{inoculationByAdminDTO.communityId} "+ |
| | | " </if> " + |
| | | "<if test='inoculationByAdminDTO.name != null and inoculationByAdminDTO.name != ""'>" + |
| | | " and cmvir.name like concat('%',#{inoculationByAdminDTO.name},'%') "+ |
| | | " </if> " + |
| | | "<if test='inoculationByAdminDTO.dosage != null and inoculationByAdminDTO.dosage != ""'>" + |
| | | " and cmvir.dosage = #{inoculationByAdminDTO.dosage} "+ |
| | | " </if> " + |
| | | "<if test='inoculationByAdminDTO.idCard != null and inoculationByAdminDTO.idCard != ""'>" + |
| | | " and cmvir.id_card = #{inoculationByAdminDTO.idCard} "+ |
| | | " </if> " + |
| | | "<if test='inoculationByAdminDTO.phone != null and inoculationByAdminDTO.phone != ""'>" + |
| | | " and cmvir.phone = #{inoculationByAdminDTO.phone} "+ |
| | | " </if> " + |
| | | "<if test='inoculationByAdminDTO.startTime != null and inoculationByAdminDTO.startTime != ""'>\n" + |
| | | " AND cmvir.inoculation_at <![CDATA[>=]]> #{inoculationByAdminDTO.startTime} \n" + |
| | | "</if>" + |
| | | "<if test='inoculationByAdminDTO.endTime != null and inoculationByAdminDTO.endTime != ""'>\n" + |
| | | " AND cmvir.inoculation_at <![CDATA[<=]]> #{inoculationByAdminDTO.endTime} " + |
| | | " </if> \n" + |
| | | " </where>" + |
| | | " order by inoculation_at desc " + |
| | | " </script>") |
| | | IPage<VaccinesInoculationByAdminVO> getVaccinesInoculationListByAdmin(Page page, @Param("inoculationByAdminDTO") VaccinesInoculationByAdminDTO inoculationByAdminDTO); |
| | | |
| | | @Select("<script> " + |
| | | "select cmvir.name,cmvir.sex,cmvir.age,cmvir.phone,cmvir.id_card,cmvir.inoculation_at,cmvir.dosage " + |
| | | ",cmvir.medical_institution,cmvir.vaccines_code,cmvir.vaccines,cmvir.remark from com_mng_vaccines_inoculation_record as cmvir" + |
| | | " <where>" + |
| | | "<if test='inoculationByAdminDTO.communityId != null'>" + |
| | | " and cmvir.community_id = #{inoculationByAdminDTO.communityId} "+ |
| | | " </if> " + |
| | | "<if test='inoculationByAdminDTO.ids != null and inoculationByAdminDTO.ids.size > 0'>" + |
| | | " and cmvir.id in " + |
| | | "<foreach item=\"item\" collection=\"inoculationByAdminDTO.ids\" separator=\",\" open=\"(\" close=\")\" index=\"\"> \n" + |
| | | "#{item}" + |
| | | "</foreach>" + |
| | | " </if> " + |
| | | "<if test='inoculationByAdminDTO.name != null and inoculationByAdminDTO.name != ""'>" + |
| | | " and cmvir.name like concat('%',#{inoculationByAdminDTO.name},'%') "+ |
| | | " </if> " + |
| | | "<if test='inoculationByAdminDTO.dosage != null and inoculationByAdminDTO.dosage != ""'>" + |
| | | " and cmvir.dosage = #{inoculationByAdminDTO.dosage} "+ |
| | | " </if> " + |
| | | "<if test='inoculationByAdminDTO.idCard != null and inoculationByAdminDTO.idCard != ""'>" + |
| | | " and cmvir.id_card = #{inoculationByAdminDTO.idCard} "+ |
| | | " </if> " + |
| | | "<if test='inoculationByAdminDTO.phone != null and inoculationByAdminDTO.phone != ""'>" + |
| | | " and cmvir.phone = #{inoculationByAdminDTO.phone} "+ |
| | | " </if> " + |
| | | "<if test='inoculationByAdminDTO.startTime != null and inoculationByAdminDTO.startTime != ""'>\n" + |
| | | " AND cmvir.inoculation_at <![CDATA[>=]]> #{inoculationByAdminDTO.startTime} \n" + |
| | | "</if>" + |
| | | "<if test='inoculationByAdminDTO.endTime != null and inoculationByAdminDTO.endTime != "" '>\n" + |
| | | " AND cmvir.inoculation_at <![CDATA[<=]]> #{inoculationByAdminDTO.endTime} " + |
| | | " </if> \n" + |
| | | " </where>" + |
| | | " order by inoculation_at desc " + |
| | | " </script>") |
| | | List<ComMngVaccinesInoculationExcelVo> exportVaccinesInoculationListByAdmin(@Param("inoculationByAdminDTO") VaccinesInoculationByAdminDTO inoculationByAdminDTO); |
| | | } |
| | |
| | | " ) t " + |
| | | " LEFT JOIN com_elders_auth ea ON t.id = ea.id " + |
| | | " LEFT JOIN sys_user u ON ea.SUMIT_USER_ID = u.user_id\n" + |
| | | " LEFT JOIN com_act ac ON u.community_id = ac.community_id\n" + |
| | | " <where> " + |
| | | |
| | | "<if test='pageEldersAuthDTO.communityId != null'>" + |
| | | " AND ac.community_id = #{pageEldersAuthDTO.communityId} " + |
| | | " </if> " + |
| | | |
| | | "<if test='pageEldersAuthDTO.sumitUserId != null'>" + |
| | | " AND ea.SUMIT_USER_ID = #{pageEldersAuthDTO.sumitUserId} " + |
| | | " </if> " + |
| | |
| | | " </if> " + |
| | | "<if test='pageEldersAuthDTO.type == 2 '>" + |
| | | "<if test='pageEldersAuthDTO.createAtStart != null'>" + |
| | | " AND ea.create_at <![CDATA[>=]]> #{pageComShopOrderSearchDTO.createAtStart} " + |
| | | " AND ea.create_at <![CDATA[>=]]> #{pageEldersAuthDTO.createAtStart} " + |
| | | " </if> " + |
| | | "<if test='pageEldersAuthDTO.createAtEnd != null'>" + |
| | | " AND ea.create_at <![CDATA[<=]]> #{pageComShopOrderSearchDTO.createAtEnd} " + |
| | | " AND ea.create_at <![CDATA[<=]]> #{pageEldersAuthDTO.createAtEnd} " + |
| | | " </if> " + |
| | | " </if> " + |
| | | " </where>" + |
| | |
| | | " LEFT JOIN com_act ac ON u.community_id = ac.community_id\n" + |
| | | " <where> " + |
| | | |
| | | "<if test='pageEldersAuthDTO.communityId != null'>" + |
| | | " AND ac.community_id = #{pageEldersAuthDTO.communityId} " + |
| | | " </if> " + |
| | | |
| | | "<if test='pageEldersAuthDTO.ids != null and pageEldersAuthDTO.ids.length>0 '>" + |
| | | " AND ea.id in " + |
| | | "<foreach collection='pageEldersAuthDTO.ids' item='id' index='index' open='(' close=')' separator=',' >\n" + |
| | |
| | | * 地址备注 |
| | | */ |
| | | private String addrRemark; |
| | | |
| | | /** |
| | | * 是否删除 0 否 1 是 |
| | | */ |
| | | private Integer delTag; |
| | | } |
| | |
| | | private Integer familyUserType; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 身份证号码 |
| | | */ |
| | | private String idCard; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女) |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 报名类型(1.小程序用户 2.小程序家庭成员) |
| | | */ |
| | | public interface familyUserType{ |
| | |
| | | */ |
| | | private Long userType; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComMngVaccinesInoculationRecordDO{" + |
| | |
| | | */ |
| | | R getVaccinesEnrollListByAdmin(VaccinesEnrollByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | /** |
| | | * 根据条件导出疫苗登记记录 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 导出登记列表 |
| | | */ |
| | | R exportVaccinesEnrollListByAdmin(VaccinesEnrollByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesInoculationByAdminDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComMngVaccinesInoculationRecordDO; |
| | | |
| | |
| | | */ |
| | | R getVaccinesUserInoculationListByApp(Long userId); |
| | | |
| | | /** |
| | | * 查询接种记录列表 |
| | | * @param inoculationByAdminDTO 请求参数 |
| | | * @return 接种记录列表 |
| | | */ |
| | | R getVaccinesInoculationListByAdmin(VaccinesInoculationByAdminDTO inoculationByAdminDTO); |
| | | |
| | | /** |
| | | * 接种记录信息导出 |
| | | * @param inoculationByAdminDTO 请求参数 |
| | | * @return 导出结果 |
| | | */ |
| | | R exportVaccinesInoculationListByAdmin(VaccinesInoculationByAdminDTO inoculationByAdminDTO); |
| | | |
| | | } |
| | |
| | | */ |
| | | R addVaccinesByAdmin(VaccinesByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | /** |
| | | * 删除疫苗分类信息 |
| | | * @param id 疫苗分类id |
| | | * @return 删除结果 |
| | | */ |
| | | R deleteVaccinesByAdmin(Long id); |
| | | |
| | | /** |
| | | * 疫苗分类列表 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | R getEnrollTypeListByAdmin(); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.ExcelElderAuthDTO; |
| | | import com.panzhihua.common.model.vos.IndexDataVO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import com.panzhihua.service_community.dao.ComActActivityDAO; |
| | | import com.panzhihua.service_community.dao.ComActDiscussOptionUserDAO; |
| | |
| | | private ComActActivityDAO comActActivityDAO; |
| | | @Resource |
| | | private ComActActSignDAO comActActSignDAO; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | Integer type = signactivityVO.getType(); |
| | | Long userId = signactivityVO.getUserId(); |
| | | Integer isVolunteer = signactivityVO.getIsVolunteer(); |
| | | |
| | | int num=0; |
| | | if (1==type) { |
| | | R<LoginUserInfoVO> userInfoR = userService.getUserInfoByUserId(String.valueOf(userId)); |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(userInfoR.getData()), LoginUserInfoVO.class); |
| | | boolean userNotVolunteer = !(loginUserInfoVO.getIsVolunteer()==1); |
| | | if(isVolunteer == 1 && userNotVolunteer){ |
| | | return R.fail("只有志愿者才能报名"); |
| | | } |
| | | |
| | | ComActActSignDO comActActSignDO=new ComActActSignDO(); |
| | | comActActSignDO.setActivityId(activityId); |
| | | comActActSignDO.setUserId(userId); |
| | |
| | | } |
| | | List<ComActDiscussCommentVO> collect1 = records.stream().filter(comActDiscussCommentVO2 -> comActDiscussCommentVO2.getId().equals(parentId)).collect(Collectors.toList()); |
| | | if (!ObjectUtils.isEmpty(collect1)) { |
| | | String userName = collect1.get(0).getUserName(); |
| | | ComActDiscussCommentVO comActDiscussCommentVOFirst = collect1.get(0); |
| | | String userName = comActDiscussCommentVOFirst.getUserName(); |
| | | String userNickName = comActDiscussCommentVOFirst.getUserNickName(); |
| | | comActDiscussCommentVO1.setUserNameBack(userName); |
| | | comActDiscussCommentVO1.setUserNickNameBack(userNickName); |
| | | } |
| | | Integer integer = comActDiscussCommentUserDAO.selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda().eq(ComActDiscussCommentUserDO::getDisscussCommentId, comActDiscussCommentVO1.getId()).eq(ComActDiscussCommentUserDO::getUserId, pageComActDiscussCommentDTO.getLoginUserId())); |
| | | if (integer>0) { |
| | |
| | | LoginUserInfoVO loginUserInfoVO=comActDiscussDAO.selectUserByUserId(userId); |
| | | comActDiscussVO.setUserName(loginUserInfoVO.getName()); |
| | | comActDiscussVO.setImageUrl(loginUserInfoVO.getImageUrl()); |
| | | comActDiscussVO.setUserNickName(loginUserInfoVO.getNickName()); |
| | | Long communityId = comActDiscussDO.getCommunityId(); |
| | | Integer type1 = loginUserInfoVO.getType(); |
| | | if (type1.intValue()>1) { |
| | |
| | | ComActNeighborCircleFabulousDO oldCircleFabulousDO = comActNeighborCircleFabulousDAO.selectOne( |
| | | new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborFabulousAppDTO.type.llq) |
| | | .eq(ComActNeighborCircleFabulousDO::getParentId,fabulousAppDTO.getServiceId()) |
| | | .eq(ComActNeighborCircleFabulousDO::getIsEffective,ComActNeighborCircleFabulousDO.isEffective.yes)); |
| | | .eq(ComActNeighborCircleFabulousDO::getIsEffective,ComActNeighborCircleFabulousDO.isEffective.yes) |
| | | .eq(ComActNeighborCircleFabulousDO::getUserId,fabulousAppDTO.getUserId())); |
| | | if(oldCircleFabulousDO != null){ |
| | | return R.fail("您已点赞"); |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessCategoryServeVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationImportErrorVO; |
| | | import com.panzhihua.service_community.dao.ComCvtBusinessAreaDAO; |
| | | import com.panzhihua.service_community.dao.ComCvtBusinessDAO; |
| | | import com.panzhihua.service_community.dao.ComCvtCategoryDAO; |
| | |
| | | @Override |
| | | public R listSaveConvenientServeExcelVO(List<ComCvtServeExcelVO> list, Long communityId) { |
| | | List<ComCvtServeDO> comCvtServeDOS = new ArrayList<>(); |
| | | List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | List<ComCvtCategoryDO> categoryDOS = comCvtCategoryDAO.selectList(new QueryWrapper<ComCvtCategoryDO>().lambda().orderByDesc(ComCvtCategoryDO::getWeight)); |
| | | Map<String, Long> categoryMap = getCategoryMap(categoryDOS); |
| | | List<ComCvtBusinessDO> comCvtBusinessDOS; |
| | |
| | | comCvtBusinessDOS = comCvtBusinessDAO.selectList(new LambdaQueryWrapper<>()); |
| | | } |
| | | Map<String, Long> businessMap = getBusinessMap(comCvtBusinessDOS); |
| | | list.forEach(comCvtServeExcelVO -> { |
| | | int index = 2; |
| | | for (ComCvtServeExcelVO comCvtServeExcelVO:list) { |
| | | |
| | | /** |
| | | * 便民服务分类存在 并且 便民服务商家 匹配上 |
| | | */ |
| | |
| | | if(!checkRepeat(comCvtServeDO)){ |
| | | comCvtServeDOS.add(comCvtServeDO); |
| | | }else{ |
| | | ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | importErrorVO.setErrorMsg(String.format("导入失败:商家【%s】下已有服务【%s】",comCvtServeExcelVO.getBusinessName(),comCvtServeExcelVO.getServiceName())); |
| | | importErrorVO.setErrorPosition("第" + index + "行"); |
| | | populationImportErrorVOList.add(importErrorVO); |
| | | log.error(String.format("导入失败:商家【%s】下已有服务【%s】",comCvtServeExcelVO.getBusinessName(),comCvtServeExcelVO.getServiceName())); |
| | | } |
| | | }else{ |
| | | if(!categoryMap.containsKey(comCvtServeExcelVO.getCategoryName())) { |
| | | ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | importErrorVO.setErrorMsg("导入失败: 服务分类" + comCvtServeExcelVO.getCategoryName() +"不存在"); |
| | | importErrorVO.setErrorPosition("第" + index + "行,第1列"); |
| | | populationImportErrorVOList.add(importErrorVO); |
| | | // errorInfo.add(comCvtServeExcelVO.getCategoryName() +"导入失败: 服务分类不存在"); |
| | | } |
| | | if(!businessMap.containsKey(comCvtServeExcelVO.getBusinessName())) { |
| | | ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | importErrorVO.setErrorMsg("导入失败: 便民服务商家" + comCvtServeExcelVO.getBusinessName() +"不存在"); |
| | | importErrorVO.setErrorPosition("第" + index + "行,第5列"); |
| | | populationImportErrorVOList.add(importErrorVO); |
| | | } |
| | | } |
| | | }); |
| | | this.saveBatch(comCvtServeDOS); |
| | | index++; |
| | | } |
| | | boolean saveBatched = this.saveBatch(comCvtServeDOS); |
| | | if(saveBatched) { |
| | | if (comCvtServeDOS.size()>0 && populationImportErrorVOList.size() > 0) { |
| | | return R.fail(JSON.toJSONString(populationImportErrorVOList)); |
| | | } |
| | | if(comCvtServeDOS.size()==0 && populationImportErrorVOList.size() > 0){ |
| | | return R.fail(JSON.toJSONString(populationImportErrorVOList)); |
| | | } |
| | | }else { |
| | | return R.fail(JSON.toJSONString(populationImportErrorVOList)); |
| | | } |
| | | return R.ok("共计导入服务数量:"+comCvtServeDOS.size()); |
| | | } |
| | | |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.vaccines.EnrollUserByAppDTO; |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesEnrollByAdminVO; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesEnrollUserByAppVO; |
| | | import com.panzhihua.common.utlis.AgeUtils; |
| | | import com.panzhihua.common.utlis.IdCard; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComMngVaccinesDAO; |
| | | import com.panzhihua.service_community.dao.ComMngVaccinesEnrollRecordDAO; |
| | | import com.panzhihua.service_community.model.dos.ComMngVaccinesDO; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | if(user.getIsUser() == null){ |
| | | user.setIsUser(2); |
| | | } |
| | | if(StringUtils.isEmpty(user.getJob())){ |
| | | user.setJob("暂无"); |
| | | } |
| | | //查询当前用户是否已经报名 |
| | | ComMngVaccinesEnrollRecordDO enrollRecordDO = this.baseMapper.selectOne(new QueryWrapper<ComMngVaccinesEnrollRecordDO>() |
| | | .lambda().eq(ComMngVaccinesEnrollRecordDO::getFamilyUserId,user.getUserId()).eq(ComMngVaccinesEnrollRecordDO::getType,enrollUserByAppDTO.getVaccinesId())); |
| | | .lambda().eq(ComMngVaccinesEnrollRecordDO::getFamilyUserId,user.getUserId()) |
| | | .eq(ComMngVaccinesEnrollRecordDO::getType,enrollUserByAppDTO.getVaccinesId()) |
| | | .eq(ComMngVaccinesEnrollRecordDO::getFamilyUserType,user.getIsUser())); |
| | | if(enrollRecordDO != null){ |
| | | user.setIsEnroll(VaccinesEnrollUserByAppVO.isEnroll.yes); |
| | | }else{ |
| | | user.setIsEnroll(VaccinesEnrollUserByAppVO.isEnroll.no); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | return R.ok(userLists); |
| | | |
| | | List<VaccinesEnrollUserByAppVO> newUserLists = userLists.stream().sorted(Comparator.comparing(VaccinesEnrollUserByAppVO::getIsEnroll).reversed() |
| | | .thenComparing(Comparator.comparing(VaccinesEnrollUserByAppVO::getCreateAt).reversed())).collect(Collectors.toList()); |
| | | return R.ok(newUserLists); |
| | | } |
| | | |
| | | /** |
| | |
| | | //报名疫苗填充对象 |
| | | ComMngVaccinesEnrollRecordDO vaccinesEnrollRecordDO = new ComMngVaccinesEnrollRecordDO(); |
| | | if(userByAppDTO.getIsUser().equals(EnrollUserByAppDTO.isUser.yes)){ |
| | | //如果是自己就查询自己的信息 |
| | | VaccinesEnrollUserByAppVO enrollUserByAppVO = this.baseMapper.getSysUser(enrollByAppDTO.getUserId()); |
| | | if(enrollUserByAppVO != null){ |
| | | vaccinesEnrollRecordDO.setName(enrollUserByAppVO.getName()); |
| | | vaccinesEnrollRecordDO.setIdCard(enrollUserByAppVO.getIdCard()); |
| | | vaccinesEnrollRecordDO.setAge(enrollUserByAppVO.getAge()); |
| | | vaccinesEnrollRecordDO.setPhone(enrollUserByAppVO.getPhone()); |
| | | vaccinesEnrollRecordDO.setSex(IdCard.sex(enrollUserByAppVO.getIdCard())); |
| | | } |
| | | vaccinesEnrollRecordDO.setFamilyUserType(ComMngVaccinesEnrollRecordDO.familyUserType.mini); |
| | | }else{ |
| | | VaccinesEnrollUserByAppVO enrollUserByAppVO = this.baseMapper.getFamilyUser(userByAppDTO.getUserId()); |
| | | if(enrollUserByAppVO != null){ |
| | | vaccinesEnrollRecordDO.setName(enrollUserByAppVO.getName()); |
| | | vaccinesEnrollRecordDO.setIdCard(enrollUserByAppVO.getIdCard()); |
| | | vaccinesEnrollRecordDO.setAge(enrollUserByAppVO.getAge()); |
| | | vaccinesEnrollRecordDO.setPhone(enrollUserByAppVO.getPhone()); |
| | | vaccinesEnrollRecordDO.setSex(IdCard.sex(enrollUserByAppVO.getIdCard())); |
| | | } |
| | | } |
| | | vaccinesEnrollRecordDO.setUserId(enrollByAppDTO.getUserId()); |
| | | vaccinesEnrollRecordDO.setFamilyUserId(userByAppDTO.getUserId()); |
| | | vaccinesEnrollRecordDO.setType(enrollByAppDTO.getVaccinesId()); |
| | | vaccinesEnrollRecordDO.setCommunityId(enrollByAppDTO.getCommunityId()); |
| | | vaccinesEnrollRecordDOList.add(vaccinesEnrollRecordDO); |
| | | } |
| | | } |
| | |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 登记列表 |
| | | */ |
| | | @Override |
| | | public R getVaccinesEnrollListByAdmin(VaccinesEnrollByAdminDTO vaccinesByAdminDTO){ |
| | | return R.ok(this.baseMapper.getVaccinesEnrollListByAdmin(new Page<VaccinesEnrollByAdminVO>(vaccinesByAdminDTO.getPageNum(),vaccinesByAdminDTO.getPageSize()),vaccinesByAdminDTO)); |
| | | IPage<VaccinesEnrollByAdminVO> enrollByAdminVOIPage = this.baseMapper.getVaccinesEnrollListByAdmin(new Page<VaccinesEnrollByAdminVO>(vaccinesByAdminDTO.getPageNum(),vaccinesByAdminDTO.getPageSize()),vaccinesByAdminDTO); |
| | | if(!enrollByAdminVOIPage.getRecords().isEmpty()){ |
| | | for (VaccinesEnrollByAdminVO enroll:enrollByAdminVOIPage.getRecords()) { |
| | | if(enroll.getIdCard().length() != 18){ |
| | | enroll.setSex(3); |
| | | }else{ |
| | | enroll.setSex(IdCard.sex(enroll.getIdCard())); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(enrollByAdminVOIPage); |
| | | } |
| | | |
| | | /** |
| | | * 根据条件导出疫苗登记记录 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 导出登记列表 |
| | | */ |
| | | @Override |
| | | public R exportVaccinesEnrollListByAdmin(VaccinesEnrollByAdminDTO vaccinesByAdminDTO){ |
| | | return R.ok(this.baseMapper.exportVaccinesEnrollListByAdmin(vaccinesByAdminDTO)); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesInoculationByAdminDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesEnrollUserByAppVO; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesUserInoculationByAppVO; |
| | |
| | | return R.ok(this.baseMapper.getUserInoculationListByApp(userIds,userId)); |
| | | } |
| | | |
| | | /** |
| | | * 查询接种记录列表 |
| | | * @param inoculationByAdminDTO 请求参数 |
| | | * @return 接种记录列表 |
| | | */ |
| | | @Override |
| | | public R getVaccinesInoculationListByAdmin(VaccinesInoculationByAdminDTO inoculationByAdminDTO){ |
| | | return R.ok(this.baseMapper.getVaccinesInoculationListByAdmin(new Page(inoculationByAdminDTO.getPageNum(),inoculationByAdminDTO.getPageSize()),inoculationByAdminDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 接种记录信息导出 |
| | | * @param inoculationByAdminDTO 请求参数 |
| | | * @return 导出结果 |
| | | */ |
| | | @Override |
| | | public R exportVaccinesInoculationListByAdmin(VaccinesInoculationByAdminDTO inoculationByAdminDTO){ |
| | | return R.ok(this.baseMapper.exportVaccinesInoculationListByAdmin(inoculationByAdminDTO)); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除疫苗分类信息 |
| | | * @param id 疫苗分类id |
| | | * @return 删除结果 |
| | | */ |
| | | @Override |
| | | public R deleteVaccinesByAdmin(Long id){ |
| | | ComMngVaccinesDO vaccinesDO = this.baseMapper.selectById(id); |
| | | if(vaccinesDO == null){ |
| | | return R.fail("未找到疫苗分类记录"); |
| | | } |
| | | |
| | | if(this.baseMapper.deleteById(id) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 疫苗分类列表 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | public R getEnrollTypeListByAdmin(){ |
| | | List<ComMngVaccinesDO> vaccinesDOList = this.baseMapper.selectList(new QueryWrapper<ComMngVaccinesDO>() |
| | | .lambda().eq(ComMngVaccinesDO::getStatus,1)); |
| | | return R.ok(vaccinesDOList); |
| | | } |
| | | |
| | | } |
| | |
| | | public R addHouse(ComOpsHouseDTO comOpsHouseDTO) { |
| | | ComOpsHouseDO comOpsHouseDO=new ComOpsHouseDO(); |
| | | BeanUtils.copyProperties(comOpsHouseDTO,comOpsHouseDO); |
| | | comOpsHouseDAO.insert(comOpsHouseDO); |
| | | return R.ok(); |
| | | int inserted = comOpsHouseDAO.insert(comOpsHouseDO); |
| | | return inserted==1?R.ok():R.fail(); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.panzhihua.service_dangjian.api; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.constants.UserConstants; |
| | | import com.panzhihua.common.exceptions.PartyBuildingMemberException; |
| | | import com.panzhihua.common.model.dtos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | comPbActivityMemberDO.setMemberId(comPbMemberDOId); |
| | | comPbActivityMemberDO.setActivityId(comPbActivityDO1Id); |
| | | comPbActivityMemberDO.setCreateAt(new Date()); |
| | | comPbActivityMemberDO.setUserId(comPbActivityDTO.getCreateBy()); |
| | | comPbActivityMemberDO.setName(comPbMemberDO.getName()); |
| | | comPbActivityMemberDO.setPhotoPath(comPbMemberDO.getPhotoPath()); |
| | | comPbActivityMemberDAO.insert(comPbActivityMemberDO); |
| | | return R.ok(); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.RichTextUtil; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.service_dangjian.dao.*; |
| | |
| | | */ |
| | | @Override |
| | | public R deletePartyCommittee(PartyCommitteeVO partyCommitteeVO) { |
| | | ComPbMemberRoleDO comPbMemberRoleDO = comPbMemberRoleDAO.selectById(partyCommitteeVO.getId()); |
| | | if(comPbMemberRoleDO==null){ |
| | | return R.fail("记录不存在"); |
| | | } |
| | | int delete = comPbMemberRoleDAO.deleteById(partyCommitteeVO.getId()); |
| | | if (delete>0) { |
| | | return R.ok(); |
| | | SysUserVO sysUserVO = comPbMemberRoleDAO.getSysUserByPhone(comPbMemberRoleDO.getPhone()); |
| | | //删除用户信息缓存 |
| | | if(sysUserVO!=null) { |
| | | Long userId = sysUserVO.getUserId(); |
| | | String userKey = UserConstants.LOGIN_USER_INFO + userId; |
| | | stringRedisTemplate.delete(userKey); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail(); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.constants.UserConstants; |
| | | import com.panzhihua.common.model.dtos.partybuilding.ComPbServiceTeamDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.PageComPbServiceTeamDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | import com.panzhihua.service_dangjian.service.ComPbServiceTeamService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | |
| | | private ComPbServiceTeamDAO comPbServiceTeamDAO; |
| | | @Resource |
| | | private ComPbMemberRoleDAO comPbMemberRoleDAO; |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | /** |
| | | * 新增服务团队人员 |
| | | * |
| | |
| | | */ |
| | | @Override |
| | | public R deleteServiceTeam(ComPbServiceTeamDTO comPbServiceTeamDTO) { |
| | | ComPbServiceTeamDO comPbServiceTeamDO = comPbServiceTeamDAO.selectComPbServiceTeamById(comPbServiceTeamDTO.getId()); |
| | | if(comPbServiceTeamDO==null){ |
| | | return R.fail("记录不存在"); |
| | | } |
| | | int delete = comPbServiceTeamDAO.deleteById(comPbServiceTeamDTO.getId()); |
| | | if (delete>0) { |
| | | |
| | | SysUserVO sysUserVO = comPbMemberRoleDAO.getSysUserByPhone(comPbServiceTeamDO.getPhone()); |
| | | //删除用户信息缓存 |
| | | if(sysUserVO!=null) { |
| | | Long userId = sysUserVO.getUserId(); |
| | | String userKey = UserConstants.LOGIN_USER_INFO + userId; |
| | | stringRedisTemplate.delete(userKey); |
| | | return R.ok(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | "<if test='loginUserInfoVO.phone != null and loginUserInfoVO.phone.trim() != ""'>" + |
| | | "AND u.phone like concat(#{loginUserInfoVO.phone},'%') " + |
| | | " </if> " + |
| | | " order by u.user_id desc " + |
| | | "</script>") |
| | | IPage<LoginUserInfoVO> pageUser(Page page, @Param("loginUserInfoVO") LoginUserInfoVO loginUserInfoVO); |
| | | |
| | |
| | | @Override |
| | | public R listFamily(Long userId,Long pageNum, Long pageSize) { |
| | | List<ComMngFamilyInfoVO> comMngFamilyInfoVOS = new ArrayList<>(); |
| | | LambdaQueryWrapper<ComMngFamilyInfoDO> query = new QueryWrapper<ComMngFamilyInfoDO>().lambda().eq(ComMngFamilyInfoDO::getUserId, userId); |
| | | LambdaQueryWrapper<ComMngFamilyInfoDO> query = new QueryWrapper<ComMngFamilyInfoDO>().lambda().eq(ComMngFamilyInfoDO::getUserId, userId).orderByDesc(ComMngFamilyInfoDO::getCreateAt); |
| | | IPage<ComMngFamilyInfoDO> pageData = comMngFamilyInfoDAO.selectPage(new Page<>(pageNum,pageSize), query); |
| | | if (!ObjectUtils.isEmpty(pageData.getRecords())) { |
| | | pageData.getRecords().forEach(comMngFamilyInfoDO -> { |