Merge branch 'test' into 'lyq'
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.panzhihua.common.model.vos.IPageVO; |
| | | |
| | | import javax.annotation.Resource; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthVO; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/eldersauth") |
| | | @Api(tags = {"高龄认证"}) |
| | | public class EldersAuthApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService eldersAuthService; |
| | | |
| | | /** |
| | | * 分页查找 |
| | | * @param pageEldersAuthDTO 查找高龄认证传递对象 |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("/page") |
| | | @ApiOperation(value = "查询高龄认证", response = EldersAuthVO.class) |
| | | R query(@Validated @RequestBody PageEldersAuthDTO pageEldersAuthDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(pageEldersAuthDTO); |
| | | pageEldersAuthDTO.setSumitUserId(this.getUserId()); |
| | | return eldersAuthService.query(pageEldersAuthDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询高龄认证详细信息 |
| | | * @param id 高龄认证 id |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "查询高龄认证详细信息", response = EldersAuthDetailsVO.class) |
| | | R<EldersAuthDetailsVO> details(@PathVariable("id") Long id){ |
| | | return eldersAuthService.eldersAuthDetails(id); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/family") |
| | | @ApiOperation(value = "我的家庭成员", response = R.class) |
| | | R<IPageVO<ComMngFamilyInfoVO>> family(){ |
| | | return eldersAuthService.getMyfamilyElders(getUserId()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增高龄认证 |
| | | * @param {classNameFirstLower}AddDTO 添加高龄认证传递对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/addByFamily") |
| | | @ApiOperation(value = "通过家庭成员新增高龄认证", response = R.class) |
| | | R addByFamily(@RequestBody EldersAuthAddByFamilyDTO eldersAuthAddByFamilyDTO){ |
| | | eldersAuthAddByFamilyDTO.setSumitUserId(getUserId()); |
| | | eldersAuthAddByFamilyDTO.setUserId(getUserId()); |
| | | return eldersAuthService.addByFamilyUser(eldersAuthAddByFamilyDTO); |
| | | } |
| | | } |
| | |
| | | if (null == id || 0 == id) { |
| | | return R.fail("心愿主键不能为空"); |
| | | } |
| | | String evaluate = comActMicroWishVO.getEvaluate(); |
| | | if (ObjectUtils.isEmpty(evaluate)) { |
| | | return R.fail("用户评价不能为空"); |
| | | } |
| | | Integer score = comActMicroWishVO.getScore(); |
| | | if (null == score || 0 == score) { |
| | | return R.fail("评分不能为空"); |
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollByAppDTO; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollUserByAppDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesByAppVO; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesEnrollUserByAppVO; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesUserInoculationByAppVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | 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 javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:25:49 |
| | | * @describe 疫苗服务API |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/vaccines/") |
| | | @Api(tags = {"疫苗服务"}) |
| | | public class VaccinesApi extends BaseController{ |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "疫苗分类列表" , response = VaccinesByAppVO.class) |
| | | @PostMapping("list") |
| | | public R getVaccinesListByApp() { |
| | | return communityService.getVaccinesListByApp(); |
| | | } |
| | | |
| | | @ApiOperation(value = "疫苗类型对应家庭成员接种列表" , response = VaccinesEnrollUserByAppVO.class) |
| | | @PostMapping("user/list") |
| | | public R getVaccinesUserListByApp(@RequestBody VaccinesEnrollUserByAppDTO enrollUserByAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | enrollUserByAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.getVaccinesUserListByApp(enrollUserByAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户疫苗报名") |
| | | @PostMapping("enroll") |
| | | public R VaccinesEnrollByApp(@RequestBody VaccinesEnrollByAppDTO enrollByAppDTO){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | enrollByAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | enrollByAppDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.VaccinesEnrollByApp(enrollByAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户家庭接种记录" , response = VaccinesUserInoculationByAppVO.class) |
| | | @PostMapping("user/inoculation/list") |
| | | public R getVaccinesUserInoculationListByApp() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | return communityService.getVaccinesUserInoculationListByApp(loginUserInfo.getUserId()); |
| | | } |
| | | |
| | | } |
| | |
| | | if (null==jumpId||0==jumpId.intValue()) { |
| | | return R.fail("跳转内容不能为空"); |
| | | } |
| | | comOpsAdvDTO.setJumpUrl(null); |
| | | } else { |
| | | String jumpUrl = comOpsAdvDTO.getJumpUrl(); |
| | | if (ObjectUtils.isEmpty(jumpUrl)) { |
| | |
| | | if (null==jumpId||0==jumpId.intValue()) { |
| | | return R.fail("跳转内容不能为空"); |
| | | } |
| | | comOpsAdvDTO.setJumpUrl(null); |
| | | } else { |
| | | String jumpUrl = comOpsAdvDTO.getJumpUrl(); |
| | | if (ObjectUtils.isEmpty(jumpUrl)) { |
| | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | return R.fail(e.getMessage()); |
| | | } |
| | | return R.ok(); |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesByAdminDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesByAppVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/vaccines/") |
| | | @Api(tags = {"疫苗服务"}) |
| | | public class VaccinesApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "疫苗分类列表" , response = VaccinesByAppVO.class) |
| | | @PostMapping("list") |
| | | public R getVaccinesListByAdmin(@RequestBody VaccinesByAdminDTO vaccinesByAdminDTO) { |
| | | return communityService.getVaccinesListByAdmin(vaccinesByAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑疫苗信息") |
| | | @PostMapping("edit") |
| | | public R editVaccinesByAdmin(@RequestBody VaccinesByAdminDTO vaccinesByAdminDTO) { |
| | | return communityService.editVaccinesByAdmin(vaccinesByAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加疫苗信息") |
| | | @PostMapping("add") |
| | | public R addVaccinesByAdmin(@RequestBody VaccinesByAdminDTO vaccinesByAdminDTO) { |
| | | return communityService.addVaccinesByAdmin(vaccinesByAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除疫苗信息") |
| | | @PostMapping("delete") |
| | | public R deleteVaccinesByAdmin(@RequestParam("id") Long id) { |
| | | return communityService.deleteVaccinesByAdmin(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.auth.api; |
| | | |
| | | import com.panzhihua.auth.model.dos.LoginBody; |
| | | import com.panzhihua.auth.service.LoginService; |
| | | import com.panzhihua.common.exceptions.TokenException; |
| | | import com.panzhihua.common.exceptions.UnAuthenticationException; |
| | |
| | | import com.panzhihua.common.utlis.JWTTokenUtil; |
| | | import io.jsonwebtoken.Claims; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | loginService.logoutApplets(token); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 运营后台登录 |
| | | * @param account 账户 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginAppletsBackStage") |
| | | public R loginAppletsBackStage(@RequestParam("account") String account, @RequestParam("password")String password){ |
| | | LoginReturnVO loginReturnVO =loginService.loginAppletsBackStage(account,password); |
| | | public R loginAppletsBackStage(@RequestParam("account") String account, @RequestParam("password") String password) { |
| | | LoginReturnVO loginReturnVO = loginService.loginAppletsBackStage(account, password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 大数据统计平台(区、街道、社区三层登陆接口) |
| | | * |
| | | * @param loginBody 账户 |
| | | * @return 登录结果 |
| | | * @author manailin |
| | | * @date 2021-5-13 10:56 |
| | | */ |
| | | @PostMapping("/loginBigDataBackStage") |
| | | public R loginBigDataBackStage(@RequestBody LoginBody loginBody) { |
| | | String account = loginBody.getAccount(); |
| | | String password = loginBody.getPassword(); |
| | | if (ObjectUtils.isEmpty(account) || ObjectUtils.isEmpty(password)) { |
| | | return R.fail("账户密码不能为空"); |
| | | } |
| | | LoginReturnVO loginReturnVO = loginService.loginBigDataBackStage(account, password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台登录 |
| | | * @param account 账户 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginCommunityBackage") |
| | | public R loginCommunityBackage(@RequestParam("account") String account, @RequestParam("password")String password){ |
| | | LoginReturnVO loginReturnVO =loginService.loginCommunityBackage(account,password); |
| | | public R loginCommunityBackage(@RequestParam("account") String account, @RequestParam("password") String password) { |
| | | LoginReturnVO loginReturnVO = loginService.loginCommunityBackage(account, password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 认证中心刷新token |
| | | * |
| | | * @param refreshToken 用户端保存的刷新token |
| | | * @return 新的token 和刷新token |
| | | */ |
| | | @PostMapping("/refreshToken") |
| | | public R refreshToken(@RequestParam("refreshToken")String refreshToken){ |
| | | public R refreshToken(@RequestParam("refreshToken") String refreshToken) { |
| | | Boolean expired = JWTTokenUtil.isTokenExpired(refreshToken); |
| | | if (expired) { |
| | | throw new TokenException("刷新token已过期"); |
| | |
| | | throw new TokenException("刷新token校验失败"); |
| | | } |
| | | String subject = claims.getSubject(); |
| | | Integer type = (Integer)claims.get("type"); |
| | | Integer type = (Integer) claims.get("type"); |
| | | boolean empty1 = ObjectUtils.isEmpty(subject); |
| | | boolean empty2 = ObjectUtils.isEmpty(type); |
| | | if (empty1||empty2) { |
| | | if (empty1 || empty2) { |
| | | throw new TokenException("刷新token校验失败"); |
| | | } |
| | | LoginUserInfoVO loginUserInfoVO=new LoginUserInfoVO(); |
| | | LoginUserInfoVO loginUserInfoVO = new LoginUserInfoVO(); |
| | | loginUserInfoVO.setUserId(Long.valueOf(subject)); |
| | | loginUserInfoVO.setType(type); |
| | | String token = JWTTokenUtil.generateToken(loginUserInfoVO); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUserInfoVO); |
| | | LoginReturnVO loginReturnVO=new LoginReturnVO(); |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return R.ok(loginReturnVO); |
| | |
| | | |
| | | /** |
| | | * 商家后台登录 |
| | | * @param account 账户 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginShopBackStage") |
| | | public R loginShopBackStage(@RequestParam("account") String account, @RequestParam("password")String password){ |
| | | LoginReturnVO loginReturnVO =loginService.loginShopBackStage(account,password); |
| | | public R loginShopBackStage(@RequestParam("account") String account, @RequestParam("password") String password) { |
| | | LoginReturnVO loginReturnVO = loginService.loginShopBackStage(account, password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.auth.model.dos; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | /** |
| | | * 大数据统计平台(区、街道、社区三层登陆接口) |
| | | * @author manailin |
| | | * @date 2021-5-13 10:56 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "管理后台登录") |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class LoginBody { |
| | | |
| | | @ApiModelProperty(value = "登录账户") |
| | | private String account; |
| | | @ApiModelProperty(value = "登录密码") |
| | | private String password; |
| | | } |
| | |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginShopBackStage(String account, String password); |
| | | /** |
| | | * 大数据统计平台(区、街道、社区三层登陆接口) |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @author manailin |
| | | * @return 登录结果 |
| | | * @date 2021-5-13 10:56 |
| | | */ |
| | | LoginReturnVO loginBigDataBackStage(String account, String password); |
| | | } |
| | |
| | | return loginReturnVO; |
| | | } |
| | | |
| | | /** |
| | | * 大数据统计平台(区、街道、社区三层登陆接口) |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @author manailin |
| | | * @return 登录结果 |
| | | * @date 2021-5-13 10:56 |
| | | */ |
| | | @Override |
| | | public LoginReturnVO loginBigDataBackStage(String account, String password) { |
| | | Authentication authentication = null; |
| | | authentication = authenticationManager |
| | | .authenticate(new UsernamePasswordAuthenticationToken(account+"_8", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO) authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnVO loginReturnVO=new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.excel.exception.ExcelDataConvertException; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | } |
| | | |
| | | |
| | | private static final int BATCH_COUNT = 100; |
| | | private static final int BATCH_COUNT = 5000; |
| | | private List<ComCvtServeExcelVO> list = new ArrayList<>(); |
| | | |
| | | @Override |
| | |
| | | throw new ServiceException(r.getMsg()); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 在转换异常 |
| | | * @param exception |
| | | * @param context |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void onException(Exception exception, AnalysisContext context) throws ServiceException { |
| | | log.error("抛出异常:{}", exception.getMessage()); |
| | | if (exception instanceof ExcelDataConvertException) { |
| | | ExcelDataConvertException excelDataConvertException = (ExcelDataConvertException)exception; |
| | | log.error("第{}行,第{}列解析异常,数据为:{}", excelDataConvertException.getRowIndex(), |
| | | excelDataConvertException.getColumnIndex(), excelDataConvertException.getCellData()); |
| | | }else{ |
| | | throw new ServiceException(exception.getMessage()); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * 创建表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("创建高龄认证请求参数") |
| | | public class EldersAuthAddByFamilyDTO { |
| | | |
| | | @NotBlank() |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "家庭成员ID", hidden = false, example = "1", required = true) |
| | | private Long familyUserId; |
| | | |
| | | @Length(max=1024) @NotBlank() |
| | | @ApiModelProperty(value = "视频地址", hidden = false, example = "") |
| | | private String videoUrl; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "提交人", hidden = true, example = "1") |
| | | private Long sumitUserId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "用户ID", hidden = true, example = "") |
| | | private Long userId; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | import org.hibernate.validator.constraints.Length; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 创建表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("创建高龄认证请求参数") |
| | | public class EldersAuthAddDTO { |
| | | |
| | | @NotBlank() @Length(max=18) |
| | | @ApiModelProperty(value = "身份证", hidden = false, example = "") |
| | | private String idCard; |
| | | |
| | | @Length(max=32) @NotBlank() |
| | | @ApiModelProperty(value = "认证人姓名", hidden = false, example = "") |
| | | private String authUserName; |
| | | |
| | | @Length(max=1024) @NotBlank() |
| | | @ApiModelProperty(value = "视频地址", hidden = false, example = "") |
| | | private String videoUrl; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "提交人", hidden = true, example = "1") |
| | | private Long sumitUserId; |
| | | |
| | | @Length(max=1024) |
| | | @ApiModelProperty(value = "户籍地", hidden = false, example = "") |
| | | private String domicile; |
| | | |
| | | @Length(max=1) |
| | | @ApiModelProperty(value = "状态", hidden = false, example = "") |
| | | private String status; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "出生日期", hidden = false, example = "2021-05-01 18:05:50") |
| | | private Date birthDay; |
| | | |
| | | @ApiModelProperty(value = "用户ID", hidden = true, example = "") |
| | | private Long userId; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 删除表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("删除高龄认证请求参数") |
| | | public class EldersAuthDeleteDTO { |
| | | |
| | | @ApiModelProperty(value = "ID", hidden = false, example = "1") |
| | | private Long id; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 编辑表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("编辑高龄认证请求参数") |
| | | public class EldersAuthEditDTO { |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "ID", hidden = false, example = "1") |
| | | private Long id; |
| | | |
| | | @NotBlank() @Length(max=18) |
| | | @ApiModelProperty(value = "身份证", hidden = false, example = "") |
| | | private String idCard; |
| | | |
| | | @Length(max=32) |
| | | @ApiModelProperty(value = "认证人姓名", hidden = false, example = "") |
| | | private String authUserName; |
| | | |
| | | @Length(max=1024) |
| | | @ApiModelProperty(value = "视频地址", hidden = false, example = "") |
| | | private String videoUrl; |
| | | |
| | | @NotNull() @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "提交人", hidden = false, example = "1") |
| | | private Long sumitUserId; |
| | | |
| | | @Length(max=1024) |
| | | @ApiModelProperty(value = "户籍地", hidden = false, example = "") |
| | | private String domicile; |
| | | |
| | | @Length(max=1) |
| | | @ApiModelProperty(value = "状态", hidden = false, example = "") |
| | | private String status; |
| | | |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "出生日期", hidden = false, example = "2021-05-01 18:05:50") |
| | | private Date birthDay; |
| | | |
| | | @ApiModelProperty(value = "用户ID", hidden = true, example = "") |
| | | private Long userId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | import org.hibernate.validator.constraints.Length; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 创建表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("创建高龄认证社区反馈请求参数") |
| | | public class EldersAuthFeedbackAddDTO { |
| | | |
| | | @NotNull() @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "认证ID", hidden = false, example = "1", required = true) |
| | | private Long authId; |
| | | |
| | | @Length(max=1024) |
| | | @ApiModelProperty(value = "反馈结果", hidden = false, example = "") |
| | | private String feedBack; |
| | | |
| | | @ApiModelProperty(value = "用户ID", hidden = true, example = "") |
| | | private Long userId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 删除表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("删除高龄认证社区反馈请求参数") |
| | | public class EldersAuthFeedbackDeleteDTO { |
| | | |
| | | @ApiModelProperty(value = "ID", hidden = false, example = "1") |
| | | private Long id; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 编辑表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("编辑高龄认证社区反馈请求参数") |
| | | public class EldersAuthFeedbackEditDTO { |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "ID", hidden = false, example = "1") |
| | | private Long id; |
| | | |
| | | @NotNull() @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "认证ID", hidden = false, example = "1") |
| | | private Long authId; |
| | | |
| | | @Length(max=1024) |
| | | @ApiModelProperty(value = "反馈结果", hidden = false, example = "") |
| | | private String feedBack; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.format.NumberFormat; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description: 商城订单导出 |
| | | * @author: cedoo |
| | | * @date: 2021-4-18 16:13:21 |
| | | */ |
| | | @Data |
| | | public class ExcelElderAuthDTO { |
| | | |
| | | @ExcelProperty("*序号") |
| | | private Integer seq; |
| | | |
| | | @ExcelProperty("*项目名称") |
| | | private String subsidy; |
| | | |
| | | @ExcelProperty("*发放批次") |
| | | private String batch; |
| | | |
| | | @ExcelProperty("*姓名") |
| | | private String name; |
| | | |
| | | @ExcelProperty("*身份证号") |
| | | private String idCard; |
| | | |
| | | @ExcelProperty("*人员类别") |
| | | private String type; |
| | | |
| | | @ExcelProperty("*应付年月") |
| | | private String yearMonth; |
| | | |
| | | @ExcelProperty("*发放金额(元)") |
| | | private String payCount; |
| | | |
| | | @ExcelProperty("联系电话(到账信息提醒)") |
| | | private String telphone; |
| | | |
| | | @ExcelProperty("*所属村(社区)") |
| | | private String communityName; |
| | | |
| | | @ExcelProperty("所属组") |
| | | private String group; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.Pattern; |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 分页查询表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("查询高龄认证请求参数") |
| | | public class PageEldersAuthDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数,默认1", example = "1", required = true) |
| | | @NotNull |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数,默认10", example = "10", required = true) |
| | | @NotNull |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "排序字段, 默认createAt", hidden = true, example = "createAt") |
| | | private String sortBy="create_at"; |
| | | |
| | | @ApiModelProperty(value = "排序方式: asc/desc(默认)", hidden = true, example = "desc") |
| | | @Pattern(regexp = "asc|desc|ASC|DESC") |
| | | private String order="desc"; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "ID", hidden = false, example = "1") |
| | | private Long id; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "创建人", hidden = false, example = "1") |
| | | private Long createBy; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "创建时间", hidden = false, example = "2021-05-01 18:05:50") |
| | | private Date createAt; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "更新人", hidden = false, example = "1") |
| | | private Long updateBy; |
| | | |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "更新时间", hidden = false, example = "2021-05-01 18:05:50") |
| | | private Date updateAt; |
| | | |
| | | @Length(max=18) |
| | | @ApiModelProperty(value = "身份证", hidden = false, example = "") |
| | | private String idCard; |
| | | |
| | | @Length(max=32) |
| | | @ApiModelProperty(value = "认证人姓名", hidden = false, example = "") |
| | | private String authUserName; |
| | | |
| | | @Length(max=1024) |
| | | @ApiModelProperty(value = "视频地址", hidden = false, example = "") |
| | | private String videoUrl; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "提交人", hidden = false, example = "1") |
| | | private Long sumitUserId; |
| | | |
| | | @Length(max=1024) |
| | | @ApiModelProperty(value = "户籍地", hidden = false, example = "") |
| | | private String domicile; |
| | | |
| | | @Length(max=1) |
| | | @ApiModelProperty(value = "状态", hidden = false, example = "") |
| | | private String status; |
| | | |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "出生日期", hidden = false, example = "2021-05-01 18:05:50") |
| | | private Date birthDay; |
| | | |
| | | @ApiModelProperty(value = "导出的ID", hidden = false, example = "") |
| | | private Long[] ids; |
| | | |
| | | @ApiModelProperty(value = "查询类型 1 按月 2 按时间", hidden = false, example = "") |
| | | private String type; |
| | | |
| | | |
| | | @ApiModelProperty(value = "月份(1-12)", hidden = false, example = "") |
| | | private Integer month; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "创建起始时间", hidden = false, example = "2021-05-01 18:05:50") |
| | | private Date createAtStart; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "创建结束时间", hidden = false, example = "2021-05-02 18:05:50") |
| | | private Date createAtEnd; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = false, example = "") |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.Pattern; |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 分页查询表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("查询高龄认证社区反馈请求参数") |
| | | public class PageEldersAuthFeedbackDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "排序字段, 默认createAt", example = "createAt") |
| | | private String sortBy="createAt"; |
| | | |
| | | @ApiModelProperty(value = "排序方式: asc/desc(默认)", example = "desc") |
| | | @Pattern(regexp = "asc|desc|ASC|DESC") |
| | | private String order="desc"; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "ID", hidden = false, example = "1") |
| | | private Long id; |
| | | |
| | | @NotNull() @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "创建人", hidden = false, example = "1") |
| | | private Long createBy; |
| | | |
| | | @NotNull() |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "创建时间", hidden = false, example = "2021-05-01 18:05:50") |
| | | private Date createAt; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "更新人", hidden = false, example = "1") |
| | | private Long updateBy; |
| | | |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "更新时间", hidden = false, example = "2021-05-01 18:05:50") |
| | | private Date updateAt; |
| | | |
| | | @NotNull() @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "认证ID", hidden = false, example = "1") |
| | | private Long authId; |
| | | |
| | | @Length(max=1024) |
| | | @ApiModelProperty(value = "反馈结果", hidden = false, example = "") |
| | | private String feedBack; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.vaccines; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("用户信息") |
| | | public class EnrollUserByAppDTO { |
| | | |
| | | @ApiModelProperty("用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("是否是自己(1.是 2.否)") |
| | | private Integer isUser; |
| | | |
| | | /** |
| | | * 是否是自己(1.是 2.否) |
| | | */ |
| | | public interface isUser{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.vaccines; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("疫苗分类列表请求参数") |
| | | public class VaccinesByAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty("疫苗id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("疫苗类型名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("疫苗描述") |
| | | private String describe; |
| | | } |
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.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("疫苗分类列表请求参数") |
| | | public class VaccinesEnrollByAdminDTO { |
| | | |
| | | @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 vaccines; |
| | | |
| | | @ApiModelProperty("导出id集合") |
| | | private List<Long> ids; |
| | | } |
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 VaccinesEnrollByAppDTO { |
| | | |
| | | @ApiModelProperty("疫苗类型id") |
| | | private Long vaccinesId; |
| | | |
| | | @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; |
| | | |
| | | @Data |
| | | @ApiModel("查询疫苗类型下用户列表请求参数") |
| | | public class VaccinesEnrollUserByAppDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty("疫苗类型id") |
| | | private Long vaccinesId; |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | } |
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; |
| | | } |
New file |
| | |
| | | /* |
| | | * Copyright (c) 2011-2020, baomidou (jobob@qq.com). |
| | | * <p> |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| | | * use this file except in compliance with the License. You may obtain a copy of |
| | | * the License at |
| | | * <p> |
| | | * https://www.apache.org/licenses/LICENSE-2.0 |
| | | * <p> |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| | | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| | | * License for the specific language governing permissions and limitations under |
| | | * the License. |
| | | */ |
| | | package com.panzhihua.common.model.vos; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.function.Function; |
| | | |
| | | import static java.util.stream.Collectors.toList; |
| | | |
| | | /** |
| | | * 分页 Page 对象接口 |
| | | * |
| | | * @author |
| | | * @since |
| | | */ |
| | | public interface IPageVO<T> extends Serializable { |
| | | |
| | | /** |
| | | * 获取排序信息,排序的字段和正反序 |
| | | * |
| | | * @return 排序信息 |
| | | */ |
| | | List<Object> orders(); |
| | | |
| | | /** |
| | | * KEY/VALUE 条件 |
| | | * |
| | | * @return ignore |
| | | * @deprecated 3.4.0 @2020-06-30 |
| | | */ |
| | | @Deprecated |
| | | default Map<Object, Object> condition() { |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 自动优化 COUNT SQL【 默认:true 】 |
| | | * |
| | | * @return true 是 / false 否 |
| | | */ |
| | | default boolean optimizeCountSql() { |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 进行 count 查询 【 默认: true 】 |
| | | * |
| | | * @return true 是 / false 否 |
| | | */ |
| | | default boolean isSearchCount() { |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 计算当前分页偏移量 |
| | | */ |
| | | default long offset() { |
| | | long current = getCurrent(); |
| | | if (current <= 1L) { |
| | | return 0L; |
| | | } |
| | | return (current - 1) * getSize(); |
| | | } |
| | | |
| | | /** |
| | | * 最大每页分页数限制,优先级高于分页插件内的 maxLimit |
| | | * |
| | | * @since 3.4.0 @2020-07-17 |
| | | */ |
| | | default Long maxLimit() { |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 当前分页总页数 |
| | | */ |
| | | default long getPages() { |
| | | if (getSize() == 0) { |
| | | return 0L; |
| | | } |
| | | long pages = getTotal() / getSize(); |
| | | if (getTotal() % getSize() != 0) { |
| | | pages++; |
| | | } |
| | | return pages; |
| | | } |
| | | |
| | | /** |
| | | * 内部什么也不干 |
| | | * <p>只是为了 json 反序列化时不报错</p> |
| | | */ |
| | | default IPageVO<T> setPages(long pages) { |
| | | // to do nothing |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置是否命中count缓存 |
| | | * |
| | | * @param hit 是否命中 |
| | | * @since 3.3.1 |
| | | * @deprecated 3.4.0 @2020-06-30 缓存遵循mybatis的一或二缓 |
| | | */ |
| | | @Deprecated |
| | | default void hitCount(boolean hit) { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 是否命中count缓存 |
| | | * |
| | | * @return 是否命中count缓存 |
| | | * @since 3.3.1 |
| | | * @deprecated 3.4.0 @2020-06-30 缓存遵循mybatis的一或二缓 |
| | | */ |
| | | @Deprecated |
| | | default boolean isHitCount() { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 分页记录列表 |
| | | * |
| | | * @return 分页对象记录列表 |
| | | */ |
| | | List<T> getRecords(); |
| | | |
| | | /** |
| | | * 设置分页记录列表 |
| | | */ |
| | | IPageVO<T> setRecords(List<T> records); |
| | | |
| | | /** |
| | | * 当前满足条件总行数 |
| | | * |
| | | * @return 总条数 |
| | | */ |
| | | long getTotal(); |
| | | |
| | | /** |
| | | * 设置当前满足条件总行数 |
| | | */ |
| | | IPageVO<T> setTotal(long total); |
| | | |
| | | /** |
| | | * 获取每页显示条数 |
| | | * |
| | | * @return 每页显示条数 |
| | | */ |
| | | long getSize(); |
| | | |
| | | /** |
| | | * 设置每页显示条数 |
| | | */ |
| | | IPageVO<T> setSize(long size); |
| | | |
| | | /** |
| | | * 当前页 |
| | | * |
| | | * @return 当前页 |
| | | */ |
| | | long getCurrent(); |
| | | |
| | | /** |
| | | * 设置当前页 |
| | | */ |
| | | IPageVO<T> setCurrent(long current); |
| | | |
| | | /** |
| | | * IPageVO 的泛型转换 |
| | | * |
| | | * @param mapper 转换函数 |
| | | * @param <R> 转换后的泛型 |
| | | * @return 转换泛型后的 IPageVO |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | default <R> IPageVO<R> convert(Function<? super T, ? extends R> mapper) { |
| | | List<R> collect = this.getRecords().stream().map(mapper).collect(toList()); |
| | | return ((IPageVO<R>) this).setRecords(collect); |
| | | } |
| | | |
| | | /** |
| | | * 老分页插件不支持 |
| | | * <p> |
| | | * MappedStatement 的 id |
| | | * |
| | | * @return id |
| | | * @since 3.4.0 @2020-06-19 |
| | | */ |
| | | default String countId() { |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @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 com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty("志愿者参加的已经完成的活动") |
| | | private List<ComActActivityVO> comActActivityVOList; |
| | | |
| | | @ApiModelProperty("时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("高龄认证返回参数") |
| | | public class EldersAuthDetailsVO { |
| | | |
| | | @ApiModelProperty(value = "ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "创建人") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "更新人") |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "身份证") |
| | | @Sensitive(strategy = SensitiveStrategy.ID_CARD) |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "认证人姓名") |
| | | private String authUserName; |
| | | |
| | | @ApiModelProperty(value = "视频地址") |
| | | private String videoUrl; |
| | | |
| | | @ApiModelProperty(value = "提交人") |
| | | private Long sumitUserId; |
| | | |
| | | @ApiModelProperty(value = "户籍地") |
| | | private String domicile; |
| | | |
| | | @ApiModelProperty(value = "状态") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "出生日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthDay; |
| | | |
| | | |
| | | @ApiModelProperty(value = "申请人") |
| | | private String submitUserName; |
| | | |
| | | @ApiModelProperty(value = "申请账号") |
| | | private String submitUserAccount; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "社区反馈") |
| | | private List<EldersAuthFeedbackVO> eldersAuthFeedbackVOList; |
| | | |
| | | @ApiModelProperty(value = "家庭成员ID") |
| | | private Long familyUserId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("高龄认证社区反馈返回参数") |
| | | public class EldersAuthFeedbackDetailsVO { |
| | | |
| | | @ApiModelProperty(value = "ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "创建人") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "更新人") |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "认证ID") |
| | | private Long authId; |
| | | |
| | | @ApiModelProperty(value = "反馈结果") |
| | | private String feedBack; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("高龄认证社区反馈返回参数") |
| | | public class EldersAuthFeedbackVO { |
| | | |
| | | @ApiModelProperty(value = "ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "创建人") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "更新人") |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "认证ID") |
| | | private Long authId; |
| | | |
| | | @ApiModelProperty(value = "反馈结果") |
| | | private String feedBack; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @ApiModel("高龄认证返回参数") |
| | | public class EldersAuthVO { |
| | | |
| | | @ApiModelProperty(value = "ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "创建人") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "申请时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "更新人") |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "身份证") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "认证人姓名") |
| | | private String authUserName; |
| | | |
| | | @ApiModelProperty(value = "视频地址") |
| | | private String videoUrl; |
| | | |
| | | @ApiModelProperty(value = "提交人") |
| | | private Long sumitUserId; |
| | | |
| | | @ApiModelProperty(value = "申请人") |
| | | private String submitUserName; |
| | | |
| | | @ApiModelProperty(value = "申请账号") |
| | | private String submitUserAccount; |
| | | |
| | | @ApiModelProperty(value = "户籍地") |
| | | private String domicile; |
| | | |
| | | @ApiModelProperty(value = "状态") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "出生日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date birthDay; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "家庭成员ID") |
| | | private Long familyUserId; |
| | | |
| | | } |
| | |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("内容") |
| | |
| | | @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; |
| | | |
| | | } |
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 VaccinesByAppVO { |
| | | |
| | | @ApiModelProperty("疫苗id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("疫苗名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("疫苗描述") |
| | | private String describe; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | } |
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 VaccinesEnrollByAdminVO { |
| | | |
| | | @ApiModelProperty("疫苗登记记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty("职业") |
| | | private String job; |
| | | |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("身份证号码") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty("登记时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("性别(1.男 2.女 3.未知)") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty("疫苗分类") |
| | | private String vaccines; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.vaccines; |
| | | |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @describe 疫苗分类信息 |
| | | */ |
| | | @Data |
| | | @ApiModel("家庭成员接种信息") |
| | | public class VaccinesEnrollUserByAppVO { |
| | | |
| | | @ApiModelProperty("用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty("职业") |
| | | private String job; |
| | | |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | |
| | | @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.否) |
| | | */ |
| | | public interface isEnroll{ |
| | | int yes = 1; |
| | | int no = 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; |
| | | |
| | | } |
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 VaccinesUserInoculationByAppVO { |
| | | |
| | | @ApiModelProperty("接种记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("接种疫苗类型") |
| | | private String vaccines; |
| | | |
| | | @ApiModelProperty("受种人") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("接种日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date inoculationAt; |
| | | |
| | | @ApiModelProperty("疫苗批号") |
| | | private String vaccinesCode; |
| | | |
| | | @ApiModelProperty("医疗机构") |
| | | private String medicalInstitution; |
| | | |
| | | @ApiModelProperty("剂次") |
| | | private String dosage; |
| | | |
| | | } |
| | |
| | | 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.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("/village/getVillage") |
| | | R getVillage(@RequestParam("villageId") Long villageId); |
| | | |
| | | /** |
| | | * 新增高龄认证 |
| | | * @param eldersAuthAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/eldersauth/add") |
| | | R add(@RequestBody EldersAuthAddDTO eldersAuthAddDTO); |
| | | |
| | | /** |
| | | * 修改高龄认证 |
| | | * @param eldersAuthEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @PostMapping("/eldersauth/edit") |
| | | R edit(@RequestBody EldersAuthEditDTO eldersAuthEditDTO); |
| | | |
| | | /** |
| | | * 分页查找高龄认证 |
| | | * @param pageEldersAuthDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @PostMapping("/eldersauth/page") |
| | | R query(@RequestBody PageEldersAuthDTO pageEldersAuthDTO); |
| | | |
| | | /** |
| | | * 删除高龄认证 |
| | | * @param eldersAuthDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | | @PostMapping("/eldersauth/delete") |
| | | R delete(@RequestBody EldersAuthDeleteDTO eldersAuthDeleteDTO); |
| | | |
| | | /** |
| | | * 查询高龄认证详细信息 |
| | | * @param id 高龄认证 id |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("/eldersauth/{id}") |
| | | R<EldersAuthDetailsVO> eldersAuthDetails(@PathVariable("id") Long id); |
| | | |
| | | /** |
| | | * 获取用户家庭成员 |
| | | * @param userId 用户ID |
| | | * @return |
| | | */ |
| | | @PostMapping("/eldersauth/getMyfamilyElders/{userId}") |
| | | R getMyfamilyElders(@PathVariable("userId") Long userId); |
| | | |
| | | /** |
| | | * 查询导出高龄老人 |
| | | * @param pageEldersAuthDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/eldersauth/eldersAuthQuery") |
| | | R eldersAuthQuery(@RequestBody PageEldersAuthDTO pageEldersAuthDTO); |
| | | |
| | | /** |
| | | * 通过家庭成员ID添加 |
| | | * @param eldersAuthAddByFamilyDTO 添加信息 |
| | | * @return |
| | | */ |
| | | @PostMapping("/eldersauth/addByFamilyUser") |
| | | R addByFamilyUser(@RequestBody EldersAuthAddByFamilyDTO eldersAuthAddByFamilyDTO); |
| | | |
| | | |
| | | /** |
| | | * 添加高龄认证反馈 |
| | | * @param eldersAuthFeedbackAddDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/eldersauth/addFeedback") |
| | | R addFeedback(@RequestBody EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO); |
| | | |
| | | /** |
| | | * 小程序-查询疫苗分类列表 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | @PostMapping("/vaccines/app/list") |
| | | R getVaccinesListByApp(); |
| | | |
| | | /** |
| | | * 小程序-疫苗类型对应家庭成员接种列表 |
| | | * @return 疫苗类型对应家庭成员接种列表 |
| | | */ |
| | | @PostMapping("/vaccines/app/user/list") |
| | | R getVaccinesUserListByApp(@RequestBody VaccinesEnrollUserByAppDTO enrollUserByAppDTO); |
| | | |
| | | /** |
| | | * 小程序-报名疫苗 |
| | | * @param enrollByAppDTO 请求参数 |
| | | * @return 报名结果 |
| | | */ |
| | | @PostMapping("/vaccines/app/enroll") |
| | | R VaccinesEnrollByApp(@RequestBody VaccinesEnrollByAppDTO enrollByAppDTO); |
| | | |
| | | /** |
| | | * 小程序-查询用户家庭成员接种记录 |
| | | * @param userId 用户id |
| | | * @return 用户家庭成员接种记录 |
| | | */ |
| | | @PostMapping("/vaccines/app/user/inoculation/list") |
| | | R getVaccinesUserInoculationListByApp(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 后台管理-查询疫苗分类列表 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | @PostMapping("/vaccines/admin/list") |
| | | R getVaccinesListByAdmin(@RequestBody VaccinesByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | /** |
| | | * 修改疫苗分类信息 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/vaccines/admin/edit") |
| | | R editVaccinesByAdmin(@RequestBody VaccinesByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | /** |
| | | * 新增疫苗分类信息 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/vaccines/admin/add") |
| | | R addVaccinesByAdmin(@RequestBody VaccinesByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | /** |
| | | * 查询疫苗登记列表 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 登记列表 |
| | | */ |
| | | @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 sex; |
| | | } |
| | | |
| | | public static String domicile(String cardId){ |
| | | return "-"; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(birthDay("120000197802150561")); |
| | | System.out.println(birthDay("32000019951110538X")); |
| | |
| | | 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 = "创建调查问卷") |
New file |
| | |
| | | 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.metadata.style.WriteCellStyle; |
| | | import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/eldersauth") |
| | | @Api(tags = {"高龄认证"}) |
| | | public class EldersAuthApi extends BaseController { |
| | | |
| | | // 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; |
| | | @Value("${ftp.url}") |
| | | private String url; |
| | | @Value("${excel.userurl}") |
| | | private String excelUrl; |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 新增高龄认证 |
| | | * @param {classNameFirstLower}AddDTO 添加高龄认证传递对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping() |
| | | @ApiOperation(value = "新增高龄认证", response = R.class) |
| | | R add(@Validated @RequestBody EldersAuthAddDTO eldersAuthAddDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eldersAuthAddDTO); |
| | | eldersAuthAddDTO.setSumitUserId(getUserId()); |
| | | return communityService.add(eldersAuthAddDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查找 |
| | | * @param pageEldersAuthDTO 查找高龄认证传递对象 |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("page") |
| | | @ApiOperation(value = "查询高龄认证", response = EldersAuthVO.class) |
| | | R query(@Validated @RequestBody PageEldersAuthDTO pageEldersAuthDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(pageEldersAuthDTO); |
| | | pageEldersAuthDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.query(pageEldersAuthDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询高龄认证详细信息 |
| | | * @param id 高龄认证 id |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "查询高龄认证详细信息", response = EldersAuthDetailsVO.class) |
| | | R<EldersAuthDetailsVO> details(@PathVariable("id") Long id){ |
| | | return communityService.eldersAuthDetails(id); |
| | | } |
| | | |
| | | /** |
| | | * 到处高龄认证信息 |
| | | * @param pageEldersAuthDTO 搜索条件 |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation(value = "导出高龄认证信息") |
| | | R<String> export(@Validated @RequestBody PageEldersAuthDTO pageEldersAuthDTO){ |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | |
| | | ClazzUtils.setIfStringIsEmpty(pageEldersAuthDTO); |
| | | String url=excelUrl; |
| | | 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); |
| | | if(excelElderAuthDTO==null||excelElderAuthDTO.size()==0){ |
| | | return R.ok("未找到数据"); |
| | | } |
| | | |
| | | List<ExcelElderAuthDTO> sortedList = excelElderAuthDTO.stream().sorted(Comparator.comparingInt(ExcelElderAuthDTO::getSeq)).collect(Collectors.toList()); |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName,password,host,port); |
| | | sftp.login(); |
| | | String name = "高龄认证-" + new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()) + ".xlsx"; |
| | | 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 { |
| | | |
| | | WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
| | | |
| | | contentWriteCellStyle.setWrapped(true); |
| | | WriteCellStyle headWriteCellStyle = new WriteCellStyle(); |
| | | |
| | | HorizontalCellStyleStrategy horizontalCellStyleStrategy = |
| | | new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); |
| | | |
| | | |
| | | excelWriter = EasyExcel.write(fileName, ExcelElderAuthDTO.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(horizontalCellStyleStrategy).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("高龄认证").build(); |
| | | excelWriter.write(sortedList, 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(url+ URLEncoder.encode(name,"UTF-8")); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | return R.fail("导出数据失败"); |
| | | } |
| | | /** |
| | | * 新增高龄认证 |
| | | * @param {classNameFirstLower}AddDTO 添加高龄认证传递对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/addFeedback") |
| | | @ApiOperation(value = "新增高龄认证反馈", response = R.class) |
| | | R addFeedback(@Validated @RequestBody EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eldersAuthFeedbackAddDTO); |
| | | eldersAuthFeedbackAddDTO.setUserId(getUserId()); |
| | | return communityService.addFeedback(eldersAuthFeedbackAddDTO); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | 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.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 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.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | |
| | | import com.panzhihua.common.model.vos.community.questnaire.EditComActQuestnaireVo; |
| | | 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.service_community.model.dos.ComActActPrizeDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDynDO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngStructAreaDO; |
| | | 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 com.panzhihua.service_community.dao.ComMngPopulationDAO; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.*; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | 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; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | private ComActMessageService comActMessageService; |
| | | @Resource |
| | | private ComActQuestnaireService comActQuestnaireService; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private EldersAuthService eldersAuthService; |
| | | @Resource |
| | | public ComMngPopulationDAO comMngPopulationDAO; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | 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(); |
| | | } |
| | | /** |
| | | * 分页查询微心愿 |
| | | * |
| | |
| | | public R deletemicrowish(@RequestParam("id") Long id){ |
| | | return comActMicroWishService.deleteMicroWish(id); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 新增高龄认证 |
| | | * @param eldersAuthAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/eldersauth/add") |
| | | R add(@RequestBody EldersAuthAddDTO eldersAuthAddDTO){ |
| | | return eldersAuthService.add(eldersAuthAddDTO); |
| | | }; |
| | | |
| | | /** |
| | | * 修改高龄认证 |
| | | * @param eldersAuthEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @PostMapping("/eldersauth/edit") |
| | | R edit(@RequestBody EldersAuthEditDTO eldersAuthEditDTO){ |
| | | return eldersAuthService.edit(eldersAuthEditDTO); |
| | | }; |
| | | |
| | | /** |
| | | * 分页查找高龄认证 |
| | | * @param pageEldersAuthDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @PostMapping("/eldersauth/page") |
| | | R<IPage<EldersAuthVO>> query(@RequestBody PageEldersAuthDTO pageEldersAuthDTO){ |
| | | return eldersAuthService.query(pageEldersAuthDTO); |
| | | }; |
| | | |
| | | /** |
| | | * 删除高龄认证 |
| | | * @param EldersAuthDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | | @PostMapping("/eldersauth/delete") |
| | | R delete(@RequestBody EldersAuthDeleteDTO EldersAuthDeleteDTO){ |
| | | return eldersAuthService.delete(EldersAuthDeleteDTO); |
| | | }; |
| | | |
| | | /** |
| | | * 查询高龄认证详细信息 |
| | | * @param id 高龄认证 id |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("/eldersauth/{id}") |
| | | R<EldersAuthDetailsVO> eldersAuthDetails(@PathVariable("id") Long id){ |
| | | return eldersAuthService.eldersAuthDetails(id); |
| | | }; |
| | | |
| | | @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 -> { |
| | | int age = IdCard.IdNOToAge(rt.getIdCard()); |
| | | boolean isElders = age >= 80; |
| | | if (isElders) { |
| | | listRt.add(rt); |
| | | } |
| | | }); |
| | | return R.ok(listRt); |
| | | } |
| | | |
| | | @PostMapping("/eldersauth/addByFamilyUser") |
| | | R addByFamilyUser(@RequestBody EldersAuthAddByFamilyDTO eldersAuthAddByFamilyDTO){ |
| | | |
| | | List<ComMngFamilyInfoVO> list = comMngPopulationDAO.listFamilyByUserId(eldersAuthAddByFamilyDTO.getUserId()); |
| | | ComMngFamilyInfoVO theFamily = null; |
| | | Long familyUserId = eldersAuthAddByFamilyDTO.getFamilyUserId(); |
| | | for (ComMngFamilyInfoVO family : list) { |
| | | if (familyUserId == family.getId()) { |
| | | theFamily = family; |
| | | } |
| | | } |
| | | |
| | | if(theFamily==null){ |
| | | return R.fail("家庭成员信息错误"); |
| | | } |
| | | Integer age = IdCard.IdNOToAge(theFamily.getIdCard()); |
| | | if(age>=80){ |
| | | Long loginUserId = eldersAuthAddByFamilyDTO.getUserId(); |
| | | EldersAuthDO eldersAuthDO = new EldersAuthDO(); |
| | | eldersAuthDO.setSumitUserId(eldersAuthAddByFamilyDTO.getSumitUserId()); |
| | | eldersAuthDO.setCreateBy(loginUserId); |
| | | eldersAuthDO.setCreateAt(new Date()); |
| | | eldersAuthDO.setIdCard(theFamily.getIdCard()); |
| | | eldersAuthDO.setAuthUserName(theFamily.getName()); |
| | | eldersAuthDO.setVideoUrl(eldersAuthAddByFamilyDTO.getVideoUrl()); |
| | | eldersAuthDO.setFamilyUserId(eldersAuthAddByFamilyDTO.getFamilyUserId()); |
| | | //根据身份证查询出籍贯 出生日期 |
| | | //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); |
| | | eldersAuthDO.setBirthDay(birthDay); |
| | | int add = eldersAuthService.getBaseMapper().insert(eldersAuthDO); |
| | | if(add==1){ |
| | | return R.ok(eldersAuthDO.getId()); |
| | | } |
| | | }else{ |
| | | return R.fail("家庭成员年龄还未达到80"); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 新增高龄认证社区反馈 |
| | | * @param {classNameFirstLower}AddDTO 添加高龄认证社区反馈传递对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/eldersauth/addFeedback") |
| | | R add(@RequestBody EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(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 pageEldersAuthDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/eldersauth/eldersAuthQuery") |
| | | R eldersAuthQuery(@RequestBody PageEldersAuthDTO pageEldersAuthDTO){ |
| | | return eldersAuthService.queryExportData(pageEldersAuthDTO); |
| | | } |
| | | } |
| | |
| | | * @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); |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | 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; |
| | | import com.panzhihua.service_community.service.ComMngVaccinesService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/vaccines") |
| | | public class VaccinesApi { |
| | | |
| | | @Resource |
| | | private ComMngVaccinesService comMngVaccinesService; |
| | | @Resource |
| | | private ComMngVaccinesEnrollRecordService comMngVaccinesEnrollRecordService; |
| | | @Resource |
| | | private ComMngVaccinesInoculationRecordService comMngVaccinesInoculationRecordService; |
| | | |
| | | /** |
| | | * 小程序-查询疫苗分类列表 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | @PostMapping("/app/list") |
| | | public R getVaccinesListByApp() { |
| | | return comMngVaccinesService.getVaccinesListByApp(); |
| | | } |
| | | |
| | | /** |
| | | * 小程序-疫苗类型对应家庭成员接种列表 |
| | | * @return 疫苗类型对应家庭成员接种列表 |
| | | */ |
| | | @PostMapping("/app/user/list") |
| | | public R getVaccinesUserListByApp(@RequestBody VaccinesEnrollUserByAppDTO enrollUserByAppDTO) { |
| | | return comMngVaccinesEnrollRecordService.getVaccinesUserListByApp(enrollUserByAppDTO); |
| | | } |
| | | |
| | | /** |
| | | * 用户疫苗报名 |
| | | * @param enrollByAppDTO 请求参数 |
| | | * @return 报名结果 |
| | | */ |
| | | @PostMapping("/app/enroll") |
| | | public R VaccinesEnrollByApp(@RequestBody VaccinesEnrollByAppDTO enrollByAppDTO){ |
| | | return comMngVaccinesEnrollRecordService.VaccinesEnrollByApp(enrollByAppDTO); |
| | | } |
| | | |
| | | /** |
| | | * 小程序-查询用户家庭成员接种记录 |
| | | * @param userId 用户id |
| | | * @return 用户家庭成员接种记录 |
| | | */ |
| | | @PostMapping("/app/user/inoculation/list") |
| | | public R getVaccinesUserInoculationListByApp(@RequestParam("userId") Long userId) { |
| | | return comMngVaccinesInoculationRecordService.getVaccinesUserInoculationListByApp(userId); |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-查询疫苗分类列表 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | @PostMapping("/admin/list") |
| | | public R getVaccinesListByAdmin(@RequestBody VaccinesByAdminDTO vaccinesByAdminDTO) { |
| | | return comMngVaccinesService.getVaccinesListByAdmin(vaccinesByAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改疫苗分类信息 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/admin/edit") |
| | | public R editVaccinesByAdmin(@RequestBody VaccinesByAdminDTO vaccinesByAdminDTO) { |
| | | return comMngVaccinesService.editVaccinesByAdmin(vaccinesByAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 新增疫苗分类信息 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/admin/add") |
| | | public R addVaccinesByAdmin(@RequestBody VaccinesByAdminDTO vaccinesByAdminDTO) { |
| | | return comMngVaccinesService.addVaccinesByAdmin(vaccinesByAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询疫苗登记列表 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 登记列表 |
| | | */ |
| | | @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 cmphu.popul_id,cmp.name,cmp.relation,cmp.age,cmp.phone,cmp.healthy,cmp.card_no,cmp.work_company from com_mng_population_house_user cmphu " + |
New file |
| | |
| | | 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.VaccinesByAdminDTO; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesByAppVO; |
| | | import com.panzhihua.service_community.model.dos.ComMngVaccinesDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:17:46 |
| | | * @describe 疫苗分类表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComMngVaccinesDAO extends BaseMapper<ComMngVaccinesDO> { |
| | | |
| | | @Select("<script> " + |
| | | "select * from com_mng_vaccines" + |
| | | " <where>" + |
| | | "<if test='vaccinesByAdminDTO.name != null and vaccinesByAdminDTO.name != ""'>" + |
| | | "`name` like concat('%',#{vaccinesByAdminDTO.name},'%') "+ |
| | | " </if> " + |
| | | " </where>" + |
| | | " order by create_at desc" + |
| | | " </script>") |
| | | IPage<VaccinesByAppVO> getVaccinesByName(Page page,@Param("vaccinesByAdminDTO") VaccinesByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | } |
New file |
| | |
| | | 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.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; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:17:53 |
| | | * @describe 疫苗报名记录表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComMngVaccinesEnrollRecordDAO extends BaseMapper<ComMngVaccinesEnrollRecordDO> { |
| | | |
| | | @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,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,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); |
| | | } |
New file |
| | |
| | | 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; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:17:59 |
| | | * @describe 疫苗接种记录表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComMngVaccinesInoculationRecordDAO extends BaseMapper<ComMngVaccinesInoculationRecordDO> { |
| | | |
| | | @Select("<script> " + |
| | | "select id,vaccines,name,inoculation_at,vaccines_code,medical_institution,dosage from com_mng_vaccines_inoculation_record " + |
| | | " where 1=1 and " + |
| | | "<if test='ids != null and ids.size>0'>" + |
| | | "(user_type = 2 and user_id in "+ |
| | | "<foreach item=\"item\" collection=\"ids\" separator=\",\" open=\"(\" close=\")\" index=\"\"> " + |
| | | "#{item} " + |
| | | "</foreach>" + |
| | | " ) or " + |
| | | " </if> " + |
| | | |
| | | " (user_type = 1 and user_id = #{userId}) " + |
| | | " order by inoculation_at desc " + |
| | | " </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); |
| | | } |
New file |
| | |
| | | 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.community.ExcelElderAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthVO; |
| | | import com.panzhihua.service_community.model.dos.EldersAuthDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * DAO |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Mapper |
| | | public interface EldersAuthDAO extends BaseMapper<EldersAuthDO> { |
| | | |
| | | @Select("<script> " + |
| | | "SELECT ea.id, ea.create_at, ea.create_by, ea.update_by, ea.update_at," + |
| | | " ea.AUTH_USER_NAME , ea.ID_CARD, ea.BIRTH_DAY, ea.FAMILY_USER_ID ," + |
| | | " ea.DOMICILE, ea.SUMIT_USER_ID, u.phone as submitUserAccount , ea.VIDEO_URL, " + |
| | | " u.name as submitUserName, ROUND(DATEDIFF(CURDATE(), ea.BIRTH_DAY)/365.2422) as age \n" + |
| | | "FROM " + |
| | | " (" + |
| | | " SELECT MAX(id) AS id , DATE_FORMAT(create_at, '%Y-%m') AS yearMonth\n" + |
| | | " FROM com_elders_auth \n" + |
| | | " GROUP BY id_card, yearMonth\n" + |
| | | " ) 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 test='pageEldersAuthDTO.idCard != null'>" + |
| | | " AND ea.ID_CARD = #{pageEldersAuthDTO.idCard} " + |
| | | " </if> " + |
| | | "<if test='pageEldersAuthDTO.authUserName != null'>" + |
| | | " AND ea.AUTH_USER_NAME like concat('%', #{pageEldersAuthDTO.authUserName}, '%' ) " + |
| | | " </if> " + |
| | | "<if test='pageEldersAuthDTO.type == 1 '>" + |
| | | " AND DATE_FORMAT(ea.CREATE_AT, '%c') = #{pageEldersAuthDTO.month} " + |
| | | " </if> " + |
| | | "<if test='pageEldersAuthDTO.type == 2 '>" + |
| | | "<if test='pageEldersAuthDTO.createAtStart != null'>" + |
| | | " AND ea.create_at <![CDATA[>=]]> #{pageEldersAuthDTO.createAtStart} " + |
| | | " </if> " + |
| | | "<if test='pageEldersAuthDTO.createAtEnd != null'>" + |
| | | " AND ea.create_at <![CDATA[<=]]> #{pageEldersAuthDTO.createAtEnd} " + |
| | | " </if> " + |
| | | " </if> " + |
| | | " </where>" + |
| | | " ORDER BY ea.${pageEldersAuthDTO.sortBy} ${pageEldersAuthDTO.order} " + |
| | | "</script>") |
| | | IPage<EldersAuthVO> selectByPage(Page page, @Param("pageEldersAuthDTO") PageEldersAuthDTO pageEldersAuthDTO); |
| | | |
| | | |
| | | @Select("<script> " + |
| | | "SELECT ea.id, ea.create_at, ea.create_by, ea.update_by, ea.update_at," + |
| | | " ea.AUTH_USER_NAME , ea.ID_CARD, ea.BIRTH_DAY, ea.FAMILY_USER_ID, " + |
| | | " ea.DOMICILE, ea.SUMIT_USER_ID, u.phone as submitUserAccount , ea.VIDEO_URL , ea.FAMILY_USER_ID, " + |
| | | " u.name as submitUserName, ROUND(DATEDIFF(CURDATE(), ea.BIRTH_DAY)/365.2422) as age \n" + |
| | | "FROM com_elders_auth ea LEFT JOIN sys_user u ON ea.SUMIT_USER_ID = u.user_id\n" + |
| | | " where ea.id = #{id}" + |
| | | "</script>") |
| | | EldersAuthDetailsVO selectDetails(@Param("id") Long id); |
| | | |
| | | @Select("<script> " + |
| | | " SELECT \n" + |
| | | " (@rownum:=@rownum+1) as seq, '高龄补贴' AS subsidy, '' AS batch, ea.AUTH_USER_NAME AS NAME, ea.ID_CARD, \n" + |
| | | " CASE\n" + |
| | | " WHEN ROUND(DATEDIFF(CURDATE(), ea.BIRTH_DAY)/365.2422) > 99 THEN \"100周岁(含)以上\"\n" + |
| | | " WHEN ROUND(DATEDIFF(CURDATE(), ea.BIRTH_DAY)/365.2422) > 89 THEN \"90-99周岁\"\n" + |
| | | " WHEN ROUND(DATEDIFF(CURDATE(), ea.BIRTH_DAY)/365.2422) >= 80 THEN \"80-89周岁\"\n" + |
| | | " ELSE \"未达到年龄\"\n" + |
| | | " END AS TYPE, DATE_FORMAT(ea.create_at, '%Y-%m') AS yearMonth,\n" + |
| | | " CASE\n" + |
| | | " WHEN ROUND(DATEDIFF(CURDATE(), ea.BIRTH_DAY)/365.2422) > 99 THEN \"800\"\n" + |
| | | " WHEN ROUND(DATEDIFF(CURDATE(), ea.BIRTH_DAY)/365.2422) > 89 THEN \"200\"\n" + |
| | | " WHEN ROUND(DATEDIFF(CURDATE(), ea.BIRTH_DAY)/365.2422) >= 80 THEN \"50\"\n" + |
| | | " ELSE \"未达到年龄\"\n" + |
| | | " END AS payCount,\n" + |
| | | " ac.name AS communityName, '' AS 'group', '' AS telphone , ROUND(DATEDIFF(CURDATE(), ea.BIRTH_DAY)/365.2422) AS age\n" + |
| | | " FROM \n" + |
| | | " (" + |
| | | " SELECT MAX(id) AS id , DATE_FORMAT(create_at, '%Y-%m') AS yearMonth, @rownum:=0 \n" + |
| | | " FROM com_elders_auth \n" + |
| | | " GROUP BY id_card, yearMonth\n" + |
| | | " ) t \n" + |
| | | " LEFT JOIN com_elders_auth ea ON t.id = ea.id \n" + |
| | | " 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.ids != null and pageEldersAuthDTO.ids.length>0 '>" + |
| | | " AND ea.id in " + |
| | | "<foreach collection='pageEldersAuthDTO.ids' item='id' index='index' open='(' close=')' separator=',' >\n" + |
| | | " #{id}" + |
| | | "</foreach>" + |
| | | " </if> " + |
| | | |
| | | "<if test='pageEldersAuthDTO.ids == null or pageEldersAuthDTO.ids.length==0 '>" + |
| | | "<if test='pageEldersAuthDTO.sumitUserId != null'>" + |
| | | " AND ea.SUMIT_USER_ID = #{pageEldersAuthDTO.sumitUserId} " + |
| | | " </if> " + |
| | | "<if test='pageEldersAuthDTO.idCard != null'>" + |
| | | " AND ea.ID_CARD = #{pageEldersAuthDTO.idCard} " + |
| | | " </if> " + |
| | | "<if test='pageEldersAuthDTO.authUserName != null'>" + |
| | | " AND ea.AUTH_USER_NAME like concat('%', #{pageEldersAuthDTO.authUserName}, '%' ) " + |
| | | " </if> " + |
| | | "<if test='pageEldersAuthDTO.type == 1 '>" + |
| | | " AND DATE_FORMAT(ea.CREATE_AT, '%c') = #{pageEldersAuthDTO.month} " + |
| | | " </if> " + |
| | | "<if test='pageEldersAuthDTO.type == 2 '>" + |
| | | "<if test='pageEldersAuthDTO.createAtStart != null'>" + |
| | | " AND ea.create_at <![CDATA[>=]]> #{pageComShopOrderSearchDTO.createAtStart} " + |
| | | " </if> " + |
| | | "<if test='pageEldersAuthDTO.createAtEnd != null'>" + |
| | | " AND ea.create_at <![CDATA[<=]]> #{pageComShopOrderSearchDTO.createAtEnd} " + |
| | | " </if> " + |
| | | " </if> " + |
| | | " </if> " + |
| | | " </where>" + |
| | | " ORDER BY ea.${pageEldersAuthDTO.sortBy} ${pageEldersAuthDTO.order} " + |
| | | "</script>") |
| | | List<ExcelElderAuthDTO> selectByParams( @Param("pageEldersAuthDTO") PageEldersAuthDTO pageEldersAuthDTO); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT CONCAT(ap.province_name, ad.district_name) AS domicile\n" + |
| | | "FROM com_mng_struct_area_province ap LEFT JOIN com_mng_struct_area_city ct ON ap.province_adcode = ct.province_adcode\n" + |
| | | " LEFT JOIN com_mng_struct_area_district ad ON ct.city_adcode = ad.city_adcode " + |
| | | " WHERE substring(ad.district_adcode, 1, 6) = substring(#{idCard}, 1, 6) "+ |
| | | "</script>") |
| | | String selectDomicile(@Param("idCard")String idCard); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.EldersAuthFeedbackDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * DAO |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Mapper |
| | | public interface EldersAuthFeedbackDAO extends BaseMapper<EldersAuthFeedbackDO> { |
| | | |
| | | } |
| | |
| | | /** |
| | | * 封面图 |
| | | */ |
| | | @TableField(value = "cover", updateStrategy = FieldStrategy.IGNORED) |
| | | private String cover; |
| | | |
| | | /** |
| | |
| | | * 地址备注 |
| | | */ |
| | | private String addrRemark; |
| | | |
| | | /** |
| | | * 是否删除 0 否 1 是 |
| | | */ |
| | | private Integer delTag; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:17:46 |
| | | * @describe 疫苗分类表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_mng_vaccines") |
| | | public class ComMngVaccinesDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 疫苗分类名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 疫苗分类描述 |
| | | */ |
| | | @TableField("`describe`") |
| | | private String describe; |
| | | |
| | | /** |
| | | * 状态(1.启用 2.禁用) |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 状态(1.启用 2.禁用) |
| | | */ |
| | | public interface status{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComMngVaccinesDO{" + |
| | | "id=" + id + |
| | | ", name=" + name + |
| | | ", describe=" + describe + |
| | | ", status=" + status + |
| | | ", createAt=" + createAt + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:17:53 |
| | | * @describe 疫苗报名记录表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_mng_vaccines_enroll_record") |
| | | public class ComMngVaccinesEnrollRecordDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 疫苗分类id |
| | | */ |
| | | private Long type; |
| | | |
| | | /** |
| | | * 疫苗申请报名用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 疫苗报名用户id |
| | | */ |
| | | private Long familyUserId; |
| | | |
| | | /** |
| | | * 报名时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 报名类型(1.小程序用户 2.小程序家庭成员) |
| | | */ |
| | | 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{ |
| | | int mini = 1; |
| | | int family = 2; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComMngVaccinesEnrollRecordDO{" + |
| | | "id=" + id + |
| | | ", type=" + type + |
| | | ", userId=" + userId + |
| | | ", familyUserId=" + familyUserId + |
| | | ", createAt=" + createAt + |
| | | ", updateAt=" + updateAt + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:17:59 |
| | | * @describe 疫苗接种记录表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_mng_vaccines_inoculation_record") |
| | | public class ComMngVaccinesInoculationRecordDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 疫苗类型 |
| | | */ |
| | | private String vaccines; |
| | | |
| | | /** |
| | | * 接种用户id(对应家庭成员表id) |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女) |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 身份证号码 |
| | | */ |
| | | private String idCard; |
| | | |
| | | /** |
| | | * 接种剂次 |
| | | */ |
| | | private String dosage; |
| | | |
| | | /** |
| | | * 疫苗编号 |
| | | */ |
| | | private String vaccinesCode; |
| | | |
| | | /** |
| | | * 医疗机构 |
| | | */ |
| | | private String medicalInstitution; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 接种时间 |
| | | */ |
| | | private Date inoculationAt; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 接种用户类型(1.小程序用户 2.家庭成员用户 |
| | | */ |
| | | private Long userType; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComMngVaccinesInoculationRecordDO{" + |
| | | "id=" + id + |
| | | ", vaccines=" + vaccines + |
| | | ", userId=" + userId + |
| | | ", name=" + name + |
| | | ", sex=" + sex + |
| | | ", age=" + age + |
| | | ", phone=" + phone + |
| | | ", idCard=" + idCard + |
| | | ", dosage=" + dosage + |
| | | ", vaccinesCode=" + vaccinesCode + |
| | | ", medicalInstitution=" + medicalInstitution + |
| | | ", remark=" + remark + |
| | | ", inoculationAt=" + inoculationAt + |
| | | ", createAt=" + createAt + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.util.*; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 高龄认证实体类 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @TableName("com_elders_auth") |
| | | public class EldersAuthDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID 列: ID |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 创建人 列: CREATE_BY |
| | | */ |
| | | private Long createBy; |
| | | /** |
| | | * 创建时间 列: CREATE_AT |
| | | */ |
| | | private Date createAt; |
| | | /** |
| | | * 更新人 列: UPDATE_BY |
| | | */ |
| | | private Long updateBy; |
| | | /** |
| | | * 更新时间 列: UPDATE_AT |
| | | */ |
| | | private Date updateAt; |
| | | /** |
| | | * 身份证 列: ID_CARD |
| | | */ |
| | | private String idCard; |
| | | /** |
| | | * 认证人姓名 列: AUTH_USER_NAME |
| | | */ |
| | | private String authUserName; |
| | | /** |
| | | * 视频地址 列: VIDEO_URL |
| | | */ |
| | | private String videoUrl; |
| | | /** |
| | | * 提交人 列: SUMIT_USER_ID |
| | | */ |
| | | private Long sumitUserId; |
| | | /** |
| | | * 户籍地 列: DOMICILE |
| | | */ |
| | | private String domicile; |
| | | /** |
| | | * 状态 列: STATUS |
| | | */ |
| | | private String status; |
| | | /** |
| | | * 出生日期 列: BIRTH_DAY |
| | | */ |
| | | private Date birthDay; |
| | | /** |
| | | * 家庭成员ID 列: FAMILY_USER_ID |
| | | */ |
| | | private Long familyUserId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.util.*; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 高龄认证社区反馈实体类 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | @Data |
| | | @TableName("com_elders_auth_feedback") |
| | | public class EldersAuthFeedbackDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID 列: ID |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 创建人 列: CREATE_BY |
| | | */ |
| | | private Long createBy; |
| | | /** |
| | | * 创建时间 列: CREATE_AT |
| | | */ |
| | | private Date createAt; |
| | | /** |
| | | * 更新人 列: UPDATE_BY |
| | | */ |
| | | private Long updateBy; |
| | | /** |
| | | * 更新时间 列: UPDATE_AT |
| | | */ |
| | | private Date updateAt; |
| | | /** |
| | | * 认证ID 列: AUTH_ID |
| | | */ |
| | | private Long authId; |
| | | /** |
| | | * 反馈结果 列: FEED_BACK |
| | | */ |
| | | private String feedBack; |
| | | } |
| | |
| | | } |
| | | |
| | | public boolean needToDecrypt(Object object){ |
| | | Class<?> objectClass = object.getClass(); |
| | | EncryptDecryptClass encryptDecryptClass = AnnotationUtils.findAnnotation(objectClass, EncryptDecryptClass.class); |
| | | if (Objects.nonNull(encryptDecryptClass)){ |
| | | return true; |
| | | if(object!=null) { |
| | | Class<?> objectClass = object.getClass(); |
| | | EncryptDecryptClass encryptDecryptClass = AnnotationUtils.findAnnotation(objectClass, EncryptDecryptClass.class); |
| | | if (Objects.nonNull(encryptDecryptClass)) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | |
| | | |
| | | |
| | | private void sensitive(Object source) { |
| | | // 拿到返回值类型 |
| | | Class<?> sourceClass = source.getClass(); |
| | | // 初始化返回值类型的 MetaObject |
| | | MetaObject metaObject = SystemMetaObject.forObject(source); |
| | | // 捕捉到属性上的标记注解 @Sensitive 并进行对应的脱敏处理 |
| | | Stream.of(sourceClass.getDeclaredFields()) |
| | | .filter(field -> field.isAnnotationPresent(Sensitive.class)) |
| | | .forEach(field -> doSensitive(metaObject, field)); |
| | | if(source!=null) { |
| | | // 拿到返回值类型 |
| | | Class<?> sourceClass = source.getClass(); |
| | | // 初始化返回值类型的 MetaObject |
| | | MetaObject metaObject = SystemMetaObject.forObject(source); |
| | | // 捕捉到属性上的标记注解 @Sensitive 并进行对应的脱敏处理 |
| | | Stream.of(sourceClass.getDeclaredFields()) |
| | | .filter(field -> field.isAnnotationPresent(Sensitive.class)) |
| | | .forEach(field -> doSensitive(metaObject, field)); |
| | | } |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | 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.service_community.model.dos.ComMngVaccinesEnrollRecordDO; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:17:53 |
| | | * @describe 疫苗报名记录表服务类 |
| | | */ |
| | | public interface ComMngVaccinesEnrollRecordService extends IService<ComMngVaccinesEnrollRecordDO> { |
| | | |
| | | /** |
| | | * 小程序-疫苗类型对应家庭成员接种列表 |
| | | * @return 疫苗类型对应家庭成员接种列表 |
| | | */ |
| | | R getVaccinesUserListByApp(VaccinesEnrollUserByAppDTO enrollUserByAppDTO); |
| | | |
| | | /** |
| | | * 用户疫苗报名 |
| | | * @param enrollByAppDTO 请求参数 |
| | | * @return 报名结果 |
| | | */ |
| | | R VaccinesEnrollByApp(VaccinesEnrollByAppDTO enrollByAppDTO); |
| | | |
| | | /** |
| | | * 查询疫苗登记列表 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 登记列表 |
| | | */ |
| | | R getVaccinesEnrollListByAdmin(VaccinesEnrollByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | /** |
| | | * 根据条件导出疫苗登记记录 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 导出登记列表 |
| | | */ |
| | | R exportVaccinesEnrollListByAdmin(VaccinesEnrollByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:17:59 |
| | | * @describe 疫苗接种记录表服务类 |
| | | */ |
| | | public interface ComMngVaccinesInoculationRecordService extends IService<ComMngVaccinesInoculationRecordDO> { |
| | | |
| | | /** |
| | | * 小程序-查询用户家庭成员接种记录 |
| | | * @param userId 用户id |
| | | * @return 用户家庭成员接种记录 |
| | | */ |
| | | R getVaccinesUserInoculationListByApp(Long userId); |
| | | |
| | | /** |
| | | * 查询接种记录列表 |
| | | * @param inoculationByAdminDTO 请求参数 |
| | | * @return 接种记录列表 |
| | | */ |
| | | R getVaccinesInoculationListByAdmin(VaccinesInoculationByAdminDTO inoculationByAdminDTO); |
| | | |
| | | /** |
| | | * 接种记录信息导出 |
| | | * @param inoculationByAdminDTO 请求参数 |
| | | * @return 导出结果 |
| | | */ |
| | | R exportVaccinesInoculationListByAdmin(VaccinesInoculationByAdminDTO inoculationByAdminDTO); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesByAdminDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComMngVaccinesDO; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:17:46 |
| | | * @describe 疫苗分类表服务类 |
| | | */ |
| | | public interface ComMngVaccinesService extends IService<ComMngVaccinesDO> { |
| | | |
| | | /** |
| | | * 小程序-查询疫苗分类列表 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | R getVaccinesListByApp(); |
| | | |
| | | /** |
| | | * 后台管理-查询疫苗分类列表 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | R getVaccinesListByAdmin(VaccinesByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | /** |
| | | * 修改疫苗分类信息 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | R editVaccinesByAdmin(VaccinesByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | /** |
| | | * 新增疫苗分类信息 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | R addVaccinesByAdmin(VaccinesByAdminDTO vaccinesByAdminDTO); |
| | | |
| | | /** |
| | | * 删除疫苗分类信息 |
| | | * @param id 疫苗分类id |
| | | * @return 删除结果 |
| | | */ |
| | | R deleteVaccinesByAdmin(Long id); |
| | | |
| | | /** |
| | | * 疫苗分类列表 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | R getEnrollTypeListByAdmin(); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthFeedbackAddDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthFeedbackDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthFeedbackEditDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthFeedbackDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthFeedbackDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthFeedbackVO; |
| | | import com.panzhihua.service_community.model.dos.EldersAuthFeedbackDO; |
| | | |
| | | /** |
| | | * 高龄认证社区反馈 service |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | public interface EldersAuthFeedbackService extends IService<EldersAuthFeedbackDO> { |
| | | |
| | | /** |
| | | * 新增高龄认证社区反馈 |
| | | * @param eldersAuthFeedbackAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | R add(EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO); |
| | | |
| | | /** |
| | | * 修改高龄认证社区反馈 |
| | | * @param eldersAuthFeedbackEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | R edit(EldersAuthFeedbackEditDTO eldersAuthFeedbackEditDTO); |
| | | |
| | | /** |
| | | * 分页查找高龄认证社区反馈 |
| | | * @param pageEldersAuthFeedbackDTO |
| | | * @return 维护结果 |
| | | */ |
| | | R<IPage<EldersAuthFeedbackVO>> query(PageEldersAuthFeedbackDTO pageEldersAuthFeedbackDTO); |
| | | |
| | | /** |
| | | * 删除高龄认证社区反馈 |
| | | * @param EldersAuthFeedbackDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | | R delete(EldersAuthFeedbackDeleteDTO EldersAuthFeedbackDeleteDTO); |
| | | |
| | | /** |
| | | * 查询高龄认证社区反馈详细信息 |
| | | * @param id 高龄认证社区反馈 id |
| | | * @return 查找结果 |
| | | */ |
| | | R<EldersAuthFeedbackDetailsVO> eldersAuthFeedbackDetails(Long id); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthVO; |
| | | import com.panzhihua.service_community.model.dos.EldersAuthDO; |
| | | |
| | | /** |
| | | * 高龄认证 service |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | public interface EldersAuthService extends IService<EldersAuthDO> { |
| | | |
| | | /** |
| | | * 新增高龄认证 |
| | | * @param eldersAuthAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | R add(EldersAuthAddDTO eldersAuthAddDTO); |
| | | |
| | | /** |
| | | * 修改高龄认证 |
| | | * @param eldersAuthEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | R edit(EldersAuthEditDTO eldersAuthEditDTO); |
| | | |
| | | /** |
| | | * 分页查找高龄认证 |
| | | * @param pageEldersAuthDTO |
| | | * @return 维护结果 |
| | | */ |
| | | R<IPage<EldersAuthVO>> query(PageEldersAuthDTO pageEldersAuthDTO); |
| | | |
| | | /** |
| | | * 删除高龄认证 |
| | | * @param EldersAuthDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | | R delete(EldersAuthDeleteDTO EldersAuthDeleteDTO); |
| | | |
| | | /** |
| | | * 查询高龄认证详细信息 |
| | | * @param id 高龄认证 id |
| | | * @return 查找结果 |
| | | */ |
| | | R<EldersAuthDetailsVO> eldersAuthDetails(Long id); |
| | | |
| | | /** |
| | | * 新增高龄认证社区反馈 |
| | | * @param eldersAuthFeedbackAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | R addFeedback(EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO); |
| | | |
| | | /** |
| | | * 分页查找高龄认证导出数据 |
| | | * @param pageEldersAuthDTO |
| | | * @return 维护结果 |
| | | */ |
| | | R queryExportData(PageEldersAuthDTO pageEldersAuthDTO); |
| | | |
| | | /** |
| | | * 查询籍贯 |
| | | * @param idCard |
| | | * @return |
| | | */ |
| | | String queryDomicile(String idCard); |
| | | } |
| | |
| | | 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()); |
| | | } |
| | | |
New file |
| | |
| | | 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.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.vaccines.VaccinesEnrollByAdminVO; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesEnrollUserByAppVO; |
| | | 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 com.panzhihua.service_community.model.dos.ComMngVaccinesEnrollRecordDO; |
| | | import com.panzhihua.service_community.service.ComMngVaccinesEnrollRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:17:53 |
| | | * @describe 疫苗报名记录表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComMngVaccinesEnrollRecordServiceImpl extends ServiceImpl<ComMngVaccinesEnrollRecordDAO, ComMngVaccinesEnrollRecordDO> implements ComMngVaccinesEnrollRecordService { |
| | | |
| | | @Resource |
| | | private ComMngVaccinesDAO comMngVaccinesDAO; |
| | | |
| | | /** |
| | | * 小程序-疫苗类型对应家庭成员接种列表 |
| | | * @return 疫苗类型对应家庭成员接种列表 |
| | | */ |
| | | @Override |
| | | public R getVaccinesUserListByApp(VaccinesEnrollUserByAppDTO enrollUserByAppDTO){ |
| | | //查询当前用户的家庭成员列表 |
| | | List<VaccinesEnrollUserByAppVO> userLists = new ArrayList<>(); |
| | | //将自己的信息组装进家庭成员列表中 |
| | | VaccinesEnrollUserByAppVO ownUser = this.baseMapper.getSysUser(enrollUserByAppDTO.getUserId()); |
| | | if(ownUser != null){ |
| | | ownUser.setIsUser(1); |
| | | //计算年龄 |
| | | ownUser.setAge(IdCard.IdNOToAge(ownUser.getIdCard())); |
| | | userLists.add(ownUser); |
| | | } |
| | | List<VaccinesEnrollUserByAppVO> userList = this.baseMapper.getFamilyUserList(enrollUserByAppDTO.getUserId()); |
| | | if(!userList.isEmpty()){ |
| | | userLists.addAll(userList); |
| | | } |
| | | |
| | | if(!userLists.isEmpty()){ |
| | | userLists.forEach(user -> { |
| | | 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()) |
| | | .eq(ComMngVaccinesEnrollRecordDO::getFamilyUserType,user.getIsUser())); |
| | | if(enrollRecordDO != null){ |
| | | user.setIsEnroll(VaccinesEnrollUserByAppVO.isEnroll.yes); |
| | | }else{ |
| | | user.setIsEnroll(VaccinesEnrollUserByAppVO.isEnroll.no); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | List<VaccinesEnrollUserByAppVO> newUserLists = userLists.stream().sorted(Comparator.comparing(VaccinesEnrollUserByAppVO::getIsEnroll).reversed() |
| | | .thenComparing(Comparator.comparing(VaccinesEnrollUserByAppVO::getCreateAt).reversed())).collect(Collectors.toList()); |
| | | return R.ok(newUserLists); |
| | | } |
| | | |
| | | /** |
| | | * 用户疫苗报名 |
| | | * @param enrollByAppDTO 请求参数 |
| | | * @return 报名结果 |
| | | */ |
| | | @Override |
| | | public R VaccinesEnrollByApp(VaccinesEnrollByAppDTO enrollByAppDTO){ |
| | | //查询疫苗信息 |
| | | ComMngVaccinesDO vaccinesDO = comMngVaccinesDAO.selectById(enrollByAppDTO.getVaccinesId()); |
| | | if(vaccinesDO == null){ |
| | | return R.fail("未找到到疫苗信息"); |
| | | } |
| | | List<ComMngVaccinesEnrollRecordDO> vaccinesEnrollRecordDOList = new ArrayList<>(); |
| | | if(!enrollByAppDTO.getEnrollUserList().isEmpty()){ |
| | | for (EnrollUserByAppDTO userByAppDTO:enrollByAppDTO.getEnrollUserList()) { |
| | | ComMngVaccinesEnrollRecordDO enrollRecordDO = this.baseMapper.selectOne(new QueryWrapper<ComMngVaccinesEnrollRecordDO>() |
| | | .lambda().eq(ComMngVaccinesEnrollRecordDO::getFamilyUserType,userByAppDTO.getIsUser()) |
| | | .eq(ComMngVaccinesEnrollRecordDO::getFamilyUserId,userByAppDTO.getUserId()) |
| | | .eq(ComMngVaccinesEnrollRecordDO::getUserId,enrollByAppDTO.getUserId()) |
| | | .eq(ComMngVaccinesEnrollRecordDO::getType,enrollByAppDTO.getVaccinesId())); |
| | | if(enrollRecordDO != null){ |
| | | continue; |
| | | } |
| | | //报名疫苗填充对象 |
| | | 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); |
| | | } |
| | | } |
| | | if(!vaccinesEnrollRecordDOList.isEmpty()){ |
| | | this.saveBatch(vaccinesEnrollRecordDOList); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 查询疫苗登记列表 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 登记列表 |
| | | */ |
| | | @Override |
| | | public R getVaccinesEnrollListByAdmin(VaccinesEnrollByAdminDTO 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)); |
| | | } |
| | | } |
New file |
| | |
| | | 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; |
| | | import com.panzhihua.service_community.dao.ComMngVaccinesEnrollRecordDAO; |
| | | import com.panzhihua.service_community.dao.ComMngVaccinesInoculationRecordDAO; |
| | | import com.panzhihua.service_community.model.dos.ComMngVaccinesInoculationRecordDO; |
| | | import com.panzhihua.service_community.service.ComMngVaccinesEnrollRecordService; |
| | | import com.panzhihua.service_community.service.ComMngVaccinesInoculationRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:17:59 |
| | | * @describe 疫苗接种记录表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComMngVaccinesInoculationRecordServiceImpl extends ServiceImpl<ComMngVaccinesInoculationRecordDAO, ComMngVaccinesInoculationRecordDO> implements ComMngVaccinesInoculationRecordService { |
| | | |
| | | @Resource |
| | | private ComMngVaccinesEnrollRecordDAO comMngVaccinesEnrollRecordDAO; |
| | | |
| | | @Override |
| | | public R getVaccinesUserInoculationListByApp(Long userId){ |
| | | //查询当前用户的家庭成员列表 |
| | | List<VaccinesEnrollUserByAppVO> userLists = comMngVaccinesEnrollRecordDAO.getFamilyUserList(userId); |
| | | List<Long> userIds = userLists.stream().map(comPbActivityMemberDO -> comPbActivityMemberDO.getUserId()).collect(Collectors.toList()); |
| | | 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)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | 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.VaccinesByAdminDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesByAppVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComMngVaccinesDAO; |
| | | import com.panzhihua.service_community.model.dos.ComMngVaccinesDO; |
| | | import com.panzhihua.service_community.service.ComMngVaccinesService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-05-19 14:17:46 |
| | | * @describe 疫苗分类表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComMngVaccinesServiceImpl extends ServiceImpl<ComMngVaccinesDAO, ComMngVaccinesDO> implements ComMngVaccinesService { |
| | | |
| | | /** |
| | | * 小程序-查询疫苗分类列表 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | @Override |
| | | public R getVaccinesListByApp(){ |
| | | List<ComMngVaccinesDO> vaccinesDOList = this.baseMapper.selectList(new QueryWrapper<ComMngVaccinesDO>().lambda().eq(ComMngVaccinesDO::getStatus,ComMngVaccinesDO.status.yes)); |
| | | List<VaccinesByAppVO> vaccinesList = new ArrayList<>(); |
| | | if(!vaccinesDOList.isEmpty()){ |
| | | vaccinesDOList.forEach(vaccines ->{ |
| | | VaccinesByAppVO vaccinesVO = new VaccinesByAppVO(); |
| | | BeanUtils.copyProperties(vaccines,vaccinesVO); |
| | | vaccinesList.add(vaccinesVO); |
| | | }); |
| | | } |
| | | return R.ok(vaccinesList); |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-查询疫苗分类列表 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 疫苗分类列表 |
| | | */ |
| | | @Override |
| | | public R getVaccinesListByAdmin(VaccinesByAdminDTO vaccinesByAdminDTO){ |
| | | return R.ok(this.baseMapper.getVaccinesByName(new Page<ComMngVaccinesDO>(vaccinesByAdminDTO.getPageNum(),vaccinesByAdminDTO.getPageSize()),vaccinesByAdminDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 修改疫苗分类信息 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @Override |
| | | public R editVaccinesByAdmin(VaccinesByAdminDTO vaccinesByAdminDTO){ |
| | | ComMngVaccinesDO vaccinesDO = this.baseMapper.selectById(vaccinesByAdminDTO.getId()); |
| | | if(vaccinesDO == null){ |
| | | return R.fail("未找到疫苗分类记录"); |
| | | } |
| | | if(StringUtils.isNotEmpty(vaccinesByAdminDTO.getName())){ |
| | | vaccinesDO.setName(vaccinesByAdminDTO.getName()); |
| | | } |
| | | if(StringUtils.isNotEmpty(vaccinesByAdminDTO.getDescribe())){ |
| | | vaccinesDO.setDescribe(vaccinesByAdminDTO.getDescribe()); |
| | | } |
| | | if(this.baseMapper.updateById(vaccinesDO) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增疫苗分类信息 |
| | | * @param vaccinesByAdminDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | public R addVaccinesByAdmin(VaccinesByAdminDTO vaccinesByAdminDTO){ |
| | | ComMngVaccinesDO vaccinesDO = new ComMngVaccinesDO(); |
| | | BeanUtils.copyProperties(vaccinesByAdminDTO,vaccinesDO); |
| | | if(this.baseMapper.insert(vaccinesDO) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除疫苗分类信息 |
| | | * @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(); |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthFeedbackDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthFeedbackVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthVO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.EldersAuthFeedbackService; |
| | | import com.panzhihua.service_community.service.EldersAuthService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.BeanUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-04-14 15:03:01 |
| | | * @describe 订单表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class EldersAuthFeedbackServiceImpl extends ServiceImpl<EldersAuthFeedbackDAO, EldersAuthFeedbackDO> implements EldersAuthFeedbackService { |
| | | |
| | | @Resource |
| | | private EldersAuthFeedbackDAO eldersAuthFeedbackDAO; |
| | | /** |
| | | * 新增高龄认证社区反馈 |
| | | * @param eldersAuthFeedbackAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | public R add(EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO){ |
| | | EldersAuthFeedbackDO eldersAuthFeedbackDO = new EldersAuthFeedbackDO(); |
| | | BeanUtils.copyProperties(eldersAuthFeedbackAddDTO, eldersAuthFeedbackDO); |
| | | if(eldersAuthFeedbackDAO.insert(eldersAuthFeedbackDO)>0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 修改高龄认证社区反馈 |
| | | * @param eldersAuthFeedbackEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | public R edit(EldersAuthFeedbackEditDTO eldersAuthFeedbackEditDTO){ |
| | | EldersAuthFeedbackDO eldersAuthFeedbackDO = new EldersAuthFeedbackDO(); |
| | | BeanUtils.copyProperties(eldersAuthFeedbackEditDTO, eldersAuthFeedbackDO); |
| | | if(eldersAuthFeedbackDAO.updateById(eldersAuthFeedbackDO)>0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 分页查找高龄认证社区反馈 |
| | | * @param pageEldersAuthFeedbackDTO |
| | | * @return 维护结果 |
| | | */ |
| | | public R<IPage<EldersAuthFeedbackVO>> query(PageEldersAuthFeedbackDTO pageEldersAuthFeedbackDTO){ |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 删除高龄认证社区反馈 |
| | | * @param EldersAuthFeedbackDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | | public R delete(EldersAuthFeedbackDeleteDTO EldersAuthFeedbackDeleteDTO){ |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 查询高龄认证社区反馈详细信息 |
| | | * @param id 高龄认证社区反馈 id |
| | | * @return 查找结果 |
| | | */ |
| | | public R<EldersAuthFeedbackDetailsVO> eldersAuthFeedbackDetails(Long id){ |
| | | EldersAuthFeedbackDO eldersAuthFeedbackDO = eldersAuthFeedbackDAO.selectById(id); |
| | | if(eldersAuthFeedbackDO!=null) { |
| | | EldersAuthFeedbackDetailsVO eldersAuthFeedbackDetailsVO = new EldersAuthFeedbackDetailsVO(); |
| | | BeanUtils.copyProperties(eldersAuthFeedbackDO, eldersAuthFeedbackDetailsVO); |
| | | return R.ok(eldersAuthFeedbackDetailsVO); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthFeedbackVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthVO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.EldersAuthService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.BeanUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-04-14 15:03:01 |
| | | * @describe 订单表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class EldersAuthServiceImpl extends ServiceImpl<EldersAuthDAO, EldersAuthDO> implements EldersAuthService { |
| | | |
| | | @Resource |
| | | private EldersAuthDAO eldersAuthDAO; |
| | | |
| | | @Resource |
| | | private EldersAuthFeedbackDAO eldersAuthFeedbackDAO; |
| | | /** |
| | | * 新增高龄认证 |
| | | * @param eldersAuthAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | public R add(EldersAuthAddDTO eldersAuthAddDTO){ |
| | | EldersAuthDO eldersAuthDO = new EldersAuthDO(); |
| | | BeanUtils.copyProperties(eldersAuthAddDTO, eldersAuthDO); |
| | | eldersAuthDO.setCreateAt(new Date()); |
| | | eldersAuthDO.setCreateBy(eldersAuthAddDTO.getSumitUserId()); |
| | | if(eldersAuthDAO.insert(eldersAuthDO)>0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 修改高龄认证 |
| | | * @param eldersAuthEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | public R edit(EldersAuthEditDTO eldersAuthEditDTO){ |
| | | EldersAuthDO eldersAuthDO = new EldersAuthDO(); |
| | | BeanUtils.copyProperties(eldersAuthEditDTO, eldersAuthDO); |
| | | eldersAuthDO.setUpdateAt(new Date()); |
| | | eldersAuthDO.setUpdateBy(eldersAuthEditDTO.getSumitUserId()); |
| | | if(eldersAuthDAO.updateById(eldersAuthDO)>0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 分页查找高龄认证 |
| | | * @param pageEldersAuthDTO |
| | | * @return 维护结果 |
| | | */ |
| | | public R<IPage<EldersAuthVO>> query(PageEldersAuthDTO pageEldersAuthDTO){ |
| | | Page page = new Page<>(); |
| | | page.setSize(pageEldersAuthDTO.getPageSize()); |
| | | page.setCurrent(pageEldersAuthDTO.getPageNum()); |
| | | return R.ok(eldersAuthDAO.selectByPage(page, pageEldersAuthDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 删除高龄认证 |
| | | * @param EldersAuthDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | | public R delete(EldersAuthDeleteDTO EldersAuthDeleteDTO){ |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 查询高龄认证详细信息 |
| | | * @param id 高龄认证 id |
| | | * @return 查找结果 |
| | | */ |
| | | public R<EldersAuthDetailsVO> eldersAuthDetails(Long id){ |
| | | EldersAuthDetailsVO eldersAuthDetailsVO = eldersAuthDAO.selectDetails(id); |
| | | if(eldersAuthDetailsVO!=null) { |
| | | //社区反馈 |
| | | List<EldersAuthFeedbackDO> list = |
| | | eldersAuthFeedbackDAO.selectList(new LambdaQueryWrapper<EldersAuthFeedbackDO>() |
| | | .eq(EldersAuthFeedbackDO::getAuthId, eldersAuthDetailsVO.getId())); |
| | | List<EldersAuthFeedbackVO> listVO = new ArrayList<>(); |
| | | list.forEach(feedDo ->{ |
| | | EldersAuthFeedbackVO eldersAuthFeedbackVO = new EldersAuthFeedbackVO(); |
| | | BeanUtils.copyProperties(feedDo, eldersAuthFeedbackVO); |
| | | listVO.add(eldersAuthFeedbackVO); |
| | | }); |
| | | eldersAuthDetailsVO.setEldersAuthFeedbackVOList(listVO); |
| | | return R.ok(eldersAuthDetailsVO); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | /** |
| | | * 新增高龄认证社区反馈 |
| | | * @param eldersAuthFeedbackAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | public R addFeedback(EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO){ |
| | | EldersAuthFeedbackDO eldersAuthFeedbackDO = new EldersAuthFeedbackDO(); |
| | | eldersAuthFeedbackDO.setCreateBy(eldersAuthFeedbackAddDTO.getUserId()); |
| | | eldersAuthFeedbackDO.setCreateAt(new Date()); |
| | | BeanUtils.copyProperties(eldersAuthFeedbackAddDTO, eldersAuthFeedbackDO); |
| | | if(eldersAuthFeedbackDAO.insert(eldersAuthFeedbackDO)>0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查找高龄认证导出数据 |
| | | * @param pageEldersAuthDTO |
| | | * @return 维护结果 |
| | | */ |
| | | public R<List<ExcelElderAuthDTO>> queryExportData(PageEldersAuthDTO pageEldersAuthDTO){ |
| | | Page page = new Page<>(); |
| | | page.setSize(pageEldersAuthDTO.getPageSize()); |
| | | page.setCurrent(10000); |
| | | return R.ok(eldersAuthDAO.selectByParams(pageEldersAuthDTO)); |
| | | } |
| | | |
| | | @Override |
| | | public String queryDomicile(String idCard) { |
| | | return eldersAuthDAO.selectDomicile(idCard); |
| | | } |
| | | } |
| | |
| | | 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 -> { |