From 19a43ae9b13beb918d70b7b7f1ce0aa1e27a8851 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Mon, 17 Jan 2022 15:12:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E8=A6=81=E5=85=B3=E7=88=B1=E4=BA=BA?= =?UTF-8?q?=E5=91=98resource=E5=B1=82=E6=B7=BB=E5=8A=A0=E5=B7=A1=E6=9F=A5?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=8E=A5=E5=8F=A3=E3=80=82=20service?= =?UTF-8?q?=E5=B1=82=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD(=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E9=97=B4=E8=B0=83=E7=94=A8=EF=BC=8C=E7=94=B1=E4=BA=8E?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E7=99=BB=E5=BD=95=E4=BF=A1=E6=81=AF=EF=BC=8C?= =?UTF-8?q?=E6=89=80=E4=BB=A5setSaveInfo()=E6=96=B9=E6=B3=95=E6=8A=A5?= =?UTF-8?q?=E9=94=99)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../KeyPeopleConcernsResourceController.java | 63 +++++++++++++++++++ .../impl/KeyPeopleConcernsServiceImpl.java | 4 +- 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/src/main/java/cn/com/tenlion/commonpopulation/controller/resource/keypeopleconcerns/KeyPeopleConcernsResourceController.java b/src/main/java/cn/com/tenlion/commonpopulation/controller/resource/keypeopleconcerns/KeyPeopleConcernsResourceController.java index 4bfd46a..54012c2 100644 --- a/src/main/java/cn/com/tenlion/commonpopulation/controller/resource/keypeopleconcerns/KeyPeopleConcernsResourceController.java +++ b/src/main/java/cn/com/tenlion/commonpopulation/controller/resource/keypeopleconcerns/KeyPeopleConcernsResourceController.java @@ -1,5 +1,7 @@ package cn.com.tenlion.commonpopulation.controller.resource.keypeopleconcerns; +import cn.com.tenlion.commonpopulation.pojo.dtos.basepopulationinfo.BasePopulationInfoDTO; +import cn.com.tenlion.commonpopulation.service.basepopulationinfo.IBasePopulationInfoService; import cn.com.tenlion.commonpopulation.service.keypeopleconcerns.IKeyPeopleConcernsService; import ink.wgink.common.base.DefaultBaseController; import ink.wgink.exceptions.RemoveException; @@ -30,6 +32,8 @@ public class KeyPeopleConcernsResourceController extends DefaultBaseController { @Autowired private IKeyPeopleConcernsService keyPeopleConcernsService; + @Autowired + private IBasePopulationInfoService basePopulationInfoService; @ApiOperation(value = "重要关爱人群-分页列表", notes = "重要关爱人群-分页列表") @ApiImplicitParams({ @@ -65,4 +69,63 @@ public class KeyPeopleConcernsResourceController extends DefaultBaseController { public SuccessResult remove(@PathVariable("ids") String ids) throws RemoveException { return keyPeopleConcernsService.removeKeyPeopleConcerns(ids); } + + @ApiOperation(value = "重要关爱人群回访分页列表", notes = "重要关爱人群回访分页列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-page-key-people-concerns-visit") + public SuccessResultList>> listPageKeyPeopleConcernsVisit(ListPage page) throws SearchException { + Map params = requestParams(); + page.setParams(params); + return keyPeopleConcernsService.listPageKeyPeopleConcernsVisit(page); + } + + @ApiOperation(value = "回访详情", notes = "回访详情") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get-key-people-concerns-visit") + public Map getKeyPeopleConcernsVisit() throws SearchException { + Map params = requestParams(); + return keyPeopleConcernsService.getKeyPeopleConcernsVisit(params); + } + + @ApiOperation(value = "修改重点人员回访", notes = "修改重点人员回访") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("update-key-people-concerns-visit/{keyPeopleConcernsId}") + public SuccessResult updateKeyPeopleConcernsVisit(@PathVariable("keyPeopleConcernsId") String keyPeopleConcernsId, + @RequestBody Map params) throws SaveException { + params.put("keyPeopleConcernsId",keyPeopleConcernsId); + return keyPeopleConcernsService.updateKeyPeopleConcernsVisit(params); + } + + @ApiOperation(value = "删除回访记录(id列表)", notes = "删除回访记录(id列表)") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("remove-key-people-concerns-visit/{ids}") + public SuccessResult removeKeyPeopleConcernsVisit(@PathVariable("ids") String ids) throws RemoveException { + return keyPeopleConcernsService.removeKeyPeopleConcernsVisit(ids); + } + + @ApiOperation(value = "新增重要关爱人群回访", notes = "新增重要关爱人群回访") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("save-key-people-concerns-visit") + public SuccessResult saveKeyPeopleConcernsVisit(@RequestBody Map params) throws SaveException { + return keyPeopleConcernsService.saveKeyPeopleConcernsVisit(params); + } + + @ApiOperation(value = "人员信息基础(检索条件查询一条)", notes = "人员信息基础(检索条件查询一条)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "idCardNumber", value = "身份证号", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("getbasepopulationinfo") + public BasePopulationInfoDTO getBasePopulationInfo() throws SearchException { + Map params = requestParams(); + return basePopulationInfoService.getBasePopulationInfo(params); + } } diff --git a/src/main/java/cn/com/tenlion/commonpopulation/service/keypeopleconcerns/impl/KeyPeopleConcernsServiceImpl.java b/src/main/java/cn/com/tenlion/commonpopulation/service/keypeopleconcerns/impl/KeyPeopleConcernsServiceImpl.java index 0ad4ac0..37a3edf 100644 --- a/src/main/java/cn/com/tenlion/commonpopulation/service/keypeopleconcerns/impl/KeyPeopleConcernsServiceImpl.java +++ b/src/main/java/cn/com/tenlion/commonpopulation/service/keypeopleconcerns/impl/KeyPeopleConcernsServiceImpl.java @@ -65,7 +65,9 @@ public class KeyPeopleConcernsServiceImpl extends DefaultBaseService implements Map temp = keyPeopleConcernsDao.getKeyPeopleConcernsById(params.get("keyPeopleConcernsId").toString()); params.put("fullName", temp.get("fullName").toString()); params.put("idCardNumber", temp.get("idCardNumber").toString()); - setSaveInfo(params); + if(null == params.get("creator")) { + setSaveInfo(params); + } keyPeopleConcernsDao.saveKeyPeopleConcernsVisit(params); return new SuccessResult(); }