浏览代码

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

# Conflicts:
#	patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerSynergyManageController.java
#	patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java
wangzhinan 6 年之前
父节点
当前提交
e719b4a4f3

+ 30 - 4
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerSynergyManageController.java

@ -16,10 +16,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@ -329,5 +326,34 @@ public class CustomerSynergyManageController extends BaseController {
            return write(-1,"获取失败!");
        }
    }
    @ApiOperation("新增临时随访记录(返回ID)")
    @RequestMapping(value = "/addFollowup", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
    @ResponseBody
    public String addFollowup(@ApiParam(name = "doctor", value = "医生code")
                              @RequestParam(value = "doctor", required = true) String doctor,
                              @ApiParam(name = "patient", value = "患者代码", defaultValue = "443a196ef8744536a531260eb26c05d7")
                              @RequestParam(value = "patient", required = true) String patient,
                              @ApiParam(name = "date", value = "下次随访时间", defaultValue = "2016-12-15 20:00:00")
                              @RequestParam(value = "date", required = true) String date,
                              @ApiParam(name = "followupType", value = "随访方式【字典FOLLOWUP_WAY_DICT】", defaultValue = "12")
                              @RequestParam(value = "followupType", required = true) String followupType,
                              @ApiParam(name = "followupClass", value = "随访类别【1.高血压 2.糖尿病 3高糖】", defaultValue = "1")
                              @RequestParam(value = "followupClass", required = true) String followupClass,
                              @ApiParam(name = "followupManagerStatus", value = "随访管理状态【字典FOLLOWUP_MANAGER_STATUS】", defaultValue = "1")
                              @RequestParam(value = "followupManagerStatus", required = false) String followupManagerStatus,
                              @ApiParam(name = "plandate", value = "下次随访时间", defaultValue = "2016-12-14 20:00:00")
                              @RequestParam(value = "plandate", required = false) String plandate) {
        try {
            String response = synergyManageService.addFollowup(doctor, patient, date, followupType, followupClass, followupManagerStatus,plandate);
            return write(200, "新增临时随访记录成功!", "data", response);
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "新增临时随访记录失败!" + e.getMessage());
        }
    }
}

+ 1 - 3
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java

@ -839,9 +839,8 @@ public class SynergyManageService extends BaseJpaService {
     * @param followupClass
     * @param followupManagerStatus
     * @param plandate
     * @param prescriptioncode
     */
    public String addFollowup(String doctor,String patient, String date, String followupType,String followupClass,String followupManagerStatus,String plandate,String prescriptioncode){
    public String addFollowup(String doctor,String patient, String date, String followupType,String followupClass,String followupManagerStatus,String plandate){
        String response = null;
        String url = wlyyUrl + "followup/addFollowup";
        Map<String, Object> params = new HashMap<>();
@ -852,7 +851,6 @@ public class SynergyManageService extends BaseJpaService {
        params.put("followupClass",followupClass);
        params.put("followupManagerStatus",followupManagerStatus);
        params.put("plandate",plandate);
        params.put("prescriptioncode",prescriptioncode);
        try {
            response = httpClientUtil.post(url, params);
        } catch (Exception e) {

+ 7 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java

@ -66,6 +66,7 @@ public class SynergyManageService extends BaseService {
        JSONArray array = new JSONArray();
        String patientCode1 = null;
        Doctor doctor1 = doctorDao.findByCode(doctor);
        StringBuffer buffer = new StringBuffer();
        for (String patientCode:patientSet){
            if (patientSet.size() == 1){
                patientCode1 = patientCode;
@ -74,6 +75,7 @@ public class SynergyManageService extends BaseService {
            com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject();
            object.put("servicePatientCode",patient.getCode());
            object.put("servicePatientName",patient.getName());
            buffer.append(patient.getName()+",");
            object.put("ssc",patient.getSsc());
            object.put("idcard",patient.getIdcard());
            object.put("mobile",patient.getMobile());
@ -84,6 +86,7 @@ public class SynergyManageService extends BaseService {
            object.put("townName",hospital.getTownName());
            array.add(object);
        }
        buffer.deleteCharAt(buffer.length()-1);
        com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject();
        object.put("type",type);
        object.put("serviceTime",serviceDate);
@ -94,6 +97,8 @@ public class SynergyManageService extends BaseService {
        object.put("hospitalName",doctor1.getHospitalName());
        object.put("createUserType",1);
        object.put("remark",remark);
        object.put("servicerCount",patientSet.size());
        object.put("servicerKey",buffer);
        if (type == 3){
            Followup followup = new Followup();
            followup.setDoctorCode(doctor1.getCode());
@ -127,9 +132,10 @@ public class SynergyManageService extends BaseService {
            object.put("relationCode",objectId);
            object.put("relationCodeName","疾病筛查");
        }
        String url = customerUrl + "followup/saveFollowupProjectData";
        String url = customerUrl + "synergy/doctor/createWorkorder";
        Map<String, String> params = new HashMap<>();
        params.put("servicers",array.toJSONString());
        params.put("workorder",object.toJSONString());
        try {
            response = httpClientUtil.httpPost(url,params);
        } catch (Exception e) {