Browse Source

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

liubing 2 years ago
parent
commit
f07f577f48
36 changed files with 928 additions and 52 deletions
  1. 19 0
      business/base-service/src/main/java/com/yihu/jw/dailyReport/dao/BaseDailyReportLogDao.java
  2. 304 10
      business/base-service/src/main/java/com/yihu/jw/dailyReport/service/DailyReportUploadService.java
  3. 10 0
      business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java
  4. 57 3
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  5. 13 5
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java
  6. 4 3
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
  7. 12 10
      business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java
  8. 4 0
      business/base-service/src/main/java/com/yihu/jw/order/pay/ylz/YlzPayService.java
  9. 1 1
      business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java
  10. 20 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorDO.java
  11. 73 0
      common/common-entity/src/main/java/com/yihu/jw/entity/dailyReport/BaseDailyReportLogDO.java
  12. 20 0
      common/common-entity/src/main/java/com/yihu/jw/entity/dailyReport/BaseDailyReportUploadDO.java
  13. 8 0
      common/common-entity/src/main/java/com/yihu/jw/entity/ylzinfo/OauthYlzConfigDO.java
  14. 1 0
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java
  15. 13 1
      gateway/ag-basic/src/main/resources/application.yml
  16. 7 0
      gateway/ag-basic/src/main/resources/bootstrap.yml
  17. 1 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/dao/doctor/BaseDoctorDao.java
  18. 34 4
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java
  19. 35 0
      server/svr-authentication/src/main/resources/application.yml
  20. 8 0
      server/svr-authentication/src/main/resources/bootstrap.yml
  21. 14 0
      server/svr-configuration/src/main/resources/bootstrap.yml
  22. 47 0
      svr/svr-base/src/main/resources/application.yml
  23. 8 0
      svr/svr-base/src/main/resources/bootstrap.yml
  24. 1 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/message/PatientMessageService.java
  25. 2 3
      svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/DeviceUploadService.java
  26. 1 0
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java
  27. 2 4
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/util/DeviceLostMessageUtil.java
  28. 3 1
      svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/MqSdkController.java
  29. 2 2
      svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/RemindDoctorService.java
  30. 39 0
      svr/svr-internet-hospital-job/src/main/resources/application.yml
  31. 9 0
      svr/svr-internet-hospital-job/src/main/resources/bootstrap.yml
  32. 47 1
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/dailyReport/DailyReportUploadPoint.java
  33. 6 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java
  34. 5 1
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/QrcodeService.java
  35. 89 0
      svr/svr-internet-hospital/src/main/resources/application.yml
  36. 9 1
      svr/svr-internet-hospital/src/main/resources/bootstrap.yml

+ 19 - 0
business/base-service/src/main/java/com/yihu/jw/dailyReport/dao/BaseDailyReportLogDao.java

@ -0,0 +1,19 @@
package com.yihu.jw.dailyReport.dao;
import com.yihu.jw.entity.dailyReport.BaseDailyReportDetailDO;
import com.yihu.jw.entity.dailyReport.BaseDailyReportLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by Bing on 2022/7/25.
 */
public interface BaseDailyReportLogDao extends PagingAndSortingRepository<BaseDailyReportLogDO,String>,
        JpaSpecificationExecutor<BaseDailyReportLogDO> {
    @Query("select b from BaseDailyReportLogDO b where b.reportId=?1 order by b.createTime desc")
    List<BaseDailyReportLogDO> findByReportId(String reportId);
}

+ 304 - 10
business/base-service/src/main/java/com/yihu/jw/dailyReport/service/DailyReportUploadService.java

