Browse Source

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

LAPTOP-KB9HII50\70708 2 years ago
parent
commit
b140990707

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

@ -3075,11 +3075,32 @@ public class HcyyEntranceService {
    //=====================结算==============================
    public List<Map<String, Object>> createSQLQuery(String sql, Map<String, Object> params, Integer page, Integer size){
        return hibenateUtils.createSQLQuery(sql,params,page,size);
        logger.info("createSQLQuery=== "+sql);
        List<Map<String, Object>> result = null;
        long beginTime = System.currentTimeMillis();
        try {
            result =  hibenateUtils.createSQLQuery(sql,params,page,size);
        }catch (Exception e){
            e.printStackTrace();
        }
        long endTime = System.currentTimeMillis();
        System.out.println("总共消耗时间为:" + (endTime - beginTime));
        return result;
    }
    public List<Map<String, Object>> jdbcSQLQuery(String sql){
        return jdbcTemplate.queryForList(sql);
        logger.info("jdbcSQLQuery=== "+sql);
        List<Map<String, Object>> result = null;
        long beginTime = System.currentTimeMillis();
        try {
            result =  jdbcTemplate.queryForList(sql);
        }catch (Exception e){
            e.printStackTrace();
        }
        long endTime = System.currentTimeMillis();
        System.out.println("总共消耗时间为:" + (endTime - beginTime));
        return result;
    }
@ -3097,7 +3118,16 @@ public class HcyyEntranceService {
     * @return
     */
    public JSONObject  SP_SST_JSDP_JSMX_GJYB(String fzxbh0,String yyjgdm,String mct,String mcn){
        return hibenateUtils.SP_SST_JSDP_JSMX_GJYB(fzxbh0,yyjgdm,mct,mcn);
        long beginTime = System.currentTimeMillis();
        JSONObject result = null;
        try {
            result = hibenateUtils.SP_SST_JSDP_JSMX_GJYB(fzxbh0,yyjgdm,mct,mcn);
        }catch (Exception e){
            e.printStackTrace();
        }
        long endTime = System.currentTimeMillis();
        System.out.println("总共消耗时间为:" + (endTime - beginTime));
        return result;
    }
    /**

+ 130 - 0
business/base-service/src/main/java/com/yihu/jw/wechat/service/Test.java

@ -0,0 +1,130 @@
package com.yihu.jw.wechat.service;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.util.AesEncryptUtils;
import com.yihu.jw.util.http.HttpClientUtil;
import org.hibernate.jdbc.Expectation;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;
/**
 * Created by Trick on 2020/3/19.
 */
public class Test {
    public static void main(String[] args) throws Exception {
        String s ="53.68";
        String l = "53.680";
        if (s.equalsIgnoreCase(l)){
            System.out.print(true);
        }else {
            System.out.print(false);
        }
    }
        /** 7位ascii字符,也叫作iso646-us、unicode字符集的基本拉丁块 */
        public static final String us_ascii = "us-ascii";
        /** iso 拉丁字母表 no.1,也叫作 iso-latin-1 */
        public static final String iso_8859_1 = "iso-8859-1";
        /** 8 位 ucs 转换格式 */
        public static final String utf_8 = "utf-8";
        /** 16 位 ucs 转换格式,big endian(最低地址存放高位字节)字节顺序 */
        public static final String utf_16be = "utf-16be";
        /** 16 位 ucs 转换格式,little-endian(最高地址存放低位字节)字节顺序 */
        public static final String utf_16le = "utf-16le";
        /** 16 位 ucs 转换格式,字节顺序由可选的字节顺序标记来标识 */
        public static final String utf_16 = "utf-16";
        /** 中文超大字符集 */
        public static final String gbk = "gbk";
        /**
         * 将字符编码转换成us-ascii码
         */
        public static String toascii(String str) throws UnsupportedEncodingException{
            return changecharset(str, us_ascii);
        }
        /**
         * 将字符编码转换成iso-8859-1码
         */
        public static String toiso_8859_1(String str) throws UnsupportedEncodingException{
            return changecharset(str, iso_8859_1);
        }
        /**
         * 将字符编码转换成utf-8码
         */
        public static String toutf_8(String str) throws UnsupportedEncodingException{
            return changecharset(str, utf_8);
        }
        /**
         * 将字符编码转换成utf-16be码
         */
        public String toutf_16be(String str) throws  UnsupportedEncodingException {
            return this.changecharset(str, utf_16be);
        }
        /**
         * 将字符编码转换成utf-16le码
         */
        public String toutf_16le(String str) throws UnsupportedEncodingException{
            return this.changecharset(str, utf_16le);
        }
        /**
         * 将字符编码转换成utf-16码
         */
        public String toutf_16(String str) throws UnsupportedEncodingException{
            return this.changecharset(str, utf_16);
        }
        /**
         * 将字符编码转换成gbk码
         */
        public static String togbk(String str) throws UnsupportedEncodingException{
            return changecharset(str, gbk);
        }
        /**
         * 字符串编码转换的实现方法
         * @param str 待转换编码的字符串
         * @param newcharset 目标编码
         * @return
         * @throws Expectation
         */
        public static String changecharset(String str, String newcharset)
                throws  UnsupportedEncodingException {
            if (str != null) {
                //用默认字符编码解码字符串。
                byte[] bs = str.getBytes();
                //用新的字符编码生成字符串
                return new String(bs, newcharset);
            }
            return null;
        }
        /**
         * 字符串编码转换的实现方法
         * @param str 待转换编码的字符串
         * @param oldcharset 原编码
         * @param newcharset 目标编码
         * @return
         * @throws
         */
        public static String changecharset(String str, String oldcharset, String newcharset)
                throws Exception {
            if (str != null) {
                //用旧的字符编码解码字符串。解码可能会出现异常。
                byte[] bs = str.getBytes(oldcharset);
                //用新的字符编码生成字符串
                return new String(bs, newcharset);
            }
            return null;
        }
}

+ 16 - 12
business/base-service/src/main/java/com/yihu/jw/wlyy/service/WlyyBusinessService.java

@ -291,8 +291,8 @@ public class WlyyBusinessService {
            params.put("idcard",idcard);
            String patientCardNo = null;
            patientMedicareCardDao.deleteByPatientId(patientId);
            if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
                patientMedicareCardDao.deleteByPatientId(patientId);
                net.sf.json.JSONArray array =prescriptionService.findPatientCard(patientId);
                for (int i=0;i<array.size();i++){
                    net.sf.json.JSONObject object = array.getJSONObject(i);
@ -316,6 +316,7 @@ public class WlyyBusinessService {
                    patientMedicareCardDao.save(patientMedicareCardDO);
                }
            }else if (wxId.equalsIgnoreCase("xm_xzzx_wx")){
                patientMedicareCardDao.deleteByPatientId(patientId);
                JSONArray array = xzzxEntranceService.selectPateintCard(patientId);
                for (int i=0;i<array.size();i++){
                    JSONObject jsonObject = array.getJSONObject(i);
@ -374,18 +375,21 @@ public class WlyyBusinessService {
            patientSccParams.put("sex",basePatientDO.getSex().toString());
            patientSccParams.put("phone",basePatientDO.getMobile());
            patientSccParams.put("birthday",DateUtil.dateToStrShort(basePatientDO.getBirthday()));
            //JSONObject object = wlyyHttpService.sendWlyyMes("wlyyFindAccountBySsc", null, patientSccParams);
            JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatientAccetokenByIdcard",null,params);
            if(rs!=null){
                Integer status = rs.getInteger("status");
                if(200 == status){
                    JSONObject data = rs.getJSONObject("data");
                    result = data.getString("patientCode");
                }else{
                    logger.info(rs.toJSONString());
                    throw new Exception("请求i健康接口失败");
            JSONObject object = wlyyHttpService.sendWlyyMes("wlyyFindAccountBySsc", null, patientSccParams);
            try {
                JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatientAccetokenByIdcard",null,params);
                if(rs!=null){
                    Integer status = rs.getInteger("status");
                    if(200 == status){
                        JSONObject data = rs.getJSONObject("data");
                        result = data.getString("patientCode");
                    }else{
                        logger.info(rs.toJSONString());
                        throw new Exception("请求i健康接口失败");
                    }
                }
            }catch (Exception e){
                e.printStackTrace();
            }
            try {
                baseOperateLogService.saveOperateLog(doctorId,patientId,"JKDA","健康档案","","");

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

@ -668,5 +668,5 @@ wechat:
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
  sf_code: WH000573
  sf_check_word: JKZLHCYY1234

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

@ -1130,8 +1130,8 @@ qywx:
express:
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000102
  sf_check_word: TGUQASFNAZyjt9112
  sf_code: WH000573
  sf_check_word: JKZLHCYY1234
---