Sfoglia il codice sorgente

Merge branch 'dev' of http://27.154.233.186:10080/Amoy2/wlyy2.0 into dev

Trick 5 anni fa
parent
commit
7faeee313d

+ 3 - 1
business/base-service/src/main/java/com/yihu/jw/evaluate/score/service/BaseEvaluateScoreService.java

@ -70,10 +70,12 @@ public class BaseEvaluateScoreService extends BaseJpaService<BaseEvaluateScoreDO
     * @return
     */
    private Double getAvgScore(String startTime,String endTime,String area,int level){
        String sql = "select count(*) as total, sum(score) as score from base.base_evaluate_score o where";
        String sql = "select count(*) as total, sum(score) as score from base.base_evaluate_score o where ";
        if (level == 4){
            sql += " o.doctor IN (SELECT doctor_code FROM `base_doctor_hospital` dh where dh.org_code ='"+area+"' and dh.del=1)";
        }if (level==2){
            sql += " 1=1 ";
        }else if (level == 5){
            sql += " o.doctor IN (SELECT doctor_code FROM `base_doctor_hospital` dh where dh.dept_code ='"+area+"' and dh.del=1)";
        }else if (level == 6){

+ 161 - 82
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -1250,7 +1250,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                outpatientDao.save(outpatientDO);
                //调用电子病历注册
                manageType =2;
                registDianziBingli(outPatientId,basePatientDO,manageType);
                registDianziBingli(outpatientDO,basePatientDO,manageType,registerDO.getRegisterNo(),registerDO.getConNo());
                return res;
            }
        }
@ -1288,7 +1288,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            registerDO.setCreateTime(new Date());
            registerDO.setDate(DateUtil.dateToStr(new Date(),"yyyy-MM-dd"));
            patientRegisterDao.save(registerDO);
            
    
            //调用电子病历注册
            manageType = 1;//处理类型(1-新增 2-修改 3-删除) 必填
            registDianziBingli(outpatientDO,basePatientDO,manageType,registerDO.getRegisterNo(),registerDO.getConNo());
            
        }else if("-2".equals(rsCode)){
@ -1316,11 +1319,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            registerDO.setDate(DateUtil.dateToStr(new Date(),"yyyy-MM-dd"));
            patientRegisterDao.save(registerDO);
        }
    
        manageType = 1;//处理类型(1-新增 2-修改 3-删除) 必填
            //调用电子病历注册
            manageType = 1;//处理类型(1-新增 2-修改 3-删除) 必填
            registDianziBingli(outpatientDO,basePatientDO,manageType,registerDO.getRegisterNo(),registerDO.getConNo());
        }
    
        registDianziBingli(outPatientId,basePatientDO,manageType);
        
            //保存日志
