Browse Source

海沧bug修复及眼科bug修复

wangzhinan 2 years ago
parent
commit
2a019b9bfb

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

@ -1241,7 +1241,7 @@ public class HcyyEntranceService {
        String condition ="";
        String condition ="";
        logger.info("spellCode"+spellCode+drugNo+"spellCode");
        logger.info("spellCode"+spellCode+drugNo+"spellCode");
        if (!StringUtils.isEmpty(spellCode)){
        if (!StringUtils.isEmpty(spellCode)){
            condition += "<spell_code>"+spellCode+"</spell_code>";
            condition += "<spell_code>"+spellCode.toUpperCase()+"</spell_code>";
        }
        }
        if (!StringUtils.isEmpty(drugNo)){
        if (!StringUtils.isEmpty(drugNo)){
            condition += "<physic_code>"+drugNo+"</physic_code>";
            condition += "<physic_code>"+drugNo+"</physic_code>";

+ 3 - 4
business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java

@ -168,7 +168,6 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
     */
     */
    public MixEnvelop queryPatientBaseInfo(String nameOrIdcard, int page, int size, String sorts)throws Exception{
    public MixEnvelop queryPatientBaseInfo(String nameOrIdcard, int page, int size, String sorts)throws Exception{
        List<Map<String, Object>> result = new ArrayList<>();
        List<Map<String, Object>> result = new ArrayList<>();
        String param = null == nameOrIdcard ? "": nameOrIdcard;
        String sql = "SELECT\n" +
        String sql = "SELECT\n" +
                "\tID AS \"id\",\n" +
                "\tID AS \"id\",\n" +
                "\tidcard AS \"idcard\",\n" +
                "\tidcard AS \"idcard\",\n" +
@ -196,8 +195,9 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
                    "\tNAME LIKE '%"+nameOrIdcard+"%'\n" +
                    "\tNAME LIKE '%"+nameOrIdcard+"%'\n" +
                    "OR idcard LIKE '%"+nameOrIdcard+"%'\n";
                    "OR idcard LIKE '%"+nameOrIdcard+"%'\n";
        }
        }
        sql+="ORDER BY\n" +
                "\tcreate_time DESC";
        /*sql+="ORDER BY\n" +
                "\tcreate_time DESC"*/;
        result = hibenateUtils.createSQLQuery(sql,page,size);
        String countSql = "select count(id) from base_patient where 1=1 " ;
        String countSql = "select count(id) from base_patient where 1=1 " ;
        if (StringUtils.isNoneBlank(nameOrIdcard)){
        if (StringUtils.isNoneBlank(nameOrIdcard)){
            countSql+= " and name like '%" + nameOrIdcard + "%' or idcard like '%" + nameOrIdcard + "%' ";
            countSql+= " and name like '%" + nameOrIdcard + "%' or idcard like '%" + nameOrIdcard + "%' ";
@ -208,7 +208,6 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
            return null;
            return null;
        }
        }
        MixEnvelop envelop = new MixEnvelop();
        MixEnvelop envelop = new MixEnvelop();
        result = hibenateUtils.createSQLQuery(sql,page,size);
        envelop.setDetailModelList(result);
        envelop.setDetailModelList(result);
        envelop.setTotalCount(count.intValue());
        envelop.setTotalCount(count.intValue());
        envelop.setCurrPage(page);
        envelop.setCurrPage(page);