Browse Source

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

# Conflicts:
#	common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/BasePatientDO.java
#	server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java
wangzhinan 3 năm trước cách đây
mục cha
commit
2aa51089b7

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/healthUpload/dao/BaseDoctorHealthUploadDao.java

@ -35,7 +35,7 @@ public interface BaseDoctorHealthUploadDao extends PagingAndSortingRepository<Ba
    @Query("from BaseDoctorHealthUploadDO d where d.doctorId = ?1 ")
    List<BaseDoctorHealthUploadDO> findByDoctorId(String doctorId);
    @Query("from BaseDoctorHealthUploadDO d where d.doctorId = ?1 and d.consumer= ?2")
    @Query("from BaseDoctorHealthUploadDO d where d.doctorId = ?1 and d.consumer= ?2 order by d.createTime desc")
    List<BaseDoctorHealthUploadDO> findByDoctorIdAndConsumer(String doctorId,String consumer);

+ 236 - 139
business/base-service/src/main/java/com/yihu/jw/healthUpload/service/BaseDoctorHealthUploadService.java

@ -217,7 +217,7 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
            baseDoctorDO.setChargeType("1");
            baseDoctorDO = baseDoctorDao.save(baseDoctorDO);
            List<BaseDoctorHospitalDO> baseDoctorHospitalDOS = baseDoctorHospitalDao.findByDoctorCode(baseDoctorDO.getId());
            if (!(null != baseDoctorHospitalDOS && baseDoctorHospitalDOS.size() > 0)) {
            if (null != baseDoctorHospitalDOS && baseDoctorHospitalDOS.size() > 0) {
                baseDoctorHospitalDao.delete(baseDoctorHospitalDOS);
                BaseDoctorHospitalDO baseDoctorHospitalDO = new BaseDoctorHospitalDO();
                baseDoctorHospitalDO.setOrgCode("350211A1002");
@ -227,6 +227,15 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
                baseDoctorHospitalDO.setDeptName(deptName);
                baseDoctorHospitalDO.setDel("1");
                baseDoctorHospitalDao.save(baseDoctorHospitalDO);
            }else {
                BaseDoctorHospitalDO baseDoctorHospitalDO = new BaseDoctorHospitalDO();
                baseDoctorHospitalDO.setOrgCode("350211A1002");
                baseDoctorHospitalDO.setOrgName("马銮湾医院");
                baseDoctorHospitalDO.setDoctorCode(baseDoctorDO.getId());
                baseDoctorHospitalDO.setDeptCode(deptCode);
                baseDoctorHospitalDO.setDeptName(deptName);
                baseDoctorHospitalDO.setDel("1");
                baseDoctorHospitalDao.save(baseDoctorHospitalDO);
            }
        } else {
            baseDoctorDO.setIdcard(idcard);
@ -262,7 +271,7 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
            String deptCode = dept;
            baseDoctorDO = baseDoctorDao.save(baseDoctorDO);
            List<BaseDoctorHospitalDO> baseDoctorHospitalDOS = baseDoctorHospitalDao.findByDoctorCode(baseDoctorDO.getId());
            if (!(null != baseDoctorHospitalDOS && baseDoctorHospitalDOS.size() > 0)) {
            if (null != baseDoctorHospitalDOS && baseDoctorHospitalDOS.size() > 0) {
                baseDoctorHospitalDao.delete(baseDoctorHospitalDOS);
                BaseDoctorHospitalDO baseDoctorHospitalDO = new BaseDoctorHospitalDO();
                baseDoctorHospitalDO.setOrgCode("350211A1002");
@ -272,6 +281,15 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
                baseDoctorHospitalDO.setDeptName(deptName);
                baseDoctorHospitalDO.setDel("1");
                baseDoctorHospitalDao.save(baseDoctorHospitalDO);
            }else {
                BaseDoctorHospitalDO baseDoctorHospitalDO = new BaseDoctorHospitalDO();
                baseDoctorHospitalDO.setOrgCode("350211A1002");
                baseDoctorHospitalDO.setOrgName("马銮湾医院");
                baseDoctorHospitalDO.setDoctorCode(baseDoctorDO.getId());
                baseDoctorHospitalDO.setDeptCode(deptCode);
                baseDoctorHospitalDO.setDeptName(deptName);
                baseDoctorHospitalDO.setDel("1");
                baseDoctorHospitalDao.save(baseDoctorHospitalDO);
            }
        }
@ -384,7 +402,7 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
     * @param endDate
     * @return
     */
    public JSONObject selectHeaderTotal(String dept,String idType,String status,String state,String startDate,String endDate){
    public JSONObject selectHeaderTotal(String dept,String idType,String status,String state,String startDate,String endDate,String name){
        JSONObject object =new JSONObject();
        String day = DateUtil.getTwoDay(endDate,startDate);
        String doctorSql =" select COUNT(1) as \"total\" from base_doctor d where d.del=1 ";
@ -404,6 +422,9 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
        if (StringUtils.isNoneBlank(idTypeCondition)){
            doctorSql+=" and d.id IN "+idTypeCondition ;
        }
        if (StringUtils.isNoneBlank(name)){
            doctorSql+=" and d.name like '%"+name+"%' " ;
        }
        Map<String,Object> map = jdbcTemplate.queryForMap(doctorSql);
        String doctorTotal = "";
        if (map!=null){
@ -426,7 +447,7 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
        }
        if (StringUtils.isNoneBlank(state)){
            if (state.equalsIgnoreCase("1")){
                sql +=" and d.health_code=1 ";
                sql +=" and (d.health_code not in(2,3) and CAST(d.temperature as DECIMAL)<37.3 and  d.is_symptoms=2 and d.is_epidemic=2) ";
            }else if (state.equalsIgnoreCase("2")){
                sql +=" and (d.health_code in(2,3) OR CAST(d.temperature as DECIMAL)>=37.3 OR  d.is_symptoms=1 OR d.is_epidemic=1) ";
            }
@ -437,6 +458,9 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
        if (StringUtils.isNoneBlank(idTypeCondition)){
            sql+=" and d.doctor_id IN "+idTypeCondition ;
        }
        if (StringUtils.isNoneBlank(name)){
            sql+=" and d.doctor_name like '%"+name+"%'" ;
        }
        //已上传
        Map<String,Object> yishangchaungMap = jdbcTemplate.queryForMap(sql);
        if (yishangchaungMap!=null){
@ -446,8 +470,37 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
        }
        //未上报
        weishangbaoTotal=total-yishangbaoTotal;
        //上传总次数
        Integer shangchuanTotal= 0;
        String shangchuanTotalSql = "select COUNT(1) as \"total\" from base_doctor_health_upload d where 1=1  ";
        if (StringUtils.isNoneBlank(startDate)){
            shangchuanTotalSql +=" and d.create_time >='"+startDate+" 00:00:00' and d.create_time<='"+endDate+" 23:59:59' ";
        }
        if (StringUtils.isNoneBlank(deptCondition)){
            shangchuanTotalSql +=" and d.doctor_id IN "+deptCondition;
        }
        if (StringUtils.isNoneBlank(idTypeCondition)){
            shangchuanTotalSql +=" and d.doctor_id IN "+idTypeCondition ;
        }
        if (StringUtils.isNoneBlank(name)){
            shangchuanTotalSql+=" and d.doctor_name like '%"+name+"%'" ;
        }
        Map<String,Object> shangchuanMap = jdbcTemplate.queryForMap(shangchuanTotalSql);
        if (shangchuanMap!=null){
            if (shangchuanMap.get("total")!=null){
                shangchuanTotal = Integer.parseInt(shangchuanMap.get("total").toString());
            }
        }
        //正常、异常
        String sqlZhengchang = "select COUNT(DISTINCT d.doctor_id) as \"total\" from base_doctor_health_upload d where 1=1 and d.health_code=1 ";
        String sqlZhengchang = "select COUNT(1) as \"total\" from base_doctor_health_upload d where 1=1 and (d.health_code not in(2,3) AND CAST(d.temperature as DECIMAL)<37.3 AND  d.is_symptoms=2 and  d.is_epidemic=2) ";
        if (StringUtils.isNoneBlank(startDate)){
            sqlZhengchang +=" and d.create_time >='"+startDate+" 00:00:00' and d.create_time<='"+endDate+" 23:59:59' ";
        }
@ -457,6 +510,9 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
        if (StringUtils.isNoneBlank(idTypeCondition)){
            sqlZhengchang +=" and d.doctor_id IN "+idTypeCondition ;
        }
        if (StringUtils.isNoneBlank(name)){
            sqlZhengchang+=" and d.doctor_name like '%"+name+"%'" ;
        }
        //正常
        Map<String,Object> zhengchangMap = jdbcTemplate.queryForMap(sqlZhengchang);
        if (zhengchangMap!=null){
@ -465,7 +521,7 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
            }
        }
        String sqlYichang = "select COUNT(DISTINCT d.doctor_id) as \"total\" from base_doctor_health_upload d where 1=1 and (d.health_code in(2,3) OR CAST(d.temperature as DECIMAL)>=37.3 OR  d.is_symptoms=1 OR d.is_epidemic=1)  ";
        String sqlYichang = "select COUNT(1) as \"total\" from base_doctor_health_upload d where 1=1 and (d.health_code in(2,3) OR CAST(d.temperature as DECIMAL)>=37.3 OR  d.is_symptoms=1 OR d.is_epidemic=1)  ";
        if (StringUtils.isNoneBlank(startDate)){
            sqlYichang +=" and d.create_time >='"+startDate+" 00:00:00' and d.create_time<='"+endDate+" 23:59:59' ";
        }
@ -475,6 +531,9 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
        if (StringUtils.isNoneBlank(idTypeCondition)){
            sqlYichang +=" and d.doctor_id IN "+idTypeCondition ;
        }
        if (StringUtils.isNoneBlank(name)){
            sqlYichang+=" and d.doctor_name like '%"+name+"%'" ;
        }
        //正常
        Map<String,Object> yichangMap = jdbcTemplate.queryForMap(sqlYichang);
        if (yichangMap!=null){
@ -487,6 +546,7 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
        object.put("weishangbaoTotal",weishangbaoTotal);//未上报
        object.put("zhengchangTotal",zhengchangTotal);//上报正常
        object.put("yichangTotal",yichangTotal);//上报异常
        object.put("shangchuanTotal",shangchuanTotal);//上传总次数
        return object;
    }
@ -537,13 +597,13 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
            }
            if (StringUtils.isNoneBlank(state)){
                if (state.equalsIgnoreCase("1")){
                    doctorSql +=" and d.id in(select d1.doctor_id from base_doctor_health_upload d1 where 1=1 and d1.create_time >='"+date+" 00:00:00' and d1.create_time<='"+date+" 23:59:59' and d1.health_code =1)  ";
                    doctorSql +=" and d.id in(select d1.doctor_id from base_doctor_health_upload d1 where 1=1 and d1.create_time >='"+date+" 00:00:00' and d1.create_time<='"+date+" 23:59:59' and (d1.health_code not in(2,3) and CAST(d1.temperature as DECIMAL)<37.3 and  d1.is_symptoms=2 and d1.is_epidemic=2))  ";
                }else if (state.equalsIgnoreCase("2")){
                    doctorSql +=" and d.id in(select d1.doctor_id from base_doctor_health_upload d1 where 1=1 and d1.create_time >='"+date+" 00:00:00' and d1.create_time<='"+date+" 23:59:59' and (d1.health_code in(2,3) OR CAST(d1.temperature as DECIMAL)>=37.3 OR  d1.is_symptoms=1 OR d1.is_epidemic=1)) ";
                }
            }
            if (StringUtils.isNoneBlank(name)){
                doctorSql +=" and d.name LIKE  '"+name+"' ";
                doctorSql +=" and d.name LIKE  '%"+name+"%' ";
            }
            Map<String,Object> map = jdbcTemplate.queryForMap(doctorSql);
            Integer total = 0;
@ -608,7 +668,7 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
            }
            if (StringUtils.isNoneBlank(state)){
                if (state.equalsIgnoreCase("1")){
                    doctorSql +=" and d.id in(select d1.doctor_id from base_doctor_health_upload d1 where 1=1 and d1.create_time >='"+date+" 00:00:00' and d1.create_time<='"+date+" 23:59:59' and d1.health_code =1)  ";
                    doctorSql +=" and d.id in(select d1.doctor_id from base_doctor_health_upload d1 where 1=1 and d1.create_time >='"+date+" 00:00:00' and d1.create_time<='"+date+" 23:59:59' and (d1.health_code not in(2,3) and CAST(d1.temperature as DECIMAL)<37.3 and  d1.is_symptoms=2 and d1.is_epidemic=2) )  ";
                }else if (state.equalsIgnoreCase("2")){
                    doctorSql +=" and d.id in(select d1.doctor_id from base_doctor_health_upload d1 where 1=1 and d1.create_time >='"+date+" 00:00:00' and d1.create_time<='"+date+" 23:59:59' and (d1.health_code in(2,3) OR CAST(d1.temperature as DECIMAL)>=37.3 OR  d1.is_symptoms=1 OR d1.is_epidemic=1)) ";
                }
@ -621,28 +681,41 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
                String id = map.get("id").toString();
                List<BaseDoctorHospitalDO> hospitalDOList = baseDoctorHospitalDao.findByDoctorCode(id);
                map.put("deptInfo",hospitalDOList);
                String sql = "select d1.health_code,d1.temperature,d1.is_symptoms as isSymptoms,d1.is_epidemic as isEpidemic,d1.id from base_doctor_health_upload d1 where 1=1 and d1.create_time >='"+date+" 00:00:00' and d1.create_time<='"+date+" 23:59:59' and d1.doctor_id = '"+id+"' order by d1.create_time desc ";
                String stateCondition = "";
                if (StringUtils.isNoneBlank(state)){
                    if (state.equalsIgnoreCase("1")){
                        stateCondition +=" and (d1.health_code not in(2,3) and CAST(d1.temperature as DECIMAL)<37.3 and  d1.is_symptoms=2 and d1.is_epidemic=2)  ";
                    }else if (state.equalsIgnoreCase("2")){
                        stateCondition +=" and (d1.health_code in(2,3) OR CAST(d1.temperature as DECIMAL)>=37.3 OR  d1.is_symptoms=1 OR d1.is_epidemic=1) ";
                    }
                }
                String sql = "select d1.health_code,d1.temperature,d1.is_symptoms as isSymptoms,d1.is_epidemic as isEpidemic,d1.id,d1.consumer,d1.consumer_name as consumerName,date_format(d1.create_time ,'%Y-%m-%d %H:%i:%S' ) AS createTime from base_doctor_health_upload d1 where 1=1 "+stateCondition+" and d1.create_time >='"+date+" 00:00:00' and d1.create_time<='"+date+" 23:59:59' and d1.doctor_id = '"+id+"' order by d1.create_time desc ";
                List<Map<String,Object>> mapList1 = jdbcTemplate.queryForList(sql);
                if (mapList1!=null&&mapList1.size()!=0){
                    Map<String,Object> map1 = mapList1.get(0);
                    String healthCode = map1.get("health_code").toString();
                    Double temperature = Double.parseDouble(map1.get("temperature").toString());
                    String isSymptoms = map1.get("isSymptoms").toString();
                    String isEpidemic = map1.get("isEpidemic").toString();
                    if (healthCode.equalsIgnoreCase("2")||healthCode.equalsIgnoreCase("3")||
                            temperature>=37.3||isSymptoms.equalsIgnoreCase("1")||isEpidemic.equalsIgnoreCase("1")){
                        map.put("healthState","异常");
                    }else {
                        map.put("healthState","正常");
                    for (Map<String,Object> map1:mapList1){
                        String healthCode = map1.get("health_code").toString();
                        Double temperature = Double.parseDouble(map1.get("temperature").toString());
                        String isSymptoms = map1.get("isSymptoms").toString();
                        String isEpidemic = map1.get("isEpidemic").toString();
                        if (healthCode.equalsIgnoreCase("2")||healthCode.equalsIgnoreCase("3")||
                                temperature>=37.3||isSymptoms.equalsIgnoreCase("1")||isEpidemic.equalsIgnoreCase("1")){
                            map1.put("healthState","异常");
                        }else {
                            map1.put("healthState","正常");
                        }
                        map.put("uploadState","已上报");
                        map.put("uploadId",map1.get("id").toString());
                    }
                    map.put("uploadState","已上报");
                    map.put("uploadId",map1.get("id").toString());
                    map.put("recordList",mapList1);
                }else {
                    map.put("healthState","未知");
                    map.put("uploadState","未上报");
                    map.put("uploadId","");
                    map.put("consumer","");
                    map.put("consumerName","");
                    map.put("createTime","");
                    map.put("recordList",mapList1);
                }
            }
            JSONObject object = new JSONObject();
            object.put("time",date);
@ -677,7 +750,7 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
                    "\td.name as name,\n" +
                    "\td.mobile as mobile,\n" +
                    "\td.id_type as idType,\n" +
                    "\tdh.dept_name as deptName,\n" +
                    "\td.id as id,\n" +
                    "\tdhu.province_name as provinceName,\n" +
                    "\tdhu.city_name as cityName,\n" +
                    "\tdhu.town_name as townName,\n" +
@ -690,19 +763,19 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
                    "\tdhu.is_epidemic as isEpidemic,\n" +
                    "\tdhu.is_outside as isOutside,\n" +
                    "\tdhu.is_nucleate as isNucleate,\n" +
                    "\tdhu.is_outside_high as isOutsideHigh \n" +
                    "FROM\n" +
                    "\tdhu.is_outside_high as isOutsideHigh, \n" +
                    "date_format(dhu.create_time ,'%Y-%m-%d %H:%i:%S' ) AS createTime "+
                    " FROM\n" +
                    "\tbase_doctor d\n" +
                    "LEFT JOIN base_doctor_hospital dh ON dh.doctor_code = d.id\n" +
                    "LEFT JOIN  /*(SELECT\n" +
                    "\t\t*\n" +
                    "\tFROM\n" +
                    "\t\tbase_doctor_health_upload dhu1\n" +
                    "\tWHERE\n" +
                    "\t\tdhu1.create_time >= '"+date+" 00:00:00'\n" +
                    "\tAND dhu1.create_time <= '"+date+" 23:59:59'\n)*/  base_doctor_health_upload dhu ON dhu.doctor_id = d.id " +
                    " WHERE  dhu.create_time >= '"+date+" 00:00:00' AND dhu.create_time <= '"+date+" 23:59:59'" ;
                    "LEFT JOIN /* (SELECT * FROM base_doctor_health_upload dhu1*/ base_doctor_health_upload dhu ON dhu.doctor_id = d.id WHERE dhu.create_time >= '"+date+" 00:00:00' AND dhu.create_time <= '"+date+" 23:59:59'   ";
            List<Map<String,Object>> mapList = jdbcTemplate.queryForList(doctorSql);
            for (Map<String,Object> map:mapList){
                String id = map.get("id").toString();
                List<BaseDoctorHospitalDO> baseDoctorHospitalDOS = baseDoctorHospitalDao.findByDoctorCode(id);
                if (baseDoctorHospitalDOS!=null&&baseDoctorHospitalDOS.size()!=0){
                    map.put("deptName",baseDoctorHospitalDOS.get(0).getDeptName());
                }
            }
            JSONObject object = new JSONObject();
            object.put("time",date);
            object.put("list",mapList);
@ -732,8 +805,11 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
    public void pushListWritePriceTotal(OutputStream os,JSONArray ls,String startTime, String endTime) throws Exception {
        WritableWorkbook wwb = jxl.Workbook.createWorkbook(os);
        try {
        for (int i=0;i<ls.size();i++){
            JSONObject jsonObject = ls.getJSONObject(i);
            String time = jsonObject.getString("time");
            WritableSheet ws;
            ws = wwb.createSheet("sheet", 1);
            ws = wwb.createSheet(time, i+1);
            String[] header = {"互联网综合服务平台健康上报情况","","","","","","","","","","","","","",""};//
            int k = 0;
            for (String h : header) {
@ -741,119 +817,124 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
                k++;
            }
            String[] header1 = {"汇总日期:"+startTime+"至"+endTime,"","","","","","","","","","","","","",""};//
            int k1 = 0;
            for (String h : header1) {
                addCell(ws, 1, k1, h);//表名,行,列,header
                k1++;
            }
            String[] header2 = {"科室","姓名","电话","身份类别","上报状态","所在地","体温","健康码","行程码","异常症状","涉疫人员","14天内从外地返","核酸检测","14天内有同往人从中高风险返厦","健康状态"};//
            String[] header2 = {"科室","姓名","电话","身份类别","上报状态","所在地","体温","健康码","行程码","异常症状","涉疫人员","14天内从外地返","核酸检测","14天内有同往人从中高风险返厦","健康状态","上报时间"};//
            int k2 = 0;
            for (String h : header2) {
                addCell(ws, 2, k2, h);//表名,行,列,header
                addCell(ws, 1, k2, h);//表名,行,列,header
                k2++;
            }
            int j= 2;
            for (int i=0;i<ls.size();i++){
                JSONObject jsonObject = ls.getJSONObject(i);
                String time = jsonObject.getString("time");
                j = j+1;
                addCell(ws, j, 0, time);//表名,行,列,header
                ws.mergeCells(0,j,14,j);
                JSONArray array = jsonObject.getJSONArray("list");
                for (int z=0;z<array.size();z++){
                    j=j+z+1;
                    JSONObject object = array.getJSONObject(z);
                    addCell(ws, j+1, 0, object.getString("deptName"));//表名,行,列,header
                    addCell(ws, j+1, 1, object.getString("name"));//表名,行,列,header
                    addCell(ws, j+1, 2, object.getString("mobile"));//表名,行,列,header
                    if (StringUtils.isNoneBlank(object.getString("idType"))){
                        addCell(ws, j+1, 3, object.getString("idType"));//表名,行,列,header
            int j= 1;
            JSONArray array = jsonObject.getJSONArray("list");
            for (int z=0;z<array.size();z++){
                j=j+1;
                JSONObject object = array.getJSONObject(z);
                addCell(ws, j, 0, object.getString("deptName"));//表名,行,列,header
                addCell(ws, j, 1, object.getString("name"));//表名,行,列,header
                addCell(ws, j, 2, object.getString("mobile"));//表名,行,列,header
                if (StringUtils.isNoneBlank(object.getString("idType"))){
                    addCell(ws, j, 3, object.getString("idType"));//表名,行,列,header
                }else {
                    addCell(ws, j, 3, "");//表名,行,列,header
                }
                if (StringUtils.isNoneBlank(object.getString("temperature"))){
                    String address = "";
                    if ( StringUtils.isNoneBlank(object.getString("provinceName"))){
                        address +=object.getString("provinceName");
                    }
                    if ( StringUtils.isNoneBlank(object.getString("cityName"))){
                        address +=object.getString("cityName");
                    }
                    if ( StringUtils.isNoneBlank(object.getString("townName"))){
                        address +=object.getString("townName");
                    }
                    addCell(ws, j, 4, "已上报");//表名,行,列,header
                    addCell(ws, j, 5,address);//表名,行,列,header
                    addCell(ws, j, 6, object.getString("temperature"));//表名,行,列,header
                    String healthCodeName="";
                    String healthStateName= "";
                    if (object.getString("healthCode").equalsIgnoreCase("1")){
                        healthCodeName="绿码";
                    }else if (object.getString("healthCode").equalsIgnoreCase("2")){
                        healthCodeName="红码";
                    }else if (object.getString("healthCode").equalsIgnoreCase("3")){
                        healthCodeName="黄码";
                    }
                    if (object.getString("healthCode").equalsIgnoreCase("2")||object.getString("healthCode").equalsIgnoreCase("3")||
                            object.getDouble("temperature")>=37.3||object.getString("isSymtoms").equalsIgnoreCase("1")||object.getString("isEpidemic").equalsIgnoreCase("1")){
                        healthStateName="异常";
                    }else {
                        addCell(ws, j+1, 3, "");//表名,行,列,header
                        healthStateName="正常";
                    }
                    String tourCodeName = "";
                    if (object.getString("tourCode").equalsIgnoreCase("1")){
                        tourCodeName="带星";
                    }else if (object.getString("tourCode").equalsIgnoreCase("2")){
                        tourCodeName="不带星";
                    }
                    String isSymtomsName="";
                    if (object.getString("isSymtoms").equalsIgnoreCase("1")){
                        isSymtomsName="是";
                    }else if (object.getString("isSymtoms").equalsIgnoreCase("2")){
                        isSymtomsName="否";
                    }
                    String isEpidemicName="";
                    if (object.getString("isEpidemic").equalsIgnoreCase("1")){
                        isEpidemicName="是";
                    }else if (object.getString("isEpidemic").equalsIgnoreCase("2")){
                        isEpidemicName="否";
                    }
                    String isOutsideName="";
                    if (object.getString("isOutside").equalsIgnoreCase("1")){
                        isOutsideName="是";
                    }else if (object.getString("isOutside").equalsIgnoreCase("2")){
                        isOutsideName="否";
                    }
                    String isNucleateName="";
                    if (object.getString("isNucleate").equalsIgnoreCase("1")){
                        isNucleateName="未做";
                    }else if (object.getString("isNucleate").equalsIgnoreCase("2")){
                        isNucleateName="已做(院内)";
                    }else if (object.getString("isNucleate").equalsIgnoreCase("3")){
                        isNucleateName="已做(院外)";
                    }
                    String isOutsideHighName="";
                    if (object.getString("isOutsideHigh").equalsIgnoreCase("1")){
                        isOutsideHighName="是";
                    }else if (object.getString("isOutsideHigh").equalsIgnoreCase("2")){
                        isOutsideHighName="否";
                    }
                    String createTime= "";
                    if (object.get("createTime")!=null){
                        createTime = object.getString("createTime");
                    }
                    if (StringUtils.isNoneBlank(object.getString("temperature"))){
                        addCell(ws, j+1, 4, "已上报");//表名,行,列,header
                        addCell(ws, j+1, 5, object.getString("address"));//表名,行,列,header
                        addCell(ws, j+1, 6, object.getString("temperature"));//表名,行,列,header
                        String healthCodeName="";
                        String healthStateName= "";
                        if (object.getString("healthCode").equalsIgnoreCase("1")){
                            healthCodeName="绿码";
                            healthStateName="正常";
                        }else if (object.getString("healthCode").equalsIgnoreCase("2")){
                            healthCodeName="红码";
                            healthStateName="异常";
                        }else if (object.getString("healthCode").equalsIgnoreCase("3")){
                            healthCodeName="黄码";
                            healthStateName="异常";
                        }
                        String tourCodeName = "";
                        if (object.getString("tourCode").equalsIgnoreCase("1")){
                            tourCodeName="带星";
                        }else if (object.getString("tourCode").equalsIgnoreCase("2")){
                            tourCodeName="不带星";
                        }
                        String isSymtomsName="";
                        if (object.getString("isSymtoms").equalsIgnoreCase("1")){
                            isSymtomsName="是";
                        }else if (object.getString("isSymtoms").equalsIgnoreCase("2")){
                            isSymtomsName="否";
                        }
                        String isEpidemicName="";
                        if (object.getString("isEpidemic").equalsIgnoreCase("1")){
                            isEpidemicName="是";
                        }else if (object.getString("isEpidemic").equalsIgnoreCase("2")){
                            isEpidemicName="否";
                        }
                        String isOutsideName="";
                        if (object.getString("isOutside").equalsIgnoreCase("1")){
                            isOutsideName="是";
                        }else if (object.getString("isOutside").equalsIgnoreCase("2")){
                            isOutsideName="否";
                        }
                        String isNucleateName="";
                        if (object.getString("isNucleate").equalsIgnoreCase("1")){
                            isNucleateName="未做";
                        }else if (object.getString("isNucleate").equalsIgnoreCase("2")){
                            isNucleateName="已做(院内)";
                        }else if (object.getString("isNucleate").equalsIgnoreCase("3")){
                            isNucleateName="已做(院外)";
                        }
                        String isOutsideHighName="";
                        if (object.getString("isOutsideHigh").equalsIgnoreCase("1")){
                            isOutsideHighName="是";
                        }else if (object.getString("isOutsideHigh").equalsIgnoreCase("2")){
                            isOutsideHighName="否";
                        }
                        addCell(ws, j+1, 7, healthCodeName);//表名,行,列,header
                        addCell(ws, j+1, 8, tourCodeName);//表名,行,列,header
                        addCell(ws, j+1, 9, isSymtomsName);//表名,行,列,header
                        addCell(ws, j+1, 10, isEpidemicName);//表名,行,列,header
                        addCell(ws, j+1, 11, isOutsideName);//表名,行,列,header
                        addCell(ws, j+1, 12, isNucleateName);//表名,行,列,header
                        addCell(ws, j+1, 13, isOutsideHighName);//表名,行,列,header
                        addCell(ws, j+1, 14, healthStateName);//表名,行,列,header
                    }else {
                        addCell(ws, j+1, 4, "未上报");//表名,行,列,header
                        addCell(ws, j+1, 5, "");//表名,行,列,header
                        addCell(ws, j+1, 6, "");//表名,行,列,header
                        addCell(ws, j+1, 7, "");//表名,行,列,header
                        addCell(ws, j+1, 8, "");//表名,行,列,header
                        addCell(ws, j+1, 9, "");//表名,行,列,header
                        addCell(ws, j+1, 10, "");//表名,行,列,header
                        addCell(ws, j+1, 11, "");//表名,行,列,header
                        addCell(ws, j+1, 12, "");//表名,行,列,header
                        addCell(ws, j+1, 13, "");//表名,行,列,header
                        addCell(ws, j+1, 14, "");//表名,行,列,header
                    }
                    addCell(ws, j, 7, healthCodeName);//表名,行,列,header
                    addCell(ws, j, 8, tourCodeName);//表名,行,列,header
                    addCell(ws, j, 9, isSymtomsName);//表名,行,列,header
                    addCell(ws, j, 10, isEpidemicName);//表名,行,列,header
                    addCell(ws, j, 11, isOutsideName);//表名,行,列,header
                    addCell(ws, j, 12, isNucleateName);//表名,行,列,header
                    addCell(ws, j, 13, isOutsideHighName);//表名,行,列,header
                    addCell(ws, j, 14, healthStateName);//表名,行,列,header
                    addCell(ws, j, 15, createTime);//表名,行,列,header
                }else {
                    addCell(ws, j, 4, "未上报");//表名,行,列,header
                    addCell(ws, j, 5, "");//表名,行,列,header
                    addCell(ws, j, 6, "");//表名,行,列,header
                    addCell(ws, j, 7, "");//表名,行,列,header
                    addCell(ws, j, 8, "");//表名,行,列,header
                    addCell(ws, j, 9, "");//表名,行,列,header
                    addCell(ws, j, 10, "");//表名,行,列,header
                    addCell(ws, j, 11, "");//表名,行,列,header
                    addCell(ws, j, 12, "");//表名,行,列,header
                    addCell(ws, j, 13, "");//表名,行,列,header
                    addCell(ws, j, 14, "");//表名,行,列,header
                    addCell(ws, j, 15, "");//表名,行,列,header
                }
            }
            ws.mergeCells(0,0,14,0);
            ws.mergeCells(0,1,14,1);
            ws.mergeCells(0,0,15,0);
        }
            wwb.write();
            wwb.close();
        } catch (IOException e) {
@ -871,4 +952,20 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
        label.setCellFormat(cellFormat);
        ws.addCell(label);
    }
    /**
     * 查下最新一次记录
     * @param doctorId
     * @param consumer
     * @return
     */
    public BaseDoctorHealthUploadDO selectRecordByDoctorIdAndConsumer(String doctorId,String consumer){
        BaseDoctorHealthUploadDO baseDoctorHealthUploadDO = null;
        List<BaseDoctorHealthUploadDO> doctorHealthUploadDOList = baseDoctorHealthUploadDao.findByDoctorIdAndConsumer(doctorId,consumer);
        if (doctorHealthUploadDOList!=null&&doctorHealthUploadDOList.size()!=0){
            baseDoctorHealthUploadDO = doctorHealthUploadDOList.get(0);
        }
        return baseDoctorHealthUploadDO;
    }
}

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

@ -3797,7 +3797,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            WritableSheet ws;
            ws = wwb.createSheet("sheet", 1);
            String[] header = {"序号","充值时间","商户订单号","医院订单号","患者姓名","证件号码","就诊卡号","手机号码","金额","状态","业务类型","咨询方式"};
            String[] header = {"序号","充值时间","商户订单号","医院订单号","患者姓名","证件号码","就诊卡号","手机号码","金额","状态","业务类型","咨询方式","代问诊人","问诊医生"};
            int k = 0;
            for (String h : header) {
                addCell(ws, 0, k, h);//表名,行,列,header
@ -3887,12 +3887,26 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                }else {
                    time = m.get("payTime").toString();
                }
                String consumerName = "";
                if (m.get("consumerName") == null){
                    consumerName = null;
                }else {
                    consumerName= m.get("consumerName").toString();
                }
                String doctorName ="";
                if (m.get("doctorName") == null){
                    doctorName = null;
                }else {
                    doctorName= m.get("doctorName").toString();
                }
                addCell(ws, i, 0, m.get("id")!=null?m.get("id").toString():n);
                addCell(ws, i, 1, time!=null?time:n);
                addCell(ws, i, 2, (String) m.get("orderNo")!=null?(String) m.get("orderNo"):n);
                addCell(ws, i, 3, (String) m.get("ykOrderNo")!=null?(String) m.get("ykOrderNo"):n);
                addCell(ws, i, 4, (String) m.get("patientName")!=null?(String) m.get("patientName"):n);
                addCell(ws, i, 4, consumerName!=null?consumerName:n);
                addCell(ws, i, 5, (String) m.get("idcard")!=null?(String) m.get("idcard"):n);
                addCell(ws, i, 6, (String) m.get("medicard")!=null?(String) m.get("medicard"):n);
                addCell(ws, i, 7, (String) m.get("mobile")!=null?(String) m.get("mobile"):n);
@ -3900,6 +3914,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                addCell(ws, i, 9, status!=null?status:n);
                addCell(ws, i, 10, odry!=null?odry:n);
                addCell(ws, i, 11, odte!=null?odte:n);
                addCell(ws, i, 12, (String) m.get("patientName")!=null?(String) m.get("patientName"):n);
                addCell(ws, i, 13, doctorName!=null?doctorName:n);
                i++;
            }
            wwb.write();
@ -14822,6 +14838,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            com.alibaba.fastjson.JSONObject objectString = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(prescriptionDO);
            List<WlyyPrescriptionInfoDO> infoDOList = prescriptionInfoDao.findByPrescriptionId(prescriptionDO.getId(),1);
            objectString.put("info",infoDOList);
            WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
            if (outpatientDO!=null){
                objectString.put("consumerName",outpatientDO.getConsumerName());
            }else {
                objectString.put("consumerName","");
            }
            Map<String,Object> map = new HashedMap();
            map.put("prescription",objectString);
            mapList.add(map);
@ -14832,7 +14854,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    /**
     * 药品明细表导出
     * @param os
     * @param osmergeCells(a,b,c,d)
     * @param ls
     * @param startTime
     * @param endTime
@ -14856,7 +14878,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                addCell(ws, 1, k1, h);//表名,行,列,header
                k1++;
            }
            String[] header2 = {"患者名称","订单药品","规格","总量","单位","进价","零售价","进货金额","零售金额","发药时间","审方时间","开方时间","开方医生"};//
            String[] header2 = {"患者名称","代问诊人","订单药品","规格","总量","单位","进价","零售价","进货金额","零售金额","发药时间","审方时间","开方时间","开方医生"};//
            int k2 = 0;
            for (String h : header2) {
                addCell(ws, 2, k2, h);//表名,行,列,header
@ -14871,31 +14893,34 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                com.alibaba.fastjson.JSONArray array = jsonObject.getJSONArray("info");
                int j = i;
                addCell(ws, i, 0,jsonObject.get("patientName")!=null?jsonObject.get("patientName").toString():n);
                addCell(ws, i, 1,jsonObject.get("consumerName")!=null?jsonObject.get("consumerName").toString():n);
                DecimalFormat df = new DecimalFormat("#.00");
                if(array!=null&&array.size()!=0){
                    for (int z=0;z<array.size();z++){
                        com.alibaba.fastjson.JSONObject object = array.getJSONObject(z);
                        addCell(ws, i, 1, object.get("drugName")!=null?object.get("drugName").toString():n);
                        addCell(ws, i, 2, object.get("specification")!=null?object.get("specification").toString():n);
                        addCell(ws, i, 3, object.get("quantity")!=null?object.get("quantity").toString():n);
                        addCell(ws, i, 4, object.get("packUnitName")!=null?object.get("packUnitName").toString():n);
                        addCell(ws, i, 5, "无");
                        addCell(ws, i, 6, object.get("packRetprice")!=null?object.get("packRetprice").toString():n);
                        addCell(ws, i, 7, "无");
                        addCell(ws, i, 2, object.get("drugName")!=null?object.get("drugName").toString():n);
                        addCell(ws, i, 3, object.get("specification")!=null?object.get("specification").toString():n);
                        addCell(ws, i, 4, object.get("quantity")!=null?object.get("quantity").toString():n);
                        addCell(ws, i, 5, object.get("packUnitName")!=null?object.get("packUnitName").toString():n);
                        addCell(ws, i, 6, "无");
                        addCell(ws, i, 7, object.get("packRetprice")!=null?object.get("packRetprice").toString():n);
                        addCell(ws, i, 8, "无");
                        if (object.get("quantity")!=null){
                            Double quantity = Double.parseDouble(object.get("quantity").toString());
                            Double packRetprice = Double.parseDouble(object.get("packRetprice").toString());
                            addCell(ws, i, 8,df.format(packRetprice*quantity));
                            addCell(ws, i, 9,df.format(packRetprice*quantity));
                        }else {
                            addCell(ws, i, 8,"");
                            addCell(ws, i, 9,"");
                        }
                        addCell(ws, i, 9,jsonObject.get("dispDate")!=null?DateUtil.stampToString(jsonObject.get("dispDate").toString()):n);
                        addCell(ws, i, 10,jsonObject.get("checkTime")!=null?DateUtil.stampToString(jsonObject.get("checkTime").toString()):n);
                        addCell(ws, i, 11,jsonObject.get("createTime")!=null?DateUtil.stampToString(jsonObject.get("createTime").toString()):n);
                        addCell(ws, i, 12,jsonObject.get("doctorName")!=null?jsonObject.get("doctorName").toString():n);
                        addCell(ws, i, 10,jsonObject.get("dispDate")!=null?DateUtil.stampToString(jsonObject.get("dispDate").toString()):n);
                        addCell(ws, i, 11,jsonObject.get("checkTime")!=null?DateUtil.stampToString(jsonObject.get("checkTime").toString()):n);
                        addCell(ws, i, 12,jsonObject.get("createTime")!=null?DateUtil.stampToString(jsonObject.get("createTime").toString()):n);
                        addCell(ws, i, 13,jsonObject.get("doctorName")!=null?jsonObject.get("doctorName").toString():n);
                        i++;
                    }
                    ws.mergeCells(0,j,0,i-1);
                    ws.mergeCells(1,j,1,i-1);
                }else {
                    i++;
                }
@ -14903,8 +14928,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            }
            ws.mergeCells(0,0,12,0);
            ws.mergeCells(0,1,12,1);
            ws.mergeCells(0,0,13,0);
            ws.mergeCells(0,1,13,1);
            wwb.write();
            wwb.close();
        } catch (IOException e) {

+ 32 - 0
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -2225,11 +2225,21 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        for (Map<String,Object> map:list){
            if (map.get("orderCategory")!=null){
                String orderCategoryFlag = map.get("orderCategory").toString();
                String relationCode =map.get("relationCode").toString();
                if (!orderCategoryFlag.equalsIgnoreCase("5")){
                    Double price = Double.parseDouble(map.get("payPrice").toString());
                    Double prie = price/100;
                    logger.info("price"+prie);
                    map.put("payPrice",prie);
                }if (orderCategoryFlag.equalsIgnoreCase("1")||orderCategoryFlag.equalsIgnoreCase("2")||orderCategoryFlag.equalsIgnoreCase("3")){
                    WlyyOutpatientDO outpatientDO = outpatientDao.findById(relationCode);
                    map.put("doctorName",outpatientDO.getDoctorName());
                    map.put("consumerName",outpatientDO.getConsumerName());
                }else if (orderCategoryFlag.equalsIgnoreCase("4")){
                    WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(relationCode);
                    WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
                    map.put("doctorName",outpatientDO.getDoctorName());
                    map.put("consumerName",outpatientDO.getConsumerName());
                }
            }
        }
@ -2335,12 +2345,34 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        for (Map<String,Object> map:mapList){
            if (map.get("orderCategory")!=null){
                String orderCategoryFlag = map.get("orderCategory").toString();
                String relationCode =map.get("relationCode").toString();
                if (!orderCategoryFlag.equalsIgnoreCase("5")){
                    Double price = Double.parseDouble(map.get("payPrice").toString());
                    Double prie = price/100;
                    logger.info("price"+prie);
                    map.put("payPrice",prie);
                }
                if (orderCategoryFlag.equalsIgnoreCase("1")||orderCategoryFlag.equalsIgnoreCase("2")||orderCategoryFlag.equalsIgnoreCase("3")){
                    WlyyOutpatientDO outpatientDO = outpatientDao.findById(relationCode);
                    if (outpatientDO!=null){
                        map.put("doctorName",outpatientDO.getDoctorName());
                        map.put("consumerName",outpatientDO.getPatientName());
                    }else {
                        map.put("doctorName","");
                        map.put("consumerName","");
                    }
                }else if (orderCategoryFlag.equalsIgnoreCase("4")){
                    WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(relationCode);
                    WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
                    if (outpatientDO!=null){
                        map.put("doctorName",outpatientDO.getDoctorName());
                        map.put("consumerName",outpatientDO.getPatientName());
                    }else {
                        map.put("doctorName","");
                        map.put("consumerName","");
                    }
                }
            }
        }
        return MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success, mapList);

+ 13 - 1
business/base-service/src/main/java/com/yihu/jw/utils/YkyySMSService.java

@ -7,10 +7,12 @@ import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.sms.SmsTemplateDO;
import com.yihu.jw.entity.base.wx.WxPushLogDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.hospital.prescription.WlyyInspectionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.prescription.dao.WlyyInspectionDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.sms.dao.BaseSmsTemplateDao;
@ -54,6 +56,8 @@ public class YkyySMSService {
    private WxPushLogDao wxPushLogDao;
    @Autowired
    private WlyyHospitalSysDictDao wlyyHospitalSysDictDao;
    @Autowired
    private WlyyHttpLogDao wlyyHttpLogDao;
    /**
     * 发送短信验证码
@ -63,7 +67,15 @@ public class YkyySMSService {
     */
    public ResultMsg ykyySendSMS(String mobile, String content){
        SmsClient smsClient = new SmsClient();
        return smsClient.sendSms("ykyy",usrCode, content,mobile,"yes","","8",urlSms,pw);
        WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
        ResultMsg resultMsg= smsClient.sendSms("ykyy",usrCode, content,mobile,"yes","","8",urlSms,pw);
        httpLogDO.setCode("sendSms");
        httpLogDO.setRequest(mobile+content);
        httpLogDO.setResponse(resultMsg.getMsg()+resultMsg.getCode()+resultMsg.getData());
        httpLogDO.setCreateTime(new Date());
        httpLogDO.setName("短信发送");
        wlyyHttpLogDao.save(httpLogDO);
        return resultMsg;
    }
    public void sendSmsByTempcode(String temlateCode, WlyyOutpatientDO wlyyOutpatientDO, WlyyPrescriptionDO wlyyPrescriptionDO,String doctorMobile){
        SmsTemplateDO smsTemplateDO =  null;

+ 3 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java

@ -19,13 +19,13 @@ public abstract class IntegerIdentityEntity implements Serializable {
    @Id
//==========mysql 环境 id策略======================================================
    @GeneratedValue(generator = "generator")
 /*   @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "identity")
    @Column(name = "id", unique = true, nullable = false)
    @Column(name = "id", unique = true, nullable = false)*/
//==========mysql 环境 id策略 end======================================================
//==========Oracle 环境id策略 =========================================================
/*   @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
   @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")
//==========Oracle 环境id策略 =========================================================
    public Integer getId() {
        return id;

+ 9 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/healthUpload/BaseDoctorHealthUploadDO.java

@ -64,6 +64,15 @@ public class BaseDoctorHealthUploadDO extends UuidIdentityEntityWithOperator {
    public String consumerName;
    public String healthCodeDesc;
    public Integer outsideHighNucleate;
    public String abnormalSymptomsOther;
    public String getAbnormalSymptomsOther() {
        return abnormalSymptomsOther;
    }
    public void setAbnormalSymptomsOther(String abnormalSymptomsOther) {
        this.abnormalSymptomsOther = abnormalSymptomsOther;
    }
    public Integer getOutsideHighNucleate() {
        return outsideHighNucleate;

+ 1 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java

@ -112,6 +112,7 @@ public class BasicZuulFilter extends ZuulFilter {
                url.contains("/prescription/pushListWrite")||
                url.contains("/prescription/pushListDrug")||
                url.contains("/open/noLogin/pushYkCardCharge")||
                url.contains("/open/noLogin/pushListWriteHealthInfo")||
                url.contains("/prescription/searchRecordWrite")||
                url.contains("/Funds/reconciliationExcel")||
                url.contains("/Funds/deviceInfoExcel"))){

+ 2 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/PostFilter.java

@ -63,6 +63,7 @@ public class PostFilter extends ZuulFilter {
        if (url.contains("/excelControl")||url.contains("/prescription/pushListWrite")||
                url.contains("/prescription/pushListDrug")||
                url.contains("/open/noLogin/pushYkCardCharge")||
                url.contains("/open/noLogin/pushListWriteHealthInfo")||
                url.contains("/prescription/searchRecordWrite")||
                url.contains("/Funds/reconciliationExcel")||
                url.contains("/Funds/deviceInfoExcel")){
@ -142,6 +143,7 @@ public class PostFilter extends ZuulFilter {
                url.contains("/prescription/pushListWrite")||
                url.contains("/prescription/pushListDrug")||
                url.contains("/open/noLogin/pushYkCardCharge")||
                url.contains("/open/noLogin/pushListWriteHealthInfo")||
                url.contains("/prescription/searchRecordWrite")||
                url.contains("/Funds/reconciliationExcel")||
                url.contains("/Funds/deviceInfoExcel")||url.contains("/open/noEntry"))){

+ 1 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -269,7 +269,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
            if(org.apache.commons.lang3.StringUtils.isNotBlank(key)&& org.apache.commons.lang3.StringUtils.isNotBlank(text)){
                if(!verifyCaptcha(key,text)){
                    throw new Exception("img_captcha error");
                    throw new ImgCaptchaException("验证码错误!");
                }
            }
            logger.info("login:登录进入2");

+ 19 - 3
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/healthUpload/HealthUploadPoint.java

@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
@ -215,9 +216,11 @@ public class HealthUploadPoint extends EnvelopRestEndpoint {
                                                       @ApiParam(name = "startDate", value = "开始时间")
                                                       @RequestParam(value = "startDate", required = false) String startDate,
                                        @ApiParam(name = "endDate", value = "结束时间")
                                            @RequestParam(value = "endDate", required = false) String endDate) {
                                            @RequestParam(value = "endDate", required = false) String endDate,
                                        @ApiParam(name = "name", value = "姓名")
                                            @RequestParam(value = "name", required = false) String name) {
        try {
            JSONObject jsonObject = baseDoctorHealthUploadService.selectHeaderTotal(dept,idType,status,state,startDate,endDate);
            JSONObject jsonObject = baseDoctorHealthUploadService.selectHeaderTotal(dept,idType,status,state,startDate,endDate,name);
            return success(jsonObject);
        } catch (Exception e) {
            return failedObjEnvelopException(e);
@ -281,11 +284,24 @@ public class HealthUploadPoint extends EnvelopRestEndpoint {
                                 HttpServletResponse response) throws Exception {
        try{
            response.setContentType("octets/stream");
            response.setHeader("Content-Disposition", "attachment; filename=" + new String("pushDataList.xls"));
            response.setHeader("Content-Disposition", "attachment; filename=" + new String(URLEncoder.encode("健康上报报表")+".xls"));
            OutputStream os = response.getOutputStream();
            return success(baseDoctorHealthUploadService.selectListInfoExcelByTotal(os, startDate,endDate));
        }catch (Exception e) {
            return failedMixEnvelopException(e);
        }
    }
    @GetMapping(value = "selectRecordByDoctorIdAndConsumer")
    @ApiOperation(value = "查下上报最新一次记录", notes = "查下上报最新一次记录")
    public Envelop selectRecordByDoctorIdAndConsumer(@ApiParam(name = "doctdorId", value = "医生id")
                                 @RequestParam(value = "doctorId", required = false) String doctdorId,
                                 @ApiParam(name = "consumer", value = "代上报人")
                                 @RequestParam(value = "consumer", required = false) String consumer) throws Exception {
        try{
            return success(baseDoctorHealthUploadService.selectRecordByDoctorIdAndConsumer(doctdorId,consumer));
        }catch (Exception e) {
            return failedMixEnvelopException(e);
        }
    }
}

+ 20 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -30,6 +30,7 @@ import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.es.service.StatisticsEsService;
import com.yihu.jw.es.service.yqfk.YqfkService;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.healthUpload.service.BaseDoctorHealthUploadService;
import com.yihu.jw.hospital.dao.consult.KnowledgeArticleUserDao;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailRelationDao;
@ -251,6 +252,8 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    private WechatInfoService wechatInfoService;
    @Autowired
    private YlzMedicailRelationDao ylzMedicailRelationDao;
    @Autowired
    private BaseDoctorHealthUploadService baseDoctorHealthUploadService;
@ -2174,6 +2177,23 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = "pushListWriteHealthInfo")
    @ApiOperation(value = "健康上报数据导出", notes = "健康上报数据导出")
    public Envelop pushListWrite(@ApiParam(name = "startDate", value = "开始时间")
                                 @RequestParam(value = "startDate", required = false) String startDate,
                                 @ApiParam(name = "endDate", value = "结束时间")
                                 @RequestParam(value = "endDate", required = false) String endDate,
                                 HttpServletResponse response) throws Exception {
        try{
            response.setContentType("octets/stream");
            response.setHeader("Content-Disposition", "attachment; filename=" + new String(URLEncoder.encode("健康上报报表")+".xls"));
            OutputStream os = response.getOutputStream();
            return success(baseDoctorHealthUploadService.selectListInfoExcelByTotal(os, startDate,endDate));
        }catch (Exception e) {
            return failedMixEnvelopException(e);
        }
    }
    /**
     * 咨询列表
     * @param startDate