Ver código fonte

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

wujunjie 8 anos atrás
pai
commit
4ff125c48d

+ 22 - 0
patient-co-analysis/src/main/java/com/yihu/wlyy/analysis/model/DataModel.java

@ -18,6 +18,8 @@ import org.springframework.data.annotation.Id;
      time:"" 时间
     ,logType:2 日志类型
     ,caller:"" 调用者
     ,traceId: "" 主流程id
     ,spanId:"" 模块id
     ,data:{
         ,businessType:""  业务类型
         ,patient:"" 居民
@ -30,6 +32,8 @@ import org.springframework.data.annotation.Id;
  time:"" 时间
 ,logType:1 日志类型
 ,caller:"" 调用者
 ,traceId: "" 主流程id
 ,spanId:"" 模块id
 ,data:{
      responseTime:"" 响应时间
     ,url:"" 接口URL
@ -40,6 +44,8 @@ import org.springframework.data.annotation.Id;
public class DataModel {
    @Id
    protected String id;
    protected String traceId;//主流程ID
    protected String spanId;//模块Id
    protected String time;//时间
    protected String caller; //调用者
    protected String logType;//日志类型 1接口 2业务
@ -76,4 +82,20 @@ public class DataModel {
    public void setCaller(String caller) {
        this.caller = caller;
    }
    public String getTraceId() {
        return traceId;
    }
    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }
    public String getSpanId() {
        return spanId;
    }
    public void setSpanId(String spanId) {
        this.spanId = spanId;
    }
}

+ 6 - 1
patient-co-analysis/src/main/java/com/yihu/wlyy/analysis/model/OperatorDataModel.java

@ -55,7 +55,12 @@ public class OperatorDataModel extends DataModel implements Serializable {
            operatorDataModel.setLogType(String.valueOf(jsonObject.get("logType")));
            operatorDataModel.setCaller(jsonObject.getString("caller"));
            operatorDataModel.setTime(jsonObject.getString("time"));
            if(jsonObject.has("traceId")){
                operatorDataModel.setTraceId(jsonObject.getString("traceId"));
            }
            if(jsonObject.has("spanId")){
                operatorDataModel.setSpanId(jsonObject.getString("spanId"));
            }
            JSONObject chlidren = jsonObject.getJSONObject("data");
            operatorDataModel.setResponseTime(chlidren.get("responseTime").toString());
            operatorDataModel.setUrl(chlidren.getString("url"));

+ 2 - 3
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/CurrentDayAllQuotaJob.java

@ -171,9 +171,8 @@ public class CurrentDayAllQuotaJob implements Job {
        computequota_10();//统计今天的改签
        computequota_12(sql,signFamilies,null);//统计今天的签约下按年龄分组后再
        computequota_13(sql,signFamilies,null);//统计今天的签约量
        computequota_16_1(sql,signFamilies,null);//统计今天的签约数的扣费钱 1
        computequota_16_1(sql,signFamilies,null);//统计今天的签约数的扣费钱
        computequota_15(sql,signFamilies,null);//统计今天的健康分布统计
        computequota_16_0(sql,signFamilies,null);//统计今天的签约数的未扣费 0
        computequota_17(sql,signFamilies,null);//统计今天的年龄疾病
        computequota_20();//统计今天的已经签约患者绑定设备
        computequota_21();//统计今天的已经签约微信关注人数
@ -607,7 +606,7 @@ public class CurrentDayAllQuotaJob implements Job {
            //统计数据 二级维度
            List<Map<String, Map<String, List<ETLModel>>>> level2Data= SpringUtil.getBean(Level2Role.class).elt(returnDatas);
            //保存数据
            SpringUtil.getBean(RedisStorage.class).saveByLevel2(level2Data,null,quotaId,0,4,0);
            SpringUtil.getBean(RedisStorage.class).saveByLevel2(level2Data,null,quotaId,2,6,0);
            allContent.append(JsonUtil.objToStr(etlModels.getLogModel()));
        }catch (Exception e){

+ 5 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/SignFamilyRenewDao.java

@ -5,6 +5,7 @@
 *******************************************************************************/
package com.yihu.wlyy.repository.patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.entity.patient.SignFamilyRenew;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
@ -30,4 +31,8 @@ public interface SignFamilyRenewDao extends PagingAndSortingRepository<SignFamil
    List<SignFamilyRenew> findByDoctorAndPatient(String doctor,String patient);
    List<SignFamilyRenew> findByDoctorHealthAndPatient(String doctorHealth,String patient);
    // 查询患者已生效的家庭续签约
    @Query("select a from SignFamilyRenew a where a.patient = ?1 and a.type = 2 and a.status = 0")
    SignFamily findSigningByPatient(String patient);
}

+ 8 - 8
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthIndexService.java

@ -452,43 +452,43 @@ public class PatientHealthIndexService extends BaseService {
            for (DevicePatientHealthIndex item : list) {
                String data = item.getValue1();
                String dataType = item.getValue2();
                Date recordDate = item.getRecordDate();
                String recordDate =DateUtil.dateToStr(item.getRecordDate(), DateUtil.YYYY_MM_DD_HH_MM_SS);
                Long id = item.getId();
                if (data != null && dataType != null) {
                    if (dataType.equals("1")) {
                        obj.put("value1",data);
                        obj.put("time1",recordDate);
                        obj.put("id",id);
                        obj.put("id1",id);
                        hadData = true;
                    } else if (dataType.equals("2")) {
                        obj.put("value2",data);
                        obj.put("time2",recordDate);
                        obj.put("id",id);
                        obj.put("id2",id);
                        hadData = true;
                    } else if (dataType.equals("3")) {
                        obj.put("value3",data);
                        obj.put("time3",recordDate);
                        obj.put("id",id);
                        obj.put("id3",id);
                        hadData = true;
                    } else if (dataType.equals("4")) {
                        obj.put("value4",data);
                        obj.put("time4",recordDate);
                        obj.put("id",id);
                        obj.put("id4",id);
                        hadData = true;
                    } else if (dataType.equals("5")) {
                        obj.put("value5",data);
                        obj.put("time5",recordDate);
                        obj.put("id",id);
                        obj.put("id5",id);
                        hadData = true;
                    } else if (dataType.equals("6")) {
                        obj.put("value6",data);
                        obj.put("time6",recordDate);
                        obj.put("id",id);
                        obj.put("id6",id);
                        hadData = true;
                    } else if (dataType.equals("7")) {
                        obj.put("value7",data);
                        obj.put("time7",recordDate);
                        obj.put("id",id);
                        obj.put("id7",id);
                        hadData = true;
                    }
                }

+ 9 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -148,6 +148,15 @@ public class FamilyContractService extends BaseService {
        return signFamilyDao.findSigningByPatient(patient);
    }
    /**
     * 获取患者待签约数据
     *
     * @param patient
     * @return
     */
    public SignFamily findSigningRenewByPatient(String patient) {
        return signFamilyRenewDao.findSigningByPatient(patient);
    }
    /**
     * 查询医院列表
     *

+ 71 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorFamilyContractController.java

@ -871,6 +871,77 @@ public class DoctorFamilyContractController extends WeixinBaseController {
        }
    }
    /**
     * 查询待签约患者数据
     *
     * @param patient
     * @return
     */
    @RequestMapping(value = "/patient_signing_renew")
    @ResponseBody
    public String getSigningRenewPatientInfo(@RequestParam String patient) {
        try {
            Patient temp = patientInfoService.findByCode(patient);
            if (temp != null) {
                JSONObject json = new JSONObject();
                // 设置患者标识
                json.put("code", temp.getCode());
                // 设置患者姓名
                json.put("name", temp.getName());
                // 设置患者头像
                json.put("photo", temp.getPhoto());
                // 设置患者年龄
                json.put("age", DateUtil.getAgeByBirthday(temp.getBirthday()));
                // 设置患者性别
                json.put("sex", temp.getSex());
                // 设置患者病情:0绿标,1黄标,2红标
                json.put("diseaseLevel", temp.getDiseaseCondition());
                // 设置患者身份证号
                json.put("idCard", temp.getIdcard());
                // 设置患者出生年月
                json.put("birthday", DateUtil.dateToStr(temp.getBirthday(), DateUtil.YYYY_MM_DD));
                // 设置患者手机号码
                json.put("mobile", temp.getMobile());
                // 设置患者联系电话
                json.put("phone", temp.getPhone());
                // 设置患者居住省份
                json.put("provinceName", temp.getProvinceName());
                json.put("cityName", temp.getCityName());
                json.put("townName", temp.getTownName());
                json.put("streetName", temp.getStreetName());
                // 设置患者地址
                json.put("address", temp.getAddress());
                //设置患者医保号
                json.put("ssc", temp.getSsc());
                String diseases = redisTemplate.opsForValue().get("disease:" + patient);
                if (!StringUtils.isEmpty(diseases)) {
                    json.put("diseases", new JSONArray(diseases));
                } else {
                    json.put("diseases", "");
                }
                SignFamily jtSign = familyContractService.findSigningRenewByPatient(patient);
                // 家庭签约
                if (jtSign != null) {
                    json.put("applySurrDate", jtSign.getPatientApplyUnsignDate());
                    json.put("applyDate", jtSign.getPatientApplyDate());
                    json.put("jtSign", new JSONObject(jtSign));
                } else {
                    throw new Exception("未找到患者待家庭签约的数据");
                }
                return write(200, "患者信息查询成功!", "data", json);
            } else {
                return error(-1, "患者信息查询失败!");
            }
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "患者信息查询失败");
        }
    }
    /**
     * 获取家庭签约社保流水号
     *