|
@@ -30,11 +30,20 @@ public class MainChartService extends CommonService {
|
30
|
30
|
return result;
|
31
|
31
|
}
|
32
|
32
|
|
33
|
|
- public ChartResponse selectPchOdrChart(String brandId, String storeId, String poType) throws Exception {
|
34
|
|
- MainChartEntity entity = mainChartMapper.selectPchOdrChart(brandId, storeId, poType);
|
|
33
|
+ public ChartResponse selectPchOdrChart(String brandId, String storeId, String spplyId, String poType) throws Exception {
|
|
34
|
+ String chartData = null;
|
35
|
35
|
|
36
|
|
- String chartData = "[ [' ', '요청', '진행', '취소'], [' ', " + entity.getPo20Val() + " , " + entity.getPo30Val() + " , " + entity.getPo99Val() + "] ]";
|
|
36
|
+ if (StringUtil.isEmpty(spplyId)) {
|
|
37
|
+ // 브랜드/매장
|
|
38
|
+ MainChartEntity entity = mainChartMapper.selectPchOdrChart(brandId, storeId, spplyId, poType);
|
|
39
|
+ chartData = "[ [' ', '요청', '진행', '취소'], [' ', " + entity.getPo20Val() + " , " + entity.getPo30Val() + " , " + entity.getPo99Val() + "] ]";
|
|
40
|
+ } else {
|
|
41
|
+ // 공급사
|
|
42
|
+ MainChartEntity entity = mainChartMapper.selectPchOdrChart(brandId, storeId, spplyId, poType); // 수주대상
|
|
43
|
+ MainChartEntity deliEntity = mainChartMapper.selectDeliChart(brandId, storeId, spplyId, poType, "DLV0", "dlv_reg_dt"); // 납품서생성 (납품서생성/납품생성일자 비교)
|
37
|
44
|
|
|
45
|
+ chartData = "[ [' ', '수주대상', '납품서생성'], [' ', " + entity.getPo20Val() + " , " + deliEntity.getDlvVal() + "] ]";
|
|
46
|
+ }
|
38
|
47
|
ChartResponse result = new ChartResponse();
|
39
|
48
|
result.setChartData(chartData);
|
40
|
49
|
return result;
|
|
@@ -91,16 +100,16 @@ public class MainChartService extends CommonService {
|
91
|
100
|
String chartData = null;
|
92
|
101
|
if (!StringUtil.isEmpty(storeId)) {
|
93
|
102
|
// 매장 입고
|
94
|
|
- MainChartEntity entity1 = mainChartMapper.selectDeliChart(brandId, storeId, spplyId, deliType, "DLV0"); // 대기 (납품서생성/납품예정일자 비교)
|
95
|
|
- MainChartEntity entity2 = mainChartMapper.selectDeliChart(brandId, storeId, spplyId, deliType, "DLV1"); // 확인 (납품서완료/납품완료일자 비교)
|
|
103
|
+ MainChartEntity entity1 = mainChartMapper.selectDeliChart(brandId, storeId, spplyId, deliType, "DLV0", "dlv_sch_dt"); // 대기 (납품서생성/납품예정일자 비교)
|
|
104
|
+ MainChartEntity entity2 = mainChartMapper.selectDeliChart(brandId, storeId, spplyId, deliType, "DLV1", "dlv_cmplt_dt"); // 확인 (납품서완료/납품완료일자 비교)
|
96
|
105
|
|
97
|
106
|
chartData = "[ [' ', '대기', '확인'], [' ', " + entity1.getDlvVal() + " , " + entity2.getDlvVal() + "] ]";
|
98
|
107
|
} else if (!StringUtil.isEmpty(spplyId)) {
|
99
|
108
|
// 공급사 출고
|
100
|
109
|
// 출고 대상 : 납품서생성, 납품예정일자 비교
|
101
|
110
|
// 출고 확인 : 납품서완료, 납품완료일자 비교
|
102
|
|
- MainChartEntity entity1 = mainChartMapper.selectDeliChart(brandId, storeId, spplyId, deliType, "DLV0"); // 대기 (납품서생성/납품예정일자 비교)
|
103
|
|
- MainChartEntity entity2 = mainChartMapper.selectDeliChart(brandId, storeId, spplyId, deliType, "DLV1"); // 확인 (납품서완료/납품완료일자 비교)
|
|
111
|
+ MainChartEntity entity1 = mainChartMapper.selectDeliChart(brandId, storeId, spplyId, deliType, "DLV0", "dlv_sch_dt"); // 대기 (납품서생성/납품예정일자 비교)
|
|
112
|
+ MainChartEntity entity2 = mainChartMapper.selectDeliChart(brandId, storeId, spplyId, deliType, "DLV1", "dlv_cmplt_dt"); // 확인 (납품서완료/납품완료일자 비교)
|
104
|
113
|
|
105
|
114
|
chartData = "[ [' ', '대상', '확인'], [' ', " + entity1.getDlvVal() + " , " + entity2.getDlvVal() + "] ]";
|
106
|
115
|
}
|