Prechádzať zdrojové kódy

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

LAPTOP-KB9HII50\70708 2 týždňov pred
rodič
commit
6a7346b237

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/file_upload/FileUploadService.java

@ -678,7 +678,7 @@ public class FileUploadService {
            type = type.substring(type.lastIndexOf("."),type.length()-1);
        }
        logger.info(type);
        List img = new ArrayList(Arrays.asList("jpeg","bmp", "jpg", "png", "tif", "gif", "pcx", "tga", "exif", "fpx", "svg", "psd", "cdr", "pcd", "dxf", "ufo", "eps", "ai", "raw", "WMF", "webp","xls","xlsx","text/plain","mp3","mp4","m4v","avi","ogm","wmv","mpg","webm","ogv","mov","asx","mpeg","image/png","amr"));
        List img = new ArrayList(Arrays.asList("jpeg","bmp", "jpg", "png", "tif", "gif", "pcx", "tga", "exif", "fpx", "psd", "cdr", "pcd", "dxf", "ufo", "eps", "ai", "raw", "WMF", "webp","xls","xlsx","text/plain","mp3","mp4","m4v","avi","ogm","wmv","mpg","webm","ogv","mov","asx","mpeg","image/png","amr"));
        if (!img.contains(type)) {
            return false;
        }

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

@ -1569,6 +1569,29 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        return jsonObject;
    }
    /**
     * 通过电子码获取用户信息
     *
     * @param ehealthCode
     * @return
     * @throws Exception
     */
    public String getPersonInfoByCode(String ehealthCode) throws Exception {
        String url = entranceUrl +"getPersonInfoByCode";
        String jsonObject = "";
        Map<String,Object> params = new HashedMap();
        params.put("ehealthCode",ehealthCode);
        logger.info("params=="+params);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        if(rs.getInteger("status")==200){
            jsonObject = rs.getString("message");
        }
        return jsonObject;
    }
    //========================调用内网服务结束===================
    //============================业务服务调用================================

+ 37 - 16
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/DsyyEntranceService.java

@ -22,6 +22,7 @@ import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.entity.third.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.hospital.dict.WlyyChargeDictDao;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailIcdDao;
@ -49,6 +50,10 @@ import com.yihu.jw.utils.dsyyUtil.WritebackCvalueInterfaceLocator;
import com.yihu.jw.utils.dsyyUtil.ZoesoftHipServiceLocator;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.ylzinfo.ehc.EhcHandler;
import com.ylzinfo.ehc.common.utils.DateUtils;
import com.ylzinfo.ehc.trans.TransRequest;
import com.ylzinfo.ehc.trans.TransResponse;
import net.sf.json.xml.XMLSerializer;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.collections.map.HashedMap;
@ -85,20 +90,11 @@ public class DsyyEntranceService {
    @Autowired
    private DictHospitalDeptDao dictHospitalDeptDao;
    @Autowired
    private DictDoctorDutyDao dictDoctorDutyDao;
    @Autowired
    private WlyyChargeDictDao chargeDictDao;
    @Autowired
    private BaseDoctorDao doctorDao;
    @Autowired
    private BaseDoctorHospitalDao doctorHospitalDao;
    @Autowired
    private BaseDoctorRoleDao doctorRoleDao;
    @Autowired
    private DoctorMappingDao doctorMappingDao;
    @Autowired
    private BasePatientWechatDao basePatientWechatDao;
    @Autowired
    private HttpClientUtil httpClientUtil;
    @Autowired
@ -116,10 +112,6 @@ public class DsyyEntranceService {
    @Autowired
    private PrescriptionInfoDao prescriptionInfoDao;
    @Autowired
    private WlyyInspectionDao wlyyInspectionDao;
    @Autowired
    private PrescriptionDiagnosisDao prescriptionDiagnosisDao;
    @Autowired
    private BaseDoctorDao baseDoctorDao;
    @Autowired
    private BasePatientDao basePatientDao;
@ -142,9 +134,9 @@ public class DsyyEntranceService {
    @Autowired
    private YlzMedicailMxDao ylzMedicailMxDao;
    @Autowired
    private YlzMedicailRelationInvoiceDao invoiceDao;
    @Autowired
    private YlzMedicailRelationDao ylzMedicailRelationDao;
    @Autowired
    private OauthYlzConfigDao oauthYlzConfigDao;
    private static String key="5aKX8TLoagFbQiQFFEfRbxr5ClB3P/HG";
@ -671,7 +663,6 @@ public class DsyyEntranceService {
    /**
     * 获取历史病历
     * @param patientId
     * @param eventNo
     * @return
     * @throws Exception
     */
@ -4121,4 +4112,34 @@ public class DsyyEntranceService {
    //=============================电子发票结束===================================
    //==============================易联众扫码====================================
    public String getPersonInfoByCode(String ehealthCode) throws Exception {
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_dzjkk_config").orElse(null);
        TransRequest request = new TransRequest();
        request.setMethod("ehc.ehealthcode.verify");
        request.setApp_id(oauthYlzConfigDO.getAppId());
        request.setTerm_id(oauthYlzConfigDO.getTermId());
        request.setVersion("X.M.0.1");
        request.setTimestamp(DateUtils.getOutTradeTime());
        request.setSign_type(oauthYlzConfigDO.getSignType());
        request.setEnc_type(oauthYlzConfigDO.getEncType());
        JSONObject bizContent = new JSONObject();
        bizContent.put("ehealth_code",ehealthCode);
        bizContent.put("out_verify_time", DateUtils.getOutTradeTime());
        bizContent.put("out_verify_no", DateUtils.getOutTradeTime());
        bizContent.put("operator_id", "001");
        bizContent.put("operator_name", "测试员");
        bizContent.put("treatment_code", "030201");
        bizContent.put("business_type","01103");
        request.setBiz_content(JSONObject.toJSONString(bizContent));
        EhcHandler ehcHandler = new EhcHandler(oauthYlzConfigDO.getUrl(), oauthYlzConfigDO.getAppId(), oauthYlzConfigDO.getTermId(), oauthYlzConfigDO.getAppKey());
        TransResponse re = ehcHandler.execute(request);
        String rs = com.alibaba.fastjson.JSONObject.toJSONString(re);
        logger.info("checkOauthQRCode TransResponse :"+DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS")+" "+rs);
        com.alibaba.fastjson.JSONObject json = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.parse(rs);
        return rs;
    }
}

+ 6 - 0
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/DsyyController.java

@ -897,4 +897,10 @@ public class DsyyController extends EnvelopRestEndpoint {
    }
    @GetMapping(value = "/getPersonInfoByCode")
    @ApiOperation(value = "通过电子码获取用户信息")
    public Envelop getPersonInfoByCode(@ApiParam(name = "ehealthCode", value = "电子吗", required = true)
                                  @RequestParam(value = "ehealthCode",required = true)String ehealthCode) throws Exception {
        return success(dsyyEntranceService.getPersonInfoByCode(ehealthCode));
    }
}

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

@ -3973,5 +3973,14 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            return success("操作成功", prescriptionService.aIassistant(content));
    }
    @GetMapping("/getPersonInfoByCode")
    @ApiOperation(value = "通过电子码获取用户信息", notes = "通过电子码获取用户信息")
    public Envelop getPersonInfoByCode(
            @ApiParam(name = "ehealthCode", value = "电子码", required = false)
            @RequestParam(value = "ehealthCode",required = false)String  ehealthCode) throws Exception {
        return success("操作成功", dsyyPrescriptionService.getPersonInfoByCode(ehealthCode));
    }
}