瀏覽代碼

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

huangwenjie 4 年之前
父節點
當前提交
b2d14c02f1
共有 23 個文件被更改,包括 566 次插入93 次删除
  1. 22 0
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/PrescriptionEmrDao.java
  2. 25 0
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  3. 2 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/XzyyPrescriptionService.java
  4. 2 0
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java
  5. 145 0
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java
  6. 4 1
      business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java
  7. 1 1
      common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java
  8. 3 3
      common/common-entity/src/main/java/com/yihu/jw/entity/base/role/MenuDO.java
  9. 122 0
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionEmrDO.java
  10. 1 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/health/bank/HealthBankMapping.java
  11. 5 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java
  12. 1 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java
  13. 1 1
      server/svr-authentication/src/main/resources/bootstrap.yml
  14. 1 1
      server/svr-configuration/src/main/resources/bootstrap.yml
  15. 8 8
      svr/svr-base/src/main/java/com/yihu/jw/base/service/role/RoleMenuService.java
  16. 54 54
      svr/svr-base/src/main/java/com/yihu/jw/base/service/wx/WechatService.java
  17. 7 7
      svr/svr-base/src/main/resources/application.yml
  18. 1 1
      svr/svr-base/src/main/resources/bootstrap.yml
  19. 41 4
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java
  20. 51 1
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/YkyyPrescriptionEndpoint.java
  21. 1 1
      svr/svr-internet-hospital/src/main/resources/bootstrap.yml
  22. 38 1
      svr/svr-wlyy-health-bank/src/main/java/com/yihu/jw/controller/CreditsDetailController.java
  23. 30 7
      svr/svr-wlyy-health-bank/src/main/java/com/yihu/jw/service/CreditsDetailService.java

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

@ -0,0 +1,22 @@
package com.yihu.jw.hospital.prescription.dao;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionEmrDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.Date;
import java.util.List;
/**
 * Created by wangzhinan on 2019/5/17.
 */
public interface PrescriptionEmrDao extends PagingAndSortingRepository<WlyyPrescriptionEmrDO, String>, JpaSpecificationExecutor<WlyyPrescriptionEmrDO> {
    @Query("select a from WlyyPrescriptionEmrDO a where a.prescriptionId = ?1 and a.del=1 ")
    List<WlyyPrescriptionEmrDO> findByPrescriptionId(String prescriptionId);
}

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

@ -182,6 +182,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private PrescriptionCheckDao prescriptionCheckDao;
    @Autowired
    private PrescriptionExpressageLogDao prescriptionExpressageLogDao;
    @Autowired
    private PrescriptionEmrDao prescriptionEmrDao;
    @Value("${demo.flag}")
@ -5641,5 +5643,28 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    /**
     * 创建电子病历
     * @param wlyyPrescriptionEmrDO
     * @return
     */
    public WlyyPrescriptionEmrDO saveEmr(WlyyPrescriptionEmrDO wlyyPrescriptionEmrDO){
        wlyyPrescriptionEmrDO.setCreateTime(new Date());
        wlyyPrescriptionEmrDO.setUpdateTime(new Date());
        wlyyPrescriptionEmrDO.setDel(1);
        return prescriptionEmrDao.save(wlyyPrescriptionEmrDO);
    }
    /**
     * 查询电子病历
     * @param prescriptionId
     * @return
     */
    public List<WlyyPrescriptionEmrDO> findByPrescriptionId(String  prescriptionId){
        return prescriptionEmrDao.findByPrescriptionId(prescriptionId);
    }
}

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

@ -116,8 +116,9 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                return res;
            }
        }
        String doctorFlag =  doctorMappingDO.getDoctorName()+"/"+doctorMappingDO.getMappingCode();
        JSONArray response =  xzzxEntranceService.registeredOperate(doctorMappingDO.getMappingCode(),outpatientDO.getDept(),patientMappingDO.getMappingCode(),doctorDO.getChargeType());
        JSONArray response =  xzzxEntranceService.registeredOperate(doctorFlag,outpatientDO.getDept(),patientMappingDO.getMappingCode(),doctorDO.getChargeType());
        JSONObject res = response.getJSONObject(0);
        logger.info("挂号结果 res: " + response.toString());
        String rsCode = res.getString("registerNo");

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

@ -2569,4 +2569,6 @@ public class EntranceService {
        }
        return ConvertUtil.convertListEnvelopInBody(resp);
    }
}

+ 145 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java