@ -3,6 +3,7 @@ package com.yihu.jw.dailyReport.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.dailyReport.dao.BaseDailyReportDetailDao;
import com.yihu.jw.dailyReport.dao.BaseDailyReportLogDao;
import com.yihu.jw.dailyReport.dao.BaseDailyReportUploadDao;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
@ -14,6 +15,7 @@ import com.yihu.jw.entity.base.wx.WxAccessTokenDO;
import com.yihu.jw.entity.base.wx.WxPushLogDO;
import com.yihu.jw.entity.base.wx.WxTemplateConfigDO;
import com.yihu.jw.entity.dailyReport.BaseDailyReportDetailDO;
import com.yihu.jw.entity.dailyReport.BaseDailyReportLogDO;
import com.yihu.jw.entity.dailyReport.BaseDailyReportUploadDO;
import com.yihu.jw.entity.healthUpload.BaseDoctorMemberDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
@ -55,6 +57,8 @@ public class DailyReportUploadService {
    @Autowired
    private BaseDailyReportUploadDao dailyReportUploadDao;
    @Autowired
    private BaseDailyReportLogDao dailyReportLogDao;
    @Autowired
    private BaseDailyReportDetailDao reportDetailDao;
    @Autowired
    private BaseDoctorMemberDao doctorMemberDao;
@ -317,7 +321,7 @@ public class DailyReportUploadService {
     * @throws Exception
     */
    @Transactional(rollbackFor = Exception.class)
    public BaseDailyReportUploadDO createDailyReport(String doctorId,String report_date,Integer leaveState,String leaveHour,String week_name, List<BaseDailyReportDetailDO> detailDOList) throws Exception {
    public BaseDailyReportUploadDO createDailyReport(String doctorId,String report_date,Integer leaveState,String leaveHour,String week_name,String totalHour, List<BaseDailyReportDetailDO> detailDOList) throws Exception {
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctorId);
        List<BaseDoctorHospitalDO> doctorHospitalDOS = baseDoctorHospitalDao.findByDoctorCode(doctorId);
        if (null==doctorDO){
@ -348,6 +352,7 @@ public class DailyReportUploadService {
        dailyReportUploadDO.setWeekName(week_name);
        dailyReportUploadDO.setLeaveState(leaveState);
        dailyReportUploadDO.setLeaveHour(leaveHour);
        dailyReportUploadDO.setTotalHour(totalHour);
        dailyReportUploadDO = dailyReportUploadDao.save(dailyReportUploadDO);
        for (BaseDailyReportDetailDO tmp :detailDOList){
            tmp.setReportId(dailyReportUploadDO.getId());
@ -405,7 +410,15 @@ public class DailyReportUploadService {
        }
        dailyReportUploadDao.save(dailyReportUploadDO);
        dailyReportUploadDO.setDetailDOList(detailDOS);
        BaseDailyReportLogDO baseDailyReportLogDO = new BaseDailyReportLogDO();
        baseDailyReportLogDO.setCreateTime(new Date());
        baseDailyReportLogDO.setReportId(dailyReportUploadDO.getId());
        baseDailyReportLogDO.setContent("日报提交");
        baseDailyReportLogDO.setOperateUser(dailyReportUploadDO.getDoctorId());
        baseDailyReportLogDO.setOperateUserName(dailyReportUploadDO.getDoctorName());
        baseDailyReportLogDO.setType(1);
        baseDailyReportLogDO.setTypeName("日报提交");
        dailyReportLogDao.save(baseDailyReportLogDO);
        return dailyReportUploadDO;
    }
@ -439,7 +452,15 @@ public class DailyReportUploadService {
                dailyReportUploadDO.setState(1);
                dailyReportUploadDao.save(dailyReportUploadDO);
            }
            BaseDailyReportLogDO baseDailyReportLogDO = new BaseDailyReportLogDO();
            baseDailyReportLogDO.setCreateTime(new Date());
            baseDailyReportLogDO.setReportId(dailyReportUploadDO.getId());
            baseDailyReportLogDO.setOperateUser(doctorDO.getId());
            baseDailyReportLogDO.setOperateUserName(doctorDO.getName());
            if (doubt==true){//有疑惑,推送给总经办"0592181"和老板"0592008";//老板id
                baseDailyReportLogDO.setType(3);
                baseDailyReportLogDO.setTypeName("上级核实存疑");
                baseDailyReportLogDO.setContent("上级核实存疑");
                String sql = " select dict_value from wlyy_hospital_sys_dict where dict_name='MRRB_DOUBT_SENDER'  ";
                List<String> doubtSendUser = jdbcTemplate.queryForList(sql,String.class);
                for (String senderUser:doubtSendUser){
@ -464,7 +485,12 @@ public class DailyReportUploadService {
                        e.printStackTrace();
                    }
                }
            }else {
                baseDailyReportLogDO.setType(2);
                baseDailyReportLogDO.setTypeName("上级核实未存疑");
                baseDailyReportLogDO.setContent("上级核实未存疑");
            }
            dailyReportLogDao.save(baseDailyReportLogDO);
        }else {
            dailyReportUploadDO.setState(1);
@ -496,6 +522,36 @@ public class DailyReportUploadService {
            }
            reportDetailDao.save(detailDOList);
        }
        try {
            BaseDoctorDO remindDoctorDO = baseDoctorDao.findById(dailyReportUploadDO.getDoctorId());
            if (remindDoctorDO != null) {
                try {
                    WxEnterpriseUserDO enterpriseUserDO = wxEnterpriseUserDao.findByEnterpriseIdAndMobile(wechatId,remindDoctorDO.getMobile());
                    if(enterpriseUserDO==null){
                        logger.info("该用户"+doctorDO.getName()+"没有企业微信手机号,无法推送模版消息,用户ID:"+doctorDO.getId()+"wechatId:"+wechatId);
                    }else{
                        String title = "日报反馈";
                        String des = "您好,您上报的日报有新的反馈,请点击前往查看。";
                        String url = "https://ehr.yihu.com/hlwyy/zjxl/dailyReport/#/workSummary/commit?id="+dailyReportUploadDO.getId();
                        String res = enterpriseService.sendTWMesByDoctor(wechatId,remindDoctorDO.getId(),title,des,url);
                    }
                }catch (Exception e){
                    e.printStackTrace();
                }
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        BaseDailyReportLogDO baseDailyReportLogDO = new BaseDailyReportLogDO();
        baseDailyReportLogDO.setCreateTime(new Date());
        baseDailyReportLogDO.setReportId(dailyReportUploadDO.getId());
        baseDailyReportLogDO.setOperateUser(doctorDO.getId());
        baseDailyReportLogDO.setOperateUserName(doctorDO.getName());
        baseDailyReportLogDO.setType(4);
        baseDailyReportLogDO.setTypeName("存疑核实");
        baseDailyReportLogDO.setContent("存疑核实");
        dailyReportLogDao.save(baseDailyReportLogDO);
        return dailyReportUploadDO;
    }
@ -512,6 +568,8 @@ public class DailyReportUploadService {
        }else{
            List<BaseDailyReportDetailDO> detailDOS = reportDetailDao.findByReportId(dailyReportUploadDO.getId());
            dailyReportUploadDO.setDetailDOList(detailDOS);
            List<BaseDailyReportLogDO> dailyReportLogDOList = dailyReportLogDao.findByReportId(dailyReportUploadDO.getId());
            dailyReportUploadDO.setDailyReportLogDOList(dailyReportLogDOList);
        }
        return dailyReportUploadDO;
    }
@ -536,6 +594,8 @@ public class DailyReportUploadService {
        for (BaseDailyReportUploadDO tmp:list){
            List<BaseDailyReportDetailDO> detailDOS = reportDetailDao.findByReportId(tmp.getId());
            tmp.setDetailDOList(detailDOS);
            List<BaseDailyReportLogDO> dailyReportLogDOList = dailyReportLogDao.findByReportId(tmp.getId());
            tmp.setDailyReportLogDOList(dailyReportLogDOList);
        }
        return list;
    }
@ -553,6 +613,8 @@ public class DailyReportUploadService {
        }else {
            List<BaseDailyReportDetailDO> detailDOS = reportDetailDao.findByReportId(reportUploadDO.getId());
            reportUploadDO.setDetailDOList(detailDOS);
            List<BaseDailyReportLogDO> dailyReportLogDOList = dailyReportLogDao.findByReportId(reportUploadDO.getId());
            reportUploadDO.setDailyReportLogDOList(dailyReportLogDOList);
        }
        return reportUploadDO;
    }
@ -661,7 +723,7 @@ public class DailyReportUploadService {
            reportCondition += " and up.state ='"+state+"' ";
        }
        String doctorSqlCondition = "";//医生过滤条件
        String doctorSqlCondition = "  and d.identity=0  ";//医生过滤条件
        if (StringUtils.isNoneBlank(idType)) {
            doctorSqlCondition += " and d.id_type = '" + idType + "' ";
        }
@ -737,6 +799,131 @@ public class DailyReportUploadService {
        return mapList;
    }
    /**
     * 首页按照科室列表统计核实
     *
     * @param dept
     * @param idType
     * @param state     核实状态
     * @param startDate
     * @param endDate
     * @return
     */
    public List<Map<String, Object>> selectHeaderListHeshi(String doctor,String dept, String idType, String state, String startDate, String endDate, String name) {
        String reportCondition = "";
        if (StringUtils.isNoneBlank(startDate)) {//上传过滤条件
            reportCondition += " and up.report_date >='" + startDate + "' and up.report_date<='" + endDate + "' ";
        }
        if (StringUtils.isNotBlank(state)){
            reportCondition += " and up.state ='"+state+"' ";
        }
        String doctorSqlCondition = " and d.identity=0 ";//医生过滤条件
        if (StringUtils.isNoneBlank(idType)) {
            doctorSqlCondition += " and d.id_type = '" + idType + "' ";
        }
        if (StringUtils.isNoneBlank(name)) {
            doctorSqlCondition += " and d.name like '%" + name + "%' ";
        }
        if (StringUtils.isNoneBlank(doctor)){
            WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("dailyHeshiConfig");
            String buffer = "";
            if (hospitalSysDictDO!=null){
                JSONArray array = JSONArray.parseArray(hospitalSysDictDO.getDictValue());
                for (int i=0;i<array.size();i++){
                    JSONObject object = array.getJSONObject(i);
                    String header = object.getString("header");
                    if (header.equalsIgnoreCase(doctor)){
                        JSONArray jsonArray = object.getJSONArray("data");
                        for (int j=0;j<jsonArray.size();j++){
                            String str = jsonArray.getString(j);
                            buffer +="'"+str+"',";
                        }
                        buffer =buffer.substring(0,buffer.length()-1);
                    }
                }
            }
            if (StringUtils.isNoneBlank(buffer)){
                doctorSqlCondition += " and d.id IN ("+buffer+")";
            }
        }
        //填报人数、未填报人数、上级已核实、未核实
        String deptSql = " select code,name,dh1.doctorTotal,dh2.yishangbaoTotal,dh3.verified,dh4.notVerified,dh5.shangchuanTotal  from dict_hospital_dept hd  " +
                "LEFT JOIN (select count(1) as 'doctorTotal',dh.dept_code from base_doctor d LEFT JOIN base_doctor_hospital dh ON dh.doctor_code = d.id " +
                "WHERE d.del = 1 AND dh.del = 1 "+doctorSqlCondition+" GROUP BY dh.dept_code)dh1 ON hd.CODE = dh1.dept_code " +
                "LEFT JOIN(select dh.dept_code,count(up.id) 'yishangbaoTotal' from base_doctor_daily_report_upload up INNER JOIN base_doctor d on up.doctor_id = d.id " +
                "LEFT JOIN base_doctor_hospital dh ON dh.doctor_code = d.id " +
                "where 1=1 "+doctorSqlCondition+reportCondition+" GROUP BY dh.dept_code )dh2 ON hd.CODE = dh2.dept_code " +
                "LEFT JOIN(select dh.dept_code,count(distinct up.id) 'verified' from base_doctor_daily_report_upload up LEFT JOIN base_daily_report_detail de on up.id = de.report_id " +
                "INNER JOIN base_doctor d on up.doctor_id = d.id LEFT JOIN base_doctor_hospital dh ON dh.doctor_code = d.id " +
                "where 1=1 and de.state=1 "+doctorSqlCondition+reportCondition+" GROUP BY dh.dept_code )dh3 ON hd.CODE = dh3.dept_code " +
                "LEFT JOIN(select dh.dept_code,count(distinct up.id) 'notVerified' from base_doctor_daily_report_upload up LEFT JOIN base_daily_report_detail de on up.id = de.report_id " +
                "INNER JOIN base_doctor d on up.doctor_id = d.id LEFT JOIN base_doctor_hospital dh ON dh.doctor_code = d.id " +
                "where 1=1 and de.state=0 "+doctorSqlCondition+reportCondition+" GROUP BY dh.dept_code )dh4 ON hd.CODE = dh4.dept_code " +
                "LEFT JOIN(select dh.dept_code,count(up.id) 'shangchuanTotal' from base_doctor_daily_report_upload up INNER JOIN base_doctor d on up.doctor_id = d.id " +
                "LEFT JOIN base_doctor_hospital dh ON dh.doctor_code = d.id " +
                "where 1=1 "+doctorSqlCondition+reportCondition+" GROUP BY dh.dept_code )dh5 ON hd.CODE = dh5.dept_code  " +
                " WHERE hd.consult_dept_flag = 1 ";
        if (StringUtils.isNoneBlank(name)) {
            deptSql += " and hd.code IN(SELECT dha.dept_code FROM base_doctor_hospital dha LEFT JOIN base_doctor da ON da.id=dha.doctor_code where da.name LIKE '%" + name + "%') ";
        }
        if (!StringUtils.isNoneBlank(doctor)){
            if (StringUtils.isNoneBlank(dept)) {
                deptSql += " and hd.code = '" + dept + "' ";
            }
        }
        logger.info("deptSql=="+deptSql);
        List<Map<String, Object>> mapList = jdbcTemplate.queryForList(deptSql);
        for (Map<String,Object> deptMap:mapList){
            String day = DateUtil.getTwoDay(endDate, startDate);
            Integer doctorTotal = 0;
            Integer total=0;
            Integer yishangbaoTotal=0;
            Integer weishangbaoTotal=0;
            Integer notVerified=0;
            Integer verified=0;
            Integer shangchuanTotal=0;
            if (deptMap.get("doctorTotal")!=null){
                doctorTotal = Integer.parseInt(deptMap.get("doctorTotal").toString());
                //总人次
                if (!day.equalsIgnoreCase("0")) {
                    total = doctorTotal * (Integer.parseInt(day)+1);
                } else {
                    total = doctorTotal;
                }
            }
            if (deptMap.get("yishangbaoTotal")!=null) {
                yishangbaoTotal = Integer.parseInt(deptMap.get("yishangbaoTotal").toString());
            }
            weishangbaoTotal = total-yishangbaoTotal;
            if (deptMap.get("notVerified")!=null) {
                notVerified = Integer.parseInt(deptMap.get("notVerified").toString());
            }
            if (deptMap.get("verified")!=null) {
                verified = Integer.parseInt(deptMap.get("verified").toString());
            }
            if (deptMap.get("shangchuanTotal")!=null) {
                shangchuanTotal = Integer.parseInt(deptMap.get("shangchuanTotal").toString());
            }
            deptMap.put("total", total);//总人次
            deptMap.put("yishangbaoTotal", yishangbaoTotal);//已上报
            deptMap.put("weishangbaoTotal", weishangbaoTotal);//未上报
            deptMap.put("notVerified", notVerified);//未核实数量
            deptMap.put("verified", verified);//已核实数量
            deptMap.put("shangchuanTotal", shangchuanTotal);//上传总次数
        }
        return mapList;
    }
    /**
     * 具体每一个统计时间列表
     *
@ -762,7 +949,7 @@ public class DailyReportUploadService {
        JSONArray array = new JSONArray();
        for ( i = 0; i < list.size(); i++) {
            String date = list.get(i);
            String doctorSql = " select COUNT(1) as 'total' from base_doctor d where d.del=1 ";
            String doctorSql = " select COUNT(1) as 'total' from base_doctor d where d.del=1 and d.identity=0  ";
            String deptCondition = "";
            if (StringUtils.isNoneBlank(dept)) {
                deptCondition += " (select dh.doctor_code from base_doctor_hospital dh where dh.dept_code = '" + dept + "' and dh.del=1 )";
@ -831,7 +1018,7 @@ public class DailyReportUploadService {
        JSONArray array = new JSONArray();
        for (i = 0; i < list.size(); i++) {
            String date = list.get(i);
            String doctorSql = " select d.name,d.id,d.job_title_name as jobTitleName,d.photo from base_doctor d where d.del=1 ";
            String doctorSql = " select d.name,d.id,d.job_title_name as jobTitleName,d.photo from base_doctor d where d.del=1 and d.identity=0  ";
            String deptCondition = "";
            if (StringUtils.isNoneBlank(dept)) {
                deptCondition += " (select dh.doctor_code from base_doctor_hospital dh where dh.dept_code = '" + dept + "' and dh.del=1 )";
@ -869,7 +1056,7 @@ public class DailyReportUploadService {
                    stateCondition += " and d1.state='"+state+"' ";
                }
                String sql = " select d1.id,d1.state from base_doctor_daily_report_upload d1 where d1.doctor_id='"+id+"' and d1.report_date>='"+date+"' and d1.report_date<='"+date+"' ORDER BY report_date desc ";
                String sql = " select d1.id,d1.state,total_hour from base_doctor_daily_report_upload d1 where d1.doctor_id='"+id+"' and d1.report_date>='"+date+"' and d1.report_date<='"+date+"' ORDER BY report_date desc ";
                List<Map<String, Object>> mapList1 = jdbcTemplate.queryForList(sql);
                if (mapList1 != null && mapList1.size() != 0) {
                    for (Map<String, Object> map1 : mapList1) {
@ -881,6 +1068,8 @@ public class DailyReportUploadService {
                        }
                        map.put("uploadState", "已上报");
                        map.put("uploadId", map1.get("id").toString());
                        map.put("totalHour", map1.get("total_hour"));
                    }
                    map.put("recordList", mapList1);
                } else {
@ -996,10 +1185,113 @@ public class DailyReportUploadService {
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
                " left join base_org t on t.id = h.org_code" +
                " WHERE  " +
                " 1=1 and d.del=1 ";
                " 1=1 and d.del=1 and d.identity=0 ";
        if (StringUtils.isNotBlank(dept)) {
            sql += " AND h.dept_code = '" + dept + "'";
        }
        if (StringUtils.isNotBlank(orgCode)) {
            sql += " AND h.org_code = '" + orgCode + "'";
        }
        if (StringUtils.isNotBlank(key)) {
            sql += " AND (h.dept_name like '%" + key + "%' OR d.name like '%" + key + "%' OR d.expertise like '%" + key + "%') ";
        }
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        for (Map<String,Object> map:list){
            String id = map.get("id").toString();
            List<BaseDailyReportUploadDO> dailyReportUploadDOS = dailyReportUploadDao.selectDailyReportByDoctorAndDate(id,DateUtil.getStringDateShort(),DateUtil.getStringDateShort());
            if (dailyReportUploadDOS!=null&&dailyReportUploadDOS.size()!=0){
                BaseDailyReportUploadDO dailyReportUploadDO = dailyReportUploadDOS.get(0);
                List<BaseDailyReportDetailDO> detailDOList = reportDetailDao.findByReportId(dailyReportUploadDO.getId());
                List<BaseDailyReportLogDO> reportLogDOS = dailyReportLogDao.findByReportId(dailyReportUploadDO.getId());
                dailyReportUploadDO.setDailyReportLogDOList(reportLogDOS);
                dailyReportUploadDO.setDetailDOList(detailDOList);
                String verifiedName = "";
                if ("1".equals(dailyReportUploadDO.getState())) {
                    verifiedName = "已核实";
                } else {
                    verifiedName = "未核实";
                }
                map.put("verifiedName",verifiedName);
                map.put("reportUploadDO",dailyReportUploadDO);
            }else {
                map.put("reportUploadDO",null);
            }
        }
        if (list != null && list.size() > 0 && StringUtils.isNotBlank(doctorCode)) {
            //排序
            for (int i = 0; i < list.size(); i++) {
                String id = (String) list.get(i).get("id");
                if (doctorCode.equals(id)) {
                    Collections.swap(list, 0, i);
                }
            }
        }
        return list;
    }
    /**
     *
     * @param orgCode
     * @param dept
     * @param doctorCode
     * @param key
     * @param flag 是否核实1是0否
     * @return
     */
    public List<Map<String, Object>> findDoctorByHospitalAndDeptHeshi(String doctor,String orgCode, String dept, String doctorCode,String key, Integer flag) {
        String sql = "SELECT " +
                " d.id AS \"id\", " +
                " d.photo AS \"photo\", " +
                " d.name AS \"name\", " +
                " d.expertise AS \"expertise\"," +
                " d.introduce AS \"introduce\"," +
                " d.job_title_code AS \"jobTitleCode\", " +
                " d.job_title_name AS \"jobTitleName\"," +
                " d.charge_type AS \"chargeType\"," +
                " d.outpatient_type AS \"outpatientType\"," +
                " d.consult_status AS \"consultStatus\"," +
                " h.dept_code AS \"deptCode\","+
                " h.dept_name AS \"deptName\","+
                " h.org_code AS \"orgCode\","+
                " h.org_name AS \"orgName\","+
                " t.photo AS \"hosptialphoto\","+
                " d.id_type AS \"idType\","+
                " d.id_card_type AS \"idCardType\" "+
                " FROM " +
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
                " left join base_org t on t.id = h.org_code" +
                " WHERE  " +
                " 1=1 and d.del=1 and d.identity=0 ";
        if (StringUtils.isNotBlank(dept)) {
            sql += " AND h.dept_code = '" + dept + "'";
        }
        if (StringUtils.isNoneBlank(doctor)){
            WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("dailyHeshiConfig");
            String buffer = "";
            if (hospitalSysDictDO!=null){
                JSONArray array = JSONArray.parseArray(hospitalSysDictDO.getDictValue());
                for (int i=0;i<array.size();i++){
                    JSONObject object = array.getJSONObject(i);
                    String header = object.getString("header");
                    if (header.equalsIgnoreCase(doctor)){
                        JSONArray jsonArray = object.getJSONArray("data");
                        for (int j=0;j<jsonArray.size();j++){
                            String str = jsonArray.getString(j);
                            buffer +="'"+str+"',";
                        }
                        buffer =buffer.substring(0,buffer.length()-1);
                    }
                }
            }
            if (StringUtils.isNoneBlank(buffer)){
                sql += " and d.id IN ("+buffer+")";
            }
        }
        if (StringUtils.isNotBlank(orgCode)) {
            sql += " AND h.org_code = '" + orgCode + "'";
        }
@ -1014,6 +1306,8 @@ public class DailyReportUploadService {
            if (dailyReportUploadDOS!=null&&dailyReportUploadDOS.size()!=0){
                BaseDailyReportUploadDO dailyReportUploadDO = dailyReportUploadDOS.get(0);
                List<BaseDailyReportDetailDO> detailDOList = reportDetailDao.findByReportId(dailyReportUploadDO.getId());
                List<BaseDailyReportLogDO> reportLogDOS = dailyReportLogDao.findByReportId(dailyReportUploadDO.getId());
                dailyReportUploadDO.setDailyReportLogDOList(reportLogDOS);
                dailyReportUploadDO.setDetailDOList(detailDOList);
                String verifiedName = "";
                if ("1".equals(dailyReportUploadDO.getState())) {
@ -1060,7 +1354,7 @@ public class DailyReportUploadService {
            endDate = DateUtil.getLastDayOfMonth();
        }
        String day = DateUtil.getTwoDay(endDate, startDate);
        String doctorSql = " select COUNT(1) as 'total' from base_doctor d where d.del=1 ";
        String doctorSql = " select COUNT(1) as 'total' from base_doctor d where d.del=1 and d.identity=0  ";
        Integer total = 0;//总人次
        String sqlCondition = "";
        if (level==2){
@ -1174,7 +1468,7 @@ public class DailyReportUploadService {
        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 ";
        String doctorSql = " select COUNT(1) as \"total\" from base_doctor d where d.del=1 and d.identity=0 ";
        Integer total = 0;//总人次
        String sql = "select COUNT(DISTINCT d.id) as \"total\" from base_doctor_daily_report_upload d inner join base_daily_report_detail de " +
                " on d.id = de.report_id where 1=1 ";
@ -1184,7 +1478,7 @@ public class DailyReportUploadService {
        }
        String idTypeCondition = " ";
        if (StringUtils.isNoneBlank(idType)) {
            idTypeCondition += "  (select d1.id from base_doctor d1 where 1=1 and d1.id_type = '" + idType + "')";
            idTypeCondition += "  (select d1.id from base_doctor d1 where 1=1 and  d1.identity=0 and d1.id_type = '" + idType + "')";
        }
        if (StringUtils.isNoneBlank(deptCondition)) {
            doctorSql += " and d.id IN " + deptCondition;

+ 10 - 0
business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java

@ -1191,6 +1191,14 @@ public class HealthCareService {
        data.put("trauma_sign",ylzMedicalRelationDO.getTraumaSign());//外伤标志0 否,1 是
        data.put("date", DateUtil.dateToStrFormatLong(ylzMedicalRelationDO.getDate()));//实际门诊/入院日期 若为空,默认取系统时间
        data.put("data_source",ylzMedicalRelationDO.getDataSource());//数据来源
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outpatientId);
        if (outpatientDO!=null){
            BaseDoctorDO doctorDO = doctorDao.findById(outpatientDO.getDoctor());
            if (doctorDO!=null){
                data.put("atddr_no",doctorDO.getAtddrNo());
                data.put("dr_name",doctorDO.getName());
            }
        }
        String result = requestYlz(data,funid,"医保挂号");
        if (result==null){
            throw new Exception("上传医保挂号失败!");
@ -1535,9 +1543,11 @@ public class HealthCareService {
                ylzMedicalRelationDO.setJtgjPay(jsonObject.getString("jtgj_pay"));
                ylzMedicalRelationDO.setCollector(jsonObject.getString("collector"));
                Double price= Double.parseDouble(ylzMedicalRelationDO.getTcjjPay())+Double.parseDouble(ylzMedicalRelationDO.getSbjjPay())+
                        Double.parseDouble(ylzMedicalRelationDO.getGwyPay())+
                        Double.parseDouble(ylzMedicalRelationDO.getJzfpPay())+Double.parseDouble(ylzMedicalRelationDO.getYljzPay())+
                        Double.parseDouble(ylzMedicalRelationDO.getOtherPay())+Double.parseDouble(ylzMedicalRelationDO.getEnterpriseSupplement());
                ylzMedicalRelationDO.setMedicalPrice(price+"");
                logger.info("meidicalPrice====="+price);
                ylzMedicalRelationDO = ylzMedicailRelationDao.save(ylzMedicalRelationDO);
                JSONArray jsonArray = jsonObject.getJSONArray("fplist");
                for (int i=0;i<jsonArray.size();i++){

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

@ -23,6 +23,7 @@ import com.yihu.jw.entity.base.area.BaseDrugStoreDO;
import com.yihu.jw.entity.base.dict.BaseJobCategoryDO;
import com.yihu.jw.entity.base.dict.DictDeptDescDO;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.entity.base.dict.DictIcd10DO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.im.ConsultTeamDo;
@ -94,6 +95,7 @@ import com.yihu.jw.restmodel.web.*;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.rm.iot.IotRequestMapping;
import com.yihu.jw.sms.dao.BaseSmsTemplateDao;
import com.yihu.jw.sms.service.ZhongShanSMSService;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.common.LatitudeUtils;
import com.yihu.jw.util.date.DateUtil;
@ -336,6 +338,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private HcyyEntranceService hcyyEntranceService;
    @Autowired
    private BasePatientMedicareCardDao patientMedicareCardDao;
    @Autowired
    private ZhongShanSMSService zhongShanSMSService;
    @Autowired
    private BaseDictIcd10Dao dictIcd10Dao;
    public static String entranceUrl = "http://172.16.100.240:10023/xzzx/";
@ -2526,8 +2532,38 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     * @throws Exception
     */
    public JSONArray getICD10(String pyKey) throws Exception {
        return entranceService.MS25001(pyKey, demoFlag);
    public List<Map<String,Object>> getICD10(String pyKey) throws Exception {
        String sql = "select code,name,py_code,d_code from dict_icd10 where 1=1 ";
        if (StringUtils.isNoneBlank(pyKey)){
            sql += " and (py_code like '%"+pyKey+"%' or name like '%"+pyKey+"%') ";
        }
        List<Map<String,Object>> mapList = jdbcTemplate.queryForList(sql);
        return mapList;
   /*     return entranceService.MS25001(pyKey,demoFlag);*/
    }
    public String synIcd10() throws Exception {
        JSONArray array = entranceService.MS25001(null,demoFlag);
        int j = 0;
        dictIcd10Dao.deleteAll();
        for (int i=0;i<array.size();i++){
            JSONObject object = array.getJSONObject(i);
            String code = object.getString("code");
            String name = object.getString("name");
            String py_code  =object.getString("py_code");
            String d_code = object.getString("d_code");
            DictIcd10DO icd10DO = new DictIcd10DO();
            icd10DO.setCode(code);
            icd10DO.setName(name);
            icd10DO.setPy_code(py_code);
            icd10DO.setD_code(d_code);
            icd10DO.setIs_del("1");
            icd10DO.setStatus("1");
            dictIcd10Dao.save(icd10DO);
            j++;
        }
        return j+"";
    }
    /**
@ -8253,7 +8289,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    sfJsonObject.put("d_provinceName", sfexpress_obj.getProvinceName());
                    sfJsonObject.put("d_cityName", sfexpress_obj.getCityName());
                    sfJsonObject.put("d_townName", sfexpress_obj.getTownName());
                    sfJsonObject.put("d_address", sfexpress_obj.getAddress());
                    sfJsonObject.put("d_address",sfexpress_obj.getStreetName()+sfexpress_obj.getAddress());
                    sfJsonObject.put("d_phone", sfexpress_obj.getMobile());
                    sfJsonObject.put("express_type", 11);
                    sfJsonObject.put("pay_method", 2);
@ -8644,6 +8680,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        saveInquirySystemMessage(outpatient,null);
                    }
                    msg="图文咨询";
                } else if("3".equals(outpatient.getType())){
                    systemMessageDO.setTitle("家医咨询");
                    systemMessageDO.setType("15");
@ -8690,6 +8727,23 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        saveInquirySystemMessage(outpatient,null);
                    }
                    msg="图文复诊";
                    if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
                        BaseDoctorDO doctorDO = baseDoctorDao.findById(outpatient.getDoctor());
                        if (doctorDO!=null){
                            if (StringUtils.isNoneBlank(doctorDO.getMobile())){
                                String content = doctorDO.getName()+"医生,患者"+outpatient.getPatientName()+"向您发起了图文问诊,请您及时打开企业微信,进入在线诊疗查看!";
                                int i= zhongShanSMSService.ZhongShangSendSMS(doctorDO.getMobile(),content);
                                WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
                                wlyyHttpLogDO.setDoctor(outpatient.getDoctor());
                                wlyyHttpLogDO.setRequest("");
                                wlyyHttpLogDO.setName(content);
                                wlyyHttpLogDO.setCode(outpatient.getId());
                                wlyyHttpLogDO.setCreateTime(new Date());
                                wlyyHttpLogDO.setResponse(i+"");
                                wlyyHttpLogDao.save(wlyyHttpLogDO);
                            }
                        }
                    }
                } else {
                    systemMessageDO.setTitle("视频复诊预约成功");
                    systemMessageDO.setType("2");

+ 13 - 5
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java

@ -822,6 +822,14 @@ public class EntranceService {
            if (StringUtils.isNotBlank(win_no)) {
                sbs.append("<query compy=\"=\" item=\"win_no\" splice=\"and\" value=\"'" + win_no + "'\"/>");
            }
          /*  if (StringUtils.isNotBlank(drugname)) {
                //用默认字符编码解码字符串。
                byte[] bs = drugname.getBytes();
                //用新的字符编码生成字符串
                drugname = new String(bs, "iso-8859-1");
                logger.info("drugname=" + drugname);
                sbs.append("<query compy=\"=\" item=\"drugname\" splice=\"and\" value=\"'" + drugname + "'\"/>");
            }*/
            if (StringUtils.isNotBlank(groupNo)) {
                String groups[] = groupNo.split(",");
                String inSql = "";
@ -1417,7 +1425,7 @@ public class EntranceService {
     * @return
     * @throws Exception
     */
    public JSONArray MS25001(String py_code, boolean demoFlag) throws Exception {
    public JSONArray MS25001(String py_code,boolean demoFlag) throws Exception {
        String fid = "MS25001";
        String resp = "";
        if (demoFlag) {
@ -3264,7 +3272,7 @@ public class EntranceService {
                                ylzMedicalMxDO.setHisDeptCode(resultJSON.getString("ksbm00"));
                                ylzMedicalMxDO.setHisDeptName(resultJSON.getString("ghksmc"));
                                ylzMedicalMxDO.setMedicalPerName(resultJSON.getString("ysxm00"));
                                ylzMedicalMxDO.setMedicalPerId(baseDoctorDO.getIdcard());
                                ylzMedicalMxDO.setMedicalPerId(baseDoctorDO.getAtddrNo());
                                ylzMedicalMxDO.setLimitType(mxObject.getString("sfybxm"));
                                ylzMedicalMxDO.setActgDate(DateUtil.strToYmdDateLong(mxObject.getString("xmrq00")+" "+mxObject.getString("xmsj00")));
                                ylzMedicalMxDO.setHisItemName(mxObject.getString("xmmc00"));
@ -3302,7 +3310,7 @@ public class EntranceService {
                                    ylzMedicalMxDO.setHisDeptCode(resultJSON.getString("ksbm00"));
                                    ylzMedicalMxDO.setHisDeptName(resultJSON.getString("ghksmc"));
                                    ylzMedicalMxDO.setMedicalPerName(resultJSON.getString("ysxm00"));
                                    ylzMedicalMxDO.setMedicalPerId(baseDoctorDO.getIdcard());
                                    ylzMedicalMxDO.setMedicalPerId(baseDoctorDO.getAtddrNo());
                                    ylzMedicalMxDO.setLimitType(mxObject.getString("sfybxm"));
                                    ylzMedicalMxDO.setActgDate(DateUtil.strToYmdDateLong(mxObject.getString("xmrq00")+" "+mxObject.getString("xmsj00")));
                                    ylzMedicalMxDO.setHisItemName(mxObject.getString("xmmc00"));
@ -3430,7 +3438,7 @@ public class EntranceService {
                                ylzMedicalMxDO.setHisDeptCode(resultJSON.getString("ksbm00"));
                                ylzMedicalMxDO.setHisDeptName(resultJSON.getString("ghksmc"));
                                ylzMedicalMxDO.setMedicalPerName(resultJSON.getString("ysxm00"));
                                ylzMedicalMxDO.setMedicalPerId(baseDoctorDO.getIdcard());
                                ylzMedicalMxDO.setMedicalPerId(baseDoctorDO.getAtddrNo());
                                ylzMedicalMxDO.setLimitType(mxObject.getString("sfybxm"));
                                ylzMedicalMxDO.setActgDate(DateUtil.strToYmdDateLong(mxObject.getString("xmrq00")+" "+mxObject.getString("xmsj00")));
                                ylzMedicalMxDO.setHisItemName(mxObject.getString("xmmc00"));
@ -3468,7 +3476,7 @@ public class EntranceService {
                                    ylzMedicalMxDO.setHisDeptCode(resultJSON.getString("ksbm00"));
                                    ylzMedicalMxDO.setHisDeptName(resultJSON.getString("ghksmc"));
                                    ylzMedicalMxDO.setMedicalPerName(resultJSON.getString("ysxm00"));
                                    ylzMedicalMxDO.setMedicalPerId(baseDoctorDO.getIdcard());
                                    ylzMedicalMxDO.setMedicalPerId(baseDoctorDO.getAtddrNo());
                                    if (mxObject.getString("xmbh00").equalsIgnoreCase("XA11GAW043A001010202251")){
                                        ylzMedicalMxDO.setLimitType("N");
                                    }else {

+ 4 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -69,6 +69,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.io.IOException;
import java.io.StringReader;
import java.math.BigDecimal;
import java.net.URL;
import java.net.URLEncoder;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.*;
@ -2745,7 +2747,6 @@ public class XzzxEntranceService{
    /**
     * 2.1.1获取患者结算信息
     * @param icCardNo 社会保障卡号
     * @param his_serial HIS挂号号
     * @param org_code 医院编码
     * @return
     */
@ -3632,7 +3633,7 @@ public class XzzxEntranceService{
     */
    public JSONArray selectIcd10Dict(String spellCode) throws Exception {
        String response="";
        String url = entranceUrl+"getICD10Dict?spellCode="+spellCode;
        String url = entranceUrl+"getICD10Dict?spellCode="+ URLEncoder.encode(spellCode);
        response = httpClientUtil.get(url,"GBK");
        JSONObject object = JSONObject.parseObject(response);
        JSONArray jsonArray = new JSONArray();
@ -3665,7 +3666,7 @@ public class XzzxEntranceService{
     */
    public JSONArray selectDrugDict(String spellCode,String drugNo) throws Exception {
        String response="";
        String url = entranceUrl+"getDrugDict?spellCode="+spellCode+"&drugNo="+drugNo;
        String url = entranceUrl+"getDrugDict?spellCode="+URLEncoder.encode(spellCode)+"&drugNo="+drugNo;
        response = httpClientUtil.get(url,"GBK");
        JSONObject object = JSONObject.parseObject(response);
        JSONArray jsonArray = new JSONArray();

+ 12 - 10
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -1574,7 +1574,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                       if (outpatientDO.getType().equalsIgnoreCase("1")){
                           title = "图文复诊";
                           type="9";
                           msg = name+"("+sex+" "+age+"岁)向您发起了图文复诊,点击查看";
                           msg = name+"("+sex+" "+age+"岁)向您发起了图文复诊,请您及时接诊!";
                       }else if (outpatientDO.getType().equalsIgnoreCase("2")){
                           title = "视频复诊";
                           type="16";
@ -1813,7 +1813,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            if (StringUtils.isNoneBlank(businessOrderDO.getDoctor())){
                BaseDoctorDO doctorDO = doctorDao.findById(businessOrderDO.getDoctor());
                String fee = null;
                if (wechatId.equalsIgnoreCase("xm_zsyy_wx")||wechatId.equalsIgnoreCase("xm_xzzx_wx")){
                if (wechatId.equalsIgnoreCase("xm_zsyy_wx")||wechatId.equalsIgnoreCase("xm_xzzx_wx")||wechatId.equalsIgnoreCase("xm_hcyy_wx")){
                    if (wlyyOutpatientDO!=null){
                        if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
                            WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getTwfzChargeType(),"6");
@ -2194,9 +2194,9 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if (StringUtils.isNoneBlank(startTime)){
            if("xm_ykyy_wx".equals(wechatId)){
                if (flag){
                    sql+=" and t.create_time > '" + startTime + "'";
                    sql+=" and t.update_time > '" + startTime + "'";
                }else {
                    sql+=" and t.create_time > to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                    sql+=" and t.update_time > to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                }
            }else{
                sql+=" and t.create_time > '" + startTime + "'";
@ -2205,9 +2205,9 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if (StringUtils.isNoneBlank(endTime)){
            if("xm_ykyy_wx".equals(wechatId)){
                if (flag){
                    sql+=" and t.create_time <= '" + endTime + "'";
                    sql+=" and t.update_time <= '" + endTime + "'";
                }else {
                    sql+=" and t.create_time <= to_date('" + endTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                    sql+=" and t.update_time <= to_date('" + endTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                }
            }else{
                sql+=" and t.create_time <= '" + endTime + "'";
@ -2258,11 +2258,13 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                    WlyyOutpatientDO outpatientDO = outpatientDao.findById(relationCode);
                    map.put("doctorName",outpatientDO.getDoctorName());
                    map.put("consumerName",outpatientDO.getConsumerName());
                    map.put("patientName",outpatientDO.getPatientName());
                }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());
                    map.put("patientName",outpatientDO.getPatientName());
                }
            }
        }
@ -2314,9 +2316,9 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if (StringUtils.isNoneBlank(startTime)){
            if("xm_ykyy_wx".equals(wechatId)){
                if (flag){
                    sql+=" and t.create_time > '" + startTime + "'";
                    sql+=" and t.update_time > '" + startTime + "'";
                }else {
                    sql+=" and t.create_time > to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                    sql+=" and t.update_time > to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                }
            }else{
                sql+=" and t.create_time > '" + startTime + "'";
@ -2325,9 +2327,9 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if (StringUtils.isNoneBlank(endTime)){
            if("xm_ykyy_wx".equals(wechatId)){
                if (flag){
                    sql+=" and t.create_time <= '" + endTime + "'";
                    sql+=" and t.update_time <= '" + endTime + "'";
                }else {
                    sql+=" and t.create_time <= to_date('" + endTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                    sql+=" and t.update_time <= to_date('" + endTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                }
            }else{
                sql+=" and t.create_time <= '" + endTime + "'";

+ 4 - 0
business/base-service/src/main/java/com/yihu/jw/order/pay/ylz/YlzPayService.java

@ -409,6 +409,7 @@ public class YlzPayService {
            String onepayUrl = oauthYlzConfigDO.getUrl();
            String signType=oauthYlzConfigDO.getSignType();
            String encryptType = oauthYlzConfigDO.getEncType();
            String wxMinId = oauthYlzConfigDO.getWxMinId();
            HisOnepayClient onepayClient = new HisOnepayClient(onepayUrl, appId, appSecret, signType, encryptType);
            param.setOperatorId(operatorId);
            param.setOperatorName(operatorName);
@ -424,6 +425,9 @@ public class YlzPayService {
            if(StringUtils.isNoneBlank(openId)){
                extra.put("openId",openId);
            }
            if (depositType.equalsIgnoreCase("WX_MIN")){
                extra.put("wxMinId",wxMinId);
            }
		/*	String value = systemDictDao.findByDictNameAndCode("RETURN_URL","RETURN_URL");

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

@ -4077,7 +4077,7 @@ public class ImService {
                "op.source as \"source\"  ," +
                "op.card_no as \"cardNo\"  ," +
                "op.medical_state as \"medicalState\"  ," +
                "bop.status as \"payStatus\" ," +
                "bop.status as \"payStatus1\" ," +
                "op.patient_cancel_value as \"patientCancelValue\" ," +
                "op.patient_cancel_remark as \"patient_cancel_remark\"  " +
                "FROM wlyy_outpatient op LEFT JOIN wlyy_consult a  ON a.relation_code = op.id \n" +

+ 20 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorDO.java

@ -306,6 +306,26 @@ public class BaseDoctorDO extends UuidIdentityEntityWithOperator {
    private Integer mark;//数据导出权限   1是 0否
    private String atddrNo;//国码
    private String identity;//身份1是总经理,0是员工
    public String getIdentity() {
        return identity;
    }
    public void setIdentity(String identity) {
        this.identity = identity;
    }
    public String getAtddrNo() {
        return atddrNo;
    }
    public void setAtddrNo(String atddrNo) {
        this.atddrNo = atddrNo;
    }
    public Integer getMark() {
        return mark;
    }

+ 73 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/dailyReport/BaseDailyReportLogDO.java

@ -0,0 +1,73 @@
package com.yihu.jw.entity.dailyReport;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by Bing on 2022/7/25.
 * 日报操作日志
 */
@Entity
@Table(name="base_daily_report_log")
public class BaseDailyReportLogDO extends UuidIdentityEntityWithOperator {
    private String reportId;//每日日报id
    private String operateUser;//操作人
    private String operateUserName;//操作人名字
    private Integer type;//类型
    private String typeName;//1日报提交2上级核实未存疑3上级核实存疑4存疑核实
    private String content;//操作内容
    public String getReportId() {
        return reportId;
    }
    public void setReportId(String reportId) {
        this.reportId = reportId;
    }
    public String getOperateUser() {
        return operateUser;
    }
    public void setOperateUser(String operateUser) {
        this.operateUser = operateUser;
    }
    public String getOperateUserName() {
        return operateUserName;
    }
    public void setOperateUserName(String operateUserName) {
        this.operateUserName = operateUserName;
    }
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    public String getTypeName() {
        return typeName;
    }
    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
}

+ 20 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/dailyReport/BaseDailyReportUploadDO.java

@ -22,9 +22,29 @@ public class BaseDailyReportUploadDO extends UuidIdentityEntityWithOperator {
    private Integer leaveState;//请假状态0未请假1请假
    private String leaveHour;//请假时长
    private String reportDate; //上报日期
    private String totalHour;//上报时长
    public String getTotalHour() {
        return totalHour;
    }
    public void setTotalHour(String totalHour) {
        this.totalHour = totalHour;
    }
    private List<BaseDailyReportDetailDO> detailDOList;
    private List<BaseDailyReportLogDO> dailyReportLogDOList;
    @Transient
    public List<BaseDailyReportLogDO> getDailyReportLogDOList() {
        return dailyReportLogDOList;
    }
    public void setDailyReportLogDOList(List<BaseDailyReportLogDO> dailyReportLogDOList) {
        this.dailyReportLogDOList = dailyReportLogDOList;
    }
    public String getDoctorId() {
        return doctorId;
    }

+ 8 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/ylzinfo/OauthYlzConfigDO.java

@ -24,7 +24,15 @@ public class OauthYlzConfigDO extends UuidIdentityEntity {
    private String privateKey;
//    @Column(name = "ehc_public_key")
    private String ehcPublicKey;
    private String wxMinId;
    public String getWxMinId() {
        return wxMinId;
    }
    public void setWxMinId(String wxMinId) {
        this.wxMinId = wxMinId;
    }
    public String getAppId() {
        return appId;

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

@ -131,6 +131,7 @@ public class BasicZuulFilter extends ZuulFilter {
        //内部微服务有不需要认证的地址请在URL上追加/open/来进行过滤,如/api/v1.0/open/**,不要在此继续追加!!!
        if (url.contains("/auth/")//验证服务
                || url.contains("/authgw/")//验证服务
                || url.contains("/authygTest/")//验证服务
                || url.contains("/base/wechat")//微信
                || url.contains("/patient/wxBase/")//微信
                || url.contains("/patient/wx/")//微信页面不拦截

+ 13 - 1
gateway/ag-basic/src/main/resources/application.yml

@ -369,4 +369,16 @@ spring:
  redis:
     host: 10.95.22.142
     port: 6380
     password: jkzlehr
     password: jkzlehr
---
spring:
  profiles: mlwProd
  datasource:
     url: jdbc:mysql://10.172.0.61:3306/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true&useSSL=false
     username: root
     password: 4D^tK%!4
  redis:
     host: 10.172.0.61
     port: 6379
     password: Kb6wKDQP1W4

+ 7 - 0
gateway/ag-basic/src/main/resources/bootstrap.yml

@ -193,6 +193,13 @@ spring:
    config:
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: mlwProd
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:

+ 1 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/dao/doctor/BaseDoctorDao.java

@ -24,7 +24,7 @@ import java.util.List;
public interface BaseDoctorDao extends PagingAndSortingRepository<BaseDoctorDO, String>, JpaSpecificationExecutor<BaseDoctorDO>  {
    @Modifying
    @Query("UPDATE BaseDoctorDO SET idcard = CONCAT(idcard,'-'),password = CONCAT(password,'-'), mobile = CONCAT(mobile,'-')   WHERE id = ?1")
    @Query("UPDATE BaseDoctorDO SET idcard = CONCAT(idcard,'-'),password = CONCAT(password,'-'), mobile = CONCAT(mobile,'-'),id = concat(id,'-')   WHERE id = ?1")
    void logOff(String id);
    BaseDoctorDO findById(String id);

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

@ -55,6 +55,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.http.*;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
@ -178,6 +180,8 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
    private HcyyService hcyyService;
    @Autowired
    private BaseSmsDao baseSmsDao;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @PostConstruct
    private void init() {
@ -255,13 +259,17 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
    }
    @PostMapping(value = "/doctor/logOff")
    @PostMapping(value = "/oauth/doctor/logOff")
    public JSONObject doctorLogOff(HttpServletRequest request){
        JSONObject jsonObject = new JSONObject();
        try {
            String userAgent = request.getHeader("userAgent");
            org.json.JSONObject json = new org.json.JSONObject(userAgent);
            userDetailsService.logOff(json.getString("uid"));
            BaseLoginLogDO loginLogDO = getLoginLog();
            if(loginLogDO == null){
                jsonObject.put("msg","该操作没有权限");
                jsonObject.put("status",200);
                return jsonObject;
            }
            userDetailsService.logOff(loginLogDO.getUserId());
            jsonObject.put("msg","注销成功");
            jsonObject.put("status",200);
            return jsonObject;
@ -273,6 +281,28 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        }
    }
    public HttpServletRequest getRequest(){
        return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
    }
    private BaseLoginLogDO getLoginLog(){
        String accessToken = this.extractToken(getRequest());
        String sql  = "SELECT a.* from base_login_log a WHERE a.token='"+accessToken+"' ORDER BY a.create_time desc LIMIT 1";
        List<BaseLoginLogDO> baseLoginLogDOList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(BaseLoginLogDO.class));
        //BaseLoginLogDO loginLogDO = baseLoginLogDao.findByToken(accessToken);
        return baseLoginLogDOList.size()>0?baseLoginLogDOList.get(0):null;
    }
    private String extractToken(HttpServletRequest request) {
        String accessToken = request.getHeader("token");
        if (null == accessToken) {
            accessToken = request.getParameter("token");
        }
        return accessToken;
    }
    /**
     * 登陆
     *

+ 35 - 0
server/svr-authentication/src/main/resources/application.yml

@ -718,6 +718,41 @@ testPattern:
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段
im:
  im_list_get: http://172.26.0.105:3000/
kick:
  ##互踢 1开通 0关闭
  eachOther: 0
---
spring:
  profiles: mlwProd
  datasource:
    url: jdbc:mysql://127.0.0.1:3306/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true&useSSL=false
    username: root
    password: 4D^tK%!4
  redis:
    host: 127.0.0.1 # Redis server host.
    port: 6379 # Redis server port.
    password: Kb6wKDQP1W4
## i健康用户信息接口,开放出来给互联网医院登录同步用户信息用
iHealth:
  user-info-uri: http://ehr.yihu.com/wlyy/iHealth/userInfo
zhongshanHospital:
  user-info-uri: http://laptop-u738dn2p:10023/mqsdk/getUserInfoByOpenid
fastDFS:
  fastdfs_file_url: http://172.26.0.110:8888/
wlyy:
  url: http://www.xmtyw.cn/wlyy/
#文件服务器上传配置 0本地,1.I健康,2.内网调用
testPattern:
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream
wechat:
  id: xm_mlwyy_wx  # base库中,wx_wechat 的id字段
im:
  im_list_get: http://172.26.0.105:3000/
kick:

+ 8 - 0
server/svr-authentication/src/main/resources/bootstrap.yml

@ -190,6 +190,14 @@ spring:
---
spring:
  profiles: ZjxlProd
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: mlwProd
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}

+ 14 - 0
server/svr-configuration/src/main/resources/bootstrap.yml

@ -267,3 +267,17 @@ spring:
        native:
          search-locations: /usr/local/wlyy2.0.config
---
spring:
  profiles: mlwProd
##git配置
  cloud:
    config:
      failFast: true #启动快速失败 即链接不到配置服务就启动失败
      server:
        git:
          uri: ${wlyy.spring.config.git.uri:http://127.0.0.1:3001/jkzl/wlyy2.0.config.git}
          basedir: /usr/local/wlyy2.0-config
          username: jkzl
          password: jkzl
        default-label: ${wlyy.spring.config.git.label:master}

+ 47 - 0
svr/svr-base/src/main/resources/application.yml

@ -944,3 +944,50 @@ testPattern:
im:
  im_list_get: http://172.26.0.105:3000/
---
spring:
  profiles: mlwProd
  datasource:
    url: jdbc:mysql://10.172.0.61:3306/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true&useSSL=false
    username: root
    password: 4D^tK%!4
  elasticsearch:
    cluster-name: jkzl #集群名 默认elasticsearch
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    client-transport-sniff: false
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.
  activemq:
    broker-url: tcp://172.19.103.87:61616
    user: admin
    password: admin
  redis:
    host: 10.172.0.61 # Redis server host.
    port: 6379
    password: Kb6wKDQP1W4 # Redis server port.
fastDFS:
  fastdfs_file_url: http://10.172.0.61:80/
demo:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
wlyy:
  url: http://ehr.yihu.com/wlyy/
wechat:
  id: hz_yyyzh_wx
  url: https://zhyzh.gongshu.gov.cn/
  flag: false
pay:
  flag: false
#文件服务器上传配置 0本地,1.I健康,2.内网调用
testPattern:
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream
im:
  im_list_get: http://172.26.0.105:3000/

+ 8 - 0
svr/svr-base/src/main/resources/bootstrap.yml

@ -156,4 +156,12 @@ spring:
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: mlwProd
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/message/PatientMessageService.java

@ -155,7 +155,7 @@ public class PatientMessageService {
        if (!StringUtils.isNotBlank(type)) {
            type = "41,42,991,992,993,994,995,996,999";
        }
        String sql = "SELECT id,type,title,sender_name,DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%S') create_time,is_read,data,content,audio_url " +
        String sql = "SELECT id,type,title,sender_name,DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%S') create_time,is_read,data,content,audio_url as audioUrl " +
                " FROM base_system_message WHERE type IN ("+type+") and receiver = '"+patient+"'" +
                " AND del = 1  ORDER BY create_time DESC ";
        return  jdbcTemplate.queryForList(sql);

+ 2 - 3
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/DeviceUploadService.java

@ -28,7 +28,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
@ -172,7 +171,7 @@ public class DeviceUploadService {
                    String onOff= jdbcTemplate.queryForObject(adminSql,String.class);
                    Boolean kg = Boolean.parseBoolean(onOff);
                    String patientOnOffSql = "select on_off from base_patient_pad_pushonoff where patient = '" + patientDO.getId() + "' and type = 3";
                    Integer integer = jdbcTemplate.queryForObject(patientOnOffSql, new BeanPropertyRowMapper<>(Integer.class));
                    Integer integer = jdbcTemplate.queryForObject(patientOnOffSql,Integer.class);
                    if (kg&&integer==0?false:true) {
                        messageDO.setTitle(typeName);
                        messageDO.setType("42");//42体征设备测量
@ -199,7 +198,7 @@ public class DeviceUploadService {
                        messageDO.setCreateTime(new Date());
                        //推送socket
                        com.alibaba.fastjson.JSONObject message = new com.alibaba.fastjson.JSONObject();
                        message.put("title", typeName2);
                        message.put("title", typeName);
                        message.put("code", messageDO.getCode());
                        message.put("content", messageDO.getData());
                        message.put("relation_code", messageDO.getRelationCode());

+ 1 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java

@ -325,6 +325,7 @@ public class PatientDeviceService {
                    patients.put("patient",map.get("id"));
                    patients.put("name",map.get("name"));
                    patients.put("sex",map.get("sex"));
                    patients.put("device_sn",map.get("device_sn").toString());
                    rslist.add(patients);
                }
                Thread.sleep(1000);

+ 2 - 4
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/util/DeviceLostMessageUtil.java

@ -174,12 +174,10 @@ public class DeviceLostMessageUtil {
        List<Map<String,Object>> patientList = jdbcTemplate.queryForList(sql);
        System.out.println(devices);
        //所有居民的设备
        for (Map<String, Object> patient : patientList) {
            String deviceSns = patient.get("deviceSn").toString();
            String[] deviceSplit = deviceSns.split(",");
            System.out.println(patient.get("id"));
            String deivceName = "";
            String deviceSnS = "";
            for (String deviceSn : deviceSplit) {
@ -191,7 +189,6 @@ public class DeviceLostMessageUtil {
                            systemMessageDao.delete(sendMessageBefore);
                        }
                        String deviceInfoSql = "SELECT device_sn,device_name,category_code FROM wlyy_patient_device WHERE device_sn = '"+offLineDeviceSn+"'";
                        System.out.println("SN吗 "+offLineDeviceSn);
                        List<DevicePatientDevice> query = jdbcTemplate.query(deviceInfoSql, new BeanPropertyRowMapper<>(DevicePatientDevice.class));
                        if (StringUtils.isNotBlank(deivceName)){
                            deivceName+=","+query.get(0).getDeviceName();
@ -286,7 +283,8 @@ public class DeviceLostMessageUtil {
            message.put("type","991");
            message.put("content",contentTwo);
            message.put("audioUrl",s);
            message.put("content_type",999);
            message.put("deviceSn",jsonObject.getString("device_sn"));
            message.put("content_type",991);
            imUtil.sendPatientSystemMessage(jsonObject.getString("patient"), JSON.toJSONString(message, SerializerFeature.WriteMapNullValue));
        }
        if (messageDOS.size() > 0) {

+ 3 - 1
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/MqSdkController.java

@ -236,9 +236,11 @@ public class MqSdkController extends EnvelopRestEndpoint {
    @ApiOperation(value = "Icd10诊断编码")
    public ListEnvelop MS25001( @ApiParam(name = "pyCode", value = "拼音码")
                           @RequestParam(value = "pyCode", required = false) String pyCode,
                                @ApiParam(name = "name", value = "诊断名称")
                                @RequestParam(value = "name", required = false) String name,
                                @ApiParam(name = "flag", value = "1为旧的ICD10 3为ICD9 4为2012-8月份ICD10")
                                @RequestParam(value = "flag", required = false) String flag)throws Exception {
        JSONArray obj = entranceService.MS25001(pyCode,demoFlag);
        JSONArray obj = entranceService.MS25001(pyCode,name,demoFlag);
        return success(obj);
    }

+ 2 - 2
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/RemindDoctorService.java

@ -81,7 +81,7 @@ public class RemindDoctorService {
                            systemMessageDO.setTitle("图文咨询接诊消息提醒");
                            systemMessageDO.setType("68");
                            title = "图文咨询消息提醒";
                            msg = wlyyOutpatientDO.getPatientName()+"("+sex+" "+age+"岁)向您发起了图文咨询,已等待"+minusts+"分钟。点击接诊";
                            msg = wlyyOutpatientDO.getPatientName()+"("+sex+" "+age+"岁)向您发起了图文咨询,已等待"+minusts+"分钟。请您及时点击接诊";
                        } else if ("3".equals(wlyyOutpatientDO.getType())) {
                            systemMessageDO.setTitle("家医咨询接诊消息提醒");
                            systemMessageDO.setType("65");
@ -98,7 +98,7 @@ public class RemindDoctorService {
                            systemMessageDO.setTitle("图文复诊接诊消息提醒");
                            systemMessageDO.setType("61");
                            title = "图文复诊接诊消息提醒";
                            msg = wlyyOutpatientDO.getPatientName()+"("+sex+" "+age+"岁)向您发起了图文复诊,已等待"+minusts+"分钟。点击接诊";
                            msg = wlyyOutpatientDO.getPatientName()+"("+sex+" "+age+"岁)向您发起了图文复诊,已等待"+minusts+"分钟。请您及时点击接诊";
                        } else {
                            systemMessageDO.setTitle("视频复诊接诊消息提醒");
                            systemMessageDO.setType("62");

+ 39 - 0
svr/svr-internet-hospital-job/src/main/resources/application.yml

@ -466,5 +466,44 @@ express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
jobs:
  schedule: 0 */1 * * * ?
---
spring:
  profiles: mlwProd
  datasource:
    url: jdbc:mysql://10.172.0.61:3306/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: root
    password: 4D^tK%!4
hlwyyEntrance:
  url: http://localhost:10023
demo:
  flag: true
pay:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.26.0.105:3000/
  data_base_name: im_internet_hospital
fastDFS:
  fastdfs_file_url: http://10.172.0.61:8888/
wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: xm_zjxl_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  ids: xm_zjxl_wx
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
jobs:
  schedule: 0 */1 * * * ?

+ 9 - 0
svr/svr-internet-hospital-job/src/main/resources/bootstrap.yml

@ -75,3 +75,12 @@ spring:
    config:
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: mlwProd
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}

+ 47 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/dailyReport/DailyReportUploadPoint.java

@ -114,6 +114,8 @@ public class DailyReportUploadPoint extends EnvelopRestEndpoint {
                                        @RequestParam(value = "leaveHour", required = false,defaultValue = "0") String leaveHour,
                                        @ApiParam(name = "week_name", value = "星期一...")
                                        @RequestParam(value = "week_name", required = true) String week_name,
                                        @ApiParam(name = "totalHour", value = "上报时长")
                                            @RequestParam(value = "totalHour", required = false) String totalHour,
                                        @ApiParam(name = "jsonData", value = "事项信息实体")
                                        @RequestParam(value = "jsonData", required = true) String jsonData) {
        try {
@ -121,7 +123,7 @@ public class DailyReportUploadPoint extends EnvelopRestEndpoint {
            if (StringUtils.isNoneBlank(jsonData)){
                healthUploadDOs = JSONArray.parseArray(jsonData,BaseDailyReportDetailDO.class);
            }
            BaseDailyReportUploadDO dailyReport = dailyReportUploadService.createDailyReport(doctorId,report_date,leaveState,leaveHour,week_name,healthUploadDOs);
            BaseDailyReportUploadDO dailyReport = dailyReportUploadService.createDailyReport(doctorId,report_date,leaveState,leaveHour,week_name,totalHour,healthUploadDOs);
            return success(dailyReport);
        } catch (Exception e) {
            return failedObjEnvelopException(e);
@ -287,6 +289,29 @@ public class DailyReportUploadPoint extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = "selectHeaderListHeshi")
    @ApiOperation(value = "首页按照科室统计")
    public ListEnvelop selectHeaderListHeshi(@ApiParam(name = "dept", value = "科室code")
                                        @RequestParam(value = "dept", required = false) String dept,
                                             @ApiParam(name = "doctor", value = "当前用户")
                                             @RequestParam(value = "doctor", required = false) String doctor,
                                        @ApiParam(name = "idType", value = "身份类别")
                                        @RequestParam(value = "idType", required = false) String idType,
                                        @ApiParam(name = "state", value = "核实状态0未核实1已核实")
                                        @RequestParam(value = "state", required = false) String state,
                                        @ApiParam(name = "startDate", value = "开始时间")
                                        @RequestParam(value = "startDate", required = false) String startDate,
                                        @ApiParam(name = "endDate", value = "结束时间")
                                        @RequestParam(value = "endDate", required = false) String endDate,
                                        @ApiParam(name = "name", value = "姓名")
                                        @RequestParam(value = "name", required = false) String name) {
        try {
            return success(dailyReportUploadService.selectHeaderListHeshi(doctor,dept,idType,state,startDate,endDate,name));
        } catch (Exception e) {
            return failedListEnvelopException(e);
        }
    }
    @GetMapping(value = "selectListByTotal")
    @ApiOperation(value = "获取列表的时间及数量")
    public ListEnvelop selectListByTotal(@ApiParam(name = "dept", value = "科室code")
@ -384,6 +409,27 @@ public class DailyReportUploadPoint extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = "findDoctorByHospitalAndDeptHeshi")
    @ApiOperation(value = "查询部门下医生", notes = "查询部门下医生")
    public ListEnvelop findDoctorByHospitalAndDeptHeshi(@ApiParam(name = "orgCode", value = "机构code")
                                                   @RequestParam(value = "orgCode", required = false) String orgCode,
                                                        @ApiParam(name = "doctor", value = "当前账户")
                                                        @RequestParam(value = "doctor", required = false) String doctor,
                                                   @ApiParam(name = "dept", value = "部门code")
                                                   @RequestParam(value = "dept", required = false) String dept,
                                                   @ApiParam(name = "doctorCode", value = "需要置顶医生")
                                                   @RequestParam(value = "doctorCode", required = false) String doctorCode,
                                                   @ApiParam(name = "key", value = "关键字搜索,医生名字/科室名称/专长")
                                                   @RequestParam(value = "key", required = false) String key,
                                                   @ApiParam(name = "flag", value = "是否核实0未核实1已核实")
                                                   @RequestParam(value = "flag", required = false) Integer flag) {
        try {
            return success(dailyReportUploadService.findDoctorByHospitalAndDeptHeshi(doctor,orgCode, dept, doctorCode, key, flag));
        } catch (Exception e) {
            return failedListEnvelopException(e);
        }
    }
    @GetMapping(value = "selectIndexTotalCircle")
    @ApiOperation(value = "首页上报分析", notes = "首页上报分析")
    public Envelop selectIndexTotalCircle(@ApiParam(name = "flag", value = "1周2月")

+ 6 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -641,6 +641,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = "synIcd10")
    @ApiOperation(value = "同步icd10", notes = "同步icd10")
    public Envelop synIcd10() throws Exception {
        return success(prescriptionService.synIcd10());
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getDrugDictionary)
    @ApiOperation(value = "获取药品字典", notes = "获取药品字典")
    public ListEnvelop getDrugDictionary(@ApiParam(name = "drugNo", value = "药品编码")

+ 5 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/QrcodeService.java

@ -451,7 +451,11 @@ public class QrcodeService {
                }
            }else if("xm_xzzx_wx".equals(wxId)){
                token = xzzxEntranceService.getXzToken();
                objEnvelop.setStatus(200);
                com.alibaba.fastjson.JSONObject jsonObject = new com.alibaba.fastjson.JSONObject();
                jsonObject.put("nickname","nickname");
                objEnvelop.setMessage(jsonObject.toString());
                return objEnvelop;
            }else{
                token = wxAccessTokenService.getWxAccessTokenById(wxId).getAccessToken();
            }

+ 89 - 0
svr/svr-internet-hospital/src/main/resources/application.yml

@ -1297,3 +1297,92 @@ express:
  sf_code: HD000001
  sf_check_word: AAAABBBBCCCCDDDD
---
spring:
  profiles: mlwProd
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true&useSSL=false
    username: root
    password: 4D^tK%!4
  #  elasticsearch:
  #    cluster-name: jkzl #集群名 默认elasticsearch
  #    cluster-nodes: 172.26.0.115:9300,172.26.0.115:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
  #    client-transport-sniff: false
  #    jest:
  #      uris: http://172.26.0.112:9200,http://172.26.0.112:9200
  #      connection-timeout: 60000 # Connection timeout in milliseconds.
  #      multi-threaded: true # Enable connection requests from multiple execution threads.
  activemq:
    broker-url: tcp://172.26.0.116:61616
    user: admin
    password: admin
  redis:
    host: 127.0.0.1 # Redis server host.
    port: 6379 # Redis server port.
    password: Kb6wKDQP1W4
fastDFS:
  fastdfs_file_url: http://127.0.0.1:8888/
fast-dfs:
  tracker-server: 127.0.0.1:22122 #服务器地址
wechat:
  id: xm_zjxl_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
myFamily:
  qrCodeFailurTime: 2
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: true
#支付支付
pay:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.26.0.105:3000/
  data_base_name: im_internet_hospital
es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_test
  type:
    Statistics: hlw_quota_test
  host:  http://172.26.0.55:9000
  tHost: 172.26.0.55:9300
  clusterName: jkzl
  securityUser: lion:jkzlehr
  user: lion
  password: jkzlehr
# 上传文件临时路径配置
FileTempPath:
  upload_temp_path : /var/local/temp
  image_path : /var/local/upload/images
  voice_path : /var/local/upload/voice
  chat_file_path : /var/local/upload/chat
#文件服务器上传配置 0本地,1.I健康,2.内网调用
testPattern:
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream
wlyy:
  url: http://ehr.yihu.com/wlyy/
qywx:
  url: 2
  id: 1
express:
  sf_url: http://mrds-admin-ci.sit.sf-express.com:45478
  sf_code: HD000001
  sf_check_word: AAAABBBBCCCCDDDD

+ 9 - 1
svr/svr-internet-hospital/src/main/resources/bootstrap.yml

@ -1,6 +1,6 @@
spring:
  application:
    name:  svr-internet-hospital-wangzhinan
    name:  svr-internet-hospital
  cloud:
    config:
      failFast: true
@ -125,6 +125,14 @@ spring:
---
spring:
  profiles: ZjxlProd
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: mlwProd
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}