瀏覽代碼

Merge branch 'main' of suhaiwen/wlyy2.0 into dev

wangzhinan 4 年之前
父節點
當前提交
92522f7e98

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

@ -390,7 +390,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            }else {
                condition = "to_char(o.register_date ,'yyyy-MM-dd hh24:mi:ss' ) AS \"registerDate\",";
            }
            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,";
        }
@ -455,6 +454,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        sql += " AND o.outpatient_type != '2' ORDER BY o.create_time DESC ";
        logger.info("sql="+sql);
        List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql, params, page, size);
        return MixEnvelop.getSuccessListWithPage(BaseHospitalRequestMapping.Prescription.api_success, list, page, size, count);
@ -3621,8 +3621,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            logger.info("XZZX_Msg_" + titelType + "=" + responseMsg);
        } else if ("xm_zsyy_wx".equalsIgnoreCase(wxId)) {
            String MsgUrl = "https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/record?outpatientId=" + outpatientDO.getPatient();
            String responseMsg = entranceService.ehospitalNotice(patientDO.getName(),
            String MsgUrl ="";
            if(StringUtils.isNotEmpty(outpatientId)){
                MsgUrl = "https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/record?outpatientId=" + outpatientDO.getPatient();
            }
            if (consPatientDO!=null){
                MsgUrl = "https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/record?outpatientId=" + consPatientDO.getName();
            }
            String responseMsg = entranceService.ehospitalNotice(
                    patientDO.getName(),
                    patientDO.getIdcard(),
                    patientDO.getMobile(),
                    first,
@ -4175,7 +4183,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            params.put("endTime", date);
        }
        if (StringUtils.isNotBlank(orgCode)) {
            sql += " AND  h.org_code = :orgCode";
            sql += " AND  h.org_code =:orgCode";
            params.put("orgCode", orgCode);
        }
        if (StringUtils.isNotBlank(diseaseKey)) {
@ -4189,7 +4197,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        if (StringUtils.isNotBlank(dept)) {
            sql += " AND h.dept_code = :dept ";
            sql += " AND h.dept_code =:dept ";
            params.put("dept", dept);
        }
@ -7137,20 +7145,26 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    "\t) \n" +
                    "WHERE\n" +
                    "\tROWNUM >= " + (page - 1) * size;
            logger.info("oracleSql=" + oracleSql);
            list = jdbcTemplate.query(oracleSql, new BeanPropertyRowMapper<>(WlyyPrescriptionVO.class));
            if (flag){
                sql.append("  limit ").append((page - 1) * size).append(",").append(size);
                logger.info("MySql=" + sql.toString());
                list = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<>(WlyyPrescriptionVO.class));
            }else {
                logger.info("oracleSql=" + oracleSql);
                list = jdbcTemplate.query(oracleSql, new BeanPropertyRowMapper<>(WlyyPrescriptionVO.class));
            }
        } else {
//            sql+=" LIMIT  " + (page - 1) * size + "," + size + "";
            sql.append("  limit ").append((page - 1) * size).append(",").append(size);
            logger.info("MySql=" + sql.toString());
            list = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<>(WlyyPrescriptionVO.class));
        }
//        List<WlyyPrescriptionVO> list = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<>(WlyyPrescriptionVO.class));
        logger.info("countSql=" + countSql.toString());
        List<Map<String, Object>> mapList = jdbcTemplate.queryForList(countSql.toString());
        long count = Long.parseLong(mapList.get(0).get("count").toString());
        logger.info("sql=" + sql.toString());
        logger.info("countSql=" + countSql.toString());
        return PageEnvelop.getSuccessListWithPage(IotRequestMapping.Common.message_success_find, list, page, size, count);
    }

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

