Jelajahi Sumber

专病服务代码优化

huangwenjie 7 tahun lalu
induk
melakukan
c26c5bc366

+ 21 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/disease/PatientDiseaseService.java

@ -497,4 +497,25 @@ public class PatientDiseaseService extends BaseService {
            }
        }
    }
    
    public List<Map<String,Object>> getPatientDiseaseCount(String doctor, Long teamCode) {
        String sql ="SELECT " +
                "count(id) AS count," +
                "disease_name as labelName," +
                "disease as label " +
                "FROM wlyy.wlyy_patient_disease_server " +
                "WHERE specialist_relation_code IN " +
                "(SELECT id FROM wlyy_specialist.wlyy_specialist_patient_relation WHERE sign_status> 0 AND `status`>=0 " +
                "AND doctor='"+doctor+"') " +
                "GROUP BY disease";
    
        List<Map<String,Object>> result =  jdbcTemplate.queryForList(sql);
        if(!result.isEmpty()){
            for (int i = 0; i < result.size(); i++) {
                result.get(i).put("labelType","7");
            }
        }
        
        return result;
    }
}

+ 7 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistService.java

@ -23,6 +23,7 @@ import com.yihu.wlyy.repository.specialist.SpecialDiseaseDao;
import com.yihu.wlyy.repository.specialist.TeamDiseaseRelationDao;
import com.yihu.wlyy.repository.wechat.WechatTemplateConfigDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.app.disease.PatientDiseaseService;
import com.yihu.wlyy.service.app.label.SignPatientLabelService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.task.PushMsgTask;
@ -72,6 +73,8 @@ public class SpecialistService extends BaseService {
    @Autowired
    private PatientDiseaseServerDao patientDiseaseServerDao;
    @Autowired
    private PatientDiseaseService patientDiseaseService;
    @Autowired
    private PatientDao patientDao;
    @Autowired
    private SpecialDiseaseDao specialDiseaseDao;
@ -182,7 +185,10 @@ public class SpecialistService extends BaseService {
            List<SignPatientLabel> list = signPatientLabelDao.findByLabelTypeAndStatusAndTeamCode(type, 1, teamCode);
            return setPatientCount(list, doctor);
        } else {
        } else if("7".equals(type)){
            return patientDiseaseService.getPatientDiseaseCount(doctor,teamCode);
        }
        else {
            //非自定义标签
            List<SignPatientLabel> list = signPatientLabelDao.findByLabelTypeAndStatus(type, 1);

+ 37 - 0
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -97,6 +97,43 @@ wechat:
   template_patient_bind_device: 1GWPw6LFcSuz2LFTo6LhE-YY8abtmcKRvor1fUzfxBE
    #积分到账通知
   template_healthbank_credit: A2L6WBm1p6bDPYGkGnUmoMvpWlRruP2lapYwHfLV7Rg
  imgUrl:
    #居民wifi图片地址
    patient_wifi_pic_url: group1/M00/00/B0/Cl8WjVtgHqaAcNKWAABYgyiykZs906.png
    #居民抽奖图片地址
    patient_draw_pic_url: group1/M00/00/B0/Cl8WjVtgGbWAYqumAADhRnoXe38057.png
    #专科医生签约图片地址
    specialist_sign_url: group1/M00/00/AE/Cl8WjFtgHZqAHpknAAH7mgUpbH0162.png
    #健康金图片地址
    doctor_activity_url: group1/M00/00/B0/Cl8WjVtgGbWAUJixAAAde0sVAJk652.png
    #通用活动图片地址
    currency_url: group1/M00/00/B0/Cl8WjVtgGbWAfZI4AAD7PWeBzLo954.png
    #就诊记录
    patient_visit_pic: group1/M00/00/AE/Cl8WjFtgIK-AAhmHAAEML2dpBxA906.png
    #检查检验
    patient_inspect_pic: group1/M00/00/B0/Cl8WjVtgGy6AAs61AAAxJl28nU8047.png
    #社区体检
    patient_examination_pic: group1/M00/00/B0/Cl8WjVtgGbWAVj77AAAg8pVTY9s660.png
    #处方记录
    patient_prescription_pic: group1/M00/00/AE/Cl8WjFtgHZqAXPgzAAAyHL8RzEU114.png
    #居民取药码
    patient_QRCode_pic: group1/M00/00/B0/Cl8WjVtgG4WAC7JDAAAV7lNAUpY772.png
    #居民产检计划
    patient_prenata_pic: group1/M00/00/AE/Cl8WjFtgHZqAVhwaAACK6PRmuEE754.png
    #居民免疫计划
    patient_immune_pic: group1/M00/00/B0/Cl8WjVtgG4WANg5iAAAckaOvfLQ582.png
    #医生咨询操作指南
    patient_operatinginstrutions_pic_url: group1/M00/00/B0/Cl8WjVtgG4WALvB0AAFkoQR6sbI214.png
    #预约挂号
    patient_booking_pic_url: group1/M00/00/AE/Cl8WjFtgG8qAc0LRAAAh07_OGxo533.png
    #设备绑定
    patient_device_pic_url: group1/M00/00/AE/Cl8WjFtgG8qANy56AAArKMof5DE911.png
    #我的家庭
    patient_family_pic_url: group1/M00/00/AE/Cl8WjFtgHZmAb043AAA5I5LejjI793.png
    #续签
    patient_sign_again_pic_url: group1/M00/00/B0/Cl8WjVtgG4WAV-8SAAAc2gFIWBc275.png
    #家庭医生签约1+1+N
    doctor_qrcode_pic_url: group1/M00/00/AE/Cl8WjFtgJGaAZ1VyAAD3GkV403w850.png
yihu:
  yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/