Browse Source

眼视环境设置

mengkang 5 years ago
parent
commit
84a475c3c1

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/mapping/service/PatientMappingService.java

@ -77,7 +77,7 @@ public class PatientMappingService {
     * @return
     * @throws Exception
     */
    public String findYkyyPatNoByPatient(String patient)throws Exception{
    public String findYkyyPatNoByPatient(String patient,boolean demoFlag)throws Exception{
        logger.info("findYkyyPatNoByPatient:"+patient);
        BasePatientDO patientDO = basePatientDao.findById(patient);
        logger.info("patientDO:"+patientDO.toString());
@ -86,7 +86,7 @@ public class PatientMappingService {
        if(patientMappingDO!=null){
            return patientMappingDO.getMappingCode();
        }
        com.alibaba.fastjson.JSONArray rs = ykyyEntranceService.findHisPatient(patientMedicareCardDO.getCode());
        com.alibaba.fastjson.JSONArray rs = ykyyEntranceService.findHisPatient(patientMedicareCardDO.getCode(),demoFlag);
        if(rs!=null&&rs.size()>0){
            //获取居民信息

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

@ -2102,7 +2102,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                //先下单
                businessOrderService.savePrescriptionOrder(prescription.getId());
                //同步his
                ykyyEntranceService.findByRealOrder(prescription.getId());
                ykyyEntranceService.findByRealOrder(prescription.getId(),demoFlag);
                List<WlyyPrescriptionDO> prescriptionDOList = prescriptionDao.findById(prescription.getId());
                if (prescriptionDOList != null && prescriptionDOList.size() != 0) {
                    WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDOList.get(0);
@ -4496,17 +4496,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                if (one.getId().equalsIgnoreCase(workTimeDO.getId())) {
                    continue;
                }
                try {
                    //与医院与自己排班比较  是否冲突  第一组最后时间小于等于第二组最前时间 || 第一组最前时间大于等于第二组最后时间
                    if (one.getEndTime().before(workTimeDO.getStartTime()) || one.getStartTime().after(workTimeDO.getEndTime())) {
                    } else {
                        throw new Exception("您选择的时间与“开始时间-结束时间”的医院排班/自己排班冲突,请重新选择!");
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                    return false;
                //与医院与自己排班比较  是否冲突  第一组最后时间小于等于第二组最前时间 || 第一组最前时间大于等于第二组最后时间
                if (one.getEndTime().before(workTimeDO.getStartTime()) || one.getStartTime().after(workTimeDO.getEndTime())) {
                } else {
                    throw new Exception("您选择的时间与“开始时间-结束时间”的医院排班/自己排班冲突,请重新选择!");
                }
            }
            doctorWorkTimeDao.save(workTimeDO);

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

@ -93,11 +93,10 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    @Autowired
    private BaseUserAgent userAgent;
    @Value("${demo.flag}")
    private boolean demoFlag;
    /**
     * 获取居民就诊记录接口
     * @param patient
@ -109,7 +108,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     */
    public  List<WlyyOutpatientVO> findOutpatientList(String patient, String startTime, String endTime, boolean demoFlag)throws Exception{
        logger.info("findOutpatientList patient:"+patient);
        String patNo =patientMappingService.findYkyyPatNoByPatient(patient);
        String patNo =patientMappingService.findYkyyPatNoByPatient(patient,demoFlag);
        if(StringUtils.isBlank(patNo)){
            return null;
        }
@ -139,7 +138,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     */
    public  WlyyOutpatientVO findOutpatientInfo(String patient,String conNo, boolean demoFlag)throws Exception{
        logger.info("findOutpatientList patient:"+patient);
        String patNo =patientMappingService.findYkyyPatNoByPatient(patient);
        String patNo =patientMappingService.findYkyyPatNoByPatient(patient,demoFlag);
        if(StringUtils.isBlank(patNo)){
            return null;
        }

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

@ -46,6 +46,7 @@ import org.apache.commons.lang3.StringUtils;
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.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -134,7 +135,6 @@ public class YkyyEntranceService {
    private YkyyService ykyyService;
    public List<Map<String, Object>> createSQLQuery(String sql, Map<String, Object> params, Integer page, Integer size){
        return hibenateUtils.createSQLQuery(sql,params,page,size);
    }
@ -395,8 +395,27 @@ public class YkyyEntranceService {
            return null;
        }
//KSSJ,h.BRID,h.BRXM,h.SJHM,h.JZKH,h.SFZH,h.BRXZ,h.YSDM,h.KDYS" +
//                ",h.KSDM,h.KSMC,h.ZDMC,h.JZXH
        JSONArray jsonArray = new JSONArray();
        if (demoFlag){
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("BRID","402803ff6b4ae7ae016b4b06a498025s6");
            jsonObject.put("BRXM","张灵玉");
            jsonObject.put("SJHM","8622");
            jsonObject.put("SFZH","350529188526051213");
            jsonObject.put("BRXZ","普通性质");
            jsonObject.put("YSDM","A250545");
            jsonObject.put("KDYS","张楚岚");
            jsonObject.put("KSDM","062525");
            jsonObject.put("KSMC","消化科");
            jsonObject.put("ZDMC","消化不良");
            jsonObject.put("JZXH","XM1231258225225442GK");
            jsonArray.add(jsonObject);
        }else {
            jsonArray = findV_ZKSG_HZCX_HIS(patientMappingDO.getMappingCode(),conNo,startTime,endTime);
        }
        //查找眼科数据
        JSONArray jsonArray = findV_ZKSG_HZCX_HIS(patientMappingDO.getMappingCode(),conNo,startTime,endTime);
        if (jsonArray.size() == 0) {
            return null;
        }
@ -1355,7 +1374,7 @@ public class YkyyEntranceService {
     * @return
     * @throws Exception
     */
    public JSONArray findHisPatient(String ssc) throws Exception {
    public JSONArray findHisPatient(String ssc,boolean demoFlag) throws Exception {
        String sql = "SELECT\n" +
                "\tx.brid AS \"brid\",\n" +
                "\tx.mzhm AS \"mzhm\",\n" +
@ -1378,14 +1397,31 @@ public class YkyyEntranceService {
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("idcard:"+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==200){
            array = rs.getJSONArray("detailModelList");
        if (demoFlag){
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("BRID","f6ab67115413e4bba1523d6d4c35766a");
            jsonObject.put("MZHM","0502452155");
            jsonObject.put("BRXM","诸葛青也");
            jsonObject.put("SFZH","450521199405092535");
            jsonObject.put("BRXZ","一般");
            jsonObject.put("BRXB","男");
            jsonObject.put("CSNY","1994-05-09");
            jsonObject.put("JZKH","DXM25631856");
            jsonObject.put("JDSJ","2020-06-28 15:15:35");
            jsonObject.put("GZZTMC","一般");
            jsonObject.put("LXDZ","厦门市五缘湾");
            array.add(jsonObject);
        }else  {
            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==200){
                array = rs.getJSONArray("detailModelList");
            }
        }
        return array;
    }
@ -1437,7 +1473,7 @@ public class YkyyEntranceService {
    public String findByRealOrder(String code) throws Exception {
    public String findByRealOrder(String code,boolean demoFlag) throws Exception {
        List<WlyyPrescriptionDO>  wlyyPrescriptionDOs = prescriptionDao.findById(code);
        if (wlyyPrescriptionDOs!=null&&wlyyPrescriptionDOs.size()!=0){
            WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOs.get(0);
@ -1452,7 +1488,7 @@ public class YkyyEntranceService {
                wlyyPrescriptionInfoVOS.add(prescriptionInfoVO);
            }
            //诊断
            synPrescriptionDiagnosis(prescriptionVO,code);
            synPrescriptionDiagnosis(prescriptionVO,code,demoFlag);
            prescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOS);
            synPrecriptionHis(prescriptionVO,code);
@ -1564,7 +1600,7 @@ public class YkyyEntranceService {
     * 诊断
     * @param wlyyPrescriptionVO
     */
    public void synPrescriptionDiagnosis(WlyyPrescriptionVO wlyyPrescriptionVO,String code) throws Exception{
    public void synPrescriptionDiagnosis(WlyyPrescriptionVO wlyyPrescriptionVO,String code,boolean demoFlag) throws Exception{
        String doctor = wlyyPrescriptionVO.getDoctor();
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(doctor);
        String patient = wlyyPrescriptionVO.getPatientCode();
@ -1601,7 +1637,7 @@ public class YkyyEntranceService {
        hlwGhmxDO.setYSDM(doctorMappingDO.getMappingCode());//医生代码
        hlwGhmxDO.setJZYS(doctorMappingDO.getMappingCode());//接诊医生
        //病人性质
        JSONArray jsonArray = findHisPatient(patientMedicareCardDO.getCode());
        JSONArray jsonArray = findHisPatient(patientMedicareCardDO.getCode(),demoFlag);
        if(jsonArray!=null&&jsonArray.size()>0){
            //获取居民信息
            JSONObject json = jsonArray.getJSONObject(0);

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

@ -179,7 +179,10 @@ public class ImService {
	
	@Value("${wechat.id}")
	private String wxId;
	
	@Value("${wechat.flag}")
	private boolean flag;
	
	
	/**
@ -202,7 +205,11 @@ public class ImService {
				"a.title AS \"title\"," +
				"a.symptoms AS \"symptoms\",";
		if("xm_ykyy_wx".equals(wxId)){
			sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
			if (flag){
				sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
			}else {
				sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
			}
		}else{
			sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
		}
@ -252,6 +259,7 @@ public class ImService {
			sql += " and a.pay_status = " + payStatus + "";
		}
		sql += " ORDER BY a.czrq desc ";
		logger.info("sql="+sql);
		List<Map<String,Object>> result = hibenateUtils.createSQLQuery(sql,page,pagesize);
		/*result = jdbcTemplate.query(sql, new BeanPropertyRowMapper(ConsultVO.class));*/
		return result;

+ 1 - 4
svr/svr-base/src/main/resources/application.yml

@ -425,9 +425,6 @@ fast-dfs:
wechat:
  id: xm_xzzx_wx  # base库中,wx_wechat 的id字段  # todo 待配置
---
spring:
  profiles: jwystest
@ -473,4 +470,4 @@ wechat:
#文件服务器上传配置 0本地,1.I健康,2.内网调用
testPattern:
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream

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

@ -372,7 +372,7 @@ testPattern:
wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段  # todo 待配置
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段  # todo 待配置
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService

+ 3 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/ykyy/YkyyController.java

@ -45,6 +45,8 @@ public class YkyyController extends EnvelopRestEndpoint {
    @Autowired
    private WxTemplateService wxTemplateService;
    @Value("${demo.flag}")
    private boolean demoFlag;
    @GetMapping(value = "/selectCardList")
    @ApiOperation(value = "查询就诊卡")
@ -384,7 +386,7 @@ public class YkyyController extends EnvelopRestEndpoint {
            @ApiParam(name = "code", value = "code", required = true)
            @RequestParam(required = true)String code) throws Exception {
        try {
            ykyyEntranceService.findByRealOrder(code);
            ykyyEntranceService.findByRealOrder(code,demoFlag);
            return ObjEnvelop.getSuccess("ok","");
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());

+ 22 - 4
svr/svr-internet-hospital/src/main/resources/application.yml

@ -111,6 +111,7 @@ myFamily:
  qrCodeFailurTime: 2
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
@ -183,6 +184,7 @@ fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
@ -263,6 +265,7 @@ fast-dfs:
  tracker-server: 192.0.33.26:22122 #服务器地址
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP #todo 待配置
@ -352,6 +355,7 @@ fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
@ -437,6 +441,7 @@ fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
@ -519,6 +524,7 @@ fast-dfs:
  tracker-server: 192.168.103.159:22122 #服务器地址
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP #todo 待配置
@ -599,6 +605,7 @@ fast-dfs:
  tracker-server: 172.16.100.240:22122 #服务器地址
wechat:
  id: xm_xzzx_wx  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP #todo 待配置
@ -681,6 +688,7 @@ fast-dfs:
  tracker-server: 192.168.103.159:22122 #服务器地址
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP #todo 待配置
@ -754,15 +762,16 @@ spring:
    password: admin
  redis:
#    host: 172.26.0.253 # Redis server host.
    host: 172.26.0.190 # Redis server host.
    port: 6379 # Redis server port.
    host: 172.26.0.190 # Redis server host
    port: 6379 # Redis server port
fastDFS:
  fastdfs_file_url: http://172.26.0.110:8888/
fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: true #演示环境  true走Mysql数据库  false走Oracle
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
@ -807,4 +816,13 @@ wlyy:
qywx:
  url: 2
  id: 1
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk