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

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

humingfen преди 5 години
родител
ревизия
3b8e59f7da

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

@ -24,6 +24,7 @@ import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.hospital.consult.dao.HospitalWaitingRoomDao;
@ -38,6 +39,7 @@ import com.yihu.jw.hospital.mapping.service.PatientMappingService;
import com.yihu.jw.hospital.message.service.SystemMessageService;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.order.dao.BusinessOrderDao;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.patient.dao.BaseDoctorPatientFollowDao;
import com.yihu.jw.patient.dao.BasePatientDao;
@ -163,6 +165,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private WlyyHospitalWorkRuleDao wlyyHospitalWorkRuleDao;
    @Autowired
    private BaseDoctorInfoService baseDoctorService;
    @Autowired
    private BusinessOrderDao businessOrderDao;
    @Value("${demo.flag}")
@ -297,6 +301,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (rstotal != null && rstotal.size() > 0) {
            count = Long.parseLong(rstotal.get(0).get("total").toString()) ;
        }
        String condition = "";
        if("xm_ykyy_wx".equals(wechatId)){
            condition= "to_char(o.register_date ,'yyyy-MM-dd hh24:mi:ss' ) AS \"registerDate\"," ;
        }else{
            condition=  "date_format(o.register_date ,'%Y-%m-%d %H:%i:%S' ) AS registerDate," ;
        }
        String sql ="SELECT " +
                " o.id AS \"id\", " +
                " o.adm_no AS \"admNo\", " +
@ -326,8 +336,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " o.disease_img AS \"diseaseImg\", " +
                " o.create_time AS \"createTime\", " +
                " o.status AS \"status\"," +
                " o.register_date AS \"registerDate\"," +
                " o.evaluate_status AS \"evaluateStatus\"" +
                condition+
              /*  " o.register_date AS \"registerDate\"," +*/
                " o.evaluate_status AS \"evaluateStatus\"," +
                " o.pay_status as \"payStatus\" "+
                " FROM " +
                " wlyy_outpatient o " +
@ -1784,12 +1795,18 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            prescriptionDO = new WlyyPrescriptionDO();
            prescriptionDO.setOutpatientId(outPatientId);
        }
        prescriptionDO.setType(1);
        prescriptionDO.setDept(outpatientDO.getDept());
        prescriptionDO.setCreateTime(new Date());
        prescriptionDO.setStatus(10);
        prescriptionDO.setPatientCode(outpatientDO.getPatient());
        prescriptionDO.setPatientName(outpatientDO.getPatientName());
        prescriptionDO.setDoctor(outpatientDO.getDoctor());
        prescriptionDO.setDoctorName(outpatientDO.getDoctorName());
        if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
            BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(prescriptionDO.getOutpatientId());
            prescriptionDO.setOrderNo(businessOrderDO.getOrderNo());
        }
        WlyyPrescriptionDO prescription = prescriptionDao.save(prescriptionDO);
        //========================处方操作结束=============================================================

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

