Jelajahi Sumber

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

wujunjie 7 tahun lalu
induk
melakukan
d3a639fa78
42 mengubah file dengan 1932 tambahan dan 77 penghapusan
  1. 32 4
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/common/account/CustomerController.java
  2. 1 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/PatientDao.java
  3. 35 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/account/CustomerService.java
  4. 1 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/patient/AdminPatientService.java
  5. 15 10
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java
  6. 59 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/ZyDictController.java
  7. 13 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyCommonDictDao.java
  8. 13 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvDeptDictDao.java
  9. 11 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvDeptStaffAllotDictDao.java
  10. 11 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvDiagnoseClassDictDao.java
  11. 12 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvDiagnoseDictDao.java
  12. 11 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvOrgPhysicAllotDictDao.java
  13. 11 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvPhysicDictDao.java
  14. 11 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvStaffDictDao.java
  15. 12 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvStaffRegTypeAllotDictDao.java
  16. 12 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvSubjectClassDictDao.java
  17. 70 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyCommonDict.java
  18. 85 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvDeptDict.java
  19. 65 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvDeptStaffAllotDict.java
  20. 109 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvDiagnoseClassDict.java
  21. 111 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvDiagnoseDict.java
  22. 54 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvOrgPhysicAllotDict.java
  23. 232 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvPhysicDict.java
  24. 146 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvStaffDict.java
  25. 88 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvStaffRegTypeAllotDict.java
  26. 88 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvSubjectClassDict.java
  27. 553 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/ZyDictDataService.java
  28. 0 1
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/common/InitiSysProService.java
  29. 16 16
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionCAService.java
  30. 16 16
      patient-co-service/wlyy_service/src/main/resources/system.properties
  31. TEMPAT SAMPAH
      patient-co/patient-co-wlyy/doc/接口文档/对外接口文档/集美健康教育/集美健康教育对外接口文档.docx
  32. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/MvcConfig.java
  33. 6 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java
  34. 6 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/PatientInfoService.java
  35. 2 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java
  36. 4 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java
  37. 7 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java
  38. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java
  39. 3 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java
  40. 1 6
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/gateway/controller/GcMessageController.java
  41. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionInfoController.java
  42. 7 8
      patient-co/patient-co-wlyy/src/main/resources/application.yml

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

