Bladeren bron

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/hospital/prescription/service/entrance/XzzxEntranceService.java
#	svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/XzzxCotroller.java
wangzhinan 4 jaren geleden
bovenliggende
commit
d27087292e

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

@ -1117,23 +1117,39 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    public Map<String, Object> checkOutpatient(String patient,String wxId) throws Exception {
    public Map<String, Object> checkOutpatient(String patient,String wxId,boolean flag) throws Exception {
        //-1卡余额不足,,-2 存在未结束的诊断热 1成功
        Map<String, Object> rs = new HashedMap();
        //1.余额判断改到前端判断
        //net.sf.json.JSONObject json = entranceService.qutpatientBalance(cardNo,demoFlag);
        if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
            List<WlyyOutpatientDO> outpatientDOS = outpatientDao.findByPatientListByStatus(patient);
            if (outpatientDOS!=null&&outpatientDOS.size()!=0){
                WlyyOutpatientDO outpatientDO = outpatientDOS.get(0);
                if (outpatientDO.getHisStatus()!=null){
                    logger.info("您上一次就诊进入"+outpatientDO.getHisStatus());
                    if(outpatientDO.getHisStatus()!=1&&outpatientDO.getHisStatus()!=-1){
                        logger.info("您上一次就诊进入======"+outpatientDO.getHisStatus());
        if (flag){
            if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
                List<WlyyOutpatientDO> outpatientDOS = outpatientDao.findByPatientListByStatus(patient);
                if (outpatientDOS!=null&&outpatientDOS.size()!=0){
                    WlyyOutpatientDO outpatientDO = outpatientDOS.get(0);
                    if (outpatientDO.getHisStatus()!=null){
                        logger.info("您上一次就诊进入"+outpatientDO.getHisStatus());
                        if(outpatientDO.getHisStatus()!=1&&outpatientDO.getHisStatus()!=-1){
                            logger.info("您上一次就诊进入======"+outpatientDO.getHisStatus());
                            rs.put("outpatient", outpatientDO);
                            rs.put("code", -3);
                            rs.put("mes", "您上一次就诊未结算,请结算后才能发起复诊。");
                            List<BasePatientWechatDo> patientWechatDos = patientWechatDao.findByWechatIdAndPatientId(wxId, patient);
                            if (patientWechatDos == null || patientWechatDos.size() == 0) {
                                throw new Exception("openid不存在!");
                            }
                            WxWechatDO wxWechatDO = wechatDao.findById(wxId);
                            BasePatientWechatDo patientWechatDo = patientWechatDos.get(0);
                            String payUrl = ylzPayService.createSicardPayUrl(wxWechatDO.getAppOriginId(),patientWechatDo.getOpenid(),outpatientDO.getCardNo(),"WX");
                            rs.put("payUrl",payUrl);
                            return rs;
                        }
                    }else if (outpatientDO.getHisStatus()==null){
                        rs.put("outpatient", outpatientDO);
                        rs.put("code", -3);
                        rs.put("mes", "您上一次就诊未结算,请结算后才能发起复诊。");
                        List<BasePatientWechatDo> patientWechatDos = patientWechatDao.findByWechatIdAndPatientId(wxId, patient);
                        List<BasePatientWechatDo> patientWechatDos = patientWechatDao.findByWechatIdAndPatientId(wxId, outpatientDO.getConsumer());
                        if (patientWechatDos == null || patientWechatDos.size() == 0) {
                            throw new Exception("openid不存在!");
                        }
@ -1143,26 +1159,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        rs.put("payUrl",payUrl);
                        return rs;
                    }
                }else if (outpatientDO.getHisStatus()==null){
                    rs.put("outpatient", outpatientDO);
                    rs.put("code", -3);
                    rs.put("mes", "您上一次就诊未结算,请结算后才能发起复诊。");
                    List<BasePatientWechatDo> patientWechatDos = patientWechatDao.findByWechatIdAndPatientId(wxId, outpatientDO.getConsumer());
                    if (patientWechatDos == null || patientWechatDos.size() == 0) {
                        throw new Exception("openid不存在!");
                    }
                    WxWechatDO wxWechatDO = wechatDao.findById(wxId);
                    BasePatientWechatDo patientWechatDo = patientWechatDos.get(0);
                    String payUrl = ylzPayService.createSicardPayUrl(wxWechatDO.getAppOriginId(),patientWechatDo.getOpenid(),outpatientDO.getCardNo(),"WX");
                    rs.put("payUrl",payUrl);
                    return rs;
                }
            }
        }
        //2.判断是否有未结束的
        List<WlyyOutpatientDO> list = outpatientDao.findByPatientList(patient);
        if (list != null && list.size() > 0) {

+ 1 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/jdbc/WlyyUserDetailsService.java

@ -547,7 +547,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        String wechatId = request.getParameter("wechat_id");
        String wechatId = request.getParameter("wechatId");
        return wechatId;
    }

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

@ -263,8 +263,10 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.checkOutpatient)
    @ApiOperation(value = "判断是否可用发起门诊", notes = "判断是否可用发起门诊")
    public ObjEnvelop checkOutpatient(@ApiParam(name = "patient", value = "续方明细")
                                      @RequestParam(value = "patient", required = true)String patient)throws Exception{
        return success(prescriptionService.checkOutpatient(patient,wxId));
                                      @RequestParam(value = "patient", required = true)String patient,
                                      @ApiParam(name = "flag", value = "标识是否开启结算")
                                      @RequestParam(value = "flag", required = true)boolean flag)throws Exception{
        return success(prescriptionService.checkOutpatient(patient,wxId,flag));
    }
    
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findAllHospital)