@ -1337,93 +1341,168 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return res;
    }
    
    public String registDianziBingli(String outPatientId,BasePatientDO basePatientDO,Integer manageType) throws Exception {
    public String registDianziBingli(WlyyOutpatientDO outpatientDO,BasePatientDO basePatientDO,Integer manageType,String RegisterSN,String registerCon) throws Exception {
    
        //调用电子病历接口注册居民信息
            String patientMappingCode =  patientMappingService.findHisPatNoByIdCard(basePatientDO.getIdcard());
            DoctorMappingDO doctorMappingDO = doctorMappingService.findMappingCode(outpatientDO.getDoctor(),outpatientDO.getHospital());
            Map<String,String> params = new HashedMap();
            params.put("type","PatientInfo");
            String xmlStr = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
                    "<HtRequest >" +
                    "<PatientInfo>" +
                    "<RecordFlow>"+outPatientId+"</RecordFlow >" +
                    "<PID>"+patientMappingCode+"</PID>" +
                    "<InsuranceNo>"+basePatientDO.getIdcard()+"</InsuranceNo>" +
                    "<PatientName>"+basePatientDO.getName()+"</PatientName>" +
                    "<TmpFlag>正式</TmpFlag>" +
                    "<LastName>"+basePatientDO.getName().substring(1,basePatientDO.getName().length())+"</LastName>" +
                    "<FirstName>"+basePatientDO.getName().substring(0,1)+"</FirstName>" +
                    "<PY>"+ PinYinUtils.getUpEname(basePatientDO.getName())+"</PY>" +
                    "<WB></WB>" +
            
            String _xmlStr="<?xml version='1.0' encoding='UTF-8'?>" +
                    "<HtRequest>" +
                    "<OutRegister>" +
                    "<RecordFlow>"+outpatientDO.getId()+"</RecordFlow>" +
                    "<RegisterSN>"+RegisterSN+"</RegisterSN>" +
                    "<TreatDate>"+DateUtil.getStringDate("yyyyMMdd")+"</TreatDate>" +
                    "<RegisterDeptCode>"+outpatientDO.getDept()+"</RegisterDeptCode>" +
                    "<RegisterDeptName>"+outpatientDO.getDeptName()+"</RegisterDeptName>" +
                    "<RegisterDoctorID>"+doctorMappingDO.getMappingCode()+"</RegisterDoctorID>" +
                    "<RegisterDoctorName>"+doctorMappingDO.getDoctorName()+"</RegisterDoctorName>" +
                    "<DutyID></DutyID>" +
                    "<DutyName></DutyName>" +
                    "<OutPatientTime></OutPatientTime>" +
                    "<NumClassCode></NumClassCode>" +
                    "<NumClassName></NumClassName>" +
                    "<JoinGroupCode></JoinGroupCode>" +
                    "<JoinGroupName></JoinGroupName>" +
                    "<NumClassNO></NumClassNO>" +
                    "<AppointmentDateTime></AppointmentDateTime>" +
                    "<AppointSN></AppointSN>" +
                    "<Pid>"+patientMappingCode+"</Pid>" +
                    "<CardNO>"+outpatientDO.getCardNo()+"</CardNO>\n" +
                    "<PatientName>"+basePatientDO.getName()+"</PatientName>"+
                    "<SexCode>"+basePatientDO.getSex()+"</SexCode>";
            if(1 == basePatientDO.getSex()){
                xmlStr = xmlStr + "<Sex>男</Sex>";
            }else{
                xmlStr = xmlStr +  "<Sex>女</Sex>";
            }
        
            xmlStr = xmlStr +    "<DateOfBirth>"+DateUtil.dateToStrShort(IdCardUtil.getBirthdayForIdcard(basePatientDO.getIdcard()))+"</DateOfBirth>" +
                    "<TimeOfBirth></TimeOfBirth>" +
                    "<MarriageStatusCode></MarriageStatusCode>" +
                    "<MarriageStatus></MarriageStatus>" +
                    "<OccupationCode></OccupationCode>" +
                    "<Occupation></Occupation>" +
                    "<NationalityCode></NationalityCode>" +
                    "<Nationality></Nationality>" +
                    "<CountryCode>CN</CountryCode>" +
                    "<Country>中国</Country>" +
                    "<FormalSchoolingCode></FormalSchoolingCode>" +
                    "<FormalSchooling></FormalSchooling>" +
                    "<Religion></Religion>" +
                    "<BirthPlaceCode></BirthPlaceCode>" +
                    "<BirthPlace></BirthPlace>" +
                    "<NativePlaceCode></NativePlaceCode>" +
                    "<NativePlace></NativePlace>" +
                    "<BloodType></BloodType>" +
                    "<CertTypeCode>111</CertTypeCode>" +
                    "<CertType>身份证</CertType>" +
                    "<CertNo>"+basePatientDO.getIdcard()+"</CertNo>" +
                    "<PatientClassCode></PatientClassCode>" +
                    if(1 == basePatientDO.getSex()){
                        _xmlStr = _xmlStr + "<Sex>男</Sex>";
                    }else{
                        _xmlStr = _xmlStr +  "<Sex>女</Sex>";
                    }
                    _xmlStr = _xmlStr + "<Age>"+IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard())+"</Age>" +
                    "<AgeDesc>"+IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard())+"岁</AgeDesc>" +
                    "<PatientClass></PatientClass>" +
                    "<FeeTypeCode></FeeTypeCode>" +
                    "<FeeType></FeeType>" +
                    "<Company></Company>" +
                    "<PublicExpenseNo></PublicExpenseNo>" +
                    "<ContractUnitCode></ContractUnitCode> " +
                    "<ContractUnit></ContractUnit>" +
                    "<BusinessAddressCode></BusinessAddressCode>" +
                    "<BusinessAddress></BusinessAddress>" +
                    "<BusinessPostCode></BusinessPostCode>" +
                    "<BusinessPhone></BusinessPhone>" +
                    "<HomeAddressCode></HomeAddressCode>" +
                    "<HomeAddress></HomeAddress>" +
                    "<HomePostCode></HomePostCode>" +
                    "<MobilePhone></MobilePhone>" +
                    "<Contact></Contact>" +
                    "<RelationCode></RelationCode>" +
                    "<Relation></Relation>" +
                    "<ContactEmail></ContactEmail>" +
                    "<ContactMethod></ContactMethod>" +
                    "<VIPType></VIPType>" +
                    "<OperatorID></OperatorID>" +
                    "<Operator></Operator>" +
                    "<OperatorTime>0</OperatorTime>" +
                    "<Available></Available>" +
                    "<FeeTypeName></FeeTypeName>" +
                    "<MedicalInsuranceType></MedicalInsuranceType>" +
                    "<IsFirst>N</IsFirst>" +
                    "<RegisterDateTime>20200121</RegisterDateTime>" +
                    "<RegisterUserID>"+patientMappingCode+"</RegisterUserID>" +
                    "<RegisterUserName></RegisterUserName>" +
                    "<OutStatus>20</OutStatus>" +
                    "<ModifierID></ModifierID>" +
                    "<Modifier></Modifier>" +
                    "<ModifyTime></ModifyTime>" +
                    "<RetreatDateTime></RetreatDateTime>" +
                    "<RetreatUserID></RetreatUserID>" +
                    "<RetreatUserName></RetreatUserName>" +
                    "<PaymentMethodCode></PaymentMethodCode>" +
                    "<PaymentMethod></PaymentMethod>" +
                    "<RegisterFee></RegisterFee>" +
                    "<MedicalFee></MedicalFee>" +
                    "<OtherFee></OtherFee>" +
                    "<TotalFee></TotalFee>" +
                    "<MedicalFloor>N</MedicalFloor>" +
                    "<MedicalAddress></MedicalAddress>" +
                    "<LastDeptCode></LastDeptCode>" +
                    "<LastDeptName></LastDeptName>" +
                    "<LastDoctorID></LastDoctorID>" +
                    "<LastDoctorName></LastDoctorName>" +
                    "<LastTreatDateTime></LastTreatDateTime>" +
                    "<LastOpid></LastOpid>" +
                    "<NumTypeCode>0</NumTypeCode>" +
                    "<NumTypeName></NumTypeName>" +
                    "<RegisterSource>1</RegisterSource>" +
                    "<AcctNO></AcctNO>" +
                    "<IsAcct>N</IsAcct>" +
                    "<ManageType>"+manageType+"</ManageType>" +
                    "<InsuranceTypeCode></InsuranceTypeCode>" +
                    "<InsuranceType></InsuranceType>" +
                    "<RegisteredAddressCode></RegisteredAddressCode>" +
                    "<RegisteredAddress></RegisteredAddress>" +
                    "<ContactAddressCode></ContactAddressCode>" +
                    "<ContactAddress></ContactAddress>" +
                    "<RegisteredPostCode></RegisteredPostCode>" +
                    "<ContactPostcode></ContactPostcode>" +
                    "<BloodType></BloodType>" +
                    "<RhBloodType></RhBloodType>" +
                    "</PatientInfo>" +
                    "</HtRequest>";
                    "<Times>"+registerCon+"</Times>" +
                    "</OutRegister>" +
                    "<PatientInfo>" +
                    "<RecordFlow>"+outpatientDO.getId()+"</RecordFlow>" +
                    "<PID>"+patientMappingCode+"</PID></PatientInfo></HtRequest>";
            
            