@ -96,6 +96,9 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    @Value("${demo.flag}")
    private boolean demoFlag;
    @Value("${wechat.flag}")
    private boolean flag;
    /**
     * 获取居民就诊记录接口
@ -198,8 +201,10 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            businessOrderDO.setOrderType(3);
            businessOrderDO.setOrderCategory("3");
        }
        businessOrderService.saveOrder(businessOrderDO);
        if (!flag){
            businessOrderService.saveOrder(businessOrderDO);
        }
        WlyyPatientRegisterTimeDO registerTimeDO = null;

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

@ -414,18 +414,18 @@ public class YkyyEntranceService {
            jsonObject.put("JZXH","2395501");
            JSONObject jsonObject2 = new JSONObject();
            jsonObject.put("BRID","1168517");
            jsonObject.put("BRXM","于小童");
            jsonObject.put("SJHM","");
            jsonObject.put("SFZH","");
            jsonObject.put("BRXZ","自费");
            jsonObject.put("YSDM","1630");
            jsonObject.put("KDYS","张纯");
            jsonObject.put("KSDM","1101");
            jsonObject.put("KSMC","高度近视专科(五缘院区)");
            jsonObject.put("KSSJ","2020/05/19 15:51:23");
            jsonObject.put("ZDMC","高度近视");
            jsonObject.put("JZXH","2395506");
            jsonObject2.put("BRID","1168517");
            jsonObject2.put("BRXM","于小童");
            jsonObject2.put("SJHM","");
            jsonObject2.put("SFZH","");
            jsonObject2.put("BRXZ","自费");
            jsonObject2.put("YSDM","1630");
            jsonObject2.put("KDYS","张纯");
            jsonObject2.put("KSDM","1101");
            jsonObject2.put("KSMC","高度近视专科(五缘院区)");
            jsonObject2.put("KSSJ","2020/05/19 15:51:23");
            jsonObject2.put("ZDMC","高度近视");
            jsonObject2.put("JZXH","2395506");
            jsonArray.add(jsonObject);
            jsonArray.add(jsonObject2);

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

@ -53,6 +53,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

+ 35 - 7
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1707,7 +1707,11 @@ public class ImService {
				"a.score_type as \"score_type\"," +
				"a.content as \"content\",";
		if("xm_ykyy_wx".equals(wxId)){
			sqlScoreList +=  "to_char(b.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"create_time\",";
			if (flag){
				sqlScoreList +=  "date_format(b.create_time,'%Y-%m-%d %H:%i:%S' )  AS \"create_time\",";
			}else {
				sqlScoreList +=  "to_char(b.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"create_time\",";
			}
		}else{
			sqlScoreList +=  "date_format(b.create_time,'%Y-%m-%d %H:%i:%S' )  AS \"create_time\",";
		}
@ -1880,7 +1884,11 @@ public class ImService {
					"a.title AS \"title\"," +
					"a.symptoms AS \"symptoms\",";
			if("xm_ykyy_wx".equals(wxId)){
				sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
				if (flag){
					sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
				}else {
					sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
				}
			}else{
				sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
			}
@ -1904,7 +1912,11 @@ public class ImService {
					"a.title AS \"title\"," +
					"a.symptoms AS \"symptoms\"," ;
			if("xm_ykyy_wx".equals(wxId)){
				sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
				if (flag) {
					sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
				}else {
					sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
				}
			}else{
				sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
			}
@ -2285,7 +2297,11 @@ public class ImService {
				"a.title AS \"title\"," +
				"a.symptoms AS \"symptoms\"," ;
		if("xm_ykyy_wx".equals(wxId)){
			sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
			if (flag){
				sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
			}else {
				sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
			}
		}else{
			sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
		}
@ -2609,7 +2625,11 @@ public class ImService {
					"a.title AS \"title\"," +
					"a.symptoms AS \"symptoms\",";
			if("xm_ykyy_wx".equals(wxId)){
				sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
				if (flag){
					sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
				}else{
					sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
				}
			}else{
				sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
			}
@ -2634,7 +2654,11 @@ public class ImService {
					"op.description AS \"title\"," +
					"op.description AS \"symptoms\",";
			if("xm_ykyy_wx".equals(wxId)){
				sql = sql + "to_char(op.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
				if (flag){
					sql = sql + "date_format(op.create_time,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
				}else {
					sql = sql + "to_char(op.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
				}
			}else{
				sql = sql + "date_format(op.create_time,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
			}
@ -2649,7 +2673,11 @@ public class ImService {
					"patient.photo AS \"patientphoto\"," +
					"op.id AS \"outpatientId\"," ;
			if("xm_ykyy_wx".equals(wxId)){
				sql = sql + "to_char(op.register_date,'YYYY-MM-DD hh24:mi:ss')  AS \"registerDate\",";
				if (flag){
					sql = sql + "date_format(op.register_date,'%Y-%m-%d %H:%i:%S' )  AS \"registerDate\",";
				}else {
					sql = sql + "to_char(op.register_date,'YYYY-MM-DD hh24:mi:ss')  AS \"registerDate\",";
				}
			}else{
				sql = sql + "date_format(op.register_date,'%Y-%m-%d %H:%i:%S' )  AS \"registerDate\",";
			}