Selaa lähdekoodia

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

wangjun 4 vuotta sitten
vanhempi
commit
02a4c77321

+ 9 - 4
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java

@ -203,11 +203,16 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
            }else {
                for (int i=0;i<list.size();i++){
                    if (i == 0 ){
                        disease.append(list.get(i).get("diseaseName"));
                        code.append(list.get(i).get("diseaseCode"));
                        if (list.get(i).get("diseaseName")!=null){
                            disease.append(list.get(i).get("diseaseName"));
                            code.append(list.get(i).get("diseaseCode"));
                        }
                    }else {
                        disease.append(","+list.get(i).get("diseaseName"));
                        code.append(","+list.get(i).get("diseaseCode"));
                        if (list.get(i).get("diseaseName")!=null){
                            disease.append(","+list.get(i).get("diseaseName"));
                            code.append(","+list.get(i).get("diseaseCode"));
                        }
                    }
                }
                list.get(0).put("diseaseName",disease);

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

@ -76,12 +76,10 @@ import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.common.LatitudeUtils;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.wechat.WeixinMessagePushUtils;
import com.yihu.jw.utils.AdminException;
import com.yihu.jw.utils.Pkis.PKIService_PortType;
import com.yihu.jw.utils.Pkis.PKIService_ServiceLocator;
import com.yihu.jw.utils.WebserviceUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.utils.sfutils.MyErrorCode;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.yihu.jw.wechat.dao.WechatDao;
import com.yihu.jw.wechat.dao.WxPushLogDao;
@ -98,7 +96,6 @@ import jxl.write.*;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.xml.XMLSerializer;
import org.apache.commons.codec.binary.*;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@ -113,18 +110,14 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.xml.rpc.ServiceException;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.Boolean;
import java.math.BigDecimal;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Base64;
/**
 * Created by Trick on 2019/5/17.
@ -1655,7 +1648,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                outpatientDao.save(outpatientDO);
                //调用电子病历注册
                manageType = 2;
                registDianziBingli(outpatientDO, basePatientDO, manageType, registerDO.getRegisterNo(), registerDO.getConNo());
                try {
                    registDianziBingli(outpatientDO, basePatientDO, manageType, registerDO.getRegisterNo(), registerDO.getConNo());
                }catch (Exception e){
                    e.printStackTrace();
                }
                return res;
            }
        }
@ -1777,7 +1774,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "<CardNO>" + outpatientDO.getCardNo() + "</CardNO>\n" +
                "<PatientName>" + basePatientDO.getName() + "</PatientName>" +
                "<SexCode>" + basePatientDO.getSex() + "</SexCode>";
        if (1 == basePatientDO.getSex()) {
        if (basePatientDO.getSex()!=null&&1 == basePatientDO.getSex()) {
            _xmlStr = _xmlStr + "<Sex>男</Sex>";
        } else {
            _xmlStr = _xmlStr + "<Sex>女</Sex>";
@ -7147,7 +7144,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionId, 1);
                    List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionId, 1);
                    DoctorMappingDO doctorMappingDO = doctorMappingService.findMappingCode(outpatientDO.getDoctor(), outpatientDO.getHospital());
                    List<WlyyPrescriptionExpressageDO> expressageDOS = prescriptionExpressageDao.findByOutpatientId(outpatientDO.getId());
                    //his处方拼接开方条件
                    com.alibaba.fastjson.JSONArray jsonData = new com.alibaba.fastjson.JSONArray();
                    for (WlyyPrescriptionInfoDO info : infoDOS) {
@ -7158,6 +7155,20 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        //设置his药品查询条件
                        setInspectionParam(jsonData, doctorMappingDO, outpatientDO, wlyyPrescriptionDO, ins, outpatientDO.getIcd10());
                    }
                    if (expressageDOS!=null&&expressageDOS.size()!=0){
                        WlyyPrescriptionExpressageDO prescriptionExpressageDO = expressageDOS.get(0);
                        if (prescriptionExpressageDO!=null&&prescriptionExpressageDO.getOneselfPickupFlg()==0){
                            for (int i=0;i<jsonData.size();i++){
                                com.alibaba.fastjson.JSONObject object = jsonData.getJSONObject(i);
                                object.put("selfDelivered",0);
                            }
                        }else if (prescriptionExpressageDO!=null&&prescriptionExpressageDO.getOneselfPickupFlg()==1){
                            for (int i=0;i<jsonData.size();i++){
                                com.alibaba.fastjson.JSONObject object = jsonData.getJSONObject(i);
                                object.put("selfDelivered",1);
                            }
                        }
                    }
                    Map<String, Object> map = sendHisDiagnosis(jsonData, outpatientDO, wlyyPrescriptionDO);
                    //处方签名
                    logger.info("处方签名");

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

@ -984,6 +984,10 @@ public class EntranceService {
                if (StringUtils.isNotBlank(vo.getFixationfluid())) {
                    sbs.append(" fixationfluid=\"" + vo.getFixationfluid() + "\"");
                }
                logger.info("判断自取或者快递标识"+vo.getSelfDelivered());
                if (StringUtils.isNotBlank(vo.getSelfDelivered())){
                    sbs.append(" self_delivered=\"" + vo.getSelfDelivered() + "\"");
                }
                sbs.append("/>");
            }
            sbs.append("</root>]]></Msg><startNum>1</startNum></MsgInfo></ESBEntry>");

+ 9 - 1
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -2251,6 +2251,14 @@ public class ImService {
			}else {
				map.put("patientAge",null);
			}
			if (map.get("doctor")!=null){
				String doctorId = map.get("doctor").toString();
				BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(doctorId);
				if (baseDoctorDO!=null){
					map.put("doctorName",baseDoctorDO.getName());
				}
			}
		}
		return mapList;
	}
@ -3077,7 +3085,7 @@ public class ImService {
				"count(id) AS \"total\"," +
				"doctor as \"doctor\"" +
				"FROM wlyy_consult_team " +
				"WHERE doctor IN ("+doctorids+") AND (type=1 OR type=15) and status = 0 GROUP BY doctor";
				"WHERE doctor IN ("+doctorids+") AND (type=1 OR type=15 OR type=9 OR type =16) and status = 0 GROUP BY doctor";
		List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
		return list;
	}

+ 9 - 7
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/prescription/WlyyHisPrescriptionVO.java

@ -1,14 +1,7 @@
package com.yihu.jw.restmodel.hospital.prescription;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Date;
import java.util.List;
/**
@ -132,6 +125,7 @@ public class WlyyHisPrescriptionVO extends UuidIdentityVOWithOperator {
    private String ywjcDate;//以往检查时间-病理申请单选填 格式:yyyy-mm-dd',
    private String blzd;//病理诊断-病理申请单选填',
    private String fixationfluid;//固定液
    private String selfDelivered;//快递是否1是0否
@ -440,4 +434,12 @@ public class WlyyHisPrescriptionVO extends UuidIdentityVOWithOperator {
    public void setComm(String comm) {
        this.comm = comm;
    }
    public String getSelfDelivered() {
        return selfDelivered;
    }
    public void setSelfDelivered(String selfDelivered) {
        this.selfDelivered = selfDelivered;
    }
}

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

@ -650,6 +650,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
                patient1.setName(patient.getString("name"));
                patient1.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
                patient1.setSalt(salt);
                patient1.setSex(StringUtils.isNotBlank(idcard)?Integer.parseInt(IdCardUtil.getSexForIdcard_new(idcard)):null);
                patient1.setMobile(mobile);
                patient1.setDel("1");
                patient1.setEnabled(1);

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

@ -490,7 +490,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
            _captcha.setExpiresIn(300);
            wlyyRedisVerifyCodeService.store(client_id, username, captcha, 300);
            Oauth2Envelop<Captcha> oauth2Envelop = new Oauth2Envelop<>("captcha", 200, _captcha);
            Oauth2Envelop<Captcha> oauth2Envelop = new Oauth2Envelop<>("captcha", 200, null);
            HttpHeaders headers = new HttpHeaders();
            headers.set("Cache-Control", "no-store");
            headers.set("Pragma", "no-cache");