Browse Source

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

# Conflicts:
#	business/base-service/src/main/java/com/yihu/jw/file_upload/FileUploadService.java
#	common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java
wangzhinan 3 years ago
parent
commit
5cb4f8c8cc

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

@ -331,6 +331,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private TasyNatService tasyNatService;
    @Autowired
    private HealthCareService healthCareService;
    @Autowired
    private HcyyPrescriptionService hcyyPrescriptionService;
    public static String entranceUrl = "http://172.16.100.240:10023/xzzx/";
@ -9807,6 +9809,104 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        e.printStackTrace();
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }else if (wxId.equalsIgnoreCase("xm_hcyy_wx")){
                try {
                    if (prescriptionDiagnosisDOS!=null&&prescriptionDiagnosisDOS.size()!=0){
                        String diagnosisName = prescriptionDiagnosisDOS.get(0).getName();
                        String diagnosisCode = prescriptionDiagnosisDOS.get(0).getCode();
                        //同步诊断
                        com.alibaba.fastjson.JSONObject jsonObject2 = hcyyPrescriptionService.saveDiagnosisToEntrance(outpatientDO.getRegisterNo(),diagnosisName,diagnosisCode);
                        logger.info("上传诊断返回参数"+jsonObject2);
                        //{"msg":"交易成功","code":"0","data":{"PresDetail":{"PresNo":"16151365"}},"success":"True"}
                        if (jsonObject2!=null){
                            if (jsonObject2.getString("code").equalsIgnoreCase("0")){
                                com.alibaba.fastjson.JSONObject jsonObject = jsonObject2.getJSONObject("data");
                                logger.info("上传诊断成功"+jsonObject2);
                            }
                        }
                    }
                    //同步处方
                    String applyDoctor = doctorMappingDO.getDoctorName()+"/"+doctorMappingDO.getMappingCode();
                    com.alibaba.fastjson.JSONObject object = hcyyPrescriptionService.savePrescriptionToEntrance("0",outpatientDO.getCardNo(),outpatientDO.getRegisterNo(),outpatientDO.getDept(),applyDoctor,"50100",infoDOS);
                    logger.info("成功上传处方"+object);
                    //{"msg":"交易成功","code":"0","data":{"PresDetail":{"PresNo":"16151365"}},"success":"True"}
                    if (object!=null){
                        if (object.getString("code").equalsIgnoreCase("0")){
                            com.alibaba.fastjson.JSONObject jsonObject = object.getJSONObject("data");
                            com.alibaba.fastjson.JSONObject jsonObject1 = jsonObject.getJSONObject("PresDetail");
                            String realOrder = jsonObject1.getString("PresNo");
                            wlyyPrescriptionDO.setAdmNo(outpatientDO.getAdmNo());
                            wlyyPrescriptionDO.setSerialNo(outpatientDO.getAdmNo());
                            wlyyPrescriptionDO.setRealOrder(realOrder);
                        }
                    }
                    logger.info("进入处方签名");
                  /*  //处方签名
                    String baseSign=xzyyPrescriptionService.SOF_SignDataWithExtraInfo(wlyyPrescriptionDO);
                    //同步电子病历
                    WlyyPrescriptionEmrDO prescriptionEmrDO = prescriptionEmrDao.findEmrByPrescriptionId(prescriptionId);
                    try {
                        if (prescriptionEmrDO != null) {
                            logger.info("电子病历同步");
                            xzzxEntranceService.saveEmrToEntrance(prescriptionId,baseSign);
                            logger.info("电子病历同步");
                            logger.info("电子病历签名");
                            xzyyPrescriptionService.SOF_SignDataWithExtraInfoEmr(wlyyPrescriptionDO);
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }*/
                    try {
                        if (object!=null){
                            if (object.getString("code").equalsIgnoreCase("0")){
                                //  * @param applyDepaName @param applyDoctorName
                                WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionId);
                                String patientCode = outpatientDO.getConsumer();
                                String realerOrder = prescriptionDO.getRealOrder();
                                String recipeTime = DateUtil.dateToStr(prescriptionDO.getCreateTime(), "yyyyMMddHHmmss");
                                List<BaseDoctorHospitalDO> doctorHospitalDOS = baseDoctorHospitalDao.findByDoctorCode(prescriptionDO.getDoctor());
                                String applyDepaName = null;
                                if (doctorHospitalDOS != null && doctorHospitalDOS.size() != 0) {
                                    applyDepaName = doctorHospitalDOS.get(0).getDeptName();
                                }
                                String voucherNo = outpatientDO.getRegisterNo();
                                String applyDoctorName = prescriptionDO.getDoctorName();
                                BasePatientDO patientDO = basePatientDao.findById(patientCode);
                                String userName = null;
                                String idcard = null;
                                if (patientDO != null) {
                                    userName = patientDO.getName();
                                    idcard = patientDO.getIdcard();
                                }
                                PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patientCode);
                                String userNo = null;
                                if (patientMappingDO != null) {
                                    userNo = patientMappingDO.getMappingCode();
                                }
                                String cardNo = null;
                                if (StringUtils.isNoneBlank(outpatientDO.getCardNo())) {
                                    cardNo = outpatientDO.getCardNo();
                                }
                                logger.info("cardNo:" + cardNo);
                               /* JSONObject jsonObject =entranceService.BS15054(patientMappingDO.getMappingCode(),prescriptionDO.getRealOrder(),demoFlag);
                                net.sf.json.JSONObject res = jsonObject.getJSONObject("resquest");
                                logger.info("获取待结算数据 res: " + res.toString());
                                String rsCode = res.getString("@RESULT");
                                String free= 0+"";
                                if ("0".equals(rsCode)) {
                                    free = res.getString("@total_charge");
                                }*/
                                /*ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, "", "","WX_PUB");
                            */}
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }

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

@ -842,6 +842,20 @@ public class TasyNatService {
                                                    }
                                                    //取消号源
                                                    //cancleOrder(baseNatAppointmentDO.getCardNo(),baseNatAppointmentDO.getRegisterNo(),baseNatAppointmentDO.getOderNum());
                                                }else if ("作废".equalsIgnoreCase(child.getString("Status"))) {
                                                    logger.info("进入作废订单同步");
                                                    baseNatAppointmentDO.setPayStatus("-1");
                                                    baseNatAppointmentDO.setIsSuccess("-1");
                                                    baseNatAppointmentDO.setCancelReson("患者本人线下作废");
                                                    baseNatAppointmentDO.setCancelTime(new Date());
                                                    baseNatAppointmentDO.setCancelBy(patientId);
                                                    BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(baseNatAppointmentDO.getId().toString());
                                                    if (businessOrderDO != null) {
                                                        businessOrderDO.setStatus(-1);
                                                        businessOrderDao.save(businessOrderDO);
                                                    }
                                                    //取消号源
                                                    //cancleOrder(baseNatAppointmentDO.getCardNo(),baseNatAppointmentDO.getRegisterNo(),baseNatAppointmentDO.getOderNum());
                                                }
                                                baseNatAppointmentDao.save(baseNatAppointmentDO);
                                            }

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

