Sfoglia il codice sorgente

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

yeshijie 7 anni fa
parent
commit
5d570a3c0c
24 ha cambiato i file con 1518 aggiunte e 54 eliminazioni
  1. 2 1
      common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionInfo.java
  2. 603 0
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/controller/BaseController.java
  3. 19 0
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/controller/medicine/PhysicalExaminationController.java
  4. 4 0
      patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/service/PhysicalExaminationService.java
  5. 120 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/common/account/CustomerController.java
  6. 279 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/yueren/YueRenController.java
  7. 61 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/PatientFamilyMember.java
  8. 2 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/PatientDao.java
  9. 25 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/PatientFamilyMemberDao.java
  10. 9 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/SignFamilyDao.java
  11. 2 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/UserDao.java
  12. 64 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/account/CustomerService.java
  13. 182 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/family/FamilyMemberService.java
  14. 3 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/patient/AdminPatientService.java
  15. 41 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/sign/FamilyContractService.java
  16. 6 2
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/sign/SignFamilyService.java
  17. 7 1
      patient-co-manage/wlyy-manage/src/main/resources/application.yml
  18. 51 10
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/job/ZyDictJob.java
  19. 4 4
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/web/quota/JobController.java
  20. 11 23
      patient-co/patient-co-wlyy-job/src/main/resources/banner.txt
  21. 14 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java
  22. 5 5
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/ZyDictService.java
  23. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java
  24. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionInfoController.java

+ 2 - 1
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionInfo.java

