Browse Source

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

liubing 4 years ago
parent
commit
94a62ad749
24 changed files with 575 additions and 171 deletions
  1. 3 0
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/PrescriptionDao.java
  2. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  3. 8 2
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/TnPrescriptionService.java
  4. 20 4
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/TnyyEntranceService.java
  5. 20 0
      business/base-service/src/main/java/com/yihu/jw/order/pay/ylz/YlzPayService.java
  6. 87 12
      business/es-service/src/main/java/com/yihu/jw/es/util/ElasticsearchUtil.java
  7. 0 0
      common/common-entity/sql记录
  8. 3 3
      common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java
  9. 8 6
      common/common-entity/src/main/java/com/yihu/jw/entity/door/WlyyDoorServiceOrderDO.java
  10. 21 5
      svr/svr-door-serivce/sql/初始sql.sql
  11. 29 0
      svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/common/EntranceController.java
  12. 17 2
      svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/doctor/DoctorController.java
  13. 5 7
      svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/doctor/DoorOrderController.java
  14. 85 0
      svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/patient/DoorCommentController.java
  15. 101 0
      svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorCommentService.java
  16. 32 74
      svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorOrderService.java
  17. 38 17
      svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/WlyyDoorServiceOrderService.java
  18. 57 14
      svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/common/PatientService.java
  19. 12 6
      svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/common/ServerPackageService.java
  20. 6 5
      svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/statics/DoorStatisticAnalyzeService.java
  21. 6 4
      svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/statics/StatisticsUtilService.java
  22. 7 7
      svr/svr-door-serivce/src/main/resources/application.yml
  23. 8 1
      svr/svr-door-serivce/src/main/resources/bootstrap.yml
  24. 1 1
      svr/svr-door-serivce/src/main/resources/conclusion.mht

+ 3 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/PrescriptionDao.java

@ -1,5 +1,6 @@
package com.yihu.jw.hospital.prescription.dao;
import com.yihu.jw.entity.door.WlyyDoorPrescriptionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
@ -63,4 +64,6 @@ public interface PrescriptionDao extends PagingAndSortingRepository<WlyyPrescrip
    @Query("select a from WlyyPrescriptionDO a where a.createTime>?1 and  a.createTime <?2 and a.status <30 and a.status>=0")
    List<WlyyPrescriptionDO> findListByCheckStatus(Date startTime,Date endTime);
    @Query("select a from WlyyPrescriptionDO a,WlyyDoorPrescriptionDO p where a.id=p.code and p.orderId = ?1 and p.isAfterDoor = ?2  order by a.createTime desc")
    List<WlyyPrescriptionDO> findByOrderIdAndIsAfterDoor(String id, Integer isAfterDoor);
}

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

@ -9574,7 +9574,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    /**
     * 小程序生成签名
     * 腾讯视频生成签名
     * @param userId
     * @return
     */

+ 8 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/TnPrescriptionService.java

@ -493,7 +493,12 @@ public class TnPrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pr
            object.put("charge_code",map.get("YPXH"));
            object.put("drugname",map.get("YPMC"));
            object.put("specification",map.get("YPGG"));
            object.put("pack_unit_name",map.get("JLDW"));
            object.put("pack_unit_name",map.get("YPDW"));
            object.put("mini_unit",map.get("UNITCODE"));
            object.put("mini_unit_name",map.get("UNITCODENAME"));
            object.put("weigh_unit_name",map.get("ZXDW"));
            object.put("weigh_unit",map.get("ZXDW"));
            object.put("pack_unit",map.get("YPDW"));
            object.put("yfdw",map.get("YFDW"));
            object.put("pack_size",map.get("YFBZ"));
         /*   object.put("yfsx",map.get("yfsx"));//药房属性*/
