wangzhinan 3 роки тому
батько
коміт
efea27951f

+ 4 - 4
business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java

@ -181,12 +181,12 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                                yktFamilyId = jsonObject2.getString("ID");*/
                            }else {
                                mixEnvelop.setStatus(408);
                                mixEnvelop.setMessage("更新家人关系至眼科通失败");
                                mixEnvelop.setMessage("更新家人关系失败,请核对个人信息.");
                                return mixEnvelop;
                            }
                        }else {
                            mixEnvelop.setStatus(408);
                            mixEnvelop.setMessage("更新家人关系至眼科通失败");
                            mixEnvelop.setMessage("更新家人关系失败,请核对个人信息.");
                            return mixEnvelop;
                        }
                    }else {
@ -201,12 +201,12 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                                result.setYktFamilyId(yktFamilyId);
                            }else {
                                mixEnvelop.setStatus(408);
                                mixEnvelop.setMessage("添加家人关系至眼科通失败");
                                mixEnvelop.setMessage("添加家人关系失败,请核对个人信息.");
                                return mixEnvelop;
                            }
                        }else {
                            mixEnvelop.setStatus(408);
                            mixEnvelop.setMessage("添加家人关系至眼科通失败");
                            mixEnvelop.setMessage("添加家人关系失败,请核对个人信息.");
                            return mixEnvelop;
                        }
                    }

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