@ -13,7 +13,8 @@ import javax.persistence.Table;
@Entity
@Entity
@Table(name = "wlyy_prescription_info")
@Table(name = "wlyy_prescription_info")
public class PrescriptionInfo extends IdEntity{
public class PrescriptionInfo extends IdEntity{
    //drugRate(频率:一天用次数)*dayCount(天数)*physicDose(单次用量)
    //
    private String code;                    //业务主键
    private String code;                    //业务主键
    private String prescriptionCode;      //处方code 关联表wlyy_prescription code
    private String prescriptionCode;      //处方code 关联表wlyy_prescription code
    private String drugCode;               //药品code
    private String drugCode;               //药品code

+ 603 - 0
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/controller/BaseController.java

@ -0,0 +1,603 @@
package com.yihu.mm.controller;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.entity.IdEntity;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
public class BaseController {
	private static Logger logger = LoggerFactory.getLogger(BaseController.class);
	@Autowired
	protected HttpServletRequest request;
	/**
	 * 获取排序字段名称
	 * @return
	 */
	public String getSortName() {
		return request.getParameter("sortname");
	}
	/**
	 * 获取排序方式ASC,DESC
	 * @return
	 */
	public String getSortOrder() {
		return request.getParameter("sortorder");
	}
	/**
	 * 獲取髮送請求用戶的uid
	 * @return
	 */
	public String getUID() {
		try {
			String userAgent = request.getHeader("userAgent");
			if (StringUtils.isEmpty(userAgent)) {
				userAgent = request.getHeader("User-Agent");
			}
			JSONObject json = new JSONObject(userAgent);
			return json.getString("uid");
		} catch (Exception e) {
			return null;
		}
	}
	public String getOpenid() {
		try {
			String userAgent = request.getHeader("userAgent");
			if (StringUtils.isEmpty(userAgent)) {
				userAgent = request.getHeader("User-Agent");
			}
			JSONObject json = new JSONObject(userAgent);
			return json.getString("openid");
		} catch (Exception e) {
			return null;
		}
	}
	/**
	 * 获取用户ID
	 * @return
	 */
	public long getId() {
		try {
			String userAgent = request.getHeader("userAgent");
			if (StringUtils.isEmpty(userAgent)) {
				userAgent = request.getHeader("User-Agent");
			}
			JSONObject json = new JSONObject(userAgent);
			return json.getLong("id");
		} catch (Exception e) {
			return 0;
		}
	}
	public String getIMEI() {
		try {
			String userAgent = request.getHeader("userAgent");
			if (StringUtils.isEmpty(userAgent)) {
				userAgent = request.getHeader("User-Agent");
			}
			JSONObject json = new JSONObject(userAgent);
			return json.getString("imei");
		} catch (Exception e) {
			return null;
		}
	}
	public String getToken() {
		try {
			String userAgent = request.getHeader("userAgent");
			if (StringUtils.isEmpty(userAgent)) {
				userAgent = request.getHeader("User-Agent");
			}
			JSONObject json = new JSONObject(userAgent);
			return json.getString("token");
		} catch (Exception e) {
			return null;
		}
	}
	public void error(Exception e) {
		logger.error(getClass().getName() + ":", e.getMessage());
		e.printStackTrace();
	}
	public void warn(Exception e) {
		logger.warn(getClass().getName() + ":", e.getMessage());
		e.printStackTrace();
	}
	/**
	 * 返回接口处理结果
	 * 
	 * @param code 结果码,成功为200
	 * @param msg 结果提示信息
	 * @return
	 */
	public String error(int code, String msg) {
		try {
			Map<Object, Object> map = new HashMap<Object, Object>();
			ObjectMapper mapper = new ObjectMapper();
			map.put("status", code);
			map.put("msg", msg);
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);
			return null;
		}
	}
	/**
	 * 接口处理成功
	 * @param msg
	 * @return
	 */
	public String success(String msg) {
		try {
			Map<Object, Object> map = new HashMap<Object, Object>();
			ObjectMapper mapper = new ObjectMapper();
			map.put("status", 200);
			map.put("msg", msg);
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);
			return null;
		}
	}
	public String write(int code, String msg) {
		try {
			Map<Object, Object> map = new HashMap<Object, Object>();
			ObjectMapper mapper = new ObjectMapper();
			map.put("status", code);
			map.put("msg", msg);
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);
			return null;
		}
	}
	/**
	 * 返回接口处理结果
	 * 
	 * 
	 * @param code 结果码,成功为200
	 * @param msg 结果提示信息
	 * @return
	 */
	public String write(int code, String msg, String key, List<?> list) {
		try {
			Map<Object, Object> map = new HashMap<Object, Object>();
			ObjectMapper mapper = new ObjectMapper();
			map.put("status", code);
			map.put("msg", msg);
			map.put(key, list);
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	/**
	 * 返回接口处理结果
	 * 
	 * 
	 * @param code 结果码,成功为200
	 * @param msg 结果提示信息
	 * @param value 结果数据
	 * @return
	 */
	public String write(int code, String msg, String key, JSONObject value) {
		try {
			JSONObject json = new JSONObject();
			json.put("status", code);
			json.put("msg", msg);
			json.put(key, value);
			return json.toString();
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	/**
	 * 返回接口处理结果
	 * 
	 * 
	 * @param code 结果码,成功为200
	 * @param msg 结果提示信息
	 * @param value 结果数据
	 * @return
	 */
	public String write(int code, String msg, String key, JSONArray value) {
		try {
			JSONObject json = new JSONObject();
			json.put("status", code);
			json.put("msg", msg);
			json.put(key, value);
			return json.toString();
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	/**
	 * 返回接口处理结果
	 * 
	 * 
	 * @param code 结果码,成功为200
	 * @param msg 结果提示信息
	 * @param total 总数
	 * @param value 结果数据
	 * @return
	 */
	public String write(int code, String msg, int total, String key, JSONArray value) {
		try {
			JSONObject json = new JSONObject();
			json.put("status", code);
			json.put("msg", msg);
			json.put("total", total);
			json.put(key, value);
			return json.toString();
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	/**
	 * 返回接口处理结果
	 * 
	 * 
	 * @param code 结果码,成功为200
	 * @param msg 结果提示信息
	 * @param value 结果数据
	 * @return
	 */
	public String write(int code, String msg, String key, Object value) {
		try {
			Map<Object, Object> map = new HashMap<Object, Object>();
			ObjectMapper mapper = new ObjectMapper();
			map.put("status", code);
			map.put("msg", msg);
			map.put(key, value);
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	/**
	 * 返回接口处理结果
	 * 
	 * 
	 * @param code 结果码,成功为200
	 * @param msg 结果提示信息
	 * @return
	 */
	public String write(int code, String msg, String key, Page<?> list) {
		try {
			Map<Object, Object> map = new HashMap<Object, Object>();
			ObjectMapper mapper = new ObjectMapper();
			map.put("status", code);
			map.put("msg", msg);
			// 是否为第一页
			map.put("isFirst", list.isFirst());
			// 是否为最后一页
			map.put("isLast", list.isLast());
			// 总条数
			map.put("total", list.getTotalElements());
			// 总页数
			map.put("totalPages", list.getTotalPages());
			map.put(key, list.getContent());
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	/**
	 * 返回接口处理结果
	 * 
	 * 
	 * @param code 结果码,成功为200
	 * @param msg 结果提示信息
	 * @return
	 */
	public String write(int code, String msg, String key, Page<?> page, JSONArray array) {
		try {
			JSONObject json = new JSONObject();
			json.put("status", code);
			json.put("msg", msg);
			// 是否为第一页
			json.put("isFirst", page.isFirst());
			// 是否为最后一页
			json.put("isLast", page.isLast());
			// 总条数
			json.put("total", page.getTotalElements());
			// 总页数
			json.put("totalPages", page.getTotalPages());
			json.put(key, array);
			return json.toString();
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	/**
	 * 返回接口处理结果
	 * 
	 * 
	 * @param code 结果码,成功为200
	 * @param msg 结果提示信息
	 * @param value 结果数据
	 * @return
	 */
	public String write(int code, String msg, String key, Map<?, ?> value) {
		try {
			Map<Object, Object> map = new HashMap<Object, Object>();
			ObjectMapper mapper = new ObjectMapper();
			map.put("status", code);
			map.put("msg", msg);
			map.put(key, value);
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	/**
	* 返回接口处理结果
	*
	* @param code 结果码,成功为200
	* @param msg 结果提示信息
	* @param value 结果数据
	* @return
	*/
	public String write(int code, String msg, String key, String value) {
		try {
			Map<Object, Object> map = new HashMap<Object, Object>();
			ObjectMapper mapper = new ObjectMapper();
			map.put("status", code);
			map.put("msg", msg);
			map.put(key, value);
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	/**
	* 返回接口处理结果
	*
	*
	* @param code 结果码,成功为200
	* @param msg 结果提示信息
	* @return
	*/
	public String write(int code, String msg, String key, IdEntity entity) {
		try {
			Map<Object, Object> map = new HashMap<Object, Object>();
			ObjectMapper mapper = new ObjectMapper();
			map.put("status", code);
			map.put("msg", msg);
			map.put(key, entity);
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	/**
	 * 返回接口处理结果
	 * 
	 * 
	 * @param code 结果码,成功为200
	 * @param msg 结果提示信息
	 * @return
	 */
	public String write(int code, String msg, boolean isFirst, boolean isLast, long total, int totalPages, String key, Object values) {
		try {
			JSONObject json = new JSONObject();
			json.put("status", code);
			json.put("msg", msg);
			// 是否为第一页
			json.put("isFirst", isFirst);
			// 是否为最后一页
			json.put("isLast", isLast);
			// 总条数
			json.put("total", total);
			// 总页数
			json.put("totalPages", totalPages);
			json.put(key, values);
			return json.toString();
		} catch (Exception e) {
			logger.error("BaseController:", e.getMessage());
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	public String trimEnd(String param, String trimChars) {
		if (param.endsWith(trimChars)) {
			param = param.substring(0, param.length() - trimChars.length());
		}
		return param;
	}
	/**
	 * 无效用户消息返回
	 * @param e
	 * @param defaultCode
	 * @param defaultMsg
	 * @return
	 */
	public String invalidUserException(Exception e, int defaultCode, String defaultMsg) {
		try {
			// if (e instanceof UndeclaredThrowableException) {
			// UndeclaredThrowableException ute = (UndeclaredThrowableException) e;
			// InvalidUserException iue = (InvalidUserException) ute.getUndeclaredThrowable();
			// if (iue != null) {
			// return error(iue.getCode(), iue.getMsg());
			// }
			// }
			return error(defaultCode, defaultMsg);
		} catch (Exception e2) {
			return null;
		}
	}
	/**
	 * 返回表格列表数据
	 * @param code 状态码:0成功,非0失败
	 * @param errorMsg 错误消息
	 * @param page 当前页码
	 * @param rows 分页大小
	 * @param list 查询的结果集
	 * @return
	 */
	public String write(int code, String errorMsg, int page, int rows, Page<?> list) {
		try {
			JSONObject object = new JSONObject();
			ObjectMapper mapper = new ObjectMapper();
			object.put("successFlg", code == 0);
			object.put("errorMsg", errorMsg);
			// 是否为第一页
			object.put("errorCode", code);
			// 是否为最后一页
			object.put("currPage", page);
			// 分页大小
			object.put("pageSize", rows);
			// 总条数
			object.put("totalCount", list.getTotalElements());
			// 总页数
			object.put("totalPage", list.getTotalPages());
			// 结果集
			object.put("detailModelList", list.getContent());
			 return object.toString();
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	
	public String write(int code, String errorMsg, int page, int rows, List<?> list) {
		try {
			Map<Object, Object> map = new HashMap<Object, Object>();
			ObjectMapper mapper = new ObjectMapper();
			map.put("successFlg", code == 0);
			map.put("errorMsg", errorMsg);
			// 是否为第一页
			map.put("errorCode", code);
			// 是否为最后一页
			map.put("currPage", page);
			// 分页大小
			map.put("pageSize", rows);
			// 总条数
			map.put("totalCount", list.size());
			// 总页数
			map.put("totalPage", 1);
			// 结果集
			map.put("detailModelList", list);
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	
	public String error(int code, String errorMsg, int page, int rows) {
		try {
			Map<Object, Object> map = new HashMap<Object, Object>();
			ObjectMapper mapper = new ObjectMapper();
			map.put("successFlg", code == 0);
			map.put("errorMsg", errorMsg);
			// 是否为第一页
			map.put("errorCode", code);
			// 是否为最后一页
			map.put("currPage", page);
			// 分页大小
			map.put("pageSize", rows);
			// 总条数
			map.put("totalCount", 0);
			// 总页数
			map.put("totalPage", 0);
			// 结果集
			map.put("detailModelList", null);
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
    //json串转集合
    public <T> Collection<T> jsonToEntities(String jsonDate, Collection<T> targets, Class<T> targetCls) {
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            List modelList = objectMapper.readValue(jsonDate,List.class);
            Iterator ex = modelList.iterator();
            while(ex.hasNext()) {
                Object aModelList = ex.next();
                String objJsonData = objectMapper.writeValueAsString(aModelList);
                T model = objectMapper.readValue(objJsonData, targetCls);
                targets.add(model);
            }
            return targets;
        } catch (Exception var8) {
            var8.printStackTrace();
            return null;
        }
    }
    public String write(int code, String errorMsg, int page, int rows, long total, List<?> list) {
        try {
            Map<Object, Object> map = new HashMap<Object, Object>();
            ObjectMapper mapper = new ObjectMapper();
            map.put("successFlg", code == 0);
            map.put("errorMsg", errorMsg);
            // 是否为第一页
            map.put("errorCode", code);
            // 是否为最后一页
            map.put("currPage", page);
            // 分页大小
            map.put("pageSize", rows);
            // 总条数
            map.put("totalCount", total);
            // 总页数
            map.put("totalPage", 1);
            // 结果集
            map.put("detailModelList", list);
            return mapper.writeValueAsString(map);
        } catch (Exception e) {
            error(e);
            return error(-1, "服务器异常,请稍候再试!");
        }
    }
}

+ 19 - 0
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/controller/medicine/PhysicalExaminationController.java

@ -0,0 +1,19 @@
package com.yihu.mm.controller.medicine;
import com.yihu.mm.controller.BaseController;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/medicine/physicalExamination")
public class PhysicalExaminationController extends BaseController {
    @RequestMapping(value = "/findTest",produces="application/json;charset=UTF-8")
    @ResponseBody
    public String login(@ApiParam(name = "type", value = "账号", required = true)@RequestParam(required = false, name = "type") String type) throws Exception {
        return null;
    }
}

+ 4 - 0
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/service/PhysicalExaminationService.java

@ -0,0 +1,4 @@
package com.yihu.mm.service;
public class PhysicalExaminationService {
}

+ 120 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/common/account/CustomerController.java

@ -0,0 +1,120 @@
package com.yihu.wlyy.controller.common.account;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.entity.Patient;
import com.yihu.wlyy.entity.User;
import com.yihu.wlyy.repository.ManageDictDao;
import com.yihu.wlyy.service.manager.account.CustomerService;
import com.yihu.wlyy.service.manager.family.FamilyMemberService;
import com.yihu.wlyy.service.manager.patient.AdminPatientService;
import com.yihu.wlyy.service.manager.sign.SignFamilyService;
import com.yihu.wlyy.service.manager.user.UserService;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
/**
 * 用户登录的Controller.
 *
 * @author calvin
 */
@RestController
@RequestMapping(value = "/customer")
@SessionAttributes("current_user")
public class CustomerController extends BaseController {
    @Autowired
    private UserService userService;
    @Autowired
    private ManageDictDao manageDictDao;
    @Autowired
    private AdminPatientService patientService;
    @Autowired
    private CustomerService customerService;
    @Autowired
    private FamilyMemberService familyMemberService;
    @Autowired
    private SignFamilyService signFamilyService;
    @RequestMapping(value = "/login",produces="application/json;charset=UTF-8")
    @ResponseBody
    public String login(@ApiParam(name = "userName", value = "账号", required = true)@RequestParam(required = true, name = "userName") String userName,
                               @ApiParam(name = "password", value = "密码", required = true)@RequestParam(required = true, name = "password") String password,
                               HttpServletRequest req, HttpServletResponse resp) throws Exception {
        User curUser = userService.userValidation(userName, password);
        if(curUser == null){
            return write(-1,"账号密码错误");
        }else{
            if(curUser.getType() == 3){
                curUser.setTypeName("客服管理员");
            } else if(curUser.getType() == 4){
                curUser.setTypeName("客服");
            }else{
                return write(-1,"该账号不是客服帐号");
            }
            req.getSession().setAttribute("userInfo",curUser);
            req.getSession().setAttribute("mobile", curUser.getMobile());
            req.getSession().setAttribute("code",curUser.getCode());
            req.getSession().setAttribute("name",curUser.getName());
            req.getSession().setAttribute("isLogin", "true");
            return write(1,"登入成功","user",curUser);
        }
    }
    /**
     *通过社保卡号或者身份证查找服务对象
     * @return
     */
    @RequestMapping(value = "/findServerInfo",produces="application/json;charset=UTF-8")
    @ResponseBody
    public String findServerInfo(@ApiParam(name = "idCard", value = "身份证号", required = false)@RequestParam(required = false, name = "idCard") String idCard,
                                 @ApiParam(name = "ssc", value = "社保卡号", required = false)@RequestParam(required = false, name = "ssc") String ssc) throws Exception {
        if(StringUtils.isBlank(idCard) && StringUtils.isBlank(ssc)){
            return write(-1,"身份证号或者社保卡号至少填写一个");
        }
        //根据条件查询病人信息
        Patient patient = null;
        if(StringUtils.isBlank(idCard)){//身份证为空
            //根据社保卡号查询
            patient = patientService.findBySsc(ssc);
        }
        if(!StringUtils.isBlank(idCard)){//身份证不为空
            if(StringUtils.isBlank(ssc)){//社保卡号为空
                patient = patientService.findByIdcard(idCard);
            }else{//社保卡号不为空
                patient = patientService.findByIdcardAndSsc(idCard,ssc);
            }
        }
        if(patient ==null){
            return write(-1,"未查询到");
        }
        Map<String, Object> resp = customerService.findServerInfo(patient);
        resp.put("patient",patient);
        return write(1,"查询成功","data",resp);
    }
    /**
     *通过手机号查找服务对象
     * @return
     */
    @RequestMapping(value = "/findByMobile",produces="application/json;charset=UTF-8")
    @ResponseBody
    public String findByMobile(@ApiParam(name = "mobile", value = "手机号", required = false)@RequestParam(required = true, name = "mobile") String mobile) throws Exception {
        //根据条件查询病人信息
        Patient patient = patientService.findByMobile(mobile);
        if(patient ==null){
            return write(-1,"未查询到");
        }
        Map<String, Object> resp = customerService.findServerInfo(patient);
        resp.put("patient",patient);
        return write(1,"查询成功","data",resp);
    }
}

+ 279 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/yueren/YueRenController.java

@ -0,0 +1,279 @@
package com.yihu.wlyy.controller.manager.yueren;
import com.google.gson.Gson;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.util.HttpClientUtil;
import io.swagger.annotations.Api;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Map;
/**
 * Created by Administrator on 2017/8/14.
 */
@Controller
@RequestMapping("/yueren")
@Api(description = "调用越人接口")
public class YueRenController extends BaseController {
    @Value("${yueren.api}")
    private String api;
    //--预约模块 begin
    /**
     * 获取每个接口需要传递的key值
     * @return
     */
    @RequestMapping(value = "/phonekey", method = RequestMethod.POST)
    @ResponseBody
    public String getPhoneKey() {
        String postStr = remoteCall("/yueren/phonekey", new JSONObject());
        return postStr;
    }
    /**
     * 新增客户咨询预约单,如果是新客人,同时新增客户信息
     * @param key
     * @param sl_date 预约时间
     * @param sl_state 咨询状态
     * @param u_tel
     * @param u_name
     * @param u_sex
     * @param sh_id 门店编号
     * @param u_idnum 身份证号码
     * @param u_native 籍贯
     * @param u_birthday
     * @param u_province
     * @param u_city
     * @param u_area
     * @param u_address
     * @param sl_pass 报告单是否审核通过
     * @return
     */
    @RequestMapping(value = "insertslip", method = RequestMethod.POST)
    @ResponseBody
    public String insertSlip(String key, String sl_date,String sl_state,String u_tel, String u_name, String u_sex,
                             String sh_id, String u_idnum, String u_native, String u_birthday, String u_province,
                             String u_city,String u_area,String u_address, String sl_pass) {
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("sl_date", sl_date);
        params.put("sl_state", sl_state);
        params.put("u_tel", u_tel);
        params.put("u_name", u_name);
        params.put("u_sex", u_sex);
        params.put("sh_id", sh_id);
        params.put("u_idnum", u_idnum);
        params.put("u_native", u_native);
        params.put("u_birthday", u_birthday);
        params.put("u_province", u_province);
        params.put("u_city", u_city);
        params.put("u_area", u_area);
        params.put("u_address", u_address);
        params.put("sl_pass", sl_pass);
        String postStr = remoteCall("/yueren/insertslip", params);
        return postStr;
    }
    //--预约模块 end
    //--四诊模块 begin
    /**
     * 上传图片音频等附件
     * @param file 附件
     * @return
     */
    @RequestMapping(value = "/uploadattachment", method = RequestMethod.POST)
    @ResponseBody
    public String uploadAttachment(String file, String e_no) {
        JSONObject params = new JSONObject();
        params.put("file", file);
        String postStr = remoteCall("/yueren/uploadattachment", params);
        return postStr;
    }
    /**
     * 处理头像舌苔声音
     * @param key
     * @param at_id 文件id
     * @param answer 答案,格式固定为(”/attach/{{key}}/文件id/文件名称”)
     * @param answer_type 答案类型,备选数值(图片,录音,视频)
     * @param ct_id 预约编号
     * @param object_type 对象类型,备选数值(1,2,3)1脸型,2舌像,3录音
     * @return
     */
    @RequestMapping(value = "dillphoneimgdata", method = RequestMethod.POST)
    @ResponseBody
    public String inserTemp(String key, String at_id, String answer, String answer_type, String ct_id, String object_type) {
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("at_id", at_id);
        params.put("answer", answer);
        params.put("answer_type", answer_type);
        params.put("ct_id", ct_id);
        params.put("object_type", object_type);
        String postStr = remoteCall("/yueren/dillphoneimgdata", params);
        return postStr;
    }
    //--四诊模块 end
    //--答题模块 begin
    /**
     * 查找试卷
     * @param key
     * @param tp_type '问卷类型',//(备选值:1,2,4)1:初筛问卷,2:助理问卷,4:现场问卷,
     * @param sh_id 所属门店编号
     * @return
     */
    @RequestMapping(value = "findtest", method = RequestMethod.POST)
    @ResponseBody
    public String findTest(String key, String tp_type, String sh_id) {
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("tp_type", tp_type);
        params.put("sh_id", sh_id);
        String postStr = remoteCall("/yueren/findtest", params);
        return postStr;
    }
    /**
     * 查找试卷题目
     * @param key
     * @param ct_id 咨询编号
     * @param tp_id 试卷编号
     * @param pb_id 问题编号
     * @return
     */
    @RequestMapping(value = "giveproblem", method = RequestMethod.POST)
    @ResponseBody
    public String giveproblem(String key,String ct_id, String tp_id, String pb_id) {
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("ct_id", ct_id);
        params.put("tp_id", tp_id);
        params.put("pb_id", pb_id);
        String postStr = remoteCall("/yueren/giveproblem", params);
        return postStr;
    }
    /**
     *
     * @param key
     * @param ct_id 咨询编号
     * @param tp_id 试卷编号
     * @param pb_id 问题编号
     * @param dc_answer 答案数组
     * @return 将用户提交的试卷题目的答案进行保存
     */
    @RequestMapping(value = "handleproblem", method = RequestMethod.POST)
    @ResponseBody
    public String handleproblem(String key, String ct_id, String tp_id,String pb_id, String[] dc_answer) {
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("ct_id", ct_id);
        params.put("tp_id", tp_id);
        params.put("pb_id", pb_id);
        params.put("dc_answer", dc_answer);
        String postStr = remoteCall("/yueren/handleproblem", params);
        return postStr;
    }
    /**
     * 将用户提交的试卷题目的答案进行处理
     * @param key
     * @param ct_id 咨询编号
     * @return
     */
    @RequestMapping(value = "centralizedproblem", method = RequestMethod.POST)
    @ResponseBody
    public String centralizedproblem(String key, String ct_id) {
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("ct_id", ct_id);
        String postStr = remoteCall("/yueren/centralizedproblem", params);
        return postStr;
    }
    /**
     * 在生成报告单之前,必须调用这个接口,将风险预警中的因素中的所有病处理到影响中
     * @param key
     * @param ct_id 咨询编号
     * @return
     */
    @RequestMapping(value = "conclusionfactor", method = RequestMethod.POST)
    @ResponseBody
    public String conclusionFactor(String key, String ct_id) {
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("ct_id", ct_id);
        String postStr = remoteCall("/yueren/conclusionfactor", params);
        return postStr;
    }
    //--答题模块 end
    //--报告单模块 begin
    /**
     * 生成报告单
     * @param key
     * @param ct_id 咨询编号
     * @return
     */
    @RequestMapping(value = "insertconconhealth", method = RequestMethod.POST)
    @ResponseBody
    public String insertConsultConclusionHealth(String key, String ct_id) {
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("ct_id", ct_id);
        String postStr = remoteCall("/yueren/insertconconhealth", params);
        return postStr;
    }
    /**
     * 查找报告单结论
     * @param key
     * @param ct_id 咨询编号
     * @param reqtype 请求类型(备选数值1)
     * @return
     */
    @RequestMapping(value = "findconconhealth", method = RequestMethod.POST)
    @ResponseBody
    public String insertConsultConclusion(String key, String ct_id, String reqtype) {
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("ct_id", ct_id);
        params.put("reqtype", reqtype);
        String postStr = remoteCall("/yueren/findconconhealth", params);
        return postStr;
    }
    /**
     * 查找状态要素结论积分图及个人信息
     * @param key
     * @param ct_id 咨询编号
     * @return
     */
    @RequestMapping(value = "findintegral", method = RequestMethod.POST)
    @ResponseBody
    public String findIntegral(String key, String ct_id) {
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("ct_id", ct_id);
        String postStr = remoteCall("/yueren/findintegral", params);
        return postStr;
    }
    private String remoteCall(String url, JSONObject jsonDate) {
        try {
            String result = HttpClientUtil.postBody(api + url, jsonDate);
            return result;
        } catch (Exception e) {
            e.printStackTrace();
            return "{\"status\":500,\"exception\":\"连接出错\"}";
        }
    }
}

+ 61 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/PatientFamilyMember.java

@ -0,0 +1,61 @@
package com.yihu.wlyy.entity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 家庭成员表
 *
 * Created by lyr on 2016/10/17.
 */
@Entity
@Table(name = "wlyy_patient_family_member")
public class PatientFamilyMember extends IdEntity {
    // 居民cdoe
    private String patient;
    // 家庭成员
    private String familyMember;
    // 家庭关系
    private Integer familyRelation;
    //是否授权0:未授权,1:已授权,默认为1
    private Integer isAuthorize;
    // 操作日期
    private Date czrq;
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public String getFamilyMember() {
        return familyMember;
    }
    public void setFamilyMember(String familyMember) {
        this.familyMember = familyMember;
    }
    public Integer getFamilyRelation() {
        return familyRelation;
    }
    public void setFamilyRelation(Integer familyRelation) {
        this.familyRelation = familyRelation;
    }
    public Integer getIsAuthorize() {
        return isAuthorize;
    }
    public void setIsAuthorize(Integer isAuthorize) {
        this.isAuthorize = isAuthorize;
    }
    public Date getCzrq() {
        return czrq;
    }
    public void setCzrq(Date czrq) {
        this.czrq = czrq;
    }
}

+ 2 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/PatientDao.java

@ -84,4 +84,6 @@ public interface PatientDao extends PagingAndSortingRepository<Patient, Long>,Jp
	@Query(value = "SELECT DISTINCT p.* from wlyy_patient p LEFT JOIN wlyy_sign_family f on p.code = f.patient WHERE p.city = ?1 and p.mobile is not null and p.mobile!=''  and f.hospital in ?2 ",nativeQuery = true)
	@Query(value = "SELECT DISTINCT p.* from wlyy_patient p LEFT JOIN wlyy_sign_family f on p.code = f.patient WHERE p.city = ?1 and p.mobile is not null and p.mobile!=''  and f.hospital in ?2 ",nativeQuery = true)
	List<Patient> findByCityAndHospital(String city,String hospital[]);
	List<Patient> findByCityAndHospital(String city,String hospital[]);
	@Query("select p from Patient p where p.idcard=?1 and p.ssc=?2")
	Patient findByIdcardAndSsc(String idcard, String ssc);
}
}

+ 25 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/PatientFamilyMemberDao.java

@ -0,0 +1,25 @@
package com.yihu.wlyy.repository;
import com.yihu.wlyy.entity.PatientFamilyMember;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * 家庭成员
 * Created by hzp on 2017/02/23.
 */
public interface PatientFamilyMemberDao extends PagingAndSortingRepository<PatientFamilyMember, Long>,
        JpaSpecificationExecutor<PatientFamilyMember> {
    /**
     * 查找某个居民的家庭成员
     *
     * @param patient 居民
     * @return
     */
    @Query(value = "select pfm from PatientFamilyMember pfm where pfm.patient = ?1")
    List<PatientFamilyMember> findByPatient(String patient);
}

+ 9 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/SignFamilyDao.java

@ -11,6 +11,8 @@ import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Long>, JpaSpecificationExecutor<SignFamily> {
public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Long>, JpaSpecificationExecutor<SignFamily> {
@ -28,4 +30,11 @@ public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Lo
    @Query(value = "select distinct(a.id) from SignFamily a,Patient p where a.patient = p.code and p.address like ?1 ")
    @Query(value = "select distinct(a.id) from SignFamily a,Patient p where a.patient = p.code and p.address like ?1 ")
    Long[] findByTeamNameOrLeaderNameLike(String teamName,String leaderName);
    Long[] findByTeamNameOrLeaderNameLike(String teamName,String leaderName);
    @Query("select a from SignFamily a where a.patient = ?1 and a.status >= 0")
    List<SignFamily> findAllSignByPatient(String patient);
    @Query("select a from SignFamily a where a.patient = ?1 and a.status > 0 and expensesStatus=1")
    SignFamily findSignByPatient(String patient);
}
}

+ 2 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/UserDao.java

@ -16,7 +16,8 @@ import org.springframework.data.repository.PagingAndSortingRepository;
import com.yihu.wlyy.entity.User;
import com.yihu.wlyy.entity.User;
public interface UserDao extends PagingAndSortingRepository<User, Long>, JpaSpecificationExecutor<User> {
public interface UserDao extends PagingAndSortingRepository<User, Long>, JpaSpecificationExecutor<User> {
	
	User findByMobile(String mobile);
	User findByMobile(String mobile);
	
	
	User findByCode(String code);
	User findByCode(String code);

+ 64 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/account/CustomerService.java

@ -0,0 +1,64 @@
package com.yihu.wlyy.service.manager.account;
import com.yihu.wlyy.entity.Doctor;
import com.yihu.wlyy.entity.Patient;
import com.yihu.wlyy.entity.SignFamily;
import com.yihu.wlyy.service.manager.family.FamilyMemberService;
import com.yihu.wlyy.service.manager.hos.HosDoctorService;
import com.yihu.wlyy.service.manager.sign.SignFamilyService;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
@Service
public class CustomerService{
	@Autowired
	private FamilyMemberService familyMemberService;
	@Autowired
	private SignFamilyService signFamilyService;
	@Autowired
	private HosDoctorService hosDoctorService;
	public Map<String,Object> findServerInfo(Patient patient) throws Exception {
		Map<String, Object> resp = new HashMap<>();
		//查找家庭成员关系
		JSONArray familyMembers = familyMemberService.getAllFamilyMembers(patient.getCode());
		resp.put("family",familyMembers.toString());
		//查询家庭成员的每个签约信息    以及签约医生
		List signFamilys = new ArrayList<SignFamily>();
		List doctors = new ArrayList<Doctor>();
		Iterator<Object> familyMember = familyMembers.iterator();
		while (familyMember.hasNext()) {
			JSONObject jsonObjectbject = (JSONObject) familyMember.next();
			String code = jsonObjectbject.getString("code");//居民code
			SignFamily signFamily = signFamilyService.findByPatientCode(code);
			if(signFamily!=null){
				signFamilys.add(signFamily);
			}
			//查找签约的医生信息
			if(jsonObjectbject.has("doctor")){
				String doctor = jsonObjectbject.getString("doctor");//医生code
				if(StringUtils.isNotBlank(doctor)){
					Doctor doctorInfo = hosDoctorService.getDoctorByCode(doctor);
					if(null!=doctorInfo){
						doctors.add(doctorInfo);
					}
				}
			}
		}
		resp.put("signFamilys",signFamilys);
		resp.put("doctors",doctors);
		//查找签约医生
		return resp;
	}
}

+ 182 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/family/FamilyMemberService.java

@ -0,0 +1,182 @@
package com.yihu.wlyy.service.manager.family;
import com.yihu.wlyy.entity.Patient;
import com.yihu.wlyy.entity.SignFamily;
import com.yihu.wlyy.repository.PatientDao;
import com.yihu.wlyy.repository.PatientFamilyMemberDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.manager.sign.FamilyContractService;
import com.yihu.wlyy.util.CommonUtil;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * 家庭成员服务
 * <p>
 * Created by lyr on 2016/10/17.
 */
@Service
public class FamilyMemberService extends BaseService {
    @Autowired
    PatientFamilyMemberDao memberDao;
    @Autowired
    PatientDao patientDao;
    @Autowired
    JdbcTemplate jdbcTemplate;
    @Autowired
    FamilyContractService contractService;
    Map<Integer, String> relations = new HashMap<>();
    @PostConstruct
    public void init() {
        relations.put(0, "其他");
        relations.put(1, "父亲");
        relations.put(2, "母亲");
        relations.put(3, "老公");
        relations.put(4, "老婆");
        relations.put(5, "儿子");
        relations.put(6, "女儿");
        relations.put(7, "未知");
    }
    /**
     * 获取所有家庭成员,包括自己
     * @param patient
     * @return
     */
    public JSONArray getAllFamilyMembers(String patient){
        JSONArray resultArray = new JSONArray();
        resultArray.put(getPatient(patient));
        String sql = "select * " +
                " from " +
                "    wlyy_patient_family_member t1, " +
                "    wlyy_patient t2 " +
                " where " +
                "    t2.code in (select family_member from wlyy_patient_family_member where patient = ? ) " +
                "    and t1.patient = ? " +
                "    and t1.family_member = t2.code order by t1.family_relation ASC ";
        List<Map<String, Object>> result = jdbcTemplate.queryForList(sql, new Object[]{patient, patient});
        if (result != null && result.size() > 0) {
            JSONArray tem = new JSONArray();//存储其他
            for (Map<String, Object> map : result) {
                JSONObject obj = new JSONObject();
                SignFamily sign = contractService.findSignByPatient(map.get("code").toString());
                boolean ssSign = false;
                boolean jtSign = false;
                if(sign!=null){
                    if (sign.getType() == 1 ) {
                        ssSign = true;
                    } else if (sign.getType() == 2 ) {
                        jtSign = true;
                    }
                    obj.put("doctor",sign.getDoctor());
                    obj.put("doctorName",sign.getDoctorName());
                }
                Integer family_relation = Integer.valueOf(map.get("family_relation").toString());
                obj.put("code", map.get("code"));
                obj.put("name", map.get("name"));
                obj.put("sex", map.get("sex"));
                obj.put("isAuthorize", map.get("is_authorize"));//0:未授权,1:已授权
                obj.put("birthday", map.get("birthday"));
                obj.put("idcard", StringUtils.isEmpty(String.valueOf(map.get("idcard"))) ? "" : map.get("idcard").toString());
                obj.put("photo", map.get("photo"));
                obj.put("mobile", map.get("mobile"));
                obj.put("address", StringUtils.isEmpty(String.valueOf(map.get("address"))) ? "" : map.get("address"));
                obj.put("familyRelation", family_relation);
                obj.put("familyRelationName", relations.get(map.get("family_relation")));
                if (ssSign && jtSign) {
                    obj.put("signType", 3);
                } else if (!ssSign && jtSign) {
                    obj.put("signType", 2);
                } else if (ssSign && !jtSign) {
                    obj.put("signType", 1);
                } else {
                    obj.put("signType", 0);
                }
                if(family_relation==0){
                    tem.put(obj);
                }else {
                    resultArray.put(obj);
                }
            }
            if(tem.length()>0){
                for(int i =0;i<tem.length();i++){
                    resultArray.put(tem.get(i));
                }
            }
        }
        return resultArray;
    }
    public JSONObject getPatient(String patient){
        Patient p = patientDao.findByCode(patient);
        //查询签约信息
        JSONObject obj = new JSONObject();
        SignFamily sign = contractService.findSignByPatient(p.getCode());
        boolean ssSign = false;
        boolean jtSign = false;
        String doctor = null;
        String doctorName = null;
        if (sign != null) {
            if (sign.getType() == 1 ) {
                ssSign = true;
            } else if (sign.getType() == 2 ) {
                jtSign = true;
            }
            doctor = sign.getDoctor();
            doctorName = sign.getDoctorName();
        }
        obj.put("doctor",doctor);
        obj.put("doctorName",doctorName);
        obj.put("code", p.getCode());
        obj.put("name", p.getName());
        obj.put("sex", p.getSex());
        obj.put("birthday", p.getBirthday());
        obj.put("isAuthorize", 1);
        String idCard = StringUtils.isEmpty(p.getIdcard()) ? "" : p.getIdcard();
        obj.put("idcard", CommonUtil.getIdcardEncode(idCard));
        obj.put("idcardAll", idCard);
        obj.put("ssc", p.getSsc());
        obj.put("photo", StringUtils.isEmpty(p.getPhoto()) ? "" : p.getPhoto());
        obj.put("mobile", StringUtils.isEmpty(p.getMobile()) ? "" : p.getMobile());
        obj.put("address", StringUtils.isEmpty(p.getAddress()) ? "" : p.getAddress());
        obj.put("familyRelation", -1);
        obj.put("familyRelationName", "自己");
        obj.put("isAuthorize", 1);//0:未授权,1:已授权
        if (ssSign && jtSign) {
            obj.put("signType", 3);
        } else if (!ssSign && jtSign) {
            obj.put("signType", 2);
        } else if (ssSign && !jtSign) {
            obj.put("signType", 1);
        } else {
            obj.put("signType", 0);
        }
        return obj;
    }
}

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

@ -226,7 +226,9 @@ public class AdminPatientService extends BaseJpaService<Patient,Long> {
        return patientDao.findBySsc(ssc);
        return patientDao.findBySsc(ssc);
    }
    }
    public Patient findByIdcardAndSsc(String idcard,String ssc){
        return patientDao.findByIdcardAndSsc(idcard,ssc);
    }
    //修改状态
    //修改状态
    @Transactional
    @Transactional
    public boolean updataStatus(Integer status, Long patientId){
    public boolean updataStatus(Integer status, Long patientId){

+ 41 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/sign/FamilyContractService.java

@ -0,0 +1,41 @@
package com.yihu.wlyy.service.manager.sign;
import com.yihu.wlyy.entity.SignFamily;
import com.yihu.wlyy.repository.SignFamilyDao;
import com.yihu.wlyy.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
 * 家庭签约业务处理类
 *
 * @author George
 */
@Component
@Transactional
public class FamilyContractService extends BaseService {
    @Autowired
    private SignFamilyDao signFamilyDao;
    /**
     * 查询居民的所有签约
     *
     * @param patient
     * @return
     */
    public List<SignFamily> findAllSignByPatient(String patient) {
        return signFamilyDao.findAllSignByPatient(patient);
    }
    /**
     * 查询当前生效的签约
     * @param patient
     * @return
     */
    public SignFamily findSignByPatient(String patient){
        return signFamilyDao.findSignByPatient(patient);
    }
}

+ 6 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/sign/SignFamilyService.java

@ -121,8 +121,8 @@ public class SignFamilyService extends BaseJpaService<SignFamily,Long> {
        SignFamily signFamily = signFamilyDao.findOne(id);
        SignFamily signFamily = signFamilyDao.findOne(id);
        return signFamily;
        return signFamily;
    }
    }
    public SignFamily findByCode(String patientCode){
        SignFamily signFamily = signFamilyDao.findByCode(patientCode);
    public SignFamily findByCode(String code){
        SignFamily signFamily = signFamilyDao.findByCode(code);
        return signFamily;
        return signFamily;
    }
    }
@ -380,4 +380,8 @@ public class SignFamilyService extends BaseJpaService<SignFamily,Long> {
        signFamilyDao.save(successList);
        signFamilyDao.save(successList);
        return res;
        return res;
    }
    }
    public SignFamily findByPatientCode(String code) {
        return signFamilyDao.findSignByPatient(code);
    }
}
}

+ 7 - 1
patient-co-manage/wlyy-manage/src/main/resources/application.yml

@ -55,6 +55,8 @@ service-gateway:
  update-team-url: http://172.19.103.87:8011/wlyy_service/third/doctor/LoadTeamInfo
  update-team-url: http://172.19.103.87:8011/wlyy_service/third/doctor/LoadTeamInfo
im-service:
im-service:
  im_service_url: http://172.19.103.88:3000/api/v2
  im_service_url: http://172.19.103.88:3000/api/v2
yueren:
  api: http://120.77.209.211:8080
---
---
spring:
spring:
@ -77,6 +79,8 @@ service-gateway:
  update-team-url: http://172.19.103.87:8011/wlyy_service/third/doctor/LoadTeamInfo
  update-team-url: http://172.19.103.87:8011/wlyy_service/third/doctor/LoadTeamInfo
im-service:
im-service:
  im_service_url: http://172.19.103.88:3000/api/v2
  im_service_url: http://172.19.103.88:3000/api/v2
yueren:
  api: http://120.77.209.211:8080
---
---
spring:
spring:
@ -98,4 +102,6 @@ spring:
service-gateway:
service-gateway:
  update-team-url: http://59.61.92.90:8072/wlyy_service/third/doctor/LoadTeamInfo
  update-team-url: http://59.61.92.90:8072/wlyy_service/third/doctor/LoadTeamInfo
im-service:
im-service:
  im_service_url: http://120.41.253.95:3000/api/v2
  im_service_url: http://120.41.253.95:3000/api/v2
yueren:
  api: http://120.77.209.211:8080

+ 51 - 10
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/job/ZyDictJob.java

@ -58,6 +58,8 @@ public class ZyDictJob implements Job {
            synchronizeZy_iv_dept_dict();
            synchronizeZy_iv_dept_dict();
            //同步 zy_iv_dept_staff_allot_dict
            //同步 zy_iv_dept_staff_allot_dict
            synchronizeZy_iv_dept_staff_allot_dict();
            synchronizeZy_iv_dept_staff_allot_dict();
            //同步 zy_iv_diagnose_dict
            synchronizeZy_iv_diagnose_dict();
            //同步 zy_iv_diagnose_class_dict
            //同步 zy_iv_diagnose_class_dict
            synchronizeZy_iv_diagnose_class_dict();
            synchronizeZy_iv_diagnose_class_dict();
            //同步 zy_iv_org_physic_allot_dict
            //同步 zy_iv_org_physic_allot_dict
@ -75,9 +77,25 @@ public class ZyDictJob implements Job {
        }
        }
    }
    }
    private void synchronizeZy_iv_diagnose_dict() {
        logger.info("synchronized zy_iv_diagnose_dict start");
        String dictName = this.IV_DIAGNOSE_DICT;
        List<ZyIvDiagnoseDict> zyIvDiagnoseDicts = new ArrayList<>();
        //得到list
        commonGetOneDict(zyIvDiagnoseDicts, ZyIvDiagnoseDict.class, dictName);
        if (zyIvDiagnoseDicts.size() > 0) {
            //清空表
            zyIvDiagnoseDictDao.deleteAll();
            //新增数据
            zyIvDiagnoseDictDao.save(zyIvDiagnoseDicts);
        }
        logger.info("synchronized zy_iv_diagnose_dict end");
    }
    @Transactional
    @Transactional
    private void synchronizeZy_iv_subject_class_dict() throws Exception {
    private void synchronizeZy_iv_subject_class_dict() {
        logger.info("synchronized zy_iv_subject_class_dict start");
        String dictName = this.IV_SUBJECT_CLASS_DICT;
        String dictName = this.IV_SUBJECT_CLASS_DICT;
        List<ZyIvSubjectClassDict> zyIvSubjectClassDicts = new ArrayList<>();
        List<ZyIvSubjectClassDict> zyIvSubjectClassDicts = new ArrayList<>();
        //得到list
        //得到list
@ -87,11 +105,13 @@ public class ZyDictJob implements Job {
            zyIvSubjectClassDictDao.deleteAll();
            zyIvSubjectClassDictDao.deleteAll();
            //新增数据
            //新增数据
            zyIvSubjectClassDictDao.save(zyIvSubjectClassDicts);
            zyIvSubjectClassDictDao.save(zyIvSubjectClassDicts);
            logger.info("synchronized zy_iv_subject_class_dict end");
        }
        }
    }
    }
    @Transactional
    @Transactional
    private void synchronizeZy_iv_staff_reg_type_allot_dict() throws Exception {
    private void synchronizeZy_iv_staff_reg_type_allot_dict() {
        logger.info("synchronized zy_iv_staff_reg_type_allot_dict start");
        String dictName = this.IV_STAFF_REG_TYPE_ALLOT_DICT;
        String dictName = this.IV_STAFF_REG_TYPE_ALLOT_DICT;
        List<ZyIvStaffRegTypeAllotDict> zyIvStaffRegTypeAllotDicts = new ArrayList<>();
        List<ZyIvStaffRegTypeAllotDict> zyIvStaffRegTypeAllotDicts = new ArrayList<>();
        //得到list
        //得到list
@ -101,10 +121,12 @@ public class ZyDictJob implements Job {
        zyIvStaffRegTypeAllotDictDao.deleteAll();
        zyIvStaffRegTypeAllotDictDao.deleteAll();
        //新增数据
        //新增数据
        zyIvStaffRegTypeAllotDictDao.save(zyIvStaffRegTypeAllotDicts);
        zyIvStaffRegTypeAllotDictDao.save(zyIvStaffRegTypeAllotDicts);
        logger.info("synchronized zy_iv_staff_reg_type_allot_dict end");
    }
    }
    @Transactional
    @Transactional
    private void synchronizeZ_iv_staff_dict() throws Exception {
    private void synchronizeZ_iv_staff_dict() {
        logger.info("synchronized zy_iv_staff_dict start");
        String dictName = this.IV_STAFF_DICT;
        String dictName = this.IV_STAFF_DICT;
        List<ZyIvStaffDict> zyIvStaffDicts = new ArrayList<>();
        List<ZyIvStaffDict> zyIvStaffDicts = new ArrayList<>();
        //得到list
        //得到list
@ -113,10 +135,12 @@ public class ZyDictJob implements Job {
        zyIvStaffDictDao.deleteAll();
        zyIvStaffDictDao.deleteAll();
        //新增数据
        //新增数据
        zyIvStaffDictDao.save(zyIvStaffDicts);
        zyIvStaffDictDao.save(zyIvStaffDicts);
        logger.info("synchronized zy_iv_staff_dict end");
    }
    }
    @Transactional
    @Transactional
    private void synchronizeZy_iv_physic_dict() throws Exception {
    private void synchronizeZy_iv_physic_dict() {
        logger.info("synchronized zy_iv_physic_dict start");
        String dictName = this.IV_PHYSIC_DICT;
        String dictName = this.IV_PHYSIC_DICT;
        List<ZyIvPhysicDict> zyIvPhysicDicts = new ArrayList<>();
        List<ZyIvPhysicDict> zyIvPhysicDicts = new ArrayList<>();
        //得到list
        //得到list
@ -126,10 +150,12 @@ public class ZyDictJob implements Job {
        zyIvPhysicDictDao.deleteAll();
        zyIvPhysicDictDao.deleteAll();
        //新增数据
        //新增数据
        zyIvPhysicDictDao.save(zyIvPhysicDicts);
        zyIvPhysicDictDao.save(zyIvPhysicDicts);
        logger.info("synchronized zy_iv_physic_dict end");
    }
    }
    @Transactional
    @Transactional
    private void synchronizeZy_iv_org_physic_allot_dict() throws Exception {
    private void synchronizeZy_iv_org_physic_allot_dict() {
        logger.info("synchronized zy_iv_org_physic_allot_dict start");
        String dictName = this.IV_ORG_PHYSIC_ALLOT_DICT;
        String dictName = this.IV_ORG_PHYSIC_ALLOT_DICT;
        List<ZyIvOrgPhysicAllotDict> zyIvOrgPhysicAllotDicts = new ArrayList<>();
        List<ZyIvOrgPhysicAllotDict> zyIvOrgPhysicAllotDicts = new ArrayList<>();
        //得到list
        //得到list
@ -140,10 +166,12 @@ public class ZyDictJob implements Job {
            //新增数据
            //新增数据
            zyIvOrgPhysicAllotDictDao.save(zyIvOrgPhysicAllotDicts);
            zyIvOrgPhysicAllotDictDao.save(zyIvOrgPhysicAllotDicts);
        }
        }
        logger.info("synchronized zy_iv_org_physic_allot_dict end");
    }
    }
    @Transactional
    @Transactional
    private void synchronizeZy_iv_diagnose_class_dict() throws Exception {
    private void synchronizeZy_iv_diagnose_class_dict() {
        logger.info("synchronized zy_iv_diagnose_class_dict start");
        String dictName = this.IV_DIAGNOSE_CLASS_DICT;
        String dictName = this.IV_DIAGNOSE_CLASS_DICT;
        List<ZyIvDiagnoseClassDict> zIvDiagnoseClassDicts = new ArrayList<>();
        List<ZyIvDiagnoseClassDict> zIvDiagnoseClassDicts = new ArrayList<>();
        //得到list
        //得到list
@ -154,10 +182,12 @@ public class ZyDictJob implements Job {
            //新增数据
            //新增数据
            zyIvDiagnoseClassDictDao.save(zIvDiagnoseClassDicts);
            zyIvDiagnoseClassDictDao.save(zIvDiagnoseClassDicts);
        }
        }
        logger.info("synchronized zy_iv_diagnose_class_dict end");
    }
    }
    @Transactional
    @Transactional
    private void synchronizeZy_iv_dept_staff_allot_dict() throws Exception {
    private void synchronizeZy_iv_dept_staff_allot_dict() {
        logger.info("synchronized zy_iv_dept_staff_allot_dict start");
        String dictName = this.IV_DEPT_STAFF_ALLOT_DICT;
        String dictName = this.IV_DEPT_STAFF_ALLOT_DICT;
        List<ZyIvDeptStaffAllotDict> syIvDeptStaffAllotDictz = new ArrayList<>();
        List<ZyIvDeptStaffAllotDict> syIvDeptStaffAllotDictz = new ArrayList<>();
        //得到list
        //得到list
@ -169,10 +199,12 @@ public class ZyDictJob implements Job {
            //新增数据
            //新增数据
            zyIvDeptStaffAllotDictDao.save(syIvDeptStaffAllotDictz);
            zyIvDeptStaffAllotDictDao.save(syIvDeptStaffAllotDictz);
        }
        }
        logger.info("synchronized zy_iv_dept_staff_allot_dict end");
    }
    }
    @Transactional
    @Transactional
    private void synchronizeZyCommonDict() throws Exception {
    private void synchronizeZyCommonDict() {
        logger.info("synchronized zy_common_dict start");
        String[] dictNames = new String[]{
        String[] dictNames = new String[]{
                this.IV_PHYSIC_FORM_DICT, this.IV_PHYSIC_INJECT_PLACE_DICT, this.IV_PHYSIC_SKIN_TEST_DICT,
                this.IV_PHYSIC_FORM_DICT, this.IV_PHYSIC_INJECT_PLACE_DICT, this.IV_PHYSIC_SKIN_TEST_DICT,
                this.IV_RATE_TYPE_DICT, this.IV_RECIPE_FREQUENCY_DICT, this.IV_RECIPE_USAGE_DICT,
                this.IV_RATE_TYPE_DICT, this.IV_RECIPE_FREQUENCY_DICT, this.IV_RECIPE_USAGE_DICT,
@ -191,6 +223,9 @@ public class ZyDictJob implements Job {
                }
                }
                if (returnJson.containsKey("data")) {
                if (returnJson.containsKey("data")) {
                    JSONArray dataJSONArray = returnJson.getJSONObject("data").getJSONArray("returnData");
                    JSONArray dataJSONArray = returnJson.getJSONObject("data").getJSONArray("returnData");
                    if (dataJSONArray.size() == 0) {
                        throw new Exception("zy dict error data size 0");
                    }
                    ZyCommonDict[] zyCommonDictArrays = (ZyCommonDict[]) JSONArray.toArray(dataJSONArray, ZyCommonDict.class);
                    ZyCommonDict[] zyCommonDictArrays = (ZyCommonDict[]) JSONArray.toArray(dataJSONArray, ZyCommonDict.class);
                    zyCommonDictz.addAll(Arrays.asList(zyCommonDictArrays));
                    zyCommonDictz.addAll(Arrays.asList(zyCommonDictArrays));
                } else {
                } else {
@ -213,10 +248,13 @@ public class ZyDictJob implements Job {
                zyCommonDictDao.save(zyCommonDictz);
                zyCommonDictDao.save(zyCommonDictz);
            }
            }
        }
        }
        logger.info("synchronized zy_common_dict end");
    }
    }
    @Transactional
    @Transactional
    private void synchronizeZy_iv_dept_dict() throws Exception {
    private void synchronizeZy_iv_dept_dict() {
        logger.info("synchronized zy_iv_dept_dict start");
        String dictName = this.IV_DEPT_DICT;
        String dictName = this.IV_DEPT_DICT;
        List<ZyIvDeptDict> zyIvDeptDicts = new ArrayList<>();
        List<ZyIvDeptDict> zyIvDeptDicts = new ArrayList<>();
        //得到list
        //得到list
@ -227,6 +265,7 @@ public class ZyDictJob implements Job {
            //新增数据
            //新增数据
            zyIvDeptDictDao.save(zyIvDeptDicts);
            zyIvDeptDictDao.save(zyIvDeptDicts);
        }
        }
        logger.info("synchronized zy_iv_dept_dict end");
    }
    }
    /**
    /**
@ -237,7 +276,6 @@ public class ZyDictJob implements Job {
     * @param dictName 字典名称
     * @param dictName 字典名称
     */
     */
    private void commonGetOneDict(List tList, Class clazz, String dictName) {
    private void commonGetOneDict(List tList, Class clazz, String dictName) {
        String json = null;
        String json = null;
        try {
        try {
            //调用智业的接口得到字典
            //调用智业的接口得到字典
@ -248,6 +286,9 @@ public class ZyDictJob implements Job {
            }
            }
            if (returnJson.containsKey("data")) {
            if (returnJson.containsKey("data")) {
                JSONArray dataJSONArray = returnJson.getJSONObject("data").getJSONArray("returnData");
                JSONArray dataJSONArray = returnJson.getJSONObject("data").getJSONArray("returnData");
                if (dataJSONArray.size() == 0) {
                    throw new Exception("zy dict error data size 0");
                }
                tList.addAll(Arrays.asList(JSONArray.toArray(dataJSONArray, clazz)));
                tList.addAll(Arrays.asList(JSONArray.toArray(dataJSONArray, clazz)));
            } else {
            } else {
                throw new Exception("zy dict error no contain data");
                throw new Exception("zy dict error no contain data");

+ 4 - 4
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/web/quota/JobController.java

@ -370,7 +370,7 @@ public class JobController extends BaseController {
    }
    }
    /**
    /**
     * 智业字典同步
     * 立即启动智业字典同步
     *
     *
     * @Author chenweida
     * @Author chenweida
     * @params method
     * @params method
@ -378,9 +378,9 @@ public class JobController extends BaseController {
     * @Date 2017/8/14 11:07
     * @Date 2017/8/14 11:07
     * @Description:
     * @Description:
     */
     */
    @RequestMapping(value = "/zydictStartJob", method = RequestMethod.POST)
    @ApiOperation("智业字典同步")
    public String zydictStartJob() {
    @RequestMapping(value = "/zydictJobStartNow", method = RequestMethod.POST)
    @ApiOperation("立即启动智业字典同步")
    public String zydictJobStartNow() {
        try {
        try {
            quartzHelper.startNow(ZyDictJob.class, UUID.randomUUID().toString(), null);
            quartzHelper.startNow(ZyDictJob.class, UUID.randomUUID().toString(), null);

+ 11 - 23
patient-co/patient-co-wlyy-job/src/main/resources/banner.txt

@ -1,23 +1,11 @@
${AnsiColor.BRIGHT_GREEN}
                                    ////////////////////////////////////////////////////////////////////
                                    //                          _ooOoo_                               //
                                    //                         o8888888o                              //
                                    //                         88" . "88                              //
                                    //                         (| ^_^ |)                              //
                                    //                         O\  =  /O                              //
                                    //                      ____/`---'\____                           //
                                    //                    .'  \\|     |//  `.                         //
                                    //                   /  \\|||  :  |||//  \                        //
                                    //                  /  _||||| -:- |||||-  \                       //
                                    //                  |   | \\\  -  /// |   |                       //
                                    //                  | \_|  ''\---/''  |   |                       //
                                    //                  \  .-\__  `-`  ___/-. /                       //
                                    //                ___`. .'  /--.--\  `. . ___                     //
                                    //              ."" '<  `.___\_<|>_/___.'  >'"".                  //
                                    //            | | :  `- \`.;`\ _ /`;.`/ - ` : | |                 //
                                    //            \  \ `-.   \_ __\ /__ _/   .-` /  /                 //
                                    //      ========`-.____`-.___\_____/___.-`____.-'========         //
                                    //                           `=---='                              //
                                    //      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        //
                                    //            佛祖保佑       永不宕机     永无BUG                 //
                                    ////////////////////////////////////////////////////////////////////
                     _                         _           _
                    | |                       (_)         | |
         __      __ | |  _   _   _   _         _    ___   | |__
         \ \ /\ / / | | | | | | | | | |       | |  / _ \  | '_ \
          \ V  V /  | | | |_| | | |_| |       | | | (_) | | |_) |
           \_/\_/   |_|  \__, |  \__, |       | |  \___/  |_.__/
                          __/ |   __/ |      _/ |
                         |___/   |___/      |__/

+ 14 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -158,7 +158,7 @@ public class PrescriptionInfoService extends BaseService {
                        String reviewedState = r.getString("reviewedState");
                        String reviewedState = r.getString("reviewedState");
                        if("0".equals(reviewedState)){
                        if("0".equals(reviewedState)){
                            iterator.remove();
                            iterator.remove();
                            break;
                            continue;
                        }
                        }
                        com.alibaba.fastjson.JSONArray des = (com.alibaba.fastjson.JSONArray)r.getJSONArray("prescriptionDt");
                        com.alibaba.fastjson.JSONArray des = (com.alibaba.fastjson.JSONArray)r.getJSONArray("prescriptionDt");
@ -170,7 +170,7 @@ public class PrescriptionInfoService extends BaseService {
                            }else{
                            }else{
                                //如果含有非糖尿病或高血压
                                //如果含有非糖尿病或高血压
                                iterator.remove();
                                iterator.remove();
                                break;
                                continue;
                            }
                            }
                        }
                        }
                    }
                    }
@ -1052,4 +1052,16 @@ public class PrescriptionInfoService extends BaseService {
        List<Map<String,Object>> rs = jdbcTemplate.queryForList(sql.toString());
        List<Map<String,Object>> rs = jdbcTemplate.queryForList(sql.toString());
        return new JSONArray(rs);
        return new JSONArray(rs);
    }
    }
    /**
     *
     * @param doctor
     * @return
     * @throws Exception
     */
    public com.alibaba.fastjson.JSONArray getPrescriptionTemp(String doctor)throws Exception{
        String rp = jwPrescriptionService.getRecipeTemplate(doctor);
        com.alibaba.fastjson.JSONArray rs =  presModeAdapter.modeToPrescription(rp);
        return rs;
    }
}
}

+ 5 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/ZyDictService.java

@ -100,7 +100,7 @@ public class ZyDictService {
                " yp.subject_class subjectClass, " +
                " yp.subject_class subjectClass, " +
                " yp.pack_unit packUnit, " +
                " yp.pack_unit packUnit, " +
                " yp.min_dose minDose, " +
                " yp.min_dose minDose, " +
                " yp.pake_spec pakeSpec, " +
                " yp.pack_spec pakeSpec, " +
                " class.class_name className, " +
                " class.class_name className, " +
                " yp.dose_unit physicDoseUnit, " +
                " yp.dose_unit physicDoseUnit, " +
                " com1.`name` physicDoseUnitName, " +
                " com1.`name` physicDoseUnitName, " +
@ -117,10 +117,10 @@ public class ZyDictService {
                "   p.physic_spec, " +
                "   p.physic_spec, " +
                "   p.subject_class, " +
                "   p.subject_class, " +
                "   p.dose_unit, " +
                "   p.dose_unit, " +
                "   p.quantity_unit " +
                "   p.pack_unit " +
                "   p.min_dose " +
                "   p.pake_spec " +
                "   p.quantity_unit, " +
                "   p.pack_unit, " +
                "   p.min_dose, " +
                "   p.pack_spec " +
                "    FROM  " +
                "    FROM  " +
                "   zy_iv_physic_dict p, " +
                "   zy_iv_physic_dict p, " +
                "  ( " +
                "  ( " +

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java

@ -211,7 +211,7 @@ public class PrescriptionInfoController extends BaseController{
                                                  @RequestParam(required = false) @ApiParam(value = "页数", name = "page")Integer page,
                                                  @RequestParam(required = false) @ApiParam(value = "页数", name = "page")Integer page,
                                                  @RequestParam(required = false) @ApiParam(value = "每页大小", name = "size")Integer size){
                                                  @RequestParam(required = false) @ApiParam(value = "每页大小", name = "size")Integer size){
        try {
        try {
            return write(200, "操作成功!", "data",prescriptionInfoService.getHDoctorPrescriptionExpressage(teamCode,type,getUID(),nameKey,startDate,endDate,hospital,state,page,size));
            return write(200, "操作成功!", "data",prescriptionInfoService.getHDoctorPrescriptionExpressage(teamCode,type,"915ccc97-5b1d-11e6-8344-fa163e8aee56",nameKey,startDate,endDate,hospital,state,page,size));
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            error(e);
            return error(-1, "查询失败!");
            return error(-1, "查询失败!");
@ -345,7 +345,7 @@ public class PrescriptionInfoController extends BaseController{
    @ApiOperation(value = "获取调整处方模板")
    @ApiOperation(value = "获取调整处方模板")
    public String getPrescriptionTemp(){
    public String getPrescriptionTemp(){
        try {
        try {
            return write(200, "操作成功!", "data",adapter.modeTopresInfo(""));
            return write(200, "操作成功!", "data",prescriptionInfoService.getPrescriptionTemp(getUID()));
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            error(e);
            return error(-1, "查询失败!");
            return error(-1, "查询失败!");

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionInfoController.java

@ -45,9 +45,9 @@ public class PatientPrescriptionInfoController extends BaseController {
                                       @RequestParam(required = false)@ApiParam(name="endDate",value="结束时间")String endDate,
                                       @RequestParam(required = false)@ApiParam(name="endDate",value="结束时间")String endDate,
                                       @RequestParam(required = false,defaultValue = "0")@ApiParam(name="diagnosisCode",value="所有诊断(0 全部 1高血压 2糖尿病)")String diagnosisCode,
                                       @RequestParam(required = false,defaultValue = "0")@ApiParam(name="diagnosisCode",value="所有诊断(0 全部 1高血压 2糖尿病)")String diagnosisCode,
                                       @RequestParam(required = false)@ApiParam(name="page",value="起始页")Integer page,
                                       @RequestParam(required = false)@ApiParam(name="page",value="起始页")Integer page,
                                       @RequestParam(required = false)@ApiParam(name="size",value="每页条数")Integer size){
                                       @RequestParam(required = false)@ApiParam(name="size",value="每页记录数")Integer size){
        try {
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescriptionInfos(type,diagnosisCode,startDate,endDate,getRepUID(),isRenewal,page,size));
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescriptionInfos(type,diagnosisCode,startDate,endDate,"915ccc97-5b1d-11e6-8344-fa163e8aee56",isRenewal,page,size));
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            error(e);
            return error(-1, "查询失败!");
            return error(-1, "查询失败!");