@ -767,7 +767,7 @@ public class YkyyEntranceService {
    public String findByRealOrder(String code) throws Exception {
        List<WlyyPrescriptionDO>  wlyyPrescriptionDOs = prescriptionDao.findByPatientCode(code);
        List<WlyyPrescriptionDO>  wlyyPrescriptionDOs = prescriptionDao.findById(code);
        if (wlyyPrescriptionDOs!=null&&wlyyPrescriptionDOs.size()!=0){
            WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOs.get(0);
            JSONObject objectString = (JSONObject) JSONObject.toJSON(wlyyPrescriptionDO);
@ -776,6 +776,7 @@ public class YkyyEntranceService {
            List<WlyyPrescriptionInfoVO> wlyyPrescriptionInfoVOS = new ArrayList<>();
            for (WlyyPrescriptionInfoDO wlyyPrescriptionInfoDO:wlyyPrescriptionInfoDOS){
                JSONObject object = (JSONObject) JSONObject.toJSON(wlyyPrescriptionInfoDO);
                logger.info("11111参数入参"+object.toJSONString());
                WlyyPrescriptionInfoVO prescriptionInfoVO = JSONObject.toJavaObject(object,WlyyPrescriptionInfoVO.class);
                wlyyPrescriptionInfoVOS.add(prescriptionInfoVO);
            }
@ -783,7 +784,7 @@ public class YkyyEntranceService {
            synPrecriptionHis(prescriptionVO);
        }
        return null;
        return wlyyPrescriptionDOs.toString();
    }
@ -820,24 +821,28 @@ public class YkyyEntranceService {
            params.put("json",jsonString);
            params.put("table","HLW_CF01");
            logger.info("HLW_CF01:"+jsonString);
            HttpResponse response = HttpUtils.doGet(url,params);
            HttpResponse response = HttpUtils.doGet(saveUrl,params);
            if (response.getStatus()==200){
                logger.info("表HLW_CF01同步成功!");
            }else {
                logger.info("表HLW_CF01同步失败!"+response.getErrorMsg());
            }
            logger.info("处方:"+wlyyPrescriptionVO);
            List<WlyyPrescriptionInfoVO> wlyyPrescriptionInfoVOS =wlyyPrescriptionVO.getInfoVOs();
            for (WlyyPrescriptionInfoVO wlyyPrescriptionInfoVO:wlyyPrescriptionInfoVOS){
                try {
                    logger.info("chufang1============");
                HlwCf02DO hlwCf02DO = new HlwCf02DO();
                hlwCf02DO.setCFSB(Integer.parseInt(wlyyPrescriptionVO.getRealOrder()));
                hlwCf02DO.setYPXH(Integer.parseInt(wlyyPrescriptionInfoVO.getDrugNo()));
                logger.info("drugNo"+hlwCf02DO.getYPXH());
                hlwCf02DO.setYPCD(Integer.parseInt(wlyyPrescriptionInfoVO.getDrugPlace()));
                hlwCf02DO.setXMLX(1);
                hlwCf02DO.setCFTS(1);
                hlwCf02DO.setYPSL(Double.parseDouble(wlyyPrescriptionInfoVO.getQuantity()));
                hlwCf02DO.setYPDJ(wlyyPrescriptionInfoVO.getPackRetprice());
                hlwCf02DO.setHJJE(Integer.parseInt(wlyyPrescriptionInfoVO.getQuantity())*wlyyPrescriptionInfoVO.getPackRetprice());//划价价额
                hlwCf02DO.setYPZS(Integer.parseInt(wlyyPrescriptionInfoVO.getFrequency()));
                hlwCf02DO.setYPZS(1);//药品组数  待确定
                hlwCf02DO.setYCSL("0");
                hlwCf02DO.setFYGB(17);//费用归并
                hlwCf02DO.setZFBL(1.0);//自负比例
@ -845,20 +850,25 @@ public class YkyyEntranceService {
                hlwCf02DO.setMRCS(Integer.parseInt(wlyyPrescriptionInfoVO.getDosage()));//每日次数
                hlwCf02DO.setYFBZ(wlyyPrescriptionInfoVO.getPackQuantity());
                hlwCf02DO.setYPYF(wlyyPrescriptionInfoVO.getUsageCode());
                hlwCf02DO.setYPZH(Integer.parseInt(wlyyPrescriptionInfoVO.getFrequency()));
                /*hlwCf02DO.setYPZH(Integer.parseInt(wlyyPrescriptionInfoVO.getFrequency()));*/
                hlwCf02DO.setYFGG(wlyyPrescriptionInfoVO.getSpecification());
              /*  hibenateUtils.save(hlwCf02DO);*/
                String jsonString1 = JSONObject.toJSONString(hlwCf01DO);
                String jsonString1 = JSONObject.toJSONString(hlwCf02DO);
                    logger.info("chufang2============");
                Map<String,Object> params1 = new HashedMap();
                params1.put("json",jsonString1);
                params1.put("table","HLW_CF02");
                logger.info("HLW_CF02:"+jsonString1);
                HttpResponse response1 = HttpUtils.doGet(url,params1);
                HttpResponse response1 = HttpUtils.doGet(saveUrl,params1);
                if (response1.getStatus()==200){
                    logger.info("表HLW_CF02同步成功!");
                }else {
                    logger.info("表HLW_CF02同步失败!"+response1.getErrorMsg());
                }
                }catch (Exception e){
                    e.printStackTrace();
                    e.getMessage();
                }
            }
        }

+ 0 - 1
business/im-service/src/main/java/com/yihu/jw/im/util/ImUtil.java

@ -710,7 +710,6 @@ public class ImUtil {
	 *获取所有会话未读消息数。
	 * @param userid
	 * @param type
	 * @param status
	 * @return
	 */
	public Integer SessionsUnreadMessageCount(String userid,Integer type){

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/HlwCf02DO.java

@ -11,7 +11,7 @@ import java.util.Date;
 * */
@Entity
@Table(name = "HLW_CF02")
@SequenceGenerator(name="id_generated", sequenceName="HLW_CF02_SEQ")
@SequenceGenerator(name="id_generated", sequenceName="SEQ_HLW_CF02")
public class HlwCf02DO {
    private Integer sBXH;//NUMBER(18)   N注释
    private Integer cFSB;//NUMBER(18)   N识别序号

+ 1 - 1
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java

@ -215,7 +215,7 @@ public class BasicZuulFilter extends ZuulFilter {
    private static boolean sqlValidate(String str) {
        str = str.toLowerCase();//统一转为小写,比较简单的单词加入右边空格,避免单词中包含字段
        String badStr = "and |exec |execute |insert |select |delete |update |drop |*|chr |mid |master |truncate |" +
        String badStr = "and |exec |execute |insert |select |delete |update |drop |chr |mid |master |truncate |" +
                "declare | sitename |net user|xp_cmdshell|or |exec |execute |create |" +
                "table |from |grant |use |group_concat|column_name|" +
                "information_schema.columns|table_schema|union |where |select |update |order |by |like |" +

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

@ -244,14 +244,12 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
        }else{
            return success("该身份证无法找到医生",-1);
        }
        //专家咨询
        if("412821198807284025".equals(doctorIdcard)){//测试用写死的数据
            result.put("zxCount",2);//咨询数量
            result.put("fzCount",4);//图文复诊数量
        }else{
            result.put("zxCount",imService.sessionCountByType(doctor.getId(),1,0));//咨询数量
            result.put("fzCount",prescriptionService.getWaitVideoCount(doctor.getId(),"1","1"));//图文复诊数量
        }
    
        //医生咨询
        Integer unreadMessageCount = imService.SessionsUnreadMessageCount(doctor.getId(),1);
        result.put("zxCount",unreadMessageCount);//咨询数量
        result.put("fzCount",prescriptionService.getWaitVideoCount(doctor.getId(),"1","1"));//图文复诊数量
        return success("请求成功",result);
    }