Parcourir la source

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

wangzhinan il y a 4 ans
Parent
commit
ce21ef2f34

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

@ -542,7 +542,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                //药品信息
                List<WlyyPrescriptionInfoVO> infoVOs = new ArrayList<>();
                vo.setInfoVOs(convertToModels(prescriptionInfoDao.findByPrescriptionId(vo.getId(), 1), infoVOs, WlyyPrescriptionInfoVO.class));
                System.out.println("=====PrescriptionId======"+vo.getId());
                convertToModels(prescriptionInfoDao.findByPrescriptionId(vo.getId(), 1), infoVOs, WlyyPrescriptionInfoVO.class);
                vo.setInfoVOs(infoVOs);
                //检查检验信息
                List<WlyyInspectionVO> inspectionVOs = new ArrayList<>();
@ -3655,7 +3657,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                //眼科接诊时更新眼科通状态
                if (!flag){
                    if (businessOrderDO!=null){
                        ykyyService.updateYktOrderStatus(businessOrderDO.getOrderNo(),"9");
                        ykyyService.updateYktOrderStatus(businessOrderDO.getOrderNo(),"2");
                    }
                }
            } else if (wxId.equalsIgnoreCase("xm_zsyy_wx")) {

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

@ -23,6 +23,7 @@ import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionExpressageDao;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.hospital.prescription.service.useragent.BaseUserAgent;
import com.yihu.jw.hospital.ykyy.service.YkyyService;
import com.yihu.jw.order.BusinessOrderService;
import com.yihu.jw.order.dao.BusinessOrderDao;
import com.yihu.jw.order.pay.wx.WeChatConfig;
@ -96,7 +97,8 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    private boolean payFlag;
    @Value("${wechat.id}")
    private String wechatId;
    @Autowired
    private YkyyService ykyyService;
    /**
     * 获取居民就诊记录接口
@ -205,7 +207,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        }
        if (!flag){
            businessOrderService.saveOrder(businessOrderDO);
            businessOrderDO = businessOrderService.saveOrder(businessOrderDO);
        }
        WlyyPatientRegisterTimeDO registerTimeDO = null;
@ -262,7 +264,6 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        //3.创建候诊室
        createRoom(outpatient, chargeType);
        return outpatient;
    }

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

@ -1667,10 +1667,10 @@ public class YkyyEntranceService {
            WlyyInspectionDO inspectionDO = inspectionDOS.get(0);
            WlyyOutpatientDO outpatientDO = outpatientDao.findById(inspectionDO.getOutpatientId());
            WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(inspectionDO.getPrescriptionId());
            registNo = prescriptionDO.getSerialNo();
            admNo = prescriptionDO.getAdmNo();
            registNo = prescriptionDO.getRealOrder();
            doctor=outpatientDO.getDoctor();
            patient=outpatientDO.getPatient();
            admNo = outpatientDO.getAdmNo();
        }
        for (WlyyInspectionDO wlyyInspectionDO:inspectionDOS){
            YkEmrJcsqDO ykEmrJcsqDO = new YkEmrJcsqDO();

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -1286,7 +1286,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                //眼科接诊时更新眼科通状态
                if (!flag){
                    if (businessOrderDO!=null){
                        ykyyService.updateYktOrderStatus(businessOrderDO.getOrderNo(),"9");
                        ykyyService.updateYktOrderStatus(businessOrderDO.getOrderNo(),"7");
                    }
                }
            }else if (wxId.equalsIgnoreCase("xm_zsyy_wx")){

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

@ -1658,9 +1658,8 @@ public class ImService {
					businessOrderDO  = businessOrderDao.selectByRelationCode(consult);
				}
				if (businessOrderDO!=null){
					ykyyService.updateYktOrderStatus(businessOrderDO.getOrderNo(),"4");
					String sql ="SELECT * FROM topics t where " +
							"t.id='"+consult+"' and t.reply_user='"+doctor+"' and t.reply is null and t.status IN(0,1) ";
							"t.id='"+consult+"' and t.reply_user is null and t.reply is null and t.status IN(0,1) ";
					List<Map<String,Object>> mapList = jdbcTemplate.queryForList(sql);
					System.out.println("sql+-----"+sql);
					if (null!=mapList&&mapList.size()>0&&mapList.size()==1){

+ 1 - 1
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/UnSettledHISPrescriptionService.java

@ -260,7 +260,7 @@ public class UnSettledHISPrescriptionService {
                                WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionId);
                                wlyyPrescriptionDO.setPrescribeTime(new Date());
                                wlyyPrescriptionDO.setCheckStatus(0);
                                wlyyPrescriptionDO.setCancelReason("审核通过");
                                wlyyPrescriptionDO.setCheckReason("审核通过");
                                prescriptionDao.save(wlyyPrescriptionDO);
                                JSONObject object = (JSONObject) JSONObject.toJSON(wlyyPrescriptionDO);
                                logger.info("wlyyPrescriptionDO参数入参"+object.toJSONString());

+ 2 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -421,6 +421,7 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
		msgObj.put("msg",baseDoctorDO.getName()+"结束了咨询");
		msgObj.put("consultcode",consult);
		String jsonStr = "";
		if ("xm_zsyy_wx".equalsIgnoreCase(wxId)){
		//结束时医生未开处方则发送模板消息结算
		ConsultDo cons = consultDao.findOne(consult);
		if (StringUtils.isNoneBlank(cons.getRelationCode())){
@ -461,6 +462,7 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
				logger.info("发送诊查费支付模板消息end");
			}
		}
		}
		if(1 == resutl){
			jsonStr = "{\"id\":\""+ UUID.randomUUID().toString()+"\",\"sender_id\":\""+doctorCode+"\",\"sender_name\":\"系统\",\"timestamp\":"+new Date().getTime()+",\"content_type\":7,\"content\":"+msgObj.toString()+",\"business_type\":1}";
		}

+ 2 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -630,6 +630,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
		msgObj.put("msg",basePatientDO.getName()+"结束了咨询");
		msgObj.put("consultcode",consult);
		String jsonStr = "";
		if ("xm_zsyy_wx".equalsIgnoreCase(wxId)){
		//结束时医生未开处方则发送模板消息结算
		ConsultDo cons = consultDao.findOne(consult);
		if (org.apache.commons.lang3.StringUtils.isNoneBlank(cons.getRelationCode())){
@ -670,6 +671,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
				logger.info("发送诊查费支付模板消息end");
			}
		}
		}
		if(1 == resutl){
			jsonStr = "{\"id\":\""+UUID.randomUUID().toString()+"\",\"sender_id\":\""+patientCode+"\",\"sender_name\":\"系统\",\"timestamp\":"+new Date().getTime()+",\"content_type\":7,\"content\":"+msgObj.toString()+",\"business_type\":1}";

+ 5 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/KnowledgeArticleService.java

@ -349,7 +349,9 @@ public class KnowledgeArticleService extends BaseJpaService<KnowledgeArticleDO,
                " t.intro as \"intro\",t.category_first_name as \"categoryFirstName\"," +
                " t.category_second_name as \"categorySecondName\" ," +
                "t.content as \"content\",t.image as \"image\",t.create_user_name as \"createUserName\",c.job_title_name as \"jobTitleName\"," +
                "b.dept_name as \"deptName\",b.org_name as \"hospitalName\" from wlyy_knowledge_article t left join wlyy_knowledge_article_dept a " +
                "b.dept_name as \"deptName\",b.org_name as \"hospitalName\"," +
				"t.create_time as \"createTime\" " +
				" from wlyy_knowledge_article t left join wlyy_knowledge_article_dept a " +
                " on a.article_id = t.id left join base_doctor_hospital b on b.doctor_code = t.create_user" +
				" left join base_doctor c on c.id = t.create_user where 1=1 and t.del = 1 and t.status = 1";
		if (StringUtils.isNotBlank(categoryFirst)){
@ -362,7 +364,8 @@ public class KnowledgeArticleService extends BaseJpaService<KnowledgeArticleDO,
            sql+=" and (t.create_user_name like '%"+keyWords+"%' or t.title like '%"+keyWords+"%' or t.content like '%"+keyWords+"%' or a.dept_name like '%"+keyWords+"%' )";
        }
		sql+=" group by t.id ,t.title ,t.intro,t.category_first_name ,t.category_second_name ,c.job_title_name," +
				"t.read_count,t.collection,t.fabulous,t.is_share,t.content ,t.image ,t.create_user_name ,b.dept_name ,b.org_name order by t.create_time desc";
				"t.read_count,t.collection,t.fabulous,t.is_share,t.content ,t.image ,t.create_user_name ,b.dept_name ,b.org_name,t.create_time " +
				" order by t.create_time desc";
        List<Map<String,Object>> result = hibenateUtils.createSQLQuery(sql,page,pageSize);
        List<Map<String,Object>> countList = hibenateUtils.createSQLQuery(sql);
        objEnvelop.setObj(result);