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(); }