|
@@ -0,0 +1,49 @@
|
|
1
|
+package com.oqpo.api.service.oper;
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+import com.oqpo.api.entity.oper.FileEntity;
|
|
5
|
+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
|
+import com.oqpo.api.mapper.oper.MainChartMapper;
|
|
12
|
+import com.oqpo.api.mapper.oper.NticeMapper;
|
|
13
|
+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;
|
|
23
|
+import lombok.extern.slf4j.Slf4j;
|
|
24
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
25
|
+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
|
+
|
|
32
|
+@Service
|
|
33
|
+@Slf4j
|
|
34
|
+public class MainChartService extends CommonService {
|
|
35
|
+
|
|
36
|
+ @Autowired
|
|
37
|
+ private MainChartMapper mainChartMapper;
|
|
38
|
+
|
|
39
|
+ public PchReqChartResponse selectPchReqChart(String brandId, String storeId, String prType) throws Exception {
|
|
40
|
+ MainChartEntity entity = mainChartMapper.selectPchReqChart(brandId, storeId, prType);
|
|
41
|
+
|
|
42
|
+ String chartData = "[ [' ', '대기', '반려', '승인',], [' ', " + entity.getPr20Val() + " , " + entity.getPr30Val() + " , " + entity.getPr40Val() + "] ]";
|
|
43
|
+
|
|
44
|
+ PchReqChartResponse result = new PchReqChartResponse();
|
|
45
|
+ result.setChartData(chartData);
|
|
46
|
+ return result;
|
|
47
|
+ }
|
|
48
|
+
|
|
49
|
+}
|