Browse Source

修改病人其他信息

master
zhizhi wu 5 years ago
parent
commit
9656fd542d
  1. 7
      ht/src/main/java/com/ccsens/ht/api/PatientController.java
  2. 4
      ht/src/main/java/com/ccsens/ht/service/IPatientService.java
  3. 4
      ht/src/main/java/com/ccsens/ht/service/PatientService.java

7
ht/src/main/java/com/ccsens/ht/api/PatientController.java

@ -1,6 +1,7 @@
package com.ccsens.ht.api;
import cn.hutool.core.util.IdcardUtil;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.ht.annotation.DoctorAudit;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.ht.bean.dto.PatientDto;
@ -144,7 +145,9 @@ public class PatientController {
@RequestMapping(value="/editPatientOtherMsg", method = RequestMethod.POST)
public JsonResponse editPatientOtherMsg(@RequestBody @ApiParam @Valid QueryDto<PatientDto.EditOtherMsg> params) {
log.info("查询其他信息请求参数:{}", params);
CodeEnum codeEnum = patientService.editPatientOtherMsg(params.getParam(), params.getUserId());
return JsonResponse.newInstance().ok(codeEnum);
long id = patientService.editPatientOtherMsg(params.getParam(), params.getUserId());
JSONObject json = new JSONObject();
json.put("id", id);
return JsonResponse.newInstance().ok(CodeEnum.SUCCESS, json);
}
}

4
ht/src/main/java/com/ccsens/ht/service/IPatientService.java

@ -41,11 +41,11 @@ public interface IPatientService {
* 编辑病友其他信息
* @param edit
* @param userId
*@return: com.ccsens.ptpro.util.CodeEnum
*@return:
*@Author: wuHuiJuan
*@date: 2019/11/20 11:33
*/
CodeEnum editPatientOtherMsg(PatientDto.EditOtherMsg edit, Long userId);
long editPatientOtherMsg(PatientDto.EditOtherMsg edit, Long userId);
/**
* 根据记录人查询病人信息

4
ht/src/main/java/com/ccsens/ht/service/PatientService.java

@ -220,7 +220,7 @@ public class PatientService implements IPatientService {
}
@Override
public CodeEnum editPatientOtherMsg(PatientDto.EditOtherMsg edit, Long userId) {
public long editPatientOtherMsg(PatientDto.EditOtherMsg edit, Long userId) {
String type = edit.getEditType();
JSONObject json = edit.getModel();
@ -243,6 +243,7 @@ public class PatientService implements IPatientService {
Method method = bean.getClass().getMethod(methodName, modelClass);
//方法调用(保存/修改)
method.invoke(bean, model);
return json.getLong("id");
} catch (ClassNotFoundException e) {
log.error("编辑病人其他信息反射异常",e);
throw new BaseException(CodeEnum.PARAM_ERROR);
@ -256,6 +257,5 @@ public class PatientService implements IPatientService {
log.error("编辑病人其他信息反射异常",e);
throw new BaseException(CodeEnum.PARAM_ERROR);
}
return CodeEnum.SUCCESS;
}
}

Loading…
Cancel
Save