Преглед на файлове

Merge branch 'dev' of huangwenjie/patient-co-management into dev

huangwenjie преди 7 години
родител
ревизия
db2dfee0ef

+ 11 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignFamilyServiceService.java

@ -229,6 +229,17 @@ public class SignFamilyServiceService {
        List<SignFamily> signFamilies = jdbcTemplate.query(sql, new BeanPropertyRowMapper(SignFamily.class));
        return signFamilies.get(0);
    }
    
    public SignFamily getSignFamilyByPatient(String patient) {
        String sql = "select * from wlyy_sign_family s where s.patient='" + patient + "' and s.`status`>0 and s.expenses_status=1  ";
        List<SignFamily> signFamilies = jdbcTemplate.query(sql, new BeanPropertyRowMapper(SignFamily.class));
        if(signFamilies.isEmpty()){
            return null;
        }else{
            return signFamilies.get(0);
        }
        
    }
    /**
     * 给患者批量删除服务

+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java

@ -272,7 +272,7 @@ public class SignWebService extends BaseService {
                " from " +
                " ( select patient_apply_date,renew_flag,code,patient,doctor,status,id,apply_date,reason,begin,expenses_status,LENGTH(trim(ifnull(expenses_status,''))) len from wlyy_sign_family where (doctor = ? or doctor_health = ?)  and status > ? and type = 2 order by begin desc ) a " +
                " ,wlyy_patient b " +
                " where a.patient = b.code and (a.expenses_status = '0' or a.len < 1) and (b.`name` like ? or b.mobile like ? ) "+
                " where a.patient = b.code and (a.expenses_status = '0' or a.len < 1 or a.expenses_status = '3') and (b.`name` like ? or b.mobile like ? ) "+
                "order by applyDate desc limit " + page * pageSize + "," + pageSize;
        // 已解约查询语句
@ -349,7 +349,7 @@ public class SignWebService extends BaseService {
                    " AND doctor IS NULL " +
                    " AND STATUS = 0 " +
                    " AND type = 2 " +
                    " AND expenses_status = '0' " +
                    " AND (expenses_status = '0' or expenses_status = '3')" +
                    " ) AS waitSignCount, " +
                    "( " +
                    " SELECT " +
@ -384,7 +384,7 @@ public class SignWebService extends BaseService {
                    "  doctor = '"+doctor+"' " +
                    " AND STATUS = 0 " +
                    " AND type = 2 " +
                    " AND expenses_status = '0' " +
                    " AND (expenses_status = '0' or expenses_status = '3') " +
                    " ) AS waitSignCount, " +
                    "( " +
                    " SELECT " +

+ 14 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/specialist/ThirdSpecialistController.java

@ -1,5 +1,6 @@
package com.yihu.wlyy.web.third.specialist;
import com.yihu.wlyy.service.app.sign.SignFamilyServiceService;
import com.yihu.wlyy.service.specialist.SpecialistService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
@ -22,6 +23,8 @@ public class ThirdSpecialistController extends BaseController{
    @Autowired
    private SpecialistService specialistService;
    @Autowired
    private SignFamilyServiceService signFamilyServiceService;
    @RequestMapping(value = "/findSpecialistTeamInfo", method = RequestMethod.GET)
    @ApiOperation(value = "获取专科医生所在团队信息")
@ -45,4 +48,15 @@ public class ThirdSpecialistController extends BaseController{
            return error(-1, "请求失败");
        }
    }
    
    @RequestMapping(value = "/getPatientSignInfo", method = RequestMethod.GET)
    @ApiOperation(value = "获取团队专病服务信息")
    public String getPatientSignInfo(@ApiParam(name = "patient", value = "居民CODE") @RequestParam(required = true)String patient) {
        try {
            return write(200, "获取成功", "data", signFamilyServiceService.getSignFamilyByPatient(patient));
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
}