@ -102,6 +102,7 @@ import com.yihu.jw.utils.Pkis.PKIService_PortType;
import com.yihu.jw.utils.Pkis.PKIService_ServiceLocator;
import com.yihu.jw.utils.encode.Base64;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.utils.sfutils.HttpClientUtils;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.yihu.jw.wechat.dao.WechatDao;
import com.yihu.jw.wechat.dao.WxPushLogDao;
@ -9365,6 +9366,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    public String testYt()throws Exception{
        Map<String, String> map = new HashedMap();
        map.put("object","cgMLzMGWyPqVrHAD8JrUcLi+zX7o109MEKl+7Hzg8djZPjv9mkQM2fahQdSROvSE423tbABvN5kb0DmT6HyST0VtguxzR2qdan1zvyegsD78QByzTCC97EEB93GYe8ZfsI2b/lsXRv8/ro6nImjkng==");
        String repsonse = HttpClientUtils.doGet("https://www.xmdsyy.cn/dsyy/hospital/open/noLogin/ytzfNotify");
        logger.info(repsonse);
        return repsonse;
    }
    public List<Map<String, Object>> selectByCondition(String hospital, String dept, String checkStatus, String startTime, String endTime, String nameInfo, Integer page, Integer pagesize, String wxId) {
        List<Map<String, Object>> maps = new ArrayList<>();
        String sql = "SELECT\n" +

+ 8 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/YkyyPrescriptionService.java

@ -630,7 +630,14 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            object.put("pack_unit",map.get("yfdw"));
            object.put("pack_unit_name",map.get("yfdw"));
            object.put("yfdw",map.get("yfdw"));
            object.put("yfsb",map.get("yfsb"));//药房识别 3思明6五缘
            if (map.get("yfsb")!=null){
                String yfsb = map.get("yfsb").toString();
                if (yfsb.equalsIgnoreCase("9")){
                    object.put("yfsb",3);//药房识别 3思明6五缘
                }else if (yfsb.equalsIgnoreCase("10")){
                    object.put("yfsb",6);//药房识别 3思明6五缘
                }
            }
            object.put("pack_size",map.get("yfbz"));
            object.put("yfsx",map.get("yfsx"));//药房属性
            object.put("ypjl",map.get("ypjl"));//药剂量

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

@ -2629,8 +2629,13 @@ public class EntranceService {
            sbs.append("<ESBEntry><AccessControl><Fid>" + fid + "</Fid><UserName>" + mqUser + "</UserName><Password>" + mqPwd + "</Password></AccessControl>");
            //MessageHeader :固定值 消费方系统编号 S60,提供方系统编号 S01
            sbs.append("<MessageHeader><Fid>" + fid + "</Fid><MsgDate>" + DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD_HH_MM_SS) + "</MsgDate><SourceSysCode>" + sourceSysCode + "</SourceSysCode><TargetSysCode>" + targetSysCode + "</TargetSysCode></MessageHeader>");
            StringBuffer condition = new StringBuffer();
            if (StringUtils.isNoneBlank(docIdCard)){
                condition.append("<![CDATA[<?xml version=\"1.0\" encoding=\"utf-8\"?><root><resquest Card_Id=\""+docIdCard+"\" ></resquest></root>]]>");
            }
            //查询信息拼接
            sbs.append("<MsgInfo><endNum>10000</endNum><Msg></Msg><startNum>1</startNum></MsgInfo></ESBEntry>");
            sbs.append("<MsgInfo><endNum>10000</endNum><Msg>"+condition+"</Msg><startNum>1</startNum></MsgInfo></ESBEntry>");
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRowMS02003(resp);
@ -2654,7 +2659,7 @@ public class EntranceService {
                                String winNo = "6";
                                doctorCode = null == jsonObjectBody.get("Emp_Code") ? "" : jsonObjectBody.get("Emp_Code").toString();
                                //根据医生及分部,获取医生号别
                                net.sf.json.JSONArray jsonArrayCharge = BS55010(winNo, doctorCode, null, false);
                                /*net.sf.json.JSONArray jsonArrayCharge = BS55010(winNo, doctorCode, null, false);
                                String chareType = null;
                                if (null != jsonArrayCharge) {
                                    for (Object objectCharge : jsonArrayCharge) {
@ -2663,7 +2668,7 @@ public class EntranceService {
                                            chareType = null == jsonObjectBodyCharge.get("charge_type") ? null : jsonObjectBodyCharge.get("charge_type").toString();
                                        }
                                    }
                                }
                                }*/
                                //保存医生信息
                                BaseDoctorDO baseDoctorDO = new BaseDoctorDO();
                                String idCard = null == jsonObjectBody.get("Card_Id") ? "" : jsonObjectBody.get("Card_Id").toString();
@ -2687,7 +2692,7 @@ public class EntranceService {
                                    //姓名
                                    doctorName = null == jsonObjectBody.get("Emp_Name") ? "" : jsonObjectBody.get("Emp_Name").toString();
                                    //号别
                                    baseDoctorDO.setChargeType(chareType);
                                    baseDoctorDO.setChargeType("32");
                                    if (StringUtils.isNotBlank(idCard)) {
                                        baseDoctorDO.setSalt(PwdUtil.randomString(5));
                                        try {

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

@ -1502,7 +1502,7 @@ public class YkyyEntranceService {
                "yp.gyffmc as \"gyffmc\"," +
                "yp.pzwh as \"pzwh\","+
                "yp.yfsb as \"yfsb\""+" FROM " +
                "V_hlwyy_MZ_YPXX yp where 1=1 ";
                "V_hlwyy_MZ_YPXX yp where 1=1 and yp.yfsb in(9,10)  ";
        if (StringUtils.isNoneBlank(ypdm)){
            sql+=" and lower(yp.ypdm) like '%"+ypdm.toLowerCase()+"%' ";
        }
@ -1996,9 +1996,13 @@ public class YkyyEntranceService {
            if (expressageDOList!=null&&expressageDOList.size()!=0){
                WlyyPrescriptionExpressageDO expressageDO = expressageDOList.get(0);
                if (1==expressageDO.getOneselfPickupFlg()){
                    drug = expressageDO.getHospitalCode();
                    if (expressageDO.getHospitalCode().equalsIgnoreCase("3")){
                        drug="9";
                    }else if (expressageDO.getHospitalCode().equalsIgnoreCase("6")){
                        drug="10";
                    }
                }else {
                    drug = "6";
                    drug = "10";
                }
            }
            List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(code,1);

+ 46 - 19
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -32,6 +32,7 @@ import com.yihu.jw.sms.service.YkyyINSMSService;
import com.yihu.jw.sms.service.ZBSmsService;
import com.yihu.jw.sms.service.ZhongShanSMSService;
import com.yihu.jw.sms.util.ykyy.vo.ResultMsg;
import com.yihu.jw.util.common.StringUtil;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.utils.network.HttpResponse;
import com.yihu.utils.network.HttpUtils;
@ -2289,24 +2290,37 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                                                basePatientDO.setPatientStatus("1");
                                                basePatientDao.save(basePatientDO);
                                            }else {
                                                basePatientDO.setDel("1");
                                                basePatientDO.setName(jsonObject.getString("USERNAME"));
                                                basePatientDO.setCreateTime(new Date());
                                                basePatientDO.setUpdateTime(new Date());
                                                basePatientDO.setYktId(jsonObject.getString("ID"));
                                                basePatientDO.setUserId(userId);
                                                basePatientDO.setMobile(tel);
                                                String salt = UUID.randomUUID().toString().substring(0,5);
                                                String pw = tel.substring(tel.length()-6,tel.length());
                                                basePatientDO.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
                                                basePatientDO.setSalt(salt);
                                                basePatientDO.setLocked(0);
                                                basePatientDO.setEnabled(1);
                                                basePatientDO.setPatientStatus("1");
                                                basePatientDao.save(basePatientDO);
                                                List<BasePatientDO> basePatientDOList = basePatientDao.findByMobile(tel);
                                                if(basePatientDOList==null||basePatientDOList.size()==0){
                                                    basePatientDO.setDel("1");
                                                    if (jsonObject.getString("USERNAME").length()>=2){
                                                        basePatientDO.setName(jsonObject.getString("USERNAME"));
                                                    }else {
                                                        basePatientDO.setName(tel);
                                                    }
                                                    basePatientDO.setCreateTime(new Date());
                                                    basePatientDO.setUpdateTime(new Date());
                                                    basePatientDO.setYktId(jsonObject.getString("ID"));
                                                    basePatientDO.setUserId(userId);
                                                    basePatientDO.setMobile(tel);
                                                    String salt = UUID.randomUUID().toString().substring(0,5);
                                                    String pw = tel.substring(tel.length()-6,tel.length());
                                                    basePatientDO.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
                                                    basePatientDO.setSalt(salt);
                                                    basePatientDO.setLocked(0);
                                                    basePatientDO.setEnabled(1);
                                                    basePatientDO.setPatientStatus("1");
                                                    basePatientDao.save(basePatientDO);
                                                }
                                            }
                                        }
                                    }else {
                                        if (jsonObject.getString("USERNAME").length()>=2){
                                            basePatientDO.setName(jsonObject.getString("USERNAME"));
                                        }else {
                                            basePatientDO.setName(tel);
                                        }
                                        basePatientDO.setDel("1");
                                        basePatientDO.setCreateTime(new Date());
                                        basePatientDO.setUpdateTime(new Date());
@ -2332,11 +2346,21 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                                        ykyyService.addFamily(basePatientDO.getUserId(),basePatientDO.getIdcard(),basePatientDO.getName(),sex+"",birdth,age+"",basePatientDO.getMobile());
                                    }*/
                                }
                            }/*else {
                            }else {
                                logger.info("======"+jsonObject.getString("USERNAME")+"======");
                                logger.info("tel"+jsonObject.getString("USERNAME"));
                                BasePatientDO basePatientDO1 = basePatientDOS.get(0);
                                if (basePatientDO1.getName()==null||basePatientDO1.getName()==""){
                                    if (jsonObject.getString("USERNAME").length()>=2){
                                        basePatientDO1.setName(jsonObject.getString("USERNAME"));
                                    }else {
                                        basePatientDO1.setName(tel);
                                    }
                                }
                                basePatientDO1.setUserId(userId);
                                basePatientDao.save(basePatientDO1);
                                String familyList = ykyyService.getFamilyList(null,userId);
                                /*String familyList = ykyyService.getFamilyList(null,userId);
                                JSONObject familyJson = JSONObject.parseObject(familyList);
                                if (familyJson.getString("code").equalsIgnoreCase("200")){
                                    JSONObject object1 = familyJson.getJSONObject("data");
@ -2363,8 +2387,8 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                                        ykyyService.addFamily(basePatientDO1.getUserId(),basePatientDO1.getIdcard(),basePatientDO1.getName(),sex+"",birdth,age+"",basePatientDO1.getMobile());
                                    }
                                }
                            }*/
                                }*/
                            }
                        }
                    }
                }
@ -2597,6 +2621,9 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                                doctorDOs.setVerifyCode(verifyCode);
                                doctorDOs.setYktDoctorId(yktDoctorId);
                                doctorDao.save(doctorDOs);
                            }else {
                                WlyyUserSimple userSimple = new WlyyUserSimple();
                                return getFailedResponse("您的账号未认证,请联系互联网医院工作人员,联系电话0592-2108763。",-1,userSimple);
                            }
                            if (idCard==null||idCard==""){
                                logger.info("身份证为空");

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

@ -2526,6 +2526,15 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    }
    @GetMapping("/testYt")
    public Envelop testYt() throws Exception {
        try {
            return success(prescriptionService.testYt());
        } catch (Exception e) {
            return Envelop.getError(e.getMessage());
        }
    }
    @GetMapping("/BS10145")
    public Envelop BS10145(@ApiParam(name = "id", value = "id")