@ -202,6 +202,151 @@ public class YkyyEntranceService {
        return "success";
    }
    /**
     * 检验信息列表
     * @param patient
     * @param page
     * @param size
     * @return
     * @throws Exception
     */
    public JSONArray vlisReportMasterlist(String patient,Integer page,Integer size) throws Exception{
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patient);
        if(patientMappingDO==null){
            return new JSONArray();
        }
        String sql ="select * from VLIS_REPORT_MASTER where PATIENT_ID = '"+patientMappingDO.getMappingCode()+"' order by REPORT_TIME desc";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        params.put("size",size);
        params.put("page",page);
        logger.info("vpacsReportList:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if(status!=null&&status == 200){
            return rs.getJSONArray("detailModelList");
        }
        return new JSONArray();
    }
    /**
     * 检验信息明细
     * @param REPORT_ID
     * @return
     * @throws Exception
     */
    public JSONObject vlisReportMasterDetail(String REPORT_ID) throws Exception{
        String sql ="select * from VLIS_REPORT_MASTER where REPORT_ID = '"+REPORT_ID+"'";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("vlisReportMasterDetail:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        JSONObject res = new JSONObject();
        if(status!=null&&status == 200){
            res = rs.getJSONArray("detailModelList").getJSONObject(0);
        }
        //LIS 常规报告细视图
        String detail1 = "select * from VLIS_REPORT_DETAIL where REPORT_ID = '"+REPORT_ID+"'";
        Map<String,Object> detailParams1 = new HashedMap();
        detailParams1.put("sql",detail1);
        logger.info("VLIS_REPORT_DETAIL:"+detail1);
        HttpResponse detailresponse1 = HttpUtils.doGet(url,detailParams1);
        String detailcontent1 = detailresponse1.getContent();
        logger.info("response:"+detailcontent1);
        JSONObject detailrs1 = JSON.parseObject(detailcontent1);
        if(detailrs1.getInteger("status")!=null&&detailrs1.getInteger("status") == 200){
            res.put("detail1",detailrs1.getJSONArray("detailModelList"));
        }
        //LIS 药敏报告细视图
        String detail2 = "select * from VLIS_REPORT_DETAIL2 where REPORT_ID = '"+REPORT_ID+"'";
        Map<String,Object> detailParams2 = new HashedMap();
        detailParams2.put("sql",detail2);
        logger.info("VLIS_REPORT_DETAIL2:"+detail2);
        HttpResponse detailresponse2 = HttpUtils.doGet(url,detailParams2);
        String detailcontent2 = detailresponse2.getContent();
        logger.info("response:"+detailcontent2);
        JSONObject detailrs2 = JSON.parseObject(detailcontent2);
        if(detailrs2.getInteger("status")!=null&&detailrs2.getInteger("status") == 200){
            res.put("detail2",detailrs2.getJSONArray("detailModelList"));
        }
        //LIS 细菌培养说明细视图
/*        String detail3 = "select * from VLIS_REPORT_DETAIL3 where REPORT_ID = '"+REPORT_ID+"'";
        Map<String,Object> detailParams3 = new HashedMap();
        detailParams3.put("sql",detail3);
        logger.info("VLIS_REPORT_DETAIL:"+detail3);
        HttpResponse detailresponse3 = HttpUtils.doGet(url,detailParams3);
        String detailcontent3 = detailresponse3.getContent();
        logger.info("response:"+detailcontent3);
        JSONObject detailrs3 = JSON.parseObject(detailcontent3);
        if(detailrs3.getInteger("status")!=null&&detailrs3.getInteger("status") == 200){
            res.put("detail3",detailrs3.getJSONArray("detailModelList"));
        }*/
        return res;
    }
    /**
     * 检查信息列表
     * @param patient
     * @param page
     * @param size
     * @return
     * @throws Exception
     */
    public JSONArray vpacsReportList(String patient,Integer page,Integer size) throws Exception{
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patient);
        if(patientMappingDO==null){
            return null;
        }
        String sql ="select * from VPACS_REPORT where PATIENT_ID = '"+patientMappingDO.getMappingCode()+"'";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        params.put("size",size);
        params.put("page",page);
        logger.info("vpacsReportList:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if(status!=null&&status == 200){
            return rs.getJSONArray("detailModelList");
        }
        return new JSONArray();
    }
    /**
     * 检查信息明细
     * @param REPORT_ID
     * @return
     * @throws Exception
     */
    public JSONObject vpacsReportDetail(String REPORT_ID) throws Exception{
        String sql ="select * from VPACS_REPORT where REPORT_ID = '"+REPORT_ID+"'";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("vpacsReportDetail:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if(status!=null&&status == 200){
            return rs.getJSONArray("detailModelList").getJSONObject(0);
        }
        return new JSONObject();
    }
    /**
     * 患者门诊就诊记录

+ 4 - 1
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -890,7 +890,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
     */
    public BusinessOrderDO updatePayStatus(String traceNo) throws Exception {
        logger.info("入参:"+traceNo);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByTraceNo(traceNo);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(traceNo);
        if (businessOrderDO==null){
            throw new Exception("查不到订单!");
        }
@ -911,6 +911,9 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
               prescriptionLogService.addPrescriptionLog(businessOrderDO.getRelationCode(),30,1,businessOrderDO.getPatient(),businessOrderDO.getPatientName(),businessOrderDO.getDescription(),new Date());
           }
        }
        businessOrderDO.setUpdateTime(new Date());
        businessOrderDO.setStatus(1);
        businessOrderDao.save(businessOrderDO);
        return businessOrderDO;
    }

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

