|
@@ -5,15 +5,14 @@ package com.cirle.scientific.service.impl;/*
|
5
|
5
|
*/
|
6
|
6
|
|
7
|
7
|
import com.cirle.scientific.dao.QkjSuperviseAppDao;
|
|
8
|
+import com.cirle.scientific.dao.QkjSuperviseResultDao;
|
8
|
9
|
import com.cirle.scientific.po.QkjSuperviseApp;
|
|
10
|
+import com.cirle.scientific.po.QkjSuperviseResultApp;
|
9
|
11
|
import com.cirle.scientific.service.SuperviseAppService;
|
10
|
12
|
import lombok.extern.slf4j.Slf4j;
|
11
|
13
|
import org.springframework.beans.factory.annotation.Autowired;
|
12
|
14
|
import org.springframework.stereotype.Service;
|
13
|
|
-import java.util.Calendar;
|
14
|
|
-import java.util.HashMap;
|
15
|
|
-import java.util.LinkedList;
|
16
|
|
-import java.util.Map;
|
|
15
|
+import java.util.*;
|
17
|
16
|
|
18
|
17
|
/**
|
19
|
18
|
* @author 24901
|
|
@@ -24,6 +23,13 @@ public class SuperviseAppServiceImpl implements SuperviseAppService {
|
24
|
23
|
|
25
|
24
|
private QkjSuperviseAppDao qkjSuperviseAppDao;
|
26
|
25
|
|
|
26
|
+ private QkjSuperviseResultDao qkjSuperviseResultDao;
|
|
27
|
+
|
|
28
|
+ @Autowired
|
|
29
|
+ public void setQkjSuperviseResultDao(QkjSuperviseResultDao qkjSuperviseResultDao) {
|
|
30
|
+ this.qkjSuperviseResultDao = qkjSuperviseResultDao;
|
|
31
|
+ }
|
|
32
|
+
|
27
|
33
|
@Autowired
|
28
|
34
|
public void setQkjSuperviseAppDao(QkjSuperviseAppDao qkjSuperviseAppDao) {
|
29
|
35
|
this.qkjSuperviseAppDao = qkjSuperviseAppDao;
|
|
@@ -39,15 +45,32 @@ public class SuperviseAppServiceImpl implements SuperviseAppService {
|
39
|
45
|
LinkedList<QkjSuperviseApp> resultFile = qkjSuperviseAppDao.findResultFileByYearAndTypeAndMemCard(memCard, year, type);
|
40
|
46
|
for (QkjSuperviseApp qkjSuperviseApp : resultFile) {
|
41
|
47
|
Map<String,Object> map = new HashMap<>();
|
42
|
|
- map.put("month", qkjSuperviseApp.getMonth());
|
43
|
|
- if(null != qkjSuperviseApp.getResultFile()){
|
44
|
|
- if(qkjSuperviseApp.getResultFile().endsWith(".xlsx") || qkjSuperviseApp.getResultFile().endsWith(".xls")){
|
45
|
|
- map.put("result", qkjSuperviseApp.getWordFileResult());
|
|
48
|
+ //如果是线下督导
|
|
49
|
+ if(type == 1){
|
|
50
|
+ if(qkjSuperviseApp.getMonth() <= 3){
|
|
51
|
+ map.put("month", 1);
|
|
52
|
+ }else if(qkjSuperviseApp.getMonth() >= 3 && qkjSuperviseApp.getMonth() <= 6){
|
|
53
|
+ map.put("month", 2);
|
|
54
|
+ }else if(qkjSuperviseApp.getMonth() >= 6 && qkjSuperviseApp.getMonth() <= 9){
|
|
55
|
+ map.put("month", 3);
|
|
56
|
+ }else if(qkjSuperviseApp.getMonth() >= 9 && qkjSuperviseApp.getMonth() <= 12){
|
|
57
|
+ map.put("month", 4);
|
46
|
58
|
}
|
47
|
|
- if(qkjSuperviseApp.getResultFile().endsWith(".jpg") || qkjSuperviseApp.getResultFile().endsWith(".png")){
|
48
|
|
- map.put("result", qkjSuperviseApp.getResultFile());
|
|
59
|
+ }else{
|
|
60
|
+ map.put("month", qkjSuperviseApp.getMonth());
|
|
61
|
+ }
|
|
62
|
+ List<QkjSuperviseResultApp> qkjSuperviseResultApps = qkjSuperviseResultDao.selectAllByMemCardAndTypeAndYearAndMonth(memCard, type, year, qkjSuperviseApp.getMonth());
|
|
63
|
+ List<String> list = new ArrayList<>();
|
|
64
|
+ for (QkjSuperviseResultApp qkjSuperviseResultApp : qkjSuperviseResultApps) {
|
|
65
|
+ String criteria = null;
|
|
66
|
+ if(null != qkjSuperviseResultApp.getIsPass() && qkjSuperviseResultApp.getIsPass() == 1){
|
|
67
|
+ criteria = qkjSuperviseResultApp.getCriteria()+": "+"是";
|
|
68
|
+ }else if(null == qkjSuperviseResultApp.getIsPass() || qkjSuperviseResultApp.getIsPass() == 0){
|
|
69
|
+ criteria = qkjSuperviseResultApp.getCriteria()+": "+"否";
|
49
|
70
|
}
|
|
71
|
+ list.add(criteria);
|
50
|
72
|
}
|
|
73
|
+ map.put("result", list);
|
51
|
74
|
data.add(map);
|
52
|
75
|
}
|
53
|
76
|
}catch (Exception e){
|