@ -153,7 +153,7 @@ public class HcyyEntranceService {
    public String getOperateUrl(){
        List<WlyyHospitalSysDictDO> list =  wlyyHospitalSysDictDao.findByDictName("xzzxWebOperateService");
        List<WlyyHospitalSysDictDO> list =  wlyyHospitalSysDictDao.findByDictName("hcyyWebOperateService");
        String url = list.get(0).getDictCode();
        return url;
@ -161,7 +161,7 @@ public class HcyyEntranceService {
    public String getOperateSmsUrl(){
        List<WlyyHospitalSysDictDO> list =  wlyyHospitalSysDictDao.findByDictName("xzzxWebOperateSmsService");
        List<WlyyHospitalSysDictDO> list =  wlyyHospitalSysDictDao.findByDictName("hcyyWebOperateSmsService");
        String url = list.get(0).getDictCode();
        return url;
@ -1294,7 +1294,7 @@ public class HcyyEntranceService {
    /**
     *
     *  获取检查单据信息
     *  获取检查项目信息
     * @return
     * @throws Exception
     */

+ 7 - 6
business/base-service/src/main/java/com/yihu/jw/internet/service/InternetCommonService.java

@ -94,7 +94,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
    public String orgSub ;
    public String imgUrl;
    static String imgPath =File.separator+"data1"+File.separator+"ehr"+File.separator+"svr-internet-hospital-job"+File.separator+"img"+File.separator;
    static String imgPath =File.separator+"data"+File.separator+"hospital"+File.separator+"svr-internet-hospital-job"+File.separator+"img"+File.separator;
    public ObjectMapper objectMapper;
@ -255,9 +255,9 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
        jb.put("protocol_name", superviseDataDict.getProtocolName());
        //其他建设信息
        jb.put("quai_mang_dept", "");
        jb.put("info_mang_dept", "");
        jb.put("medi_service_dept", "");
        jb.put("quai_mang_dept", "0");
        jb.put("info_mang_dept", "0");
        jb.put("medi_service_dept", "1");
        jb.put("server_type", "");
        jb.put("server_total", "");
@ -274,10 +274,10 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
        jb.put("tech_manual", "");
        jb.put("server_manual", "");
        jb.put("emr_level", "");
        jb.put("emr_level", "4");
        jb.put("emr_level_cert", "");
        jb.put("zone_record_share", "");
        jb.put("zone_record_share", "0");
        jb.put("prov_monitor", "");
        jb.put("prov_service", "");
@ -290,6 +290,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
        jb.put("third_compeny_corp_id", "");
        jb.put("third_compeny_prot", "");
        jb.put("green_road","0");
        JSONArray jsonArray = new JSONArray();

+ 2 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/HcyyPrescriptionCotroller.java

@ -31,7 +31,7 @@ import java.util.Map;
 */
@RestController
@RequestMapping(value = BaseHospitalRequestMapping.HcyyPrescription.PREFIX)
@Api(value = "海沧医院平台服务", description = "心脏中心平台服务", tags = {"心脏中心平台服务"})
@Api(value = "海沧医院平台服务", description = "海沧医院平台服务", tags = {"海沧医院平台服务"})
public class HcyyPrescriptionCotroller extends EnvelopRestEndpoint {
    @Autowired
@ -388,7 +388,7 @@ public class HcyyPrescriptionCotroller extends EnvelopRestEndpoint {
     * @throws Exception
     */
    @GetMapping(value = "/getExamApply")
    @ApiOperation(value = "获取检查单据信息", notes = "获取检查单据信息")
    @ApiOperation(value = "获取检查项目信息", notes = "获取检查项目信息")
    public ObjEnvelop getExamApply(@ApiParam(name = "spellCode", value = "拼音码", required = false)
                                       @RequestParam(value = "spellCode",required = false)String spellCode)throws Exception{
        return ObjEnvelop.getSuccess("ok",hcyyEntranceService.GetExamApply(spellCode));