Explorar o código

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

liubing %!s(int64=3) %!d(string=hai) anos
pai
achega
0a8c1fa663

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

@ -338,7 +338,24 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            return null;
        }
        logger.info("findOutpatientList patNo " + patNo);
        return entranceService.BS30025(patNo, null, startTime, endTime, demoFlag,ksdm);
        List<WlyyOutpatientVO> wlyyOutpatientVOList  =  entranceService.BS30025(patNo, null, startTime, endTime, demoFlag,ksdm);
        if (!ksdm.equalsIgnoreCase("1500010")){
            List<WlyyOutpatientVO> wlyyOutpatientVOList1  =  entranceService.BS30025(patNo, null, startTime, endTime, demoFlag,"1500010");
            if (wlyyOutpatientVOList!=null&&wlyyOutpatientVOList.size()!=0){
                if(wlyyOutpatientVOList1!=null&&wlyyOutpatientVOList1.size()!=0){
                    for (WlyyOutpatientVO wlyyOutpatientVO:wlyyOutpatientVOList1){
                        logger.info("==="+wlyyOutpatientVO);
                        if (wlyyOutpatientVO!=null){
                            wlyyOutpatientVOList.add(wlyyOutpatientVO);
                        }
                    }
                }
            }else {
                wlyyOutpatientVOList = new ArrayList<>();
                wlyyOutpatientVOList = wlyyOutpatientVOList1;
            }
        }
        return wlyyOutpatientVOList;
    }
    /**

+ 24 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/course/CourseService.java

@ -24,6 +24,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
/**
@ -435,18 +436,40 @@ public class CourseService {
        String sql = "SELECT id,`name`,longitude,latitude FROM base.base_org where del = 1 and type = 4";
        List<Map<String , Object>> positionList = jdbcTemplate.queryForList(sql);
        List<Map<String,Object>> list = new ArrayList<>();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String nowDate = sdf.format(new Date());
        if (positionList.size() > 0){
            for (int i=0;i<positionList.size();i++){
                String sql1 = "SELECT id,`name`,photo,address,longitude,latitude ,funDistance("+positionList.get(i).get("latitude")+","+positionList.get(i).get("longitude")+","+lat2+","+lon2+") funDistance FROM base.base_org where id = '"+positionList.get(i).get("id")+"'";
                String sql1 = "SELECT id,code,`name`,mobile,photo,address,longitude,latitude ,funDistance("+positionList.get(i).get("latitude")+","+positionList.get(i).get("longitude")+","+lat2+","+lon2+") funDistance FROM base.base_org where id = '"+positionList.get(i).get("id")+"'";
                List<Map<String , Object>> mapList = jdbcTemplate.queryForList(sql1);
                Integer num = 0;
                // 判断该机构是否开放报名
                String ksbm = "SELECT COUNT(1) a FROM base_recruit_students WHERE '"+nowDate+"' > create_time AND '"+nowDate+"' < end_time AND del = 1 AND org_code = '"+mapList.get(0).get("code")+"'";
                num = jdbcTemplate.queryForObject(ksbm,Integer.class);
                if (num > 0){
                    String sqlNum = "SELECT allm.num - bbm.num num\n" +
                            "FROM (SELECT num FROM base_recruit_students WHERE org_code = '"+mapList.get(0).get("code")+"') allm,(\n" +
                            "SELECT COUNT(rsr.id) num FROM base_recruit_students rs,base_recruit_students_record rsr WHERE '"+nowDate+"' >rs.start_time AND rs.org_code = '"+mapList.get(0).get("code")+"'\n" +
                            "AND '"+nowDate+"' < rs.end_time AND rs.del = 1 AND rs.id = rsr.recruit_students_id AND rsr.status IN (2,3,6)) bbm";
                    num = jdbcTemplate.queryForObject(sqlNum,Integer.class);
                } else {
                    num = -1; //未开放报名
                }
                String sqlCourse = "SELECT GROUP_CONCAT(DISTINCT `name` SEPARATOR '、') course FROM base_course WHERE org_code = '"+mapList.get(0).get("code")+"' AND del = 1";
                String course = jdbcTemplate.queryForObject(sqlCourse,String.class);
                JSONObject obj = new JSONObject();
                obj.put("id",mapList.get(0).get("id"));
                obj.put("orgCode",mapList.get(0).get("code"));
                obj.put("name",mapList.get(0).get("name"));
                obj.put("photo",mapList.get(0).get("photo"));
                obj.put("address",mapList.get(0).get("address"));
                obj.put("longitude",mapList.get(0).get("longitude"));
                obj.put("latitude",mapList.get(0).get("latitude"));
                obj.put("mobile",mapList.get(0).get("mobile"));
                obj.put("funDistance",mapList.get(0).get("funDistance"));
                obj.put("num",num);
                obj.put("course",course);
                list.add(obj);
            }
            if (list.size() > 0){