@ -510,6 +515,7 @@ public class TnPrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pr
            object.put("ypcd",map.get("YPCD"));//产地
            object.put("zfpb",map.get("ZFPB"));//作废判别
            object.put("jbywbz",map.get("jbywbz"));//基本药物标志
            object.put("pack_retprice",map.get("BZLJ"));
            if (map.get("XTSB")!=null){
                if (map.getString("XTSB").equalsIgnoreCase("1")){
                    object.put("group_no",81);
@ -539,7 +545,7 @@ public class TnPrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pr
        for (int i=0;i<mapList.size();i++){
            JSONObject map = mapList.getJSONObject(i);
            JSONObject object = new JSONObject();
            object.put("supply_code",map.get("YPYF"));
            object.put("supply_code",map.get("YPYF")+"");
            object.put("supply_name",map.get("XMMC"));
            object.put("ypyf",map.get("YPYF"));
            array.add(object);

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

@ -21,14 +21,11 @@ import com.yihu.jw.restmodel.hospital.prescription.*;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.utils.network.HttpResponse;
import com.yihu.utils.network.HttpUtils;
import com.yihu.utils.security.MD5;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.signature.qual.IdentifierOrArray;
import org.checkerframework.checker.units.qual.A;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -269,7 +266,7 @@ public class TnyyEntranceService {
    public JSONArray findTnYpxx(String ypdm,String ypmc,String kusl,String pydm ,String hisCode) throws Exception {
        String sql ="SELECT yp.YPXH,yp.XTSB,yp.YPMC,yp.YPGG,yp.YFGG,yp.BFGG,yp.YPSX,yp.TSYP,yp.YPDW,yp.ZXDW,yp.ZXBZ,yp.YFBZ,yp.YFDW,yp.BFBZ," +
                "yp.BFDW,yp.ZFPB,yp.YLXZ,yp.FYFS,yp.PYDM,yp.YPBH,yp.MESS,yp.GYFF,yp.TYPE,yp.YPDM,yp.YPJL,yp.JLDW,yp.YKZF,yp.YFZF,yp.ZXCD,yp.YCYL," +
                "kc.YPCD,kc.LSJG,kc.KCSL  FROM  YK_TYPK yp,YK_KCMX kc where 1=1 and kc.YPXH=yp.YPXH ";
                "kc.YPCD,kc.LSJG,kc.KCSL,kc.BZLJ,yp.UNITCODE,yp.UNITCODENAME  FROM  YK_TYPK yp,YK_KCMX kc where 1=1 and kc.YPXH=yp.YPXH ";
        if (StringUtils.isNoneBlank(ypdm)){
            sql+=" and lower(YPDM) like '%"+ypdm.toLowerCase()+"%' ";
        }
@ -779,6 +776,25 @@ public class TnyyEntranceService {
        return new JSONArray();
    }
    /**
     * 上门服务项目
     * @return
     * @throws Exception
     */
    public JSONArray findGY_YLSF() throws Exception{
        String sql = "SELECT * from GY_YLSF h";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("findGY_YLSF:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if(status!=null&&status == 200){
            return rs.getJSONArray("detailModelList");
        }
        return new JSONArray();
    }
    /**
     * 获取健康档案住院记录

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

@ -23,6 +23,8 @@ import org.springframework.stereotype.Service;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Map;
@ -414,9 +416,15 @@ public class YlzPayService {
            if(StringUtils.isNoneBlank(openId)){
                extra.put("openId",openId);
            }
		/*	String value = systemDictDao.findByDictNameAndCode("RETURN_URL","RETURN_URL");
			extra.put("returnUrl",value);*/
            extra.put("notifyUrl", notifyUrl);
            if (depositType.equalsIgnoreCase("WX_WAP")){
                extra.put("spbill_create_ip",getServerIp());
                extra.put("returnUrl","https://www1.yanketong.com");
            }
            param.setExtra(extra);
            ResponseParams<RechargeResult> respnse = onepayClient.recharge(param);
            if (respnse.getRespCode().equals("000000")){
@ -440,6 +448,18 @@ public class YlzPayService {
        logService.saveHttpLog(isSuccess, "hop.trade.recharge", "互联网预交金充值", "POST", null,JSON.toJSONString(param), jsonObject, error,logService.shoppatType);
        return jsonObject;
    }
    /**
     * 获取服务器ip地址
     *
     * @return
     * @throws UnknownHostException
     */
    public String getServerIp() throws UnknownHostException {
        InetAddress address = InetAddress.getLocalHost();//获取的是本地的IP地址 //PC-20140317PXKX/192.168.0.121
        String hostAddress = address.getHostAddress();//192.168.0.121
        return hostAddress;
    }
    /**
     *
     * 预交金退款

+ 87 - 12
business/es-service/src/main/java/com/yihu/jw/es/util/ElasticsearchUtil.java

@ -352,7 +352,7 @@ public class ElasticsearchUtil {
//        sql.append(" quotaCode='" + index + "'  ");
        sql.append(" quotaCode in(" + index + ")  ");
        sql.append(" and timeLevel='" + timeLevel + "'  ");
        sql.append(" and areaLevel='6'");
//        sql.append(" and areaLevel='6'");
        if (StringUtils.isNotEmpty(startDate)) {
            sql.append(" and quotaDate>='" + startDate + "'");
        }
@ -803,7 +803,7 @@ public class ElasticsearchUtil {
        }
        sql.append(" quotaCode in(" + index + ")  ");
        sql.append(" and timeLevel='" + timeLevel + "'  ");
        sql.append(" and areaLevel='6'");
//        sql.append(" and areaLevel='6'");
        if (StringUtils.isNotEmpty(startDate)) {
            sql.append(" and quotaDate>='" + startDate + "'");
        }
@ -842,6 +842,7 @@ public class ElasticsearchUtil {
            }
        }
        sql.append(groupBy);
        logger.info("sql :" + sql.toString());
        return excute(sql.toString(), SaveModel.class, "", "");
    }
@ -1757,7 +1758,22 @@ public class ElasticsearchUtil {
        return returnModels;
    }
    public List findDateQuotaWithoutLevel(String startDate, String endDate, String index, String slaveKey) throws Exception {
    /**
     * 将slaveKey1作为筛选条件而不进行group by
     *
     * @param startDate 开始时间
     * @param endDate   结束时间
     * @param area      区域code
     * @param level     等级
     * @param index     指标
     * @param timeLevel 1增量 2到达量
     * @param interval  1日 2周 3月
     * @param lowLevel  下一级区域等级
     * @return
     * @throws Exception
     */
    public List findDateQuotaLevel0BySlaveKey1(String startDate, String endDate, String area, int level, String index, String timeLevel, String interval, String lowLevel, String slaveKey1) throws Exception {
        //时间格式转换  yyyy-MM-dd转成 2017-07-17T00:00:00+0800
        if (StringUtils.isNotEmpty(startDate)) {
            if (startDate.length() > 10) {
@ -1773,17 +1789,76 @@ public class ElasticsearchUtil {
                endDate = changeDate(endDate);
            }
        }
        StringBuffer sql = new StringBuffer();
        StringBuffer groupBy = new StringBuffer();
        String low_level = level + "";
        if (StringUtils.isNotEmpty(lowLevel)) {
            low_level = lowLevel;
        }
        StringBuffer sb = new StringBuffer();
        sb.append("select sum(result1) as result1,sum(result2) as result2 from ").append(esIndex)
                .append(" where city='350200' and quotaCode in(").append(index)
                .append(") and timeLevel='1' and areaLevel='6' and quotaDate>='").append(startDate).append("' ");
        sb.append("and quotaDate<='").append(endDate).append("'");
        if (StringUtils.isNotEmpty(slaveKey)) {
            sb.append(" and slaveKey1='").append(slaveKey).append("'");
        if (SaveModel.deptLevel.equals(low_level)) {
            sql.append("select dept,deptName,sum(result1) result1, sum(result2) result2 from " + esIndex + " where ");
            groupBy.append("  group by dept,deptName");
        } else if (SaveModel.OrgLevel.equals(low_level)) {
            sql.append("select hospital,hospitalName,sum(result1) result1,sum(result2) result2 from " + esIndex + " where ");
            groupBy.append("  group by hospital,hospitalName");
        } else if (SaveModel.townLevel.equals(low_level)) {
            sql.append("select town,townName,sum(result1) result1,sum(result2) result2 from " + esIndex + " where ");
            groupBy.append("  group by town,townName");
        } else if (SaveModel.cityLevel.equals(low_level)) {
            sql.append("select city,cityName,sum(result1) result1,sum(result2) result2 from " + esIndex + " where ");
            groupBy.append("  group by city,cityName");
        }else if (SaveModel.doctorLevel.equals(low_level)) {
            sql.append("select doctor,doctorName,sum(result1) result1,sum(result2) result2 from " + esIndex + " where ");
            groupBy.append("  group by doctor,doctorName ");
        }
        sb.append(" group by town,townName,hospital,hospitalName order by town,townName, hospital,hospitalName");
        return excute(sb.toString(), SaveModel.class, "", "");
        if (StringUtils.isNotEmpty(area)) {
            if (SaveModel.deptLevel.equals(level + "")) {
                sql.append(" dept='" + area + "'");
            } else if (SaveModel.OrgLevel.equals(level + "")) {
                sql.append(" hospital='" + area + "'");
            } else if (SaveModel.townLevel.equals(level + "")) {
                sql.append(" town='" + area + "'");
            } else if (SaveModel.cityLevel.equals(level + "")) {
                sql.append(" city='" + area + "'");
            }else if (SaveModel.doctorLevel.equals(level + "")) {
                sql.append(" doctor='" + area + "'");
            }
            sql.append(" and ");
        }
//        sql.append(" quotaCode='" + index + "'  ");
        sql.append(" quotaCode in(" + index + ")  ");
        sql.append(" and timeLevel='" + timeLevel + "'  ");
//        sql.append(" and areaLevel='5'");
        if (StringUtils.isNotEmpty(startDate)) {
            sql.append(" and quotaDate>='" + startDate + "'");
        }
        if (StringUtils.isNotEmpty(endDate)) {
            sql.append(" and quotaDate<='" + endDate + "'");
        }
        if (StringUtils.isNotEmpty(slaveKey1) && !commonParams.equals(slaveKey1)) {
            String[] temp = slaveKey1.split(",");
            String slaveKey1Temp = "";
            for(String one : temp){
                slaveKey1Temp += ",'"+one+"'";
            }
            sql.append(" and slaveKey1 in ("+slaveKey1Temp.substring(1)+")");
        }
        //根据时间维度分组
        if (StringUtils.isNotEmpty(interval)) {
            if (SaveModel.interval_month.equals(interval)) {
                groupBy.append(" ,date_histogram(field='quotaDate','interval'='month','time_zone'='+08:00','alias'='quotaDate') ");
            } else if (SaveModel.interval_week.equals(interval)) {
                groupBy.append(" ,date_histogram(field='quotaDate','interval'='week','time_zone'='+08:00','alias'='quotaDate') ");
            } else if (SaveModel.interval_day.equals(interval)) {
                groupBy.append(" ,date_histogram(field='quotaDate','interval'='1d','time_zone'='+08:00','alias'='quotaDate') ");
            }
        }
        sql.append(groupBy);
        return excute(sql.toString(), SaveModel.class, "", "");
    }
}

+ 0 - 0
common/common-entity/sql记录


+ 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;

+ 8 - 6
common/common-entity/src/main/java/com/yihu/jw/entity/door/WlyyDoorServiceOrderDO.java

@ -2,6 +2,7 @@ package com.yihu.jw.entity.door;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -548,8 +549,8 @@ public class WlyyDoorServiceOrderDO extends UuidIdentityEntityWithOperator {
    private String serviceStatus;//服务类型 1-预约项目 2-即时项目
    private String orderInfo;//工单详情 0-未推送 1-未确认 2-已确认
    private List<WlyyDoorPrescriptionDO> prescriptionDOList;//上门前开的方
    private List<WlyyDoorPrescriptionDO> afterPrescriptionList;//上门后开的方
    private List<WlyyPrescriptionDO> prescriptionDOList;//上门前开的方
    private List<WlyyPrescriptionDO> afterPrescriptionList;//上门后开的方
    /**
     * 快捷类型,1是快捷类型,其他值不是
@ -557,20 +558,20 @@ public class WlyyDoorServiceOrderDO extends UuidIdentityEntityWithOperator {
    private String shortcutType;
    @Transient
    public List<WlyyDoorPrescriptionDO> getPrescriptionDOList() {
    public List<WlyyPrescriptionDO> getPrescriptionDOList() {
        return prescriptionDOList;
    }
    public void setPrescriptionDOList(List<WlyyDoorPrescriptionDO> prescriptionDOList) {
    public void setPrescriptionDOList(List<WlyyPrescriptionDO> prescriptionDOList) {
        this.prescriptionDOList = prescriptionDOList;
    }
    @Transient
    public List<WlyyDoorPrescriptionDO> getAfterPrescriptionList() {
    public List<WlyyPrescriptionDO> getAfterPrescriptionList() {
        return afterPrescriptionList;
    }
    public void setAfterPrescriptionList(List<WlyyDoorPrescriptionDO> afterPrescriptionList) {
    public void setAfterPrescriptionList(List<WlyyPrescriptionDO> afterPrescriptionList) {
        this.afterPrescriptionList = afterPrescriptionList;
    }
@ -1181,4 +1182,5 @@ public class WlyyDoorServiceOrderDO extends UuidIdentityEntityWithOperator {
    public void setShortcutType(String shortcutType) {
        this.shortcutType = shortcutType;
    }
}

+ 21 - 5
svr/svr-door-serivce/sql/初始sql.sql

@ -460,6 +460,7 @@ CREATE TABLE `wlyy_door_service_order` (
  `prescription_status` int(1) DEFAULT NULL COMMENT '开方状态:1已完成,0未开方',
  `prescription_code` varchar(100) DEFAULT NULL COMMENT '处方单号,多个用逗号隔开',
  `prescription_time` timestamp NULL DEFAULT NULL COMMENT '开方完成时间',
  `outpatient_id` varchar(50) DEFAULT NULL COMMENT '关联门诊记录',
  `type` tinyint(2) DEFAULT '1' COMMENT '发起类型(1本人发起 2家人待预约 3医生代预约)',
  `authorize_image` varchar(500) DEFAULT NULL COMMENT '电子健康卡授权图片',
  `relation_code` varchar(50) DEFAULT NULL COMMENT '业务关联',
@ -615,11 +616,26 @@ INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('9', NULL, 'PROFESSIONAL_STATE', '8', '1', '无职业', '9', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('10', NULL, 'door_service_subject_class_dict', '4', '4', '检验费', '1', '上门服务项类型');
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('11', NULL, 'door_service_subject_class_dict', '28', '28', '检查费', '2', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('12', NULL, 'door_service_subject_class_dict', '89', '89', '护理费', '3', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('13', NULL, 'door_service_subject_class_dict', '148', '148', '推拿', '4', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('14', NULL, 'door_service_subject_class_dict', '149', '149', '针灸', '5', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('10', NULL, 'door_service_subject_class_dict', '4', '4', '检验费', '2', '上门服务项类型');
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('11', NULL, 'door_service_subject_class_dict', '28', '28', '检查费', '3', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('12', NULL, 'door_service_subject_class_dict', '89', '89', '护理费', '4', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('13', NULL, 'door_service_subject_class_dict', '148', '148', '推拿', '5', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('14', NULL, 'door_service_subject_class_dict', '149', '149', '针灸', '6', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('15', NULL, 'door_service_subject_class_dict', 'door', 'door', '上门护理', '1', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('16', NULL, 'door_service_door_dict', 'door_1', '0', '置/安插胃管', '1', '上门护理');
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('17', NULL, 'door_service_door_dict', 'door_2', '0', '更换尿管', '2', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('18', NULL, 'door_service_door_dict', 'door_3', '0', '黄体酮注射', '3', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('19', NULL, 'door_service_door_dict', 'door_4', '0', '采血', '4', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('20', NULL, 'door_service_door_dict', 'door_5', '0', '压疮护理', '5', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('21', NULL, 'door_service_door_dict', 'door_6', '0', '开奶/催乳/积奶/发汗', '6', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('22', NULL, 'door_service_door_dict', 'door_7', '0', '肌肉皮下注射/皮内注射', '7', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('23', NULL, 'door_service_door_dict', 'door_8', '0', '膀胱冲洗', '8', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('24', NULL, 'door_service_door_dict', 'door_9', '0', 'PICC护理', '9', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('25', NULL, 'door_service_door_dict', 'door_10', '0', '外科拆线', '10', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('26', NULL, 'door_service_door_dict', 'door_11', '0', '口腔护理', '11', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('27', NULL, 'door_service_door_dict', 'door_12', '0', '伤口换药', '12', NULL);
INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('28', NULL, 'door_service_door_dict', 'door_13', '0', '陪诊/陪检', '13', NULL);
CREATE TABLE `wlyy_doctor_quick_reply` (

+ 29 - 0
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/common/EntranceController.java

@ -0,0 +1,29 @@
package com.yihu.jw.door.controller.common;
import com.yihu.jw.hospital.prescription.service.entrance.TnyyEntranceService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by yeshijie on 2021/1/6.
 */
@RestController
@RequestMapping(value = "entrance")
@Api(value = "内网数据查询", description = "内网数据查询", tags = {"内网数据查询"})
public class EntranceController extends EnvelopRestEndpoint {
    @Autowired
    private TnyyEntranceService tnyyEntranceService;
    @GetMapping(value = "findGY_YLSF")
    @ApiOperation(value = "查询上门服务项目")
    public Envelop findGY_YLSF() throws Exception {
        return success(tnyyEntranceService.findGY_YLSF());
    }
}

+ 17 - 2
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/doctor/DoctorController.java

@ -4,8 +4,8 @@ import com.alibaba.fastjson.JSON;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
import com.yihu.jw.door.controller.BaseController;
import com.yihu.jw.door.service.common.WlyyMessageService;
import com.yihu.jw.door.service.common.PatientService;
import com.yihu.jw.door.service.common.WlyyMessageService;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
 * Created by yeshijie on 2020/12/30.
@ -80,7 +81,21 @@ public class DoctorController extends BaseController {
        }
    }
    @GetMapping(value = "/patientList")
    @ApiOperation("查询居民列表信息")
    public String patientList(
        @ApiParam(name = "name", value = "分页大小", required = false) @RequestParam(value = "name", required = false) String name,
        @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1") @RequestParam(value = "page") int page,
        @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15") @RequestParam(value = "size") int size
        ) {
        try {
            List<Map<String,Object>> p = patientService.patientList(name,page,size);
            return write(200, "查询成功", "data", p);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "查询失败");
        }
    }
    /**
     * 查询居民信息

+ 5 - 7
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/doctor/DoorOrderController.java

@ -25,10 +25,6 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@ -442,7 +438,7 @@ public class DoorOrderController extends BaseController {
            @ApiParam(value = "服务机构", name = "hospitalCode",required = false)
            @RequestParam(value = "hospitalCode", required = false) String hospitalCode,
            @ApiParam(value = "工单状态", name = "status",required = false)
            @RequestParam(value = "status", required = false) Integer status,
            @RequestParam(value = "status", required = false) Integer[] status,
            @ApiParam(value = "创建时间开始,格式(yyyy-MM-dd mm:dd:ss)", name = "createTimeStart",required = false)
            @RequestParam(value = "createTimeStart", required = false) String createTimeStart,
            @ApiParam(value = "创建时间结束,格式(yyyy-MM-dd mm:dd:ss)", name = "createTimeEnd",required = false)
@ -522,10 +518,12 @@ public class DoorOrderController extends BaseController {
            @RequestParam(value = "serverItemName", required = false) String serverItemName,
            @ApiParam(value = "类型", name = "type")
            @RequestParam(value = "type", required = false) String type,
            @ApiParam(value = "医生", name = "doctor")
            @RequestParam(value = "doctor", required = false) String doctor,
            @ApiParam(value = "居民", name = "patient")
            @RequestParam(value = "patient", required = false) String patient) {
        try {
            return write(200, "获取成功","dara",serverPackageService.selectServiceByHospital(hospital,serverItemName,type,patient,getUID()));
            return write(200, "获取成功","dara",serverPackageService.selectServiceByHospital(hospital,serverItemName,type,patient,doctor));
        } catch (Exception e) {
            error(e);
            return error(-1, "获取失败!" + e.getMessage());
@ -1295,7 +1293,7 @@ public class DoorOrderController extends BaseController {
                for (int i=0;i<list.size();i++){
                    list1.add(list.get(i).get("orderId").toString());
                }
                File file = doorOrderService.writeWordFile(list1,response);
                File file = doorOrderService.writeWordFile(list1,response,doctorCode);
                if (file != null) {
                    response.setCharacterEncoding("utf-8");
                    response.setContentType("multipart/form-data");

+ 85 - 0
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/patient/DoorCommentController.java

@ -0,0 +1,85 @@
package com.yihu.jw.door.controller.patient;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.door.controller.BaseController;
import com.yihu.jw.door.service.DoorCommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by wangpeiqiang on 2019/3/16.
 * 居民端-评分接口.
 */
@RestController
@RequestMapping(value = "/patient/door_comment")
@Api(description = "居民端-评分")
public class DoorCommentController extends BaseController {
    @Autowired
    DoorCommentService doorCommentService;
    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ApiOperation(value = "添加居民评分")
    public String add(
            @ApiParam(name = "orderId", value = "工单id", required = true)
            @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(name = "professionalSkill", value = "专业能力", required = false)
            @RequestParam(value = "professionalSkill", required = false) Integer professionalSkill,
            @ApiParam(name = "serveAttitude", value = "服务态度", required = false)
            @RequestParam(value = "serveAttitude", required = false) Integer serveAttitude,
            @ApiParam(name = "serveEfficiency", value = "服务效率", required = false)
            @RequestParam(value = "serveEfficiency", required = false) Integer serveEfficiency,
            @ApiParam(name = "description", value = "服务描述或建议", required = false)
            @RequestParam(value = "description", required = false) String description,
            @ApiParam(name = "isAnonymous", value = "是否匿名", required = false)
            @RequestParam(value = "isAnonymous", required = false) Integer isAnonymous
    ){
        try {
            if(orderId==null){
                return "工单id不能为空";
            }
            String dc = doorCommentService.add(getUID(), orderId, professionalSkill,serveAttitude,serveEfficiency,description,isAnonymous);
            if("-1".equals(dc)){
                return error(-2,"评分失败");
            }
            return write(200,"评分成功","data",dc);
        } catch (Exception e) {
            error(e);
            return error(-1,"评分失败");
        }
    }
    /**
     * 根据医生code查询居民评价详情
     *
     * @return
     */
    @RequestMapping(value = "/commentDetail", method = RequestMethod.GET)
    @ApiOperation("查询居民评价详情")
    public String commentDetail(
            @ApiParam(name = "patient", value = "居民code", required = false)
            @RequestParam(value = "patient", required = false)String patient,
            @ApiParam(name = "orderId", value = "工单id", required = true)
            @RequestParam(value = "orderId", required = true) String orderId
    ){
        try {
            if(StringUtils.isEmpty(patient)){
                patient = getUID();
            }
            JSONObject result = doorCommentService.commentDetail(patient,orderId);
            return write(200, "请求成功!","data",result);
        }catch (Exception e){
            error(e);
            return error(-1, "请求失败");
        }
    }
}

+ 101 - 0
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorCommentService.java

@ -0,0 +1,101 @@
package com.yihu.jw.door.service;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.door.dao.WlyyDoorCommentDao;
import com.yihu.jw.door.dao.WlyyDoorCommentDoctorDao;
import com.yihu.jw.door.dao.WlyyDoorDoctorDao;
import com.yihu.jw.door.dao.WlyyDoorServiceOrderDao;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.door.WlyyDoorCommentDO;
import com.yihu.jw.entity.door.WlyyDoorCommentDoctorDO;
import com.yihu.jw.entity.door.WlyyDoorDoctorDO;
import com.yihu.jw.entity.door.WlyyDoorServiceOrderDO;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
 * Created by wangpeiqiang on 2019/3/16.
 * 居民端-评分
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class DoorCommentService extends BaseJpaService<WlyyDoorCommentDO, WlyyDoorCommentDao> {
    @Autowired
    BasePatientDao patientDao;
    @Autowired
    WlyyDoorCommentDao doorCommentDao;
    @Autowired
    WlyyDoorCommentDoctorDao doorCommentDoctorDao;
    @Autowired
    WlyyDoorServiceOrderDao wlyyDoorServiceOrderDao;
    @Autowired
    WlyyDoorDoctorDao wlyyDoorDoctorDao;
    public String add(String patientCode,String orderId, Integer professionalSkill,Integer serveAttitude,Integer serveEfficiency,String description,Integer isAnonymous){
        BasePatientDO patient =patientDao.findById(patientCode);
        WlyyDoorCommentDO doorComment = new WlyyDoorCommentDO();
        BigDecimal evaluateSplit = BigDecimal.ZERO;
        BigDecimal num = new BigDecimal("3");
        //计算三项评分平均分
        evaluateSplit = evaluateSplit.add(
                (new BigDecimal(professionalSkill).add(new BigDecimal(serveAttitude)).add(new BigDecimal(serveEfficiency))).divide(num,2,BigDecimal.ROUND_HALF_UP)
        );
        doorComment.setOrderId(orderId);
        doorComment.setCode(getCode());
        doorComment.setProfessionalSkill(professionalSkill);
        doorComment.setServeAttitude(serveAttitude);
        doorComment.setServeEfficiency(serveEfficiency);
        doorComment.setEvaluateSplit(evaluateSplit);
        doorComment.setIsAnonymous(isAnonymous);
        doorComment.setDescription(description);
        doorComment.setPatient(patientCode);
        doorComment.setCreateUser(patientCode);
        doorComment.setCreateUserName(patient.getName());
        doorComment.setCreateTime(new Date());
        doorCommentDao.save(doorComment);
        //更新工单状态
        WlyyDoorServiceOrderDO wlyyDoorServiceOrderDO =wlyyDoorServiceOrderDao.findOne(orderId);
        wlyyDoorServiceOrderDO.setStatus(6);
        wlyyDoorServiceOrderDO.setCompleteTime(new Date());
        wlyyDoorServiceOrderDO.setUpdateUser(patientCode);
        wlyyDoorServiceOrderDO.setUpdateUserName(patient.getName());
        wlyyDoorServiceOrderDO.setUpdateTime(new Date());
        wlyyDoorServiceOrderDao.save(wlyyDoorServiceOrderDO);
        List<WlyyDoorDoctorDO> wlyyDoorDoctorDOList =this.wlyyDoorDoctorDao.findByOrderId(orderId);
        for(WlyyDoorDoctorDO wlyyDoorDoctorDO:wlyyDoorDoctorDOList) {
            WlyyDoorCommentDoctorDO doorCommentDoctor = new WlyyDoorCommentDoctorDO();
            doorCommentDoctor.setOrderId(orderId);
            doorCommentDoctor.setCode(getCode());
            doorCommentDoctor.setDoctorCode(wlyyDoorDoctorDO.getDoctor());
            doorCommentDoctor.setProfessionalSkill(professionalSkill);
            doorCommentDoctor.setServeAttitude(serveAttitude);
            doorCommentDoctor.setServeEfficiency(serveEfficiency);
            doorCommentDoctor.setEvaluateSplit(evaluateSplit);
            doorCommentDoctor.setIsAnonymous(isAnonymous);
            doorCommentDoctor.setDescription(description);
            doorCommentDoctor.setPatient(patientCode);
            doorCommentDoctor.setCreateUser(patientCode);
            doorCommentDoctor.setCreateUserName(patient.getName());
            doorCommentDoctor.setCreateTime(new Date());
            doorCommentDoctorDao.save(doorCommentDoctor);
        }
        return"1";
    }
    public JSONObject commentDetail(String patient,String orderId)throws Exception{
        JSONObject result = new JSONObject();
        WlyyDoorCommentDO commentDetail = doorCommentDao.selectCommentDoctor(patient,orderId);
        result.put("commentDetail",commentDetail);
        return result;
    }
}

+ 32 - 74
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorOrderService.java

@ -13,7 +13,9 @@ import com.yihu.jw.entity.base.im.ConsultTeamDo;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.door.*;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.hospital.message.dao.SystemMessageDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.im.dao.ConsultDao;
import com.yihu.jw.im.dao.ConsultTeamDao;
import com.yihu.jw.im.util.ImUtil;
@ -32,7 +34,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
@ -128,6 +129,10 @@ public class DoorOrderService {
    private WlyyDoorCommentDao doorCommentDao;
    @Autowired
    private SystemMessageDao systemMessageDao;
    @Autowired
    private PrescriptionDao prescriptionDao;
    /**
     * 顶部状态栏订单各分类总条数
     * @param doctor
@ -343,8 +348,8 @@ public class DoorOrderService {
        doorServiceOrder.setDoorConclusion(doorConclusion);
        //获取上门前后开方详情
        List<WlyyDoorPrescriptionDO> doorBeforePrescriptionDOList = doorPrescriptionDao.findByOrderIdAndIsAfterDoor(id, 1);
        List<WlyyDoorPrescriptionDO> doorAfterPrescriptionDOList = doorPrescriptionDao.findByOrderIdAndIsAfterDoor(id, 2);
        List<WlyyPrescriptionDO> doorBeforePrescriptionDOList = prescriptionDao.findByOrderIdAndIsAfterDoor(id, 1);
        List<WlyyPrescriptionDO> doorAfterPrescriptionDOList = prescriptionDao.findByOrderIdAndIsAfterDoor(id, 2);
        doorServiceOrder.setPrescriptionDOList(doorBeforePrescriptionDOList);
        doorServiceOrder.setAfterPrescriptionList(doorAfterPrescriptionDOList);
@ -767,7 +772,7 @@ public class DoorOrderService {
    }
    public void doorOrderOutExcel(String orderId,String patientName,String patientPhone,String hospitalCode,
                                  Integer status,String createTimeStart,String createTimeEnd,String serverDoctorName,String doctorCode,Integer examPaperStatus, HttpServletResponse response)throws Exception{
                                  Integer[] status,String createTimeStart,String createTimeEnd,String serverDoctorName,String doctorCode,Integer examPaperStatus, HttpServletResponse response)throws Exception{
        WritableWorkbook book = null;
        OutputStream os = null;
        try {
@ -797,7 +802,7 @@ public class DoorOrderService {
                sql += " and ( o.transed_org_code like '" + hospitalCode + "') ";
            }*/
            if (status != null) {
                sql += " and o.status ='" + status + "'";
                sql += " and o.status in ("+StringUtils.strip(Arrays.toString(status),"[]")+") ";
            }
            if (!StringUtils.isEmpty(createTimeStart)) {
                sql += " and o.create_time >='" + createTimeStart + "'";
@ -1015,8 +1020,7 @@ public class DoorOrderService {
        // 更新记录
        this.setUpdateColumnInfo(one);
        doorServiceOrderDao.save(one);
        // 更新居民签约服务包服务项次数
        this.reduceServiceItemTimes(serverPackagePriceByOrderId(orderId), one.getPatient());
        // 发送微信消息通知--用户评价//·
        BasePatientDO patient = patientInfoService.findById(one.getPatient());
        // 获取微信模板  fwyspf-服务医生评分
@ -1191,13 +1195,6 @@ public class DoorOrderService {
        Map<String, Object> map = new HashMap<>();
        BigDecimal serverPackagePrice = new BigDecimal("0.00");
        BigDecimal cashPrice = new BigDecimal("0.00");
        //获取居民签约服务项及次数
//        SignFamily signFamily = signFamilyDao.findByPatient(patient);
        String sql = "SELECT ip.service_item_code as itemCode, sum(ip.service_times) as times  FROM wlyy_server_package_patient pp , wlyy_server_package_item_patient ip " +
                "where pp.`code` = ip.server_package_patient_code and  pp.patient = '" + patient + "' and pp.hospital = '" + "" + "' and pp.`status` = 1 " +
//                "where pp.`code` = ip.server_package_patient_code and  pp.patient = '" + patient + "' and pp.hospital = '" + signFamily.getHospital() + "' and pp.`status` = 1 " +
                "GROUP BY ip.service_item_code ";
        List<Map<String, Object>> list =jdbcTemplate.query(sql, new BeanPropertyRowMapper(String.class));
        JSONArray jsonArray = JSONArray.parseArray(jsonData);
        for(Object o : jsonArray){
@ -1207,67 +1204,13 @@ public class DoorOrderService {
            String itemCode = jsonObject.getString("itemCode");
            BigDecimal fee = jsonObject.getBigDecimal("fee");
            BigDecimal number = jsonObject.getBigDecimal("number");
            //遍历是否是居民签约的服务项,如果是,看还剩多少次数
            for(Map<String, Object> m : list){
                if((m.get(itemCode) + "").equals(itemCode)){
                    b = true;
                    times = (BigDecimal)map.get("times");
                }
            }
            //判断服务包里面的次数是否够抵扣,不够的仍需支付
            if(b){
                if(times.compareTo(number) > -1) {
                    serverPackagePrice = serverPackagePrice.add(fee.multiply(number));
                }else {
                    //还需另外支付次数
                    BigDecimal t = number.subtract(times);
                    cashPrice = cashPrice.add(fee.multiply(t));
                }
            }else {
                cashPrice = cashPrice.add(fee.multiply(number));
            }
            cashPrice = cashPrice.add(fee.multiply(number));
        }
        map.put("serverPackagePrice", serverPackagePrice);
        map.put("cashPrice", cashPrice);
        return map;
    }
    /**
     * 更新居民签约服务包服务项次数
     * @param itemInfo 格式[{"itemCode":"","fee":"","number":""}]
     * @param patient 居民code
     */
    public void reduceServiceItemTimes(String itemInfo, String patient){
        Map<String, Object> map = new HashMap<>();
        //获取居民签约服务项及次数
//        SignFamily signFamily = signFamilyDao.findByPatient(patient);
        String sql = "SELECT ip.`code`,ip.service_item_code as itemCode, ip.service_times as times  FROM wlyy_server_package_patient pp , wlyy_server_package_item_patient ip " +
//                "where pp.`code` = ip.server_package_patient_code and  pp.patient = '" + patient + "' and pp.hospital = '" + signFamily.getHospital() + "' and pp.`status` = 1 " +
                "where pp.`code` = ip.server_package_patient_code and  pp.patient = '" + patient + "' and pp.hospital = '" + "" + "' and pp.`status` = 1 " +
                "order BY pp.end_time ";
        List<Map<String, Object>> list =jdbcTemplate.query(sql, new BeanPropertyRowMapper(String.class));
        JSONArray jsonArray = JSONArray.parseArray(itemInfo);
        for(Object o : jsonArray) {
            JSONObject jsonObject = (JSONObject) o;
            String itemCode = jsonObject.getString("itemCode");
            Integer number = jsonObject.getInteger("number");
            //遍历是否是居民签约的服务项,如果是,看服务项次数够不够减,不够减的继续遍历其他服务项,够减则跳出循环更新次数
            for (Map<String, Object> m : list) {
                if ((m.get(itemCode) + "").equals(itemCode)) {
                    String itemPatientCode = map.get("code") + "";
                    Integer times = (Integer) map.get("times");
                    if (number <= times) {
//                        serverPackageItemPatientDao.updateTimesByCode(itemPatientCode, times - number);
                        break;
                    } else {
//                        serverPackageItemPatientDao.updateTimesByCode(itemPatientCode, 0);
                        number -= times;
                    }
                }
            }
        }
    }
    /**
     * 获取订单下服务包数量、单价
@ -1450,6 +1393,7 @@ public class DoorOrderService {
        html = html.replace("${diagnosticrecord}", conclusionDO.getDiagnosticRecord() == null ? "" : conclusionDO.getDiagnosticRecord());
        html = html.replace("${examresult}",conclusionDO.getExamResult() == null ? "" : conclusionDO.getExamResult());
        String imgsString = "";
        if(StringUtils.isNotBlank(conclusionDO.getImgs())) {
            String imgs = conclusionDO.getImgs();
            String[] imgsArray;
@ -1551,11 +1495,13 @@ public class DoorOrderService {
    }
    public File writeWordFile(List<String> orderId,HttpServletResponse response) throws Exception {
        String zipFileName = "服务小结";
        long time = System.currentTimeMillis();
        String exportConclusionList = time+"exportList";
        String path = this.getClass().getResource("/").getPath() + exportConclusionList;
    public File writeWordFile(List<String> orderId,HttpServletResponse response,String doctorCode) throws Exception {
        String zipFileName = "service_summary";
        String exportConclusionList = doctorCode+"exportList";
        String path = System.getProperty("user.dir") +"/service_summary/" + exportConclusionList;
        System.out.println("path    :"   +path);
        File file = new File(path);
        // 删除文件夹、文件
        if (file.exists()) {
@ -1586,8 +1532,11 @@ public class DoorOrderService {
//            System.out.println("路径pathName:" + pathName);
//            Document doc = Jsoup.parse(new File(pathName), "UTF-8");
            Document doc = Jsoup.parse(StreamUtil.readResources());
            String html = this.handleData(doc, orderId.get(i));//16
            BufferedWriter bw = new BufferedWriter(new FileWriter(path+"/"+fileName));//创建的文件
            bw.write(html);
            bw.close();
            File zipFile = new File(path.replace(exportConclusionList, "") + zipFileName + ".zip");
@ -1602,6 +1551,15 @@ public class DoorOrderService {
            return null;
        }
    }
    public static void main(String[] args) {
        String str = "file:/data/wlyy2.0/svr-door-service/svr-door-service.jar!/BOOT-INF/classes!/1609894996524exportList/";
        String c2=str.substring(0,str.indexOf("!"));//  !前面的
        String c1=str.substring(str.lastIndexOf("!")+1);//  !後面的
        String cc = c2 + c1 ;
        System.out.println(cc.replace("svr-door-service.jar/",""));
    }
    /**
     * 打包文件夹
     *

+ 38 - 17
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/WlyyDoorServiceOrderService.java

@ -16,7 +16,9 @@ import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.door.*;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.hospital.message.dao.SystemMessageDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.im.dao.ConsultDao;
import com.yihu.jw.im.util.ImUtil;
import com.yihu.jw.org.dao.BaseOrgDao;
@ -169,6 +171,8 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
    private String wxId;
    @Autowired
    private SystemMessageDao systemMessageDao;
    @Autowired
    private PrescriptionDao prescriptionDao;
    /**
     * 上门服务工单服务基本信息
@ -375,7 +379,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
                        totalSubFee = totalSubFee.add(fee);
                    }
                    wlyyDoorFeeDetailService.delete(idStrSet.toArray());
                    totalFee = orderDO.getTotalFee().subtract(totalSubFee);
//                    totalFee = orderDO.getTotalFee().subtract(totalSubFee);
//                    orderDO.setTotalFee(totalFee);
                }
            }
@ -470,7 +474,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
                // 把医生拉入会话,作为其中一个成员
                if(StringUtils.isNoneBlank(sessionId)){
                    imUtill.updateParticipant(sessionId,doorDoctorDO.getDoctor(),null);
                    imUtill.updateParticipantNew(sessionId,doorDoctorDO.getDoctor(),null);
                }
            }
@ -829,12 +833,12 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
            orderDO.setDispatcherName(dispatcherName);
            this.save(orderDO);
            // 先进入会话,再聊天
            imUtill.updateParticipant(sessionId,dispatcher,null);
            imUtill.updateParticipantNew(sessionId,dispatcher,null);
            String noticeContent = hospitalName + dispatcherName + "为您服务";
            this.qucikSendIM(orderId, dispatcher, "智能助手", "1", noticeContent);
        }
        // 把调度员拉入会话,作为其中一个成员
        imUtill.updateParticipant(sessionId,dispatcher,null);
        imUtill.updateParticipantNew(sessionId,dispatcher,null);
        result.put(ResponseContant.resultFlag, ResponseContant.success);
        result.put(ResponseContant.resultMsg, "调度员["+dispatcherName+"]进入会话成功");
        return result;
@ -939,7 +943,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
        orderBriefInfo.put("prescriptionTime", DateUtil.dateToStr(orderDO.getPrescriptionTime(), "MM-dd HH:mm"));
        orderBriefInfo.put("cancelTime", DateUtil.dateToStr(orderDO.getCancelTime(), "MM-dd HH:mm"));
        // 计算服务包支付多少钱
       /*  // 计算服务包支付多少钱
        List<Map<String, Object>> feeDetailDOS = doorOrderService.getDoorFeeDetailGroupByStatus(id);
        String jsonData = null;
        try {
@ -948,9 +952,9 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
            e.printStackTrace();
        }
        if (!CollectionUtils.isEmpty(feeDetailDOS)) {
            Map<String, Object> map = doorOrderService.countServerPackagePrice(jsonData, orderDO.getPatient());
           Map<String, Object> map = doorOrderService.countServerPackagePrice(jsonData, orderDO.getPatient());
            orderBriefInfo.put("packageFee", map.get("serverPackagePrice"));
        }
        }*/
        orderJson.put("order", orderBriefInfo);
        //关联服务项
@ -1016,8 +1020,8 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
        orderJson.put("conclusion",conclusionJson);
        //获取上门前后开方详情
        List<WlyyDoorPrescriptionDO> doorBeforePrescriptionDOList = doorPrescriptionDao.findByOrderIdAndIsAfterDoor(id, 1);
        List<WlyyDoorPrescriptionDO> doorAfterPrescriptionDOList = doorPrescriptionDao.findByOrderIdAndIsAfterDoor(id, 2);
        List<WlyyPrescriptionDO> doorBeforePrescriptionDOList = prescriptionDao.findByOrderIdAndIsAfterDoor(id, 1);
        List<WlyyPrescriptionDO> doorAfterPrescriptionDOList = prescriptionDao.findByOrderIdAndIsAfterDoor(id, 2);
        orderJson.put("doorBeforePrescription",doorBeforePrescriptionDOList);
        orderJson.put("doorAfterPrescription", doorAfterPrescriptionDOList);
@ -2234,7 +2238,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
        // 派单时,把医生拉入会话,作为其中一个成员,医生拒单时,退出会话
        ConsultDo consult = consultDao.queryByRelationCode(orderId);
        String sessionId = doorServiceOrderDO.getPatient() + "_" + consult.getId() + "_" + doorServiceOrderDO.getNumber() + "_" + consult.getType();
        imUtill.updateParticipant(sessionId,doctor,null);
        imUtill.updateParticipantNew(sessionId,doctor,null);
        messageUtil.updateMessage(doorServiceOrderDO,new String[]{"402","403","430","435"},"431",dispatcher,dispatcher);
        // 工单状态变更记录
@ -2309,7 +2313,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
        // 派单时,把医生拉入会话,作为其中一个成员,医生拒单时,退出会话
        ConsultDo consult = consultDao.queryByRelationCode(orderId);
        String sessionId = doorServiceOrderDO.getPatient() + "_" + consult.getId() + "_" + doorServiceOrderDO.getNumber() + "_" + consult.getType();
        imUtill.updateParticipant(sessionId,doctor,null);
        imUtill.updateParticipantNew(sessionId,doctor,null);
        messageUtil.updateMessage(doorServiceOrderDO,new String[]{"402","403","430","435"},"431",dispatcher,dispatcher);
        // 工单状态变更记录
@ -2505,17 +2509,29 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
            doorPrescriptionDao.save(prescription);
        }else {
            //判断手动输入的处方号是否被关联过
            List<WlyyDoorPrescriptionDO> doorPrescriptionDOs = new ArrayList<>();
            String[] recipeNoString = prescriptionCode.split(",");
            for (int i = 0; i < recipeNoString.length; i++) {
                //判断是否被工单手工关联过
                List<WlyyDoorServiceOrderDO> orderDOList = wlyyDoorServiceOrderDao.findByPrescriptionCode("%" + recipeNoString[i] + "%");
/*                 //判断是否被工单手工关联过
               List<WlyyDoorServiceOrderDO> orderDOList = wlyyDoorServiceOrderDao.findByPrescriptionCode("%" + recipeNoString[i] + "%");
                WlyyDoorPrescriptionDO prescriptionDO = doorPrescriptionDao.findByRecipeNo(recipeNoString[i]);
                if(orderDOList.size() > 0 || prescriptionDO != null){
                    res.put("status", -1);
                    res.put("msg", "处方号:" + recipeNoString[i] + "已被关联过,请重新输入");
                    return res;
                }*/
                //关联处方关系
                List<WlyyPrescriptionDO>  prescriptionDOList = prescriptionDao.findByRealOrderList(recipeNoString[i]);
                if(prescriptionDOList.size()>0){
                    WlyyDoorPrescriptionDO prescriptionDO = new WlyyDoorPrescriptionDO();
                    prescriptionDO.setOrderId(orderId);
                    prescriptionDO.setIsAfterDoor(1);
                    prescriptionDO.setCode(prescriptionDOList.get(0).getId());
                    doorPrescriptionDOs.add(prescriptionDO);
                }
            }
            doorPrescriptionDao.save(doorPrescriptionDOs);
            //上门前手动开方即更新工单的处方号
            wlyyDoorServiceOrderDao.updatePrescriptionById(orderId, prescriptionCode, new Date());
            WlyyDoorServiceOrderDO orderDO = wlyyDoorServiceOrderDao.findOne(orderId);
@ -2538,10 +2554,15 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
     */
    public void savePrescription(String orderId,String prescriptionCode){
        WlyyDoorServiceOrderDO orderDO = wlyyDoorServiceOrderDao.findOne(orderId);
        orderDO.setPrescriptionCode(prescriptionCode);
        orderDO.setPrescriptionTime(new Date());
        orderDO.setPrescriptionStatus(1);
        wlyyDoorServiceOrderDao.save(orderDO);
        WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionCode);
        if(wlyyPrescriptionDO!=null){
            WlyyDoorPrescriptionDO prescriptionDO = new WlyyDoorPrescriptionDO();
            prescriptionDO.setOrderId(orderId);
            prescriptionDO.setIsAfterDoor(2);
            prescriptionDO.setCode(prescriptionCode);
            doorPrescriptionDao.save(prescriptionDO);
        }
        //非代预约才发送im消息
        if(orderDO.getType() != null && orderDO.getType() != 3) {
            //发送 预约卡片信息(2101类型)

+ 57 - 14
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/common/PatientService.java

@ -8,12 +8,18 @@ import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientMedicareCardDao;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * Created by yeshijie on 2020/12/31.
@ -26,6 +32,57 @@ public class PatientService {
    private SignFamilyDao signFamilyDao;
    @Autowired
    private BasePatientMedicareCardDao patientMedicareCardDao;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    public List<Map<String,Object>> patientList(String name, Integer page, Integer size){
        List<Map<String,Object>> resultList = new ArrayList<>(32);
        String sql = "select p.* from base_patient p where p.del = '1' and p.enabled = 1 ";
        if(StringUtils.isNoneBlank(name)){
            sql += " and p.name like '%"+name+"%'";
        }
        int start = 0 == page ? page++ : (page - 1) * size;
        int end = 0 == size ? 15 : size;
        sql += " limit "+start+","+end;
        List<BasePatientDO> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(BasePatientDO.class));
        for (BasePatientDO p:list){
            Map<String,Object> json = new HashedMap();
            json.put("id", p.getId());
            json.put("code", p.getId());
            // 设置患者姓名
            json.put("name", p.getName());
            // 设置患者手机号
            json.put("mobile", p.getMobile());
            // 设置患者微信openid
            json.put("openid", StringUtils.isNotEmpty(p.getOpenid()) ? p.getOpenid() : "");
            json.put("openidTime", DateUtil.dateToStr(p.getOpenidTime(), DateUtil.YYYY_MM_DD_HH_MM_SS));
            // 设置患者联系电话
            json.put("phone", p.getPhone());
            // 设置患者头像
            json.put("photo", p.getPhoto());
            // 设置患者年龄
            json.put("age", IdCardUtil.getAgeByIdcardOrBirthday(p.getIdcard(),p.getBirthday()));
            // 设置患者性别
            json.put("sex", p.getSex());
            // 身份证号
            json.put("idcard", p.getIdcard());
            //1.4.2新增medicareNumber
//        json.put("medicareNumber", p.getMedicareNumber());
            // 设置患者居住省份
            json.put("provinceName", p.getProvinceName());
            json.put("cityName", p.getCityName());
            json.put("townName", p.getTownName());
            json.put("streetName", p.getStreetName());
            // 设置患者地址
            json.put("address", p.getAddress());
            resultList.add(json);
        }
        return resultList;
    }
    /**
     * 查询单个居民信息
@ -101,8 +158,6 @@ public class PatientService {
            json.put("qyrq", familySign.getApplyDate() != null ? DateUtil.dateToStr((Date) familySign.getApplyDate(), DateUtil.YYYY_MM_DD) : "");
            // 设置签约日期
            json.put("patientApplyDate", familySign.getPatientApplyDate() != null ? DateUtil.dateToStr((Date) familySign.getPatientApplyDate(), DateUtil.YYYY_MM_DD) : "");
            // 设置签约类型
            json.put("signType", json.has("signType") ? 3 : 2);
            // 缴费情况
            json.put("expensesStatus", StringUtils.isNotEmpty(familySign.getExpensesStatus()) ? String.valueOf(familySign.getExpensesStatus()) : "0");
            // 缴费时间
@ -114,18 +169,6 @@ public class PatientService {
            json.put("jtBeginDate", DateUtil.dateToStr(familySign.getBegin(), DateUtil.YYYY_MM_DD));
            json.put("jtEndDate", DateUtil.dateToStr(familySign.getEnd(), DateUtil.YYYY_MM_DD));
//            Doctor jtDoctor = doctorDao.findByCode(familySign.getDoctor());
//            json.put("jtDoctor", familySign.getDoctor());
//            json.put("jtDoctorName", familySign.getDoctorName());
//            json.put("jtDoctorSex", jtDoctor.getSex());
//            json.put("jtDoctorPhoto", jtDoctor.getPhoto());
//            json.put("jtDoctorHealth", familySign.getDoctorHealth());
//            json.put("jtDoctorHealthName", familySign.getDoctorHealthName());
//            json.put("jtSpecialist", familySign.getSpecialist());
//            json.put("jtSpecialistName", familySign.getSpecialistName());
//            json.put("jtAdminTeam", familySign.getAdminTeamId());
//            json.put("jtHospital", familySign.getHospital());
//            json.put("jtHospitalName", familySign.getHospitalName());
        }

+ 12 - 6
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/common/ServerPackageService.java

@ -90,14 +90,20 @@ public class ServerPackageService  {
        String sql = "";
        if("sd_tnzyy_wx".equals(wxId)){
            sql = "SELECT a.FYXH code,a.FYMC title,a.FYDW unit,a.FYDJ expense from gy_ylsf a ";
            if("used".equals(type)){
                sql += " JOIN wlyy_door_order_item i on i.code = a.FYXH and (i.patient = '"+patient+"' or i.doctor='"+doctor+"') ";
            }else if("other".equals(type)){
                sql = " where a.FYGB not in (SELECT code from base_system_dict_entry WHERE dict_code = 'door_service_subject_class_dict')";
            if("door".equals(type)){
                //上门护理
                sql = "SELECT code,value title,'' unit,0 expense   from base_system_dict_entry WHERE dict_code = 'door_service_door_dict' ORDER BY sort";
            }else{
                sql += " WHERE a.FYGB ="+type;
                sql = "SELECT a.FYXH code,a.FYMC title,a.FYDW unit,a.FYDJ expense from gy_ylsf a ";
                if("used".equals(type)){
                    sql += " JOIN wlyy_door_order_item i on i.code = a.FYXH and (i.patient = '"+patient+"' or i.doctor='"+doctor+"') ";
                }else if("other".equals(type)){
                    sql += " where a.FYGB not in (SELECT code from base_system_dict_entry WHERE dict_code = 'door_service_subject_class_dict')";
                }else{
                    sql += " WHERE a.FYGB ="+type;
                }
            }
        }else {
            sql ="SELECT " +
                    "ziocad.org_code AS hospital," +

+ 6 - 5
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/statics/DoorStatisticAnalyzeService.java

@ -1485,14 +1485,15 @@ public class DoorStatisticAnalyzeService {
        String ddlOrZl = statisticsUtilService.getDDLOrZL(startDate,endDate);
        //服务工单数
        List<SaveModel> slaveList1 = statisticsUtilService.findDateQuotaLevel0BySlaveKey1(startDate, endDate, area, level, "121", ddlOrZl,null, lowLevel,"5,6");
        List<SaveModel> slaveList1 = elasticsearchUtil.findDateQuotaLevel0BySlaveKey1(startDate, endDate, area, level, "121", ddlOrZl,null, lowLevel,"5,6");
        //服务费用
        List<SaveModel> slaveList = elasticsearchUtil.findDateQuotaLevel2(startDate, endDate, area, level, "177", ddlOrZl, slaveKey1,"020", null, lowLevel);
        System.out.println("服务工单数:"+slaveList1.size() + " , 服务费用数:" + slaveList.size());
        for (SaveModel saveModel:slaveList1){
            Map<String, Object> map = statisticsUtilService.getMapTurnDownResult2(saveModel,lowLevel,"num");
            for (SaveModel one:slaveList){
                if(statisticsUtilService.compareSaveModel(saveModel,one,lowLevel)){
                    map.put("price",one.getResult1());
            Map<String, Object> map = statisticsUtilService.getMapTurnDownResult2(saveModel, lowLevel, "num");
            for (SaveModel one : slaveList) {
                if (statisticsUtilService.compareSaveModel(saveModel, one, lowLevel)) {
                    map.put("price", one.getResult1());
                    break;
                }
            }

+ 6 - 4
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/statics/StatisticsUtilService.java

@ -118,14 +118,16 @@ public class StatisticsUtilService {
    }
    public boolean compareSaveModel(SaveModel saveModel1,SaveModel saveModel2,String lowLevel){
        if (SaveModel.OrgLevel.equals(lowLevel)) {
        if (SaveModel.OrgLevel.equals(lowLevel) && saveModel1.getHospital() != null && saveModel2.getHospital() != null) {
            return saveModel1.getHospital().equals(saveModel2.getHospital());
        } else if (SaveModel.townLevel.equals(lowLevel)) {
        } else if (SaveModel.townLevel.equals(lowLevel) && saveModel1.getTown() != null && saveModel2.getTown() != null) {
            return saveModel1.getTown().equals(saveModel2.getTown());
        } else if (SaveModel.cityLevel.equals(lowLevel)) {
        } else if (SaveModel.cityLevel.equals(lowLevel) && saveModel1.getCity() != null && saveModel2.getCity() != null) {
            return saveModel1.getCity().equals(saveModel2.getCity());
        } else if (SaveModel.deptLevel.equals(lowLevel)) {
        } else if (SaveModel.deptLevel.equals(lowLevel) && saveModel1.getDept() != null && saveModel2.getDept() != null) {
            return saveModel1.getDept().equals(saveModel2.getDept());
        }else if (SaveModel.doctorLevel.equals(lowLevel) && saveModel1.getDoctor() != null && saveModel2.getDoctor() != null) {
            return saveModel1.getDoctor().equals(saveModel2.getDoctor());
        }
        return false;
    }

+ 7 - 7
svr/svr-door-serivce/src/main/resources/application.yml

@ -194,11 +194,11 @@ es:
    Statistics: hlw_quota_test
  type:
    Statistics: hlw_quota_test
  host:  http://172.26.0.55:9000
  tHost: 172.26.0.55:9300
  host:  http://172.26.0.112:9200
  tHost: 172.26.0.112:9300
  clusterName: jkzl
  securityUser: lion:jkzlehr
  user: lion
  securityUser: jw:jkzlehr
  user: jw
  password: jkzlehr
wlyy:
  url: http://ehr.yihu.com/wlyy/
@ -308,7 +308,7 @@ systemSetting:
spring:
  profiles: tnJwprod
  datasource:
    url: jdbc:mysql://10.9.1.247:3306/base?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    url: jdbc:mysql://10.9.1.247:3310/base?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: wlyy
    password: qY#j2n5O
  redis:
@ -330,8 +330,8 @@ server:
  server_url: http://ehr.yihu.com/wlyy/
base:
  url: http://192.168.120.96:10020/svr-base/
  hospitalUrl: http://172.26.0.107:10022/
  url: http://127.0.0.1:10020/svr-base/
  hospitalUrl: http://127.0.0.1:10022/
wechat:
  appId: wxad04e9c4c5255acf

+ 8 - 1
svr/svr-door-serivce/src/main/resources/bootstrap.yml

@ -43,4 +43,11 @@ spring:
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.120.153:1221}
      label: ${wlyy.spring.config.label:prod}
      label: ${wlyy.spring.config.label:prod}
---
spring:
  profiles: tnJwprod
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}

File diff suppressed because it is too large
+ 1 - 1
svr/svr-door-serivce/src/main/resources/conclusion.mht