|
|
@@ -361,43 +361,44 @@ public class ChecklistController extends BladeController {
|
|
|
|
|
|
private List<Map> getReportData(ChecklistVO checklist, String dataType, String theDay, Dept dept, List<Dict> check_category, List<Dict> check_item){
|
|
|
List<Map> list = new ArrayList<>();
|
|
|
-
|
|
|
check_category.forEach(category -> {
|
|
|
check_item.forEach(item -> {
|
|
|
- if (category.getDictKey().contains(dataType) && item.getDictKey().contains(dataType) && item.getDictKey().contains(category.getDictKey())){
|
|
|
- if (!dept.getOrgNo().startsWith("999") && !dept.getOrgNo().equals("51614")){
|
|
|
- Map row = new HashMap();
|
|
|
- row.put("orgNo", dept.getOrgNo());
|
|
|
- row.put("deptName", dept.getDeptName());
|
|
|
- row.put("type", category.getDictKey());
|
|
|
- row.put("item", item.getDictKey());
|
|
|
-
|
|
|
- checklist.setType(category.getDictKey());
|
|
|
- checklist.setItem(item.getDictKey());
|
|
|
- checklist.setOrgNo(dept.getOrgNo());
|
|
|
-// checklist.setIsChecked(1);
|
|
|
- List<ChecklistVO> dataList = checklistService.getDataList(checklist);
|
|
|
- int checkedCount = dataList.size();
|
|
|
- List<ChecklistVO> dlistOver = checklistService.getOverList(checklist);
|
|
|
- int overCount = dlistOver.size();
|
|
|
- int nocheckCount = (checkedCount > 0 || overCount > 0) ? 0 : 1;
|
|
|
- if (checkedCount > 0){
|
|
|
- Checklist one = dataList.get(0);
|
|
|
- row.put("checkDate", DateUtil.format(one.getCheckDate(), pattern));
|
|
|
- }
|
|
|
- if (overCount > 0){
|
|
|
- Checklist one = dlistOver.get(0);
|
|
|
- row.put("checkDate", DateUtil.format(one.getCheckDate(), pattern));
|
|
|
+ if (category.getIsSealed().equals(0) && item.getIsSealed().equals(0)){
|
|
|
+ if (category.getDictKey().contains(dataType) && item.getDictKey().contains(dataType) && item.getDictKey().contains(category.getDictKey())){
|
|
|
+ if (!dept.getOrgNo().startsWith("999") && !dept.getOrgNo().equals("51614")){
|
|
|
+ Map row = new HashMap();
|
|
|
+ row.put("orgNo", dept.getOrgNo());
|
|
|
+ row.put("deptName", dept.getDeptName());
|
|
|
+ row.put("type", category.getDictKey());
|
|
|
+ row.put("item", item.getDictKey());
|
|
|
+
|
|
|
+ checklist.setType(category.getDictKey());
|
|
|
+ checklist.setItem(item.getDictKey());
|
|
|
+ checklist.setOrgNo(dept.getOrgNo());
|
|
|
+ // checklist.setIsChecked(1);
|
|
|
+ List<ChecklistVO> dataList = checklistService.getDataList(checklist);
|
|
|
+ int checkedCount = dataList.size();
|
|
|
+ List<ChecklistVO> dlistOver = checklistService.getOverList(checklist);
|
|
|
+ int overCount = dlistOver.size();
|
|
|
+ int nocheckCount = (checkedCount > 0 || overCount > 0) ? 0 : 1;
|
|
|
+ if (checkedCount > 0){
|
|
|
+ Checklist one = dataList.get(0);
|
|
|
+ row.put("checkDate", DateUtil.format(one.getCheckDate(), pattern));
|
|
|
+ }
|
|
|
+ if (overCount > 0){
|
|
|
+ Checklist one = dlistOver.get(0);
|
|
|
+ row.put("checkDate", DateUtil.format(one.getCheckDate(), pattern));
|
|
|
+ }
|
|
|
+
|
|
|
+ if ("day".equals(dataType)){
|
|
|
+ row.put("needCheckDate", theDay);
|
|
|
+ }
|
|
|
+
|
|
|
+ row.put("checked", checkedCount);
|
|
|
+ row.put("nocheck", nocheckCount);
|
|
|
+ row.put("over", dlistOver.size());
|
|
|
+ list.add(row);
|
|
|
}
|
|
|
-
|
|
|
- if ("day".equals(dataType)){
|
|
|
- row.put("needCheckDate", theDay);
|
|
|
- }
|
|
|
-
|
|
|
- row.put("checked", checkedCount);
|
|
|
- row.put("nocheck", nocheckCount);
|
|
|
- row.put("over", dlistOver.size());
|
|
|
- list.add(row);
|
|
|
}
|
|
|
}
|
|
|
});
|