|
@@ -9,6 +9,7 @@ import com.zd.common.core.web.controller.BaseController;
|
|
|
import com.zd.laboratory.domain.LabWhitelist;
|
|
import com.zd.laboratory.domain.LabWhitelist;
|
|
|
import com.zd.laboratory.domain.XxpClassify;
|
|
import com.zd.laboratory.domain.XxpClassify;
|
|
|
import com.zd.laboratory.domain.XxpInspection;
|
|
import com.zd.laboratory.domain.XxpInspection;
|
|
|
|
|
+import com.zd.laboratory.domain.vo.XxpInspectionVO;
|
|
|
import com.zd.laboratory.service.IXxpClassifyService;
|
|
import com.zd.laboratory.service.IXxpClassifyService;
|
|
|
import com.zd.laboratory.service.IXxpInspectionService;
|
|
import com.zd.laboratory.service.IXxpInspectionService;
|
|
|
import com.zd.model.domain.ResultData;
|
|
import com.zd.model.domain.ResultData;
|
|
@@ -22,7 +23,8 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
-import java.util.List;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 巡查Controller
|
|
* 巡查Controller
|
|
@@ -55,6 +57,46 @@ public class LabXxpInspectionController extends BaseController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * 查询巡查列表(根据时间段)
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize(hasPermi = PerPrefix.LABORATORY_XXP_INSPECTION + PerFun.LIST)
|
|
|
|
|
+ @GetMapping("/listYmd")
|
|
|
|
|
+ @ApiOperation(value = "查询巡查列表")
|
|
|
|
|
+ public List<XxpInspectionVO> listYmd(XxpInspectionVO inspectionVO)
|
|
|
|
|
+ {
|
|
|
|
|
+ Map<String,XxpInspectionVO> allMap = new LinkedHashMap<>();
|
|
|
|
|
+ //startPage();
|
|
|
|
|
+ //获取时间段内签到人员总数
|
|
|
|
|
+ List<XxpInspectionVO> signinList = xxpInspectionService.selectListSignin(inspectionVO);
|
|
|
|
|
+ Optional.ofNullable(signinList).orElseGet(Collections::emptyList)
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .forEach(a->{
|
|
|
|
|
+ a.setNoSignedInCount(0);
|
|
|
|
|
+ allMap.put(a.getDutyTime(),a);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //获取时间段内签到人员总数
|
|
|
|
|
+ List<XxpInspectionVO> notSigninLlist = xxpInspectionService.selectListNotSignin(inspectionVO);
|
|
|
|
|
+ Optional.ofNullable(notSigninLlist).orElseGet(Collections::emptyList)
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .forEach(a->{
|
|
|
|
|
+ if(allMap.get(a.getDutyTime())!=null){
|
|
|
|
|
+ XxpInspectionVO newInspectionVo = allMap.get(a.getDutyTime());
|
|
|
|
|
+ newInspectionVo.setNoSignedInCount(a.getNoSignedInCount());
|
|
|
|
|
+ allMap.put(a.getDutyTime(),newInspectionVo);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ a.setSignInCount(0);
|
|
|
|
|
+ allMap.put(a.getDutyTime(),a);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ return Optional.ofNullable(allMap.entrySet()).orElseGet(Collections::emptySet)
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .map(a->a.getValue())
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
* 导出巡查列表
|
|
* 导出巡查列表
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation(value = "导出巡查列表")
|
|
@ApiOperation(value = "导出巡查列表")
|