@ -5,6 +5,7 @@ import com.yihu.wlyy.entity.Patient;
import com.yihu.wlyy.entity.User;
import com.yihu.wlyy.entity.WlyyCustomerLog;
import com.yihu.wlyy.repository.ManageDictDao;
import com.yihu.wlyy.repository.PatientDao;
import com.yihu.wlyy.service.manager.account.CustomerService;
import com.yihu.wlyy.service.manager.family.FamilyMemberService;
import com.yihu.wlyy.service.manager.patient.AdminPatientService;
@ -19,6 +20,8 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -47,6 +50,10 @@ public class CustomerController extends BaseController {
    @Autowired
    private WlyyCustomerLogService wlyyCustomerLogService;
    @Autowired
    private PatientDao patientDao;
    @RequestMapping(value = "/login",method = RequestMethod.POST,produces="application/json;charset=UTF-8")
    @ResponseBody
    public String login(@ApiParam(name = "userName", value = "账号", required = true)@RequestParam(required = true, name = "userName") String userName,
@ -126,6 +133,7 @@ public class CustomerController extends BaseController {
        }
        Map<String, Object> resp = customerService.findServerInfo(patient);
        resp.put("patient",patient);
        return write(200,"查询成功","data",resp);
    }
@ -137,13 +145,33 @@ public class CustomerController extends BaseController {
    @ResponseBody
    public String findByMobile(@ApiParam(name = "mobile", value = "手机号", required = false)@RequestParam(required = true, name = "mobile") String mobile) throws Exception {
        Map<String, Object> resp = new HashMap<>();
        //根据条件查询病人信息
        Patient patient = patientService.findByMobile(mobile);
        if(patient ==null){
        List<Patient> patients = patientService.findByMobile(mobile);
        if(patients ==null || patients.size()==0){
            return write(-1,"未查询到");
        }else if(patients.size()==1){
            Patient patient = patients.get(0);
            resp = customerService.findServerInfo(patients.get(0));
            resp.put("patient",patient);
            return write(200,"查询成功","data",resp);
        }
        Map<String, Object> resp = customerService.findServerInfo(patient);
        resp.put("patient",patient);
        resp.put("patients",patients);
        return write(200,"查询成功","data",resp);
    }
    /**
     *通过居民code,查找家庭关系,签约信息,医生等
     * @return
     */
    @RequestMapping(value = "/findByPatient",produces="application/json;charset=UTF-8")
    @ResponseBody
    public String findByPatient(@ApiParam(name = "patientCode", value = "居民code", required = false)@RequestParam(required = true, name = "patientCode") String patientCode) throws Exception {
        Patient patient = patientDao.findByCode(patientCode);
        Map<String, Object> respon = customerService.findServerInfo(patientCode);
        respon.put("patient",patient);
        return write(200,"查询成功","data",respon);
    }
}

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

@ -40,7 +40,7 @@ public interface PatientDao extends PagingAndSortingRepository<Patient, Long>,Jp
	// 根據手机号查詢患者信息
	@Query("select p from Patient p where p.mobile=?1")
	Patient findByMobile(String mobile);
	List<Patient> findByMobile(String mobile);
	// 根據病情等级获取患者信息
	@Query("select p from Patient p where p.diseaseCondition=?1")

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

@ -58,4 +58,39 @@ public class CustomerService{
		return resp;
	}
	public Map<String,Object> findServerInfo(String patientCode) throws Exception {
		Map<String, Object> resp = new HashMap<>();
		//查找家庭成员关系
		List<Map<String, Object>> familyMembers = familyMemberService.getAllFamilyMembers(patientCode);
		resp.put("family",familyMembers);
		//查询签约信息
		SignFamily signInfo = contractService.findSignInfo(patientCode);
		//查询家庭成员的每个签约信息    以及签约医生
		List doctors = new ArrayList<Doctor>();
		if(signInfo!=null){
			signInfo.setStatusName("已签约");
			//查找全科医生
			String doctorCode = signInfo.getDoctor();
			if(StringUtils.isNotBlank(doctorCode)){
				Doctor doctor = hosDoctorService.getDoctorByCode(doctorCode);
				doctors.add(doctor);
			}
			//查找健康管理师
			String doctorHealthCode = signInfo.getDoctorHealth();
			if(StringUtils.isNotBlank(doctorHealthCode)){
				Doctor doctor = hosDoctorService.getDoctorByCode(doctorHealthCode);
				doctors.add(doctor);
			}
		}
		resp.put("signInfo",signInfo);
		resp.put("doctors",doctors);
		return resp;
	}
}

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

@ -214,7 +214,7 @@ public class AdminPatientService extends BaseJpaService<Patient,Long> {
    }
    //根据手机号查找
    public Patient findByMobile(String mobile){
    public List<Patient> findByMobile(String mobile){
        return  patientDao.findByMobile(mobile);
    }
    //根据身份证号查找

+ 15 - 10
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java

@ -275,10 +275,11 @@ public class PrescriptionController extends BaseController{
	@ApiOperation("请求实名软证书并进行数字签名")
	public Result requestRealNameSoftCertAndSign(@ApiParam(name="strUserIdcardNum",value="用户身份证号") @RequestParam String strUserIdcardNum,
												 @ApiParam(name="strRealNameSoftCertCalledPasswd",value="证书被调用保护口令") @RequestParam String strRealNameSoftCertCalledPasswd,
												 @ApiParam(name="strOriginalData",value="原文(若原文大于 1KB,需先对原文取 MD5摘要值,而后以该 MD5摘要值入参)") @RequestParam String strOriginalData)
												 @ApiParam(name="strOriginalData",value="原文(若原文大于 1KB,需先对原文取 MD5摘要值,而后以该 MD5摘要值入参)") @RequestParam String strOriginalData,
												 @ApiParam(name="prescriptionCode",value="处方code") @RequestParam String prescriptionCode)
	{
		try {
			String re = caService.requestRealNameSoftCertAndSign(strUserIdcardNum,strRealNameSoftCertCalledPasswd,strOriginalData);
			String re = caService.requestRealNameSoftCertAndSign(strUserIdcardNum,strRealNameSoftCertCalledPasswd,strOriginalData,prescriptionCode);
			return Result.success("请求实名软证书并进行数字签名成功!",re);
		} catch (Exception ex) {
@ -290,10 +291,11 @@ public class PrescriptionController extends BaseController{
	@RequestMapping(value = "IsApplied",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("判断是否有实名证书")
	public Result isApplied(@ApiParam(name="strUserIdcardNum",value="用户身份证号") @RequestParam String strUserIdcardNum)
	public Result isApplied(@ApiParam(name="strUserIdcardNum",value="用户身份证号") @RequestParam String strUserIdcardNum,
							@ApiParam(name="doctorCode",value="医生code") @RequestParam String doctorCode)
	{
		try {
			String re = caService.isApplied(strUserIdcardNum);
			String re = caService.isApplied(strUserIdcardNum,doctorCode);
			return Result.success("判断是否有实名证书成功!",re);
		} catch (Exception ex) {
@ -305,10 +307,11 @@ public class PrescriptionController extends BaseController{
	@RequestMapping(value = "GetRealNameSoftCertExpiredDatetime",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("获取实名软证书的过期时间")
	public Result getRealNameSoftCertExpiredDatetime(@ApiParam(name="strUserIdcardNum",value="用户身份证号") @RequestParam String strUserIdcardNum)
	public Result getRealNameSoftCertExpiredDatetime(@ApiParam(name="strUserIdcardNum",value="用户身份证号") @RequestParam String strUserIdcardNum,
													 @ApiParam(name="doctorCode",value="医生code") @RequestParam String doctorCode)
	{
		try {
			String re = caService.getRealNameSoftCertExpiredDatetime(strUserIdcardNum);
			String re = caService.getRealNameSoftCertExpiredDatetime(strUserIdcardNum,doctorCode);
			return Result.success("获取实名软证书的过期时间成功!",re);
		} catch (Exception ex) {
@ -322,10 +325,11 @@ public class PrescriptionController extends BaseController{
	@ApiOperation("修改实名软证书调用保护口令")
	public Result modifyRealNameSoftCertCalledPasswd(@ApiParam(name="strUserIdcardNum",value="用户身份证号") @RequestParam String strUserIdcardNum,
													 @ApiParam(name="strOldCalledPasswd",value="旧证书调用保护口令") @RequestParam String strOldCalledPasswd,
													 @ApiParam(name="strNewCalledPasswd",value="新证书调用保护口令") @RequestParam String strNewCalledPasswd)
													 @ApiParam(name="strNewCalledPasswd",value="新证书调用保护口令") @RequestParam String strNewCalledPasswd,
													 @ApiParam(name="doctorCode",value="医生code") @RequestParam String doctorCode)
	{
		try {
			String re = caService.modifyRealNameSoftCertCalledPasswd(strUserIdcardNum,strOldCalledPasswd,strNewCalledPasswd);
			String re = caService.modifyRealNameSoftCertCalledPasswd(strUserIdcardNum,strOldCalledPasswd,strNewCalledPasswd,doctorCode);
			return Result.success("修改实名软证书调用保护口令成功!",re);
		} catch (Exception ex) {
@ -340,10 +344,11 @@ public class PrescriptionController extends BaseController{
	@ApiOperation("验证签名(带多服务器负载均衡)")
	public Result verifySignOnMultiServer(@ApiParam(name="strSignData",value="签名值") @RequestParam String strSignData,
								   @ApiParam(name="strCertData",value="证书主体数据") @RequestParam String strCertData,
								   @ApiParam(name="strOriginalData ",value="原文数据") @RequestParam String strOriginalData)
								   @ApiParam(name="strOriginalData ",value="原文数据") @RequestParam String strOriginalData,
										  @ApiParam(name="prescriptionCode ",value="处方code") @RequestParam String prescriptionCode)
	{
		try {
			String re = caService.verifySignOnMultiServer(strSignData,strCertData,strOriginalData);
			String re = caService.verifySignOnMultiServer(strSignData,strCertData,strOriginalData,prescriptionCode);
			return Result.success("验证签名成功!",re);
		} catch (Exception ex) {

+ 59 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/ZyDictController.java

@ -0,0 +1,59 @@
package com.yihu.wlyy.service.controller;
import com.yihu.wlyy.service.service.ZyDictDataService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
 * Created by chenweida on 2017/8/10.
 * 智业字典同步接口
 */
@RestController
@RequestMapping("/third/dict/")
public class ZyDictController extends BaseController {
    @Autowired
    private ZyDictDataService zyDictDataService;
    @ApiOperation("下载智业所有字典")
    @RequestMapping(value = "/downLoadAllDict", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
    public String downLoadAllDict(){
        try {
            zyDictDataService.allDict();
            return write(200, "下载智业所有字典!");
        } catch (Exception e) {
            return invalidUserException(e, -1, "下载智业所有字典");
        }
    }
    /**
     * IV_SUBJECT_CLASS_DICT
     * IV_STAFF_REG_TYPE_ALLOT_DICT
     * IV_STAFF_DICT
     * IV_PHYSIC_DICT
     * IV_ORG_PHYSIC_ALLOT_DICT
     * IV_DIAGNOSE_CLASS_DICT
     * IV_DEPT_STAFF_ALLOT_DICT
     * "commonDict"
     * IV_DEPT_DICT
     * @param dictName
     * @return
     */
    @ApiOperation("下载智业字典")
    @RequestMapping(value = "/downLoadDict", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
    public String downLoadDict(@ApiParam(name = "dictName", value = "字典名称", defaultValue = "commonDict")
                               @RequestParam(value = "dictName", required = true) String dictName){
        try {
            zyDictDataService.dictByDictName(dictName);
            return write(200, "下载智业所有字典!");
        } catch (Exception e) {
            return invalidUserException(e, -1, "下载智业所有字典");
        }
    }
}

+ 13 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyCommonDictDao.java

@ -0,0 +1,13 @@
package com.yihu.wlyy.service.dao.zydict;
import com.yihu.wlyy.service.entity.zydict.ZyCommonDict;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2017/8/11.
 */
public interface ZyCommonDictDao extends PagingAndSortingRepository<ZyCommonDict, Long>, JpaSpecificationExecutor<ZyCommonDict> {
}

+ 13 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvDeptDictDao.java

@ -0,0 +1,13 @@
package com.yihu.wlyy.service.dao.zydict;
import com.yihu.wlyy.service.entity.zydict.ZyIvDeptDict;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2017/8/11.
 */
public interface ZyIvDeptDictDao extends PagingAndSortingRepository<ZyIvDeptDict, Long>, JpaSpecificationExecutor<ZyIvDeptDict> {
}

+ 11 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvDeptStaffAllotDictDao.java

@ -0,0 +1,11 @@
package com.yihu.wlyy.service.dao.zydict;
import com.yihu.wlyy.service.entity.zydict.ZyIvDeptStaffAllotDict;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2017/8/11.
 */
public interface ZyIvDeptStaffAllotDictDao extends PagingAndSortingRepository<ZyIvDeptStaffAllotDict, Long>, JpaSpecificationExecutor<ZyIvDeptStaffAllotDict> {
}

+ 11 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvDiagnoseClassDictDao.java

@ -0,0 +1,11 @@
package com.yihu.wlyy.service.dao.zydict;
import com.yihu.wlyy.service.entity.zydict.ZyIvDiagnoseClassDict;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2017/8/11.
 */
public interface ZyIvDiagnoseClassDictDao extends PagingAndSortingRepository<ZyIvDiagnoseClassDict, Long>, JpaSpecificationExecutor<ZyIvDiagnoseClassDict> {
}

+ 12 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvDiagnoseDictDao.java

@ -0,0 +1,12 @@
package com.yihu.wlyy.service.dao.zydict;
import com.yihu.wlyy.service.entity.zydict.ZyIvDiagnoseDict;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2017/8/11.
 */
public interface ZyIvDiagnoseDictDao extends PagingAndSortingRepository<ZyIvDiagnoseDict, Long>, JpaSpecificationExecutor<ZyIvDiagnoseDict> {
}

+ 11 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvOrgPhysicAllotDictDao.java

@ -0,0 +1,11 @@
package com.yihu.wlyy.service.dao.zydict;
import com.yihu.wlyy.service.entity.zydict.ZyIvOrgPhysicAllotDict;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2017/8/11.
 */
public interface ZyIvOrgPhysicAllotDictDao extends PagingAndSortingRepository<ZyIvOrgPhysicAllotDict, Long>, JpaSpecificationExecutor<ZyIvOrgPhysicAllotDict> {
}

+ 11 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvPhysicDictDao.java

@ -0,0 +1,11 @@
package com.yihu.wlyy.service.dao.zydict;
import com.yihu.wlyy.service.entity.zydict.ZyIvPhysicDict;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2017/8/11.
 */
public interface ZyIvPhysicDictDao extends PagingAndSortingRepository<ZyIvPhysicDict, Long>, JpaSpecificationExecutor<ZyIvPhysicDict> {
}

+ 11 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvStaffDictDao.java

@ -0,0 +1,11 @@
package com.yihu.wlyy.service.dao.zydict;
import com.yihu.wlyy.service.entity.zydict.ZyIvStaffDict;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2017/8/11.
 */
public interface ZyIvStaffDictDao extends PagingAndSortingRepository<ZyIvStaffDict, Long>, JpaSpecificationExecutor<ZyIvStaffDict> {
}

+ 12 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvStaffRegTypeAllotDictDao.java

@ -0,0 +1,12 @@
package com.yihu.wlyy.service.dao.zydict;
import com.yihu.wlyy.service.entity.zydict.ZyIvStaffRegTypeAllotDict;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2017/8/11.
 */
public interface ZyIvStaffRegTypeAllotDictDao extends PagingAndSortingRepository<ZyIvStaffRegTypeAllotDict, Long>, JpaSpecificationExecutor<ZyIvStaffRegTypeAllotDict> {
}

+ 12 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/zydict/ZyIvSubjectClassDictDao.java

@ -0,0 +1,12 @@
package com.yihu.wlyy.service.dao.zydict;
import com.yihu.wlyy.service.entity.zydict.ZyIvSubjectClassDict;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2017/8/11.
 */
public interface ZyIvSubjectClassDictDao extends PagingAndSortingRepository<ZyIvSubjectClassDict, Long>, JpaSpecificationExecutor<ZyIvSubjectClassDict> {
}

+ 70 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyCommonDict.java

@ -0,0 +1,70 @@
package com.yihu.wlyy.service.entity.zydict;
import com.yihu.wlyy.service.common.model.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * ZyCommonDict entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "zy_common_dict")
public class ZyCommonDict extends IdEntity implements java.io.Serializable {
    /**
     * '计量单位字典、药品剂型字典、科室类别字典、注射地点字典、皮试类型字典、费别字典、频次字典、药品毒理分类字典、用药方法字典、性别字典的字典结构';
     */
    // Fields
    private String dictName;//字典名称
    private String code;//编码
    private String name;//名称
    // Constructors
    /**
     * default constructor
     */
    public ZyCommonDict() {
    }
    /**
     * full constructor
     */
    public ZyCommonDict(String dictName, String code, String name) {
        this.dictName = dictName;
        this.code = code;
        this.name = name;
    }
    @Column(name = "dict_name", length = 200)
    public String getDictName() {
        return this.dictName;
    }
    public void setDictName(String dictName) {
        this.dictName = dictName;
    }
    @Column(name = "code", length = 50)
    public String getCode() {
        return this.code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    @Column(name = "name", length = 200)
    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }
}

+ 85 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvDeptDict.java

@ -0,0 +1,85 @@
package com.yihu.wlyy.service.entity.zydict;
import com.yihu.wlyy.service.common.model.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * ZyIvDeptDict entity. @author MyEclipse Persistence Tools
 * 科室字典
 */
@Entity
@Table(name = "zy_iv_dept_dict")
public class ZyIvDeptDict extends IdEntity implements java.io.Serializable {
	// Fields
	private String orgCode;//机构编码
	private String deptCode;//科室代码
	private String deptName;//科室名称
	private String deptClass;//科室类型  详见科室类型字典中定义
	private String upperDept;//上级科室
	// Constructors
	/** default constructor */
	public ZyIvDeptDict() {
	}
	/** full constructor */
	public ZyIvDeptDict(String orgCode, String deptCode, String deptName,
			String deptType, String upperDept) {
		this.orgCode = orgCode;
		this.deptCode = deptCode;
		this.deptName = deptName;
		this.upperDept = upperDept;
	}
	@Column(name = "org_code", length = 50)
	public String getOrgCode() {
		return this.orgCode;
	}
	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}
	@Column(name = "dept_code", length = 50)
	public String getDeptCode() {
		return this.deptCode;
	}
	public void setDeptCode(String deptCode) {
		this.deptCode = deptCode;
	}
	@Column(name = "dept_name", length = 200)
	public String getDeptName() {
		return this.deptName;
	}
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	@Column(name = "dept_class", length = 50)
	public String getDeptClass() {
		return deptClass;
	}
	public void setDeptClass(String deptClass) {
		this.deptClass = deptClass;
	}
	@Column(name = "upper_dept", length = 50)
	public String getUpperDept() {
		return this.upperDept;
	}
	public void setUpperDept(String upperDept) {
		this.upperDept = upperDept;
	}
}

+ 65 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvDeptStaffAllotDict.java

@ -0,0 +1,65 @@
package com.yihu.wlyy.service.entity.zydict;
import com.yihu.wlyy.service.common.model.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * ZyIvDeptStaffAllotDict entity. @author MyEclipse Persistence Tools
 * 科室员工配置字典
 */
@Entity
@Table(name = "zy_iv_dept_staff_allot_dict")
public class ZyIvDeptStaffAllotDict extends IdEntity implements java.io.Serializable {
	// Fields
	private String orgCode;//机构编码
	private String deptCode;//科室编码
	private String staffCode;//员工编码
	// Constructors
	/** default constructor */
	public ZyIvDeptStaffAllotDict() {
	}
	/** full constructor */
	public ZyIvDeptStaffAllotDict(String orgCode, String deptCode,
			String staffCode) {
		this.orgCode = orgCode;
		this.deptCode = deptCode;
		this.staffCode = staffCode;
	}
	@Column(name = "org_code", length = 50)
	public String getOrgCode() {
		return this.orgCode;
	}
	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}
	@Column(name = "dept_code", length = 50)
	public String getDeptCode() {
		return this.deptCode;
	}
	public void setDeptCode(String deptCode) {
		this.deptCode = deptCode;
	}
	@Column(name = "staff_code", length = 50)
	public String getStaffCode() {
		return this.staffCode;
	}
	public void setStaffCode(String staffCode) {
		this.staffCode = staffCode;
	}
}

+ 109 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvDiagnoseClassDict.java

@ -0,0 +1,109 @@
package com.yihu.wlyy.service.entity.zydict;
import com.yihu.wlyy.service.common.model.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * ZyIvDiagnoseClassDict entity. @author MyEclipse Persistence Tools
 * 诊断类别字典
 */
@Entity
@Table(name = "zy_iv_diagnose_class_dict")
public class ZyIvDiagnoseClassDict extends IdEntity implements java.io.Serializable {
	// Fields
	private String classSubNo;//类别子序号
	private String classCode;//类别代码
	private String className;//类别名称
	private String upperClass;//上级类别
	private String validFlag;//有效标志  0 :无效;1:有效
	private String spellCode;//拼音首码
	private String wbzxCode;//五笔首码
	// Constructors
	/** default constructor */
	public ZyIvDiagnoseClassDict() {
	}
	/** full constructor */
	public ZyIvDiagnoseClassDict(String classSubNo, String classCode,
			String className, String upperClass, String validFlag,
			String spellCode, String wbzxCode) {
		this.classSubNo = classSubNo;
		this.classCode = classCode;
		this.className = className;
		this.upperClass = upperClass;
		this.validFlag = validFlag;
		this.spellCode = spellCode;
		this.wbzxCode = wbzxCode;
	}
	@Column(name = "class_sub_no", length = 200)
	public String getClassSubNo() {
		return this.classSubNo;
	}
	public void setClassSubNo(String classSubNo) {
		this.classSubNo = classSubNo;
	}
	@Column(name = "class_code", length = 200)
	public String getClassCode() {
		return this.classCode;
	}
	public void setClassCode(String classCode) {
		this.classCode = classCode;
	}
	@Column(name = "class_name", length = 2000)
	public String getClassName() {
		return this.className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	@Column(name = "upper_class", length = 200)
	public String getUpperClass() {
		return this.upperClass;
	}
	public void setUpperClass(String upperClass) {
		this.upperClass = upperClass;
	}
	@Column(name = "valid_flag", length = 50)
	public String getValidFlag() {
		return this.validFlag;
	}
	public void setValidFlag(String validFlag) {
		this.validFlag = validFlag;
	}
	@Column(name = "spell_code", length = 200)
	public String getSpellCode() {
		return this.spellCode;
	}
	public void setSpellCode(String spellCode) {
		this.spellCode = spellCode;
	}
	@Column(name = "wbzx_code", length = 200)
	public String getWbzxCode() {
		return this.wbzxCode;
	}
	public void setWbzxCode(String wbzxCode) {
		this.wbzxCode = wbzxCode;
	}
}

+ 111 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvDiagnoseDict.java

@ -0,0 +1,111 @@
package com.yihu.wlyy.service.entity.zydict;
import com.yihu.wlyy.service.common.model.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * ZyIvDiagnoseDict entity. @author MyEclipse Persistence Tools
 * 诊断字典表
 */
@Entity
@Table(name = "zy_iv_diagnose_dict")
public class ZyIvDiagnoseDict extends IdEntity implements java.io.Serializable {
	// Fields
	private String diagnoseCode;//诊断代码
	private String diagnoseName;//诊断名称
	private String diagnoseAlias;//诊断别名
	private String diagnoseClass;//诊断类别  详见诊断类别字典定义
	private String validFlag;//有效标志   0 :无效;1:有效
	private String spellCode;//拼音首码
	private String wbzxCode;//五笔首码
	// Constructors
	/** default constructor */
	public ZyIvDiagnoseDict() {
	}
	/** full constructor */
	public ZyIvDiagnoseDict(String diagnoseCode, String diagnoseName,
			String diagnoseAlias, String diagnoseClass, String validFlag,
			String spellCode, String wbzxCode) {
		this.diagnoseCode = diagnoseCode;
		this.diagnoseName = diagnoseName;
		this.diagnoseAlias = diagnoseAlias;
		this.diagnoseClass = diagnoseClass;
		this.validFlag = validFlag;
		this.spellCode = spellCode;
		this.wbzxCode = wbzxCode;
	}
	@Column(name = "diagnose_code", length = 200)
	public String getDiagnoseCode() {
		return this.diagnoseCode;
	}
	public void setDiagnoseCode(String diagnoseCode) {
		this.diagnoseCode = diagnoseCode;
	}
	@Column(name = "diagnose_name", length = 2000)
	public String getDiagnoseName() {
		return this.diagnoseName;
	}
	public void setDiagnoseName(String diagnoseName) {
		this.diagnoseName = diagnoseName;
	}
	@Column(name = "diagnose_alias", length = 2000)
	public String getDiagnoseAlias() {
		return this.diagnoseAlias;
	}
	public void setDiagnoseAlias(String diagnoseAlias) {
		this.diagnoseAlias = diagnoseAlias;
	}
	@Column(name = "diagnose_class", length = 50)
	public String getDiagnoseClass() {
		return this.diagnoseClass;
	}
	public void setDiagnoseClass(String diagnoseClass) {
		this.diagnoseClass = diagnoseClass;
	}
	@Column(name = "valid_flag", length = 50)
	public String getValidFlag() {
		return this.validFlag;
	}
	public void setValidFlag(String validFlag) {
		this.validFlag = validFlag;
	}
	@Column(name = "spell_code", length = 200)
	public String getSpellCode() {
		return this.spellCode;
	}
	public void setSpellCode(String spellCode) {
		this.spellCode = spellCode;
	}
	@Column(name = "wbzx_code", length = 200)
	public String getWbzxCode() {
		return this.wbzxCode;
	}
	public void setWbzxCode(String wbzxCode) {
		this.wbzxCode = wbzxCode;
	}
}

+ 54 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvOrgPhysicAllotDict.java

@ -0,0 +1,54 @@
package com.yihu.wlyy.service.entity.zydict;
import com.yihu.wlyy.service.common.model.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * ZyIvOrgPhysicAllotDict entity. @author MyEclipse Persistence Tools
 * 机构药品分发字典
 */
@Entity
@Table(name = "zy_iv_org_physic_allot_dict")
public class ZyIvOrgPhysicAllotDict extends IdEntity implements java.io.Serializable {
	// Fields
	private String orgCode;//机构编码
	private String physicCode;//药品代码
	// Constructors
	/** default constructor */
	public ZyIvOrgPhysicAllotDict() {
	}
	/** full constructor */
	public ZyIvOrgPhysicAllotDict(String orgCode, String physicCode) {
		this.orgCode = orgCode;
		this.physicCode = physicCode;
	}
	@Column(name = "org_code", length = 50)
	public String getOrgCode() {
		return this.orgCode;
	}
	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}
	@Column(name = "physic_code", length = 50)
	public String getPhysicCode() {
		return this.physicCode;
	}
	public void setPhysicCode(String physicCode) {
		this.physicCode = physicCode;
	}
}

+ 232 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvPhysicDict.java

@ -0,0 +1,232 @@
package com.yihu.wlyy.service.entity.zydict;
import com.yihu.wlyy.service.common.model.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * ZyIvPhysicDict entity. @author MyEclipse Persistence Tools
 * 药品字典
 */
@Entity
@Table(name = "zy_iv_physic_dict")
public class ZyIvPhysicDict extends IdEntity implements java.io.Serializable {
	// Fields
	private String physicCode;//药品代码
	private String physicName;//药品名称
	private String physicSpec;//药品规格
	private String subjectClass;//药品科目  科目类别字典中定义
	private String doseUnit;//剂量单位 计量单位字典中定义
	private String quantityUnit;//数量单位  计量单位字典中定义
	private String packUnit;//包装单位   计量单位字典中定义
	private Double minDose;//最小剂量
	private Double packSpec;
	private Double retailPrice;//零售价
	private String physicForm;//药品剂型  药品剂型字典中定义
	private String toxicologyType;//毒理分类  药品毒理分类字典中定义
	private String basicFlag;//基本药物标志  0:否;1:是
	private String validFlag;//有效标志 0:无效;1:有效
	private String spellCode;//拼音首码
	private String wbzxCode;//五笔首码
	private String storageConditions;//2表示需要冷藏,其他表示不需要冷藏
	private Integer sequence;//排序号
	// Constructors
	/** default constructor */
	public ZyIvPhysicDict() {
	}
	/** full constructor */
	public ZyIvPhysicDict(String physicCode, String physicName,
			String physicSpec, String subjectClass, String doseUnit,
			String quantityUnit, String packUnit, Double minDose,
			Double packSpec, Double retailPrice, String physicFrom,
			String toxicologyType, String basicFlag, String validFlag,
			String spellCode, String wbzxCode, Integer sequence) {
		this.physicCode = physicCode;
		this.physicName = physicName;
		this.physicSpec = physicSpec;
		this.subjectClass = subjectClass;
		this.doseUnit = doseUnit;
		this.quantityUnit = quantityUnit;
		this.packUnit = packUnit;
		this.minDose = minDose;
		this.packSpec = packSpec;
		this.retailPrice = retailPrice;
		this.toxicologyType = toxicologyType;
		this.basicFlag = basicFlag;
		this.validFlag = validFlag;
		this.spellCode = spellCode;
		this.wbzxCode = wbzxCode;
		this.sequence = sequence;
	}
	@Column(name = "physic_code", length = 50)
	public String getPhysicCode() {
		return this.physicCode;
	}
	public void setPhysicCode(String physicCode) {
		this.physicCode = physicCode;
	}
	@Column(name = "physic_name", length = 2000)
	public String getPhysicName() {
		return this.physicName;
	}
	public void setPhysicName(String physicName) {
		this.physicName = physicName;
	}
	@Column(name = "physic_spec", length = 2000)
	public String getPhysicSpec() {
		return this.physicSpec;
	}
	public void setPhysicSpec(String physicSpec) {
		this.physicSpec = physicSpec;
	}
	@Column(name = "subject_class", length = 200)
	public String getSubjectClass() {
		return this.subjectClass;
	}
	public void setSubjectClass(String subjectClass) {
		this.subjectClass = subjectClass;
	}
	@Column(name = "dose_unit", length = 50)
	public String getDoseUnit() {
		return this.doseUnit;
	}
	public void setDoseUnit(String doseUnit) {
		this.doseUnit = doseUnit;
	}
	@Column(name = "quantity_unit", length = 50)
	public String getQuantityUnit() {
		return this.quantityUnit;
	}
	public void setQuantityUnit(String quantityUnit) {
		this.quantityUnit = quantityUnit;
	}
	@Column(name = "pack_unit", length = 250)
	public String getPackUnit() {
		return this.packUnit;
	}
	public void setPackUnit(String packUnit) {
		this.packUnit = packUnit;
	}
	@Column(name = "min_dose", precision = 20, scale = 6)
	public Double getMinDose() {
		return this.minDose;
	}
	public void setMinDose(Double minDose) {
		this.minDose = minDose;
	}
	@Column(name = "pack_spec", precision = 20, scale = 6)
	public Double getPackSpec() {
		return this.packSpec;
	}
	public void setPackSpec(Double packSpec) {
		this.packSpec = packSpec;
	}
	@Column(name = "retail_price", precision = 20, scale = 6)
	public Double getRetailPrice() {
		return this.retailPrice;
	}
	public void setRetailPrice(Double retailPrice) {
		this.retailPrice = retailPrice;
	}
	@Column(name = "physic_form", length = 50)
	public String getPhysicForm() {
		return physicForm;
	}
	public void setPhysicForm(String physicForm) {
		this.physicForm = physicForm;
	}
	@Column(name = "toxicology_type", length = 250)
	public String getToxicologyType() {
		return this.toxicologyType;
	}
	public void setToxicologyType(String toxicologyType) {
		this.toxicologyType = toxicologyType;
	}
	@Column(name = "basic_flag", length = 50)
	public String getBasicFlag() {
		return this.basicFlag;
	}
	public void setBasicFlag(String basicFlag) {
		this.basicFlag = basicFlag;
	}
	@Column(name = "valid_flag", length = 50)
	public String getValidFlag() {
		return this.validFlag;
	}
	public void setValidFlag(String validFlag) {
		this.validFlag = validFlag;
	}
	@Column(name = "spell_code", length = 200)
	public String getSpellCode() {
		return this.spellCode;
	}
	public void setSpellCode(String spellCode) {
		this.spellCode = spellCode;
	}
	@Column(name = "wbzx_code", length = 200)
	public String getWbzxCode() {
		return this.wbzxCode;
	}
	public void setWbzxCode(String wbzxCode) {
		this.wbzxCode = wbzxCode;
	}
	@Column(name = "sequence")
	public Integer getSequence() {
		return this.sequence;
	}
	public void setSequence(Integer sequence) {
		this.sequence = sequence;
	}
	@Column(name = "storage_conditions")
	public String getStorageConditions() {
		return storageConditions;
	}
	public void setStorageConditions(String storageConditions) {
		this.storageConditions = storageConditions;
	}
}

+ 146 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvStaffDict.java

@ -0,0 +1,146 @@
package com.yihu.wlyy.service.entity.zydict;
import com.yihu.wlyy.service.common.model.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.sql.Timestamp;
import java.util.Date;
/**
 * ZyIvStaffDict entity. @author MyEclipse Persistence Tools
 * 员工字典
 */
@Entity
@Table(name = "zy_iv_staff_dict")
public class ZyIvStaffDict extends IdEntity implements java.io.Serializable {
	// Fields
	private String orgCode;//机构编码
	private String staffCode;//员工编码
	private String staffName;//员工姓名
	private String workCode;//工作牌号
	private Date birthday;//出生日期
	private String sex;//性别  详见基础字典中定义
	private String spellCode;//拼音首码
	private String wbzxCode;//五笔首码
	private String identityNo;//证件号
	private String certificateNo;//从业资格证编号
	// Constructors
	/** default constructor */
	public ZyIvStaffDict() {
	}
	/** full constructor */
	public ZyIvStaffDict(String orgCode, String staffCode, String staffName,
			String workCode, Timestamp birthday, String sex, String spellCode,
			String wbzxCode, String identityNo, String certificateNo) {
		this.orgCode = orgCode;
		this.staffCode = staffCode;
		this.staffName = staffName;
		this.workCode = workCode;
		this.birthday = birthday;
		this.sex = sex;
		this.spellCode = spellCode;
		this.wbzxCode = wbzxCode;
		this.identityNo = identityNo;
		this.certificateNo = certificateNo;
	}
	@Column(name = "org_code", length = 50)
	public String getOrgCode() {
		return this.orgCode;
	}
	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}
	@Column(name = "staff_code", length = 50)
	public String getStaffCode() {
		return this.staffCode;
	}
	public void setStaffCode(String staffCode) {
		this.staffCode = staffCode;
	}
	@Column(name = "staff_name", length = 50)
	public String getStaffName() {
		return this.staffName;
	}
	public void setStaffName(String staffName) {
		this.staffName = staffName;
	}
	@Column(name = "work_code", length = 50)
	public String getWorkCode() {
		return this.workCode;
	}
	public void setWorkCode(String workCode) {
		this.workCode = workCode;
	}
	@Column(name = "birthday", length = 0)
	public Date getBirthday() {
		return this.birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	@Column(name = "sex", length = 50)
	public String getSex() {
		return this.sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	@Column(name = "spell_code", length = 200)
	public String getSpellCode() {
		return this.spellCode;
	}
	public void setSpellCode(String spellCode) {
		this.spellCode = spellCode;
	}
	@Column(name = "wbzx_code", length = 200)
	public String getWbzxCode() {
		return this.wbzxCode;
	}
	public void setWbzxCode(String wbzxCode) {
		this.wbzxCode = wbzxCode;
	}
	@Column(name = "identity_no", length = 200)
	public String getIdentityNo() {
		return this.identityNo;
	}
	public void setIdentityNo(String identityNo) {
		this.identityNo = identityNo;
	}
	@Column(name = "certificate_no", length = 200)
	public String getCertificateNo() {
		return this.certificateNo;
	}
	public void setCertificateNo(String certificateNo) {
		this.certificateNo = certificateNo;
	}
}

+ 88 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvStaffRegTypeAllotDict.java

@ -0,0 +1,88 @@
package com.yihu.wlyy.service.entity.zydict;
import com.yihu.wlyy.service.common.model.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * ZyIvStaffRegTypeAllotDict entity. @author MyEclipse Persistence Tools
 * 员工挂号类型配置字典
 */
@Entity
@Table(name = "zy_iv_staff_reg_type_allot_dict")
public class ZyIvStaffRegTypeAllotDict extends IdEntity implements java.io.Serializable {
	// Fields
	private String orgCode;//机构编码
	private String staffCode;//员工编码
	private Integer registerType;//挂号类型编码
	private String registerTypeName;//挂号类型名称
	private Double registerFee;//挂号费用  挂号费+诊察费
	// Constructors
	/** default constructor */
	public ZyIvStaffRegTypeAllotDict() {
	}
	/** full constructor */
	public ZyIvStaffRegTypeAllotDict(String orgCode, String staffCode,
			Integer registerType, String registerTypeName, Double registerFee) {
		this.orgCode = orgCode;
		this.staffCode = staffCode;
		this.registerType = registerType;
		this.registerTypeName = registerTypeName;
		this.registerFee = registerFee;
	}
	@Column(name = "org_code", length = 50)
	public String getOrgCode() {
		return this.orgCode;
	}
	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}
	@Column(name = "staff_code", length = 50)
	public String getStaffCode() {
		return this.staffCode;
	}
	public void setStaffCode(String staffCode) {
		this.staffCode = staffCode;
	}
	@Column(name = "register_type")
	public Integer getRegisterType() {
		return this.registerType;
	}
	public void setRegisterType(Integer registerType) {
		this.registerType = registerType;
	}
	@Column(name = "register_type_name", length = 2000)
	public String getRegisterTypeName() {
		return this.registerTypeName;
	}
	public void setRegisterTypeName(String registerTypeName) {
		this.registerTypeName = registerTypeName;
	}
	@Column(name = "register_fee", precision = 20, scale = 6)
	public Double getRegisterFee() {
		return this.registerFee;
	}
	public void setRegisterFee(Double registerFee) {
		this.registerFee = registerFee;
	}
}

+ 88 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/zydict/ZyIvSubjectClassDict.java

@ -0,0 +1,88 @@
package com.yihu.wlyy.service.entity.zydict;
import com.yihu.wlyy.service.common.model.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * ZyIvSubjectClassDict entity. @author MyEclipse Persistence Tools
 * 科目类别字典
 */
@Entity
@Table(name = "zy_iv_subject_class_dict")
public class ZyIvSubjectClassDict extends IdEntity implements java.io.Serializable {
	// Fields
	private String classCode;//类别代码
	private String className;//类别名称
	private String upperClass;//上级类别
	private String spellCode;//拼音首码
	private String wbzxCode;//五笔首码
	// Constructors
	/** default constructor */
	public ZyIvSubjectClassDict() {
	}
	/** full constructor */
	public ZyIvSubjectClassDict(String classCode, String className,
			String upperClass, String spellCode, String wbzxCode) {
		this.classCode = classCode;
		this.className = className;
		this.upperClass = upperClass;
		this.spellCode = spellCode;
		this.wbzxCode = wbzxCode;
	}
	@Column(name = "class_code", length = 200)
	public String getClassCode() {
		return this.classCode;
	}
	public void setClassCode(String classCode) {
		this.classCode = classCode;
	}
	@Column(name = "class_name", length = 2000)
	public String getClassName() {
		return this.className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	@Column(name = "upper_class", length = 200)
	public String getUpperClass() {
		return this.upperClass;
	}
	public void setUpperClass(String upperClass) {
		this.upperClass = upperClass;
	}
	@Column(name = "spell_code", length = 200)
	public String getSpellCode() {
		return this.spellCode;
	}
	public void setSpellCode(String spellCode) {
		this.spellCode = spellCode;
	}
	@Column(name = "wbzx_code", length = 200)
	public String getWbzxCode() {
		return this.wbzxCode;
	}
	public void setWbzxCode(String wbzxCode) {
		this.wbzxCode = wbzxCode;
	}
}

+ 553 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/ZyDictDataService.java

@ -0,0 +1,553 @@
package com.yihu.wlyy.service.service;
import com.yihu.wlyy.service.dao.zydict.*;
import com.yihu.wlyy.service.entity.zydict.*;
import com.yihu.wlyy.service.service.prescription.PrescriptionService;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
 * Created by chenweida on 2017/8/10.
 * 智业的字典数据
 */
@Service
public class ZyDictDataService extends ZysoftBaseService {
    private Logger logger = LoggerFactory.getLogger(ZyDictDataService.class);
    @Autowired
    private ZyCommonDictDao zyCommonDictDao;
    @Autowired
    private ZyIvDeptDictDao zyIvDeptDictDao;
    @Autowired
    private ZyIvDeptStaffAllotDictDao zyIvDeptStaffAllotDictDao;
    @Autowired
    private ZyIvDiagnoseClassDictDao zyIvDiagnoseClassDictDao;
    @Autowired
    private ZyIvDiagnoseDictDao zyIvDiagnoseDictDao;
    @Autowired
    private ZyIvOrgPhysicAllotDictDao zyIvOrgPhysicAllotDictDao;
    @Autowired
    private ZyIvPhysicDictDao zyIvPhysicDictDao;
    @Autowired
    private ZyIvStaffDictDao zyIvStaffDictDao;
    @Autowired
    private ZyIvStaffRegTypeAllotDictDao zyIvStaffRegTypeAllotDictDao;
    @Autowired
    private ZyIvSubjectClassDictDao zyIvSubjectClassDictDao;
    @Autowired
    private PrescriptionService prescriptionService;
    /**
     * 根据字典名称下载字典
     * @param dictName
     */
    public void dictByDictName(String dictName){
        switch (dictName){
            case IV_SUBJECT_CLASS_DICT:
                synchronizeZy_iv_subject_class_dict();
                break;
            case IV_STAFF_REG_TYPE_ALLOT_DICT:
                synchronizeZy_iv_staff_reg_type_allot_dict();
                break;
            case IV_STAFF_DICT:
                synchronizeZy_iv_staff_dict();
                break;
            case IV_PHYSIC_DICT:
                synchronizeZy_iv_physic_dict();
                break;
            case IV_ORG_PHYSIC_ALLOT_DICT:
                synchronizeZy_iv_org_physic_allot_dict();
                break;
            case IV_DIAGNOSE_CLASS_DICT:
                synchronizeZy_iv_diagnose_class_dict();
                break;
            case IV_DEPT_STAFF_ALLOT_DICT:
                synchronizeZy_iv_dept_staff_allot_dict();
                break;
            case "commonDict":
                synchronizeZyCommonDict();
                break;
            case IV_DEPT_DICT:
                synchronizeZy_iv_dept_dict();
                break;
            default:break;
        }
    }
    public void allDict() {
        try {
            //同步 zy_common_dict
            synchronizeZyCommonDict();
            //同步 zy_iv_dept_dict
            synchronizeZy_iv_dept_dict();
            //同步 zy_iv_dept_staff_allot_dict
            synchronizeZy_iv_dept_staff_allot_dict();
            //同步 zy_iv_diagnose_dict
            synchronizeZy_iv_diagnose_dict();
            //同步 zy_iv_diagnose_class_dict
            synchronizeZy_iv_diagnose_class_dict();
            //同步 zy_iv_org_physic_allot_dict
            synchronizeZy_iv_org_physic_allot_dict();
            //同步 zy_iv_physic_dict
            synchronizeZy_iv_physic_dict();
            //同步 zy_iv_staff_dict
            synchronizeZy_iv_staff_dict();  //birthday    Date(529084800000+0800) 无法解析
            //同步 zy_iv_staff_reg_type_allot_dict
            synchronizeZy_iv_staff_reg_type_allot_dict();
            //同步 zy_iv_subject_class_dict
            synchronizeZy_iv_subject_class_dict();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    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
        zyIvDiagnoseDicts = commonGetOneDict(ZyIvDiagnoseDict.class, dictName);
        if (zyIvDiagnoseDicts != null && zyIvDiagnoseDicts.size() > 0) {
            //清空表
            zyIvDiagnoseDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_diagnose_dict  ,size:" + zyIvDiagnoseDicts.size());
            zyIvDiagnoseDictDao.save(zyIvDiagnoseDicts);
        }
        logger.info("synchronized zy_iv_diagnose_dict end");
    }
    @Transactional
    private void synchronizeZy_iv_subject_class_dict() {
        logger.info("synchronized zy_iv_subject_class_dict start");
        String dictName = this.IV_SUBJECT_CLASS_DICT;
        List<ZyIvSubjectClassDict> zyIvSubjectClassDicts = new ArrayList<>();
        //得到list
        zyIvSubjectClassDicts = commonGetOneDict(ZyIvSubjectClassDict.class, dictName);
        if (zyIvSubjectClassDicts.size() > 0) {
            //清空表
            zyIvSubjectClassDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_subject_class_dict  ,size:" + zyIvSubjectClassDicts.size());
            zyIvSubjectClassDictDao.save(zyIvSubjectClassDicts);
            logger.info("synchronized zy_iv_subject_class_dict end");
        }
    }
    @Transactional
    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;
        List<ZyIvStaffRegTypeAllotDict> zyIvStaffRegTypeAllotDicts = new ArrayList<>();
        //得到list
        zyIvStaffRegTypeAllotDicts = commonGetOneDict(ZyIvStaffRegTypeAllotDict.class, dictName);
        if (zyIvStaffRegTypeAllotDicts != null && zyIvStaffRegTypeAllotDicts.size() > 0) {
            //清空表
            zyIvStaffRegTypeAllotDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_staff_reg_type_allot_dict  ,size:" + zyIvStaffRegTypeAllotDicts.size());
            zyIvStaffRegTypeAllotDictDao.save(zyIvStaffRegTypeAllotDicts);
            logger.info("synchronized zy_iv_staff_reg_type_allot_dict end");
        }
    }
    @Transactional
    private void synchronizeZy_iv_staff_dict() {
        logger.info("synchronized zy_iv_staff_dict start");
        String dictName = this.IV_STAFF_DICT;
        List<ZyIvStaffDict> zyIvStaffDicts = new ArrayList<>();
        //得到list
        zyIvStaffDicts = commonGetOneDict(ZyIvStaffDict.class, dictName);
        //清空表
        if (zyIvStaffDicts != null && zyIvStaffDicts.size() > 0) {
            zyIvStaffDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_staff_dict  ,size:" + zyIvStaffDicts.size());
            zyIvStaffDictDao.save(zyIvStaffDicts);
            logger.info("synchronized zy_iv_staff_dict end");
        }
    }
    @Transactional
    private void synchronizeZy_iv_physic_dict() {
        logger.info("synchronized zy_iv_physic_dict start");
        String dictName = this.IV_PHYSIC_DICT;
        List<ZyIvPhysicDict> zyIvPhysicDicts = new ArrayList<>();
        //得到list
        zyIvPhysicDicts = commonGetOneDict(ZyIvPhysicDict.class, dictName);
        if (zyIvPhysicDicts != null && zyIvPhysicDicts.size() > 0) {
            //清空表
            zyIvPhysicDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_physic_dict  ,size:" + zyIvPhysicDicts.size());
            zyIvPhysicDictDao.save(zyIvPhysicDicts);
            logger.info("synchronized zy_iv_physic_dict end");
        }
    }
    @Transactional
    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;
        List<ZyIvOrgPhysicAllotDict> zyIvOrgPhysicAllotDicts = new ArrayList<>();
        //得到list
        zyIvOrgPhysicAllotDicts = commonGetOneDict(ZyIvOrgPhysicAllotDict.class, dictName);
        if (zyIvOrgPhysicAllotDicts != null && zyIvOrgPhysicAllotDicts.size() > 0) {
            //清空表
            zyIvOrgPhysicAllotDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_org_physic_allot_dict  ,size:" + zyIvOrgPhysicAllotDicts.size());
            zyIvOrgPhysicAllotDictDao.save(zyIvOrgPhysicAllotDicts);
        }
        logger.info("synchronized zy_iv_org_physic_allot_dict end");
    }
    @Transactional
    private void synchronizeZy_iv_diagnose_class_dict() {
        logger.info("synchronized zy_iv_diagnose_class_dict start");
        String dictName = this.IV_DIAGNOSE_CLASS_DICT;
        List<ZyIvDiagnoseClassDict> zIvDiagnoseClassDicts = new ArrayList<>();
        //得到list
        zIvDiagnoseClassDicts = commonGetOneDict(ZyIvDiagnoseClassDict.class, dictName);
        if (zIvDiagnoseClassDicts != null && zIvDiagnoseClassDicts.size() > 0) {
            //清空表
            zyIvDiagnoseClassDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_diagnose_class_dict  ,size:" + zIvDiagnoseClassDicts.size());
            zyIvDiagnoseClassDictDao.save(zIvDiagnoseClassDicts);
        }
        logger.info("synchronized zy_iv_diagnose_class_dict end");
    }
    @Transactional
    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;
        List<ZyIvDeptStaffAllotDict> syIvDeptStaffAllotDictz = new ArrayList<>();
        //得到list
        syIvDeptStaffAllotDictz = commonGetOneDict(ZyIvDeptStaffAllotDict.class, dictName);
        if (syIvDeptStaffAllotDictz != null && syIvDeptStaffAllotDictz.size() > 0) {
            //清空表
            zyIvDeptStaffAllotDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_dept_staff_allot_dict  ,size:" + syIvDeptStaffAllotDictz.size());
            zyIvDeptStaffAllotDictDao.save(syIvDeptStaffAllotDictz);
        }
        logger.info("synchronized zy_iv_dept_staff_allot_dict end");
    }
    @Transactional
    private void synchronizeZyCommonDict() {
        logger.info("synchronized zy_common_dict start");
        String[] dictNames = new String[]{
                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_SEX_DICT, this.IV_PHYSIC_TOXICOLOGY_TYPE_DICT, this.IV_MEASURE_UNIT_DICT,
                this.IV_DEPT_TYPE_DICT};
        List<ZyCommonDict> zyCommonDictz = new ArrayList<>();
        Boolean isFlush = true;
        for (String dictName : dictNames) {
            String json = null;
            try {
                //调用智业的接口得到字典
                json = prescriptionService.getDictForI(dictName);
                JSONObject dataString = JSONObject.fromObject(json);
                JSONArray dataJSONArray = JSONObject.fromObject(dataString).getJSONArray("returnData");
                if (dataJSONArray.size() == 0) {
                    logger.info("zy dict data size " + dataJSONArray.size() + ",dictname:" + dictName);
                    continue;
                }
                //下划线转驼峰
                JSONArray newJA = new JSONArray();
                JSONArray jsonArrayTemp = dataJSONArray.getJSONArray(0);
                logger.info("zy dict data size " + jsonArrayTemp.size() + ",dictname:" + dictName);
                for (int i = 0; i < jsonArrayTemp.size(); i++) {
                    JSONObject jo = jsonArrayTemp.getJSONObject(i);
                    JSONObject newJO = new JSONObject();
                    jo.keySet().stream().forEach(key -> {
                        Object value = jo.get(key);
                        String newKey = Tool.lineToHump(key.toString());
                        newJO.put(newKey, value);
                    });
                    newJA.add(newJO);
                }
                ZyCommonDict[] zyCommonDictArrays = (ZyCommonDict[]) JSONArray.toArray(newJA, ZyCommonDict.class);
                zyCommonDictz.addAll(Arrays.asList(zyCommonDictArrays));
            } catch (Exception e) {
                e.printStackTrace();
                isFlush = false; //设置状态不能更新
                logger.error("dictName:" + dictName);
                logger.error("returnJson:" + json);
                logger.error(e.getMessage());
            }
        }
        //判断是否可以更新
        if (isFlush) {
            // 判断返回的数据是否大于0
            if (zyCommonDictz.size() > 0) {
                //清空表
                zyCommonDictDao.deleteAll();
                //新增数据
                logger.info("save table zy_common_dict  ,size:" + zyCommonDictz.size());
                zyCommonDictDao.save(zyCommonDictz);
            }
        }
        logger.info("synchronized zy_common_dict end");
    }
    @Transactional
    private void synchronizeZy_iv_dept_dict() {
        logger.info("synchronized zy_iv_dept_dict start");
        String dictName = this.IV_DEPT_DICT;
        List<ZyIvDeptDict> zyIvDeptDicts = new ArrayList<>();
        //得到list
        zyIvDeptDicts = commonGetOneDict(ZyIvDeptDict.class, dictName);
        if (zyIvDeptDicts != null && zyIvDeptDicts.size() > 0) {
            //清空表
            zyIvDeptDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_dept_dict  ,size:" + zyIvDeptDicts.size());
            zyIvDeptDictDao.save(zyIvDeptDicts);
        }
        logger.info("synchronized zy_iv_dept_dict end");
    }
    /**
     * 得到单个字典
     *
     * @param clazz    class
     * @param dictName 字典名称
     */
    private List commonGetOneDict(Class clazz, String dictName) {
        String json = null;
        try {
            //调用智业的接口得到字典
            json = prescriptionService.getDictForI(dictName);
            JSONObject joTemp = JSONObject.fromObject(json);
            JSONArray dataJSONArray = joTemp.getJSONArray("returnData");
            if (dataJSONArray.size() == 0) {
                logger.info("zy dict data size " + dataJSONArray.size() + ",dictname:" + dictName);
                return null;
            } else {
                dataJSONArray = dataJSONArray.getJSONArray(0);
            }
            logger.info("zy dict data size " + dataJSONArray.size() + ",dictname:" + dictName);
            //下划线转驼峰
            JSONArray newJA = new JSONArray();
            for (int i = 0; i < dataJSONArray.size(); i++) {
                JSONObject jo = dataJSONArray.getJSONObject(i);
                JSONObject newJO = new JSONObject();
                jo.keySet().stream().forEach(key -> {
                    Object value = jo.get(key);
                    String newKey = Tool.lineToHump(key.toString());
                    newJO.put(newKey, value);
                });
                newJA.add(newJO);
            }
            return (List) JSONArray.toCollection(newJA, clazz);
        } catch (Exception e) {
            logger.error("dictName:" + dictName);
            logger.error("returnJson:" + json);
            logger.error(e.getMessage());
        }
        return null;
    }
    /**
     * 智业的字典
     */
    public static final String IV_MEASURE_UNIT_DICT = "IV_MEASURE_UNIT_DICT";//("计量单位字典", "IV_MEASURE_UNIT_DICT"),
    public static final String IV_PHYSIC_FORM_DICT = "IV_PHYSIC_FORM_DICT";//("药品剂型字典", "IV_PHYSIC_FORM_DICT"),
    public static final String IV_PHYSIC_INJECT_PLACE_DICT = "IV_PHYSIC_INJECT_PLACE_DICT";//"计量单位字典", "IV_PHYSIC_INJECT_PLACE_DICT"),
    public static final String IV_PHYSIC_SKIN_TEST_DICT = "IV_PHYSIC_SKIN_TEST_DICT";//("皮试类型字典", "IV_PHYSIC_SKIN_TEST_DICT"),
    public static final String IV_RATE_TYPE_DICT = "IV_RATE_TYPE_DICT";//("费别字典", "IV_RATE_TYPE_DICT"),
    public static final String IV_RECIPE_FREQUENCY_DICT = "IV_RECIPE_FREQUENCY_DICT";//("频次字典", "IV_RECIPE_FREQUENCY_DICT"),
    public static final String IV_RECIPE_USAGE_DICT = "IV_RECIPE_USAGE_DICT";//("用药方法字典", "IV_RECIPE_USAGE_DICT"),
    public static final String IV_SEX_DICT = "IV_SEX_DICT";//("性别字典", "IV_SEX_DICT"),
    public static final String IV_PHYSIC_DICT = "IV_PHYSIC_DICT";//("药品字典", "IV_PHYSIC_DICT"),
    public static final String IV_ORG_PHYSIC_ALLOT_DICT = "IV_ORG_PHYSIC_ALLOT_DICT";//("机构药品分发字典", "IV_ORG_PHYSIC_ALLOT_DICT "),
    public static final String IV_SUBJECT_CLASS_DICT = "IV_SUBJECT_CLASS_DICT";//("科目类别字典", "IV_SUBJECT_CLASS_DICT"),
    public static final String IV_PHYSIC_TOXICOLOGY_TYPE_DICT = "IV_PHYSIC_TOXICOLOGY_TYPE_DICT";//("药品毒理分类字典", "IV_PHYSIC_TOXICOLOGY_TYPE_DICT"),
    public static final String IV_DEPT_DICT = "IV_DEPT_DICT";//("科室字典", "IV_DEPT_DICT"),
    public static final String IV_DEPT_TYPE_DICT = "IV_DEPT_TYPE_DICT";//("科室类型字典", "IV_DEPT_TYPE_DICT"),
    public static final String IV_DIAGNOSE_DICT = "IV_DIAGNOSE_DICT";//("诊断字典", "IV_DIAGNOSE_DICT"),
    public static final String IV_DIAGNOSE_CLASS_DICT = "IV_DIAGNOSE_CLASS_DICT";//("诊断类别字典", "IV_DIAGNOSE_CLASS_DICT"),
    public static final String IV_STAFF_DICT = "IV_STAFF_DICT";//("员工字典", "IV_STAFF_DICT"),
    public static final String IV_STAFF_REG_TYPE_ALLOT_DICT = "IV_STAFF_REG_TYPE_ALLOT_DICT";//("员工挂号类型配置字典", "IV_STAFF_REG_TYPE_ALLOT_DICT"),
    public static final String IV_DEPT_STAFF_ALLOT_DICT = "IV_DEPT_STAFF_ALLOT_DICT";//("科室员工配置字典", "IV_DEPT_STAFF_ALLOT_DICT");
    /**
     * 字典表的枚举类
     */
    public enum TableName {
        zy_common_dict("通用字典", "zy_common_dict"),
        zy_iv_dept_dict("科室字典", "zy_iv_dept_dict"),
        zy_iv_dept_staff_allot_dict("科室员工配置字典", "zy_iv_dept_staff_allot_dict"),
        zy_iv_diagnose_class_dict("诊断类别字典", "zy_iv_diagnose_class_dict"),
        zy_iv_diagnose_dict("诊断字典表", "zy_iv_diagnose_dict"),
        zy_iv_org_physic_allot_dict("机构药品分发字典", "zy_iv_org_physic_allot_dict"),
        zy_iv_physic_dict("药品字典", "zy_iv_physic_dict"),
        zy_iv_staff_dict("员工字典", "zy_iv_staff_dict"),
        zy_iv_staff_reg_type_allot_dict("员工挂号类型配置字典", "zy_iv_staff_reg_type_allot_dict"),
        zy_iv_subject_class_dict("科目类别字典", "zy_iv_subject_class_dict");
        TableName(String name, String dict) {
            this.name = name;
            this.dict = dict;
        }
        private String name;
        private String dict;
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public String getDict() {
            return dict;
        }
        public void setDict(String dict) {
            this.dict = dict;
        }
    }
    /**
     * 根据字典获取表名
     *
     * @param dictName
     * @return
     */
    public String getTableName(String dictName) {
        switch (dictName) {
            case IV_PHYSIC_FORM_DICT: {
                return TableName.zy_common_dict.getDict();
            }
            case IV_PHYSIC_INJECT_PLACE_DICT: {
                return TableName.zy_common_dict.getDict();
            }
            case IV_PHYSIC_SKIN_TEST_DICT: {
                return TableName.zy_common_dict.getDict();
            }
            case IV_RATE_TYPE_DICT: {
                return TableName.zy_common_dict.getDict();
            }
            case IV_RECIPE_FREQUENCY_DICT: {
                return TableName.zy_common_dict.getDict();
            }
            case IV_RECIPE_USAGE_DICT: {
                return TableName.zy_common_dict.getDict();
            }
            case IV_SEX_DICT: {
                return TableName.zy_common_dict.getDict();
            }
            case IV_PHYSIC_TOXICOLOGY_TYPE_DICT: {
                return TableName.zy_common_dict.getDict();
            }
            case IV_MEASURE_UNIT_DICT: {
                return TableName.zy_common_dict.getDict();
            }
            case IV_DEPT_TYPE_DICT: {
                return TableName.zy_common_dict.getDict();
            }
            case IV_PHYSIC_DICT: {
                return TableName.zy_iv_physic_dict.getDict();
            }
            case IV_ORG_PHYSIC_ALLOT_DICT: {
                return TableName.zy_iv_org_physic_allot_dict.getDict();
            }
            case IV_SUBJECT_CLASS_DICT: {
                return TableName.zy_iv_subject_class_dict.getDict();
            }
            case IV_DIAGNOSE_DICT: {
                return TableName.zy_iv_diagnose_dict.getDict();
            }
            case IV_DIAGNOSE_CLASS_DICT: {
                return TableName.zy_iv_diagnose_class_dict.getDict();
            }
            case IV_STAFF_DICT: {
                return TableName.zy_iv_staff_dict.getDict();
            }
            case IV_STAFF_REG_TYPE_ALLOT_DICT: {
                return TableName.zy_iv_staff_reg_type_allot_dict.getDict();
            }
            case IV_DEPT_STAFF_ALLOT_DICT: {
                return TableName.zy_iv_dept_staff_allot_dict.getDict();
            }
            case IV_DEPT_DICT: {
                return TableName.zy_iv_dept_dict.getDict();
            }
        }
        return "";
    }
    public static class Tool {
        private static Pattern linePattern = Pattern.compile("_(\\w)");
        /**
         * 下划线转驼峰
         */
        public static String lineToHump(String str) {
            str = str.toLowerCase();
            Matcher matcher = linePattern.matcher(str);
            StringBuffer sb = new StringBuffer();
            while (matcher.find()) {
                matcher.appendReplacement(sb, matcher.group(1).toUpperCase());
            }
            matcher.appendTail(sb);
            return sb.toString();
        }
        /**
         * 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)})
         */
        public static String humpToLine(String str) {
            return str.replaceAll("[A-Z]", "_$0").toLowerCase();
        }
        private static Pattern humpPattern = Pattern.compile("[A-Z]");
        /**
         * 驼峰转下划线,效率比上面高
         */
        public static String humpToLine2(String str) {
            Matcher matcher = humpPattern.matcher(str);
            StringBuffer sb = new StringBuffer();
            while (matcher.find()) {
                matcher.appendReplacement(sb, "_" + matcher.group(0).toLowerCase());
            }
            matcher.appendTail(sb);
            return sb.toString();
        }
    }
}

+ 0 - 1
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/common/InitiSysProService.java

@ -1,6 +1,5 @@
package com.yihu.wlyy.service.service.common;
import com.yihu.wlyy.service.common.CommonContent;
import com.yihu.wlyy.service.common.SystemConfig;
import com.yihu.wlyy.service.dao.common.SystemPropertiesDao;
import com.yihu.wlyy.service.entity.common.SystemProperties;

+ 16 - 16
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionCAService.java

@ -32,7 +32,7 @@ public class PrescriptionCAService {
    @Autowired
    private ObjectMapper objectMapper;
    private String getHeaderXml(String api)
    private String getHeaderXml(String api,String srcBusinessStreamNO)
    {
        return "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
            "<root>\n" +
@ -42,13 +42,13 @@ public class PrescriptionCAService {
            "   <certificate></certificate>\n" +
            "   <srcIP>10.95.22.10</srcIP >\n" +
            "   <srcUserMac>60-D8-19-57-66-E3</srcUserMac>\n" +
            "   <srcUserMac>00:50:56:85:39:82</srcUserMac>\n" +
            "   <srcSystemCode>1</srcSystemCode>\n" +
            "   <srcSystemName>厦门i健康</srcSystemName>\n" +
            "   <srcBusinessNodeCode>node01</srcBusinessNodeCode>\n" +
            "   <srcBusinessNodeName>审核</srcBusinessNodeName>\n" +
            "   <srcOperatorAccount>Zhuangsd</srcOperatorAccount>\n" +
            "   <srcBusinessStreamNO>11111</srcBusinessStreamNO>\n" +
            "   <srcOperatorAccount>"+srcBusinessStreamNO+"</srcOperatorAccount>\n" +
            "   <srcBusinessStreamNO>"+srcBusinessStreamNO+"</srcBusinessStreamNO>\n" +
            "   <srcDataExtProperty></srcDataExtProperty>\n" +
            "</root>";
    }
@ -56,7 +56,7 @@ public class PrescriptionCAService {
    /**
     * CA认证服务二次封装
     */
    private String postCAServer(String api, Map<String,String> params) throws Exception
    private String postCAServer(String api, Map<String,String> params,String srcBusinessStreamNO) throws Exception
    {
        String urlString = SystemConfig.sysPropertiesSets.get("ca_url");
@ -74,7 +74,7 @@ public class PrescriptionCAService {
        msgBody += "</root>";
        String msgHeader = getHeaderXml(api);
        String msgHeader = getHeaderXml(api,srcBusinessStreamNO);
        Map<String,String> p = new HashMap<>();
        p.put("msgHeader",msgHeader);
@ -86,7 +86,7 @@ public class PrescriptionCAService {
    /**
     * 判断是否有实名证书
     **/
    public String isApplied(String strUserIdcardNum)  throws Exception
    public String isApplied(String strUserIdcardNum,String srcBusinessStreamNO)  throws Exception
    {
        Boolean isSuccess = true;
        String re = "";
@ -98,7 +98,7 @@ public class PrescriptionCAService {
            params.put("strUserIdcardNum",strUserIdcardNum);
            body = objectMapper.writeValueAsString(params);
            re = postCAServer(action, params);
            re = postCAServer(action, params,srcBusinessStreamNO);
            if(StringUtil.isEmpty(re))
            {
@ -131,7 +131,7 @@ public class PrescriptionCAService {
    /**
     * 请求实名软证书并进行数字签名
     **/
    public String requestRealNameSoftCertAndSign(String strUserIdcardNum,String strRealNameSoftCertCalledPasswd,String strOriginalData) throws Exception
    public String requestRealNameSoftCertAndSign(String strUserIdcardNum,String strRealNameSoftCertCalledPasswd,String strOriginalData,String srcBusinessStreamNO) throws Exception
    {
        Boolean isSuccess = true;
        String re = "";
@ -147,7 +147,7 @@ public class PrescriptionCAService {
            body = objectMapper.writeValueAsString(params);
            re = postCAServer(action, params);
            re = postCAServer(action, params,srcBusinessStreamNO);
            if(StringUtil.isEmpty(re))
            {
@ -183,7 +183,7 @@ public class PrescriptionCAService {
    /**
     * 获取实名软证书的过期时间
     **/
    public String getRealNameSoftCertExpiredDatetime(String strUserIdcardNum)  throws Exception
    public String getRealNameSoftCertExpiredDatetime(String strUserIdcardNum,String srcBusinessStreamNO)  throws Exception
    {
        Boolean isSuccess = true;
        String re = "";
@ -196,7 +196,7 @@ public class PrescriptionCAService {
            body = objectMapper.writeValueAsString(params);
            re = postCAServer(action, params);
            re = postCAServer(action, params,srcBusinessStreamNO);
            if(StringUtil.isEmpty(re))
            {
@ -229,7 +229,7 @@ public class PrescriptionCAService {
    /**
     * 修改实名软证书调用保护口令
     **/
    public String modifyRealNameSoftCertCalledPasswd(String strUserIdcardNum,String strOldCalledPasswd,String strNewCalledPasswd) throws Exception
    public String modifyRealNameSoftCertCalledPasswd(String strUserIdcardNum,String strOldCalledPasswd,String strNewCalledPasswd,String srcBusinessStreamNO) throws Exception
    {
        Boolean isSuccess = true;
        String re = "";
@ -244,7 +244,7 @@ public class PrescriptionCAService {
            params.put("strNewCalledPasswd",strNewCalledPasswd);
            body = objectMapper.writeValueAsString(params);
            re = postCAServer(action, params);
            re = postCAServer(action, params,srcBusinessStreamNO);
            if(StringUtil.isEmpty(re))
            {
@ -283,7 +283,7 @@ public class PrescriptionCAService {
    /**
     * 验证签名(带多服务器负载均衡)
     **/
    public String verifySignOnMultiServer(String strSignData,String strCertData,String strOriginalData) throws Exception
    public String verifySignOnMultiServer(String strSignData,String strCertData,String strOriginalData,String srcBusinessStreamNO) throws Exception
    {
        Boolean isSuccess = true;
        String re = "";
@ -297,7 +297,7 @@ public class PrescriptionCAService {
            params.put("strOriginalData",strOriginalData);
            body = objectMapper.writeValueAsString(params);
            re = postCAServer(action, params);
            re = postCAServer(action, params,srcBusinessStreamNO);
            if(StringUtil.isEmpty(re))
            {

+ 16 - 16
patient-co-service/wlyy_service/src/main/resources/system.properties

@ -1,20 +1,20 @@
###基卫测试环境服务
gateway_url = http://117.25.173.18:18280/
gateway_licence = 5YGl5bq45LmL7Lev
gateway_public_key = PublicKeyTest.key
jw_hospital = 350211B1013
jw_licence = 5YGl5bq45LmL7Lev
ca_url = http://117.29.183.114:8081/XMCAService?wsdl
ca_namespace = http://platfomservice.xmca.com/
##基卫服务
#guahao_url =  http://10.95.18.10/urp.service/urp.open.service/ReservationPulic.asmx
#guahao_namespace = http://www.zysoft.com.cn/
#gateway_url = http://10.95.21.21:18280/
#gateway_url = http://117.25.173.18:18280/
#gateway_licence = 5YGl5bq45LmL7Lev
#gateway_public_key = PublicGov.key
#jw_hospital = 350211B1004
#jw_licence = 5YGl5bq35LmL6LevMzUwMjExQjEwMDQ=
#gateway_public_key = PublicKeyTest.key
#jw_hospital = 350211B1013
#jw_licence = 5YGl5bq45LmL7Lev
#ca_url = http://117.29.183.114:8081/XMCAService?wsdl
#ca_namespace = http://platfomservice.xmca.com/
#ca_namespace = http://platfomservice.xmca.com/
##基卫服务
guahao_url =  http://10.95.18.10/urp.service/urp.open.service/ReservationPulic.asmx
guahao_namespace = http://www.zysoft.com.cn/
gateway_url = http://10.95.21.21:18280/
gateway_licence = 5YGl5bq45LmL7Lev
gateway_public_key = PublicGov.key
jw_hospital = 350211B1004
jw_licence = 5YGl5bq35LmL6LevMzUwMjExQjEwMDQ=
ca_url = http://117.29.183.114:8081/XMCAService?wsdl
ca_namespace = http://platfomservice.xmca.com/

TEMPAT SAMPAH
patient-co/patient-co-wlyy/doc/接口文档/对外接口文档/集美健康教育/集美健康教育对外接口文档.docx


+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/MvcConfig.java

@ -18,7 +18,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
 * Created by chenweida on 2017/4/6.
 */
@Configuration
//@Profile({"test", "prod"})
@Profile({"test", "prod"})
public class MvcConfig extends WebMvcConfigurerAdapter {
    private Logger logger = LoggerFactory.getLogger(MvcConfig.class);

+ 6 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java

@ -1310,6 +1310,7 @@ public class DoctorInfoService extends BaseService {
        String url = jwUrl+"/third/prescription/IsApplied";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("strUserIdcardNum",strUserIdcardNum));
        params.add(new BasicNameValuePair("doctorCode",doctorCode));
        String response = HttpClientUtil.post(url, params, "UTF-8");
        if (!StringUtils.isEmpty(response)){
            JSONObject responseObject = new JSONObject(response);
@ -1374,6 +1375,7 @@ public class DoctorInfoService extends BaseService {
        String url = jwUrl+"/third/prescription/GetRealNameSoftCertExpiredDatetime";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("strUserIdcardNum",strUserIdcardNum));
        params.add(new BasicNameValuePair("doctorCode",doctorCode));
        String response = HttpClientUtil.post(url, params, "UTF-8");
        if (!StringUtils.isEmpty(response)){
@ -1421,6 +1423,7 @@ public class DoctorInfoService extends BaseService {
        params.add(new BasicNameValuePair("strUserIdcardNum",strUserIdcardNum));
        params.add(new BasicNameValuePair("strOldCalledPasswd",strOldCalledPasswd));
        params.add(new BasicNameValuePair("strNewCalledPasswd",strNewCalledPasswd));
        params.add(new BasicNameValuePair("doctorCode",doctorCode));
        String response = HttpClientUtil.post(url, params, "UTF-8");
        if (!StringUtils.isEmpty(response)){
            JSONObject responseObject = new JSONObject(response);
@ -1466,6 +1469,7 @@ public class DoctorInfoService extends BaseService {
        params.add(new BasicNameValuePair("strRealNameSoftCertCalledPasswd",strRealNameSoftCertCalledPasswd));
        String originalDataAbstract = MD5.GetMD5Code(strOriginalData);
        params.add(new BasicNameValuePair("strOriginalData",originalDataAbstract));
        params.add(new BasicNameValuePair("prescriptionCode",prescriptionCode));
//        params.add(new BasicNameValuePair("srcBusinessStreamNO",srcBusinessStreamNO));
        String response = HttpClientUtil.post(url, params, "UTF-8");
        if (!StringUtils.isEmpty(response)){
@ -1505,13 +1509,14 @@ public class DoctorInfoService extends BaseService {
    }
    //验证签名( ( 带多服务器负载均衡) )
    public boolean verifySignOnMultiServer(String strSignData,String strCertData,String strOriginalData) throws Exception{
    public boolean verifySignOnMultiServer(String strSignData,String strCertData,String strOriginalData,String prescriptionCode) throws Exception{
        String url = jwUrl+"/third/prescription/VerifySignOnMultiServer";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("strSignData",strSignData));
        params.add(new BasicNameValuePair("strCertData",strCertData));
        params.add(new BasicNameValuePair("strOriginalData",MD5.GetMD5Code(strOriginalData)));
        params.add(new BasicNameValuePair("prescriptionCode",prescriptionCode));
        String response = HttpClientUtil.post(url, params, "UTF-8");
        if (!StringUtils.isEmpty(response)){
            JSONObject responseObject = new JSONObject(response);

+ 6 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/PatientInfoService.java

@ -126,7 +126,7 @@ public class PatientInfoService extends BaseService {
     */
    public int isMobileRegister(String mobile) {
        List<Patient> p = patientDao.findByMobile(mobile);
        if (p != null&& p.size()>0) {
        if (p != null && p.size() > 0) {
            return 1;
        } else {
            return 0;
@ -150,7 +150,7 @@ public class PatientInfoService extends BaseService {
            return result;
        }
        if(!patient.equals(family)) {
        if (!patient.equals(family)) {
            PatientFamilyMember member = familyMemberService.getPatientFamilyMember(patient, family);
            // 家庭成员中不存在该人
            if (member == null) {
@ -227,7 +227,9 @@ public class PatientInfoService extends BaseService {
    public Patient updatePatient(Patient patient) {
        if (StringUtils.isNotEmpty(patient.getStreet())) {
            Street street = streetDao.findByCode(patient.getStreet());
            patient.setStreetName(street.getName());
            if (street != null) {
                patient.setStreetName(street.getName());
            }
        } else {
            patient.setStreetName("");
        }
@ -285,7 +287,7 @@ public class PatientInfoService extends BaseService {
    public void checkMobile(String mobile) throws Exception {
        List<Patient> p = patientDao.findByMobile(mobile);
        if (p != null&&p.size()>0) {
        if (p != null && p.size() > 0) {
            throw new Exception("手机号已经被注册");
        }
    }

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

@ -132,7 +132,8 @@ public class PrescriptionExpressageService {
            }
            case 2: {
                //判断是2 配送员(健管师)取药码
                returnStatus = dispensaryCode_2(userCode, prescriptionDispensaryCode);
//                returnStatus = dispensaryCode_2(userCode, prescriptionDispensaryCode);
                returnStatus = -3;
                break;
            }
            case 3: {

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

@ -279,8 +279,10 @@ public class PrescriptionInfoService extends BaseService {
     * @param code
     * @return
     */
    public com.alibaba.fastjson.JSONObject getPrescription(String code) {
        String rs = jwPrescriptionService.getRecipe(code, null);
    public com.alibaba.fastjson.JSONObject getPrescription(String code,String patient) {
        Patient p = patientDao.findByCode(patient);
        Prescription prescription = prescriptionDao.findByCode(code);
        String rs = jwPrescriptionService.getRecipe(prescription.getJwCode(), p.getSsc());
        com.alibaba.fastjson.JSONObject r = presModeAdapter.modelToSinglePrescription(rs);
        String rState = presCheckStateObj(code);
        if ("1".equals(rState)) {

+ 7 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -20,6 +20,8 @@ import com.yihu.wlyy.util.MapListUtils;
import com.yihu.wlyy.util.SystemConf;
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.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
@ -39,6 +41,8 @@ import java.util.*;
 */
@Service
public class StatisticsService extends BaseService {
    private Logger logger= LoggerFactory.getLogger(StatisticsService.class);
    @Autowired
    CityDao cityDao;
    @Autowired
@ -4235,6 +4239,9 @@ public class StatisticsService extends BaseService {
    private int getLevel1NumForRedis(String index, String level, String code, String timeKey) {
        String key37 = "quota:" + index + ":" + level + ":" + code + ":" + timeKey;
        JSONObject switchJo = new JSONObject(redisTemplate.opsForValue().get(key37));
        logger.info(key37);
        logger.info(redisTemplate==null?"true":"false");
        logger.info(switchJo.toString());
        return switchJo.getInt("num");
    }

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java

@ -2002,7 +2002,7 @@ public class DoctorController extends BaseController {
            @ApiParam(required = true, name = "strOriginalData", value = "原文数据") @RequestParam(value = "strOriginalData",required = true) String strOriginalData){
            try {
                boolean bl = doctorInfoService.verifySignOnMultiServer(strSignData,strCertData,strOriginalData);
                boolean bl = doctorInfoService.verifySignOnMultiServer(strSignData,strCertData,strOriginalData,getUID());
                return write(200, "获取信息成功!", "data", bl);
            }catch (Exception e) {
                error(e);

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

@ -405,10 +405,10 @@ public class PrescriptionInfoController extends BaseController {
    @RequestMapping(value = "/getPrescription", method = RequestMethod.GET)
    @ApiOperation(value = "获取长处方详细信息")
    public String getPrescription(@RequestParam(required = true) @ApiParam(name = "code", value = "处方CODE") String
                                          code) {
    public String getPrescription(@RequestParam(required = true) @ApiParam(name = "code", value = "处方CODE") String code
            ,@RequestParam(required = true) @ApiParam(name = "patient", value = "居民CODE") String  patient) {
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescription(code));
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescription(code,patient));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");

+ 1 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/gateway/controller/GcMessageController.java

@ -1,14 +1,11 @@
package com.yihu.wlyy.web.gateway.controller;
package com.yihu.wlyy.web.gateway.controller.doctor;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.service.common.SMSService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.util.NetworkUtil;
import com.yihu.wlyy.web.gateway.vo.DoctorModel;
import com.yihu.wlyy.web.gateway.vo.PatientModel;
import com.yihu.wlyy.web.gateway.vo.base.BaseResultModel;
import com.yihu.wlyy.web.gateway.vo.base.ResultBatchModel;
import com.yihu.wlyy.web.gateway.vo.base.ResultOneModel;
import com.yihu.wlyy.wechat.util.WeiXinTempMsgSendUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -16,14 +13,12 @@ import io.swagger.annotations.ApiParam;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

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

@ -59,7 +59,7 @@ public class PatientPrescriptionInfoController extends BaseController {
    @ApiOperation(value = "获取长处方详细信息")
    public String getPrescription(@RequestParam(required = true)@ApiParam(name="code",value="处方CODE")String code){
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescription(code));
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescription(code,getUID()));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");

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

@ -46,11 +46,12 @@ spring:
  redis:
    database: 0 # Database index used by the connection factory.
    password: # Login password of the redis server.
    timeout: 0 # Connection timeout in milliseconds.
      #sentinel:
      #  master: # Name of Redis server.
      #  nodes: # Comma-separated list of host:port pairs.
    timeout: 120000 # 连接超时时间(毫秒) 60秒
    pool:
      max-active: 20 # 连接池最大连接数(使用负值表示没有限制)
      max-wait: -1  # 连接池最大阻塞等待时间(使用负值表示没有限制)
      max-idle: 20  # 连接池中的最大空闲连接
      min-idle: 5  # 连接池中的最小空闲连接
logging:
  level:
@ -198,13 +199,11 @@ spring:
      password: jkzlehr@123
    health:
      url: jdbc:mysql://59.61.92.90:8079/device?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
#      username: wlyy
#      password: jkzlehr@321465
      username: wlyy
      password: jkzlehr@123
  redis:
    host: 27.155.101.77 # Redis server host.
    host: 120.41.253.95 # Redis server host.
    port: 6380 # Redis server port.
    password: jkzl_ehr