|
@ -413,7 +413,7 @@ public class SynergyManageService extends BaseJpaService {
|
|
whereSql+= " and ( "+labelSql.substring(3)+" )";
|
|
whereSql+= " and ( "+labelSql.substring(3)+" )";
|
|
}
|
|
}
|
|
if(isFollow!=null&&isFollow==1){//跟进
|
|
if(isFollow!=null&&isFollow==1){//跟进
|
|
leftSql+=" LEFT JOIN manage_synergy_workorder_servicer_log ll on ll.service_patient_code=s.code ";
|
|
|
|
|
|
leftSql+=" LEFT JOIN manage_synergy_workorder_servicer_log ll on ll.workorder_service_code=s.code ";
|
|
whereSql+=" and ll.follow_up=2 ";
|
|
whereSql+=" and ll.follow_up=2 ";
|
|
}
|
|
}
|
|
String sql =" select DISTINCT w.*,s.mobile,s.service_patient_name,s.service_patient_code,s.code as servicerCode,s.town_name,s.hospital_name " +
|
|
String sql =" select DISTINCT w.*,s.mobile,s.service_patient_name,s.service_patient_code,s.code as servicerCode,s.town_name,s.hospital_name " +
|
|
@ -421,7 +421,7 @@ public class SynergyManageService extends BaseJpaService {
|
|
" from manage_synergy_workorder_servicer s " +
|
|
" from manage_synergy_workorder_servicer s " +
|
|
" LEFT JOIN manage_synergy_workorder w on s.workorder_code=w.code " +
|
|
" LEFT JOIN manage_synergy_workorder w on s.workorder_code=w.code " +
|
|
" LEFT JOIN manage_synergy_workorder_executor e on e.workorder_code=w.code " + leftSql+
|
|
" LEFT JOIN manage_synergy_workorder_executor e on e.workorder_code=w.code " + leftSql+
|
|
" LEFT JOIN manage_synergy_workorder_customer_log l on l.service_patient_code=s.service_patient_code " +
|
|
|
|
|
|
" LEFT JOIN manage_synergy_workorder_customer_log l on l.workorder_service_code = s.code " +
|
|
" where s.status=1 and s.workorderCode='"+workorderCode+"' " +
|
|
" where s.status=1 and s.workorderCode='"+workorderCode+"' " +
|
|
" and w.del=1 and w.status=2 and e.del=1 "+
|
|
" and w.del=1 and w.status=2 and e.del=1 "+
|
|
whereSql+" order by l.id desc";
|
|
whereSql+" order by l.id desc";
|