|
@@ -1,33 +1,13 @@
|
1
|
1
|
package com.oqpo.api.service.oper;
|
2
|
2
|
|
3
|
3
|
|
4
|
|
-import com.oqpo.api.entity.oper.FileEntity;
|
5
|
4
|
import com.oqpo.api.entity.oper.MainChartEntity;
|
6
|
|
-import com.oqpo.api.entity.oper.NticeEntity;
|
7
|
|
-import com.oqpo.api.entity.oper.NticeTargetEntity;
|
8
|
|
-import com.oqpo.api.enums.SystemMessageCode;
|
9
|
|
-import com.oqpo.api.exception.GlobalException;
|
10
|
|
-import com.oqpo.api.mapper.FileMapper;
|
11
|
5
|
import com.oqpo.api.mapper.oper.MainChartMapper;
|
12
|
|
-import com.oqpo.api.mapper.oper.NticeMapper;
|
13
|
6
|
import com.oqpo.api.service.CommonService;
|
14
|
|
-import com.oqpo.api.util.HtmlCharConverter;
|
15
|
|
-import com.oqpo.api.web.dto.request.GridRequest;
|
16
|
|
-import com.oqpo.api.web.dto.request.oper.ntice.SaveNticeRequest;
|
17
|
|
-import com.oqpo.api.web.dto.response.GridResponse;
|
18
|
|
-import com.oqpo.api.web.dto.response.oper.mainchart.PchReqChartResponse;
|
19
|
|
-import com.oqpo.api.web.dto.response.oper.ntice.MainNticeSearchResponse;
|
20
|
|
-import com.oqpo.api.web.dto.response.oper.ntice.NticeResponse;
|
21
|
|
-import com.oqpo.api.web.dto.response.oper.ntice.NticeSearchResponse;
|
22
|
|
-import com.oqpo.api.web.dto.response.oper.ntice.NticeTargetResponse;
|
|
7
|
+import com.oqpo.api.web.dto.response.oper.mainchart.ChartResponse;
|
23
|
8
|
import lombok.extern.slf4j.Slf4j;
|
24
|
9
|
import org.springframework.beans.factory.annotation.Autowired;
|
25
|
10
|
import org.springframework.stereotype.Service;
|
26
|
|
-import org.springframework.transaction.annotation.Transactional;
|
27
|
|
-
|
28
|
|
-import java.util.ArrayList;
|
29
|
|
-import java.util.List;
|
30
|
|
-import java.util.stream.Collectors;
|
31
|
11
|
|
32
|
12
|
@Service
|
33
|
13
|
@Slf4j
|
|
@@ -36,12 +16,22 @@ public class MainChartService extends CommonService {
|
36
|
16
|
@Autowired
|
37
|
17
|
private MainChartMapper mainChartMapper;
|
38
|
18
|
|
39
|
|
- public PchReqChartResponse selectPchReqChart(String brandId, String storeId, String prType) throws Exception {
|
|
19
|
+ public ChartResponse selectPchReqChart(String brandId, String storeId, String prType) throws Exception {
|
40
|
20
|
MainChartEntity entity = mainChartMapper.selectPchReqChart(brandId, storeId, prType);
|
41
|
21
|
|
42
|
22
|
String chartData = "[ [' ', '대기', '반려', '승인',], [' ', " + entity.getPr20Val() + " , " + entity.getPr30Val() + " , " + entity.getPr40Val() + "] ]";
|
43
|
23
|
|
44
|
|
- PchReqChartResponse result = new PchReqChartResponse();
|
|
24
|
+ ChartResponse result = new ChartResponse();
|
|
25
|
+ result.setChartData(chartData);
|
|
26
|
+ return result;
|
|
27
|
+ }
|
|
28
|
+
|
|
29
|
+ public ChartResponse selectPchOdrChart(String brandId, String storeId, String poType) throws Exception {
|
|
30
|
+ MainChartEntity entity = mainChartMapper.selectPchOdrChart(brandId, storeId, poType);
|
|
31
|
+
|
|
32
|
+ String chartData = "[ [' ', '요청', '진행', '취소',], [' ', " + entity.getPo20Val() + " , " + entity.getPo30Val() + " , " + entity.getPo99Val() + "] ]";
|
|
33
|
+
|
|
34
|
+ ChartResponse result = new ChartResponse();
|
45
|
35
|
result.setChartData(chartData);
|
46
|
36
|
return result;
|
47
|
37
|
}
|