Browse Source

健康教育文章处理

8 years ago
parent
commit
42633c2931

+ 5 - 5
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -1926,7 +1926,7 @@ public class FamilyContractService extends BaseService {
        return result;
    }
    public JSONObject findByParamsWithDoctor(String doctorCode, String teamCode, String params) throws Exception {
    public JSONObject findByParamsWithDoctor(String doctorCode, String teamCode, String params,int level) throws Exception {
        JSONObject returnMap = new JSONObject();
        String addressSql = "select a.signcode,a.name,a.address,a.code,a.hasopenid,a.idcard,a.photo from( SELECT " +
                "  sf.CODE signcode, " +
@ -1944,11 +1944,11 @@ public class FamilyContractService extends BaseService {
                " AND sf. STATUS > 0 " +
                // " and sf.doctor = ? " +
                " and sf.admin_team_code = ? " +
                " AND ( sf.doctor_health =? or sf.doctor =? ) ) a where 1=1";
                " AND ( "+(level==2?"sf.doctor =?":"sf.doctor_health =? ")+") ) a where 1=1";
        if (!org.springframework.util.StringUtils.isEmpty(params)) {
            addressSql += " AND a.address like '%" + params + "%'";
        }
        List<Map<String, Object>> datas = jdbcTemplate.queryForList(addressSql, teamCode,doctorCode,doctorCode);
        List<Map<String, Object>> datas = jdbcTemplate.queryForList(addressSql, teamCode,doctorCode);
        if (datas != null && datas.size() > 0) {
            JSONArray jsonArray = new JSONArray();
            for (Map<String, Object> map : datas) {
@ -1981,12 +1981,12 @@ public class FamilyContractService extends BaseService {
                " AND sf. STATUS > 0 " +
                //" and sf.doctor = ? " +
                " and sf.admin_team_code = ? " +
                " AND ( sf.doctor_health = ? or sf.doctor =? ) ) a where 1=1";
                " AND ( "+(level==2?"sf.doctor =?":"sf.doctor_health =? ")+") ) a where 1=1";
        if (!org.springframework.util.StringUtils.isEmpty(params)) {
            patientNameSql += " AND a.name like '%" + params + "%'";
        }
        datas = jdbcTemplate.queryForList(patientNameSql, teamCode,doctorCode,doctorCode);
        datas = jdbcTemplate.queryForList(patientNameSql, teamCode,doctorCode);
        if (datas != null && datas.size() > 0) {
            JSONArray jsonArray = new JSONArray();
            for (Map<String, Object> map : datas) {

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/task/RemindFocusWechatTask.java

@ -36,7 +36,7 @@ public class RemindFocusWechatTask implements Runnable {
    public void run() {
        for (Map<String, Object> p : patients) {
            try {
                if (p.get("mobile") == null || StringUtils.isEmpty(p.get("mobile").toString())) {
                if (p.get("mobile") == null || StringUtils.isEmpty(p.get("mobile").toString())||Integer.parseInt(p.get("status").toString())!=1) {
                    continue;
                }
                String msg = "尊敬的" + p.get("name").toString() + "," + doctor.getName() + "医生提醒您:" +

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorFamilyContractController.java

@ -901,9 +901,9 @@ public class DoctorFamilyContractController extends WeixinBaseController {
    @ResponseBody
    public String findByParamsWithDoctor(
            String teamCode,
            String params,String doctor) {
            String params,String doctor,int level) {
        try {
            JSONObject list = familyContractService.findByParamsWithDoctor(doctor, teamCode, params);
            JSONObject list = familyContractService.findByParamsWithDoctor(doctor, teamCode, params,level);
            return write(200, "签约数据加载成功!", "data", list);
        } catch (Exception e) {
            return error(-1, "查询失败");