瀏覽代碼

代码修改

suqinyi 3 月之前
父節點
當前提交
8e74ab846c

+ 4 - 2
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/followup/controller/DoctorFollowUpController.java

@ -456,10 +456,12 @@ public class DoctorFollowUpController extends BaseController {
            @ApiParam(value = "结束时间,格式(yyyy-MM-dd)", name = "endDate",required = false) @RequestParam(value = "endDate", required = false) String endDate,
            @ApiParam(name = "flag", value = "区分上门访视(1-是)") @RequestParam(value = "flag", required = false) String flag,
            @ApiParam(name = "type", value = "区分随访计划1、新增随访2、临时随访3、入户随访") @RequestParam(value = "type", required = false) Integer type,
            @ApiParam(name = "status", value = "随访状态") @RequestParam(value = "status", required = false) String status
            @ApiParam(name = "status", value = "随访状态") @RequestParam(value = "status", required = false) String status,
            @ApiParam(name = "disease", value = "疾病id") @RequestParam(value = "disease", required = false) String disease
    ){
        try {
            return write(200, "操作成功!","data",followUpService.findFollowupByMonth(doctor,patient,followupClass,patientName,startDate,endDate,flag,type,status));
            return write(200, "操作成功!","data",followUpService.findFollowupByMonth(doctor,patient,followupClass,patientName,startDate,endDate,flag,type,status,disease));
        }catch (Exception e){
            //日志文件中记录异常信息
            //返回接口异常信息处理结果

+ 11 - 3
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/followup/service/FollowUpService.java

@ -28,6 +28,7 @@ import com.yihu.jw.patient.service.BasePatientService;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.util.idcard.IdCardUtil;
import com.yihu.jw.utils.StringUtil;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.NameValuePair;
@ -1505,13 +1506,17 @@ public class FollowUpService {
    //============================上门访视相关接口================================================
    public Map<String, Object> findFollowupByMonth(String doctor, String patient, String followupClass, String patientName, String startTime, String endTime, String flag, Integer type1, String status) throws Exception {
    public Map<String, Object> findFollowupByMonth(
            String doctor, String patient, String followupClass, String patientName, String startTime, String endTime,
            String flag, Integer type1, String status,String disease) throws Exception {
        String sqlList = "select  wf.id as id,wf.followup_no as followupNo,wf.followup_date as followupDate,wf.followup_plan_date as followupPlanDate,wf.followup_next_date as followupNextDate," +
                " wf.followup_type as followupType,wf.followup_class as followupClass,wf.followup_manager_status as followupManagerStatus,wf.doctor_code as doctorCode,wf.doctor_name as doctorName," +
                "wf.jwdoctor_code as jwdoctorCode,wf.org_code as orgCode,wf.org_name as orgName,wf.jworg_code as jworgCode,wf.patient_code as patientCode,wf.patient_name as patientName,wf.idcard," +
                "wf.data_from as dataFrom,wf.status,wf.followup_content_phone as followupContentPhone,wf.creater,wf.sign_type as signType,wf.admin_team_code as adminTeamCode,wf.sign_code as signCode," +
                "wf.data_from as dataFrom,wf.status,wf.followup_cont ent_phone as followupContentPhone,wf.creater,wf.sign_type as signType,wf.admin_team_code as adminTeamCode,wf.sign_code as signCode," +
                "wf.prescription_code as prescriptionCode,wf.type, q.plan_id as planId ,q.plan_detail_id  as planDetailId,q.id as planItemId ";
        String sql = " from wlyy_followup wf inner join base_service_item_plan q on wf.id=q.relation_code";
        String sql = " from wlyy_followup wf " +
                "  inner join base_service_item_plan q on wf.id=q.relation_code  " +
                "  inner join wlyy_patient_rehabilitation_plan p on q.plan_id=p.id ";
        sql += " where 1=1 and wf.status !=0";
        if (!org.apache.commons.lang.StringUtils.isEmpty(doctor)) {
            sql += " and wf.doctor_code = '" + doctor + "'";
@ -1531,6 +1536,9 @@ public class FollowUpService {
        if (StringUtils.isNotBlank(status)) {
            sql += " and wf.status ='" + status + "' ";
        }
        if (StringUtils.isNotBlank(disease)){
            sql += " and p.disease ='" + disease + "' ";
        }
        if (!org.apache.commons.lang.StringUtils.isEmpty(endTime)) {
            Date currentTime = DateUtil.strToDate(endTime + " 23:59:59");
            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");