重要关爱人员resource层添加巡查记录接口。

service层添加判断(系统间调用,由于没有登录信息,所以setSaveInfo()方法报错)
This commit is contained in:
Renpc-kilig 2022-01-17 15:12:15 +08:00
parent 02c635e50d
commit 19a43ae9b1
2 changed files with 66 additions and 1 deletions

View File

@ -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<List<Map<String, Object>>> listPageKeyPeopleConcernsVisit(ListPage page) throws SearchException {
Map<String, Object> 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<String, Object> getKeyPeopleConcernsVisit() throws SearchException {
Map<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> params = requestParams();
return basePopulationInfoService.getBasePopulationInfo(params);
}
}

View File

@ -65,7 +65,9 @@ public class KeyPeopleConcernsServiceImpl extends DefaultBaseService implements
Map<String, Object> 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();
}