|
@@ -41,6 +41,10 @@ import com.diagbot.vo.GetQcClickInnerPageVO;
|
|
|
import com.diagbot.vo.GetQcClickVO;
|
|
|
import com.diagbot.vo.MedClickInfoVO;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.josql.Query;
|
|
|
+import org.josql.QueryExecutionException;
|
|
|
+import org.josql.QueryParseException;
|
|
|
+import org.josql.QueryResults;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -132,6 +136,8 @@ public class DataAnalysisFacade {
|
|
|
if (null != behospitalInfo) {
|
|
|
medQcresultClick.setDeptId(behospitalInfo.getBehDeptId());
|
|
|
medQcresultClick.setDeptName(behospitalInfo.getBehDeptName());
|
|
|
+ medQcresultClick.setDoctorId(behospitalInfo.getDoctorId());
|
|
|
+ medQcresultClick.setDoctorName(behospitalInfo.getDoctorName());
|
|
|
}
|
|
|
medQcresultClick.setQcresultInfoId(qcresultInfo.getId());
|
|
|
medQcresultClick.setCasesEntryIds(sbFir.toString());
|
|
@@ -201,8 +207,8 @@ public class DataAnalysisFacade {
|
|
|
}
|
|
|
|
|
|
public IPage<GetEntryDefectImproveDTO> getEntryDefectImprove(GetEntryDefectImproveVO getEntryDefectImproveVO) {
|
|
|
- long size = getEntryDefectImproveVO.getSize();
|
|
|
- long current = getEntryDefectImproveVO.getCurrent();
|
|
|
+ int current = (int)getEntryDefectImproveVO.getCurrent();
|
|
|
+ int size = (int)getEntryDefectImproveVO.getSize();
|
|
|
getEntryDefectImproveVO.setCurrent(1L);
|
|
|
getEntryDefectImproveVO.setSize(Long.MAX_VALUE);
|
|
|
IPage<GetEntryDefectImproveDTO> page = new Page<>();
|
|
@@ -255,42 +261,31 @@ public class DataAnalysisFacade {
|
|
|
page.setSize(size);
|
|
|
page.setTotal(getEntryDefectImproveDTO.size());
|
|
|
page.setCurrent(current);
|
|
|
- List<GetEntryDefectImproveDTO> getEntryDefectImproveDTOS = indexPaging(getEntryDefectImproveDTO, current, size);
|
|
|
- String orderByAsc = null;
|
|
|
- String orderByDesc = null;
|
|
|
- for (Object order : getEntryDefectImproveVO.getOrders()) {
|
|
|
- OrderItem e = (OrderItem) order;
|
|
|
- String column = e.getColumn();
|
|
|
- boolean asc = e.isAsc();
|
|
|
- if(asc){
|
|
|
- orderByAsc= column;
|
|
|
- }else{
|
|
|
- orderByDesc=column;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- // getEntryDefectImproveDTOS= sortList(getEntryDefectImproveDTOS, orderByAsc != null ? orderByAsc : orderByDesc);
|
|
|
+ List<GetEntryDefectImproveDTO> getEntryDefectImproveDTOS = page(getEntryDefectImproveDTO, size, current);
|
|
|
+ getEntryDefectImproveDTOS= sortList(getEntryDefectImproveDTOS, getEntryDefectImproveVO.getAsc() != null ? getEntryDefectImproveVO.getAsc() : getEntryDefectImproveVO.getDesc()+" desc");
|
|
|
page.setRecords(getEntryDefectImproveDTOS);
|
|
|
- return new Page<>();
|
|
|
+ return page;
|
|
|
}
|
|
|
- public List<GetEntryDefectImproveDTO> indexPaging(List<GetEntryDefectImproveDTO> retRecords ,long current,long size){
|
|
|
- //数据返回索引处理
|
|
|
- if(0 == current){
|
|
|
- current = 1;
|
|
|
- }
|
|
|
- int startIndex = ((int)current -1)*10;
|
|
|
- int endIndex = startIndex + (int) size;
|
|
|
-
|
|
|
- if(retRecords.size()>1){
|
|
|
- if( retRecords.size()-startIndex<(int)size){
|
|
|
- retRecords = retRecords.subList(startIndex,retRecords.size());
|
|
|
- }else{
|
|
|
- retRecords = retRecords.subList(startIndex,endIndex );
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Description:分页数据
|
|
|
+ * @Param: [dataList, pageSize, currentPage]
|
|
|
+ * @return: java.util.List<java.lang.String>
|
|
|
+ * @Author: cy
|
|
|
+ * @Date: 2021/12/2
|
|
|
+ */
|
|
|
+ public static List<GetEntryDefectImproveDTO> page(List<GetEntryDefectImproveDTO> retRecords, int pageSize,int currentPage) {
|
|
|
+ List<GetEntryDefectImproveDTO> currentPageList = new ArrayList<>();
|
|
|
+ if (retRecords != null && retRecords.size() > 0) {
|
|
|
+ int currIdx = (currentPage > 1 ? (currentPage - 1) * pageSize : 0);
|
|
|
+ for (int i = 0; i < pageSize && i < retRecords.size() - currIdx; i++) {
|
|
|
+ GetEntryDefectImproveDTO data = retRecords.get(currIdx + i);
|
|
|
+ currentPageList.add(data);
|
|
|
}
|
|
|
}
|
|
|
- return retRecords;
|
|
|
+ return currentPageList;
|
|
|
}
|
|
|
-
|
|
|
/**
|
|
|
* 内存数据排序 使用JoSQL
|
|
|
// * @param list
|
|
@@ -299,7 +294,7 @@ public class DataAnalysisFacade {
|
|
|
*/
|
|
|
|
|
|
|
|
|
-/* public static<T> List<T> sortList(List<T> list, String orderByString) {
|
|
|
+ public static<T> List<T> sortList(List<T> list, String orderByString) {
|
|
|
String josql = " select * from " + list.get(0).getClass().getName() + " order by "+ orderByString;
|
|
|
Query query = new Query();
|
|
|
try {
|
|
@@ -312,7 +307,7 @@ public class DataAnalysisFacade {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
return list;
|
|
|
- }*/
|
|
|
+ }
|
|
|
|
|
|
public Map getEntryTotalMap(List<QcResultDetailInfo> qcResultDetailInfos, Map<String, Long> totalMap) {
|
|
|
Set<String> totalSet = new HashSet<String>();
|
|
@@ -361,6 +356,7 @@ public class DataAnalysisFacade {
|
|
|
|
|
|
public void getEntryDefectImproveByExport (HttpServletResponse response, GetEntryDefectImproveVO
|
|
|
getEntryDefectImproveVO){
|
|
|
+ getEntryDefectImproveVO.setExportType(1L);
|
|
|
getEntryDefectImproveVO.setCurrent(1L);
|
|
|
getEntryDefectImproveVO.setSize(Long.MAX_VALUE);
|
|
|
getEntryDefectImproveVO.setSearchCount(false);
|