@ -25,7 +25,7 @@ public abstract class IntegerIdentityEntity implements Serializable {
//==========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;

+ 3 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/base/role/MenuDO.java

@ -84,7 +84,7 @@ public class MenuDO extends UuidIdentityEntityWithOperator {
		this.name = name;
	}
	@Column(name = "sort")
	@Column(name = "MENU_SORT")
	public Integer getSort() {
		return this.sort;
	}
@ -129,7 +129,7 @@ public class MenuDO extends UuidIdentityEntityWithOperator {
		this.icon = icon;
	}
	@Column(name = "method")
	@Column(name = "MENU_METHOD")
	public String getMethod() {
		return method;
	}
@ -147,7 +147,7 @@ public class MenuDO extends UuidIdentityEntityWithOperator {
		this.show = show;
	}
	@Column(name = "level")
	@Column(name = "MENU_LEVEL")
	public Integer getLevel() {
		return level;
	}

+ 122 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionEmrDO.java

@ -0,0 +1,122 @@
package com.yihu.jw.entity.hospital.prescription;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
* 在线处方电子病历
*
* @author
*
*/
@Entity
@Table(name = "wlyy_prescription_emr")
public class WlyyPrescriptionEmrDO extends UuidIdentityEntityWithOperator {
    /**
     * 处方id
     */
    private String prescriptionId;
    /**
     * 主诉
     */
    private String complaint;
    /**
     * 现病史
     */
    private String medicalHistory;
    /**
     * 即往史
     */
    private String pastHistory;
    /**
     * 体格检查
     */
    private String physicalExamination;
    /**
     *辅助检查
     */
    private String assistExamination;
    /**
     * 标识是否删除
     */
    private Integer del;
    @Column(name = "complaint")
    public String getComplaint() {
        return complaint;
    }
    public void setComplaint(String complaint) {
        this.complaint = complaint;
    }
    @Column(name = "medical_history")
    public String getMedicalHistory() {
        return medicalHistory;
    }
    public void setMedicalHistory(String medicalHistory) {
        this.medicalHistory = medicalHistory;
    }
    @Column(name = "past_history")
    public String getPastHistory() {
        return pastHistory;
    }
    public void setPastHistory(String pastHistory) {
        this.pastHistory = pastHistory;
    }
    @Column(name = "physical_examination")
    public String getPhysicalExamination() {
        return physicalExamination;
    }
    public void setPhysicalExamination(String physicalExamination) {
        this.physicalExamination = physicalExamination;
    }
    @Column(name = "assist_examination")
    public String getAssistExamination() {
        return assistExamination;
    }
    public void setAssistExamination(String assistExamination) {
        this.assistExamination = assistExamination;
    }
    @Column(name = "prescription_id")
    public String getPrescriptionId() {
        return prescriptionId;
    }
    public void setPrescriptionId(String prescriptionId) {
        this.prescriptionId = prescriptionId;
    }
    @Column(name = "del")
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/health/bank/HealthBankMapping.java

@ -66,6 +66,7 @@ public class HealthBankMapping {
        public static final String weekReward = "/weekReward";
        public static final String selectByDate = "/selectByDate";
        public static final String doctorDescreaseIntegrate = "/doctorDescreaseIntegrate";
        public static final String doctorIncreaseIntegrate = "/doctorIncreaseIntegrate";
        public static final String selectAccountByPatient="/selectAccountByPatient";
        public static final String selectByActivityRule = "/selectByActivityRule";
        public static final String patientGetInteger = "/patientGetInteger";

+ 5 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -408,6 +408,11 @@ public class BaseHospitalRequestMapping {
        public static final String selectExpireTime = "/selectExpireTime";
        public static final String saveEmr="/saveEmr";
        public static final String findEmrByPrescriptionId="/findEmrByPrescriptionId";
    }

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

@ -226,7 +226,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        String wechatId = parameters.get("wechatId");
        //更新患者openId
        BaseLoginLogDO baseLoginLogDO = new BaseLoginLogDO();
        if (!StringUtils.isEmpty(openid) && !"undefined".equalsIgnoreCase(openid) && "3".equals(loginType)) {
        if (!StringUtils.isEmpty(openid) && !"undefined".equalsIgnoreCase(openid) && ("3".equals(loginType)||"4".equalsIgnoreCase(loginType))) {
            baseLoginLogDO.setOpenid(openid);
            userDetailsService.updateOpenId(openid, wlyyUserSimple.getId());
            if (!StringUtils.isEmpty(wechatId)&& !"undefined".equalsIgnoreCase(wechatId)){

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

@ -75,7 +75,7 @@ spring:
  profiles: jwOracleProd
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.33.199:1221}
      uri: ${wlyy.spring.config.uri:http://192.168.33.197:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:

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

@ -84,7 +84,7 @@ spring:
      failFast: true #启动快速失败 即链接不到配置服务就启动失败
      server:
        git:
          uri: ${wlyy.spring.config.git.uri:http://192.168.33.199:3001/jkzl/ehr.config.git}
          uri: ${wlyy.spring.config.git.uri:http://192.168.33.197:3001/jkzl/ehr.config.git}
          basedir: /usr/local/wlyy2.0-config
        default-label: ${wlyy.spring.config.git.label:master}
---

+ 8 - 8
svr/svr-base/src/main/java/com/yihu/jw/base/service/role/RoleMenuService.java

@ -29,14 +29,14 @@ public class RoleMenuService extends BaseJpaService<RoleMenuDO, RoleMenuDao> {
    public List<MenuVO> findMenuByRoleId(String roleId){
        String sql ="SELECT " +
                " m.id, " +
                " m.parent_id AS parentId, " +
                " m.name, " +
                " m.sort, " +
                " m.url, " +
                " m.`status`," +
                " m.icon," +
                " m.is_show AS 'show'" +
                " m.id as \"id\", " +
                " m.parent_id AS \"parentId\", " +
                " m.name as \"name\", " +
                " m.menu_sort AS  \"sort\", " +
                " m.url as \"url\", " +
                " m.status as \"status\"," +
                " m.icon as \"icon\"," +
                " m.is_show AS \"show\" " +
                " FROM " +
                " base_menu m " +
                " JOIN base_role_menu r ON m.id = r.menu_id " +

+ 54 - 54
svr/svr-base/src/main/java/com/yihu/jw/base/service/wx/WechatService.java

@ -224,9 +224,9 @@ public class WechatService {
    //====================图文素材管理============================
    public MixEnvelop findWechatCombo(String saasId){
        String sql ="SELECT t.id,t.`name`," +
                "t.app_origin_id AS appOriginId," +
                "t.public_type AS publicType " +
        String sql ="SELECT t.id AS \"id\",t.name as \"name\"," +
                "t.app_origin_id AS \"appOriginId\"," +
                "t.public_type AS \"publicType\" " +
                "from wx_wechat t";
        if(StringUtils.isNotBlank(saasId)){
            sql += " JOIN wx_wechat_saas s ON s.wechat_id = t.id " +
@ -252,7 +252,7 @@ public class WechatService {
        }
        String sql = "SELECT " +
                " g.id,g.wechat_id AS wechatId,g.scene " +
                " g.id as \"id\",g.wechat_id AS \"wechatId\",g.scene AS \"scene\" " +
                " FROM " +
                " wx_graphic_scene g " +
                " WHERE " +
@ -325,7 +325,7 @@ public class WechatService {
    public MixEnvelop findImg(String wechatId,String title,String scene,Integer page,Integer size){
        String sqlTotal = "SELECT " +
                " COUNT(1) AS total " +
                " COUNT(1) AS \"total\" " +
                " FROM " +
                " wx_graphic_message m ";
                if(StringUtils.isNotBlank(scene)){
@ -347,13 +347,13 @@ public class WechatService {
        }
        String sql = "SELECT " +
                " m.id, " +
                " m.wechat_id AS wechatId, " +
                " m.title, " +
                " m.description, " +
                " m.url, " +
                " m.pic_url AS picUrl, " +
                " m.`status` " +
                " m.id as \"id\", " +
                " m.wechat_id AS \"wechatId\", " +
                " m.title as \"title\", " +
                " m.description \"description\", " +
                " m.url as \"url\", " +
                " m.pic_url AS \"picUrl\", " +
                " m.status AS \"status\" " +
                " FROM " +
                " wx_graphic_message m ";
        if(StringUtils.isNotBlank(scene)){
@ -460,7 +460,7 @@ public class WechatService {
    public MixEnvelop findWxReplyScene(String wechatId,String msgType,String event,String content,Integer status,Integer page,Integer size){
        String totalSql = "SELECT " +
                " COUNT(1) AS total " +
                " COUNT(1) AS \"total\" " +
                " FROM " +
                " wx_reply_scene s " +
                " WHERE " +
@ -485,15 +485,15 @@ public class WechatService {
        }
        String sql = "SELECT " +
                " s.id," +
                " s.wechat_id AS wechatId," +
                " s.scene, " +
                " s.`status`, " +
                " s.id, " +
                " s.content, " +
                " s.app_origin_id AS appOriginId, " +
                " s.`event`, " +
                " s.msg_type AS msgType" +
                " s.id AS \"id\"," +
                " s.wechat_id AS \"wechatId\"," +
                " s.scene AS \"scene\", " +
                " s.status as \"status\", " +
                " s.id as \"id\", " +
                " s.content as \"content\", " +
                " s.app_origin_id AS \"appOriginId\", " +
                " s.event as \"event\", " +
                " s.msg_type AS \"msgType\"" +
                " FROM " +
                " wx_reply_scene s " +
                " WHERE " +
@ -560,7 +560,7 @@ public class WechatService {
    public MixEnvelop findWxtemp(String wechatId,Integer status,String name,String key,Integer page,Integer size){
        String totalSql = "SELECT " +
                " COUNT(1) AS total " +
                " COUNT(1) AS \"total\" " +
                " FROM " +
                " wx_template t" +
                " WHERE t.wechat_id= '"+wechatId+"' ";
@ -580,13 +580,13 @@ public class WechatService {
        }
        String sql = "SELECT " +
                " t.id, " +
                " t.title, " +
                " t.wechat_id AS wechatId, " +
                " t.template_id AS templateId, " +
                " t.template_name AS templateName, " +
                " t.content, " +
                " t.`status` " +
                " t.id as \"id\", " +
                " t.title AS \"title\", " +
                " t.wechat_id AS \"wechatId\", " +
                " t.template_id AS \"templateId\", " +
                " t.template_name AS \"templateName\", " +
                " t.content as \"content\", " +
                " t.status as \"status\" " +
                " FROM " +
                " wx_template t" +
                " WHERE t.wechat_id= '"+wechatId+"' ";
@ -621,7 +621,7 @@ public class WechatService {
    public MixEnvelop findWxTempConfigList(String wechatId,String templateId,String scene,Integer page,Integer size){
        String totalSql ="SELECT " +
                " COUNT(1) AS total " +
                " COUNT(1) AS \"total\" " +
                " FROM " +
                " wx_template_config g " +
                " WHERE " +
@ -639,29 +639,29 @@ public class WechatService {
        }
        String sql ="SELECT " +
                " g.id, " +
                " g.wechat_id AS wechatId, " +
                " g.template_id AS templateId, " +
                " g.template_name AS template_name, " +
                " g.scene, " +
                " g.scene_description AS sceneDescription, " +
                " g.`first`, " +
                " g.url, " +
                " g.remark, " +
                " g.keyword1, " +
                " g.keyword2, " +
                " g.keyword3, " +
                " g.keyword4, " +
                " g.keyword5, " +
                " g.keyword6, " +
                " g.keyword7, " +
                " g.create_time AS createTime, " +
                " g.create_user AS createUser, " +
                " g.create_user_name AS createUserName, " +
                " g.update_time AS updateTime, " +
                " g.update_user AS updateUser, " +
                " g.update_user_name AS updateUserName, " +
                " g.status " +
                " g.id as \"id\", " +
                " g.wechat_id AS \"wechatId\", " +
                " g.template_id AS \"templateId\", " +
                " g.template_name AS \"template_name\", " +
                " g.scene AS \"scene\", " +
                " g.scene_description AS \"sceneDescription\", " +
                " g.first AS \"first\", " +
                " g.url AS \"url\", " +
                " g.remark AS \"remark\", " +
                " g.keyword1 AS \"keyword1\", " +
                " g.keyword2 AS \"keyword2\", " +
                " g.keyword3 AS \"keyword3\", " +
                " g.keyword4 AS \"keyword4\", " +
                " g.keyword5 AS \"keyword5\", " +
                " g.keyword6 AS \"keyword6\", " +
                " g.keyword7 AS \"keyword7\", " +
                " g.create_time AS \"createTime\", " +
                " g.create_user AS \"createUser\", " +
                " g.create_user_name AS \"createUserName\", " +
                " g.update_time AS \"updateTime\", " +
                " g.update_user AS \"updateUser\", " +
                " g.update_user_name AS \"updateUserName\", " +
                " g.status AS \"status\"" +
                " FROM " +
                " wx_template_config g " +
                " WHERE " +

+ 7 - 7
svr/svr-base/src/main/resources/application.yml

@ -255,11 +255,11 @@ spring:
    username: normal
    password: normal
  jpa:
      properties:
        hibernate:
          dialect: org.hibernate.dialect.Oracle10gDialect
          show_sql: true
      database: oracle
    properties:
      hibernate:
        dialect: org.hibernate.dialect.Oracle10gDialect
        show_sql: true
    database: oracle
  elasticsearch:
    cluster-name: jkzl #集群名 默认elasticsearch
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
@ -300,8 +300,8 @@ spring:
  datasource:
    driver-class-name: oracle.jdbc.driver.OracleDriver
    url: jdbc:oracle:thin:@10.10.10.16:1521/rac
    username: normal
    password: normal
    username: HLWYY
    password: Xmykzxhlwyy963
  jpa:
    properties:
      hibernate:

+ 1 - 1
svr/svr-base/src/main/resources/bootstrap.yml

@ -48,7 +48,7 @@ spring:
  profiles: jwOracleProd
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.33.199:1221}
      uri: ${wlyy.spring.config.uri:http://192.168.33.197:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:

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

@ -1,13 +1,11 @@
package com.yihu.jw.hospital.endpoint.prescription;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.doctor.service.excel.DoctorWorkTimeExcelReader;
import com.yihu.jw.doctor.service.excel.DoctorWorkTimeMainExcelDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionCheckDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDiagnosisDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.service.InspectionService;
import com.yihu.jw.hospital.prescription.service.PrescriptionLogService;
@ -1404,5 +1402,44 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    /**
     * 创建电子病历
     * @param emrJson
     * @return
     * @throws Exception
     */
    @PostMapping(value= BaseHospitalRequestMapping.Prescription.saveEmr)
    @ApiOperation("创建电子病历")
    public ObjEnvelop saveEmr(
            @ApiParam(name = "emrJson", value = "emrJson", required = true)
            @RequestParam(required = true)String emrJson) throws Exception {
        try {
            WlyyPrescriptionEmrDO emrDO = objectMapper.readValue(emrJson,WlyyPrescriptionEmrDO.class);
            return ObjEnvelop.getSuccess("ok",prescriptionService.saveEmr(emrDO));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    /**
     * 查询电子病历
     * @param prescriptionId
     * @return
     * @throws Exception
     */
    @GetMapping(value= BaseHospitalRequestMapping.Prescription.findEmrByPrescriptionId)
    @ApiOperation("查询电子病历")
    public ObjEnvelop findByPrescriptionId(
            @ApiParam(name = "prescriptionId", value = "prescriptionId", required = true)
            @RequestParam(required = true)String prescriptionId) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",prescriptionService.findByPrescriptionId(prescriptionId));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    
}

+ 51 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/YkyyPrescriptionEndpoint.java

@ -9,6 +9,7 @@ import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.service.*;
import com.yihu.jw.hospital.prescription.service.entrance.DoctorPreSignService;
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.hospital.service.SystemMessage.HospitalSystemMessageService;
import com.yihu.jw.im.service.ImService;
import com.yihu.jw.restmodel.hospital.prescription.WlyyOutpatientVO;
@ -47,7 +48,8 @@ public class YkyyPrescriptionEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private YkyyPrescriptionService prescriptionService;
    @Autowired
    private YkyyEntranceService ykyyEntranceService;
    @Value("${demo.flag}")
    private boolean demoFlag;
@ -55,6 +57,54 @@ public class YkyyPrescriptionEndpoint extends EnvelopRestEndpoint {
    @Value("${wechat.id}")
    private String wxId;
    @GetMapping(value = "vlisReportMasterlist")
    @ApiOperation(value = "检验信息列表")
    public ListEnvelop vlisReportMasterlist(@ApiParam(name = "patient", value = "居民id")
                                          @RequestParam(value = "patient",required = true) String patient,
                                          @ApiParam(name = "page", value = "第几页")
                                          @RequestParam(value = "page",required = false) Integer page,
                                          @ApiParam(name = "size", value = "页面大小")
                                          @RequestParam(value = "size",required = false) Integer size) throws Exception{
        if(page==null){
            page = 1;
        }
        if(size==null){
            size = 10;
        }
        return success(ykyyEntranceService.vlisReportMasterlist(patient, page, size));
    }
    @GetMapping(value = "vlisReportMasterDetail")
    @ApiOperation(value = "检验信息明细")
    public ObjEnvelop vlisReportMasterDetail(@ApiParam(name = "reportId", value = "报告id")
                                         @RequestParam(value = "reportId",required = true) String reportId)throws Exception{
        return success(ykyyEntranceService.vlisReportMasterDetail(reportId));
    }
    @GetMapping(value = "vpacsReportDetail")
    @ApiOperation(value = "检查信息明细")
    public ObjEnvelop vpacsReportDetail(@ApiParam(name = "reportId", value = "报告id")
                                             @RequestParam(value = "reportId",required = true) String reportId)throws Exception{
        return success(ykyyEntranceService.vpacsReportDetail(reportId));
    }
    @GetMapping(value = "vpacsReportList")
    @ApiOperation(value = "检查信息列表")
    public ListEnvelop vpacsReportList(@ApiParam(name = "patient", value = "居民id")
                                            @RequestParam(value = "patient",required = true) String patient,
                                            @ApiParam(name = "page", value = "第几页")
                                            @RequestParam(value = "page",required = false) Integer page,
                                            @ApiParam(name = "size", value = "页面大小")
                                            @RequestParam(value = "size",required = false) Integer size) throws Exception{
        if(page==null){
            page = 1;
        }
        if(size==null){
            size = 10;
        }
        return success(ykyyEntranceService.vpacsReportList(patient, page, size));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findOutpatientList)
    @ApiOperation(value = " 查询某个时间段的患者门诊就诊记录")
    public ListEnvelop findOutpatientList(@ApiParam(name = "patient", value = "居民id")

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

@ -65,7 +65,7 @@ spring:
  profiles: jwOracleProd
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.33.199:1221}
      uri: ${wlyy.spring.config.uri:http://192.168.33.197:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:

+ 38 - 1
svr/svr-wlyy-health-bank/src/main/java/com/yihu/jw/controller/CreditsDetailController.java

@ -274,7 +274,44 @@ public class CreditsDetailController extends EnvelopRestEndpoint {
                                                                 @ApiParam(name = "doctorId",value = "医生code")
                                                                     @RequestParam(value = "doctorId",required = false)String doctorId){
        try {
            return service.doctorDescreaseIntegrate(ruleId,patientId,doctorId,hospital,hospitalName,integrate,reason);
            return service.doctorDescreaseIntegrate(ruleId,patientId,doctorId,hospital,hospitalName,integrate,reason,null);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    /**
     * 医生手动加积分
     * @param ruleId
     * @param patientId
     * @param hospital
     * @param hospitalName
     * @param integrate
     * @param reason
     * @param doctorId
     * @return
     */
    @PostMapping(value = HealthBankMapping.healthBank.doctorIncreaseIntegrate)
    @ApiOperation(value = "医生手动加积分")
    public MixEnvelop<Boolean, Boolean> doctorIncreaseIntegrate(@ApiParam(name = "ruleId",value = "规则id")
                                                                 @RequestParam(value = "ruleId",required = false)String ruleId,
                                                                 @ApiParam(name = "patientId",value = "居民id")
                                                                 @RequestParam(value = "patientId",required = false)String patientId,
                                                                 @ApiParam(name = "hospital",value = "机构code")
                                                                 @RequestParam(value = "hospital",required = false)String hospital,
                                                                 @ApiParam(name = "hospitalName",value = "机构名称")
                                                                 @RequestParam(value = "hospitalName",required = false)String hospitalName,
                                                                 @ApiParam(name = "integrate",value = "增加的积分")
                                                                 @RequestParam(value = "integrate",required = false)Integer integrate,
                                                                 @ApiParam(name = "reason",value = "增加的原因")
                                                                 @RequestParam(value = "reason",required = false)String reason,
                                                                 @ApiParam(name = "doctorId",value = "医生code")
                                                                 @RequestParam(value = "doctorId",required = false)String doctorId){
        try {
            return service.doctorDescreaseIntegrate(ruleId,patientId,doctorId,hospital,hospitalName,integrate,reason,"add");
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());

+ 30 - 7
svr/svr-wlyy-health-bank/src/main/java/com/yihu/jw/service/CreditsDetailService.java

@ -988,7 +988,7 @@ public class CreditsDetailService extends BaseJpaService<CreditsDetailDO,Creditt
    }
    public MixEnvelop doctorDescreaseIntegrate(String ruleId,String patientId,String doctorId,String hospital,String hospitalName,Integer integrate,String reason) throws Exception {
    public MixEnvelop doctorDescreaseIntegrate(String ruleId,String patientId,String doctorId,String hospital,String hospitalName,Integer integrate,String reason,String type) throws Exception {
       MixEnvelop envelop = new MixEnvelop<>();
       envelop.setObj(true);
       TaskDO taskDO =  taskDao.selectByTaskRuleId(ruleId);
@ -1023,13 +1023,14 @@ public class CreditsDetailService extends BaseJpaService<CreditsDetailDO,Creditt
           taskPatientDetailDO.setStatus(1);
           taskPatientDetailDao.save(taskPatientDetailDO);
       }
       if (accountDO.getTotal().compareTo(integrate)>=0){
       if("add".equals(type)){
           CreditsDetailDO creditsDetailDO = new CreditsDetailDO();
           creditsDetailDO.setAccountId(accountDO.getId());
           creditsDetailDO.setIdCard(accountDO.getIdCard());
           creditsDetailDO.setSaasId("dev");
           creditsDetailDO.setTradeType("ACTIVITY_TASK");
           creditsDetailDO.setTradeDirection(-1);
           creditsDetailDO.setTradeDirection(1);
           creditsDetailDO.setIntegrate(integrate);
           creditsDetailDO.setDescription(reason);
           creditsDetailDO.setStatus(1);
@ -1041,11 +1042,33 @@ public class CreditsDetailService extends BaseJpaService<CreditsDetailDO,Creditt
           creditsDetailDO.setPatientId(patientId);
           creditsDetailDO.setHospitalName(hospitalName);
           credittsLogDetailDao.save(creditsDetailDO);
           accountDO.setTotal(accountDO.getTotal()-integrate);
           accountDO.setTotal(accountDO.getTotal()+integrate);
           accountDao.save(accountDO);
       }else {
           envelop.setMessage("积分不足!");
           throw new Exception("积分不足!");
       }else{
           if (accountDO.getTotal().compareTo(integrate)>=0){
               CreditsDetailDO creditsDetailDO = new CreditsDetailDO();
               creditsDetailDO.setAccountId(accountDO.getId());
               creditsDetailDO.setIdCard(accountDO.getIdCard());
               creditsDetailDO.setSaasId("dev");
               creditsDetailDO.setTradeType("ACTIVITY_TASK");
               creditsDetailDO.setTradeDirection(-1);
               creditsDetailDO.setIntegrate(integrate);
               creditsDetailDO.setDescription(reason);
               creditsDetailDO.setStatus(1);
               creditsDetailDO.setHospital(hospital);
               creditsDetailDO.setHospitalName(hospitalName);
               creditsDetailDO.setCreateTime(new Date());
               creditsDetailDO.setUpdateTime(new Date());
               creditsDetailDO.setTransactionId(taskDO.getId());
               creditsDetailDO.setPatientId(patientId);
               creditsDetailDO.setHospitalName(hospitalName);
               credittsLogDetailDao.save(creditsDetailDO);
               accountDO.setTotal(accountDO.getTotal()-integrate);
               accountDao.save(accountDO);
           }else {
               envelop.setMessage("积分不足!");
               throw new Exception("积分不足!");
           }
       }
       return envelop;
    }