//            String xmlStr = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
//                    "<HtRequest >" +
//                    "<PatientInfo>" +
//                    "<RecordFlow>"+outPatientId+"</RecordFlow >" +
//                    "<PID>"+patientMappingCode+"</PID>" +
//                    "<InsuranceNo>"+basePatientDO.getIdcard()+"</InsuranceNo>" +
//                    "<PatientName>"+basePatientDO.getName()+"</PatientName>" +
//                    "<TmpFlag>正式</TmpFlag>" +
//                    "<LastName>"+basePatientDO.getName().substring(1,basePatientDO.getName().length())+"</LastName>" +
//                    "<FirstName>"+basePatientDO.getName().substring(0,1)+"</FirstName>" +
//                    "<PY>"+ PinYinUtils.getUpEname(basePatientDO.getName())+"</PY>" +
//                    "<WB></WB>" +
//                    "<SexCode>"+basePatientDO.getSex()+"</SexCode>";
//            if(1 == basePatientDO.getSex()){
//                xmlStr = xmlStr + "<Sex>男</Sex>";
//            }else{
//                xmlStr = xmlStr +  "<Sex>女</Sex>";
//            }
//
//            xmlStr = xmlStr +    "<DateOfBirth>"+DateUtil.dateToStrShort(IdCardUtil.getBirthdayForIdcard(basePatientDO.getIdcard()))+"</DateOfBirth>" +
//                    "<TimeOfBirth></TimeOfBirth>" +
//                    "<MarriageStatusCode></MarriageStatusCode>" +
//                    "<MarriageStatus></MarriageStatus>" +
//                    "<OccupationCode></OccupationCode>" +
//                    "<Occupation></Occupation>" +
//                    "<NationalityCode></NationalityCode>" +
//                    "<Nationality></Nationality>" +
//                    "<CountryCode>CN</CountryCode>" +
//                    "<Country>中国</Country>" +
//                    "<FormalSchoolingCode></FormalSchoolingCode>" +
//                    "<FormalSchooling></FormalSchooling>" +
//                    "<Religion></Religion>" +
//                    "<BirthPlaceCode></BirthPlaceCode>" +
//                    "<BirthPlace></BirthPlace>" +
//                    "<NativePlaceCode></NativePlaceCode>" +
//                    "<NativePlace></NativePlace>" +
//                    "<BloodType></BloodType>" +
//                    "<CertTypeCode>111</CertTypeCode>" +
//                    "<CertType>身份证</CertType>" +
//                    "<CertNo>"+basePatientDO.getIdcard()+"</CertNo>" +
//                    "<PatientClassCode></PatientClassCode>" +
//                    "<PatientClass></PatientClass>" +
//                    "<FeeTypeCode></FeeTypeCode>" +
//                    "<FeeType></FeeType>" +
//                    "<Company></Company>" +
//                    "<PublicExpenseNo></PublicExpenseNo>" +
//                    "<ContractUnitCode></ContractUnitCode> " +
//                    "<ContractUnit></ContractUnit>" +
//                    "<BusinessAddressCode></BusinessAddressCode>" +
//                    "<BusinessAddress></BusinessAddress>" +
//                    "<BusinessPostCode></BusinessPostCode>" +
//                    "<BusinessPhone></BusinessPhone>" +
//                    "<HomeAddressCode></HomeAddressCode>" +
//                    "<HomeAddress></HomeAddress>" +
//                    "<HomePostCode></HomePostCode>" +
//                    "<MobilePhone></MobilePhone>" +
//                    "<Contact></Contact>" +
//                    "<RelationCode></RelationCode>" +
//                    "<Relation></Relation>" +
//                    "<ContactEmail></ContactEmail>" +
//                    "<ContactMethod></ContactMethod>" +
//                    "<VIPType></VIPType>" +
//                    "<OperatorID></OperatorID>" +
//                    "<Operator></Operator>" +
//                    "<OperatorTime>0</OperatorTime>" +
//                    "<Available></Available>" +
//                    "<ManageType>"+manageType+"</ManageType>" +
//                    "<InsuranceTypeCode></InsuranceTypeCode>" +
//                    "<InsuranceType></InsuranceType>" +
//                    "<RegisteredAddressCode></RegisteredAddressCode>" +
//                    "<RegisteredAddress></RegisteredAddress>" +
//                    "<ContactAddressCode></ContactAddressCode>" +
//                    "<ContactAddress></ContactAddress>" +
//                    "<RegisteredPostCode></RegisteredPostCode>" +
//                    "<ContactPostcode></ContactPostcode>" +
//                    "<BloodType></BloodType>" +
//                    "<RhBloodType></RhBloodType>" +
//                    "</PatientInfo>" +
//                    "</HtRequest>";
            String returnValue = "";
            params.put("xmlStr",xmlStr);
            params.put("xmlStr",_xmlStr);
        
            returnValue = WebserviceUtil.post("http://192.10.33.34:9080/HtMzWebService/services/Manage",
                    "http://business.htemr.haitaiinc.com",

+ 16 - 1
business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java

@ -122,6 +122,8 @@ public class StatisticsEsService {
        String sql = "select count(*) as total from base.wlyy_consult_oupatient_info o where  o.create_time >='"+startTime+"' and o.create_time <='"+endTime+"'";
        if (level==4){
            sql += " and o.doctor IN (SELECT doctor_code FROM `base_doctor_hospital` dh where dh.org_code ='"+area+"' and dh.del=1)";
        }if (level==2){
            sql += " 1=1 ";
        }else if (level==5){
            sql += " and o.doctor IN (SELECT doctor_code FROM `base_doctor_hospital` dh where dh.dept_code ='"+area+"' and dh.del=1)";
        }else if (level==6){
@ -2659,11 +2661,24 @@ public class StatisticsEsService {
            resultMaps.add(rs);
        }
        //根据为回复数排序
        Collections.sort(resultMaps, new Comparator<Map<String, Object>>() {
       /* Collections.sort(resultMaps, new Comparator<Map<String, Object>>() {
            public int compare(Map<String, Object> o1, Map<String, Object> o2) {
                return (Double) o1.get("total") < (Double) o2.get("total") ? 1 : ((Double) o1.get("total") == (Double) o2.get("total") ? 0 : -1);
            }
        });*/
        Collections.sort(resultMaps, new Comparator<Map<String,Object>>() {
            @Override
            public int compare(Map<String,Object> o1, Map<String,Object> o2) {
                Double total1 = (Double) o1.get("total");
                Double total2 = (Double) o2.get("total");
                if (total1 - total2 > 0) {
                    return -1;
                } else if (total1 - total2 < 0) {
                    return 1;
                }
                return 0;
            }
        });
        result1.put("resultList", resultMaps);
        return result1;

+ 1 - 0
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1455,6 +1455,7 @@ public class ImService {
		patientinfoObj.put("mobile",basePatientDO.getMobile());
		patientinfoObj.put("address",basePatientDO.getAddress());
		patientinfoObj.put("photo",basePatientDO.getPhoto());
		patientinfoObj.put("idCard",basePatientDO.getIdcard());
		Integer age = DateUtil.getAgeForIdcard(basePatientDO.getIdcard());
		patientinfoObj.put("age",age);
		result.put("patientInfo",patientinfoObj);

+ 9 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/RehabilitationServiceItemDO.java

@ -18,6 +18,7 @@ public class RehabilitationServiceItemDO extends IntegerIdentityEntity {
    private String code;
    private String name;
    private String content;
    private Date createTime;//操作时间
    public String getCode() {
@ -44,4 +45,12 @@ public class RehabilitationServiceItemDO extends IntegerIdentityEntity {
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
}

+ 10 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/specialist/PatientLabelVO.java

@ -31,6 +31,8 @@ public class PatientLabelVO {
    private String healthAssistant;
    @ApiModelProperty("计管师姓名")
    private String healthAssistantName;
    @ApiModelProperty("是否被家签管理(1管理,0未管理)")
    private String isManage;
    public String getCode() {
        return code;
@ -127,4 +129,12 @@ public class PatientLabelVO {
    public void setHealthAssistantName(String healthAssistantName) {
        this.healthAssistantName = healthAssistantName;
    }
    
    public String getIsManage() {
        return isManage;
    }
    
    public void setIsManage(String isManage) {
        this.isManage = isManage;
    }
}

+ 0 - 14
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/statistics/EsStatisticsEndpoint.java

@ -96,8 +96,6 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
            @RequestParam(required = true) String index,
            @RequestParam(required = false)int interval,
            @RequestParam(required = false) String level2_type) {
        //新版与旧版统计适配
        level = elasticsearchUtil.changeLevel(level);
        JSONObject result = new JSONObject();
        try {
            result= statisticsEsService.getPrescriptionLine(startDate, endDate, area, level, index, interval,level2_type);
@ -118,8 +116,6 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
            @RequestParam(required = true) int level,
            @RequestParam(required = true) String index,
            @RequestParam(required = false) String level2_type) {
        //新版与旧版统计适配
        level = elasticsearchUtil.changeLevel(level);
        String[] indexes = index.split(",");
        JSONObject result = new JSONObject();
        try {
@ -141,8 +137,6 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
            @RequestParam(required = true) int level,
            @RequestParam(required = true) String index,
            @RequestParam(required = false) String level2_type) {
        //新版与旧版统计适配
        level = elasticsearchUtil.changeLevel(level);
        String[] indexes = index.split(",");
        JSONObject result = new JSONObject();
        try {
@ -173,8 +167,6 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
            @RequestParam(required = true) int level,
            @RequestParam(required = true) String index,
            @RequestParam(required = false) String level2_type) {
        //新版与旧版统计适配
        level = elasticsearchUtil.changeLevel(level);
        String[] indexes = index.split(",");
        JSONObject result = new JSONObject();
        try {
@ -206,8 +198,6 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
            @RequestParam(required = true) int level,
            @RequestParam(required = true) String index,
            @RequestParam(required = false) String level2_type) {
        //新版与旧版统计适配
        level = elasticsearchUtil.changeLevel(level);
        String[] indexes = index.split(",");
        JSONObject result = new JSONObject();
        try {
@ -228,7 +218,6 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
                                          @RequestParam(required = true) String index,
                                          @RequestParam(required = false) String level2_type,
                                          @RequestParam(required = true) Integer flag) {
        //新版与旧版统计适配
        JSONObject result = new JSONObject();
        try {
            result= statisticsEsService.getDoctorStatistics(startDate,endDate,area,level,index,level2_type,flag);
@ -248,7 +237,6 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
                                     @RequestParam(required = true) String index,
                                     @RequestParam(required = false) String level2_type,
                                     @RequestParam(required = true) Integer flag) {
        //新版与旧版统计适配
        JSONObject result = new JSONObject();
        try {
            result= statisticsEsService.getDoctorTotal(startDate,endDate,area,level,index,level2_type,flag);
@ -267,7 +255,6 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
                                     @RequestParam(required = true) String index,
                                     @RequestParam(required = false) String level2_type,
                                     @RequestParam(required = true) Integer flag) {
        //新版与旧版统计适配
        JSONObject result = new JSONObject();
        try {
            result= statisticsEsService.getDoctorStatisticsExcel(startDate,endDate,area,level,index,level2_type,flag);
@ -294,7 +281,6 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
            @RequestParam(required = true) String area,
            @RequestParam(required = true) int level,
            @RequestParam(required = true) String index) {
        //新版与旧版统计适配
        JSONObject result = new JSONObject();
        try {
            result = statisticsEsService.getSpecialConsultHead(startDate, endDate, area, level, index);

+ 1 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/SpecialistScreenResultController.java

@ -35,7 +35,7 @@ public class SpecialistScreenResultController extends EnvelopRestEndpoint {
    public MixEnvelop<SurveyScreenResultVo, SurveyScreenResultVo> createSpecialistPatientRelation(@ApiParam(name = "doctor", value = "专科医生ID")@RequestParam(value = "doctor")String doctor,
                                                                            @ApiParam(value = "当前页")@RequestParam(value = "pageNo") int pageNo,
                                                                            @ApiParam(value = "显示记录数")@RequestParam(value = "pageSize") int pageSize,
                                                                            @ApiParam(value = "1已跟踪 2已预约")@RequestParam(value = "type",required = false) int type){
                                                                            @ApiParam(value = "1已跟踪 2已预约 3已接诊 4待处理")@RequestParam(value = "type",required = false) int type){
        try {
            return specialistScreenResultService.getScreenList(doctor,type,pageNo,pageSize);
        }catch (Exception e){

File diff suppressed because it is too large
+ 12 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistScreenResultService.java


+ 22 - 2
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistService.java

@ -205,7 +205,8 @@ public class SpecialistService{
                " lb.labelName as health, " +
                " lb.label AS healthcode ," +
                " s.health_assistant AS healthAssistant," +
                " s.health_assistant_name AS healthAssistantName" +
                " s.health_assistant_name AS healthAssistantName," +
                " s.is_manage AS isManage" +
                " FROM " +
                " ( " +
                "  SELECT " +
@ -237,7 +238,8 @@ public class SpecialistService{
                    "d.label_name AS health," +
                    "d.label AS healthcode," +
                    "a.health_assistant AS healthAssistant," +
                    "a.health_assistant_name AS healthAssistantName " +
                    "a.health_assistant_name AS healthAssistantName, " +
                    "a.is_manage AS isManage " +
                    "FROM wlyy_specialist.wlyy_specialist_patient_relation a " +
                    "JOIN "+basedb+".wlyy_patient_disease_server b ON a.id=b.specialist_relation_code AND b.disease=" +labelCode+" and b.del=1 "+
                    "JOIN "+basedb+".wlyy_patient c ON a.patient=c.CODE " +
@ -247,6 +249,24 @@ public class SpecialistService{
                    " AND a.team_code ='" +teamCode+"' "+
                    " LIMIT "+(page-1)*size+","+size;
        }
        
        if("pending".equals(labelType)){
            sql = "SELECT " +
                    "c.CODE," +
                    "c.NAME," +
                    "c.sex," +
                    "IFNULL(YEAR (from_days(datediff(now(),c.birthday))),'未知') age," +
                    "c.photo," +
                    "a.health_assistant AS healthAssistant," +
                    "a.health_assistant_name AS healthAssistantName " +
                    "a.is_manage AS isManage, " +
                    "FROM wlyy_specialist.wlyy_specialist_patient_relation a " +
                    "JOIN "+basedb+".wlyy_patient c ON a.patient=c.CODE " +
                    " WHERE a.sign_status> 0 AND a.`status`>=0 AND (a.is_manage = 0 or a.is_manage is null)" +
                    " AND a.team_code ='" +teamCode+"' "+
                    " LIMIT "+(page-1)*size+","+size;
        }
        
        List<PatientLabelVO> PatientLabelVOs = jdbcTemplate.query(sql,new BeanPropertyRowMapper(PatientLabelVO.class));
        return MixEnvelop.getSuccess(SpecialistMapping.api_success,PatientLabelVOs);
    }

+ 4 - 3
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -654,7 +654,7 @@ public class RehabilitationManageService {
           /* Integer itemType = (Integer) one.get("itemType");*/
            resultMap.put("messageList",messageMapList);//指导与汇报记录
            resultMap.put("patient",one.get("patient"));
            resultMap.put("itemType",null);
            resultMap.put("itemType",one.get("code"));
            resultMap.put("detaiType",one.get("detaiType"));
            resultMap.put("status",status);//状态
            //是否完成任务
@ -689,9 +689,9 @@ public class RehabilitationManageService {
     *
     */
    public ObjEnvelop serviceItem(String planDetailId,String doctorCode) throws Exception{
        String sql = "select h.name as title,h.name as content,h.code as itemType,d.id,d.execute_time,d.hospital_name,d.status,d.type,d.expense,d.doctor as executeDoctor, " +
        String sql = "select h.name as title,h.content as content,h.code as itemType,d.id,d.execute_time,d.hospital_name,d.status,d.type,d.expense,d.doctor as executeDoctor, " +
                " d.doctor_name as executeDoctorName,p.patient ,p.name as patientName,p.create_user as createDoctor,p.create_user_name as createDoctorName, p.status as planStatus," +
                " p.disease,p.disease_name as diseaseName,p.title as planTitle"+
                " p.disease,p.disease_name as diseaseName,p.title as planTitle,d.plan_id as planId "+
                " from wlyy_specialist.wlyy_rehabilitation_plan_detail d " +
                " LEFT JOIN wlyy_specialist.wlyy_rehabilitation_service_item h on d.hospital_service_item_id = h.code "+
                " LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on d.plan_id=p.id " +
@ -736,6 +736,7 @@ public class RehabilitationManageService {
        resultMap.put("disease",one.get("disease"));
        resultMap.put("diseaseName",one.get("diseaseName"));
        resultMap.put("planTitle",one.get("planTitle"));
        resultMap.put("planId",one.get("planId"));
        //指导与汇报
        List<GuidanceMessageLogDO> messageList = guidanceMessageLogDao.findByPlanDetailId(one.get("id").toString());
        List<Map<String,Object>> messageMapList = new ArrayList<>();