Jelajahi Sumber

代码修改

LAPTOP-KB9HII50\70708 1 tahun lalu
induk
melakukan
52384ae5e9

+ 1 - 0
business/base-service/src/main/java/com/yihu/jw/article/service/BaseMenuManageService.java

@ -358,6 +358,7 @@ public class BaseMenuManageService {
                menuOld.setType(type);
                //menuOld.setIsShow(menuDO.getIsShow());
                menuOld.setMenuImg(menuDO.getMenuImg());
                menuOld.setArticleType(menuDO.getArticleType());
                menuOld.setDescribtion(menuDO.getDescribtion());
                menuOld.setMenuTitle(menuDO.getMenuTitle());
                menuOld.setBgImg(menuDO.getBgImg());

+ 3 - 5
business/base-service/src/main/java/com/yihu/jw/article/service/KnowledgeArticleDictService.java

@ -9,11 +9,9 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.menu.BaseMenuDictDO;
import com.yihu.jw.entity.base.patient.BasePatientBusinessDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.user.UserDO;
import com.yihu.jw.entity.hospital.article.KnowledgeArticleDeptDO;
import com.yihu.jw.entity.hospital.article.KnowledgeArticleDictDO;
import com.yihu.jw.entity.hospital.article.KnowledgeArticleDoctorDO;
import com.yihu.jw.entity.hospital.article.KnowledgeArticleUserDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.entity.hospital.survey.WlyySurveyTemplateDO;
@ -297,9 +295,9 @@ public class KnowledgeArticleDictService extends BaseJpaService<KnowledgeArticle
	 */
	public List<Map<String,Object>> findDeptByArticle(String articleId)throws Exception{
		String sql ="SELECT " +
				" d.article_id AS articleId," +
				" d.dept, " +
				" d.dept_name AS deptName " +
				" d.article_id AS \"articleId\"," +
				" d.dept as \"dept\", " +
				" d.dept_name AS \"deptName\" " +
				" FROM " +
				" wlyy_knowledge_article t " +
				" JOIN wlyy_knowledge_article_dept d ON t.id = d.article_id " +

+ 0 - 8
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java

@ -463,14 +463,6 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
        return response;
    }
/*    public static void main(String[] args) {
        String salt = "ssdq1";
        String pw6 = "250037";
        String pw = MD5.md5Hex(pw6 + "{" + salt + "}");
        System.out.println(pw);
    }*/
    public Boolean updateDoctorPw(String id,String pw,String orgPw){
        if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
            BaseDoctorDO doctorDOs = baseDoctorDao.findByIdAndDel(id);

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorRoleService.java

@ -35,7 +35,7 @@ public class BaseDoctorRoleService extends BaseJpaService<BaseDoctorRoleDO, Base
    public Envelop page (String roleCode,String name,String idcard,int page,int size) {
        String sql = "SELECT r.role_code roleCode,d.id doctorCode,d.name,d.idcard,d.mobile  " ;
        String sql = "SELECT r.role_code as \"roleCode\",d.id as \"doctorCode\",d.name as \"name\",d.idcard as \"idcard\",d.mobile as \"mobile\"  " ;
        String countSql = " select count(d.id) ";
        String from = " from base_doctor_role r,base_doctor d";
        String filters = " where r.role_code = '"+roleCode+"' and r.doctor_code = d.id";

+ 0 - 399
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorService.java

@ -1,399 +0,0 @@
//package com.yihu.jw.doctor.service;
//
//import com.alibaba.fastjson.JSON;
//import com.yihu.jw.doctor.dict.BaseDoctorDao;
//import com.yihu.jw.doctor.dict.DoctorSpecialDiseaseDao;
//import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
//import com.yihu.jw.entity.base.doctor.DoctorSpecialDiseaseDo;
//import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
//import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
//import com.yihu.jw.restmodel.web.Envelop;
//import com.yihu.jw.restmodel.web.MixEnvelop;
//import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
//import com.yihu.jw.util.date.DateUtil;
//import com.yihu.jw.utils.hibernate.HibenateUtils;
//import com.yihu.mysql.query.BaseJpaService;
//import com.yihu.jw.util.encrypt.MD5;
//import net.sf.json.JSONArray;
//import net.sf.json.JSONObject;
//import org.apache.commons.collections.map.HashedMap;
//import org.apache.commons.lang3.StringUtils;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.data.redis.core.StringRedisTemplate;
//import org.springframework.jdbc.core.JdbcTemplate;
//import org.springframework.stereotype.Service;
//
//import java.util.Date;
//import java.util.List;
//import java.util.Map;
//import java.util.Random;
//
//@Service
//public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDao> {
//
//    private static Logger logger = LoggerFactory.getLogger(BaseDoctorService.class);
//
//
//    @Autowired
//    private BaseDoctorDao baseDoctorDao;
//    @Autowired
//    private DoctorSpecialDiseaseDao specialDiseaseDao;
//    @Autowired
//    private JdbcTemplate jdbcTemplate;
//    @Autowired
//    private HibenateUtils hibenateUtils;
//    @Autowired
//    private StringRedisTemplate redisTemplate;
//    @Autowired
//    private WlyyHospitalSysDictDao wlyyHospitalSysDictDao;
//
//
//    /**
//     * 查询医生信息分页列表.
//     * @param city
//     * @param hospital
//     * @param status
//     * @param name
//     * @param page
//     * @param pageSize
//     */
//    public Envelop queryList(String city, String hospital, String status, String name, String type,String typeCode,String dept, int page, int pageSize){
//        Map<String,Object> params = new HashedMap();
//        String sqlTotal ="SELECT " +
//                " COUNT(1) AS \"total\" " +
//                " FROM " +
//                " base_doctor a " +
//                " JOIN base_doctor_hospital b ON a.id = b.doctor_code " +
//                " LEFT JOIN (SELECT * FROM wlyy_charge_dict t WHERE t.dept_type_code ='6') e ON a.charge_type = e.charge_type " +
//                " LEFT JOIN base_doctor_mapping c ON a.id = c.doctor " +
//                " WHERE " +
//                " 1 = 1";
//        if (StringUtils.isNotBlank(city)){
//            sqlTotal += " AND a.city_name =:city";
//            params.put("city",city);
//        }
//        if (StringUtils.isNotBlank(hospital)){
//            sqlTotal += " AND b.org_code =:hospital";
//            params.put("hospital",hospital);
//        }
//        if (StringUtils.isNotBlank(status)){
//            sqlTotal += " AND a.del =:status";
//            params.put("status",status);
//        }
//        if (StringUtils.isNotBlank(name)){
//            name = "%"+name+"%";
//            sqlTotal += " AND (a.name like:name or b.dept_name like:name)";
//            params.put("name",name);
//        }
//        if (StringUtils.isNotBlank(type)){
//            type = "%"+type+"%";
//            sqlTotal += " AND a.outpatient_type like:type";
//            params.put("type",type);
//        }
//        if(StringUtils.isNotBlank(typeCode)){
//            sqlTotal += " AND e.dept_type_code =:typeCode";
//            params.put("typeCode",typeCode);
//        }
//        if(StringUtils.isNotBlank(dept)){
//            sqlTotal += " AND b.dept_code =:dept";
//            params.put("dept",dept);
//        }
//
//        Long count = 0L;
//        List<Map<String,Object>> total = hibenateUtils.createSQLQuery(sqlTotal,params);
//        if(count!=null){
//            //mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
//            count = hibenateUtils.objTransformLong(total.get(0).get("total"));
//        }
//        String sql ="SELECT " +
//                " a.id AS \"id\", " +
//                " a.NAME AS \"name\", " +
//                " a.introduce AS \"introduce\", " +
//                " a.expertise AS \"expertise\", " +
//                " a.outpatient_type AS \"outpatientType\", " +
//                " a.del AS \"del\", " +
//                " b.dept_name AS \"deptName\", " +
//                " e.req_fee AS \"money\" " +
//                " FROM " +
//                " base_doctor a " +
//                " JOIN base_doctor_hospital b ON a.id = b.doctor_code " +
//                " LEFT JOIN (SELECT * FROM wlyy_charge_dict t WHERE t.dept_type_code ='6') e ON a.charge_type = e.charge_type " +
//                " LEFT JOIN base_doctor_mapping c ON a.id = c.doctor " +
//                " WHERE 1=1";
//        if (StringUtils.isNotBlank(city)){
//            sql += " AND a.city_name =:city";
//        }
//        if (StringUtils.isNotBlank(hospital)){
//            sql += " AND b.org_code =:hospital";
//        }
//        if (StringUtils.isNotBlank(status)){
//            sql += " AND a.del =:status";
//        }
//        if (StringUtils.isNotBlank(name)){
//            sql += " AND (a.name like:name or b.dept_name like:name)";
//        }
//        if (StringUtils.isNotBlank(type)){
//            sql += " AND a.outpatient_type like:type";
//        }
//        if(StringUtils.isNotBlank(typeCode)){
//            sql += " AND e.dept_type_code =:typeCode";
//        }
//        if(StringUtils.isNotBlank(dept)){
//            sql += " AND b.dept_code =:dept";
//        }
//
//        logger.info("queryList sql:"+sql);
//
//        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,params,page,pageSize);
//
//        return MixEnvelop.getSuccessListWithPage(BaseHospitalRequestMapping.Prescription.api_success, list, page, pageSize, count);
//    }
//
//    /**
//     * 根据医生ID,获取医生基础信息
//     * @param doctorId
//     * @return
//     */
//    public Object queryById(String doctorId,String typeCode) {
//        Map<String,Object> params = new HashedMap();
//        String sql ="SELECT " +
//                " a.NAME AS \"name\", " +
//                " a.job_title_name AS \"jobTitleName\", " +
//                " a.introduce AS \"introduce\", " +
//                " a.expertise AS \"expertise\", " +
//                " a.photo AS \"photo\", " +
//                " a.outpatient_type AS \"outpatientType\", " +
//                " b.dept_name AS \"deptName\", " +
//                " b.org_name AS \"orgName\", " +
//                " c.mapping_code AS \"jobNumber\", " +
//                " d.disease_name AS \"diseaseName\", " +
//                " d.disease_code AS \"diseaseCode\", " +
//                " e.req_fee AS \"money\" " +
//                " FROM " +
//                " base_doctor a " +
//                " LEFT JOIN base_doctor_hospital b ON a.id = b.doctor_code " +
//                " LEFT JOIN base_doctor_mapping c ON a.id = c.doctor " +
//                " LEFT JOIN wlyy_doctor_special_disease d ON a.id = d.doctor_code " +
//                " LEFT JOIN wlyy_charge_dict e ON a.charge_type = e.charge_type " +
//                " WHERE 1=1 ";
//        if(StringUtils.isNotBlank(doctorId)){
//            sql+=" AND a.id =:id";
//            params.put("id",doctorId);
//        }
//        if(StringUtils.isNotBlank(typeCode)){
//            sql+=" AND e.dept_type_code =:typeCode";
//            params.put("typeCode",typeCode);
//        }
//
//        logger.info("queryById sql:"+sql);
//
//        List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql, params);
//        StringBuilder disease = new StringBuilder();
//        StringBuilder code = new StringBuilder();
//        if (null != list && list.size() > 0){
//            if (list.size() == 1){
//                return  list.get(0);
//            }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"));
//                    }else {
//                        disease.append(","+list.get(i).get("diseaseName"));
//                        code.append(","+list.get(i).get("diseaseCode"));
//                    }
//                }
//                list.get(0).put("diseaseName",disease);
//                list.get(0).put("diseaseCode",code);
//                return  list.get(0);
//            }
//        }
//
//        return null;
//    }
//
//    public Boolean updateList(JSONArray jsonArray){
//        if(jsonArray!=null&&jsonArray.size()>0){
//            for(int i=0;i<jsonArray.size();i++){
//                JSONObject doctor = jsonArray.getJSONObject(i);
//                try {
//                    updateInfo(doctor);
//                }catch (Exception e){
//                    logger.info("update doctor error:"+e.toString());
//                }
//            }
//        }
//        return true;
//    }
//
//    /**
//     * 修改医生服务配置
//     * @param jsonObject
//     */
//    public Boolean update(JSONObject jsonObject)throws Exception{
//        //取出数据
//        String doctorId = jsonObject.get("doctorId").toString();
//        String introduce = jsonObject.get("introduce").toString();
//        String expertise = jsonObject.get("expertise").toString();
//        String photo = jsonObject.get("photo").toString();
//        String outpatientType = jsonObject.get("outpatientType").toString();
//        String newSpecialDisease = jsonObject.get("specialDisease").toString();
//        String newSpecialDiseaseCode = jsonObject.get("specialDiseaseCode").toString();
//        baseDoctorDao.update(doctorId,introduce,expertise,photo,outpatientType);
//        //删除医生旧专病门诊,保存新专病门诊
//        Map<String,Object> params = new HashedMap();
//        String sqlTotal ="SELECT " +
//                " COUNT(1) AS \"total\" " +
//                " FROM " +
//                " wlyy_doctor_special_disease a " +
//                " WHERE " +
//                " 1 = 1";
//        sqlTotal += " AND a.doctor_code =:doctorId";
//        params.put("doctorId",doctorId);
//        Long count = 0L;
//        List<Map<String, Object>> total = hibenateUtils.createSQLQuery(sqlTotal, params);
//        //mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
//        count = hibenateUtils.objTransformLong(total.get(0).get("total"));
//        if (count > 0){
//            specialDiseaseDao.deleteByDoctorCode(doctorId);
//        }
//        if(StringUtils.isNotBlank(newSpecialDisease) && StringUtils.isNotBlank(newSpecialDiseaseCode)){
//            String[] split = newSpecialDisease.split(",");
//            String[] splitCode = newSpecialDiseaseCode.split(",");
//            specialDiseaseDao.deleteByDoctorCode(doctorId);
//            for (int i=0;i<split.length;i++ ){
//                DoctorSpecialDiseaseDo specialDiseaseDo = new DoctorSpecialDiseaseDo();
//                specialDiseaseDo.setDoctorCode(doctorId);
//                specialDiseaseDo.setDiseaseName(split[i]);
//                specialDiseaseDo.setDiseaseCode(splitCode[i]);
//                specialDiseaseDao.save(specialDiseaseDo);
//            }
//        }
//
//        return true;
//    }
//
//    public Boolean updateInfo(JSONObject jsonObject)throws Exception{
//        //取出数据
//        String doctorId = jsonObject.get("doctorId").toString();
//        String outpatientType = jsonObject.get("outpatientType").toString();
//        logger.info("doctor:"+doctorId+" outpatientType:"+outpatientType);
//        BaseDoctorDO doctorDO = baseDoctorDao.getOne(doctorId);
//        doctorDO.setOutpatientType(outpatientType);
//        baseDoctorDao.save(doctorDO);
//        return true;
//    }
//
//
//    /**
//     * 修改医生状态
//     * @param doctorId
//     * @param status
//     */
//    public void updateStatus(String doctorId,String status)throws Exception{
//        baseDoctorDao.updateStatus(doctorId,status);
//    }
//
//    public Boolean updateDoctorPw(String id,String pw,String orgPw){
//        BaseDoctorDO doctorDO = baseDoctorDao.findById(id).orElse(null);
//
//        String orgPwMd5 = MD5.md5Hex(orgPw + "{" + doctorDO.getSalt() + "}");
//        if(!orgPwMd5.equals(doctorDO.getPassword())){
//            return false;
//        }
//        //认证信息设置
//        String salt = randomString(5);
//        doctorDO.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
//        doctorDO.setSalt(salt);
//
//        baseDoctorDao.save(doctorDO);
//
//        //设置更新时间
//        saveDoctorPwlimitDate(id);
//
//        return true;
//    }
//
//    public String randomString(int length) {
//        String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
//        StringBuffer buffer = new StringBuffer();
//        Random random = new Random();
//
//        for(int i = 0; i < length; ++i) {
//            int pos = random.nextInt(str.length());
//            buffer.append(str.charAt(pos));
//        }
//
//        return buffer.toString();
//    }
//
//    public com.alibaba.fastjson.JSONObject findDoctorPwlimitDate(String doctor){
//        String key = "hlwyy:authPw:doctor:" + doctor;
//        String authPw = redisTemplate.opsForValue().get(key);
//        com.alibaba.fastjson.JSONObject valueJson = null;
//        if(StringUtils.isNotBlank(authPw)){
//
//            WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.getOne("pwOverDue");
//            String code[] = wlyyHospitalSysDictDO.getDictCode().split(",");
//            Integer maxDateInt = Integer.parseInt(code[0]);
//            Integer remainDateInt = Integer.parseInt(code[1]);
//
//            valueJson = JSON.parseObject(authPw);
//            Long updateTimeLong = valueJson.getLong("updateTime");
//            Date updateTime = new Date();
//            updateTime.setTime(updateTimeLong);
//            Date maxDate = DateUtil.getPreDays(updateTime,maxDateInt);
//
//            Long betweenDate = (maxDate.getTime() - new Date().getTime())/(60*60*24*1000);
//            valueJson.put("betweenDate",betweenDate);
//            if(betweenDate<remainDateInt){
//                valueJson.put("remaind",true);
//            }else {
//                valueJson.put("remaind",false);
//            }
//        }else {
//            valueJson = new com.alibaba.fastjson.JSONObject();
//            valueJson.put("isChanged",false);
//        }
//        return valueJson;
//    }
//
//    public boolean saveDoctorPwlimitDate(String doctor){
//        String key = "hlwyy:authPw:doctor:" + doctor;
//        com.alibaba.fastjson.JSONObject valueJson = new com.alibaba.fastjson.JSONObject();
//        valueJson.put("updateTime",new Date().getTime());
//        valueJson.put("isChanged",true);
//        redisTemplate.opsForValue().set(key,valueJson.toJSONString());
//        return true;
//    }
//
//
//
//
////    public static void main(String ag[]){
////        long betweenDate = (DateUtil.strToDate("2020-04-11","yyyy-MM-dd").getTime() - new Date().getTime())/(60*60*24*1000);
////        System.out.println(betweenDate);
////    }
//
////    public static void main(String ag[]){
////        String str = "[ " +
////                "{ " +
////                "\"title\":\"Java 开发\", " +
////                "\"edition\":3, " +
////                "\"author\":[\"smith\",\"张三\",\"李四\"] " +
////                "}, " +
////                "{ " +
////                "\"title\":\"Web 开发\", " +
////                "\"edition\":3, " +
////                "\"author\":[\"Allen\",\"王五\",\"赵六\"] " +
////                "} " +
////                "]";
////        JSONArray json = JSONArray.fromObject(str);
////        for(int i=0;i<json.size();i++){
////            JSONObject doctor = json.getJSONObject(i);
////            doctor.getString("doctor");
////        }
////    }
//}

+ 0 - 15
business/base-service/src/main/java/com/yihu/jw/doctor/service/DoctorSpecialDiseaseService.java

@ -1,15 +0,0 @@
package com.yihu.jw.doctor.service;
import com.yihu.jw.doctor.dao.DoctorSpecialDiseaseDao;
import com.yihu.jw.entity.base.doctor.DoctorSpecialDiseaseDo;
import com.yihu.jw.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 * @author zmk
 * @vsrsion 1.0
 * Created at 2019/12/10
 */
@Service
public class DoctorSpecialDiseaseService extends BaseJpaService<DoctorSpecialDiseaseDo, DoctorSpecialDiseaseDao> {
}

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

@ -4614,7 +4614,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            //医生获取积分数据
            String integrateSql ="SELECT\n" +
                    "\tIFNULL(SUM(integrate), 0) AS total\n" +
                    "\tIFNULL(SUM(integrate), 0) AS \"total\"\n" +
                    "FROM\n" +
                    "\tbase_hospital_user_integrate\n" +
                    "WHERE\n" +
@ -4627,7 +4627,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            rs.put("integrateTotal",integrateTotal.intValue());
            //粉丝、点赞、收藏
            String followSql= " SELECT IFNULL(COUNT(1), 0) AS total FROM base_doctor_patient_follow where doctor= '"+doctor+"' ";
            String followSql= " SELECT IFNULL(COUNT(1), 0) AS \"total\" FROM base_doctor_patient_follow where doctor= '"+doctor+"' ";
            List<Map<String, Object>> followRstotal = hibenateUtils.createSQLQuery(followSql);
            Long followTotal = 0L;
            if (followRstotal != null && followRstotal.size() > 0) {
@ -4636,7 +4636,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            rs.put("followTotal",followTotal);//粉丝数量
            String eulogySql= " SELECT\n" +
                    "\tIFNULL(COUNT(1), 0)  AS total\n" +
                    "\tIFNULL(COUNT(1), 0)  AS \"total\"\n" +
                    "FROM\n" +
                    "\tbase_knowledge_article_doctor\n" +
                    "WHERE\n" +
@ -4659,7 +4659,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            String collectSql= " SELECT\n" +
                    "\tIFNULL(COUNT(1), 0)  AS total\n" +
                    "\tIFNULL(COUNT(1), 0)  AS \"total\"\n" +
                    "FROM\n" +
                    "\tbase_knowledge_article_doctor\n" +
                    "WHERE\n" +
@ -7036,7 +7036,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if(StringUtils.isNoneBlank(patientid)){
            sql+=" , follow.id AS \"followid\" " ;
        }
        sql += ",evaluate.score,a.total";
        sql += ",evaluate.score as \"score\",a.total as \"total\"";
        sql+=" FROM " +
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
@ -7188,7 +7188,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if(StringUtils.isNoneBlank(patientid)){
            groupBy+=" , follow.id" ;
        }
        groupBy += ", evaluate.score,a.total";
        groupBy += ", evaluate.score as \"score\",a.total as \"total\"";
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("isSort").orElse(null);//isSort:1按照后台顺序,0按照系统排序
        if (hospitalSysDictDO!=null&&hospitalSysDictDO.getDictValue().equalsIgnoreCase("1")){
            sql +=" and d.del='1' "+groupBy+" order by d.sort asc  ";

+ 15 - 0
business/base-service/src/main/java/com/yihu/jw/utils/DmDBUtl.java

@ -23,4 +23,19 @@ public class DmDBUtl {
        }
        return field;
    }
    //字段拼接 逗号间隔
    public static String group_concat(String field,String wxId){
        if(StringUtils.isBlank(field)){
            return "";
        }
        if("xm_qsyy_wx".equals(wxId)){
            field = " listagg("+field+",',')";//达梦数据库
        } else if("xm_ykyy_wx".equals(wxId)){
            field = " wm_concat ("+field+" || ',') ";//oracle
        }else {
            field = " GROUP_CONCAT("+field+")";//mysql
        }
        return field;
    }
}

+ 0 - 33
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1248,43 +1248,10 @@ public class ImService {
                }
            }
            //2. 调用HIS挂号接口---START  移到CONTROLER层,直接调用挂号接口
//			DoctorMappingDO doctorMappingDO = doctorMappingService.findMappingCode(doctorCode,wlyyOutpatientDO.getHospital());
//			if(doctorMappingDO==null){
//				throw new RuntimeException("未找到医生映射信息");
//			}
//
//			net.sf.json.JSONObject rs = entranceService.BS10111(wlyyOutpatientDO.getCardNo(),doctorMappingDO.getMappingCode(),wlyyOutpatientDO.getDept(),null,wlyyOutpatientDO.getWinNo(),demoFlag);
//			String rsCode = (String)rs.get("@RESULT");
//			if("0".equals(rsCode)){
//				//存储挂号号
//				String serialNo = (String)rs.get("serial_no");
//				wlyyOutpatientDO.setRegisterNo(serialNo);
//				String conNo = (String)rs.get("@times");
//				wlyyOutpatientDO.setConNo(conNo);
//			}
//
//			//保存日志
//			WlyyHttpLogDO log = new WlyyHttpLogDO();
//			log.setCode("registerOutPatient");
//			log.setName("挂号");
//			log.setPatient(wlyyOutpatientDO.getPatient());
//			log.setDoctor(doctorCode);
//			log.setResponse(rs.toString());
//			log.setRequest("outPatientId="+outpatientCode+"&doctor="+doctorCode);
//			log.setStatus(rsCode);
//			log.setCreateTime(new Date());
//			wlyyHttpLogDao.save(log);
            // 调用HIS挂号接口---END
            /**
             * toto 判断是否存在未审核的复诊
             */
            BaseDoctorDO doctor = baseDoctorDao.findByIdAndDel(doctorCode);
//			doctorCode = doctor.getCode();
            // 查询患者信息

+ 0 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/BaseDoctorService.java

@ -464,7 +464,6 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
        // 组装医生任职机构及职业信息,医生默认可以没有角色,没有机构/部门信息等
        if (!CollectionUtils.isEmpty(hospital)) {
            BaseDoctorHospitalDO baseDoctorHospitalDO = null;
            List<BaseDoctorHospitalDO> hospitalDOList = new ArrayList<>();
            String orgName = "";
            try {
                for (Object object : hospital) {

+ 25 - 17
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/article/ArticleDictEndpoint.java

@ -1,6 +1,5 @@
package com.yihu.jw.hospital.endpoint.article;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.article.dao.KnowledgeArticleDictDao;
import com.yihu.jw.article.service.BaseMenuManageService;
@ -19,11 +18,11 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
 * app文章
@ -64,27 +63,36 @@ public class ArticleDictEndpoint extends EnvelopRestEndpoint {
			@RequestParam(value = "pageSize", required = true,defaultValue = "10")Integer pageSize)throws Exception{
		try {
			String sql = "select * ";
			String countSql = "select count(*) ";
			String filter = " from wlyy_knowledge_article_dict where type=2 and del=1 ";
			String userId=getUID();
			BaseDoctorRoleDO roleDO = doctorRoleDao.findByDoctorCodeAndRoleCode(userId, CommonContant.DR_ARTICLEREVIEWER);
			boolean queryAll=false;
			if (roleDO!=null){
				queryAll=true;
			}
			if (queryAll){
				if(StringUtils.isBlank(filters)){
					filters=filters+"del=1";
				}else{
					filters=filters+";del=1";
				}
			}else {
				if(StringUtils.isBlank(filters)){
					filters=filters+"del=1"+";createUser="+userId+"";
				}else{
					filters=filters+";del=1"+";createUser="+userId+"";
			if (!queryAll){
				filter += " and create_user='"+userId+"'";
			}
			//title?1111;categoryFirst=402803e879a2699d0179a27f3fa10001;categorySecond=402803e879a2699d0179a28c64d50007
			if(org.apache.commons.lang3.StringUtils.isNotBlank(filters)){
				String fil[] = fields.split(";");
				for (String fi:fil){
					if(fi.contains("title?")){
						filter += " and title like '%"+fi.split("?")[1]+"%'";
					}
					if(fi.contains("categoryFirst=")){
						filter += " and category_first='"+fi.split("=")[1]+"'";
					}
					if(fi.contains("categorySecond=")){
						filter += " and category_second='"+fi.split("=")[1]+"'";
					}
				}
			}
			filters += ";type=2";
			List<KnowledgeArticleDictDO> list  = knowledgeArticleDictService.search(fields,filters,sorts,page,pageSize);
			String orderBy = " order by create_time desc limit "+(page-1)*pageSize+","+pageSize;
			List<KnowledgeArticleDictDO> list  = jdbcTemplate.query(sql+filter+orderBy,new BeanPropertyRowMapper<>(KnowledgeArticleDictDO.class));
			for (KnowledgeArticleDictDO articleDictDO:list){
				JSONObject object = menuManageService.findArticleStaticsByArticleId(articleDictDO.getId());
				if (object!=null){
@ -93,10 +101,10 @@ public class ArticleDictEndpoint extends EnvelopRestEndpoint {
					articleDictDO.setFabulous(Integer.parseInt(object.getString("eulogyTotal")));
				}
			}
			List<KnowledgeArticleDictDO> totals  = knowledgeArticleDictService.search(fields,filters,sorts);
			long total  = jdbcTemplate.queryForObject(countSql+filter,Long.class);
			JSONObject result = new JSONObject();
			result.put("total",totals.size());
			result.put("total",total);
			result.put("detailModelList",list);
			return success(result);

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

@ -15,6 +15,7 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.im.ConsultDo;
import com.yihu.jw.entity.base.im.ConsultTeamDo;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.entity.base.wx.WxWechatDO;
@ -57,6 +58,7 @@ import com.yihu.jw.order.BusinessOrderService;
import com.yihu.jw.order.dao.BusinessOrderDao;
import com.yihu.jw.order.pay.utils.PayLogService;
import com.yihu.jw.order.pay.ylz.YlzPayService;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionInfoVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
@ -255,7 +257,22 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    private EnterpriseService enterpriseService;
    @Autowired
    private WxEnterpriseDao wxEnterpriseDao;
    @Autowired
    private BaseOrgDao baseOrgDao;
    @GetMapping(value = "orgInfo")
    @ApiOperation(value = "机构详情", notes = "机构详情")
    public ObjEnvelop orgInfo(@ApiParam(name = "orgCode", value = "机构编码")
                              @RequestParam(value = "orgCode", required = false)String orgCode
    ) {
        try {
            BaseOrgDO orgDO = baseOrgDao.findByCode(orgCode);
            return ObjEnvelop.getSuccess("查询成功",orgDO);
        } catch (Exception e){
            e.printStackTrace();
            return ObjEnvelop.getError("查询失败");
        }
    }
    @GetMapping(value = BaseHospitalRequestMapping.PatientNoLogin.findDoctorByHospitalAndDiseaseAndDept)