Преглед на файлове

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 години
родител
ревизия
80a94d0e79

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

@ -28,6 +28,7 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.im.ConsultTeamDo;
import com.yihu.jw.entity.base.org.BaseDoctorPatientFollowDO;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.patient.BaseNatPatientFamilyMemberDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.base.words.BaseSensitiveDO;
@ -60,6 +61,7 @@ import com.yihu.jw.hospital.doctor.dao.DoctorWorkTimeDao;
import com.yihu.jw.hospital.doctor.dao.PatientRegisterTimeDao;
import com.yihu.jw.hospital.doctor.dao.WlyyDoctorOnlineTimeDao;
import com.yihu.jw.hospital.drugstore.dao.BaseDrugStoreDao;
import com.yihu.jw.hospital.family.dao.WlyyNatPatientFamilyMemberDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.httplog.service.BaseOperateLogService;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
@ -333,6 +335,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private HealthCareService healthCareService;
    @Autowired
    private HcyyPrescriptionService hcyyPrescriptionService;
    @Autowired
    private WlyyNatPatientFamilyMemberDao natPatientFamilyMemberDao;
    public static String entranceUrl = "http://172.16.100.240:10023/xzzx/";
@ -12179,7 +12183,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public Map saveNatAppointment(String chargeAmount,String inspectionName,String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
                                   String firstJobCode,String firstJobName,String secondJobCode,String secondJobName,String natTime,String address,String provinceName,String cityName,String townName,String streetName,String pm,String pushFlag,String cardNoType,String consumer,
                                  String checkPart,String chargeFlag,String chargeCode,String icdCode,String preNo,String idnoType,Integer source) throws Exception {
                                  String checkPart,String chargeFlag,String chargeCode,String icdCode,String preNo,String idnoType,Integer source,String patientHisId) throws Exception {
        Map returnMap = new HashMap();
        Integer winNo = 6;
        if (checkPart==null||checkPart==""){
@ -12292,6 +12296,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    baseNatAppointmentDO.setAmpm(pm);
                    baseNatAppointmentDO.setConsumer(consumer);
                    baseNatAppointmentDO.setConsumerName(name);
                    baseNatAppointmentDO.setPatientHisId(patientHisId);
                    baseNatAppointmentDO= baseNatAppointmentDao.save(baseNatAppointmentDO);
                    try {
                        rs = entranceService.BS10111(mediaCard, map.get("doctorMappingCode").toString(), map.get("deptCode").toString(), "31", "6", demoFlag);
@ -12716,11 +12721,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            String userName = null;
            String idcard = null;
            if (patientDO != null) {
                userName = patientDO.getName();
                userName = baseNatAppointmentDO.getName();
                idcard = patientDO.getIdcard();
            }
            String hisId = patientMappingService.findHisPatNoByPatient(baseNatAppointmentDO.getPatientId(),baseNatAppointmentDO.getMedicare());
            logger.info("cardNo:" + baseNatAppointmentDO.getMedicare());
            if(!patientDO.getIdcard().equalsIgnoreCase(baseNatAppointmentDO.getCardNo())){
                hisId = baseNatAppointmentDO.getPatientHisId();
            }
            JSONObject jsonObject1 =entranceService.BS15054(hisId,baseNatAppointmentDO.getRealOrder(),demoFlag);
            net.sf.json.JSONObject res = jsonObject1.getJSONObject("resquest");
            logger.info("获取待结算数据 res: " + res.toString());
@ -12867,7 +12875,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return "发送成功!";
    }
    public MixEnvelop getNatRecords(String patientId,String id,String payStatus,String appointmentTime, String isSuccess,Integer page ,Integer pageSize){
    public MixEnvelop getNatRecords(String patientId,String id,String payStatus,String appointmentTime, String isSuccess,String idcard,Integer page ,Integer pageSize){
        String sql = "select t.name as \"name\"," +
                "t.card_no as \"cardNo\"," +
                "t.card_type as \"cardType\"," +
@ -12883,6 +12891,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "t.dept_name as \"deptName\","+
                "t.id as \"id\"," +
                "t.card_no_type as \"cardNoType\"," +
                "t.province_name as \"provinceName\"," +
                "t.city_name as \"cityName\"," +
                "t.town_name as \"townName\"," +
                "t.street_name as \"streetName\"," +
                "t.address as \"address\"," +
                "t.HOSPITAL_FLAG as \"hospitalFlag\"," +
                "t.charge_amount as \"chargeAmount\"," ;
        if ("xm_tasy_wx".equalsIgnoreCase(wechatId)){
@ -12914,6 +12927,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            sql+=" and t.is_success ="+isSuccess;
        }
        if (StringUtils.isNoneBlank(idcard)){
            sql+="  and t.card_no ='"+idcard+"' ";
        }
        if (StringUtils.isNoneBlank(appointmentTime)){
            if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
@ -12945,8 +12961,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public void savePayStatusByHis(String patientId) throws Exception {
        List<BaseNatAppointmentDO> baseNatAppointmentDOList = baseNatAppointmentDao.findPayStatusByPatientId(patientId);
        for (BaseNatAppointmentDO baseNatAppointmentDO:baseNatAppointmentDOList){
            BasePatientDO patientDO = basePatientDao.findById(baseNatAppointmentDO.getPatientId());
            String hisId = patientMappingService.findHisPatNoByPatient(patientId,baseNatAppointmentDO.getMedicare());
            logger.info("cardNo:" + baseNatAppointmentDO.getMedicare());
            if(!patientDO.getIdcard().equalsIgnoreCase(baseNatAppointmentDO.getCardNo())){
                hisId = baseNatAppointmentDO.getPatientHisId();
            }
            JSONObject jsonObject1 =entranceService.BS15054(hisId,baseNatAppointmentDO.getRealOrder(),demoFlag);
            net.sf.json.JSONObject res = jsonObject1.getJSONObject("resquest");
            logger.info("获取待结算数据 res: " + res.toString());

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

@ -12,6 +12,7 @@ import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorRoleDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.entity.hospital.dict.WlyyChargeDictDO;
import com.yihu.jw.entity.hospital.doctor.BaseDoctorZsInfoDO;

+ 9 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/BaseNatAppointmentDO.java

@ -63,6 +63,7 @@ public class BaseNatAppointmentDO extends IntegerIdentityEntity {
    private String oderNum;
    private String idnoType;
    private Integer source;
    private String patientHisId;
    public String getOderNum() {
        return oderNum;
@ -473,4 +474,12 @@ public class BaseNatAppointmentDO extends IntegerIdentityEntity {
    public void setSource(Integer source) {
        this.source = source;
    }
    public String getPatientHisId() {
        return patientHisId;
    }
    public void setPatientHisId(String patientHisId) {
        this.patientHisId = patientHisId;
    }
}

+ 17 - 9
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -13,6 +13,7 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.im.ConsultDo;
import com.yihu.jw.entity.base.im.ConsultTeamDo;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.entity.base.wx.WxTemplateConfigDO;
import com.yihu.jw.entity.base.wx.WxWechatDO;
@ -52,6 +53,7 @@ import com.yihu.jw.order.BusinessOrderService;
import com.yihu.jw.order.dao.BusinessOrderDao;
import com.yihu.jw.order.pay.utils.PayLogService;
import com.yihu.jw.order.pay.ylz.YlzPayService;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionInfoVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
import com.yihu.jw.restmodel.iot.common.UploadVO;
@ -202,7 +204,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    @Autowired
    private StatisticsEsService statisticsEsService;
    @Autowired
    private BasePatientWechatDao patientWechatDao;
    private BasePatientDao patientDao;
    @Autowired
    private YkyyPrescriptionService ykyyPrescriptionService;
@ -1192,18 +1194,20 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                                String title="您在厦门大学附属中山医院有一笔交易已支付完成!";
                                                pushPayLog = payInfoNoticeService.pushPrescriptionPayAndHsjc(natAppointmentDO.getPatientId(),natAppointmentDO.getDoctorName(),waitPayDetailVO.getVoucherNo(),natAppointmentDO.getId()+"",fee,title,null,waitPayDetailVO.getRecipeNo());
                                            }
                                            BasePatientDO patientDO = patientDao.findById(natAppointmentDO.getPatientId());
                                            //发送预约成功通知
                                            String name= natAppointmentDO.getName();
                                            String idcard = natAppointmentDO.getCardNo();
                                            String mobile = natAppointmentDO.getMobile();
                                            String name= patientDO.getName();
                                            String idcard = patientDO.getIdcard();
                                            String mobile = patientDO.getMobile();
                                            String url = "https://hlwyy.xmzsh.com/hlwyy/ims-wx/#/nucleicTest/detail?id="+natAppointmentDO.getId();
                                            String date = DateUtil.dateToStrLong(natAppointmentDO.getAppointmentTime());
                                            String first = "尊敬的用户"+name+",您已完成线上自助核酸检测预约申请";
                                            String contentMsg = "申请人:"+name+"\r\n 预约时间:"+date+" \r\n发票流水号:"+waitPayDetailVO.getRecipeNo();
                                            String first = "尊敬的用户"+natAppointmentDO.getName()+",您已完成线上自助核酸检测预约申请";
                                            String contentMsg = "申请人:"+natAppointmentDO.getName()+"\r\n 预约时间:"+date+" \r\n发票流水号:"+waitPayDetailVO.getRecipeNo();
                                            String remark="1、请您持核酸预约申请信息和发票流水号、医保卡/就诊卡/电子健康卡,准时至我院五号楼北侧(急诊部后侧)核酸检测点领取标本试管窗口绑定检测。\r\n" +
                                                    "2、核酸检测标本采集24小时后出具报告。请关注厦门大学附属中山医院微信公众号查询;如需打印,请至厦门大学附属中山医院核酸检测点自助机打印。";
                                            String responseMsg="";
                                            if ("xm_zsyy_wx".equalsIgnoreCase(wxId)) {
                                                responseMsg = entranceService.ehospitalNotice(
                                                        name,
                                                        idcard,
@ -1852,6 +1856,8 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                        @RequestParam(value = "isSuccess", required = false)String isSuccess,
                                    @ApiParam(name = "appointmentTime", value = "appointmentTime")
                                        @RequestParam(value = "appointmentTime", required = false)String appointmentTime,
                                    @ApiParam(name = "idcard", value = "身份证")
                                        @RequestParam(value = "idcard", required = false)String idcard,
                                    @ApiParam(name = "page", value = "页数")
                                    @RequestParam(value = "page", required = false)Integer page,
                                    @ApiParam(name = "pageSize", value = "每页大小")
@ -1864,7 +1870,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                tasyNatService.savePayStatusByHis(patientId);
            }
            logger.info("同步数据成功");
            return  prescriptionService.getNatRecords(patientId,id,payStatus,appointmentTime,isSuccess,page,pageSize);
            return  prescriptionService.getNatRecords(patientId,id,payStatus,appointmentTime,isSuccess,idcard,page,pageSize);
        } catch (Exception e) {
            return failedMixEnvelopException(e);
        }
@ -2519,11 +2525,13 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                      @ApiParam(name = "idnoType", value = "idnoType")
                                          @RequestParam(value = "idnoType",required = false)String idnoType,
                                      @ApiParam(name = "source", value = "source")
                                          @RequestParam(value = "source", required = false) Integer source){
                                          @RequestParam(value = "source", required = false) Integer source,
                                      @ApiParam(name = "patientHisId", value = "patientHisId")
                                          @RequestParam(value = "patientHisId", required = false) String patientHisId){
        try {
            return success(prescriptionService.saveNatAppointment(chargeAmount,inspectionName,mediaCard,patientId,name,cardNo,cardType,mobile,firstJobCode,firstJobName,secondJobCode,secondJobName,natTime,address,provinceName,
                    cityName,townName,streetName,pm,pushFlag,cardNoType,getUID(),checkPart,chargeFlag,chargeCode,icdCode,preNo,idnoType,source));
                    cityName,townName,streetName,pm,pushFlag,cardNoType,getUID(),checkPart,chargeFlag,chargeCode,icdCode,preNo,idnoType,source,patientHisId));
        } catch (Exception e) {
            return Envelop.getError(e.getMessage());
        }

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

@ -3347,10 +3347,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                      @ApiParam(name = "idnoType", value = "idnoType")
                                          @RequestParam(value = "idnoType", required = false) String idnoType,
                                      @ApiParam(name = "source", value = "source")
                                          @RequestParam(value = "source", required = false) Integer source) {
                                          @RequestParam(value = "source", required = false) Integer source,
                                      @ApiParam(name = "patientHisId", value = "patientHisId")
                                          @RequestParam(value = "patientHisId", required = false) String patientHisId) {
        try {
            return success(prescriptionService.saveNatAppointment(chargeAmount, inspectionName, mediaCard, patientId, name, cardNo, cardType, mobile, firstJobCode, firstJobName, secondJobCode, secondJobName, natTime, address, provinceName,
                    cityName, townName, streetName, pm, pushFlag, cardNoType, getUID(), checkPart, chargeFlag, chargeCode, icdCode, preNo,idnoType,source));
                    cityName, townName, streetName, pm, pushFlag, cardNoType, getUID(), checkPart, chargeFlag, chargeCode, icdCode, preNo,idnoType,source,patientHisId));
        } catch (Exception e) {
            return Envelop.getError(e.getMessage());
        }