
--- build/resources/main/mybatis/mapper/bbs/search-SQL.xml
+++ build/resources/main/mybatis/mapper/bbs/search-SQL.xml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 |
작성일 : 2024.06.12 |
6 | 6 |
내 용 : 통합 검색 관리 관련 |
7 | 7 |
--> |
8 |
-<mapper namespace="com.takensoft.cms.search.dao.SearchDAO"> |
|
8 |
+<mapper namespace="com.takensoft.portal.search.dao.SearchDAO"> |
|
9 | 9 |
|
10 | 10 |
<!-- |
11 | 11 |
작 성 자 : 하석형 |
--- build/resources/main/mybatis/mapper/entInfo/bplc-SQL.xml
... | ... | @@ -1,91 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | -<mapper namespace="com.takensoft.portal.entInfo.dao.BplcDAO"> | |
4 | - <!-- 기업주요사업장 resultMap --> | |
5 | - <resultMap id="bplcMap" type="HashMap"> | |
6 | - <result property="bplcId" column="bplc_id" /> | |
7 | - <result property="entId" column="ent_id" /> | |
8 | - <result property="wrkrCnt" column="wrkr_cnt" /> | |
9 | - <result property="bplcAddr" column="bplc_addr" /> | |
10 | - <result property="useYn" column="use_yn" /> | |
11 | - <result property="rgtr" column="rgtr" /> | |
12 | - <result property="regDt" column="reg_dt" /> | |
13 | - <result property="mdfr" column="mdfr" /> | |
14 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
15 | - <result property="bplcNm" column="bplc_nm" /> | |
16 | - <result property="mainPrdt" column="main_prdt" /> | |
17 | - <result property="bplcSiar" column="bplc_siar" /> | |
18 | - <result property="fctryArea" column="fctry_area" /> | |
19 | - <result property="bplcSiarUnit" column="bplc_siar_unit" /> | |
20 | - <result property="fctryAreaUnit" column="fctry_area_unit" /> | |
21 | - </resultMap> | |
22 | - | |
23 | - <!-- | |
24 | - 작 성 자 : 박정하 | |
25 | - 작 성 일 : 2024.06.10 | |
26 | - 내 용 : 기업주요사업장 등록 | |
27 | - --> | |
28 | - <insert id="bplcInsert" parameterType="BplcVO"> | |
29 | - INSERT INTO ent_main_bplc ( | |
30 | - ent_id | |
31 | - , wrkr_cnt | |
32 | - , bplc_addr | |
33 | - , use_yn | |
34 | - , rgtr | |
35 | - , reg_dt | |
36 | - , bplc_nm | |
37 | - , main_prdt | |
38 | - , bplc_siar | |
39 | - , fctry_area | |
40 | - , bplc_siar_unit | |
41 | - , fctry_area_unit | |
42 | - ) VALUES ( | |
43 | - #{entId} | |
44 | - , #{wrkrCnt} | |
45 | - , #{bplcAddr} | |
46 | - , 'Y' | |
47 | - , #{rgtr} | |
48 | - , now() | |
49 | - , #{bplcNm} | |
50 | - , #{mainPrdt} | |
51 | - , #{bplcSiar} | |
52 | - , #{fctryArea} | |
53 | - , #{bplcSiarUnit} | |
54 | - , #{fctryAreaUnit} | |
55 | - ) | |
56 | - </insert> | |
57 | - | |
58 | - <!-- | |
59 | - 작 성 자 : 박정하 | |
60 | - 작 성 일 : 2024.06.10 | |
61 | - 내 용 : 기업주요사업장 수정 | |
62 | - --> | |
63 | - <update id="bplcUpdate" parameterType="BplcVO"> | |
64 | - UPDATE ent_main_bplc | |
65 | - SET wrkr_cnt = #{wrkrCnt} | |
66 | - , bplc_addr = #{bplcAddr} | |
67 | - , use_yn = #{useYn} | |
68 | - , mdfr = #{mdfr} | |
69 | - , mdfcn_dt = now() | |
70 | - , bplc_nm = #{bplcNm} | |
71 | - , main_prdt = #{mainPrdt} | |
72 | - , bplc_siar = #{bplcSiar} | |
73 | - , fctry_area = #{fctryArea} | |
74 | - , bplc_siar_unit = #{bplcSiarUnit} | |
75 | - , fctry_area_unit = #{fctryAreaUnit} | |
76 | - WHERE bplc_id = #{bplcId} | |
77 | - </update> | |
78 | - | |
79 | - <!-- | |
80 | - 작 성 자 : 박정하 | |
81 | - 작 성 일 : 2024.06.10 | |
82 | - 내 용 : 기업주요사업장 삭제 | |
83 | - --> | |
84 | - <update id="bplcUpdateByEntInfoId" parameterType="EntInfoVO"> | |
85 | - UPDATE ent_main_bplc | |
86 | - SET use_yn = 'N', | |
87 | - mdfr = #{mdfr}, | |
88 | - mdfcn_dt = now() | |
89 | - WHERE ent_id = #{entId} | |
90 | - </update> | |
91 | -</mapper>(No newline at end of file) |
--- build/resources/main/mybatis/mapper/entInfo/entInfo-SQL.xml
... | ... | @@ -1,417 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | -<mapper namespace="com.takensoft.portal.entInfo.dao.EntInfoDAO"> | |
4 | - <!-- 기업정보 resultMap --> | |
5 | - <resultMap id="entInfoMap" type="EntInfoVO"> | |
6 | - <result property="entId" column="ent_id" /> | |
7 | - <result property="entNm" column="ent_nm" /> | |
8 | - <result property="brno" column="brno" /> | |
9 | - <result property="rprsvNm" column="rprsv_nm" /> | |
10 | - <result property="lctnAdmdsp" column="lctn_admdsp" /> | |
11 | - <result property="lctnSsg" column="lctn_ssg" /> | |
12 | - <result property="bplcSiar" column="bplc_siar" /> | |
13 | - <result property="bplcSiarUnit" column="bplc_siar_unit" /> | |
14 | - <result property="fctryArea" column="fctry_area" /> | |
15 | - <result property="fctryAreaUnit" column="fctry_area_unit" /> | |
16 | - <result property="ksicUpCd" column="ksic_up_cd" /> | |
17 | - <result property="ksicCd" column="ksic_cd" /> | |
18 | - <result property="ksicNm" column="ksic_nm" /> | |
19 | - <result property="mainPrdct" column="main_prdct" /> | |
20 | - <result property="entCrdt" column="ent_crdt" /> | |
21 | - <result property="fndnDt" column="fndn_dt" /> | |
22 | - <result property="wrkrCnt" column="wrkr_cnt" /> | |
23 | - <result property="rmrk" column="rmrk" /> | |
24 | - <result property="useYn" column="use_yn" /> | |
25 | - <result property="rgtr" column="rgtr" /> | |
26 | - <result property="regDt" column="reg_dt" /> | |
27 | - <result property="mdfr" column="mdfr" /> | |
28 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
29 | - <result property="mvnInten" column="mvn_inten" /> | |
30 | - <result property="mouInten" column="mou_inten" /> | |
31 | - <result property="fileMngId" column="file_mng_id" /> | |
32 | - <collection property="bplcList" column="{entId = ent_id}" javaType="java.util.ArrayList" ofType="BplcVO" select="selectBplcList" /> | |
33 | - </resultMap> | |
34 | - | |
35 | - <!-- 기업주요사업장 resultMap --> | |
36 | - <resultMap id="bplcMap" type="BplcVO"> | |
37 | - <result property="bplcId" column="bplc_id" /> | |
38 | - <result property="entId" column="ent_id" /> | |
39 | - <result property="wrkrCnt" column="wrkr_cnt" /> | |
40 | - <result property="bplcAddr" column="bplc_addr" /> | |
41 | - <result property="useYn" column="use_yn" /> | |
42 | - <result property="rgtr" column="rgtr" /> | |
43 | - <result property="regDt" column="reg_dt" /> | |
44 | - <result property="mdfr" column="mdfr" /> | |
45 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
46 | - <result property="bplcSiarUnit" column="bplc_siar_unit" /> | |
47 | - <result property="fctryAreaUnit" column="fctry_area_unit" /> | |
48 | - </resultMap> | |
49 | - | |
50 | - <!-- | |
51 | - 작 성 자 : 박정하 | |
52 | - 작 성 일 : 2024.03.20 | |
53 | - 내 용 : 기업정보 등록 | |
54 | - --> | |
55 | - <insert id="entInfoInsert" parameterType="EntInfoVO"> | |
56 | - INSERT INTO ent_info ( | |
57 | - ent_id | |
58 | - , ent_nm | |
59 | - , brno | |
60 | - , rprsv_nm | |
61 | - , lctn_admdsp | |
62 | - , lctn_ssg | |
63 | - , bplc_siar | |
64 | - , bplc_siar_unit | |
65 | - , fctry_area | |
66 | - , fctry_area_unit | |
67 | - , ksic_up_cd | |
68 | - , ksic_cd | |
69 | - , ksic_nm | |
70 | - , main_prdct | |
71 | - , ent_crdt | |
72 | - , fndn_dt | |
73 | - , wrkr_cnt | |
74 | - , rmrk | |
75 | - , file_mng_id | |
76 | - , use_yn | |
77 | - , rgtr | |
78 | - , reg_dt | |
79 | - ) VALUES ( | |
80 | - #{entId} | |
81 | - , #{entNm} | |
82 | - , #{brno} | |
83 | - , #{rprsvNm} | |
84 | - , #{lctnAdmdsp} | |
85 | - , #{lctnSsg} | |
86 | - , #{bplcSiar} | |
87 | - , #{bplcSiarUnit} | |
88 | - , #{fctryArea} | |
89 | - , #{fctryAreaUnit} | |
90 | - , #{ksicUpCd} | |
91 | - , #{ksicCd} | |
92 | - , #{ksicNm} | |
93 | - , #{mainPrdct} | |
94 | - , #{entCrdt} | |
95 | - , #{fndnDt}::timestamp | |
96 | - , #{wrkrCnt} | |
97 | - , #{rmrk} | |
98 | - , #{fileMngId} | |
99 | - , 'Y' | |
100 | - , #{rgtr} | |
101 | - , now() | |
102 | - ) | |
103 | - </insert> | |
104 | - | |
105 | - <!-- | |
106 | - 작 성 자 : 박정하 | |
107 | - 작 성 일 : 2024.03.21 | |
108 | - 내 용 : 사업자등록번호 중복 검사 | |
109 | - --> | |
110 | - <select id="selectCntByCheckBrno" resultType="int"> | |
111 | - SELECT count(brno) | |
112 | - FROM ent_info | |
113 | - WHERE use_yn = 'Y' | |
114 | - AND brno = #{brno} | |
115 | - </select> | |
116 | - | |
117 | - <!-- SELECT SQL --> | |
118 | - <sql id="selectItem"> | |
119 | - SELECT ei.ent_id | |
120 | - , ei.ent_nm | |
121 | - , ei.brno | |
122 | - , ei.rprsv_nm | |
123 | - , ei.lctn_admdsp | |
124 | - , ei.lctn_ssg | |
125 | - , ei.bplc_siar | |
126 | - , ei.bplc_siar_unit | |
127 | - , ei.fctry_area | |
128 | - , ei.fctry_area_unit | |
129 | - , ei.ksic_up_cd | |
130 | - , ei.ksic_cd | |
131 | - , ei.ksic_nm | |
132 | - , ei.main_prdct | |
133 | - , ei.ent_crdt | |
134 | - , to_char(ei.fndn_dt, 'YYYY-MM-DD') AS fndn_dt | |
135 | - , ei.wrkr_cnt | |
136 | - , ei.rmrk | |
137 | - , ei.file_mng_id | |
138 | - , ei.use_yn | |
139 | - , ei.rgtr | |
140 | - , to_char(ei.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
141 | - , ei.mdfr | |
142 | - , to_char(ei.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
143 | - , (SELECT mvn_inten <include refid="searchIvstDscsn" />) AS mvn_inten | |
144 | - , (SELECT mou_inten <include refid="searchIvstDscsn" />) AS mou_inten | |
145 | - FROM ent_info AS ei | |
146 | - </sql> | |
147 | - | |
148 | - <sql id="selectRequirement"> | |
149 | - <if test="searchText != null and searchText != ''"> | |
150 | - <choose> | |
151 | - <when test="searchType != null and searchType != ''"> | |
152 | - <if test="searchType == 'ent_nm'"> | |
153 | - AND ent_nm LIKE '%' || #{searchText} || '%' | |
154 | - </if> | |
155 | - <if test="searchType == 'rprsv_nm'"> | |
156 | - AND rprsv_nm LIKE '%' || #{searchText} || '%' | |
157 | - </if> | |
158 | - <if test="searchType == 'brno'"> | |
159 | - AND brno LIKE '%' || #{searchText} || '%' | |
160 | - </if> | |
161 | - </when> | |
162 | - <otherwise> | |
163 | - AND ( ent_nm LIKE '%' || #{searchText} || '%' | |
164 | - OR rprsv_nm LIKE '%' || #{searchText} || '%' | |
165 | - OR brno LIKE '%' || #{searchText} || '%') | |
166 | - </otherwise> | |
167 | - </choose> | |
168 | - </if> | |
169 | - </sql> | |
170 | - <sql id="searchCate"> | |
171 | - <if test="mvnInten != null and mvnInten != ''"> | |
172 | - AND mvn_inten = #{mvnInten} | |
173 | - </if> | |
174 | - <if test="mouInten != null and mouInten != ''"> | |
175 | - AND mou_inten = #{mouInten} | |
176 | - </if> | |
177 | - </sql> | |
178 | - | |
179 | - <sql id="searchIvstDscsn"> | |
180 | - FROM ivst_dscsn AS id | |
181 | - WHERE id.use_yn = 'Y' | |
182 | - AND id.ent_id = ei.ent_id | |
183 | - ORDER BY id.reg_dt DESC | |
184 | - LIMIT 1 | |
185 | - </sql> | |
186 | - | |
187 | - <sql id="selectListInner"> | |
188 | - SELECT ei.ent_id | |
189 | - , ei.ent_nm | |
190 | - , ei.brno | |
191 | - , ei.rprsv_nm | |
192 | - , ei.lctn_admdsp | |
193 | - , ei.lctn_ssg | |
194 | - , ei.bplc_siar | |
195 | - , ei.bplc_siar_unit | |
196 | - , ei.fctry_area | |
197 | - , ei.fctry_area_unit | |
198 | - , ei.ksic_up_cd | |
199 | - , ei.ksic_cd | |
200 | - , ei.ksic_nm | |
201 | - , ei.main_prdct | |
202 | - , ei.ent_crdt | |
203 | - , ei.fndn_dt | |
204 | - , ei.wrkr_cnt | |
205 | - , ei.rmrk | |
206 | - , ei.file_mng_id | |
207 | - , ei.use_yn | |
208 | - , ei.rgtr | |
209 | - , ei.reg_dt | |
210 | - , ei.mdfr | |
211 | - , ei.mdfcn_dt | |
212 | - , (SELECT mvn_inten <include refid="searchIvstDscsn" />) AS mvn_inten | |
213 | - , (SELECT mou_inten <include refid="searchIvstDscsn" />) AS mou_inten | |
214 | - FROM ent_info AS ei | |
215 | - WHERE ei.use_yn = 'Y' | |
216 | - </sql> | |
217 | - | |
218 | - <!-- | |
219 | - 작 성 자 : 박정하 | |
220 | - 작 성 일 : 2024.03.21 | |
221 | - 내 용 : 기업정보 목록 조회 | |
222 | - --> | |
223 | - <select id="entInfoSelectList" parameterType="HashMap" resultMap="entInfoMap"> | |
224 | - SELECT ent_id | |
225 | - , ent_nm | |
226 | - , brno | |
227 | - , rprsv_nm | |
228 | - , lctn_admdsp | |
229 | - , lctn_ssg | |
230 | - , bplc_siar | |
231 | - , bplc_siar_unit | |
232 | - , fctry_area | |
233 | - , fctry_area_unit | |
234 | - , ksic_up_cd | |
235 | - , ksic_cd | |
236 | - , ksic_nm | |
237 | - , main_prdct | |
238 | - , ent_crdt | |
239 | - , to_char(fndn_dt, 'YYYY-MM-DD') AS fndn_dt | |
240 | - , wrkr_cnt | |
241 | - , rmrk | |
242 | - , file_mng_id | |
243 | - , use_yn | |
244 | - , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
245 | - , mdfr | |
246 | - , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
247 | - , mvn_inten | |
248 | - , mou_inten | |
249 | - FROM ( | |
250 | - <include refid="selectListInner" /> | |
251 | - <include refid="selectRequirement" /> | |
252 | - ) AS datas | |
253 | - WHERE TRUE | |
254 | - <include refid="searchCate" /> | |
255 | - ORDER BY ent_id DESC | |
256 | - OFFSET #{limitStart} LIMIT #{recordSize} | |
257 | - </select> | |
258 | - | |
259 | - <!-- | |
260 | - 작 성 자 : 박정하 | |
261 | - 작 성 일 : 2024.03.21 | |
262 | - 내 용 : 기업정보 목록 총 개수 조회 | |
263 | - --> | |
264 | - <select id="entInfoSelectListCount" parameterType="HashMap" resultType="int"> | |
265 | - SELECT count(ent_id) | |
266 | - FROM ( | |
267 | - SELECT ent_id | |
268 | - , (SELECT mvn_inten <include refid="searchIvstDscsn" />) | |
269 | - , (SELECT mou_inten <include refid="searchIvstDscsn" />) | |
270 | - FROM ent_info AS ei | |
271 | - WHERE ei.use_yn = 'Y' | |
272 | - <include refid="selectRequirement" /> | |
273 | - ) AS datas | |
274 | - WHERE TRUE | |
275 | - <include refid="searchCate" /> | |
276 | - </select> | |
277 | - | |
278 | - <!-- | |
279 | - 작 성 자 : 박정하 | |
280 | - 작 성 일 : 2024.03.21 | |
281 | - 내 용 : 기업정보 상세 조회 | |
282 | - --> | |
283 | - <select id="selectEntInfoDetail" parameterType="String" resultMap="entInfoMap"> | |
284 | - <include refid="selectItem" /> | |
285 | - WHERE ei.use_yn = 'Y' | |
286 | - AND ei.ent_id = #{entId} | |
287 | - </select> | |
288 | - | |
289 | - <!-- | |
290 | - 작 성 자 : 박정하 | |
291 | - 작 성 일 : 2024-06-10 | |
292 | - 내 용 : 기업주요사업장 목록 조회 | |
293 | - --> | |
294 | - <select id="selectBplcList" parameterType="BplcVO" resultMap="bplcMap"> | |
295 | - SELECT bplc_id | |
296 | - , ent_id | |
297 | - , wrkr_cnt | |
298 | - , bplc_addr | |
299 | - , use_yn | |
300 | - , rgtr | |
301 | - , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
302 | - , mdfr | |
303 | - , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
304 | - , bplc_nm | |
305 | - , main_prdt | |
306 | - , bplc_siar | |
307 | - , fctry_area | |
308 | - , bplc_siar_unit | |
309 | - , fctry_area_unit | |
310 | - FROM ent_main_bplc | |
311 | - WHERE use_yn = #{useYn} | |
312 | - AND ent_id = #{entId} | |
313 | - ORDER BY bplc_id | |
314 | - </select> | |
315 | - | |
316 | - <!-- | |
317 | - 작 성 자 : 박정하 | |
318 | - 작 성 일 : 2024.03.22 | |
319 | - 내 용 : 기업정보 수정 | |
320 | - --> | |
321 | - <update id="entInfoUpdate" parameterType="EntInfoVO"> | |
322 | - UPDATE ent_info | |
323 | - SET ent_nm = #{entNm} | |
324 | - , brno = #{brno} | |
325 | - , rprsv_nm = #{rprsvNm} | |
326 | - , lctn_admdsp = #{lctnAdmdsp} | |
327 | - , lctn_ssg = #{lctnSsg} | |
328 | - , bplc_siar = #{bplcSiar} | |
329 | - , bplc_siar_unit = #{bplcSiarUnit} | |
330 | - , fctry_area = #{fctryArea} | |
331 | - , fctry_area_unit = #{fctryAreaUnit} | |
332 | - , ksic_up_cd = #{ksicUpCd} | |
333 | - , ksic_cd = #{ksicCd} | |
334 | - , ksic_nm = #{ksicNm} | |
335 | - , main_prdct = #{mainPrdct} | |
336 | - , ent_crdt = #{entCrdt} | |
337 | - , fndn_dt = #{fndnDt}::timestamp | |
338 | - , wrkr_cnt = #{wrkrCnt} | |
339 | - , rmrk = #{rmrk} | |
340 | - , file_mng_id = #{fileMngId} | |
341 | - , mdfr = #{mdfr} | |
342 | - , mdfcn_dt = now() | |
343 | - WHERE ent_id = #{entId} | |
344 | - </update> | |
345 | - | |
346 | - <!-- | |
347 | - 작 성 자 : 박정하 | |
348 | - 작 성 일 : 2024.03.22 | |
349 | - 내 용 : 기업정보 삭제 | |
350 | - --> | |
351 | - <update id="entInfoDelete" parameterType="EntInfoVO"> | |
352 | - UPDATE ent_info | |
353 | - SET use_yn = 'N', | |
354 | - mdfr = #{mdfr}, | |
355 | - mdfcn_dt = now() | |
356 | - WHERE ent_id = #{entId} | |
357 | - </update> | |
358 | - | |
359 | - <!-- | |
360 | - 작 성 자 : 박정하 | |
361 | - 작 성 일 : 2024.05.13 | |
362 | - 내 용 : 팝업 목록 조회 | |
363 | - --> | |
364 | - <select id="selectCompanyInfoListByNew" resultMap="entInfoMap"> | |
365 | - <include refid="selectItem" /> | |
366 | - WHERE ei.use_yn = 'Y' | |
367 | - ORDER BY ei.reg_dt DESC | |
368 | - LIMIT 5 | |
369 | - </select> | |
370 | - | |
371 | - <!-- | |
372 | - 작 성 자 : 박정하 | |
373 | - 작 성 일 : 2024.06.26 | |
374 | - 내 용 : 기업정보 목록 조회 (엑셀 다운로드 용) | |
375 | - --> | |
376 | - <select id="entInfoSelectListAll" parameterType="HashMap" resultType="HashMap"> | |
377 | - SELECT ent_nm | |
378 | - , brno | |
379 | - , rprsv_nm | |
380 | - , (SELECT cd_nm FROM cd_mng WHERE cd = lctn_admdsp) || ' ' || lctn_ssg AS lctn | |
381 | - , bplc_siar || (SELECT cd_nm FROM cd_mng WHERE cd = bplc_siar_unit) AS bplc_siar | |
382 | - , fctry_area || (SELECT cd_nm FROM cd_mng WHERE cd = fctry_area_unit) AS fctry_area | |
383 | - , '(' || ksic_up_cd || ksic_cd || ') ' || ksic_nm AS ksic | |
384 | - , main_prdct | |
385 | - , ent_crdt | |
386 | - , to_char(fndn_dt, 'YYYY-MM-DD') AS fndn_dt | |
387 | - , wrkr_cnt || '' AS wrkr_cnt | |
388 | - , mvn_inten | |
389 | - , mou_inten | |
390 | - , rmrk | |
391 | - FROM (<include refid="selectListInner" />) AS datas | |
392 | - WHERE TRUE | |
393 | - <if test="mvnInten != null and mvnInten != ''"> | |
394 | - AND mvn_inten = #{mvnInten} | |
395 | - </if> | |
396 | - <if test="mouInten != null and mouInten != ''"> | |
397 | - AND mou_inten = #{mouInten} | |
398 | - </if> | |
399 | - <if test="ksicUpCd != null and ksicUpCd != ''"> | |
400 | - AND ksic_up_cd = #{ksicUpCd} | |
401 | - </if> | |
402 | - ORDER BY ent_nm | |
403 | - </select> | |
404 | - | |
405 | - <!-- | |
406 | - 작 성 자 : 박정하 | |
407 | - 작 성 일 : 2024.06.26 | |
408 | - 내 용 : 상위업종코드 목록 조회 (엑셀 다운로드 용) | |
409 | - --> | |
410 | - <select id="ksicUpCdList" parameterType="String" resultType="String"> | |
411 | - SELECT ksic_up_cd | |
412 | - FROM ent_info | |
413 | - WHERE use_yn = 'Y' | |
414 | - GROUP BY ksic_up_cd | |
415 | - ORDER BY ksic_up_cd | |
416 | - </select> | |
417 | -</mapper>(No newline at end of file) |
--- build/resources/main/mybatis/mapper/invtDscsn/invtDscsn-SQL.xml
... | ... | @@ -1,246 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | -<mapper namespace="com.takensoft.portal.ivstDscsn.dao.IvstDscsnDAO"> | |
4 | - <!-- 투자상담 resultMap --> | |
5 | - <resultMap id="ivstDscsnMap" type="IvstDscsnVO"> | |
6 | - <result property="ivstDscsnId" column="ivst_dscsn_id" /> | |
7 | - <result property="entId" column="ent_id" /> | |
8 | - <result property="ttl" column="ttl" /> | |
9 | - <result property="dt" column="dt" /> | |
10 | - <result property="plc" column="plc" /> | |
11 | - <result property="prtpnt" column="prtpnt" /> | |
12 | - <result property="dscsnPbofc" column="dscsn_pbofc" /> | |
13 | - <result property="mainCn" column="main_cn" /> | |
14 | - <result property="fileMngId" column="file_mng_id" /> | |
15 | - <result property="mvnInten" column="mvn_inten" /> | |
16 | - <result property="mouInten" column="mou_inten" /> | |
17 | - <result property="dscsnOtln" column="dscsn_otln" /> | |
18 | - <result property="useYn" column="use_yn" /> | |
19 | - <result property="rgtr" column="rgtr" /> | |
20 | - <result property="regDt" column="reg_dt" /> | |
21 | - <result property="mdfr" column="mdfr" /> | |
22 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
23 | - <result property="entNm" column="ent_nm" /> | |
24 | - </resultMap> | |
25 | - | |
26 | - <!-- | |
27 | - 작성자 : 박정하 | |
28 | - 작성일자 : 2024-03-20 | |
29 | - 내용 : 투자상담 등록 | |
30 | - --> | |
31 | - <insert id="ivstDscsnInsert" parameterType="IvstDscsnVO"> | |
32 | - INSERT INTO ivst_dscsn ( | |
33 | - ivst_dscsn_id | |
34 | - , ent_id | |
35 | - , ttl | |
36 | - , dt | |
37 | - , plc | |
38 | - , prtpnt | |
39 | - , dscsn_pbofc | |
40 | - , main_cn | |
41 | - , file_mng_id | |
42 | - , mvn_inten | |
43 | - , mou_inten | |
44 | - , dscsn_otln | |
45 | - , use_yn | |
46 | - , rgtr | |
47 | - , reg_dt | |
48 | - ) VALUES ( | |
49 | - #{ivstDscsnId} | |
50 | - , #{entId} | |
51 | - , #{ttl} | |
52 | - , #{dt}::timestamp | |
53 | - , #{plc} | |
54 | - , #{prtpnt} | |
55 | - , #{dscsnPbofc} | |
56 | - , #{mainCn} | |
57 | - , #{fileMngId} | |
58 | - , #{mvnInten} | |
59 | - , #{mouInten} | |
60 | - , #{dscsnOtln} | |
61 | - , 'Y' | |
62 | - , #{rgtr} | |
63 | - , now() | |
64 | - ) | |
65 | - </insert> | |
66 | - | |
67 | - <!-- SELECT SQL --> | |
68 | - <sql id="selectItem"> | |
69 | - SELECT id.ivst_dscsn_id | |
70 | - , id.ent_id | |
71 | - , id.ttl | |
72 | - , to_char(id.dt, 'YYYY-MM-DD') AS dt | |
73 | - , id.plc | |
74 | - , id.prtpnt | |
75 | - , id.dscsn_pbofc | |
76 | - , id.main_cn | |
77 | - , id.file_mng_id | |
78 | - , id.mvn_inten | |
79 | - , id.mou_inten | |
80 | - , id.dscsn_otln | |
81 | - , id.use_yn | |
82 | - , id.rgtr | |
83 | - , to_char(id.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
84 | - , id.mdfr | |
85 | - , to_char(id.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
86 | - , ei.ent_nm | |
87 | - from ivst_dscsn AS id | |
88 | - LEFT JOIN ent_info AS ei | |
89 | - ON id.ent_id = ei.ent_id | |
90 | - </sql> | |
91 | - | |
92 | - <sql id="selectRequirement"> | |
93 | - <if test="searchText != null and searchText != ''"> | |
94 | - <choose> | |
95 | - <when test="searchType != null and searchType != ''"> | |
96 | - <if test="searchType == 'ent_nm'"> | |
97 | - AND ei.ent_nm LIKE '%' || #{searchText} || '%' | |
98 | - </if> | |
99 | - <if test="searchType == 'ttl'"> | |
100 | - AND id.ttl LIKE '%' || #{searchText} || '%' | |
101 | - </if> | |
102 | - </when> | |
103 | - <otherwise> | |
104 | - AND ( | |
105 | - ei.ent_nm LIKE '%' || #{searchText} || '%' | |
106 | - OR | |
107 | - id.ttl LIKE '%' || #{searchText} || '%' | |
108 | - ) | |
109 | - </otherwise> | |
110 | - </choose> | |
111 | - </if> | |
112 | - <if test="cateId == 'ent_id' and cateValue != null and cateValue != ''"> | |
113 | - AND ei.ent_id = #{cateValue} | |
114 | - </if> | |
115 | - <if test="mvnInten != null and mvnInten != ''"> | |
116 | - AND id.mvn_inten = #{mvnInten} | |
117 | - </if> | |
118 | - <if test="mouInten != null and mouInten != ''"> | |
119 | - AND id.mou_inten = #{mouInten} | |
120 | - </if> | |
121 | - </sql> | |
122 | - | |
123 | - <!-- | |
124 | - 작성자 : 박정하 | |
125 | - 작성일자 : 2024-03-26 | |
126 | - 내용 : 투자상담 목록 조회 | |
127 | - --> | |
128 | - <select id="ivstDscsnList" resultMap="ivstDscsnMap"> | |
129 | - SELECT id.ivst_dscsn_id | |
130 | - , ei.ent_nm | |
131 | - , id.ent_id | |
132 | - , id.ttl | |
133 | - , id.dt | |
134 | - , id.plc | |
135 | - , id.prtpnt | |
136 | - , id.dscsn_pbofc | |
137 | - , id.main_cn | |
138 | - , id.file_mng_id | |
139 | - , id.mvn_inten | |
140 | - , id.mou_inten | |
141 | - , id.dscsn_otln | |
142 | - , id.use_yn | |
143 | - , id.rgtr | |
144 | - , to_char(id.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
145 | - , id.mdfr | |
146 | - , to_char(id.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
147 | - FROM ivst_dscsn AS id | |
148 | - LEFT JOIN ent_info AS ei | |
149 | - ON id.ent_id = ei.ent_id | |
150 | - WHERE id.use_yn = 'Y' | |
151 | - <include refid="selectRequirement" /> | |
152 | - ORDER BY id.reg_dt DESC | |
153 | - OFFSET #{limitStart} LIMIT #{recordSize} | |
154 | - </select> | |
155 | - | |
156 | - <!-- | |
157 | - 작성자 : 박정하 | |
158 | - 작성일자 : 2024-03-26 | |
159 | - 내용 : 투자상담 목록 총 개수 조회 | |
160 | - --> | |
161 | - <select id="ivstDscsnListCount" resultType="int"> | |
162 | - SELECT count(*) | |
163 | - FROM ivst_dscsn AS id | |
164 | - LEFT JOIN ent_info AS ei | |
165 | - ON id.ent_id = ei.ent_id | |
166 | - WHERE id.use_yn = 'Y' | |
167 | - <include refid="selectRequirement" /> | |
168 | - </select> | |
169 | - | |
170 | - <!-- | |
171 | - 작 성 자 : 박정하 | |
172 | - 작 성 일 : 2024.03.26 | |
173 | - 내 용 : 투자상담 상세 조회 | |
174 | - --> | |
175 | - <select id="selectIvstDscsnDetail" parameterType="String" resultMap="ivstDscsnMap"> | |
176 | - <include refid="selectItem" /> | |
177 | - WHERE id.use_yn = 'Y' | |
178 | - AND id.ivst_dscsn_id = #{ivstDscsnId} | |
179 | - </select> | |
180 | - | |
181 | - <!-- | |
182 | - 작성자 : 박정하 | |
183 | - 작성일자 : 2024-03-27 | |
184 | - 내용 : 투자상담 수정 | |
185 | - --> | |
186 | - <update id="ivstDscsnUpdate" parameterType="IvstDscsnVO"> | |
187 | - UPDATE ivst_dscsn | |
188 | - SET ent_id = #{entId} | |
189 | - , ttl = #{ttl} | |
190 | - , dt = #{dt}::timestamp | |
191 | - , plc = #{plc} | |
192 | - , prtpnt = #{prtpnt} | |
193 | - , dscsn_pbofc = #{dscsnPbofc} | |
194 | - , main_cn = #{mainCn} | |
195 | - , file_mng_id = #{fileMngId} | |
196 | - , mvn_inten = #{mvnInten} | |
197 | - , mou_inten = #{mouInten} | |
198 | - , dscsn_otln = #{dscsnOtln} | |
199 | - , use_yn = #{useYn} | |
200 | - , mdfr = #{mdfr} | |
201 | - , mdfcn_dt = now() | |
202 | - WHERE ivst_dscsn_id = #{ivstDscsnId} | |
203 | - </update> | |
204 | - | |
205 | - <!-- | |
206 | - 작성자 : 박정하 | |
207 | - 작성일자 : 2024-03-28 | |
208 | - 내용 : 투자상담 최근 1건 조회 | |
209 | - --> | |
210 | - <select id="ivstDscsnByNewOne" parameterType="IvstDscsnVO" resultMap="ivstDscsnMap"> | |
211 | - <include refid="selectItem" /> | |
212 | - where id.use_yn = 'Y' | |
213 | - AND id.ent_id = #{entId} | |
214 | - order by id.reg_dt DESC | |
215 | - LIMIT 1; | |
216 | - </select> | |
217 | - | |
218 | - <!-- | |
219 | - 작성자 : 박정하 | |
220 | - 작성일자 : 2024-06-12 | |
221 | - 내용 : 투자상담 목록 조회 (기업정보 삭제용) | |
222 | - --> | |
223 | - <select id="ivstDscsnListByIvstDscsnId" resultMap="ivstDscsnMap"> | |
224 | - SELECT ivst_dscsn_id | |
225 | - , ent_id | |
226 | - , ttl | |
227 | - , dt | |
228 | - , plc | |
229 | - , prtpnt | |
230 | - , dscsn_pbofc | |
231 | - , main_cn | |
232 | - , file_mng_id | |
233 | - , mvn_inten | |
234 | - , mou_inten | |
235 | - , dscsn_otln | |
236 | - , use_yn | |
237 | - , rgtr | |
238 | - , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
239 | - , mdfr | |
240 | - , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
241 | - FROM ivst_dscsn | |
242 | - WHERE use_yn = 'Y' | |
243 | - AND ent_id = #{ent_Id} | |
244 | - ORDER BY reg_dt DESC | |
245 | - </select> | |
246 | -</mapper>(No newline at end of file) |
--- build/resources/main/mybatis/mapper/main/governmentMain-SQL.xml
... | ... | @@ -1,166 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | - | |
4 | -<!-- | |
5 | - 작 성 자 : 박정하 | |
6 | - 작 성 일 : 2024.05.29 | |
7 | - 내 용 : 메인 통계 관련 | |
8 | ---> | |
9 | -<mapper namespace="com.takensoft.portal.main.dao.GovernmentMainDAO"> | |
10 | - <!-- 공무원 메인페이지 통계정보 관련 --> | |
11 | - <!-- SELECT SQL --> | |
12 | - <sql id="selectItem"> | |
13 | - <if test="searchKeyword != null and searchText != ''"> | |
14 | - <if test="searchKeyword == 'day'"> | |
15 | - , stats_date::DATE AS stats_date | |
16 | - </if> | |
17 | - <if test="searchKeyword == 'month'"> | |
18 | - , to_char(DATE_TRUNC('month', stats_date), 'YYYY-MM') AS stats_date | |
19 | - </if> | |
20 | - <if test="searchKeyword == 'year'"> | |
21 | - , to_char(DATE_TRUNC('year', stats_date), 'YYYY') AS stats_date | |
22 | - </if> | |
23 | - </if> | |
24 | - </sql> | |
25 | - <sql id="groupItem"> | |
26 | - <if test="searchKeyword != null and searchText != ''"> | |
27 | - GROUP BY true::boolean | |
28 | - <if test="searchKeyword == 'day'"> | |
29 | - , stats_date::DATE | |
30 | - </if> | |
31 | - <if test="searchKeyword == 'month'"> | |
32 | - , to_char(DATE_TRUNC('month', stats_date), 'YYYY-MM') | |
33 | - </if> | |
34 | - <if test="searchKeyword == 'year'"> | |
35 | - , to_char(DATE_TRUNC('year', stats_date), 'YYYY') | |
36 | - </if> | |
37 | - </if> | |
38 | - </sql> | |
39 | - <!-- | |
40 | - 작 성 자 : 박정하 | |
41 | - 작 성 일 : 2024.06.03 | |
42 | - 내 용 : 공무원 메인페이지 통계정보 조회 : 분류별 통계 | |
43 | - --> | |
44 | - <select id="selectCategoryStats" parameterType="HashMap"> | |
45 | - SELECT sum(ei_cnt) AS "새 기업정보 수" | |
46 | - , sum(eda_cnt) AS "새 기업상담신청 수" | |
47 | - , sum(rm_cnt) AS "새 검토사항 수" | |
48 | - , sum(id_cnt) AS "새 투자상담 수" | |
49 | - <include refid="selectItem" /> | |
50 | - FROM ( | |
51 | - SELECT generate_series AS stats_date | |
52 | - , COALESCE(ei.count, 0) AS ei_cnt | |
53 | - , COALESCE(eda.count, 0) AS eda_cnt | |
54 | - , COALESCE(rm.count, 0) AS rm_cnt | |
55 | - , COALESCE(id.count, 0) AS id_cnt | |
56 | - FROM (SELECT GENERATE_SERIES( | |
57 | - <if test="searchKeyword != null and searchText != ''"> | |
58 | - <if test="searchKeyword == 'day'"> | |
59 | - (now() + '-30 days')::DATE | |
60 | - </if> | |
61 | - <if test="searchKeyword == 'month'"> | |
62 | - (now() + '-1 year')::DATE | |
63 | - </if> | |
64 | - <if test="searchKeyword == 'year'">( | |
65 | - select MIN(min) | |
66 | - from ( | |
67 | - (select MIN(reg_dt)::DATE FROM ent_info WHERE use_yn = 'Y') union all | |
68 | - (select MIN(reg_dt)::DATE FROM ent_dscsn_aply WHERE use_yn = 'Y') union all | |
69 | - (select MIN(reg_dt)::DATE FROM rvw_mttr WHERE use_yn = 'Y') union all | |
70 | - (select MIN(reg_dt)::DATE FROM ivst_dscsn WHERE use_yn = 'Y') | |
71 | - ) as since | |
72 | - ) | |
73 | - </if> | |
74 | - </if> | |
75 | - , NOW(), '1 day'::INTERVAL)::date) AS date | |
76 | - LEFT JOIN (SELECT reg_dt::DATE, COUNT(ent_id) FROM ent_info WHERE use_yn = 'Y' GROUP BY reg_dt::DATE) AS ei | |
77 | - ON date.generate_series = ei.reg_dt | |
78 | - LEFT JOIN (SELECT reg_dt::DATE, COUNT(ent_dscsn_aply_id) FROM ent_dscsn_aply WHERE use_yn = 'Y' GROUP BY reg_dt::DATE) AS eda | |
79 | - ON date.generate_series = eda.reg_dt | |
80 | - LEFT JOIN (SELECT reg_dt::DATE, COUNT(rvw_mttr_id) FROM rvw_mttr WHERE use_yn = 'Y' GROUP BY reg_dt::DATE) AS rm | |
81 | - ON date.generate_series = rm.reg_dt | |
82 | - LEFT JOIN (SELECT reg_dt::DATE, COUNT(ivst_dscsn_id) FROM ivst_dscsn WHERE use_yn = 'Y' GROUP BY reg_dt::DATE) AS id | |
83 | - ON date.generate_series = id.reg_dt | |
84 | - ORDER BY date.generate_series | |
85 | - ) AS datas | |
86 | - <include refid="groupItem" /> | |
87 | - ORDER BY stats_date | |
88 | - </select> | |
89 | - | |
90 | - <!-- | |
91 | - 작 성 자 : 박정하 | |
92 | - 작 성 일 : 2024.06.03 | |
93 | - 내 용 : 공무원 메인페이지 통계정보 조회 : 상담신청 통계 | |
94 | - --> | |
95 | - <select id="selectEntDscsnAplyStats" parameterType="HashMap"> | |
96 | - SELECT SUM(coalesce) AS "새 상담신청 수" | |
97 | - <include refid="selectItem" /> | |
98 | - FROM ( | |
99 | - SELECT stats_date | |
100 | - , COALESCE(eda.count, 0) | |
101 | - FROM (SELECT GENERATE_SERIES::DATE AS stats_date | |
102 | - FROM GENERATE_SERIES( | |
103 | - <if test="searchKeyword != null and searchText != ''"> | |
104 | - <if test="searchKeyword == 'day'"> | |
105 | - (now() + '-30 days')::DATE | |
106 | - </if> | |
107 | - <if test="searchKeyword == 'month'"> | |
108 | - (now() + '-1 year')::DATE | |
109 | - </if> | |
110 | - <if test="searchKeyword == 'year'"> | |
111 | - (select MIN(reg_dt) FROM ent_dscsn_aply WHERE use_yn = 'Y') | |
112 | - </if> | |
113 | - </if> | |
114 | - , NOW()::DATE, '1 day'::INTERVAL)) as date | |
115 | - LEFT JOIN ( | |
116 | - SELECT COUNT(ent_dscsn_aply_id) | |
117 | - , reg_dt::DATE AS reg_dt | |
118 | - FROM ent_dscsn_aply | |
119 | - WHERE use_yn = 'Y' | |
120 | - GROUP BY reg_dt::DATE | |
121 | - ) AS eda | |
122 | - ON date.stats_date = eda.reg_dt | |
123 | - ORDER BY stats_date) AS datas | |
124 | - <include refid="groupItem" /> | |
125 | - ORDER BY stats_date | |
126 | - </select> | |
127 | - | |
128 | - <!-- | |
129 | - 작 성 자 : 박정하 | |
130 | - 작 성 일 : 2024.06.03 | |
131 | - 내 용 : 공무원 메인페이지 통계정보 조회 : 검토사항 통계 | |
132 | - --> | |
133 | - <select id="selectRvwMttrStats" parameterType="HashMap"> | |
134 | - SELECT SUM(coalesce) AS "새 검토사항 수" | |
135 | - <include refid="selectItem" /> | |
136 | - FROM ( | |
137 | - SELECT stats_date | |
138 | - , COALESCE(eda.count, 0) | |
139 | - FROM (SELECT GENERATE_SERIES::DATE AS stats_date | |
140 | - FROM GENERATE_SERIES( | |
141 | - <if test="searchKeyword != null and searchText != ''"> | |
142 | - <if test="searchKeyword == 'day'"> | |
143 | - (now() + '-30 days')::DATE | |
144 | - </if> | |
145 | - <if test="searchKeyword == 'month'"> | |
146 | - (now() + '-1 year')::DATE | |
147 | - </if> | |
148 | - <if test="searchKeyword == 'year'"> | |
149 | - (select MIN(reg_dt) FROM ent_dscsn_aply WHERE use_yn = 'Y') | |
150 | - </if> | |
151 | - </if> | |
152 | - , NOW()::DATE, '1 day'::INTERVAL)) as date | |
153 | - LEFT JOIN ( | |
154 | - SELECT COUNT(rvw_mttr_id) | |
155 | - , reg_dt::DATE AS reg_dt | |
156 | - FROM rvw_mttr | |
157 | - WHERE use_yn = 'Y' | |
158 | - GROUP BY reg_dt::DATE | |
159 | - ) AS eda | |
160 | - ON date.stats_date = eda.reg_dt | |
161 | - ORDER BY stats_date) AS datas | |
162 | - <include refid="groupItem" /> | |
163 | - ORDER BY stats_date | |
164 | - </select> | |
165 | - <!-- // 공무원 메인페이지 통계정보 관련 --> | |
166 | -</mapper>(No newline at end of file) |
--- build/resources/main/mybatis/mapper/rvwMttr/rvwMttr-SQL.xml
... | ... | @@ -1,294 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | -<!-- | |
4 | - 작성자 : 박정하 | |
5 | - 작성일 : 2024.03.29 | |
6 | - 내 용 : 검토사항 관련 | |
7 | ---> | |
8 | -<mapper namespace="com.takensoft.portal.rvwMttr.dao.RvwMttrDAO"> | |
9 | - <!-- 검토사항 resultMap --> | |
10 | - <resultMap id="rvwMttrMap" type="RvwMttrVO"> | |
11 | - <result property="rvwMttrId" column="rvw_mttr_id" /> | |
12 | - <result property="ivstDscsnId" column="ivst_dscsn_id" /> | |
13 | - <result property="type" column="type" /> | |
14 | - <result property="clr" column="clr" /> | |
15 | - <result property="rcptDt" column="rcpt_dt" /> | |
16 | - <result property="rcptCn" column="rcpt_cn" /> | |
17 | - <result property="useYn" column="use_yn" /> | |
18 | - <result property="rgtr" column="rgtr" /> | |
19 | - <result property="regDt" column="reg_dt" /> | |
20 | - <result property="mdfr" column="mdfr" /> | |
21 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
22 | - <result property="entId" column="ent_Id" /> | |
23 | - <result property="entNm" column="ent_nm" /> | |
24 | - <result property="ttl" column="ttl" /> | |
25 | - <result property="clrNm" column="clr_nm" /> | |
26 | - <result property="nowPrgrsCrs" column="now_prgrs_crs" /> | |
27 | - <result property="fileMngId" column="file_mng_id" /> | |
28 | - <result property="mainCn" column="main_cn" /> | |
29 | - <collection property="prgrsList" column="{rvwMttrId = rvw_mttr_id}" javaType="java.util.ArrayList" ofType="RvwMttrPrgrsVO" select="selectRvwMttrPrgrsList" /> | |
30 | - </resultMap> | |
31 | - | |
32 | - <!-- 검토사항진행 resultMap --> | |
33 | - <resultMap id="rvwMttrPrgrsMap" type="RvwMttrPrgrsVO"> | |
34 | - <result property="rvwMttrPrgrsId" column="rvw_mttr_prgrs_id" /> | |
35 | - <result property="rvwMttrId" column="rvw_mttr_id" /> | |
36 | - <result property="picId" column="pic_id" /> | |
37 | - <result property="prgrsCrs" column="prgrs_crs" /> | |
38 | - <result property="prgrsDt" column="prgrs_dt" /> | |
39 | - <result property="sprtMthd" column="sprt_mthd" /> | |
40 | - <result property="rgtr" column="rgtr" /> | |
41 | - <result property="regDt" column="reg_dt" /> | |
42 | - <result property="mdfr" column="mdfr" /> | |
43 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
44 | - <result property="picNm" column="pic_nm" /> | |
45 | - </resultMap> | |
46 | - | |
47 | - <!-- | |
48 | - 작성자 : 박정하 | |
49 | - 작성일자 : 2024-03-29 | |
50 | - 내용 : 검토사항 등록 | |
51 | - --> | |
52 | - <insert id="rvwMttrInsert" parameterType="RvwMttrVO"> | |
53 | - INSERT INTO rvw_mttr ( | |
54 | - rvw_mttr_id | |
55 | - , ivst_dscsn_id | |
56 | - , type | |
57 | - , clr | |
58 | - , rcpt_dt | |
59 | - , rcpt_cn | |
60 | - , use_yn | |
61 | - , rgtr | |
62 | - , reg_dt | |
63 | - , file_mng_id | |
64 | - ) VALUES ( | |
65 | - #{rvwMttrId} | |
66 | - , #{ivstDscsnId} | |
67 | - , #{type} | |
68 | - , #{clr} | |
69 | - , #{rcptDt}::timestamp | |
70 | - , #{rcptCn} | |
71 | - , 'Y' | |
72 | - , #{rgtr} | |
73 | - , now() | |
74 | - , #{fileMngId} | |
75 | - ) | |
76 | - </insert> | |
77 | - | |
78 | - <!-- 검색 조건 --> | |
79 | - <sql id="selectRequirement"> | |
80 | - <if test="searchText != null and searchText != ''"> | |
81 | - <choose> | |
82 | - <when test="searchType != null and searchType != ''"> | |
83 | - <if test="searchType == 'ent_nm'"> | |
84 | - AND ei.ent_nm LIKE '%' || #{searchText} || '%' | |
85 | - </if> | |
86 | - <if test="searchType == 'ttl'"> | |
87 | - AND id.ttl LIKE '%' || #{searchText} || '%' | |
88 | - </if> | |
89 | - </when> | |
90 | - <otherwise> | |
91 | - AND ( | |
92 | - ei.ent_nm LIKE '%' || #{searchText} || '%' | |
93 | - OR | |
94 | - id.ttl LIKE '%' || #{searchText} || '%' | |
95 | - ) | |
96 | - </otherwise> | |
97 | - </choose> | |
98 | - </if> | |
99 | - <if test="cateId == 'ivst_dscsn_id' and cateValue != null and cateValue != ''"> | |
100 | - AND rm.ivst_dscsn_id = #{cateValue} | |
101 | - </if> | |
102 | - <if test="type != null and type != ''"> | |
103 | - AND rm.type = #{type} | |
104 | - </if> | |
105 | - </sql> | |
106 | - | |
107 | - <!-- | |
108 | - 작성자 : 박정하 | |
109 | - 작성일자 : 2024-03-29 | |
110 | - 내용 : 검토사항 목록 조회 | |
111 | - --> | |
112 | - <select id="rvwMttrSelectList" resultMap="rvwMttrMap"> | |
113 | - SELECT | |
114 | - rvw_mttr_id | |
115 | - , ivst_dscsn_id | |
116 | - , type | |
117 | - , clr | |
118 | - , to_char(rcpt_dt, 'YYYY-MM-DD HH24:MI') AS rcpt_dt | |
119 | - , rcpt_cn | |
120 | - , use_yn | |
121 | - , rgtr | |
122 | - , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
123 | - , mdfr | |
124 | - , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
125 | - , ttl | |
126 | - , ent_id | |
127 | - , ent_nm | |
128 | - , now_prgrs_crs | |
129 | - , file_mng_id | |
130 | - FROM ( | |
131 | - SELECT rm.rvw_mttr_id | |
132 | - , rm.ivst_dscsn_id | |
133 | - , rm.type | |
134 | - , rm.clr | |
135 | - , rm.rcpt_dt | |
136 | - , rm.rcpt_cn | |
137 | - , rm.use_yn | |
138 | - , rm.rgtr | |
139 | - , rm.reg_dt | |
140 | - , rm.mdfr | |
141 | - , rm.mdfcn_dt | |
142 | - , id.ttl | |
143 | - , ei.ent_id | |
144 | - , ei.ent_nm | |
145 | - , (select rmp.prgrs_crs | |
146 | - from rvw_mttr_prgrs AS rmp | |
147 | - where rmp.rvw_mttr_id = rm.rvw_mttr_id | |
148 | - order by rmp.reg_dt DESC | |
149 | - limit 1 ) AS now_prgrs_crs | |
150 | - , rm.file_mng_id | |
151 | - FROM rvw_mttr AS rm | |
152 | - LEFT JOIN ivst_dscsn AS id | |
153 | - ON rm.ivst_dscsn_id = id.ivst_dscsn_id | |
154 | - LEFT JOIN ent_info AS ei | |
155 | - ON id.ent_id = ei.ent_id | |
156 | - WHERE rm.use_yn = 'Y' | |
157 | - <include refid="selectRequirement" /> | |
158 | - ) AS datas | |
159 | - WHERE TRUE | |
160 | - <if test="prgrsCrs != null and prgrsCrs != ''"> | |
161 | - AND now_prgrs_crs = #{prgrsCrs} | |
162 | - </if> | |
163 | - ORDER BY rvw_mttr_id DESC | |
164 | - OFFSET #{limitStart} LIMIT #{recordSize} | |
165 | - </select> | |
166 | - | |
167 | - <!-- | |
168 | - 작성자 : 박정하 | |
169 | - 작성일자 : 2024-03-29 | |
170 | - 내용 : 검토사항 목록 총 개수 조회 | |
171 | - --> | |
172 | - <select id="rvwMttrSelectListCount" resultType="int"> | |
173 | - SELECT count(*) | |
174 | - FROM rvw_mttr AS rm | |
175 | - LEFT JOIN ivst_dscsn AS id | |
176 | - ON rm.ivst_dscsn_id = id.ivst_dscsn_id | |
177 | - LEFT JOIN ent_info AS ei | |
178 | - ON id.ent_id = ei.ent_id | |
179 | - WHERE rm.use_yn = 'Y' | |
180 | - <include refid="selectRequirement" /> | |
181 | - </select> | |
182 | - | |
183 | - <!-- | |
184 | - 작 성 자 : 박정하 | |
185 | - 작 성 일 : 2024-06-04 | |
186 | - 내 용 : 검토사항 상세 조회 | |
187 | - --> | |
188 | - <select id="selectRvwMttrDetail" parameterType="String" resultMap="rvwMttrMap"> | |
189 | - SELECT rm.rvw_mttr_id | |
190 | - , rm.type | |
191 | - , rm.clr | |
192 | - , to_char(rm.rcpt_dt, 'YYYY-MM-DD') AS rcpt_dt | |
193 | - , rm.rcpt_cn | |
194 | - , rm.use_yn | |
195 | - , rm.rgtr | |
196 | - , to_char(rm.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
197 | - , rm.mdfr | |
198 | - , to_char(rm.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
199 | - , rm.ivst_dscsn_id | |
200 | - , ei.ent_id | |
201 | - , ei.ent_nm | |
202 | - , id.ttl | |
203 | - , mi.mbr_nm AS clr_nm | |
204 | - , rm.file_mng_id | |
205 | - , id.main_cn | |
206 | - FROM rvw_mttr AS rm | |
207 | - LEFT JOIN ivst_dscsn AS id | |
208 | - ON rm.ivst_dscsn_id = id.ivst_dscsn_id | |
209 | - LEFT JOIN ent_info AS ei | |
210 | - ON id.ent_id = ei.ent_id | |
211 | - LEFT JOIN mbr_info AS mi | |
212 | - ON rm.clr = mi.mbr_id | |
213 | - WHERE rm.use_yn = 'Y' | |
214 | - AND rm.rvw_mttr_id = #{rvwMttrId} | |
215 | - </select> | |
216 | - | |
217 | - <!-- | |
218 | - 작 성 자 : 박정하 | |
219 | - 작 성 일 : 2024-06-04 | |
220 | - 내 용 : 검토사항진행 목록 조회 | |
221 | - --> | |
222 | - <select id="selectRvwMttrPrgrsList" parameterType="RvwMttrVO" resultMap="rvwMttrPrgrsMap"> | |
223 | - SELECT rmp.rvw_mttr_prgrs_id | |
224 | - , rmp.rvw_mttr_id | |
225 | - , rmp.pic_id | |
226 | - , mi.mbr_nm AS pic_nm | |
227 | - , rmp.prgrs_crs | |
228 | - , to_char(rmp.prgrs_dt, 'YYYY-MM-DD') AS prgrs_dt | |
229 | - , rmp.sprt_mthd | |
230 | - , rmp.rgtr | |
231 | - , to_char(rmp.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
232 | - , rmp.mdfr | |
233 | - , to_char(rmp.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
234 | - FROM rvw_mttr_prgrs AS rmp | |
235 | - LEFT JOIN mbr_info AS mi | |
236 | - ON rmp.pic_id = mi.mbr_id | |
237 | - WHERE rmp.rvw_mttr_id = #{rvwMttrId} | |
238 | - ORDER BY prgrs_dt, rvw_mttr_prgrs_id | |
239 | - </select> | |
240 | - | |
241 | - <!-- | |
242 | - 작 성 자 : 박정하 | |
243 | - 작 성 일 : 2024.04.01 | |
244 | - 내 용 : 검토사항 수정 | |
245 | - --> | |
246 | - <update id="rvwMttrUpdate" parameterType="RvwMttrVO"> | |
247 | - UPDATE rvw_mttr | |
248 | - SET ivst_dscsn_id = #{ivstDscsnId} | |
249 | - , type = #{type} | |
250 | - , clr = #{clr} | |
251 | - , rcpt_dt = #{rcptDt}::timestamp | |
252 | - , rcpt_cn = #{rcptCn} | |
253 | - , use_yn = #{useYn} | |
254 | - , mdfr = #{mdfr} | |
255 | - , mdfcn_dt = now() | |
256 | - , file_mng_id = #{fileMngId} | |
257 | - WHERE rvw_mttr_id = #{rvwMttrId} | |
258 | - </update> | |
259 | - | |
260 | - <!-- | |
261 | - 작 성 자 : 박정하 | |
262 | - 작 성 일 : 2024.04.01 | |
263 | - 내 용 : 검토사항 삭제 | |
264 | - --> | |
265 | - <update id="rvwMttrDelete" parameterType="RvwMttrVO"> | |
266 | - UPDATE rvw_mttr | |
267 | - SET use_yn = 'N' | |
268 | - WHERE rvw_mttr_id = #{rvwMttrId} | |
269 | - </update> | |
270 | - | |
271 | - <!-- | |
272 | - 작 성 자 : 박정하 | |
273 | - 작 성 일 : 2024.06.12 | |
274 | - 내 용 : 검토사항 목록 조회 (검토사항 삭제용) | |
275 | - --> | |
276 | - <select id="rvwMttrListByIvstDscsnId" resultMap="rvwMttrMap"> | |
277 | - SELECT rm.rvw_mttr_id | |
278 | - , rm.ivst_dscsn_id | |
279 | - , rm.type | |
280 | - , rm.clr | |
281 | - , to_char(rm.rcpt_dt, 'YYYY-MM-DD HH24:MI') AS rcpt_dt | |
282 | - , rm.rcpt_cn | |
283 | - , rm.use_yn | |
284 | - , rm.rgtr | |
285 | - , to_char(rm.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
286 | - , rm.mdfr | |
287 | - , to_char(rm.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
288 | - , rm.file_mng_id | |
289 | - FROM rvw_mttr AS rm | |
290 | - WHERE rm.use_yn = 'Y' | |
291 | - AND rm.ivst_dscsn_id = #{ivst_dscsn_id} | |
292 | - ORDER BY rm.rvw_mttr_id DESC | |
293 | - </select> | |
294 | -</mapper>(No newline at end of file) |
--- build/resources/main/mybatis/mapper/rvwMttr/rvwMttrPrgrs-SQL.xml
... | ... | @@ -1,81 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | -<mapper namespace="com.takensoft.portal.rvwMttr.dao.RvwMttrPrgrsDAO"> | |
4 | - <!-- 검토사항진행 resultMap --> | |
5 | - <resultMap id="rvwMttrPrgrsMap" type="HashMap"> | |
6 | - <result property="rvwMttrPrgrsId" column="rvw_mttr_prgrs_id" /> | |
7 | - <result property="rvwMttrId" column="rvw_mttr_id" /> | |
8 | - <result property="picId" column="pic_id" /> | |
9 | - <result property="mbrNm" column="mbr_nm" /> | |
10 | - <result property="prgrsCrs" column="prgrs_crs" /> | |
11 | - <result property="prgrsDt" column="prgrs_dt" /> | |
12 | - <result property="sprtMthd" column="sprt_mthd" /> | |
13 | - <result property="rgtr" column="rgtr" /> | |
14 | - <result property="regDt" column="reg_dt" /> | |
15 | - <result property="mdfr" column="mdfr" /> | |
16 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
17 | - </resultMap> | |
18 | - | |
19 | - <!-- | |
20 | - 작 성 자 : 박정하 | |
21 | - 작 성 일 : 2024.04.25 | |
22 | - 내 용 : 검토사항진행 등록 | |
23 | - --> | |
24 | - <insert id="prgrsInsert" parameterType="RvwMttrPrgrsVO"> | |
25 | - INSERT INTO rvw_mttr_prgrs ( | |
26 | - rvw_mttr_id | |
27 | - , pic_id | |
28 | - , prgrs_crs | |
29 | - , prgrs_dt | |
30 | - , sprt_mthd | |
31 | - , rgtr | |
32 | - , reg_dt | |
33 | - ) VALUES ( | |
34 | - #{rvwMttrId} | |
35 | - , #{picId} | |
36 | - , #{prgrsCrs} | |
37 | - , #{prgrsDt}::timestamp | |
38 | - , #{sprtMthd} | |
39 | - , #{rgtr} | |
40 | - , now() | |
41 | - ) | |
42 | - </insert> | |
43 | - | |
44 | - <!-- | |
45 | - 작 성 자 : 박정하 | |
46 | - 작 성 일 : 2024.04.25 | |
47 | - 내 용 : 검토사항진행 수정 | |
48 | - --> | |
49 | - <update id="prgrsUpdate" parameterType="RvwMttrPrgrsVO"> | |
50 | - UPDATE rvw_mttr_prgrs | |
51 | - SET pic_id = #{picId} | |
52 | - , prgrs_crs = #{prgrsCrs} | |
53 | - , prgrs_dt = #{prgrsDt}::timestamp | |
54 | - , sprt_mthd = #{sprtMthd} | |
55 | - , mdfr = #{mdfr} | |
56 | - , mdfcn_dt = now() | |
57 | - WHERE rvw_mttr_prgrs_id = #{rvwMttrPrgrsId} | |
58 | - </update> | |
59 | - | |
60 | - <!-- | |
61 | - 작 성 자 : 박정하 | |
62 | - 작 성 일 : 2024-04-01 | |
63 | - 내 용 : 검토사항진행 삭제 | |
64 | - --> | |
65 | - <delete id="prgrsDelete" parameterType="int"> | |
66 | - DELETE | |
67 | - FROM rvw_mttr_prgrs | |
68 | - WHERE rvw_mttr_prgrs_id = #{rvwMttrPrgrsId} | |
69 | - </delete> | |
70 | - | |
71 | - <!-- | |
72 | - 작 성 자 : 박정하 | |
73 | - 작 성 일 : 2024-06-04 | |
74 | - 내 용 : 검토사항진행 삭제 (검토사항 삭제용) | |
75 | - --> | |
76 | - <delete id="prgrsDeleteForRvwMttr" parameterType="String"> | |
77 | - DELETE | |
78 | - FROM rvw_mttr_prgrs | |
79 | - WHERE rvw_mttr_id = #{rvwMttrId} | |
80 | - </delete> | |
81 | -</mapper>(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entDscsnAply/dao/EntDscsnAplyDAO.java
... | ... | @@ -1,64 +0,0 @@ |
1 | -package com.takensoft.portal.entDscsnAply.dao; | |
2 | - | |
3 | -import com.takensoft.common.Pagination; | |
4 | -import com.takensoft.portal.entDscsnAply.vo.EntDscsnAplyVO; | |
5 | -import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
6 | - | |
7 | -import java.util.*; | |
8 | - | |
9 | -/** | |
10 | - * @author : 박정하 | |
11 | - * @since : 2024.04.02 | |
12 | - * | |
13 | - * 기업상담신청 관련 Mapper | |
14 | - */ | |
15 | -@Mapper("entDscsnAplyDAO") | |
16 | -public interface EntDscsnAplyDAO { | |
17 | - /** | |
18 | - * @author 박정하 | |
19 | - * @since 2024.04.02 | |
20 | - * | |
21 | - * 기업상담신청 등록 | |
22 | - */ | |
23 | - public int entDscsnAplyInsert(EntDscsnAplyVO entDscsnAplyVO) throws Exception; | |
24 | - | |
25 | - /** | |
26 | - * @author 박정하 | |
27 | - * @since 2024.04.02 | |
28 | - * | |
29 | - * 기업상담신청 목록 조회 | |
30 | - */ | |
31 | - public List<EntDscsnAplyVO> entDscsnAplyList(Pagination pagination) throws Exception; | |
32 | - | |
33 | - /** | |
34 | - * @author 박정하 | |
35 | - * @since 2024.04.02 | |
36 | - * | |
37 | - * 기업상담신청 목록 총 개수 조회 | |
38 | - */ | |
39 | - public int entDscsnAplyListCount(Pagination pagination) throws Exception; | |
40 | - | |
41 | - /** | |
42 | - * @author 박정하 | |
43 | - * @since 2024.04.02 | |
44 | - * | |
45 | - * 기업상담신청 상세 조회 | |
46 | - */ | |
47 | - public EntDscsnAplyVO entDscsnAplyDetail(String entDscsnAplyId) throws Exception; | |
48 | - | |
49 | - /** | |
50 | - * @author 박정하 | |
51 | - * @since 2024.04.02 | |
52 | - * | |
53 | - * 기업상담신청 수정 | |
54 | - */ | |
55 | - public int entDscsnAplyUpdate(EntDscsnAplyVO entDscsnAplyVO) throws Exception; | |
56 | - | |
57 | - /** | |
58 | - * @author 박정하 | |
59 | - * @since 2024.04.04 | |
60 | - * | |
61 | - * 기업상담신청 1시간 이내 동일 아이피 등록 개수 | |
62 | - */ | |
63 | - public HashMap<String, Object> entDscsnAplyCountByOneHourWriteSameIp(String params) throws Exception; | |
64 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entDscsnAply/service/EntDscsnAplyService.java
... | ... | @@ -1,48 +0,0 @@ |
1 | -package com.takensoft.portal.entDscsnAply.service; | |
2 | - | |
3 | -import com.takensoft.common.Pagination; | |
4 | -import com.takensoft.portal.entDscsnAply.vo.EntDscsnAplyVO; | |
5 | -import org.springframework.web.multipart.MultipartFile; | |
6 | - | |
7 | -import jakarta.servlet.http.HttpServletRequest; | |
8 | -import java.util.*; | |
9 | - | |
10 | -/** | |
11 | - * @author : 박정하 | |
12 | - * @since : 2024.04.02 | |
13 | - * | |
14 | - * 기업상담신청 관련 인터페이스 | |
15 | - */ | |
16 | -public interface EntDscsnAplyService { | |
17 | - /** | |
18 | - * @author 박정하 | |
19 | - * @since 2024.04.02 | |
20 | - * | |
21 | - * 기업상담신청 등록 | |
22 | - */ | |
23 | - public HashMap<String, Object> entDscsnAplyInsert(HttpServletRequest req, EntDscsnAplyVO entDscsnAplyVO) throws Exception; | |
24 | - | |
25 | - /** | |
26 | - * @author 박정하 | |
27 | - * @since 2024.04.02 | |
28 | - * | |
29 | - * 기업상담신청 목록 조회 | |
30 | - */ | |
31 | - public Map<String, Object> entDscsnAplyList(HttpServletRequest request, Map<String, String> params) throws Exception; | |
32 | - | |
33 | - /** | |
34 | - * @author 박정하 | |
35 | - * @since 2024.04.02 | |
36 | - * | |
37 | - * 기업상담신청 상세 조회 | |
38 | - */ | |
39 | - public EntDscsnAplyVO entDscsnAplyDetail(EntDscsnAplyVO entDscsnAplyVO) throws Exception; | |
40 | - | |
41 | - /** | |
42 | - * @author 박정하 | |
43 | - * @since 2024.04.02 | |
44 | - * | |
45 | - * 기업상담신청 수정 | |
46 | - */ | |
47 | - public int entDscsnAplyUpdate(EntDscsnAplyVO entDscsnAplyVO) throws Exception; | |
48 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entDscsnAply/service/Impl/EntDscsnAplyServiceImpl.java
... | ... | @@ -1,163 +0,0 @@ |
1 | -package com.takensoft.portal.entDscsnAply.service.Impl; | |
2 | - | |
3 | -import com.takensoft.cms.mber.vo.MberAuthorVO; | |
4 | -import com.takensoft.common.Pagination; | |
5 | -import com.takensoft.common.file.service.FileMngService; | |
6 | -import com.takensoft.common.file.service.FileService; | |
7 | -import com.takensoft.common.file.vo.FileMngVO; | |
8 | -import com.takensoft.common.idgen.service.IdgenService; | |
9 | -import com.takensoft.common.util.CommonUtils; | |
10 | -import com.takensoft.common.util.JWTUtil; | |
11 | -import com.takensoft.portal.entDscsnAply.dao.EntDscsnAplyDAO; | |
12 | -import com.takensoft.portal.entDscsnAply.service.EntDscsnAplyService; | |
13 | -import com.takensoft.portal.entDscsnAply.vo.EntDscsnAplyVO; | |
14 | -import com.takensoft.ums.service.UmsService; | |
15 | -import lombok.RequiredArgsConstructor; | |
16 | -import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
17 | -import org.springframework.stereotype.Service; | |
18 | -import org.springframework.transaction.annotation.Transactional; | |
19 | -import org.springframework.web.multipart.MultipartFile; | |
20 | - | |
21 | -import jakarta.servlet.http.HttpServletRequest; | |
22 | -import java.io.IOException; | |
23 | -import java.util.*; | |
24 | - | |
25 | -/** | |
26 | - * @author : 박정하 | |
27 | - * @since : 2024.04.02 | |
28 | - * | |
29 | - * 기업상담신청 관련 구현체 | |
30 | - * EgovAbstractServiceImpl : 전자정부 상속 | |
31 | - * EntDscsnAplyService : 기업상담신청 인터페이스 상속 | |
32 | - */ | |
33 | -@Service("entDscsnAplyService") | |
34 | -@RequiredArgsConstructor | |
35 | -public class EntDscsnAplyServiceImpl extends EgovAbstractServiceImpl implements EntDscsnAplyService { | |
36 | - private final JWTUtil jwtUtil; | |
37 | - private final EntDscsnAplyDAO entDscsnAplyDAO; | |
38 | - private final FileMngService fileMngService; | |
39 | - private final IdgenService entDscsnAplyIdgn; | |
40 | - private final FileService fileService; | |
41 | - private final CommonUtils commonUtils; | |
42 | - private final UmsService umsService; | |
43 | - | |
44 | - /** | |
45 | - * @author 박정하 | |
46 | - * @since 2024.04.02 | |
47 | - * | |
48 | - * 기업상담신청 등록 | |
49 | - */ | |
50 | - @Override | |
51 | - @Transactional(rollbackFor = Exception.class) | |
52 | - public HashMap<String, Object> entDscsnAplyInsert(HttpServletRequest req, EntDscsnAplyVO entDscsnAplyVO) throws Exception { | |
53 | - // 아이피 생성 | |
54 | - String ipAddress = commonUtils.getIp(req); | |
55 | - entDscsnAplyVO.setAplcntIp(ipAddress); | |
56 | - | |
57 | - // 아이피 검사 | |
58 | - HashMap<String, Object> result = new HashMap<>(); | |
59 | - result.put("insertResult", 0); | |
60 | - HashMap<String, Object> entDscsnAplyCount = entDscsnAplyDAO.entDscsnAplyCountByOneHourWriteSameIp(ipAddress); | |
61 | - if (Integer.parseInt((String.valueOf(entDscsnAplyCount.get("writecount")))) > 2) { | |
62 | - result.put("writeCount", entDscsnAplyCount.get("writecount")); | |
63 | - result.put("lastDatetime", entDscsnAplyCount.get("lastdatetime")); | |
64 | - return result; | |
65 | - } | |
66 | - | |
67 | - // 기업상담신청 아이디 생성 | |
68 | - String entDscsnAplyId = entDscsnAplyIdgn.getNextStringId(); | |
69 | - entDscsnAplyVO.setEntDscsnAplyId(entDscsnAplyId); | |
70 | - | |
71 | - // 첨부파일 | |
72 | - List<MultipartFile> insertFileList = entDscsnAplyVO.getInsertFileList(); | |
73 | - if (insertFileList.size() > 0) { | |
74 | - FileMngVO fileMngVO = new FileMngVO(); | |
75 | - | |
76 | - // 파일매니저 등록 | |
77 | - HashMap<String, Object> fileMng = fileMngService.fileMngInsert(fileMngVO, insertFileList); | |
78 | - | |
79 | - // 파일매니저 아이디 삽입 | |
80 | - entDscsnAplyVO.setFileMngId(fileMng.get("fileMngId").toString()); | |
81 | - } | |
82 | - | |
83 | - // 기업상담신청 등록 | |
84 | - int insertResult = entDscsnAplyDAO.entDscsnAplyInsert(entDscsnAplyVO); | |
85 | - | |
86 | - // 기업 상담 등록 시 문자 메시지 발송 | |
87 | - Map<String, Object> umsResult = umsService.save(); | |
88 | - | |
89 | - // 결과 반환 | |
90 | - result.put("insertResult", insertResult); | |
91 | - result.put("umsResult", umsResult); | |
92 | - return result; | |
93 | - } | |
94 | - | |
95 | - /** | |
96 | - * @author 박정하 | |
97 | - * @since 2024.04.02 | |
98 | - * | |
99 | - * 기업상담신청 목록 조회 | |
100 | - */ | |
101 | - @Override | |
102 | - public Map<String, Object> entDscsnAplyList(HttpServletRequest request, Map<String, String> params) throws Exception { | |
103 | - String accessToken = request.getHeader("Authorization"); | |
104 | - List<MberAuthorVO> roles = jwtUtil.getRoles(accessToken); | |
105 | - if (roles.size() > 0) { | |
106 | - for (MberAuthorVO role : roles) { | |
107 | - if (role.getAuthrtCd().equals("ROLE_ADMIN")){ | |
108 | - params.put("isAdmin", "Y"); | |
109 | - } | |
110 | - } | |
111 | - } | |
112 | - params.put("mbrId", jwtUtil.getWriter()); | |
113 | - | |
114 | - Pagination search = new Pagination(0, params); | |
115 | - int cnt = entDscsnAplyDAO.entDscsnAplyListCount(search); | |
116 | - Pagination pagination = new Pagination(cnt, params); | |
117 | - List<EntDscsnAplyVO> list = entDscsnAplyDAO.entDscsnAplyList(pagination); | |
118 | - | |
119 | - Map<String, Object> result = new HashMap<>(); | |
120 | - result.put("list", list); | |
121 | - result.put("pagination", pagination); | |
122 | - return result; | |
123 | - } | |
124 | - | |
125 | - /** | |
126 | - * @author 박정하 | |
127 | - * @since 2024.04.02 | |
128 | - * | |
129 | - * 기업상담신청 상세 조회 | |
130 | - */ | |
131 | - @Override | |
132 | - public EntDscsnAplyVO entDscsnAplyDetail(EntDscsnAplyVO entDscsnAplyVO) throws Exception { | |
133 | - EntDscsnAplyVO newEntDscsnAplyVO = new EntDscsnAplyVO(); | |
134 | - | |
135 | - // entDscsnAplyId가 있는 경우 | |
136 | - if (entDscsnAplyVO.getEntDscsnAplyId() != null) { | |
137 | - newEntDscsnAplyVO = entDscsnAplyDAO.entDscsnAplyDetail(entDscsnAplyVO.getEntDscsnAplyId()); | |
138 | - | |
139 | - // FileMngId가 있는 경우 | |
140 | - if (newEntDscsnAplyVO.getFileMngId() != null) { | |
141 | - List<HashMap<String, Object>> fileList = fileService.fileSelectList(newEntDscsnAplyVO.getFileMngId()); | |
142 | - newEntDscsnAplyVO.setFileList(fileList); | |
143 | - } | |
144 | - } | |
145 | - // entDscsnAplyId가 없는 경우 | |
146 | - else { | |
147 | - newEntDscsnAplyVO.setUseYn("Y"); // 사용유무 | |
148 | - } | |
149 | - | |
150 | - return newEntDscsnAplyVO; | |
151 | - } | |
152 | - | |
153 | - /** | |
154 | - * @author 박정하 | |
155 | - * @since 2024.04.02 | |
156 | - * | |
157 | - * 기업상담신청 수정 | |
158 | - */ | |
159 | - @Override | |
160 | - public int entDscsnAplyUpdate(EntDscsnAplyVO entDscsnAplyVO) throws Exception { | |
161 | - return entDscsnAplyDAO.entDscsnAplyUpdate(entDscsnAplyVO); | |
162 | - } | |
163 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entDscsnAply/vo/EntDscsnAplyVO.java
... | ... | @@ -1,56 +0,0 @@ |
1 | -package com.takensoft.portal.entDscsnAply.vo; | |
2 | - | |
3 | -import lombok.Data; | |
4 | -import org.springframework.web.multipart.MultipartFile; | |
5 | - | |
6 | -import java.util.ArrayList; | |
7 | -import java.util.HashMap; | |
8 | -import java.util.List; | |
9 | - | |
10 | -/** | |
11 | - * @author : 박정하 | |
12 | - * @since : 2024.04.02 | |
13 | - * | |
14 | - * 기업상담신청 관련 VO | |
15 | - */ | |
16 | -@Data | |
17 | -public class EntDscsnAplyVO { | |
18 | - // 기업상담신청 아이디 | |
19 | - private String entDscsnAplyId; | |
20 | - // 신청자 이름 | |
21 | - private String aplcntNm; | |
22 | - // 연락처 | |
23 | - private String telno; | |
24 | - // 이메일 | |
25 | - private String eml; | |
26 | - // 신청내용 | |
27 | - private String aplyCn; | |
28 | - // 파일관리 아이디 | |
29 | - private String fileMngId; | |
30 | - // 조치자 | |
31 | - private String actnPic; | |
32 | - // 조치일 | |
33 | - private String actnDt; | |
34 | - // 비고 | |
35 | - private String rmrk; | |
36 | - // 처리상태 | |
37 | - private String prcsStts; | |
38 | - // 사용여부 | |
39 | - private String useYn; | |
40 | - // 신청자 아이피 | |
41 | - private String aplcntIp; | |
42 | - // 등록일 | |
43 | - private String regDt; | |
44 | - | |
45 | - // 첨부파일 목록 | |
46 | - List<HashMap<String, Object>> fileList = new ArrayList<>(); | |
47 | - // 첨부파일 등록 목록 | |
48 | - List<MultipartFile> insertFileList = new ArrayList<>(); | |
49 | - // 첨부파일 삭제 목록 | |
50 | - List<HashMap<String, Object>> deleteFileList = new ArrayList<>(); | |
51 | - | |
52 | - // 기업명 | |
53 | - private String entNm; | |
54 | - // 조치자 이름 | |
55 | - private String mbrNm; | |
56 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entDscsnAply/web/EntDscsnAplyController.java
... | ... | @@ -1,128 +0,0 @@ |
1 | -package com.takensoft.portal.entDscsnAply.web; | |
2 | - | |
3 | -import com.takensoft.common.file.service.FileService; | |
4 | -import com.takensoft.common.message.MessageCode; | |
5 | -import com.takensoft.common.util.ResponseData; | |
6 | -import com.takensoft.common.util.ResponseUtil; | |
7 | -import com.takensoft.portal.entDscsnAply.service.EntDscsnAplyService; | |
8 | -import com.takensoft.portal.entDscsnAply.vo.EntDscsnAplyVO; | |
9 | -import lombok.RequiredArgsConstructor; | |
10 | -import org.springframework.http.HttpHeaders; | |
11 | -import org.springframework.http.HttpStatus; | |
12 | -import org.springframework.http.MediaType; | |
13 | -import org.springframework.http.ResponseEntity; | |
14 | -import org.springframework.web.bind.annotation.*; | |
15 | - | |
16 | -import jakarta.servlet.http.HttpServletRequest; | |
17 | -import java.nio.charset.Charset; | |
18 | -import java.util.*; | |
19 | -/** | |
20 | - * @author 박정하 | |
21 | - * @since 2024.04.02 | |
22 | - * @modification | |
23 | - * since | author | description | |
24 | - * 2024.04.02 | 박정하 | 최초 등록 | |
25 | - * | |
26 | - * 기업상담신청 관련 Controller | |
27 | - */ | |
28 | -@RestController | |
29 | -@RequiredArgsConstructor | |
30 | -public class EntDscsnAplyController { | |
31 | - private final EntDscsnAplyService entDscsnAplyService; | |
32 | - private final FileService fileService; | |
33 | - private final ResponseUtil resUtil; | |
34 | - | |
35 | - /** | |
36 | - * @author 박정하 | |
37 | - * @since 2024.04.02 | |
38 | - * @param entDscsnAplyVO | |
39 | - * @return | |
40 | - * @throws Exception | |
41 | - * | |
42 | - * 기업상담신청 등록 | |
43 | - */ | |
44 | - @PostMapping(path = "/sys/entDscsnAply/insertProc.file") | |
45 | - public ResponseEntity<?> insertProc(HttpServletRequest request, EntDscsnAplyVO entDscsnAplyVO) throws Exception { | |
46 | - HashMap<String, Object> result = entDscsnAplyService.entDscsnAplyInsert(request, entDscsnAplyVO); | |
47 | - int insertResult = (int)result.get("insertResult"); | |
48 | - | |
49 | - // 응답 처리 | |
50 | - HttpHeaders headers = new HttpHeaders(); | |
51 | - headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); | |
52 | - ResponseData responseData = new ResponseData(); | |
53 | - if (insertResult > 0) { | |
54 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
55 | - } else if(insertResult < 0) { | |
56 | - return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); | |
57 | - } else { | |
58 | - if (result.containsKey("writeCount") && result.containsKey("lastDatetime")) { | |
59 | - responseData.setStatus(HttpStatus.TOO_MANY_REQUESTS.value()); | |
60 | - responseData.setStatusText(HttpStatus.TOO_MANY_REQUESTS); | |
61 | - responseData.setMessage("주어진 시간 동안 너무 많은 문의를 등록했습니다. " + result.get("lastDatetime") + " 후에 재시도하세요."); | |
62 | - return new ResponseEntity<>(responseData, headers, HttpStatus.TOO_MANY_REQUESTS); | |
63 | - } else { | |
64 | - return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); | |
65 | - } | |
66 | - } | |
67 | - } | |
68 | - | |
69 | - /** | |
70 | - * @author 박정하 | |
71 | - * @since 2024.04.02 | |
72 | - * @param params | |
73 | - * @return | |
74 | - * @throws Exception | |
75 | - * | |
76 | - * 기업상담신청 목록 조회 | |
77 | - */ | |
78 | - @PostMapping(path = "/government/entDscsnAply/listProc.json") | |
79 | - public ResponseEntity<?> listProc(HttpServletRequest request, @RequestBody Map<String, String> params) throws Exception { | |
80 | - Map<String, Object> result = entDscsnAplyService.entDscsnAplyList(request, params); | |
81 | - | |
82 | - // 응답 처리 | |
83 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
84 | - } | |
85 | - | |
86 | - /** | |
87 | - * @author 박정하 | |
88 | - * @since 2024.04.02 | |
89 | - * @param entDscsnAplyVO | |
90 | - * @return | |
91 | - * @throws Exception | |
92 | - * | |
93 | - * 기업상담신청 상세 조회 | |
94 | - */ | |
95 | - @PostMapping(path = "/sys/entDscsnAply/detailProc.json") | |
96 | - public ResponseEntity<?> detailProc(@RequestBody EntDscsnAplyVO entDscsnAplyVO) throws Exception { | |
97 | - EntDscsnAplyVO result = entDscsnAplyService.entDscsnAplyDetail(entDscsnAplyVO); | |
98 | - | |
99 | - // 응답 처리 | |
100 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
101 | - } | |
102 | - | |
103 | - /** | |
104 | - * @author 박정하 | |
105 | - * @since 2024.04.02 | |
106 | - * @param entDscsnAplyVO | |
107 | - * @return | |
108 | - * @throws Exception | |
109 | - * | |
110 | - * 기업상담신청 수정 | |
111 | - */ | |
112 | - @PostMapping(path = "/sys/entDscsnAply/update.json") | |
113 | - public ResponseEntity<?> entDscsnAplyUpdate(@RequestBody EntDscsnAplyVO entDscsnAplyVO) throws Exception { | |
114 | - int result = entDscsnAplyService.entDscsnAplyUpdate(entDscsnAplyVO); | |
115 | - | |
116 | - // 응답 처리 | |
117 | - HttpHeaders headers = new HttpHeaders(); | |
118 | - headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); | |
119 | - ResponseData responseData = new ResponseData(); | |
120 | - if (result > 0) { | |
121 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
122 | - } else if(result < 0) { | |
123 | - return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); | |
124 | - } else { | |
125 | - return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); | |
126 | - } | |
127 | - } | |
128 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entInfo/dao/BplcDAO.java
... | ... | @@ -1,38 +0,0 @@ |
1 | -package com.takensoft.portal.entInfo.dao; | |
2 | - | |
3 | -import com.takensoft.portal.entInfo.vo.BplcVO; | |
4 | -import com.takensoft.portal.entInfo.vo.EntInfoVO; | |
5 | -import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
6 | - | |
7 | -/** | |
8 | - * @author : 박정하 | |
9 | - * @since : 2024.06.10 | |
10 | - * | |
11 | - * 기업주요사업장 관련 Mapper | |
12 | - */ | |
13 | -@Mapper("bplcDAO") | |
14 | -public interface BplcDAO { | |
15 | - /** | |
16 | - * @author 박정하 | |
17 | - * @since 2024.06.10 | |
18 | - * | |
19 | - * 기업주요사업장 등록 | |
20 | - */ | |
21 | - public int bplcInsert(BplcVO bplcVO) throws Exception; | |
22 | - | |
23 | - /** | |
24 | - * @author 박정하 | |
25 | - * @since 2024.06.10 | |
26 | - * | |
27 | - * 기업주요사업장 수정 | |
28 | - */ | |
29 | - public int bplcUpdate(BplcVO bplcVO) throws Exception; | |
30 | - | |
31 | - /** | |
32 | - * @author 박정하 | |
33 | - * @since 2024.06.10 | |
34 | - * | |
35 | - * 기업주요사업장 삭제 (기업정보 삭제용) | |
36 | - */ | |
37 | - public int bplcUpdateByEntInfoId(EntInfoVO entInfoVO) throws Exception; | |
38 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entInfo/dao/EntInfoDAO.java
... | ... | @@ -1,97 +0,0 @@ |
1 | -package com.takensoft.portal.entInfo.dao; | |
2 | - | |
3 | -import com.takensoft.common.Pagination; | |
4 | -import com.takensoft.portal.entInfo.dto.EntInfoExcelDTO; | |
5 | -import com.takensoft.portal.entInfo.vo.EntInfoVO; | |
6 | -import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
7 | - | |
8 | -import java.util.*; | |
9 | - | |
10 | -/** | |
11 | - * @author : 박정하 | |
12 | - * @since : 2024.03.20 | |
13 | - * | |
14 | - * 기업정보 관련 Mapper | |
15 | - */ | |
16 | -@Mapper("entInfoDAO") | |
17 | -public interface EntInfoDAO { | |
18 | - /** | |
19 | - * @author 박정하 | |
20 | - * @since 2024.03.20 | |
21 | - * | |
22 | - * 기업정보 등록 | |
23 | - */ | |
24 | - public int entInfoInsert(EntInfoVO entInfoVO) throws Exception; | |
25 | - | |
26 | - /** | |
27 | - * @author 박정하 | |
28 | - * @since 2024.03.21 | |
29 | - * | |
30 | - * 사업자등록번호 중복 검사 | |
31 | - */ | |
32 | - public int selectCntByCheckBrno(String brno) throws Exception; | |
33 | - | |
34 | - /** | |
35 | - * @author 박정하 | |
36 | - * @since 2024.03.21 | |
37 | - * | |
38 | - * 기업정보 목록 조회 | |
39 | - */ | |
40 | - public List<EntInfoVO> entInfoSelectList(Pagination pagination) throws Exception; | |
41 | - | |
42 | - /** | |
43 | - * @author 박정하 | |
44 | - * @since 2024.03.21 | |
45 | - * | |
46 | - * 기업정보 목록 총 개수 조회 | |
47 | - */ | |
48 | - public int entInfoSelectListCount(Pagination pagination) throws Exception; | |
49 | - | |
50 | - /** | |
51 | - * @author 박정하 | |
52 | - * @since 2024.03.21 | |
53 | - * | |
54 | - * 기업정보 상세 조회 | |
55 | - */ | |
56 | - public EntInfoVO selectEntInfoDetail(String entId) throws Exception; | |
57 | - | |
58 | - /** | |
59 | - * @author 박정하 | |
60 | - * @since 2024.03.22 | |
61 | - * | |
62 | - * 기업정보 수정 | |
63 | - */ | |
64 | - public int entInfoUpdate(EntInfoVO entInfoVO) throws Exception; | |
65 | - | |
66 | - /** | |
67 | - * @author 박정하 | |
68 | - * @since 2024.03.22 | |
69 | - * | |
70 | - * 기업정보 삭제 | |
71 | - */ | |
72 | - public int entInfoDelete(EntInfoVO entInfoVO) throws Exception; | |
73 | - | |
74 | - /** | |
75 | - * @author 박정하 | |
76 | - * @since 2024.03.22 | |
77 | - * | |
78 | - * 기업정보 목록 조회 (최신 5건) | |
79 | - */ | |
80 | - public List<HashMap<String, Object>> selectCompanyInfoListByNew() throws Exception; | |
81 | - | |
82 | - /** | |
83 | - * @author 박정하 | |
84 | - * @since 2024.03.21 | |
85 | - * | |
86 | - * 기업정보 목록 조회 (엑셀 다운로드 용) | |
87 | - */ | |
88 | - public List<HashMap<String, String>> entInfoSelectListAll(HashMap<String, String> params) throws Exception; | |
89 | - | |
90 | - /** | |
91 | - * @author 박정하 | |
92 | - * @since 2024.03.21 | |
93 | - * | |
94 | - * 상위업종코드 목록 조회 (엑셀 다운로드 용) | |
95 | - */ | |
96 | - public List<String> ksicUpCdList() throws Exception; | |
97 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entInfo/dto/BplcExcelDTO.java
... | ... | @@ -1,59 +0,0 @@ |
1 | -package com.takensoft.portal.entInfo.dto; | |
2 | - | |
3 | -import com.takensoft.common.excel.annotation.ExcelColumnName; | |
4 | -import com.takensoft.common.excel.annotation.ExcelFileName; | |
5 | -import lombok.Builder; | |
6 | -import lombok.Getter; | |
7 | -import lombok.NoArgsConstructor; | |
8 | -import lombok.Setter; | |
9 | - | |
10 | -import javax.persistence.*; | |
11 | - | |
12 | -/** | |
13 | - * @author : 박정하 | |
14 | - * @since : 2024.06.18 | |
15 | - * | |
16 | - * 주요사업장 엑셀 다운로드 관련 DTO | |
17 | - */ | |
18 | -@Entity | |
19 | -@Getter | |
20 | -@Setter | |
21 | -@NoArgsConstructor | |
22 | -@ExcelFileName(fileName="주요사업장") | |
23 | -public class BplcExcelDTO { | |
24 | - @Id | |
25 | - @Column | |
26 | - @GeneratedValue(strategy = GenerationType.IDENTITY) | |
27 | - @ExcelColumnName(headerName = "사업장명") | |
28 | - private String bplcNm; | |
29 | - | |
30 | - @Column | |
31 | - @ExcelColumnName(headerName = "주생산품") | |
32 | - private String mainPrdt; | |
33 | - | |
34 | - @Column | |
35 | - @ExcelColumnName(headerName = "주소") | |
36 | - private String bplcAddr; | |
37 | - | |
38 | - @Column | |
39 | - @ExcelColumnName(headerName = "대지면적") | |
40 | - private String bplcSiar; | |
41 | - | |
42 | - @Column | |
43 | - @ExcelColumnName(headerName = "공장면적") | |
44 | - private String fctryArea; | |
45 | - | |
46 | - @Column | |
47 | - @ExcelColumnName(headerName = "종업원수") | |
48 | - private String wrkrCnt; | |
49 | - | |
50 | - @Builder | |
51 | - public BplcExcelDTO(String bplcNm, String mainPrdt, String bplcAddr, String bplcSiar, String fctryArea, String wrkrCnt) { | |
52 | - this.bplcNm = bplcNm; | |
53 | - this.mainPrdt = mainPrdt; | |
54 | - this.bplcAddr = bplcAddr; | |
55 | - this.bplcSiar = bplcSiar; | |
56 | - this.fctryArea = fctryArea; | |
57 | - this.wrkrCnt = wrkrCnt; | |
58 | - } | |
59 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entInfo/dto/EntInfoExcelDTO.java
... | ... | @@ -1,105 +0,0 @@ |
1 | -package com.takensoft.portal.entInfo.dto; | |
2 | - | |
3 | -import com.takensoft.common.excel.annotation.ExcelColumnName; | |
4 | -import com.takensoft.common.excel.annotation.ExcelFileName; | |
5 | -import lombok.Builder; | |
6 | -import lombok.Getter; | |
7 | -import lombok.NoArgsConstructor; | |
8 | -import lombok.Setter; | |
9 | - | |
10 | -import javax.persistence.*; | |
11 | - | |
12 | -/** | |
13 | - * @author : 박정하 | |
14 | - * @since : 2024.06.18 | |
15 | - * | |
16 | - * 기업정보 엑셀 다운로드 관련 DTO | |
17 | - */ | |
18 | -@Entity | |
19 | -@Getter | |
20 | -@Setter | |
21 | -@NoArgsConstructor | |
22 | -@ExcelFileName(fileName="기업정보") | |
23 | -public class EntInfoExcelDTO { | |
24 | - @Id | |
25 | - @Column | |
26 | - @GeneratedValue(strategy = GenerationType.IDENTITY) | |
27 | - @ExcelColumnName(headerName = "기업명") | |
28 | - private String entNm; | |
29 | - | |
30 | - @Column | |
31 | - @ExcelColumnName(headerName = "사업자번호") | |
32 | - private String brno; | |
33 | - | |
34 | - @Column | |
35 | - @ExcelColumnName(headerName = "대표자명") | |
36 | - private String rprsvNm; | |
37 | - | |
38 | - @Column | |
39 | - @ExcelColumnName(headerName = "소재지") | |
40 | - private String lctn; | |
41 | - | |
42 | - @Column | |
43 | - @ExcelColumnName(headerName = "대지면적") | |
44 | - private String bplcSiar; | |
45 | - | |
46 | - @Column | |
47 | - @ExcelColumnName(headerName = "공장면적") | |
48 | - private String fctryArea; | |
49 | - | |
50 | - @Column | |
51 | - @ExcelColumnName(headerName = "표준산업분류") | |
52 | - private String ksic; | |
53 | - | |
54 | - @Column | |
55 | - @ExcelColumnName(headerName = "주요제품") | |
56 | - private String mainPrdct; | |
57 | - | |
58 | - @Column | |
59 | - @ExcelColumnName(headerName = "기업신용") | |
60 | - private String entCrdt; | |
61 | - | |
62 | - @Column | |
63 | - @ExcelColumnName(headerName = "설립일") | |
64 | - private String fndnDt; | |
65 | - | |
66 | - @Column | |
67 | - @ExcelColumnName(headerName = "고용인원수") | |
68 | - private String wrkrCnt; | |
69 | - | |
70 | - // 세부정보 | |
71 | - @Column | |
72 | - @ExcelColumnName(headerName = "상담유무") | |
73 | - private String isIvstDscsn; | |
74 | - | |
75 | - @Column | |
76 | - @ExcelColumnName(headerName = "입주의향") | |
77 | - private String mvnInten; | |
78 | - | |
79 | - @Column | |
80 | - @ExcelColumnName(headerName = "MOU의향") | |
81 | - private String mouInten; | |
82 | - | |
83 | - @Column | |
84 | - @ExcelColumnName(headerName = "비고") | |
85 | - private String rmrk; | |
86 | - | |
87 | - @Builder | |
88 | - public EntInfoExcelDTO(String entNm, String brno, String rprsvNm, String lctn, String bplcSiar, String fctryArea, String ksic, String mainPrdct, String entCrdt, String fndnDt, String wrkrCnt, String isIvstDscsn, String mvnInten, String mouInten, String rmrk) { | |
89 | - this.entNm = entNm; | |
90 | - this.brno = brno; | |
91 | - this.rprsvNm = rprsvNm; | |
92 | - this.lctn = lctn; | |
93 | - this.bplcSiar = bplcSiar; | |
94 | - this.fctryArea = fctryArea; | |
95 | - this.ksic = ksic; | |
96 | - this.mainPrdct = mainPrdct; | |
97 | - this.entCrdt = entCrdt; | |
98 | - this.fndnDt = fndnDt; | |
99 | - this.wrkrCnt = wrkrCnt; | |
100 | - this.isIvstDscsn = isIvstDscsn; | |
101 | - this.mvnInten = mvnInten; | |
102 | - this.mouInten = mouInten; | |
103 | - this.rmrk = rmrk; | |
104 | - } | |
105 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entInfo/service/BplcService.java
... | ... | @@ -1,45 +0,0 @@ |
1 | -package com.takensoft.portal.entInfo.service; | |
2 | - | |
3 | -import com.takensoft.portal.entInfo.vo.BplcVO; | |
4 | - | |
5 | -import java.util.*; | |
6 | - | |
7 | -/** | |
8 | - * @author : 박정하 | |
9 | - * @since : 2024.06.10 | |
10 | - * | |
11 | - * 기업주요사업장 관련 인터페이스 | |
12 | - */ | |
13 | -public interface BplcService { | |
14 | - /** | |
15 | - * @author 박정하 | |
16 | - * @since 2024.06.10 | |
17 | - * | |
18 | - * 기업주요사업장 등록 | |
19 | - */ | |
20 | - public int bplcListInsert(List<BplcVO> bplcList) throws Exception; | |
21 | - | |
22 | - /** | |
23 | - * @author 박정하 | |
24 | - * @since 2024.06.10 | |
25 | - * | |
26 | - * 기업주요사업장 수정 | |
27 | - */ | |
28 | - public int bplcListUpdate(List<BplcVO> bplcList) throws Exception; | |
29 | - | |
30 | - /** | |
31 | - * @author 박정하 | |
32 | - * @since 2024.06.10 | |
33 | - * | |
34 | - * 기업주요사업장 삭제 | |
35 | - */ | |
36 | - public int bplcListDelete(List<BplcVO> bplcList) throws Exception; | |
37 | - | |
38 | - /** | |
39 | - * @author 박정하 | |
40 | - * @since 2024.06.10 | |
41 | - * | |
42 | - * 기업주요사업장 삭제 (기업정보 삭제용) | |
43 | - */ | |
44 | - public int bplcDeleteByEntInfoId(String entMttrId) throws Exception; | |
45 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entInfo/service/EntInfoService.java
... | ... | @@ -1,72 +0,0 @@ |
1 | -package com.takensoft.portal.entInfo.service; | |
2 | - | |
3 | -import com.takensoft.portal.entInfo.dto.EntInfoExcelDTO; | |
4 | -import com.takensoft.portal.entInfo.vo.EntInfoVO; | |
5 | -import org.springframework.web.bind.annotation.RequestPart; | |
6 | -import org.springframework.web.multipart.MultipartFile; | |
7 | - | |
8 | -import java.util.*; | |
9 | - | |
10 | -/** | |
11 | - * @author : 박정하 | |
12 | - * @since : 2024.03.20 | |
13 | - * | |
14 | - * 기업정보 관련 인터페이스 | |
15 | - */ | |
16 | -public interface EntInfoService { | |
17 | - /** | |
18 | - * @author 박정하 | |
19 | - * @since 2024.03.20 | |
20 | - * | |
21 | - * 기업정보 등록 | |
22 | - */ | |
23 | - public HashMap<String, Object> entInfoInsert(EntInfoVO entInfoVO, List<MultipartFile> insertFileList) throws Exception; | |
24 | - | |
25 | - /** | |
26 | - * @author 박정하 | |
27 | - * @since 2024.03.21 | |
28 | - * | |
29 | - * 사업자등록번호 중복 검사 | |
30 | - */ | |
31 | - public int selectCntByCheckBrno(String brno) throws Exception; | |
32 | - | |
33 | - /** | |
34 | - * @author 박정하 | |
35 | - * @since 2024.03.21 | |
36 | - * | |
37 | - * 기업정보 목록 조회 | |
38 | - */ | |
39 | - public Map<String, Object> entInfoSelectList(Map<String, String> params) throws Exception; | |
40 | - | |
41 | - /** | |
42 | - * @author 박정하 | |
43 | - * @since 2024.03.21 | |
44 | - * | |
45 | - * 기업정보 상세 조회 | |
46 | - */ | |
47 | - public HashMap<String, Object> entInfoDetail(EntInfoVO entInfoVO) throws Exception; | |
48 | - | |
49 | - /** | |
50 | - * @author 박정하 | |
51 | - * @since 2024.03.22 | |
52 | - * | |
53 | - * 기업정보 수정 | |
54 | - */ | |
55 | - public int entInfoUpdate(EntInfoVO entInfoVO, List<MultipartFile> insertFileList) throws Exception; | |
56 | - | |
57 | - /** | |
58 | - * @author 박정하 | |
59 | - * @since 2024.03.22 | |
60 | - * | |
61 | - * 기업정보 삭제 | |
62 | - */ | |
63 | - public int entInfoDelete(EntInfoVO entInfoVO) throws Exception; | |
64 | - | |
65 | - /** | |
66 | - * @author 박정하 | |
67 | - * @since 2024.06.26 | |
68 | - * | |
69 | - * 기업정보 목록 조회 (엑셀 다운로드 용) | |
70 | - */ | |
71 | - public List<EntInfoExcelDTO> excelDownloadAll(HashMap<String, String> params) throws Exception; | |
72 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entInfo/service/Impl/BplcServiceImpl.java
... | ... | @@ -1,111 +0,0 @@ |
1 | -package com.takensoft.portal.entInfo.service.Impl; | |
2 | - | |
3 | -import com.takensoft.common.util.JWTUtil; | |
4 | -import com.takensoft.portal.entInfo.dao.BplcDAO; | |
5 | -import com.takensoft.portal.entInfo.service.BplcService; | |
6 | -import com.takensoft.portal.entInfo.vo.BplcVO; | |
7 | -import com.takensoft.portal.entInfo.vo.EntInfoVO; | |
8 | -import lombok.RequiredArgsConstructor; | |
9 | -import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
10 | -import org.springframework.stereotype.Service; | |
11 | - | |
12 | -import java.util.List; | |
13 | - | |
14 | -/** | |
15 | - * @author : 박정하 | |
16 | - * @since : 2024.06.10 | |
17 | - * | |
18 | - * 기업주요사업장 관련 구현체 | |
19 | - * EgovAbstractServiceImpl : 전자정부 상속 | |
20 | - * BplcService : 기업주요사업장 인터페이스 상속 | |
21 | - */ | |
22 | -@Service("bplcService") | |
23 | -@RequiredArgsConstructor | |
24 | -public class BplcServiceImpl extends EgovAbstractServiceImpl implements BplcService { | |
25 | - private final JWTUtil jwtUtil; | |
26 | - private final BplcDAO bplcDAO; | |
27 | - | |
28 | - /** | |
29 | - * @author 박정하 | |
30 | - * @since 2024.06.10 | |
31 | - * | |
32 | - * 기업주요사업장 등록 | |
33 | - */ | |
34 | - @Override | |
35 | - public int bplcListInsert(List<BplcVO> bplcList) throws Exception { | |
36 | - int result = 0; | |
37 | - for (BplcVO bplcVO : bplcList) { | |
38 | - if (bplcVO.getBplcNm() != null) { | |
39 | - result += bplcDAO.bplcInsert(bplcVO); | |
40 | - } | |
41 | - } | |
42 | - return result; | |
43 | - } | |
44 | - | |
45 | - /** | |
46 | - * @author 박정하 | |
47 | - * @since 2024.06.10 | |
48 | - * | |
49 | - * 기업주요사업장 수정 | |
50 | - */ | |
51 | - @Override | |
52 | - public int bplcListUpdate(List<BplcVO> bplcList) throws Exception { | |
53 | - // 수정자 생성 | |
54 | - String writer = jwtUtil.getWriter(); | |
55 | - | |
56 | - int result = 0; | |
57 | - for (BplcVO bplcVO : bplcList) { | |
58 | - if (bplcVO.getBplcNm() != null) { | |
59 | - // 기업주요사업장 아이디가 있는 경우 (수정) | |
60 | - if (bplcVO.getBplcId() != null) { | |
61 | - bplcVO.setMdfr(writer); | |
62 | - result += bplcDAO.bplcUpdate(bplcVO); | |
63 | - } | |
64 | - // 기업주요사업장 아이디가 없는 경우 (추가) | |
65 | - else { | |
66 | - bplcVO.setRgtr(writer); | |
67 | - result += bplcDAO.bplcInsert(bplcVO); | |
68 | - } | |
69 | - } | |
70 | - } | |
71 | - return result; | |
72 | - } | |
73 | - | |
74 | - /** | |
75 | - * @author 박정하 | |
76 | - * @since 2024.06.10 | |
77 | - * | |
78 | - * 기업주요사업장 삭제 | |
79 | - */ | |
80 | - @Override | |
81 | - public int bplcListDelete(List<BplcVO> bplcDeleteList) throws Exception { | |
82 | - // 수정자 생성 | |
83 | - String writer = jwtUtil.getWriter(); | |
84 | - | |
85 | - int result = 0; | |
86 | - for (BplcVO bplcVO : bplcDeleteList) { | |
87 | - bplcVO.setMdfr(writer); | |
88 | - result += bplcDAO.bplcUpdate(bplcVO); | |
89 | - } | |
90 | - return result; | |
91 | - } | |
92 | - | |
93 | - /** | |
94 | - * @author 박정하 | |
95 | - * @since 2024.06.10 | |
96 | - * | |
97 | - * 기업주요사업장 삭제 (기업정보 삭제용) | |
98 | - */ | |
99 | - @Override | |
100 | - public int bplcDeleteByEntInfoId(String entMttrId) throws Exception { | |
101 | - EntInfoVO entInfoVO = new EntInfoVO(); | |
102 | - | |
103 | - // 수정자 생성 | |
104 | - String writer = jwtUtil.getWriter(); | |
105 | - entInfoVO.setMdfr(writer); | |
106 | - | |
107 | - int result = bplcDAO.bplcUpdateByEntInfoId(entInfoVO); | |
108 | - | |
109 | - return result; | |
110 | - } | |
111 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entInfo/service/Impl/EntInfoServiceImpl.java
... | ... | @@ -1,296 +0,0 @@ |
1 | -package com.takensoft.portal.entInfo.service.Impl; | |
2 | - | |
3 | -import com.takensoft.cms.codeManage.service.CodeManageService; | |
4 | -import com.takensoft.cms.codeManage.vo.CodeManageVO; | |
5 | -import com.takensoft.common.Pagination; | |
6 | -import com.takensoft.common.file.service.FileMngService; | |
7 | -import com.takensoft.common.file.service.FileService; | |
8 | -import com.takensoft.common.file.vo.FileMngVO; | |
9 | -import com.takensoft.common.idgen.service.IdgenService; | |
10 | -import com.takensoft.common.util.JWTUtil; | |
11 | -import com.takensoft.portal.entInfo.dao.EntInfoDAO; | |
12 | -import com.takensoft.portal.entInfo.dto.EntInfoExcelDTO; | |
13 | -import com.takensoft.portal.entInfo.service.EntInfoService; | |
14 | -import com.takensoft.portal.entInfo.vo.EntInfoVO; | |
15 | -import com.takensoft.portal.entInfo.vo.BplcVO; | |
16 | -import com.takensoft.portal.ivstDscsn.service.IvstDscsnService; | |
17 | -import lombok.RequiredArgsConstructor; | |
18 | -import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
19 | -import org.springframework.stereotype.Service; | |
20 | -import org.springframework.transaction.annotation.Transactional; | |
21 | -import org.springframework.web.multipart.MultipartFile; | |
22 | - | |
23 | -import java.util.*; | |
24 | - | |
25 | -/** | |
26 | - * @author : 박정하 | |
27 | - * @since : 2024.03.20 | |
28 | - * | |
29 | - * 기업정보 관련 구현체 | |
30 | - * EgovAbstractServiceImpl : 전자정부 상속 | |
31 | - * EntInfoService : 기업정보 인터페이스 상속 | |
32 | - */ | |
33 | -@Service("entInfoService") | |
34 | -@RequiredArgsConstructor | |
35 | -public class EntInfoServiceImpl extends EgovAbstractServiceImpl implements EntInfoService { | |
36 | - private final EntInfoDAO entInfoDAO; | |
37 | - private final IdgenService entInfoIdgn; | |
38 | - private final IvstDscsnService ivstDscsnService; | |
39 | - private final JWTUtil jwtUtil; | |
40 | - private final BplcServiceImpl entMainBplcService; | |
41 | - private final CodeManageService codeManageService; | |
42 | - private final FileMngService fileMngService; | |
43 | - private final FileService fileService; | |
44 | - | |
45 | - /** | |
46 | - * @author 박정하 | |
47 | - * @since 2024.03.20 | |
48 | - * | |
49 | - * 기업정보 등록 | |
50 | - */ | |
51 | - @Override | |
52 | - @Transactional(rollbackFor = Exception.class) | |
53 | - public HashMap<String, Object> entInfoInsert(EntInfoVO entInfoVO, List<MultipartFile> insertFileList) throws Exception { | |
54 | - // 기업 아이디 생성 | |
55 | - String entId = entInfoIdgn.getNextStringId(); | |
56 | - entInfoVO.setEntId(entId); | |
57 | - | |
58 | - // 작성자 생성 | |
59 | - String writer = jwtUtil.getWriter(); | |
60 | - entInfoVO.setRgtr(writer); | |
61 | - | |
62 | - // 첨부파일 등록 | |
63 | - if (insertFileList != null && !insertFileList.isEmpty() && insertFileList.size() > 0) { | |
64 | - FileMngVO fileMngVO = new FileMngVO(); | |
65 | - | |
66 | - // 파일매니저 등록 | |
67 | - HashMap<String, Object> fileMng = fileMngService.fileMngInsert(fileMngVO, insertFileList); | |
68 | - | |
69 | - // 파일매니저 아이디 삽입 | |
70 | - entInfoVO.setFileMngId(fileMng.get("fileMngId").toString()); | |
71 | - } | |
72 | - | |
73 | - // 기업정보 등록 | |
74 | - int insertResult = entInfoDAO.entInfoInsert(entInfoVO); | |
75 | - | |
76 | - // 주요사업장 등록 | |
77 | - if (entInfoVO.getBplcList().size() > 0) { | |
78 | - List<BplcVO> newBplcList = new ArrayList<>(); | |
79 | - for (BplcVO bplcVO : entInfoVO.getBplcList()) { | |
80 | - bplcVO.setEntId(entId); | |
81 | - bplcVO.setRgtr(writer); | |
82 | - newBplcList.add(bplcVO); | |
83 | - } | |
84 | - insertResult += entMainBplcService.bplcListInsert(newBplcList); | |
85 | - } | |
86 | - | |
87 | - // 기업정보 등록 | |
88 | - HashMap<String, Object> result = new HashMap<>(); | |
89 | - result.put("entId", entId); | |
90 | - result.put("result", insertResult); | |
91 | - return result; | |
92 | - } | |
93 | - | |
94 | - /** | |
95 | - * @author 박정하 | |
96 | - * @since 2024.03.21 | |
97 | - * | |
98 | - * 사업자등록번호 중복 검사 | |
99 | - */ | |
100 | - @Override | |
101 | - public int selectCntByCheckBrno(String brno) throws Exception { | |
102 | - return entInfoDAO.selectCntByCheckBrno(brno); | |
103 | - } | |
104 | - | |
105 | - /** | |
106 | - * @author 박정하 | |
107 | - * @since 2024.03.21 | |
108 | - * | |
109 | - * 기업정보 목록 조회 | |
110 | - */ | |
111 | - @Override | |
112 | - public Map<String, Object> entInfoSelectList(Map<String, String> params) throws Exception { | |
113 | - Pagination search = new Pagination(0, params); | |
114 | - int cnt = entInfoDAO.entInfoSelectListCount(search); | |
115 | - Pagination pagination = new Pagination(cnt, params); | |
116 | - List<EntInfoVO> list = entInfoDAO.entInfoSelectList(pagination); | |
117 | - | |
118 | - // 상위업종코드 목록 조회 | |
119 | - List<String> ksicUpCdList = entInfoDAO.ksicUpCdList(); | |
120 | - | |
121 | - // 결과 반환 | |
122 | - Map<String, Object> result = new HashMap<>(); | |
123 | - result.put("list", list); | |
124 | - result.put("pagination", pagination); | |
125 | - result.put("ksicUpCdList", ksicUpCdList); | |
126 | - return result; | |
127 | - } | |
128 | - | |
129 | - /** | |
130 | - * @author 박정하 | |
131 | - * @since 2024.03.21 | |
132 | - * | |
133 | - * 기업정보 상세 조회 | |
134 | - */ | |
135 | - @Override | |
136 | - public HashMap<String, Object> entInfoDetail(EntInfoVO entInfoVO) throws Exception { | |
137 | - EntInfoVO newEntInfoVO = new EntInfoVO(); | |
138 | - | |
139 | - // entInfoId가 있는 경우 | |
140 | - if (entInfoVO.getEntId() != null) { | |
141 | - newEntInfoVO = entInfoDAO.selectEntInfoDetail(entInfoVO.getEntId()); | |
142 | - // FileMngId가 있는 경우 | |
143 | - if (newEntInfoVO.getFileMngId() != null) { | |
144 | - List<HashMap<String, Object>> fileList = fileService.fileSelectList(newEntInfoVO.getFileMngId()); | |
145 | - newEntInfoVO.setFileList(fileList); | |
146 | - } | |
147 | - } | |
148 | - // entInfoId가 없는 경우 | |
149 | - else { | |
150 | - newEntInfoVO.setUseYn("Y"); // 사용유무 | |
151 | - newEntInfoVO.setIsBrnoChange(false); // 사업자번호 변경 여부 | |
152 | - } | |
153 | - | |
154 | - // 주요사업장 | |
155 | - if (newEntInfoVO.getBplcList().size() == 0) { | |
156 | - BplcVO bplcVO = new BplcVO(); | |
157 | - bplcVO.setEntId(newEntInfoVO.getEntId()); // 기업정보 Id | |
158 | - | |
159 | - List<BplcVO> bplcList = new ArrayList<>(); | |
160 | - bplcList.add(bplcVO); | |
161 | - | |
162 | - newEntInfoVO.setBplcList(bplcList); | |
163 | - } | |
164 | - | |
165 | - // 면적 단위 | |
166 | - List<CodeManageVO> bplcCodeList = codeManageService.findByChildCdCache("areaUnit"); | |
167 | - List<CodeManageVO> lctnCodeList = codeManageService.findByChildCdCache("admdsp"); | |
168 | - | |
169 | - HashMap<String, Object> result = new HashMap<>(); | |
170 | - result.put("entInfoVO", newEntInfoVO); | |
171 | - result.put("bplcCodeList", bplcCodeList); | |
172 | - result.put("lctnCodeList", lctnCodeList); | |
173 | - return result; | |
174 | - } | |
175 | - | |
176 | - /** | |
177 | - * @author 박정하 | |
178 | - * @since 2024.03.22 | |
179 | - * | |
180 | - * 기업정보 수정 | |
181 | - */ | |
182 | - @Override | |
183 | - @Transactional(rollbackFor = Exception.class) | |
184 | - public int entInfoUpdate(EntInfoVO entInfoVO, List<MultipartFile> insertFileList) throws Exception { | |
185 | - // 수정자 생성 | |
186 | - String writer = jwtUtil.getWriter(); | |
187 | - entInfoVO.setMdfr(writer); | |
188 | - | |
189 | - int result = 0; | |
190 | - | |
191 | - // 첨부파일 정보 | |
192 | - String fileMngId = entInfoVO.getFileMngId(); | |
193 | - FileMngVO fileMngVO = new FileMngVO(); | |
194 | - List<HashMap<String, Object>> deleteFileList = entInfoVO.getDeleteFileList(); | |
195 | - | |
196 | - // FileMngId가 있는 경우 | |
197 | - if (fileMngId != null) { | |
198 | - fileMngVO.setFileMngId(entInfoVO.getFileMngId()); | |
199 | - for (HashMap<String, Object> file : deleteFileList) { | |
200 | - file.put("fileId", Integer.parseInt(file.get("fileId").toString())); | |
201 | - } | |
202 | - result += fileMngService.fileMngUpadate(fileMngVO, deleteFileList, insertFileList); | |
203 | - } | |
204 | - // FileMngId가 없는 경우 | |
205 | - else { | |
206 | - if (insertFileList != null && insertFileList.size() > 0) { | |
207 | - HashMap<String, Object> fileMng = fileMngService.fileMngInsert(fileMngVO, insertFileList); | |
208 | - result += (int)fileMng.get("fileMngResult"); | |
209 | - entInfoVO.setFileMngId(fileMng.get("fileMngId").toString()); | |
210 | - } | |
211 | - } | |
212 | - | |
213 | - // 기업정보 수정 | |
214 | - result += entInfoDAO.entInfoUpdate(entInfoVO); | |
215 | - | |
216 | - // 주요사업장 수정 | |
217 | - if (entInfoVO.getBplcList().size() > 0) { | |
218 | - for (BplcVO bplcVO : entInfoVO.getBplcList()) { | |
219 | - bplcVO.setRgtr(writer); | |
220 | - } | |
221 | - result += entMainBplcService.bplcListUpdate(entInfoVO.getBplcList()); | |
222 | - } | |
223 | - | |
224 | - return result; | |
225 | - } | |
226 | - | |
227 | - /** | |
228 | - * @author 박정하 | |
229 | - * @since 2024.03.22 | |
230 | - * | |
231 | - * 기업정보 삭제 | |
232 | - */ | |
233 | - @Override | |
234 | - @Transactional(rollbackFor = Exception.class) | |
235 | - public int entInfoDelete(EntInfoVO entInfoVO) throws Exception { | |
236 | - // 수정자 생성 | |
237 | - String writer = jwtUtil.getWriter(); | |
238 | - entInfoVO.setMdfr(writer); | |
239 | - | |
240 | - // 기업정보 삭제 | |
241 | - int result = 0; | |
242 | - entInfoVO.setUseYn("N"); | |
243 | - result += entInfoDAO.entInfoDelete(entInfoVO); | |
244 | - | |
245 | - // 주요사업장 삭제 | |
246 | - result += entMainBplcService.bplcDeleteByEntInfoId(entInfoVO.getEntId()); | |
247 | - | |
248 | - // 투자상담 삭제 | |
249 | - result += ivstDscsnService.ivstDscsnDeleteByEntId(entInfoVO.getEntId()); | |
250 | - | |
251 | - return result; | |
252 | - } | |
253 | - | |
254 | - /** | |
255 | - * @author 박정하 | |
256 | - * @since 2024.06.26 | |
257 | - * | |
258 | - * 기업정보 목록 조회 (엑셀 다운로드 용) | |
259 | - */ | |
260 | - public List<EntInfoExcelDTO> excelDownloadAll(HashMap<String, String> params) throws Exception { | |
261 | - List<HashMap<String, String>> entInfoList = entInfoDAO.entInfoSelectListAll(params); | |
262 | - | |
263 | - List<EntInfoExcelDTO> entInfoExcelList = new ArrayList<>(); | |
264 | - for (HashMap<String, String> entInfo : entInfoList) { | |
265 | - EntInfoExcelDTO entInfoExcelDTO = new EntInfoExcelDTO(); | |
266 | - entInfoExcelDTO.setEntNm(entInfo.get("ent_nm")); | |
267 | - entInfoExcelDTO.setBrno(entInfo.get("brno")); | |
268 | - entInfoExcelDTO.setRprsvNm(entInfo.get("rprsv_nm")); | |
269 | - entInfoExcelDTO.setLctn(entInfo.get("lctn")); | |
270 | - entInfoExcelDTO.setBplcSiar(entInfo.get("bplc_siar")); | |
271 | - entInfoExcelDTO.setFctryArea(entInfo.get("fctry_area")); | |
272 | - entInfoExcelDTO.setKsic(entInfo.get("ksic")); | |
273 | - entInfoExcelDTO.setMainPrdct(entInfo.get("main_prdct")); | |
274 | - entInfoExcelDTO.setEntCrdt(entInfo.get("ent_crdt")); | |
275 | - entInfoExcelDTO.setFndnDt(entInfo.get("fndn_dt")); | |
276 | - entInfoExcelDTO.setWrkrCnt(entInfo.get("wrkr_cnt")); | |
277 | - entInfoExcelDTO.setIsIvstDscsn(entInfo.get("mvn_inten") != null ? "Y" : "N"); | |
278 | - entInfoExcelDTO.setMvnInten(convertInten(entInfo.get("mvn_inten"))); | |
279 | - entInfoExcelDTO.setMouInten(convertInten(entInfo.get("mou_inten"))); | |
280 | - entInfoExcelDTO.setRmrk(entInfo.get("rmrk")); | |
281 | - | |
282 | - entInfoExcelList.add(entInfoExcelDTO); | |
283 | - } | |
284 | - return entInfoExcelList; | |
285 | - } | |
286 | - | |
287 | - /** | |
288 | - * @author 박정하 | |
289 | - * @since 2024.06.26 | |
290 | - * | |
291 | - * 의향 코드 > 한글 | |
292 | - */ | |
293 | - private String convertInten(String inten) { | |
294 | - return inten == null ? null : inten.equals("0") ? "없음" : inten.equals("1") ? "있음" : inten.equals("2") ? "검토중" : null; | |
295 | - } | |
296 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entInfo/vo/BplcVO.java
... | ... | @@ -1,45 +0,0 @@ |
1 | -package com.takensoft.portal.entInfo.vo; | |
2 | - | |
3 | -import lombok.Data; | |
4 | - | |
5 | -/** | |
6 | - * @author : 박정하 | |
7 | - * @since : 2024.06.10 | |
8 | - * | |
9 | - * 기업주요사업장 관련 VO | |
10 | - */ | |
11 | -@Data | |
12 | -public class BplcVO { | |
13 | - // 주요사업장아이디 | |
14 | - private Integer bplcId; | |
15 | - // 기업아이디 | |
16 | - private String entId; | |
17 | - // 근로자수 | |
18 | - private Integer wrkrCnt; | |
19 | - // 사업장위치 | |
20 | - private String bplcAddr; | |
21 | - // 사용여부 | |
22 | - // Y: 사용 | |
23 | - // N: 미사용 | |
24 | - private String useYn = "Y"; | |
25 | - // 등록자 | |
26 | - private String rgtr; | |
27 | - // 등록일 | |
28 | - private String regDt; | |
29 | - // 수정자 | |
30 | - private String mdfr; | |
31 | - // 수정일 | |
32 | - private String mdfcnDt; | |
33 | - // 사업장명 | |
34 | - private String bplcNm; | |
35 | - // 주생산품 | |
36 | - private String mainPrdt; | |
37 | - // 대지면적 | |
38 | - private String bplcSiar; | |
39 | - // 공장면적 | |
40 | - private String fctryArea; | |
41 | - // 대지면적단위 | |
42 | - private String bplcSiarUnit = ""; | |
43 | - // 공장면적단위 | |
44 | - private String fctryAreaUnit = ""; | |
45 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entInfo/vo/EntInfoVO.java
... | ... | @@ -1,80 +0,0 @@ |
1 | -package com.takensoft.portal.entInfo.vo; | |
2 | - | |
3 | -import lombok.Data; | |
4 | - | |
5 | -import java.util.*; | |
6 | - | |
7 | -/** | |
8 | - * @author : 박정하 | |
9 | - * @since : 2024.03.20 | |
10 | - * | |
11 | - * 기업정보 관련 VO | |
12 | - */ | |
13 | -@Data | |
14 | -public class EntInfoVO { | |
15 | - // 기업 아이디 | |
16 | - private String entId; | |
17 | - // 기업명 | |
18 | - private String entNm; | |
19 | - // 사업자번호 | |
20 | - private String brno; | |
21 | - // 대표자명 | |
22 | - private String rprsvNm; | |
23 | - // 소재지 (행정구역) | |
24 | - private String lctnAdmdsp = ""; | |
25 | - // 소재지 (시군구) | |
26 | - private String lctnSsg; | |
27 | - // 대지면적 | |
28 | - private int bplcSiar; | |
29 | - // 대지면적 단위 | |
30 | - private String bplcSiarUnit = ""; | |
31 | - // 공장면적 | |
32 | - private int fctryArea; | |
33 | - // 공장면적 단위 | |
34 | - private String fctryAreaUnit = ""; | |
35 | - // 표준사업분류코드 상위 분류 | |
36 | - private String ksicUpCd; | |
37 | - // 표준사업분류코드 하위 분류 | |
38 | - private String ksicCd; | |
39 | - // 표준사업분류 | |
40 | - private String ksicNm; | |
41 | - // 주요제품 | |
42 | - private String mainPrdct; | |
43 | - // 기업신용 | |
44 | - private String entCrdt; | |
45 | - // 설립일 | |
46 | - private String fndnDt; | |
47 | - // 고용인원수 | |
48 | - private int wrkrCnt; | |
49 | - | |
50 | - // 비고 | |
51 | - private String rmrk; | |
52 | - // 파일매니저아이디 | |
53 | - private String fileMngId; | |
54 | - // 첨부파일 목록 | |
55 | - private List<HashMap<String, Object>> fileList = new ArrayList<>(); | |
56 | - // 첨부파일 삭제 목록 | |
57 | - private List<HashMap<String, Object>> deleteFileList = new ArrayList<>(); | |
58 | - | |
59 | - // 사용여부 | |
60 | - private String useYn; | |
61 | - // 등록자 | |
62 | - private String rgtr; | |
63 | - // 등록일 | |
64 | - private String regDt; | |
65 | - // 수정자 | |
66 | - private String mdfr; | |
67 | - // 수정일 | |
68 | - private String mdfcnDt; | |
69 | - | |
70 | - // 사업자번호변경여부 | |
71 | - private Boolean isBrnoChange = false; | |
72 | - | |
73 | - // 주요사업장 목록 | |
74 | - private List<BplcVO> bplcList = new ArrayList<>(); | |
75 | - | |
76 | - // 입주의향 (목록 조회시 사용) | |
77 | - private String mvnInten; | |
78 | - // MOU의향 (목록 조회시 사용) | |
79 | - private String mouInten; | |
80 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/entInfo/web/EntInfoController.java
... | ... | @@ -1,147 +0,0 @@ |
1 | -package com.takensoft.portal.entInfo.web; | |
2 | - | |
3 | -import com.takensoft.common.excel.service.ExcelService; | |
4 | -import com.takensoft.common.message.MessageCode; | |
5 | -import com.takensoft.common.util.ResponseUtil; | |
6 | -import com.takensoft.portal.entInfo.service.EntInfoService; | |
7 | -import com.takensoft.portal.entInfo.vo.EntInfoVO; | |
8 | -import lombok.RequiredArgsConstructor; | |
9 | -import org.springframework.http.ResponseEntity; | |
10 | -import org.springframework.web.bind.annotation.*; | |
11 | -import org.springframework.web.multipart.MultipartFile; | |
12 | - | |
13 | -import java.util.*; | |
14 | -/** | |
15 | - * @author 박정하 | |
16 | - * @since 2024.03.20 | |
17 | - * @modification | |
18 | - * since | author | description | |
19 | - * 2024.03.20 | 박정하 | 최초 등록 | |
20 | - * | |
21 | - * 기업정보 관련 Controller | |
22 | - */ | |
23 | -@RestController | |
24 | -@RequiredArgsConstructor | |
25 | -@RequestMapping(value = "/government/entInfo") | |
26 | -public class EntInfoController { | |
27 | - private final EntInfoService entInfoService; | |
28 | - private final ExcelService excelService; | |
29 | - private final ResponseUtil resUtil; | |
30 | - | |
31 | - /** | |
32 | - * @author 박정하 | |
33 | - * @since 2024.03.20 | |
34 | - * @param entInfoVO | |
35 | - * @return | |
36 | - * @throws Exception | |
37 | - * | |
38 | - * 기업정보 등록 | |
39 | - */ | |
40 | - @PostMapping(path = "/insertProc.file") | |
41 | - public ResponseEntity<?> insertProc(@RequestPart EntInfoVO entInfoVO, @RequestPart(required = false) List<MultipartFile> insertFileList) throws Exception { | |
42 | - // 응답 처리 | |
43 | - | |
44 | - // 사업자등록번호 중복 검사 | |
45 | - int isExistence = entInfoService.selectCntByCheckBrno(entInfoVO.getBrno()); | |
46 | - if (isExistence > 0) { | |
47 | - return resUtil.errorRes(MessageCode.COMMON_DUPLICATION_DATA); | |
48 | - } | |
49 | - | |
50 | - // 기업정보 등록 | |
51 | - HashMap<String, Object> result = entInfoService.entInfoInsert(entInfoVO, insertFileList); | |
52 | - int insertResult = (int) result.get("result"); | |
53 | - | |
54 | - if(insertResult > 0) { | |
55 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
56 | - } else if(insertResult < 0) { | |
57 | - return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); | |
58 | - } else { | |
59 | - return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); | |
60 | - } | |
61 | - } | |
62 | - | |
63 | - /** | |
64 | - * @author 박정하 | |
65 | - * @since 2024.03.21 | |
66 | - * @param params | |
67 | - * @return | |
68 | - * @throws Exception | |
69 | - * | |
70 | - * 기업정보 목록 조회 | |
71 | - */ | |
72 | - @PostMapping(path = "/listProc.json") | |
73 | - public ResponseEntity<?> listProc(@RequestBody Map<String, String> params) throws Exception { | |
74 | - Map<String, Object> result = entInfoService.entInfoSelectList(params); | |
75 | - | |
76 | - // 응답 처리 | |
77 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
78 | - } | |
79 | - | |
80 | - /** | |
81 | - * @author 박정하 | |
82 | - * @since 2024.03.21 | |
83 | - * @param entInfoVO | |
84 | - * @return | |
85 | - * @throws Exception | |
86 | - * | |
87 | - * 기업정보 상세 조회 | |
88 | - */ | |
89 | - @PostMapping(path = "/detailProc.json") | |
90 | - public ResponseEntity<?> detailProc(@RequestBody EntInfoVO entInfoVO) throws Exception { | |
91 | - HashMap<String, Object> result = entInfoService.entInfoDetail(entInfoVO); | |
92 | - | |
93 | - // 응답 처리 | |
94 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
95 | - } | |
96 | - | |
97 | - /** | |
98 | - * @author 박정하 | |
99 | - * @since 2024.03.22 | |
100 | - * @param entInfoVO, insertFileList | |
101 | - * @return | |
102 | - * @throws Exception | |
103 | - * | |
104 | - * 기업정보 수정 | |
105 | - */ | |
106 | - @PostMapping(path = "/updateProc.file") | |
107 | - public ResponseEntity<?> updateProc(@RequestPart EntInfoVO entInfoVO, @RequestPart(required = false) List<MultipartFile> insertFileList) throws Exception { | |
108 | - // 사업자등록번호 중복 검사 | |
109 | - if (entInfoVO.getIsBrnoChange()) { | |
110 | - int isExistence = entInfoService.selectCntByCheckBrno(entInfoVO.getBrno()); | |
111 | - if (isExistence > 0) { | |
112 | - return resUtil.errorRes(MessageCode.COMMON_DUPLICATION_DATA); | |
113 | - } | |
114 | - } | |
115 | - // 응답 처리 | |
116 | - int result = entInfoService.entInfoUpdate(entInfoVO, insertFileList); | |
117 | - if(result > 0) { | |
118 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
119 | - } else if(result < 0) { | |
120 | - return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); | |
121 | - } else { | |
122 | - return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); | |
123 | - } | |
124 | - } | |
125 | - | |
126 | - /** | |
127 | - * @author 박정하 | |
128 | - * @since 2024.03.22 | |
129 | - * @param entInfoVO | |
130 | - * @return | |
131 | - * @throws Exception | |
132 | - * | |
133 | - * 기업정보 삭제 | |
134 | - */ | |
135 | - @PostMapping(path = "/deleteProc.json") | |
136 | - public ResponseEntity<?> deleteProc(@RequestBody EntInfoVO entInfoVO) throws Exception { | |
137 | - int result = entInfoService.entInfoDelete(entInfoVO); | |
138 | - | |
139 | - // 응답 처리 | |
140 | - if(result > 0) { | |
141 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
142 | - } else { | |
143 | - return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); | |
144 | - } | |
145 | - } | |
146 | - | |
147 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/ivstDscsn/dao/IvstDscsnDAO.java
... | ... | @@ -1,82 +0,0 @@ |
1 | -package com.takensoft.portal.ivstDscsn.dao; | |
2 | - | |
3 | -import com.takensoft.common.Pagination; | |
4 | -import com.takensoft.portal.entInfo.vo.EntInfoVO; | |
5 | -import com.takensoft.portal.ivstDscsn.vo.IvstDscsnVO; | |
6 | -import com.takensoft.portal.rvwMttr.vo.RvwMttrVO; | |
7 | -import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
8 | - | |
9 | -import java.util.*; | |
10 | - | |
11 | -/** | |
12 | - * @author : 박정하 | |
13 | - * @since : 2024.03.26 | |
14 | - * | |
15 | - * 투자상담 관련 Mapper | |
16 | - */ | |
17 | -@Mapper("ivstDscsnDAO") | |
18 | -public interface IvstDscsnDAO { | |
19 | - /** | |
20 | - * @author 박정하 | |
21 | - * @since 2024.03.26 | |
22 | - * | |
23 | - * 투자상담 등록 | |
24 | - */ | |
25 | - public int ivstDscsnInsert(IvstDscsnVO ivstDscsnVO) throws Exception; | |
26 | - | |
27 | - /** | |
28 | - * @author 박정하 | |
29 | - * @since 2024.03.26 | |
30 | - * | |
31 | - * 투자상담 목록 조회 | |
32 | - */ | |
33 | - public List<HashMap<String, Object>> ivstDscsnList(Pagination pagination) throws Exception; | |
34 | - | |
35 | - /** | |
36 | - * @author 박정하 | |
37 | - * @since 2024.03.26 | |
38 | - * | |
39 | - * 투자상담 목록 총 개수 조회 | |
40 | - */ | |
41 | - public int ivstDscsnListCount(Pagination pagination) throws Exception; | |
42 | - | |
43 | - /** | |
44 | - * @author 박정하 | |
45 | - * @since 2024.03.26 | |
46 | - * | |
47 | - * 투자상담 상세 조회 | |
48 | - */ | |
49 | - public IvstDscsnVO selectIvstDscsnDetail(String ivstDscsnId) throws Exception; | |
50 | - | |
51 | - /** | |
52 | - * @author 박정하 | |
53 | - * @since 2024.03.27 | |
54 | - * | |
55 | - * 투자상담 수정 | |
56 | - */ | |
57 | - public int ivstDscsnUpdate(IvstDscsnVO ivstDscsnVO) throws Exception; | |
58 | - | |
59 | - /** | |
60 | - * @author 박정하 | |
61 | - * @since 2024.03.27 | |
62 | - * | |
63 | - * 투자상담 삭제 (기업정보 삭제용) | |
64 | - */ | |
65 | - public int ivstDscsnDeleteByEntId(IvstDscsnVO ivstDscsnVO) throws Exception; | |
66 | - | |
67 | - /** | |
68 | - * @author 박정하 | |
69 | - * @since 2024.03.28 | |
70 | - * | |
71 | - * 투자상담 최근 1건 조회 | |
72 | - */ | |
73 | - public IvstDscsnVO ivstDscsnByNewOne(String entId) throws Exception; | |
74 | - | |
75 | - /** | |
76 | - * @author 박정하 | |
77 | - * @since 2024.06.12 | |
78 | - * | |
79 | - * 투자상담 목록 조회 (기업정보 삭제용) | |
80 | - */ | |
81 | - public List<IvstDscsnVO> ivstDscsnListByIvstDscsnId(String entId) throws Exception; | |
82 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/ivstDscsn/dto/IvstDscsnExcelDTO.java
... | ... | @@ -1,72 +0,0 @@ |
1 | -package com.takensoft.portal.ivstDscsn.dto; | |
2 | - | |
3 | -import com.takensoft.common.excel.annotation.ExcelColumnName; | |
4 | -import com.takensoft.common.excel.annotation.ExcelFileName; | |
5 | -import lombok.Builder; | |
6 | -import lombok.Getter; | |
7 | -import lombok.NoArgsConstructor; | |
8 | -import lombok.Setter; | |
9 | -import javax.persistence.*; | |
10 | - | |
11 | -@Entity | |
12 | -@Getter | |
13 | -@Setter | |
14 | -@NoArgsConstructor | |
15 | -@ExcelFileName(fileName="게시판 접속 통계") | |
16 | -public class IvstDscsnExcelDTO { | |
17 | - @Id | |
18 | - @Column | |
19 | - @GeneratedValue(strategy = GenerationType.IDENTITY) | |
20 | - @ExcelColumnName(headerName = "상담요지") | |
21 | - private String dscsnOtln; | |
22 | - | |
23 | - @Column | |
24 | - @ExcelColumnName(headerName = "제목") | |
25 | - private String ttl; | |
26 | - | |
27 | - @Column | |
28 | - @ExcelColumnName(headerName = "일시") | |
29 | - private String dt; | |
30 | - | |
31 | - @Column | |
32 | - @ExcelColumnName(headerName = "장소") | |
33 | - private String plc; | |
34 | - | |
35 | - @Column | |
36 | - @ExcelColumnName(headerName = "기업명") | |
37 | - private String entNm; | |
38 | - | |
39 | - @Column | |
40 | - @ExcelColumnName(headerName = "참석자") | |
41 | - private String prtpnt; | |
42 | - | |
43 | - @Column | |
44 | - @ExcelColumnName(headerName = "상담공무원") | |
45 | - private String dscsnPbofc; | |
46 | - | |
47 | - @Column | |
48 | - @ExcelColumnName(headerName = "주요내용") | |
49 | - private String mainCn; | |
50 | - | |
51 | - @Column | |
52 | - @ExcelColumnName(headerName = "입주의향") | |
53 | - private String mvnInten; | |
54 | - | |
55 | - @Column | |
56 | - @ExcelColumnName(headerName = "MOU의향") | |
57 | - private String mouInten; | |
58 | - | |
59 | - @Builder | |
60 | - public IvstDscsnExcelDTO(String dscsnOtln, String ttl, String dt, String plc, String entNm, String prtpnt, String dscsnPbofc, String mainCn, String mvnInten, String mouInten) { | |
61 | - this.dscsnOtln = dscsnOtln; | |
62 | - this.ttl = ttl; | |
63 | - this.dt = dt; | |
64 | - this.plc = plc; | |
65 | - this.entNm = entNm; | |
66 | - this.prtpnt = prtpnt; | |
67 | - this.dscsnPbofc = dscsnPbofc; | |
68 | - this.mainCn = mainCn; | |
69 | - this.mvnInten = mvnInten; | |
70 | - this.mouInten = mouInten; | |
71 | - } | |
72 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/ivstDscsn/service/Impl/IvstDscsnServiceImpl.java
... | ... | @@ -1,237 +0,0 @@ |
1 | -package com.takensoft.portal.ivstDscsn.service.Impl; | |
2 | - | |
3 | -import com.takensoft.common.Pagination; | |
4 | -import com.takensoft.common.file.service.FileMngService; | |
5 | -import com.takensoft.common.file.service.FileService; | |
6 | -import com.takensoft.common.file.vo.FileMngVO; | |
7 | -import com.takensoft.common.idgen.service.IdgenService; | |
8 | -import com.takensoft.common.util.JWTUtil; | |
9 | -import com.takensoft.portal.entInfo.vo.EntInfoVO; | |
10 | -import com.takensoft.portal.ivstDscsn.dao.IvstDscsnDAO; | |
11 | -import com.takensoft.portal.ivstDscsn.service.IvstDscsnService; | |
12 | -import com.takensoft.portal.ivstDscsn.vo.IvstDscsnVO; | |
13 | -import com.takensoft.portal.rvwMttr.service.Impl.RvwMttrServiceImpl; | |
14 | -import com.takensoft.portal.rvwMttr.service.RvwMttrService; | |
15 | -import com.takensoft.portal.rvwMttr.vo.RvwMttrPrgrsVO; | |
16 | -import com.takensoft.portal.rvwMttr.vo.RvwMttrVO; | |
17 | -import lombok.RequiredArgsConstructor; | |
18 | -import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
19 | -import org.springframework.stereotype.Service; | |
20 | -import org.springframework.transaction.annotation.Transactional; | |
21 | -import org.springframework.web.multipart.MultipartFile; | |
22 | - | |
23 | -import java.io.IOException; | |
24 | -import java.util.*; | |
25 | - | |
26 | -/** | |
27 | - * @author : 박정하 | |
28 | - * @since : 2024.03.26 | |
29 | - * | |
30 | - * 투자상담 관련 구현체 | |
31 | - * EgovAbstractServiceImpl : 전자정부 상속 | |
32 | - * IvstDscsnService : 투자상담 인터페이스 상속 | |
33 | - */ | |
34 | -@Service("ivstDscsnService") | |
35 | -@RequiredArgsConstructor | |
36 | -public class IvstDscsnServiceImpl extends EgovAbstractServiceImpl implements IvstDscsnService { | |
37 | - private final JWTUtil jwtUtil; | |
38 | - private final IdgenService ivstDscsnIdgn; | |
39 | - private final IvstDscsnDAO ivstDscsnDAO; | |
40 | - private final FileMngService fileMngService; | |
41 | - private final FileService fileService; | |
42 | - private final RvwMttrServiceImpl rvwMttrService; | |
43 | - | |
44 | - /** | |
45 | - * @author 박정하 | |
46 | - * @since 2024.03.26 | |
47 | - * | |
48 | - * 투자상담 등록 | |
49 | - */ | |
50 | - @Override | |
51 | - @Transactional(rollbackFor = Exception.class) | |
52 | - public HashMap<String, Object> ivstDscsnInsert(IvstDscsnVO ivstDscsnVO) throws Exception { | |
53 | - // 아이디 생성 | |
54 | - String ivstDscsnId = ivstDscsnIdgn.getNextStringId(); | |
55 | - ivstDscsnVO.setIvstDscsnId(ivstDscsnId); | |
56 | - | |
57 | - // 작성자 생성 | |
58 | - String writer = jwtUtil.getWriter(); | |
59 | - ivstDscsnVO.setRgtr(writer); | |
60 | - | |
61 | - // 첨부파일 등록 | |
62 | - List<MultipartFile> insertFileList = ivstDscsnVO.getInsertFileList(); | |
63 | - if (insertFileList.size() > 0) { | |
64 | - FileMngVO fileMngVO = new FileMngVO(); | |
65 | - | |
66 | - // 파일매니저 등록 | |
67 | - HashMap<String, Object> fileMng = fileMngService.fileMngInsert(fileMngVO, insertFileList); | |
68 | - | |
69 | - // 파일매니저 아이디 삽입 | |
70 | - ivstDscsnVO.setFileMngId(fileMng.get("fileMngId").toString()); | |
71 | - } | |
72 | - | |
73 | - // 검토사항 등록 | |
74 | - int ivstDscsnResult = ivstDscsnDAO.ivstDscsnInsert(ivstDscsnVO); | |
75 | - | |
76 | - // 결과 반환 | |
77 | - HashMap<String, Object> result = new HashMap<>(); | |
78 | - result.put("ivstDscsnId", ivstDscsnId); | |
79 | - result.put("result", ivstDscsnResult); | |
80 | - return result; | |
81 | - } | |
82 | - | |
83 | - /** | |
84 | - * @author 박정하 | |
85 | - * @since 2024.03.26 | |
86 | - * | |
87 | - * 투자상담 목록 조회 | |
88 | - */ | |
89 | - @Override | |
90 | - public Map<String, Object> ivstDscsnList(Map<String, String> params) throws Exception { | |
91 | - Pagination search = new Pagination(0, params); | |
92 | - int cnt = ivstDscsnDAO.ivstDscsnListCount(search); | |
93 | - Pagination pagination = new Pagination(cnt, params); | |
94 | - List<HashMap<String, Object>> list = ivstDscsnDAO.ivstDscsnList(pagination); | |
95 | - | |
96 | - // 결과 반환 | |
97 | - Map<String, Object> result = new HashMap<>(); | |
98 | - result.put("list", list); | |
99 | - result.put("pagination", pagination); | |
100 | - return result; | |
101 | - } | |
102 | - | |
103 | - /** | |
104 | - * @author 박정하 | |
105 | - * @since 2024.03.26 | |
106 | - * | |
107 | - * 투자상담 상세 조회 | |
108 | - */ | |
109 | - @Override | |
110 | - public IvstDscsnVO ivstDscsnDetail(IvstDscsnVO ivstDscsnVO) throws Exception { | |
111 | - IvstDscsnVO newIvstDscsnVO = new IvstDscsnVO(); | |
112 | - | |
113 | - // IvstDscsnId가 있는 경우 | |
114 | - if (ivstDscsnVO.getIvstDscsnId() != null) { | |
115 | - newIvstDscsnVO = ivstDscsnDAO.selectIvstDscsnDetail(ivstDscsnVO.getIvstDscsnId()); | |
116 | - // FileMngId가 있는 경우 | |
117 | - if (newIvstDscsnVO.getFileMngId() != null) { | |
118 | - List<HashMap<String, Object>> fileList = fileService.fileSelectList(newIvstDscsnVO.getFileMngId()); | |
119 | - newIvstDscsnVO.setFileList(fileList); | |
120 | - } | |
121 | - } | |
122 | - // IvstDscsnId가 없는 경우 | |
123 | - else { | |
124 | - newIvstDscsnVO.setUseYn("Y"); // 사용유무 | |
125 | - } | |
126 | - | |
127 | - return newIvstDscsnVO; | |
128 | - } | |
129 | - | |
130 | - /** | |
131 | - * @author 박정하 | |
132 | - * @since 2024.03.27 | |
133 | - * | |
134 | - * 투자상담 수정 | |
135 | - */ | |
136 | - @Override | |
137 | - @Transactional(rollbackFor = Exception.class) | |
138 | - public int ivstDscsnUpdate(IvstDscsnVO ivstDscsnVO) throws Exception { | |
139 | - // 수정자 생성 | |
140 | - String writer = jwtUtil.getWriter(); | |
141 | - ivstDscsnVO.setMdfr(writer); | |
142 | - | |
143 | - int result = 0; | |
144 | - | |
145 | - // 첨부파일 정보 | |
146 | - String fileMngId = ivstDscsnVO.getFileMngId(); | |
147 | - FileMngVO fileMngVO = new FileMngVO(); | |
148 | - List<MultipartFile> insertFileList = ivstDscsnVO.getInsertFileList(); | |
149 | - List<HashMap<String, Object>> deleteFileList = ivstDscsnVO.getDeleteFileList(); | |
150 | - | |
151 | - // FileMngId가 있는 경우 | |
152 | - if (fileMngId != null) { | |
153 | - fileMngVO.setFileMngId(ivstDscsnVO.getFileMngId()); | |
154 | - for (HashMap<String, Object> file : deleteFileList) { | |
155 | - file.put("fileId", Integer.parseInt(file.get("fileId").toString())); | |
156 | - } | |
157 | - result += fileMngService.fileMngUpadate(fileMngVO, deleteFileList, insertFileList); | |
158 | - } | |
159 | - // FileMngId가 없는 경우 | |
160 | - else { | |
161 | - if (insertFileList.size() > 0) { | |
162 | - HashMap<String, Object> fileMng = fileMngService.fileMngInsert(fileMngVO, insertFileList); | |
163 | - result += (int)fileMng.get("fileMngResult"); | |
164 | - ivstDscsnVO.setFileMngId(fileMng.get("fileMngId").toString()); | |
165 | - } | |
166 | - } | |
167 | - | |
168 | - // 투자상담 수정 | |
169 | - result += ivstDscsnDAO.ivstDscsnUpdate(ivstDscsnVO); | |
170 | - | |
171 | - return result; | |
172 | - } | |
173 | - | |
174 | - /** | |
175 | - * @author 박정하 | |
176 | - * @since 2024.03.27 | |
177 | - * | |
178 | - * 투자상담 삭제 | |
179 | - */ | |
180 | - @Override | |
181 | - @Transactional(rollbackFor = Exception.class) | |
182 | - public int ivstDscsnDelete(IvstDscsnVO ivstDscsnVO) throws Exception { | |
183 | - // 수정자 생성 | |
184 | - String writer = jwtUtil.getWriter(); | |
185 | - ivstDscsnVO.setMdfr(writer); | |
186 | - | |
187 | - int result = 0; | |
188 | - ivstDscsnVO.setUseYn("N"); | |
189 | - result += ivstDscsnDAO.ivstDscsnUpdate(ivstDscsnVO); | |
190 | - | |
191 | - // 검토사항 삭제 | |
192 | - result += rvwMttrService.rvwMttrDeleteByIvstDscsnId(ivstDscsnVO.getIvstDscsnId()); | |
193 | - | |
194 | - return result; | |
195 | - } | |
196 | - | |
197 | - /** | |
198 | - * @author 박정하 | |
199 | - * @since 2024.03.28 | |
200 | - * | |
201 | - * 투자상담 최근 1건 조회 | |
202 | - */ | |
203 | - @Override | |
204 | - public IvstDscsnVO ivstDscsnByNewOne(String entId) throws Exception { | |
205 | - return ivstDscsnDAO.ivstDscsnByNewOne(entId); | |
206 | - } | |
207 | - | |
208 | - /** | |
209 | - * @author 박정하 | |
210 | - * @since 2024.06.10 | |
211 | - * | |
212 | - * 투자상담 삭제 (기업정보 삭제용) | |
213 | - */ | |
214 | - @Override | |
215 | - public int ivstDscsnDeleteByEntId(String entId) throws Exception { | |
216 | - int result = 0; | |
217 | - | |
218 | - List<IvstDscsnVO> ivstDscsnList = ivstDscsnDAO.ivstDscsnListByIvstDscsnId(entId); | |
219 | - if (ivstDscsnList.size() > 0) { | |
220 | - for (IvstDscsnVO ivstDscsnVO : ivstDscsnList) { | |
221 | - result += ivstDscsnDelete(ivstDscsnVO); | |
222 | - } | |
223 | - } | |
224 | - | |
225 | - return result; | |
226 | - } | |
227 | - | |
228 | - /** | |
229 | - * @author 박정하 | |
230 | - * @since 2024.06.12 | |
231 | - * | |
232 | - * 투자상담 목록 조회 (기업정보 삭제용) | |
233 | - */ | |
234 | - public List<IvstDscsnVO> ivstDscsnListByIvstDscsnId(String entId) throws Exception { | |
235 | - return ivstDscsnDAO.ivstDscsnListByIvstDscsnId(entId); | |
236 | - } | |
237 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/ivstDscsn/service/IvstDscsnService.java
... | ... | @@ -1,79 +0,0 @@ |
1 | -package com.takensoft.portal.ivstDscsn.service; | |
2 | - | |
3 | -import com.takensoft.portal.ivstDscsn.vo.IvstDscsnVO; | |
4 | -import com.takensoft.portal.rvwMttr.vo.RvwMttrVO; | |
5 | -import org.springframework.web.multipart.MultipartFile; | |
6 | - | |
7 | -import java.util.*; | |
8 | - | |
9 | -/** | |
10 | - * @author : 박정하 | |
11 | - * @since : 2024.03.26 | |
12 | - * | |
13 | - * 투자상담 관련 인터페이스 | |
14 | - */ | |
15 | -public interface IvstDscsnService { | |
16 | - /** | |
17 | - * @author 박정하 | |
18 | - * @since 2024.03.26 | |
19 | - * | |
20 | - * 투자상담 등록 | |
21 | - */ | |
22 | - public HashMap<String, Object> ivstDscsnInsert(IvstDscsnVO ivstDscsnVO) throws Exception; | |
23 | - | |
24 | - /** | |
25 | - * @author 박정하 | |
26 | - * @since 2024.03.26 | |
27 | - * | |
28 | - * 투자상담 목록 조회 | |
29 | - */ | |
30 | - public Map<String, Object> ivstDscsnList(Map<String, String> params) throws Exception; | |
31 | - | |
32 | - /** | |
33 | - * @author 박정하 | |
34 | - * @since 2024.03.26 | |
35 | - * | |
36 | - * 투자상담 상세 조회 | |
37 | - */ | |
38 | - public IvstDscsnVO ivstDscsnDetail(IvstDscsnVO ivstDscsnVO) throws Exception; | |
39 | - | |
40 | - /** | |
41 | - * @author 박정하 | |
42 | - * @since 2024.03.27 | |
43 | - * | |
44 | - * 투자상담 수정 | |
45 | - */ | |
46 | - public int ivstDscsnUpdate(IvstDscsnVO ivstDscsnVO) throws Exception; | |
47 | - | |
48 | - /** | |
49 | - * @author 박정하 | |
50 | - * @since 2024.03.27 | |
51 | - * | |
52 | - * 투자상담 삭제 | |
53 | - */ | |
54 | - public int ivstDscsnDelete(IvstDscsnVO ivstDscsnVO) throws Exception; | |
55 | - | |
56 | - /** | |
57 | - * @author 박정하 | |
58 | - * @since 2024.03.28 | |
59 | - * | |
60 | - * 투자상담 최근 1건 조회 | |
61 | - */ | |
62 | - public IvstDscsnVO ivstDscsnByNewOne(String entId) throws Exception; | |
63 | - | |
64 | - /** | |
65 | - * @author 박정하 | |
66 | - * @since 2024.06.10 | |
67 | - * | |
68 | - * 투자상담 삭제 (기업정보 삭제용) | |
69 | - */ | |
70 | - public int ivstDscsnDeleteByEntId(String entId) throws Exception; | |
71 | - | |
72 | - /** | |
73 | - * @author 박정하 | |
74 | - * @since 2024.06.12 | |
75 | - * | |
76 | - * 투자상담 목록 조회 (기업정보 삭제용) | |
77 | - */ | |
78 | - public List<IvstDscsnVO> ivstDscsnListByIvstDscsnId(String entId) throws Exception; | |
79 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/ivstDscsn/vo/IvstDscsnVO.java
... | ... | @@ -1,61 +0,0 @@ |
1 | -package com.takensoft.portal.ivstDscsn.vo; | |
2 | - | |
3 | -import com.takensoft.common.file.vo.FileVO; | |
4 | -import lombok.Data; | |
5 | -import org.springframework.web.multipart.MultipartFile; | |
6 | - | |
7 | -import java.util.*; | |
8 | - | |
9 | -/** | |
10 | - * @author : 박정하 | |
11 | - * @since : 2024.03.26 | |
12 | - * | |
13 | - * 투자상담 관련 VO | |
14 | - */ | |
15 | -@Data | |
16 | -public class IvstDscsnVO { | |
17 | - // 투자상담 아이디 | |
18 | - private String ivstDscsnId; | |
19 | - // 기업 아이디 | |
20 | - private String entId; | |
21 | - // 제목 | |
22 | - private String ttl; | |
23 | - // 일시 | |
24 | - private String dt; | |
25 | - // 장소 | |
26 | - private String plc; | |
27 | - // 참석자 | |
28 | - private String prtpnt; | |
29 | - // 상담공무원 | |
30 | - private String dscsnPbofc; | |
31 | - // 주요내용 | |
32 | - private String mainCn; | |
33 | - // 파일관리아이디 | |
34 | - private String fileMngId; | |
35 | - // 입주의향 | |
36 | - private String mvnInten = "0"; | |
37 | - // MOU의향 | |
38 | - private String mouInten = "0"; | |
39 | - // 사용여부 | |
40 | - private String useYn; | |
41 | - // 등록자 | |
42 | - private String rgtr; | |
43 | - // 등록일 | |
44 | - private String regDt; | |
45 | - // 수정자 | |
46 | - private String mdfr; | |
47 | - // 수정일 | |
48 | - private String mdfcnDt; | |
49 | - // 상담요지 | |
50 | - private String dscsnOtln = ""; | |
51 | - | |
52 | - // 첨부파일 목록 | |
53 | - List<HashMap<String, Object>> fileList = new ArrayList<>(); | |
54 | - // 첨부파일 등록 목록 | |
55 | - List<MultipartFile> insertFileList = new ArrayList<>(); | |
56 | - // 첨부파일 삭제 목록 | |
57 | - List<HashMap<String, Object>> deleteFileList = new ArrayList<>(); | |
58 | - | |
59 | - // 기업명 | |
60 | - private String entNm; | |
61 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/ivstDscsn/web/IvstDscsnController.java
... | ... | @@ -1,142 +0,0 @@ |
1 | -package com.takensoft.portal.ivstDscsn.web; | |
2 | - | |
3 | -import com.takensoft.common.excel.service.ExcelService; | |
4 | -import com.takensoft.common.message.MessageCode; | |
5 | -import com.takensoft.common.util.ResponseData; | |
6 | -import com.takensoft.common.util.ResponseUtil; | |
7 | -import com.takensoft.portal.ivstDscsn.service.IvstDscsnService; | |
8 | -import com.takensoft.portal.ivstDscsn.vo.IvstDscsnVO; | |
9 | -import lombok.RequiredArgsConstructor; | |
10 | -import org.springframework.http.HttpHeaders; | |
11 | -import org.springframework.http.MediaType; | |
12 | -import org.springframework.http.ResponseEntity; | |
13 | -import org.springframework.web.bind.annotation.*; | |
14 | - | |
15 | -import java.nio.charset.Charset; | |
16 | -import java.util.*; | |
17 | -/** | |
18 | - * @author 박정하 | |
19 | - * @since 2024.03.26 | |
20 | - * @modification | |
21 | - * since | author | description | |
22 | - * 2024.03.26 | 박정하 | 최초 등록 | |
23 | - * | |
24 | - * 투자상담 관련 Controller | |
25 | - */ | |
26 | -@RestController | |
27 | -@RequiredArgsConstructor | |
28 | -@RequestMapping(value = "/government/ivstDscsn") | |
29 | -public class IvstDscsnController { | |
30 | - private final IvstDscsnService ivstDscsnService; | |
31 | - private final ExcelService excelService; | |
32 | - private final ResponseUtil resUtil; | |
33 | - | |
34 | - /** | |
35 | - * @author 박정하 | |
36 | - * @since 2024.03.26 | |
37 | - * @param ivstDscsnVO | |
38 | - * @return | |
39 | - * @throws Exception | |
40 | - * | |
41 | - * 투자상담 등록 | |
42 | - */ | |
43 | - @PostMapping(path = "/insertProc.file") | |
44 | - public ResponseEntity<?> insertProc(IvstDscsnVO ivstDscsnVO) throws Exception { | |
45 | - HashMap<String, Object> result = ivstDscsnService.ivstDscsnInsert(ivstDscsnVO); | |
46 | - int insertResult = (int)result.get("result"); | |
47 | - | |
48 | - // 응답 처리 | |
49 | - HttpHeaders headers = new HttpHeaders(); | |
50 | - headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); | |
51 | - ResponseData responseData = new ResponseData(); | |
52 | - if (insertResult > 0) { | |
53 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
54 | - } else if(insertResult < 0) { | |
55 | - return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); | |
56 | - } else { | |
57 | - return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); | |
58 | - } | |
59 | - } | |
60 | - | |
61 | - /** | |
62 | - * @author 박정하 | |
63 | - * @since 2024.03.26 | |
64 | - * @param params | |
65 | - * @return | |
66 | - * @throws Exception | |
67 | - * | |
68 | - * 투자상담 목록 조회 | |
69 | - */ | |
70 | - @PostMapping(path = "/listProc.json") | |
71 | - public ResponseEntity<?> listProc(@RequestBody Map<String, String> params) throws Exception { | |
72 | - Map<String, Object> result = ivstDscsnService.ivstDscsnList(params); | |
73 | - | |
74 | - // 응답 처리 | |
75 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
76 | - } | |
77 | - | |
78 | - /** | |
79 | - * @author 박정하 | |
80 | - * @since 2024.03.26 | |
81 | - * @param ivstDscsnVO | |
82 | - * @return | |
83 | - * @throws Exception | |
84 | - * | |
85 | - * 투자상담 상세 조회 | |
86 | - */ | |
87 | - @PostMapping(path = "/detailProc.json") | |
88 | - public ResponseEntity<?> detailProc(@RequestBody IvstDscsnVO ivstDscsnVO) throws Exception { | |
89 | - IvstDscsnVO result = ivstDscsnService.ivstDscsnDetail(ivstDscsnVO); | |
90 | - | |
91 | - // 응답 처리 | |
92 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
93 | - } | |
94 | - | |
95 | - /** | |
96 | - * @author 박정하 | |
97 | - * @since 2024.03.27 | |
98 | - * @param ivstDscsnVO | |
99 | - * @return | |
100 | - * @throws Exception | |
101 | - * | |
102 | - * 투자상담 수정 | |
103 | - */ | |
104 | - @PostMapping(path = "/updateProc.file") | |
105 | - public ResponseEntity<?> updateProc(IvstDscsnVO ivstDscsnVO) throws Exception { | |
106 | - int result = ivstDscsnService.ivstDscsnUpdate(ivstDscsnVO); | |
107 | - | |
108 | - // 응답 처리 | |
109 | - HttpHeaders headers = new HttpHeaders(); | |
110 | - headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); | |
111 | - ResponseData responseData = new ResponseData(); | |
112 | - if (result > 0) { | |
113 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
114 | - } else if(result < 0) { | |
115 | - return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); | |
116 | - } else { | |
117 | - return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); | |
118 | - } | |
119 | - } | |
120 | - | |
121 | - /** | |
122 | - * @author 박정하 | |
123 | - * @since 2024.03.27 | |
124 | - * @param ivstDscsnVO | |
125 | - * @return | |
126 | - * @throws Exception | |
127 | - * | |
128 | - * 투자상담 삭제 | |
129 | - */ | |
130 | - @PostMapping(path = "/deleteProc.json") | |
131 | - public ResponseEntity<?> deleteProc(@RequestBody IvstDscsnVO ivstDscsnVO) throws Exception { | |
132 | - int result = ivstDscsnService.ivstDscsnDelete(ivstDscsnVO); | |
133 | - | |
134 | - // 응답처리 | |
135 | - if (result > 0) { | |
136 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
137 | - } else { | |
138 | - return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); | |
139 | - } | |
140 | - } | |
141 | - | |
142 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/main/dao/GovernmentMainDAO.java
... | ... | @@ -1,39 +0,0 @@ |
1 | -package com.takensoft.portal.main.dao; | |
2 | - | |
3 | -import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
4 | - | |
5 | -import java.util.HashMap; | |
6 | -import java.util.List; | |
7 | - | |
8 | -/** | |
9 | - * @author : 박정하 | |
10 | - * @since : 2024.05.29 | |
11 | - * | |
12 | - * 메인 관련 Mapper | |
13 | - */ | |
14 | -@Mapper("governmentMainDAO") | |
15 | -public interface GovernmentMainDAO { | |
16 | - /** | |
17 | - * @author : 박정하 | |
18 | - * @since : 2024.06.03 | |
19 | - * | |
20 | - * 공무원 메인페이지 통계정보 조회 : 분류별 통계 | |
21 | - */ | |
22 | - public List<HashMap<String, Object>> selectCategoryStats(HashMap<String, String> params) throws Exception; | |
23 | - | |
24 | - /** | |
25 | - * @author : 박정하 | |
26 | - * @since : 2024.06.03 | |
27 | - * | |
28 | - * 공무원 메인페이지 통계정보 조회 : 상담신청 통계 | |
29 | - */ | |
30 | - public List<HashMap<String, Object>> selectEntDscsnAplyStats(HashMap<String, String> params) throws Exception; | |
31 | - | |
32 | - /** | |
33 | - * @author : 박정하 | |
34 | - * @since : 2024.06.03 | |
35 | - * | |
36 | - * 공무원 메인페이지 통계정보 조회 : 검토사항 통계 | |
37 | - */ | |
38 | - public List<HashMap<String, Object>> selectRvwMttrStats(HashMap<String, String> params) throws Exception; | |
39 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/main/service/GovernmentMainService.java
... | ... | @@ -1,20 +0,0 @@ |
1 | -package com.takensoft.portal.main.service; | |
2 | - | |
3 | -import java.util.HashMap; | |
4 | -import java.util.Map; | |
5 | - | |
6 | -/** | |
7 | - * @author : 박정하 | |
8 | - * @since : 2024.05.29 | |
9 | - * | |
10 | - * 메인 관련 인터페이스 | |
11 | - */ | |
12 | -public interface GovernmentMainService { | |
13 | - /** | |
14 | - * @author 박정하 | |
15 | - * @since 2024.05.29 | |
16 | - * | |
17 | - * 공무원 메인페이지 통계정보 조회 [ 분류별 통계, 상담신청 통계, 검토사항 통계, 공지사항 최신글, 기업정보 최신글 ] | |
18 | - */ | |
19 | - public Map<String, Object> selectGovernmentMain(HashMap<String, String> params) throws Exception; | |
20 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/main/service/impl/GovernmentMainServiceImpl.java
... | ... | @@ -1,65 +0,0 @@ |
1 | -package com.takensoft.portal.main.service.impl; | |
2 | - | |
3 | -import com.takensoft.cms.codeManage.service.CodeManageService; | |
4 | -import com.takensoft.cms.codeManage.vo.CodeManageVO; | |
5 | -import com.takensoft.portal.entInfo.dao.EntInfoDAO; | |
6 | -import com.takensoft.portal.main.dao.GovernmentMainDAO; | |
7 | -import com.takensoft.portal.main.service.GovernmentMainService; | |
8 | -import lombok.RequiredArgsConstructor; | |
9 | -import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
10 | -import org.springframework.stereotype.Service; | |
11 | - | |
12 | -import java.util.*; | |
13 | - | |
14 | -/** | |
15 | - * @author : 박정하 | |
16 | - * @since : 2024.05.29 | |
17 | - * | |
18 | - * 메인 관련 인터페이스 | |
19 | - * EgovAbstractServiceImpl : 전자정부 상속 | |
20 | - * GovernmentMainService : 메인 관련 인터페이스 상속 | |
21 | - */ | |
22 | -@Service("governmentMainService") | |
23 | -@RequiredArgsConstructor | |
24 | -public class GovernmentMainServiceImpl extends EgovAbstractServiceImpl implements GovernmentMainService { | |
25 | - private final GovernmentMainDAO governmentMainDAO; | |
26 | - private final EntInfoDAO entInfoDAO; | |
27 | - private final CodeManageService codeManageService; | |
28 | - | |
29 | - /** | |
30 | - * @author 박정하 | |
31 | - * @since 2024.05.29 | |
32 | - * | |
33 | - * 공무원 메인페이지 통계정보 조회 [ 분류별 통계, 상담신청 통계, 검토사항 통계, 공지사항 최신글, 기업정보 최신글 ] | |
34 | - */ | |
35 | - @Override | |
36 | - public Map<String, Object> selectGovernmentMain(HashMap<String, String> params) throws Exception { | |
37 | - Map<String, Object> result = new HashMap<>(); | |
38 | - | |
39 | - // 검색조건 | |
40 | - result.put("codeList", codeManageService.findByChildCdCache("governmentMainTab")); | |
41 | - | |
42 | - String tab = params.get("activeTab"); | |
43 | - if (tab != null) { | |
44 | - // 분류별 통계 | |
45 | - if (tab.equals("categoryTab")) { | |
46 | - result.put("governmentStats", governmentMainDAO.selectCategoryStats(params)); | |
47 | - } | |
48 | - | |
49 | - // 상담신청 통계 | |
50 | - else if (tab.equals("entDscsnAplyTab")) { | |
51 | - result.put("governmentStats", governmentMainDAO.selectEntDscsnAplyStats(params)); | |
52 | - } | |
53 | - | |
54 | - // 검토사항 통계 | |
55 | - else if (tab.equals("rvwMttrTab")) { | |
56 | - result.put("governmentStats", governmentMainDAO.selectRvwMttrStats(params)); | |
57 | - } | |
58 | - } | |
59 | - | |
60 | - // 기업정보 최신글 | |
61 | - result.put("companyInfo", entInfoDAO.selectCompanyInfoListByNew()); | |
62 | - | |
63 | - return result; | |
64 | - } | |
65 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/main/web/GovernmentMainController.java
... | ... | @@ -1,51 +0,0 @@ |
1 | -package com.takensoft.portal.main.web; | |
2 | - | |
3 | -import com.takensoft.common.message.MessageCode; | |
4 | -import com.takensoft.common.util.ResponseData; | |
5 | -import com.takensoft.common.util.ResponseUtil; | |
6 | -import com.takensoft.portal.main.service.GovernmentMainService; | |
7 | -import lombok.RequiredArgsConstructor; | |
8 | -import org.springframework.http.HttpHeaders; | |
9 | -import org.springframework.http.HttpStatus; | |
10 | -import org.springframework.http.MediaType; | |
11 | -import org.springframework.http.ResponseEntity; | |
12 | -import org.springframework.web.bind.annotation.PostMapping; | |
13 | -import org.springframework.web.bind.annotation.RequestBody; | |
14 | -import org.springframework.web.bind.annotation.RequestMapping; | |
15 | -import org.springframework.web.bind.annotation.RestController; | |
16 | - | |
17 | -import java.nio.charset.Charset; | |
18 | -import java.util.*; | |
19 | -/** | |
20 | - * @author 박정하 | |
21 | - * @since 2024.05.29 | |
22 | - * @modification | |
23 | - * since | author | description | |
24 | - * 2024.05.29 | 박정하 | 최초 등록 | |
25 | - * | |
26 | - * 메인 관련 Controller | |
27 | - */ | |
28 | -@RestController | |
29 | -@RequiredArgsConstructor | |
30 | -@RequestMapping(value = "/government/main") | |
31 | -public class GovernmentMainController { | |
32 | - private final GovernmentMainService governmentMainService; | |
33 | - private final ResponseUtil resUtil; | |
34 | - /** | |
35 | - * @author 박정하 | |
36 | - * @since 2024.05.29 | |
37 | - * @param | |
38 | - * @return | |
39 | - * @throws Exception | |
40 | - * | |
41 | - * 공무원 메인페이지 통계정보 조회 [ 분류별 통계, 상담신청 통계, 검토사항 통계, 공지사항 최신글, 기업정보 최신글 ] | |
42 | - */ | |
43 | - @PostMapping("/governmentMainProc.json") | |
44 | - public ResponseEntity<?> governmentMainProc(@RequestBody HashMap<String, String> params) throws Exception { | |
45 | - // 관리자 메인페이지 통계정보 조회 | |
46 | - Map<String, Object> result = governmentMainService.selectGovernmentMain(params); | |
47 | - | |
48 | - // 응답 처리 | |
49 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
50 | - } | |
51 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/rvwMttr/dao/RvwMttrDAO.java
... | ... | @@ -1,80 +0,0 @@ |
1 | -package com.takensoft.portal.rvwMttr.dao; | |
2 | - | |
3 | -import com.takensoft.common.Pagination; | |
4 | -import com.takensoft.portal.rvwMttr.vo.RvwMttrVO; | |
5 | -import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
6 | - | |
7 | -import java.util.*; | |
8 | - | |
9 | -/** | |
10 | - * @author : 박정하 | |
11 | - * @since : 2024.03.29 | |
12 | - * | |
13 | - * 검토사항 관련 Mapper | |
14 | - */ | |
15 | -@Mapper("rvwMttrDAO") | |
16 | -public interface RvwMttrDAO { | |
17 | - /** | |
18 | - * @author 박정하 | |
19 | - * @since 2024.03.29 | |
20 | - * | |
21 | - * 검토사항 등록 | |
22 | - */ | |
23 | - public int rvwMttrInsert(RvwMttrVO rvwMttrVO) throws Exception; | |
24 | - | |
25 | - /** | |
26 | - * @author 박정하 | |
27 | - * @since 2024.03.29 | |
28 | - * | |
29 | - * 검토사항 목록 조회 | |
30 | - */ | |
31 | - public List<HashMap<String, Object>> rvwMttrSelectList(Pagination pagination) throws Exception; | |
32 | - | |
33 | - /** | |
34 | - * @author 박정하 | |
35 | - * @since 2024.03.29 | |
36 | - * | |
37 | - * 검토사항 목록 총 개수 조회 | |
38 | - */ | |
39 | - public int rvwMttrSelectListCount(Pagination pagination) throws Exception; | |
40 | - | |
41 | - /** | |
42 | - * @author 박정하 | |
43 | - * @since 2024.06.04 | |
44 | - * | |
45 | - * 검토사항 상세 조회 | |
46 | - */ | |
47 | - public RvwMttrVO selectRvwMttrDetail(String rvwMttrId) throws Exception; | |
48 | - | |
49 | - /** | |
50 | - * @author 박정하 | |
51 | - * @since 2024.04.01 | |
52 | - * | |
53 | - * 검토사항 수정 | |
54 | - */ | |
55 | - public int rvwMttrUpdate(RvwMttrVO rvwMttrVO) throws Exception; | |
56 | - | |
57 | - /** | |
58 | - * @author 박정하 | |
59 | - * @since 2024.04.01 | |
60 | - * | |
61 | - * 검토사항 삭제 | |
62 | - */ | |
63 | - public int rvwMttrDelete(RvwMttrVO rvwMttrVO) throws Exception; | |
64 | - | |
65 | - /** | |
66 | - * @author 박정하 | |
67 | - * @since 2024.06.04 | |
68 | - * | |
69 | - * 검토사항진행 삭제 (검토사항 삭제용) | |
70 | - */ | |
71 | - public List<RvwMttrVO> rvwMttrListByIvstDscsnId(String rvwMttrId) throws Exception; | |
72 | - | |
73 | - /** | |
74 | - * @author 박정하 | |
75 | - * @since 2024.06.12 | |
76 | - * | |
77 | - * 검토사항 삭제 (검토사항 삭제용) | |
78 | - */ | |
79 | - public int rvwMttrDeleteByIvstDscsnId(String ivstDscsnId) throws Exception; | |
80 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/rvwMttr/dao/RvwMttrPrgrsDAO.java
... | ... | @@ -1,45 +0,0 @@ |
1 | -package com.takensoft.portal.rvwMttr.dao; | |
2 | - | |
3 | -import com.takensoft.portal.rvwMttr.vo.RvwMttrPrgrsVO; | |
4 | -import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
5 | - | |
6 | -/** | |
7 | - * @author : 박정하 | |
8 | - * @since : 2024.03.29 | |
9 | - * | |
10 | - * 검토사항진행 관련 Mapper | |
11 | - */ | |
12 | -@Mapper("rvwMttrPrgrsDAO") | |
13 | -public interface RvwMttrPrgrsDAO { | |
14 | - /** | |
15 | - * @author 박정하 | |
16 | - * @since 2024.04.25 | |
17 | - * | |
18 | - * 검토사항진행 등록 | |
19 | - */ | |
20 | - public int prgrsInsert(RvwMttrPrgrsVO rvwMttrPrgrsVO) throws Exception; | |
21 | - | |
22 | - /** | |
23 | - * @author 박정하 | |
24 | - * @since 2024.04.25 | |
25 | - * | |
26 | - * 검토사항진행 수정 | |
27 | - */ | |
28 | - public int prgrsUpdate(RvwMttrPrgrsVO rvwMttrPrgrsVO) throws Exception; | |
29 | - | |
30 | - /** | |
31 | - * @author 박정하 | |
32 | - * @since 2024.04.01 | |
33 | - * | |
34 | - * 검토사항진행 삭제 | |
35 | - */ | |
36 | - public int prgrsDelete(int rvwMttrPrgrsId) throws Exception; | |
37 | - | |
38 | - /** | |
39 | - * @author 박정하 | |
40 | - * @since 2024.06.04 | |
41 | - * | |
42 | - * 검토사항진행 삭제 (검토사항 삭제용) | |
43 | - */ | |
44 | - public int prgrsDeleteForRvwMttr(String rvwMttrId) throws Exception; | |
45 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/rvwMttr/dto/RvwMttrExcelDTO.java
... | ... | @@ -1,61 +0,0 @@ |
1 | -package com.takensoft.portal.rvwMttr.dto; | |
2 | - | |
3 | -import com.takensoft.cms.codeManage.vo.CodeManageVO; | |
4 | -import com.takensoft.common.excel.annotation.ExcelColumnName; | |
5 | -import com.takensoft.common.excel.annotation.ExcelFileName; | |
6 | -import lombok.Builder; | |
7 | -import lombok.Getter; | |
8 | -import lombok.NoArgsConstructor; | |
9 | -import lombok.Setter; | |
10 | - | |
11 | -import javax.persistence.*; | |
12 | -import java.util.*; | |
13 | - | |
14 | -/** | |
15 | - * @author : 박정하 | |
16 | - * @since : 2024.06.18 | |
17 | - * | |
18 | - * 검토사항 엑셀 다운로드 관련 DTO | |
19 | - */ | |
20 | -@Entity | |
21 | -@Getter | |
22 | -@Setter | |
23 | -@NoArgsConstructor | |
24 | -@ExcelFileName(fileName="검토사항") | |
25 | -public class RvwMttrExcelDTO { | |
26 | - @Id | |
27 | - @Column | |
28 | - @GeneratedValue(strategy = GenerationType.IDENTITY) | |
29 | - @ExcelColumnName(headerName = "기업명") | |
30 | - private String entNm; | |
31 | - | |
32 | - @Column | |
33 | - @ExcelColumnName(headerName = "투자상담명") | |
34 | - private String ttl; | |
35 | - | |
36 | - @Column | |
37 | - @ExcelColumnName(headerName = "유형") | |
38 | - private String type; | |
39 | - | |
40 | - @Column | |
41 | - @ExcelColumnName(headerName = "접수자") | |
42 | - private String clrNm; | |
43 | - | |
44 | - @Column | |
45 | - @ExcelColumnName(headerName = "접수일") | |
46 | - private String rcptDt; | |
47 | - | |
48 | - @Column | |
49 | - @ExcelColumnName(headerName = "접수내용") | |
50 | - private String rcptCn; | |
51 | - | |
52 | - @Builder | |
53 | - public RvwMttrExcelDTO(String entNm, String ttl, String type, String clrNm, String rcptDt, String rcptCn) { | |
54 | - this.entNm = entNm; | |
55 | - this.ttl = ttl; | |
56 | - this.type = type; | |
57 | - this.clrNm = clrNm; | |
58 | - this.rcptDt = rcptDt; | |
59 | - this.rcptCn = rcptCn; | |
60 | - } | |
61 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/rvwMttr/dto/RvwMttrPrgrsExcelDTO.java
... | ... | @@ -1,49 +0,0 @@ |
1 | -package com.takensoft.portal.rvwMttr.dto; | |
2 | - | |
3 | -import com.takensoft.common.excel.annotation.ExcelColumnName; | |
4 | -import com.takensoft.common.excel.annotation.ExcelFileName; | |
5 | -import lombok.Builder; | |
6 | -import lombok.Getter; | |
7 | -import lombok.NoArgsConstructor; | |
8 | -import lombok.Setter; | |
9 | - | |
10 | -import javax.persistence.*; | |
11 | - | |
12 | -/** | |
13 | - * @author : 박정하 | |
14 | - * @since : 2024.06.18 | |
15 | - * | |
16 | - * 검토사항진행 엑셀 다운로드 관련 DTO | |
17 | - */ | |
18 | -@Entity | |
19 | -@Getter | |
20 | -@Setter | |
21 | -@NoArgsConstructor | |
22 | -@ExcelFileName(fileName="검토사항진행") | |
23 | -public class RvwMttrPrgrsExcelDTO { | |
24 | - @Id | |
25 | - @Column | |
26 | - @GeneratedValue(strategy = GenerationType.IDENTITY) | |
27 | - @ExcelColumnName(headerName = "담당자") | |
28 | - private String picNm; | |
29 | - | |
30 | - @Column | |
31 | - @ExcelColumnName(headerName = "진행단계") | |
32 | - private String prgrsCrs; | |
33 | - | |
34 | - @Column | |
35 | - @ExcelColumnName(headerName = "진행날짜") | |
36 | - private String prgrsDt; | |
37 | - | |
38 | - @Column | |
39 | - @ExcelColumnName(headerName = "지원방안") | |
40 | - private String sprtMthd; | |
41 | - | |
42 | - @Builder | |
43 | - public RvwMttrPrgrsExcelDTO(String picNm, String prgrsCrs, String prgrsDt, String sprtMthd) { | |
44 | - this.picNm = picNm; | |
45 | - this.prgrsCrs = prgrsCrs; | |
46 | - this.prgrsDt = prgrsDt; | |
47 | - this.sprtMthd = sprtMthd; | |
48 | - } | |
49 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/rvwMttr/service/Impl/RvwMttrPrgrsServiceImpl.java
... | ... | @@ -1,97 +0,0 @@ |
1 | -package com.takensoft.portal.rvwMttr.service.Impl; | |
2 | - | |
3 | -import com.takensoft.common.util.JWTUtil; | |
4 | -import com.takensoft.portal.rvwMttr.dao.RvwMttrPrgrsDAO; | |
5 | -import com.takensoft.portal.rvwMttr.service.RvwMttrPrgrsService; | |
6 | -import com.takensoft.portal.rvwMttr.vo.RvwMttrPrgrsVO; | |
7 | -import lombok.RequiredArgsConstructor; | |
8 | -import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
9 | -import org.springframework.stereotype.Service; | |
10 | - | |
11 | -import java.util.*; | |
12 | - | |
13 | -/** | |
14 | - * @author : 박정하 | |
15 | - * @since : 2024.03.29 | |
16 | - * | |
17 | - * 검토사항진행 관련 구현체 | |
18 | - * EgovAbstractServiceImpl : 전자정부 상속 | |
19 | - * RvwMttrPrgrsService : 검토사항진행 인터페이스 상속 | |
20 | - */ | |
21 | -@Service("RvwMttrPrgrsService") | |
22 | -@RequiredArgsConstructor | |
23 | -public class RvwMttrPrgrsServiceImpl extends EgovAbstractServiceImpl implements RvwMttrPrgrsService { | |
24 | - private final RvwMttrPrgrsDAO rvwMttrPrgrsDAO; | |
25 | - private final JWTUtil jwtUtil; | |
26 | - | |
27 | - /** | |
28 | - * @author 박정하 | |
29 | - * @since 2024.04.25 | |
30 | - * | |
31 | - * 검토사항진행 등록 | |
32 | - */ | |
33 | - @Override | |
34 | - public int prgrsListInsert(String rvwMttrId, List<RvwMttrPrgrsVO> prgrsList) throws Exception { | |
35 | - int result = 0; | |
36 | - for (RvwMttrPrgrsVO rvwMttrPrgrsVO : prgrsList) { | |
37 | - rvwMttrPrgrsVO.setRvwMttrId(rvwMttrId); | |
38 | - | |
39 | - String writer = jwtUtil.getWriter(); | |
40 | - rvwMttrPrgrsVO.setRgtr(writer); | |
41 | - | |
42 | - result += rvwMttrPrgrsDAO.prgrsInsert(rvwMttrPrgrsVO); | |
43 | - } | |
44 | - return result; | |
45 | - } | |
46 | - | |
47 | - /** | |
48 | - * @author 박정하 | |
49 | - * @since 2024.04.25 | |
50 | - * | |
51 | - * 검토사항진행 수정 | |
52 | - */ | |
53 | - @Override | |
54 | - public int prgrsListUpdate(List<RvwMttrPrgrsVO> prgrsList) throws Exception { | |
55 | - int result = 0; | |
56 | - | |
57 | - for (RvwMttrPrgrsVO rvwMttrPrgrsVO : prgrsList) { | |
58 | - String writer = jwtUtil.getWriter(); | |
59 | - // 검토사항 진행 아이디가 있는 경우 (수정) | |
60 | - if (rvwMttrPrgrsVO.getRvwMttrPrgrsId() != null) { | |
61 | - rvwMttrPrgrsVO.setMdfr(writer); | |
62 | - result += rvwMttrPrgrsDAO.prgrsUpdate(rvwMttrPrgrsVO); | |
63 | - } | |
64 | - // 검토사항진행 아이디가 없는 경우 (추가) | |
65 | - else { | |
66 | - rvwMttrPrgrsVO.setRgtr(writer); | |
67 | - result += rvwMttrPrgrsDAO.prgrsInsert(rvwMttrPrgrsVO); | |
68 | - } | |
69 | - } | |
70 | - | |
71 | - return result; | |
72 | - } | |
73 | - | |
74 | - /** | |
75 | - * @author 박정하 | |
76 | - * @since 2024.04.01 | |
77 | - * | |
78 | - * 검토사항진행 삭제 | |
79 | - */ | |
80 | - public int prgrsListDelete(List<RvwMttrPrgrsVO> deleteList) throws Exception { | |
81 | - int result = 0; | |
82 | - for (RvwMttrPrgrsVO rvwMttrPrgrsVO : deleteList) { | |
83 | - result += rvwMttrPrgrsDAO.prgrsDelete(rvwMttrPrgrsVO.getRvwMttrPrgrsId()); | |
84 | - } | |
85 | - return result; | |
86 | - } | |
87 | - | |
88 | - /** | |
89 | - * @author 박정하 | |
90 | - * @since 2024.06.04 | |
91 | - * | |
92 | - * 검토사항진행 삭제 (검토사항 삭제용) | |
93 | - */ | |
94 | - public int prgrsDeleteForRvwMttr(String rvwMttrId) throws Exception { | |
95 | - return rvwMttrPrgrsDAO.prgrsDeleteForRvwMttr(rvwMttrId); | |
96 | - } | |
97 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/rvwMttr/service/Impl/RvwMttrServiceImpl.java
... | ... | @@ -1,259 +0,0 @@ |
1 | -package com.takensoft.portal.rvwMttr.service.Impl; | |
2 | - | |
3 | -import com.takensoft.cms.codeManage.service.CodeManageService; | |
4 | -import com.takensoft.cms.codeManage.vo.CodeManageVO; | |
5 | -import com.takensoft.common.Pagination; | |
6 | -import com.takensoft.common.file.service.FileMngService; | |
7 | -import com.takensoft.common.file.service.FileService; | |
8 | -import com.takensoft.common.file.vo.FileMngVO; | |
9 | -import com.takensoft.common.idgen.service.IdgenService; | |
10 | -import com.takensoft.common.util.JWTUtil; | |
11 | -import com.takensoft.portal.ivstDscsn.dao.IvstDscsnDAO; | |
12 | -import com.takensoft.portal.ivstDscsn.service.Impl.IvstDscsnServiceImpl; | |
13 | -import com.takensoft.portal.ivstDscsn.vo.IvstDscsnVO; | |
14 | -import com.takensoft.portal.rvwMttr.dao.RvwMttrDAO; | |
15 | -import com.takensoft.portal.rvwMttr.service.RvwMttrPrgrsService; | |
16 | -import com.takensoft.portal.rvwMttr.service.RvwMttrService; | |
17 | -import com.takensoft.portal.rvwMttr.vo.RvwMttrPrgrsVO; | |
18 | -import com.takensoft.portal.rvwMttr.vo.RvwMttrVO; | |
19 | -import lombok.RequiredArgsConstructor; | |
20 | -import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
21 | -import org.springframework.stereotype.Service; | |
22 | -import org.springframework.transaction.annotation.Transactional; | |
23 | -import org.springframework.web.multipart.MultipartFile; | |
24 | - | |
25 | -import java.util.*; | |
26 | - | |
27 | -/** | |
28 | - * @author : 박정하 | |
29 | - * @since : 2024.03.29 | |
30 | - * | |
31 | - * 검토사항 관련 구현체 | |
32 | - * EgovAbstractServiceImpl : 전자정부 상속 | |
33 | - * RvwMttrService : 검토사항 인터페이스 상속 | |
34 | - */ | |
35 | -@Service("rvwMttrService") | |
36 | -@RequiredArgsConstructor | |
37 | -public class RvwMttrServiceImpl extends EgovAbstractServiceImpl implements RvwMttrService { | |
38 | - private final JWTUtil jwtUtil; | |
39 | - private final IdgenService rvwMttrIdgn; | |
40 | - private final CodeManageService codeManageService; | |
41 | - private final RvwMttrDAO rvwMttrDAO; | |
42 | - private final RvwMttrPrgrsService rvwMttrPrgrsService; | |
43 | - private final FileService fileService; | |
44 | - private final FileMngService fileMngService; | |
45 | - private final IvstDscsnDAO ivstDscsnDAO; | |
46 | - | |
47 | - /** | |
48 | - * @author 박정하 | |
49 | - * @since 2024.03.29 | |
50 | - * | |
51 | - * 검토사항 등록 | |
52 | - */ | |
53 | - @Override | |
54 | - @Transactional(rollbackFor = Exception.class) | |
55 | - public HashMap<String, Object> rvwMttrInsert(RvwMttrVO rvwMttrVO, List<MultipartFile> insertFileList) throws Exception { | |
56 | - // 아이디 생성 | |
57 | - String rvwMttrId = rvwMttrIdgn.getNextStringId(); | |
58 | - rvwMttrVO.setRvwMttrId(rvwMttrId); | |
59 | - | |
60 | - // 작성자 생성 | |
61 | - String writer = jwtUtil.getWriter(); | |
62 | - rvwMttrVO.setRgtr(writer); | |
63 | - | |
64 | - // 첨부파일 등록 | |
65 | - if (insertFileList != null && !insertFileList.isEmpty() && insertFileList.size() > 0) { | |
66 | - FileMngVO fileMngVO = new FileMngVO(); | |
67 | - | |
68 | - // 파일매니저 등록 | |
69 | - HashMap<String, Object> fileMng = fileMngService.fileMngInsert(fileMngVO, insertFileList); | |
70 | - | |
71 | - // 파일매니저 아이디 삽입 | |
72 | - rvwMttrVO.setFileMngId(fileMng.get("fileMngId").toString()); | |
73 | - } | |
74 | - | |
75 | - // 검토사항 등록 | |
76 | - int rvwMttrResult = rvwMttrDAO.rvwMttrInsert(rvwMttrVO); | |
77 | - | |
78 | - // 검토사항진행 등록 | |
79 | - int prgrsResult = rvwMttrPrgrsService.prgrsListInsert(rvwMttrId, rvwMttrVO.getPrgrsList()); | |
80 | - | |
81 | - // 결과 반환 | |
82 | - HashMap<String, Object> result = new HashMap<>(); | |
83 | - result.put("rvwMttrId", rvwMttrId); | |
84 | - result.put("result", prgrsResult + rvwMttrResult); | |
85 | - return result; | |
86 | - } | |
87 | - | |
88 | - /** | |
89 | - * @author 박정하 | |
90 | - * @since 2024.03.29 | |
91 | - * | |
92 | - * 검토사항 목록 조회 | |
93 | - */ | |
94 | - @Override | |
95 | - public Map<String, Object> rvwMttrSelectList(Map<String, String> params) throws Exception { | |
96 | - Pagination search = new Pagination(0, params); | |
97 | - int cnt = rvwMttrDAO.rvwMttrSelectListCount(search); | |
98 | - Pagination pagination = new Pagination(cnt, params); | |
99 | - List<HashMap<String, Object>> list = rvwMttrDAO.rvwMttrSelectList(pagination); | |
100 | - | |
101 | - // 검토사항 유형 | |
102 | - List<CodeManageVO> rvwMttrTypeList = codeManageService.findByChildCdCache("rvwMttrType"); | |
103 | - | |
104 | - // 결과 반환 | |
105 | - Map<String, Object> result = new HashMap<>(); | |
106 | - result.put("list", list); | |
107 | - result.put("pagination", pagination); | |
108 | - result.put("rvwMttrTypeList", rvwMttrTypeList); | |
109 | - return result; | |
110 | - } | |
111 | - | |
112 | - /** | |
113 | - * @author 박정하 | |
114 | - * @since 2024.06.04 | |
115 | - * | |
116 | - * 검토사항 상세 조회 | |
117 | - */ | |
118 | - @Override | |
119 | - public Map<String, Object> rvwMttrDetail(RvwMttrVO rvwMttrVO) throws Exception { | |
120 | - RvwMttrVO newRvwMttrVO = new RvwMttrVO(); | |
121 | - | |
122 | - // RvwMttrId가 있는 경우 | |
123 | - if (rvwMttrVO.getRvwMttrId() != null) { | |
124 | - newRvwMttrVO = rvwMttrDAO.selectRvwMttrDetail(rvwMttrVO.getRvwMttrId()); | |
125 | - // FileMngId가 있는 경우 | |
126 | - if (newRvwMttrVO.getFileMngId() != null) { | |
127 | - List<HashMap<String, Object>> fileList = fileService.fileSelectList(newRvwMttrVO.getFileMngId()); | |
128 | - newRvwMttrVO.setFileList(fileList); | |
129 | - } | |
130 | - } | |
131 | - // RvwMttrId가 없는 경우 | |
132 | - else { | |
133 | - newRvwMttrVO.setType(""); // 유형 | |
134 | - newRvwMttrVO.setUseYn("Y"); // 사용유무 | |
135 | - if (rvwMttrVO.getIvstDscsnId() != null && !rvwMttrVO.getIvstDscsnId().equals("")) { | |
136 | - String ivstDscsnId = rvwMttrVO.getIvstDscsnId(); | |
137 | - newRvwMttrVO.setIvstDscsnId(ivstDscsnId); | |
138 | - IvstDscsnVO ivstDscsnVO = ivstDscsnDAO.selectIvstDscsnDetail(ivstDscsnId); | |
139 | - newRvwMttrVO.setRcptCn(ivstDscsnVO.getMainCn()); | |
140 | - } | |
141 | - if (rvwMttrVO.getTtl() != null && !rvwMttrVO.getTtl().equals("")) { | |
142 | - newRvwMttrVO.setTtl(rvwMttrVO.getTtl()); | |
143 | - } | |
144 | - } | |
145 | - | |
146 | - // PrgrsList가 비어있는 경우 | |
147 | - if (newRvwMttrVO.getPrgrsList().size() == 0) { | |
148 | - RvwMttrPrgrsVO rvwMttrPrgrsVO = new RvwMttrPrgrsVO(); | |
149 | - rvwMttrPrgrsVO.setRvwMttrId(rvwMttrVO.getRvwMttrId()); // 검토사항 Id | |
150 | - newRvwMttrVO.getPrgrsList().add(rvwMttrPrgrsVO); | |
151 | - } | |
152 | - | |
153 | - // 검토사항 유형 | |
154 | - List<CodeManageVO> rvwMttrTypeList = codeManageService.findByChildCdCache("rvwMttrType"); | |
155 | - | |
156 | - // 결과 반환 | |
157 | - Map<String, Object> result = new HashMap<>(); | |
158 | - result.put("rvwMttrVO", newRvwMttrVO); | |
159 | - result.put("rvwMttrTypeList", rvwMttrTypeList); | |
160 | - return result; | |
161 | - } | |
162 | - | |
163 | - /** | |
164 | - * @author 박정하 | |
165 | - * @since 2024.04.01 | |
166 | - * | |
167 | - * 검토사항 수정 | |
168 | - */ | |
169 | - @Override | |
170 | - @Transactional(rollbackFor = Exception.class) | |
171 | - public int rvwMttrUpdate(RvwMttrVO rvwMttrVO, List<MultipartFile> insertFileList) throws Exception { | |
172 | - // 수정자 생성 | |
173 | - String writer = jwtUtil.getWriter(); | |
174 | - rvwMttrVO.setMdfr(writer); | |
175 | - | |
176 | - int result = 0; | |
177 | - | |
178 | - // 첨부파일 정보 | |
179 | - String fileMngId = rvwMttrVO.getFileMngId(); | |
180 | - FileMngVO fileMngVO = new FileMngVO(); | |
181 | - List<HashMap<String, Object>> deleteFileList = rvwMttrVO.getDeleteFileList(); | |
182 | - | |
183 | - // FileMngId가 있는 경우 | |
184 | - if (fileMngId != null) { | |
185 | - fileMngVO.setFileMngId(rvwMttrVO.getFileMngId()); | |
186 | - for (HashMap<String, Object> file : deleteFileList) { | |
187 | - file.put("fileId", Integer.parseInt(file.get("fileId").toString())); | |
188 | - } | |
189 | - result += fileMngService.fileMngUpadate(fileMngVO, deleteFileList, insertFileList); | |
190 | - } | |
191 | - // FileMngId가 없는 경우 | |
192 | - else { | |
193 | - if (insertFileList != null && insertFileList.size() > 0) { | |
194 | - HashMap<String, Object> fileMng = fileMngService.fileMngInsert(fileMngVO, insertFileList); | |
195 | - result += (int)fileMng.get("fileMngResult"); | |
196 | - rvwMttrVO.setFileMngId(fileMng.get("fileMngId").toString()); | |
197 | - } | |
198 | - } | |
199 | - | |
200 | - // 검토사항 수정 | |
201 | - result += rvwMttrDAO.rvwMttrUpdate(rvwMttrVO); | |
202 | - | |
203 | - // 검토사항진행 수정 | |
204 | - List<RvwMttrPrgrsVO> prgrsList = rvwMttrVO.getPrgrsList(); | |
205 | - if (prgrsList.size() > 0 && !prgrsList.isEmpty()) { | |
206 | - result += rvwMttrPrgrsService.prgrsListUpdate(prgrsList); | |
207 | - } | |
208 | - // 검토사항진행 삭제 | |
209 | - List<RvwMttrPrgrsVO> deleteList = rvwMttrVO.getDeleteList(); | |
210 | - if (deleteList.size() > 0 && !deleteList.isEmpty()) { | |
211 | - result += rvwMttrPrgrsService.prgrsListDelete(deleteList); | |
212 | - } | |
213 | - | |
214 | - return result; | |
215 | - } | |
216 | - | |
217 | - /** | |
218 | - * @author 박정하 | |
219 | - * @since 2024.04.01 | |
220 | - * | |
221 | - * 검토사항 삭제 | |
222 | - */ | |
223 | - @Override | |
224 | - @Transactional(rollbackFor = Exception.class) | |
225 | - public int rvwMttrDelete(RvwMttrVO rvwMttrVO) throws Exception { | |
226 | - // 수정자 생성 | |
227 | - String writer = jwtUtil.getWriter(); | |
228 | - rvwMttrVO.setMdfr(writer); | |
229 | - | |
230 | - // 검토사항 삭제 | |
231 | - int result = 0; | |
232 | - rvwMttrVO.setUseYn("N"); | |
233 | - result += rvwMttrDAO.rvwMttrDelete(rvwMttrVO); | |
234 | - | |
235 | - // 검토사항진행 삭제 | |
236 | - result += rvwMttrPrgrsService.prgrsDeleteForRvwMttr(rvwMttrVO.getRvwMttrId()); | |
237 | - | |
238 | - return result; | |
239 | - } | |
240 | - | |
241 | - /** | |
242 | - * @author 박정하 | |
243 | - * @since 2024.06.12 | |
244 | - * | |
245 | - * 검토사항 삭제 (검토사항 삭제용) | |
246 | - */ | |
247 | - public int rvwMttrDeleteByIvstDscsnId(String ivstDscsnId) throws Exception { | |
248 | - int result = 0; | |
249 | - | |
250 | - List<RvwMttrVO> rvwMttrList = rvwMttrDAO.rvwMttrListByIvstDscsnId(ivstDscsnId); | |
251 | - if (rvwMttrList.size() > 0) { | |
252 | - for (RvwMttrVO rvwMttrVO : rvwMttrList) { | |
253 | - result += rvwMttrDelete(rvwMttrVO); | |
254 | - } | |
255 | - } | |
256 | - | |
257 | - return result; | |
258 | - } | |
259 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/rvwMttr/service/RvwMttrPrgrsService.java
... | ... | @@ -1,45 +0,0 @@ |
1 | -package com.takensoft.portal.rvwMttr.service; | |
2 | - | |
3 | -import com.takensoft.portal.rvwMttr.vo.RvwMttrPrgrsVO; | |
4 | - | |
5 | -import java.util.*; | |
6 | - | |
7 | -/** | |
8 | - * @author : 박정하 | |
9 | - * @since : 2024.03.29 | |
10 | - * | |
11 | - * 검토사항진행 관련 인터페이스 | |
12 | - */ | |
13 | -public interface RvwMttrPrgrsService { | |
14 | - /** | |
15 | - * @author 박정하 | |
16 | - * @since 2024.04.25 | |
17 | - * | |
18 | - * 검토사항진행 등록 | |
19 | - */ | |
20 | - public int prgrsListInsert(String rvwMttrId, List<RvwMttrPrgrsVO> prgrsList) throws Exception; | |
21 | - | |
22 | - /** | |
23 | - * @author 박정하 | |
24 | - * @since 2024.04.25 | |
25 | - * | |
26 | - * 검토사항진행 수정 | |
27 | - */ | |
28 | - public int prgrsListUpdate(List<RvwMttrPrgrsVO> prgrsList) throws Exception; | |
29 | - | |
30 | - /** | |
31 | - * @author 박정하 | |
32 | - * @since 2024.04.01 | |
33 | - * | |
34 | - * 검토사항진행 삭제 | |
35 | - */ | |
36 | - public int prgrsListDelete(List<RvwMttrPrgrsVO> prgrsList) throws Exception; | |
37 | - | |
38 | - /** | |
39 | - * @author 박정하 | |
40 | - * @since 2024.06.04 | |
41 | - * | |
42 | - * 검토사항진행 삭제 (검토사항 삭제용) | |
43 | - */ | |
44 | - public int prgrsDeleteForRvwMttr(String rvwMttrId) throws Exception; | |
45 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/rvwMttr/service/RvwMttrService.java
... | ... | @@ -1,63 +0,0 @@ |
1 | -package com.takensoft.portal.rvwMttr.service; | |
2 | - | |
3 | -import com.takensoft.portal.ivstDscsn.vo.IvstDscsnVO; | |
4 | -import com.takensoft.portal.rvwMttr.vo.RvwMttrVO; | |
5 | -import org.springframework.web.multipart.MultipartFile; | |
6 | - | |
7 | -import java.util.*; | |
8 | - | |
9 | -/** | |
10 | - * @author : 박정하 | |
11 | - * @since : 2024.03.20 | |
12 | - * | |
13 | - * 검토사항 관련 인터페이스 | |
14 | - */ | |
15 | -public interface RvwMttrService { | |
16 | - /** | |
17 | - * @author 박정하 | |
18 | - * @since 2024.03.29 | |
19 | - * | |
20 | - * 검토사항 등록 | |
21 | - */ | |
22 | - public HashMap<String, Object> rvwMttrInsert(RvwMttrVO rvwMttrVO, List<MultipartFile> insertFileList) throws Exception; | |
23 | - | |
24 | - /** | |
25 | - * @author 박정하 | |
26 | - * @since 2024.03.29 | |
27 | - * | |
28 | - * 검토사항 목록 조회 | |
29 | - */ | |
30 | - public Map<String, Object> rvwMttrSelectList(Map<String, String> params) throws Exception; | |
31 | - | |
32 | - /** | |
33 | - * @author 박정하 | |
34 | - * @since 2024.06.04 | |
35 | - * | |
36 | - * 검토사항 상세 조회 | |
37 | - */ | |
38 | - public Map<String, Object> rvwMttrDetail(RvwMttrVO rvwMttrVO) throws Exception; | |
39 | - | |
40 | - /** | |
41 | - * @author 박정하 | |
42 | - * @since 2024.04.01 | |
43 | - * | |
44 | - * 검토사항 수정 | |
45 | - */ | |
46 | - public int rvwMttrUpdate(RvwMttrVO rvwMttrVO, List<MultipartFile> insertFileList) throws Exception; | |
47 | - | |
48 | - /** | |
49 | - * @author 박정하 | |
50 | - * @since 2024.04.01 | |
51 | - * | |
52 | - * 검토사항 삭제 | |
53 | - */ | |
54 | - public int rvwMttrDelete(RvwMttrVO rvwMttrVO) throws Exception; | |
55 | - | |
56 | - /** | |
57 | - * @author 박정하 | |
58 | - * @since 2024.06.12 | |
59 | - * | |
60 | - * 검토사항 삭제 (검토사항 삭제용) | |
61 | - */ | |
62 | - public int rvwMttrDeleteByIvstDscsnId(String ivstDscsnId) throws Exception; | |
63 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/rvwMttr/vo/RvwMttrPrgrsVO.java
... | ... | @@ -1,26 +0,0 @@ |
1 | -package com.takensoft.portal.rvwMttr.vo; | |
2 | - | |
3 | -import lombok.Data; | |
4 | - | |
5 | -/** | |
6 | - * @author : 박정하 | |
7 | - * @since : 2024.03.29 | |
8 | - * | |
9 | - * 검토사항진행 관련 VO | |
10 | - */ | |
11 | -@Data | |
12 | -public class RvwMttrPrgrsVO { | |
13 | - private Integer rvwMttrPrgrsId; // 검토사항진행 아이디 | |
14 | - private String rvwMttrId; // 검토사항 아이디 | |
15 | - private String picId; // 담당자 아이디 | |
16 | - private String prgrsCrs = ""; // 진행단계 | |
17 | - private String prgrsDt; // 진행일 | |
18 | - private String sprtMthd; // 지원방안 | |
19 | - private String rgtr; // 등록자 | |
20 | - private String regDt; // 등록일 | |
21 | - private String mdfr; // 수정자 | |
22 | - private String mdfcnDt; // 수정일 | |
23 | - | |
24 | - // 담당자 이름 | |
25 | - private String picNm; | |
26 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/rvwMttr/vo/RvwMttrVO.java
... | ... | @@ -1,54 +0,0 @@ |
1 | -package com.takensoft.portal.rvwMttr.vo; | |
2 | - | |
3 | -import lombok.*; | |
4 | -import org.springframework.web.multipart.MultipartFile; | |
5 | - | |
6 | -import java.util.*; | |
7 | - | |
8 | -/** | |
9 | - * @author : 박정하 | |
10 | - * @since : 2024.03.29 | |
11 | - * | |
12 | - * 검토사항 관련 VO | |
13 | - */ | |
14 | -@Setter | |
15 | -@Getter | |
16 | -@NoArgsConstructor | |
17 | -@AllArgsConstructor | |
18 | -public class RvwMttrVO { | |
19 | - private String RvwMttrId; // 검토사항 아이디 | |
20 | - private String ivstDscsnId; // 투자상담 아이디 | |
21 | - private String type; // 유형 | |
22 | - private String clr; // 접수자 | |
23 | - private String rcptDt; // 접수일 | |
24 | - private String rcptCn; // 접수내용 | |
25 | - private String useYn; // 사용여부 | |
26 | - private String rgtr; // 등록자 | |
27 | - private String regDt; // 등록일 | |
28 | - private String mdfr; // 수정자 | |
29 | - private String mdfcnDt; // 수정일 | |
30 | - | |
31 | - // 파일매니저아이디 | |
32 | - private String fileMngId; | |
33 | - // 첨부파일 목록 | |
34 | - List<HashMap<String, Object>> fileList = new ArrayList<>(); | |
35 | - // 첨부파일 삭제 목록 | |
36 | - List<HashMap<String, Object>> deleteFileList = new ArrayList<>(); | |
37 | - | |
38 | - // 기업아이디 | |
39 | - private String entId; | |
40 | - // 기업명 | |
41 | - private String entNm; | |
42 | - // 투자상담명 | |
43 | - private String ttl; | |
44 | - // 접수자명 | |
45 | - private String clrNm; | |
46 | - // 현재진행단계 | |
47 | - private String nowPrgrsCrs; | |
48 | - // 검토사항진행 목록 | |
49 | - private List<RvwMttrPrgrsVO> prgrsList = new ArrayList<>(); | |
50 | - // 검토사항진행 삭제 목록 | |
51 | - private List<RvwMttrPrgrsVO> deleteList = new ArrayList<>(); | |
52 | - // 투자상담 주요내용 | |
53 | - private String mainCn; | |
54 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/portal/rvwMttr/web/RvwMttrController.java
... | ... | @@ -1,133 +0,0 @@ |
1 | -package com.takensoft.portal.rvwMttr.web; | |
2 | - | |
3 | -import com.takensoft.common.excel.service.ExcelService; | |
4 | -import com.takensoft.common.message.MessageCode; | |
5 | -import com.takensoft.common.util.ResponseUtil; | |
6 | -import com.takensoft.portal.rvwMttr.service.RvwMttrService; | |
7 | -import com.takensoft.portal.rvwMttr.vo.RvwMttrVO; | |
8 | -import lombok.RequiredArgsConstructor; | |
9 | - | |
10 | -import org.springframework.http.ResponseEntity; | |
11 | -import org.springframework.web.bind.annotation.*; | |
12 | -import org.springframework.web.multipart.MultipartFile; | |
13 | - | |
14 | -import java.util.*; | |
15 | -/** | |
16 | - * @author 박정하 | |
17 | - * @since 2024.03.29 | |
18 | - * @modification | |
19 | - * since | author | description | |
20 | - * 2024.03.29 | 박정하 | 최초 등록 | |
21 | - * | |
22 | - * 검토사항 관련 Controller | |
23 | - */ | |
24 | -@RestController | |
25 | -@RequiredArgsConstructor | |
26 | -@RequestMapping(value = "/government/rvwMttr") | |
27 | -public class RvwMttrController { | |
28 | - private final RvwMttrService rvwMttrService; | |
29 | - private final ExcelService excelService; | |
30 | - private final ResponseUtil resUtil; | |
31 | - | |
32 | - /** | |
33 | - * @author 박정하 | |
34 | - * @since 2024.03.29 | |
35 | - * @param rvwMttrVO | |
36 | - * @return | |
37 | - * @throws Exception | |
38 | - * | |
39 | - * 검토사항 등록 | |
40 | - */ | |
41 | - @PostMapping(path = "/insertProc.file") | |
42 | - public ResponseEntity<?> insertProc(@RequestPart RvwMttrVO rvwMttrVO, @RequestPart(required = false) List<MultipartFile> insertFileList) throws Exception { | |
43 | - HashMap<String, Object> result = rvwMttrService.rvwMttrInsert(rvwMttrVO, insertFileList); | |
44 | - int insertResult = (int)result.get("result"); | |
45 | - | |
46 | - // 응답 처리 | |
47 | - if(insertResult > 0) { | |
48 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
49 | - } else if(insertResult < 0) { | |
50 | - return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); | |
51 | - } else { | |
52 | - return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); | |
53 | - } | |
54 | - } | |
55 | - | |
56 | - /** | |
57 | - * @author 박정하 | |
58 | - * @since 2024.03.29 | |
59 | - * @param params | |
60 | - * @return | |
61 | - * @throws Exception | |
62 | - * | |
63 | - * 검토사항 목록 조회 | |
64 | - */ | |
65 | - @PostMapping(path = "/listProc.json") | |
66 | - public ResponseEntity<?> listProc(@RequestBody Map<String, String> params) throws Exception { | |
67 | - Map<String, Object> result = rvwMttrService.rvwMttrSelectList(params); | |
68 | - | |
69 | - // 응답 처리 | |
70 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
71 | - } | |
72 | - | |
73 | - /** | |
74 | - * @author 박정하 | |
75 | - * @since 2024.06.04 | |
76 | - * @param rvwMttrVO | |
77 | - * @return | |
78 | - * @throws Exception | |
79 | - * | |
80 | - * 검토사항 상세 조회 | |
81 | - */ | |
82 | - @PostMapping(path = "/detailProc.json") | |
83 | - public ResponseEntity<?> detailProc(@RequestBody RvwMttrVO rvwMttrVO) throws Exception { | |
84 | - Map<String, Object> result = rvwMttrService.rvwMttrDetail(rvwMttrVO); | |
85 | - | |
86 | - // 응답 처리 | |
87 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
88 | - } | |
89 | - | |
90 | - /** | |
91 | - * @author 박정하 | |
92 | - * @since 2024.04.01 | |
93 | - * @param rvwMttrVO | |
94 | - * @return | |
95 | - * @throws Exception | |
96 | - * | |
97 | - * 검토사항 수정 | |
98 | - */ | |
99 | - @PostMapping(path = "/updateProc.file") | |
100 | - public ResponseEntity<?> updateProc(@RequestPart RvwMttrVO rvwMttrVO, @RequestPart(required = false) List<MultipartFile> insertFileList) throws Exception { | |
101 | - int result = rvwMttrService.rvwMttrUpdate(rvwMttrVO, insertFileList); | |
102 | - | |
103 | - // 응답 처리 | |
104 | - if (result > 0) { | |
105 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
106 | - } else { | |
107 | - return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); | |
108 | - } | |
109 | - } | |
110 | - | |
111 | - /** | |
112 | - * @author 박정하 | |
113 | - * @since 2024.04.01 | |
114 | - * @param rvwMttrVO | |
115 | - * @return | |
116 | - * @throws Exception | |
117 | - * | |
118 | - * 검토사항 삭제 | |
119 | - */ | |
120 | - @PostMapping(path = "/deleteProc.json") | |
121 | - public ResponseEntity<?> deleteProc(@RequestBody RvwMttrVO rvwMttrVO) throws Exception { | |
122 | - // 검토사항 삭제 | |
123 | - int result = rvwMttrService.rvwMttrDelete(rvwMttrVO); | |
124 | - | |
125 | - // 응답 처리 | |
126 | - if (result > 0) { | |
127 | - return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); | |
128 | - } else { | |
129 | - return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); | |
130 | - } | |
131 | - } | |
132 | - | |
133 | -}(No newline at end of file) |
--- src/main/java/com/takensoft/cms/search/dao/SearchDAO.java
+++ src/main/java/com/takensoft/portal/search/dao/SearchDAO.java
... | ... | @@ -1,7 +1,7 @@ |
1 |
-package com.takensoft.cms.search.dao; |
|
1 |
+package com.takensoft.portal.search.dao; |
|
2 | 2 |
|
3 |
-import com.takensoft.cms.search.vo.SearchContentVO; |
|
4 |
-import com.takensoft.cms.search.vo.SearchVO; |
|
3 |
+import com.takensoft.portal.search.vo.SearchContentVO; |
|
4 |
+import com.takensoft.portal.search.vo.SearchVO; |
|
5 | 5 |
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; |
6 | 6 |
|
7 | 7 |
import java.util.HashMap; |
--- src/main/java/com/takensoft/cms/search/service/Impl/SearchServiceImpl.java
+++ src/main/java/com/takensoft/portal/search/service/Impl/SearchServiceImpl.java
... | ... | @@ -1,20 +1,18 @@ |
1 |
-package com.takensoft.cms.search.service.Impl; |
|
1 |
+package com.takensoft.portal.search.service.Impl; |
|
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.menu.service.MenuService; |
4 | 4 |
import com.takensoft.cms.menu.vo.MenuRequest; |
5 | 5 |
import com.takensoft.cms.menu.vo.SysMenuVO; |
6 |
-import com.takensoft.cms.search.dao.SearchDAO; |
|
7 |
-import com.takensoft.cms.search.service.SearchService; |
|
8 |
-import com.takensoft.cms.search.vo.SearchContentVO; |
|
9 |
-import com.takensoft.cms.search.vo.SearchMenuVO; |
|
10 |
-import com.takensoft.cms.search.vo.SearchResultVO; |
|
11 |
-import com.takensoft.cms.search.vo.SearchVO; |
|
12 |
-import com.takensoft.common.exception.CustomNotFoundException; |
|
6 |
+import com.takensoft.portal.search.dao.SearchDAO; |
|
7 |
+import com.takensoft.portal.search.service.SearchService; |
|
8 |
+import com.takensoft.portal.search.vo.SearchContentVO; |
|
9 |
+import com.takensoft.portal.search.vo.SearchMenuVO; |
|
10 |
+import com.takensoft.portal.search.vo.SearchResultVO; |
|
11 |
+import com.takensoft.portal.search.vo.SearchVO; |
|
13 | 12 |
import lombok.RequiredArgsConstructor; |
14 | 13 |
import org.apache.commons.lang3.StringEscapeUtils; |
15 | 14 |
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; |
16 | 15 |
import org.springframework.dao.DataAccessException; |
17 |
-import org.springframework.security.core.userdetails.UsernameNotFoundException; |
|
18 | 16 |
import org.springframework.stereotype.Service; |
19 | 17 |
|
20 | 18 |
import java.util.*; |
--- src/main/java/com/takensoft/cms/search/service/SearchService.java
+++ src/main/java/com/takensoft/portal/search/service/SearchService.java
... | ... | @@ -1,11 +1,7 @@ |
1 |
-package com.takensoft.cms.search.service; |
|
1 |
+package com.takensoft.portal.search.service; |
|
2 | 2 |
|
3 |
-import com.takensoft.cms.search.vo.SearchResultVO; |
|
4 |
-import com.takensoft.cms.search.vo.SearchVO; |
|
5 |
- |
|
6 |
-import java.util.HashMap; |
|
7 |
-import java.util.List; |
|
8 |
-import java.util.Map; |
|
3 |
+import com.takensoft.portal.search.vo.SearchResultVO; |
|
4 |
+import com.takensoft.portal.search.vo.SearchVO; |
|
9 | 5 |
|
10 | 6 |
/** |
11 | 7 |
* @author 하석형 |
--- src/main/java/com/takensoft/cms/search/vo/SearchContentVO.java
+++ src/main/java/com/takensoft/portal/search/vo/SearchContentVO.java
... | ... | @@ -1,4 +1,4 @@ |
1 |
-package com.takensoft.cms.search.vo; |
|
1 |
+package com.takensoft.portal.search.vo; |
|
2 | 2 |
|
3 | 3 |
import lombok.AllArgsConstructor; |
4 | 4 |
import lombok.Getter; |
--- src/main/java/com/takensoft/cms/search/vo/SearchMenuVO.java
+++ src/main/java/com/takensoft/portal/search/vo/SearchMenuVO.java
... | ... | @@ -1,4 +1,4 @@ |
1 |
-package com.takensoft.cms.search.vo; |
|
1 |
+package com.takensoft.portal.search.vo; |
|
2 | 2 |
|
3 | 3 |
import lombok.AllArgsConstructor; |
4 | 4 |
import lombok.Getter; |
--- src/main/java/com/takensoft/cms/search/vo/SearchResultVO.java
+++ src/main/java/com/takensoft/portal/search/vo/SearchResultVO.java
... | ... | @@ -1,4 +1,4 @@ |
1 |
-package com.takensoft.cms.search.vo; |
|
1 |
+package com.takensoft.portal.search.vo; |
|
2 | 2 |
|
3 | 3 |
import lombok.AllArgsConstructor; |
4 | 4 |
import lombok.Getter; |
--- src/main/java/com/takensoft/cms/search/vo/SearchVO.java
+++ src/main/java/com/takensoft/portal/search/vo/SearchVO.java
... | ... | @@ -1,11 +1,10 @@ |
1 |
-package com.takensoft.cms.search.vo; |
|
1 |
+package com.takensoft.portal.search.vo; |
|
2 | 2 |
|
3 | 3 |
import lombok.AllArgsConstructor; |
4 | 4 |
import lombok.Getter; |
5 | 5 |
import lombok.NoArgsConstructor; |
6 | 6 |
import lombok.Setter; |
7 | 7 |
|
8 |
-import java.util.ArrayList; |
|
9 | 8 |
import java.util.List; |
10 | 9 |
|
11 | 10 |
/** |
--- src/main/java/com/takensoft/cms/search/web/SearchController.java
+++ src/main/java/com/takensoft/portal/search/web/SearchController.java
... | ... | @@ -1,20 +1,14 @@ |
1 |
-package com.takensoft.cms.search.web; |
|
1 |
+package com.takensoft.portal.search.web; |
|
2 | 2 |
|
3 |
-import com.takensoft.cms.search.service.SearchService; |
|
4 |
-import com.takensoft.cms.search.vo.SearchResultVO; |
|
5 |
-import com.takensoft.cms.search.vo.SearchVO; |
|
3 |
+import com.takensoft.portal.search.service.SearchService; |
|
4 |
+import com.takensoft.portal.search.vo.SearchResultVO; |
|
5 |
+import com.takensoft.portal.search.vo.SearchVO; |
|
6 | 6 |
import com.takensoft.common.message.MessageCode; |
7 |
-import com.takensoft.common.util.ResponseData; |
|
8 | 7 |
import com.takensoft.common.util.ResponseUtil; |
9 | 8 |
import lombok.RequiredArgsConstructor; |
10 | 9 |
import lombok.extern.slf4j.Slf4j; |
11 |
-import org.springframework.http.HttpHeaders; |
|
12 |
-import org.springframework.http.HttpStatus; |
|
13 |
-import org.springframework.http.MediaType; |
|
14 | 10 |
import org.springframework.http.ResponseEntity; |
15 | 11 |
import org.springframework.web.bind.annotation.*; |
16 |
- |
|
17 |
-import java.nio.charset.Charset; |
|
18 | 12 |
|
19 | 13 |
/** |
20 | 14 |
* @author : 하석형 |
--- src/main/resources/mybatis/mapper/bbs/search-SQL.xml
+++ src/main/resources/mybatis/mapper/bbs/search-SQL.xml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 |
작성일 : 2024.06.12 |
6 | 6 |
내 용 : 통합 검색 관리 관련 |
7 | 7 |
--> |
8 |
-<mapper namespace="com.takensoft.cms.search.dao.SearchDAO"> |
|
8 |
+<mapper namespace="com.takensoft.portal.search.dao.SearchDAO"> |
|
9 | 9 |
|
10 | 10 |
<!-- |
11 | 11 |
작 성 자 : 하석형 |
--- src/main/resources/mybatis/mapper/entDscsnAply/entDscsnAply-SQL.xml
... | ... | @@ -1,188 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | -<mapper namespace="com.takensoft.portal.entDscsnAply.dao.EntDscsnAplyDAO"> | |
4 | - <!-- 기업상담신청 resultMap --> | |
5 | - <resultMap id="entDscsnAplyMap" type="EntDscsnAplyVO"> | |
6 | - <result property="entDscsnAplyId" column="ent_dscsn_aply_id" /> | |
7 | - <result property="entNm" column="ent_nm" /> | |
8 | - <result property="aplcntNm" column="aplcnt_nm" /> | |
9 | - <result property="telno" column="telno" /> | |
10 | - <result property="eml" column="eml" /> | |
11 | - <result property="aplyCn" column="aply_cn" /> | |
12 | - <result property="fileMngId" column="file_mng_id" /> | |
13 | - <result property="actnPic" column="actn_pic" /> | |
14 | - <result property="actnDt" column="actn_dt" /> | |
15 | - <result property="rmrk" column="rmrk" /> | |
16 | - <result property="prcsStts" column="prcs_stts" /> | |
17 | - <result property="useYn" column="use_yn" /> | |
18 | - <result property="aplcntIp" column="aplcnt_ip" /> | |
19 | - <result property="regDt" column="reg_dt" /> | |
20 | - <result property="mbrNm" column="mbr_nm" /> | |
21 | - </resultMap> | |
22 | - | |
23 | - <!-- | |
24 | - 작 성 자 : 박정하 | |
25 | - 작 성 일 : 2024.04.02 | |
26 | - 내 용 : 기업상담신청 등록 | |
27 | - --> | |
28 | - <insert id="entDscsnAplyInsert" parameterType="HashMap"> | |
29 | - INSERT INTO ent_dscsn_aply ( | |
30 | - ent_dscsn_aply_id | |
31 | - , ent_nm | |
32 | - , aplcnt_nm | |
33 | - , telno | |
34 | - , eml | |
35 | - , aply_cn | |
36 | - , file_mng_id | |
37 | - , actn_pic | |
38 | - , actn_dt | |
39 | - , rmrk | |
40 | - , prcs_stts | |
41 | - , use_yn | |
42 | - , aplcnt_ip | |
43 | - , reg_dt | |
44 | - ) VALUES ( | |
45 | - #{entDscsnAplyId} | |
46 | - , #{entNm} | |
47 | - , #{aplcntNm} | |
48 | - , #{telno} | |
49 | - , #{eml} | |
50 | - , #{aplyCn} | |
51 | - , #{fileMngId} | |
52 | - , #{actnPic} | |
53 | - , #{actnDt}::timestamp | |
54 | - , #{rmrk} | |
55 | - , null | |
56 | - , 'Y' | |
57 | - , #{aplcntIp} | |
58 | - , now() | |
59 | - ) | |
60 | - </insert> | |
61 | - | |
62 | - <!-- SELECT SQL --> | |
63 | - <sql id="selectItem"> | |
64 | - SELECT eda.ent_dscsn_aply_id | |
65 | - , eda.ent_nm | |
66 | - , eda.aplcnt_nm | |
67 | - , eda.telno | |
68 | - , eda.eml | |
69 | - , eda.aply_cn | |
70 | - , eda.file_mng_id | |
71 | - , eda.actn_pic | |
72 | - , to_char(eda.actn_dt, 'YYYY-MM-DD HH24:MI') AS actn_dt | |
73 | - , eda.rmrk | |
74 | - , eda.prcs_stts | |
75 | - , eda.use_yn | |
76 | - , eda.aplcnt_ip | |
77 | - , to_char(eda.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
78 | - , mi.mbr_nm | |
79 | - FROM ent_dscsn_aply AS eda | |
80 | - LEFT JOIN mbr_info AS mi | |
81 | - ON eda.actn_pic = mi.mbr_id | |
82 | - AND mi.use_yn = 'Y' | |
83 | - WHERE eda.use_yn = 'Y' | |
84 | - </sql> | |
85 | - | |
86 | - <sql id="selectRequirement"> | |
87 | - <if test="searchText != null and searchText != ''"> | |
88 | - AND ent_nm LIKE '%' || #{searchText} || '%' | |
89 | - </if> | |
90 | - <if test="cateValue != null and cateValue != ''"> | |
91 | - <choose> | |
92 | - <when test='cateValue == "S"'> | |
93 | - AND prcs_stts IS NULL | |
94 | - </when> | |
95 | - <otherwise> | |
96 | - AND prcs_stts = #{cateValue} | |
97 | - </otherwise> | |
98 | - </choose> | |
99 | - </if> | |
100 | - </sql> | |
101 | - | |
102 | - <!-- | |
103 | - 작 성 자 : 박정하 | |
104 | - 작 성 일 : 2024.04.02 | |
105 | - 내 용 : 기업상담신청 목록 조회 | |
106 | - --> | |
107 | - <select id="entDscsnAplyList" parameterType="Pagination" resultMap="entDscsnAplyMap"> | |
108 | - SELECT ent_dscsn_aply_id | |
109 | - , ent_nm | |
110 | - , aplcnt_nm | |
111 | - , telno | |
112 | - , eml | |
113 | - , aply_cn | |
114 | - , file_mng_id | |
115 | - , actn_pic | |
116 | - , actn_dt | |
117 | - , rmrk | |
118 | - , prcs_stts | |
119 | - , use_yn | |
120 | - , aplcnt_ip | |
121 | - , reg_dt | |
122 | - , mbr_nm | |
123 | - FROM ( | |
124 | - <include refid="selectItem" /> | |
125 | - <if test='isAdmin != "Y"'> | |
126 | - AND actn_pic = #{mbrId} | |
127 | - </if> | |
128 | - ) AS datas | |
129 | - WHERE TRUE | |
130 | - <include refid="selectRequirement" /> | |
131 | - ORDER BY reg_dt DESC | |
132 | - OFFSET #{limitStart} LIMIT #{recordSize} | |
133 | - </select> | |
134 | - | |
135 | - <!-- | |
136 | - 작 성 자 : 박정하 | |
137 | - 작 성 일 : 2024.04.02 | |
138 | - 내 용 : 기업상담신청 목록 총 개수 조회 | |
139 | - --> | |
140 | - <select id="entDscsnAplyListCount" parameterType="Pagination" resultType="int"> | |
141 | - SELECT COUNT(ent_dscsn_aply_id) | |
142 | - FROM ( | |
143 | - <include refid="selectItem" /> | |
144 | - <if test='isAdmin != "Y"'> | |
145 | - AND actn_pic = #{mbrId} | |
146 | - </if> | |
147 | - ) AS datas | |
148 | - WHERE TRUE | |
149 | - <include refid="selectRequirement" /> | |
150 | - </select> | |
151 | - | |
152 | - <!-- | |
153 | - 작 성 자 : 박정하 | |
154 | - 작 성 일 : 2024.04.02 | |
155 | - 내 용 : 기업상담신청 상세 조회 | |
156 | - --> | |
157 | - <select id="entDscsnAplyDetail" parameterType="String" resultMap="entDscsnAplyMap"> | |
158 | - <include refid="selectItem" /> | |
159 | - AND ent_dscsn_aply_id = #{entDscsnAplyId} | |
160 | - </select> | |
161 | - | |
162 | - <!-- | |
163 | - 작성자 : 박정하 | |
164 | - 작성일자 : 2024-04-02 | |
165 | - 내용 : 기업상담신청 수정 | |
166 | - --> | |
167 | - <update id="entDscsnAplyUpdate" parameterType="HashMap"> | |
168 | - UPDATE ent_dscsn_aply | |
169 | - SET actn_pic = #{actnPic}, | |
170 | - actn_dt = now(), | |
171 | - rmrk = #{rmrk}, | |
172 | - prcs_stts = #{prcsStts} | |
173 | - WHERE ent_dscsn_aply_id = #{entDscsnAplyId} | |
174 | - </update> | |
175 | - | |
176 | - <!-- | |
177 | - 작 성 자 : 박정하 | |
178 | - 작 성 일 : 2024.04.04 | |
179 | - 내 용 : 기업상담신청 1시간 이내 동일 아이피 등록 개수 | |
180 | - --> | |
181 | - <select id="entDscsnAplyCountByOneHourWriteSameIp" parameterType="string" resultType="HashMap"> | |
182 | - SELECT COALESCE(count(0), 0) AS writecount, | |
183 | - '1 HOUR'::interval - (now() - MIN(reg_dt)) AS lastdatetime | |
184 | - FROM ent_dscsn_aply | |
185 | - WHERE aplcnt_ip = #{aplcntIp} | |
186 | - AND reg_dt > now() - '1 HOUR'::interval | |
187 | - </select> | |
188 | -</mapper>(No newline at end of file) |
--- src/main/resources/mybatis/mapper/entInfo/bplc-SQL.xml
... | ... | @@ -1,91 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | -<mapper namespace="com.takensoft.portal.entInfo.dao.BplcDAO"> | |
4 | - <!-- 기업주요사업장 resultMap --> | |
5 | - <resultMap id="bplcMap" type="HashMap"> | |
6 | - <result property="bplcId" column="bplc_id" /> | |
7 | - <result property="entId" column="ent_id" /> | |
8 | - <result property="wrkrCnt" column="wrkr_cnt" /> | |
9 | - <result property="bplcAddr" column="bplc_addr" /> | |
10 | - <result property="useYn" column="use_yn" /> | |
11 | - <result property="rgtr" column="rgtr" /> | |
12 | - <result property="regDt" column="reg_dt" /> | |
13 | - <result property="mdfr" column="mdfr" /> | |
14 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
15 | - <result property="bplcNm" column="bplc_nm" /> | |
16 | - <result property="mainPrdt" column="main_prdt" /> | |
17 | - <result property="bplcSiar" column="bplc_siar" /> | |
18 | - <result property="fctryArea" column="fctry_area" /> | |
19 | - <result property="bplcSiarUnit" column="bplc_siar_unit" /> | |
20 | - <result property="fctryAreaUnit" column="fctry_area_unit" /> | |
21 | - </resultMap> | |
22 | - | |
23 | - <!-- | |
24 | - 작 성 자 : 박정하 | |
25 | - 작 성 일 : 2024.06.10 | |
26 | - 내 용 : 기업주요사업장 등록 | |
27 | - --> | |
28 | - <insert id="bplcInsert" parameterType="BplcVO"> | |
29 | - INSERT INTO ent_main_bplc ( | |
30 | - ent_id | |
31 | - , wrkr_cnt | |
32 | - , bplc_addr | |
33 | - , use_yn | |
34 | - , rgtr | |
35 | - , reg_dt | |
36 | - , bplc_nm | |
37 | - , main_prdt | |
38 | - , bplc_siar | |
39 | - , fctry_area | |
40 | - , bplc_siar_unit | |
41 | - , fctry_area_unit | |
42 | - ) VALUES ( | |
43 | - #{entId} | |
44 | - , #{wrkrCnt} | |
45 | - , #{bplcAddr} | |
46 | - , 'Y' | |
47 | - , #{rgtr} | |
48 | - , now() | |
49 | - , #{bplcNm} | |
50 | - , #{mainPrdt} | |
51 | - , #{bplcSiar} | |
52 | - , #{fctryArea} | |
53 | - , #{bplcSiarUnit} | |
54 | - , #{fctryAreaUnit} | |
55 | - ) | |
56 | - </insert> | |
57 | - | |
58 | - <!-- | |
59 | - 작 성 자 : 박정하 | |
60 | - 작 성 일 : 2024.06.10 | |
61 | - 내 용 : 기업주요사업장 수정 | |
62 | - --> | |
63 | - <update id="bplcUpdate" parameterType="BplcVO"> | |
64 | - UPDATE ent_main_bplc | |
65 | - SET wrkr_cnt = #{wrkrCnt} | |
66 | - , bplc_addr = #{bplcAddr} | |
67 | - , use_yn = #{useYn} | |
68 | - , mdfr = #{mdfr} | |
69 | - , mdfcn_dt = now() | |
70 | - , bplc_nm = #{bplcNm} | |
71 | - , main_prdt = #{mainPrdt} | |
72 | - , bplc_siar = #{bplcSiar} | |
73 | - , fctry_area = #{fctryArea} | |
74 | - , bplc_siar_unit = #{bplcSiarUnit} | |
75 | - , fctry_area_unit = #{fctryAreaUnit} | |
76 | - WHERE bplc_id = #{bplcId} | |
77 | - </update> | |
78 | - | |
79 | - <!-- | |
80 | - 작 성 자 : 박정하 | |
81 | - 작 성 일 : 2024.06.10 | |
82 | - 내 용 : 기업주요사업장 삭제 | |
83 | - --> | |
84 | - <update id="bplcUpdateByEntInfoId" parameterType="EntInfoVO"> | |
85 | - UPDATE ent_main_bplc | |
86 | - SET use_yn = 'N', | |
87 | - mdfr = #{mdfr}, | |
88 | - mdfcn_dt = now() | |
89 | - WHERE ent_id = #{entId} | |
90 | - </update> | |
91 | -</mapper>(No newline at end of file) |
--- src/main/resources/mybatis/mapper/entInfo/entInfo-SQL.xml
... | ... | @@ -1,417 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | -<mapper namespace="com.takensoft.portal.entInfo.dao.EntInfoDAO"> | |
4 | - <!-- 기업정보 resultMap --> | |
5 | - <resultMap id="entInfoMap" type="EntInfoVO"> | |
6 | - <result property="entId" column="ent_id" /> | |
7 | - <result property="entNm" column="ent_nm" /> | |
8 | - <result property="brno" column="brno" /> | |
9 | - <result property="rprsvNm" column="rprsv_nm" /> | |
10 | - <result property="lctnAdmdsp" column="lctn_admdsp" /> | |
11 | - <result property="lctnSsg" column="lctn_ssg" /> | |
12 | - <result property="bplcSiar" column="bplc_siar" /> | |
13 | - <result property="bplcSiarUnit" column="bplc_siar_unit" /> | |
14 | - <result property="fctryArea" column="fctry_area" /> | |
15 | - <result property="fctryAreaUnit" column="fctry_area_unit" /> | |
16 | - <result property="ksicUpCd" column="ksic_up_cd" /> | |
17 | - <result property="ksicCd" column="ksic_cd" /> | |
18 | - <result property="ksicNm" column="ksic_nm" /> | |
19 | - <result property="mainPrdct" column="main_prdct" /> | |
20 | - <result property="entCrdt" column="ent_crdt" /> | |
21 | - <result property="fndnDt" column="fndn_dt" /> | |
22 | - <result property="wrkrCnt" column="wrkr_cnt" /> | |
23 | - <result property="rmrk" column="rmrk" /> | |
24 | - <result property="useYn" column="use_yn" /> | |
25 | - <result property="rgtr" column="rgtr" /> | |
26 | - <result property="regDt" column="reg_dt" /> | |
27 | - <result property="mdfr" column="mdfr" /> | |
28 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
29 | - <result property="mvnInten" column="mvn_inten" /> | |
30 | - <result property="mouInten" column="mou_inten" /> | |
31 | - <result property="fileMngId" column="file_mng_id" /> | |
32 | - <collection property="bplcList" column="{entId = ent_id}" javaType="java.util.ArrayList" ofType="BplcVO" select="selectBplcList" /> | |
33 | - </resultMap> | |
34 | - | |
35 | - <!-- 기업주요사업장 resultMap --> | |
36 | - <resultMap id="bplcMap" type="BplcVO"> | |
37 | - <result property="bplcId" column="bplc_id" /> | |
38 | - <result property="entId" column="ent_id" /> | |
39 | - <result property="wrkrCnt" column="wrkr_cnt" /> | |
40 | - <result property="bplcAddr" column="bplc_addr" /> | |
41 | - <result property="useYn" column="use_yn" /> | |
42 | - <result property="rgtr" column="rgtr" /> | |
43 | - <result property="regDt" column="reg_dt" /> | |
44 | - <result property="mdfr" column="mdfr" /> | |
45 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
46 | - <result property="bplcSiarUnit" column="bplc_siar_unit" /> | |
47 | - <result property="fctryAreaUnit" column="fctry_area_unit" /> | |
48 | - </resultMap> | |
49 | - | |
50 | - <!-- | |
51 | - 작 성 자 : 박정하 | |
52 | - 작 성 일 : 2024.03.20 | |
53 | - 내 용 : 기업정보 등록 | |
54 | - --> | |
55 | - <insert id="entInfoInsert" parameterType="EntInfoVO"> | |
56 | - INSERT INTO ent_info ( | |
57 | - ent_id | |
58 | - , ent_nm | |
59 | - , brno | |
60 | - , rprsv_nm | |
61 | - , lctn_admdsp | |
62 | - , lctn_ssg | |
63 | - , bplc_siar | |
64 | - , bplc_siar_unit | |
65 | - , fctry_area | |
66 | - , fctry_area_unit | |
67 | - , ksic_up_cd | |
68 | - , ksic_cd | |
69 | - , ksic_nm | |
70 | - , main_prdct | |
71 | - , ent_crdt | |
72 | - , fndn_dt | |
73 | - , wrkr_cnt | |
74 | - , rmrk | |
75 | - , file_mng_id | |
76 | - , use_yn | |
77 | - , rgtr | |
78 | - , reg_dt | |
79 | - ) VALUES ( | |
80 | - #{entId} | |
81 | - , #{entNm} | |
82 | - , #{brno} | |
83 | - , #{rprsvNm} | |
84 | - , #{lctnAdmdsp} | |
85 | - , #{lctnSsg} | |
86 | - , #{bplcSiar} | |
87 | - , #{bplcSiarUnit} | |
88 | - , #{fctryArea} | |
89 | - , #{fctryAreaUnit} | |
90 | - , #{ksicUpCd} | |
91 | - , #{ksicCd} | |
92 | - , #{ksicNm} | |
93 | - , #{mainPrdct} | |
94 | - , #{entCrdt} | |
95 | - , #{fndnDt}::timestamp | |
96 | - , #{wrkrCnt} | |
97 | - , #{rmrk} | |
98 | - , #{fileMngId} | |
99 | - , 'Y' | |
100 | - , #{rgtr} | |
101 | - , now() | |
102 | - ) | |
103 | - </insert> | |
104 | - | |
105 | - <!-- | |
106 | - 작 성 자 : 박정하 | |
107 | - 작 성 일 : 2024.03.21 | |
108 | - 내 용 : 사업자등록번호 중복 검사 | |
109 | - --> | |
110 | - <select id="selectCntByCheckBrno" resultType="int"> | |
111 | - SELECT count(brno) | |
112 | - FROM ent_info | |
113 | - WHERE use_yn = 'Y' | |
114 | - AND brno = #{brno} | |
115 | - </select> | |
116 | - | |
117 | - <!-- SELECT SQL --> | |
118 | - <sql id="selectItem"> | |
119 | - SELECT ei.ent_id | |
120 | - , ei.ent_nm | |
121 | - , ei.brno | |
122 | - , ei.rprsv_nm | |
123 | - , ei.lctn_admdsp | |
124 | - , ei.lctn_ssg | |
125 | - , ei.bplc_siar | |
126 | - , ei.bplc_siar_unit | |
127 | - , ei.fctry_area | |
128 | - , ei.fctry_area_unit | |
129 | - , ei.ksic_up_cd | |
130 | - , ei.ksic_cd | |
131 | - , ei.ksic_nm | |
132 | - , ei.main_prdct | |
133 | - , ei.ent_crdt | |
134 | - , to_char(ei.fndn_dt, 'YYYY-MM-DD') AS fndn_dt | |
135 | - , ei.wrkr_cnt | |
136 | - , ei.rmrk | |
137 | - , ei.file_mng_id | |
138 | - , ei.use_yn | |
139 | - , ei.rgtr | |
140 | - , to_char(ei.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
141 | - , ei.mdfr | |
142 | - , to_char(ei.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
143 | - , (SELECT mvn_inten <include refid="searchIvstDscsn" />) AS mvn_inten | |
144 | - , (SELECT mou_inten <include refid="searchIvstDscsn" />) AS mou_inten | |
145 | - FROM ent_info AS ei | |
146 | - </sql> | |
147 | - | |
148 | - <sql id="selectRequirement"> | |
149 | - <if test="searchText != null and searchText != ''"> | |
150 | - <choose> | |
151 | - <when test="searchType != null and searchType != ''"> | |
152 | - <if test="searchType == 'ent_nm'"> | |
153 | - AND ent_nm LIKE '%' || #{searchText} || '%' | |
154 | - </if> | |
155 | - <if test="searchType == 'rprsv_nm'"> | |
156 | - AND rprsv_nm LIKE '%' || #{searchText} || '%' | |
157 | - </if> | |
158 | - <if test="searchType == 'brno'"> | |
159 | - AND brno LIKE '%' || #{searchText} || '%' | |
160 | - </if> | |
161 | - </when> | |
162 | - <otherwise> | |
163 | - AND ( ent_nm LIKE '%' || #{searchText} || '%' | |
164 | - OR rprsv_nm LIKE '%' || #{searchText} || '%' | |
165 | - OR brno LIKE '%' || #{searchText} || '%') | |
166 | - </otherwise> | |
167 | - </choose> | |
168 | - </if> | |
169 | - </sql> | |
170 | - <sql id="searchCate"> | |
171 | - <if test="mvnInten != null and mvnInten != ''"> | |
172 | - AND mvn_inten = #{mvnInten} | |
173 | - </if> | |
174 | - <if test="mouInten != null and mouInten != ''"> | |
175 | - AND mou_inten = #{mouInten} | |
176 | - </if> | |
177 | - </sql> | |
178 | - | |
179 | - <sql id="searchIvstDscsn"> | |
180 | - FROM ivst_dscsn AS id | |
181 | - WHERE id.use_yn = 'Y' | |
182 | - AND id.ent_id = ei.ent_id | |
183 | - ORDER BY id.reg_dt DESC | |
184 | - LIMIT 1 | |
185 | - </sql> | |
186 | - | |
187 | - <sql id="selectListInner"> | |
188 | - SELECT ei.ent_id | |
189 | - , ei.ent_nm | |
190 | - , ei.brno | |
191 | - , ei.rprsv_nm | |
192 | - , ei.lctn_admdsp | |
193 | - , ei.lctn_ssg | |
194 | - , ei.bplc_siar | |
195 | - , ei.bplc_siar_unit | |
196 | - , ei.fctry_area | |
197 | - , ei.fctry_area_unit | |
198 | - , ei.ksic_up_cd | |
199 | - , ei.ksic_cd | |
200 | - , ei.ksic_nm | |
201 | - , ei.main_prdct | |
202 | - , ei.ent_crdt | |
203 | - , ei.fndn_dt | |
204 | - , ei.wrkr_cnt | |
205 | - , ei.rmrk | |
206 | - , ei.file_mng_id | |
207 | - , ei.use_yn | |
208 | - , ei.rgtr | |
209 | - , ei.reg_dt | |
210 | - , ei.mdfr | |
211 | - , ei.mdfcn_dt | |
212 | - , (SELECT mvn_inten <include refid="searchIvstDscsn" />) AS mvn_inten | |
213 | - , (SELECT mou_inten <include refid="searchIvstDscsn" />) AS mou_inten | |
214 | - FROM ent_info AS ei | |
215 | - WHERE ei.use_yn = 'Y' | |
216 | - </sql> | |
217 | - | |
218 | - <!-- | |
219 | - 작 성 자 : 박정하 | |
220 | - 작 성 일 : 2024.03.21 | |
221 | - 내 용 : 기업정보 목록 조회 | |
222 | - --> | |
223 | - <select id="entInfoSelectList" parameterType="HashMap" resultMap="entInfoMap"> | |
224 | - SELECT ent_id | |
225 | - , ent_nm | |
226 | - , brno | |
227 | - , rprsv_nm | |
228 | - , lctn_admdsp | |
229 | - , lctn_ssg | |
230 | - , bplc_siar | |
231 | - , bplc_siar_unit | |
232 | - , fctry_area | |
233 | - , fctry_area_unit | |
234 | - , ksic_up_cd | |
235 | - , ksic_cd | |
236 | - , ksic_nm | |
237 | - , main_prdct | |
238 | - , ent_crdt | |
239 | - , to_char(fndn_dt, 'YYYY-MM-DD') AS fndn_dt | |
240 | - , wrkr_cnt | |
241 | - , rmrk | |
242 | - , file_mng_id | |
243 | - , use_yn | |
244 | - , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
245 | - , mdfr | |
246 | - , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
247 | - , mvn_inten | |
248 | - , mou_inten | |
249 | - FROM ( | |
250 | - <include refid="selectListInner" /> | |
251 | - <include refid="selectRequirement" /> | |
252 | - ) AS datas | |
253 | - WHERE TRUE | |
254 | - <include refid="searchCate" /> | |
255 | - ORDER BY ent_id DESC | |
256 | - OFFSET #{limitStart} LIMIT #{recordSize} | |
257 | - </select> | |
258 | - | |
259 | - <!-- | |
260 | - 작 성 자 : 박정하 | |
261 | - 작 성 일 : 2024.03.21 | |
262 | - 내 용 : 기업정보 목록 총 개수 조회 | |
263 | - --> | |
264 | - <select id="entInfoSelectListCount" parameterType="HashMap" resultType="int"> | |
265 | - SELECT count(ent_id) | |
266 | - FROM ( | |
267 | - SELECT ent_id | |
268 | - , (SELECT mvn_inten <include refid="searchIvstDscsn" />) | |
269 | - , (SELECT mou_inten <include refid="searchIvstDscsn" />) | |
270 | - FROM ent_info AS ei | |
271 | - WHERE ei.use_yn = 'Y' | |
272 | - <include refid="selectRequirement" /> | |
273 | - ) AS datas | |
274 | - WHERE TRUE | |
275 | - <include refid="searchCate" /> | |
276 | - </select> | |
277 | - | |
278 | - <!-- | |
279 | - 작 성 자 : 박정하 | |
280 | - 작 성 일 : 2024.03.21 | |
281 | - 내 용 : 기업정보 상세 조회 | |
282 | - --> | |
283 | - <select id="selectEntInfoDetail" parameterType="String" resultMap="entInfoMap"> | |
284 | - <include refid="selectItem" /> | |
285 | - WHERE ei.use_yn = 'Y' | |
286 | - AND ei.ent_id = #{entId} | |
287 | - </select> | |
288 | - | |
289 | - <!-- | |
290 | - 작 성 자 : 박정하 | |
291 | - 작 성 일 : 2024-06-10 | |
292 | - 내 용 : 기업주요사업장 목록 조회 | |
293 | - --> | |
294 | - <select id="selectBplcList" parameterType="BplcVO" resultMap="bplcMap"> | |
295 | - SELECT bplc_id | |
296 | - , ent_id | |
297 | - , wrkr_cnt | |
298 | - , bplc_addr | |
299 | - , use_yn | |
300 | - , rgtr | |
301 | - , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
302 | - , mdfr | |
303 | - , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
304 | - , bplc_nm | |
305 | - , main_prdt | |
306 | - , bplc_siar | |
307 | - , fctry_area | |
308 | - , bplc_siar_unit | |
309 | - , fctry_area_unit | |
310 | - FROM ent_main_bplc | |
311 | - WHERE use_yn = #{useYn} | |
312 | - AND ent_id = #{entId} | |
313 | - ORDER BY bplc_id | |
314 | - </select> | |
315 | - | |
316 | - <!-- | |
317 | - 작 성 자 : 박정하 | |
318 | - 작 성 일 : 2024.03.22 | |
319 | - 내 용 : 기업정보 수정 | |
320 | - --> | |
321 | - <update id="entInfoUpdate" parameterType="EntInfoVO"> | |
322 | - UPDATE ent_info | |
323 | - SET ent_nm = #{entNm} | |
324 | - , brno = #{brno} | |
325 | - , rprsv_nm = #{rprsvNm} | |
326 | - , lctn_admdsp = #{lctnAdmdsp} | |
327 | - , lctn_ssg = #{lctnSsg} | |
328 | - , bplc_siar = #{bplcSiar} | |
329 | - , bplc_siar_unit = #{bplcSiarUnit} | |
330 | - , fctry_area = #{fctryArea} | |
331 | - , fctry_area_unit = #{fctryAreaUnit} | |
332 | - , ksic_up_cd = #{ksicUpCd} | |
333 | - , ksic_cd = #{ksicCd} | |
334 | - , ksic_nm = #{ksicNm} | |
335 | - , main_prdct = #{mainPrdct} | |
336 | - , ent_crdt = #{entCrdt} | |
337 | - , fndn_dt = #{fndnDt}::timestamp | |
338 | - , wrkr_cnt = #{wrkrCnt} | |
339 | - , rmrk = #{rmrk} | |
340 | - , file_mng_id = #{fileMngId} | |
341 | - , mdfr = #{mdfr} | |
342 | - , mdfcn_dt = now() | |
343 | - WHERE ent_id = #{entId} | |
344 | - </update> | |
345 | - | |
346 | - <!-- | |
347 | - 작 성 자 : 박정하 | |
348 | - 작 성 일 : 2024.03.22 | |
349 | - 내 용 : 기업정보 삭제 | |
350 | - --> | |
351 | - <update id="entInfoDelete" parameterType="EntInfoVO"> | |
352 | - UPDATE ent_info | |
353 | - SET use_yn = 'N', | |
354 | - mdfr = #{mdfr}, | |
355 | - mdfcn_dt = now() | |
356 | - WHERE ent_id = #{entId} | |
357 | - </update> | |
358 | - | |
359 | - <!-- | |
360 | - 작 성 자 : 박정하 | |
361 | - 작 성 일 : 2024.05.13 | |
362 | - 내 용 : 팝업 목록 조회 | |
363 | - --> | |
364 | - <select id="selectCompanyInfoListByNew" resultMap="entInfoMap"> | |
365 | - <include refid="selectItem" /> | |
366 | - WHERE ei.use_yn = 'Y' | |
367 | - ORDER BY ei.reg_dt DESC | |
368 | - LIMIT 5 | |
369 | - </select> | |
370 | - | |
371 | - <!-- | |
372 | - 작 성 자 : 박정하 | |
373 | - 작 성 일 : 2024.06.26 | |
374 | - 내 용 : 기업정보 목록 조회 (엑셀 다운로드 용) | |
375 | - --> | |
376 | - <select id="entInfoSelectListAll" parameterType="HashMap" resultType="HashMap"> | |
377 | - SELECT ent_nm | |
378 | - , brno | |
379 | - , rprsv_nm | |
380 | - , (SELECT cd_nm FROM cd_mng WHERE cd = lctn_admdsp) || ' ' || lctn_ssg AS lctn | |
381 | - , bplc_siar || (SELECT cd_nm FROM cd_mng WHERE cd = bplc_siar_unit) AS bplc_siar | |
382 | - , fctry_area || (SELECT cd_nm FROM cd_mng WHERE cd = fctry_area_unit) AS fctry_area | |
383 | - , '(' || ksic_up_cd || ksic_cd || ') ' || ksic_nm AS ksic | |
384 | - , main_prdct | |
385 | - , ent_crdt | |
386 | - , to_char(fndn_dt, 'YYYY-MM-DD') AS fndn_dt | |
387 | - , wrkr_cnt || '' AS wrkr_cnt | |
388 | - , mvn_inten | |
389 | - , mou_inten | |
390 | - , rmrk | |
391 | - FROM (<include refid="selectListInner" />) AS datas | |
392 | - WHERE TRUE | |
393 | - <if test="mvnInten != null and mvnInten != ''"> | |
394 | - AND mvn_inten = #{mvnInten} | |
395 | - </if> | |
396 | - <if test="mouInten != null and mouInten != ''"> | |
397 | - AND mou_inten = #{mouInten} | |
398 | - </if> | |
399 | - <if test="ksicUpCd != null and ksicUpCd != ''"> | |
400 | - AND ksic_up_cd = #{ksicUpCd} | |
401 | - </if> | |
402 | - ORDER BY ent_nm | |
403 | - </select> | |
404 | - | |
405 | - <!-- | |
406 | - 작 성 자 : 박정하 | |
407 | - 작 성 일 : 2024.06.26 | |
408 | - 내 용 : 상위업종코드 목록 조회 (엑셀 다운로드 용) | |
409 | - --> | |
410 | - <select id="ksicUpCdList" parameterType="String" resultType="String"> | |
411 | - SELECT ksic_up_cd | |
412 | - FROM ent_info | |
413 | - WHERE use_yn = 'Y' | |
414 | - GROUP BY ksic_up_cd | |
415 | - ORDER BY ksic_up_cd | |
416 | - </select> | |
417 | -</mapper>(No newline at end of file) |
--- src/main/resources/mybatis/mapper/invtDscsn/invtDscsn-SQL.xml
... | ... | @@ -1,246 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | -<mapper namespace="com.takensoft.portal.ivstDscsn.dao.IvstDscsnDAO"> | |
4 | - <!-- 투자상담 resultMap --> | |
5 | - <resultMap id="ivstDscsnMap" type="IvstDscsnVO"> | |
6 | - <result property="ivstDscsnId" column="ivst_dscsn_id" /> | |
7 | - <result property="entId" column="ent_id" /> | |
8 | - <result property="ttl" column="ttl" /> | |
9 | - <result property="dt" column="dt" /> | |
10 | - <result property="plc" column="plc" /> | |
11 | - <result property="prtpnt" column="prtpnt" /> | |
12 | - <result property="dscsnPbofc" column="dscsn_pbofc" /> | |
13 | - <result property="mainCn" column="main_cn" /> | |
14 | - <result property="fileMngId" column="file_mng_id" /> | |
15 | - <result property="mvnInten" column="mvn_inten" /> | |
16 | - <result property="mouInten" column="mou_inten" /> | |
17 | - <result property="dscsnOtln" column="dscsn_otln" /> | |
18 | - <result property="useYn" column="use_yn" /> | |
19 | - <result property="rgtr" column="rgtr" /> | |
20 | - <result property="regDt" column="reg_dt" /> | |
21 | - <result property="mdfr" column="mdfr" /> | |
22 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
23 | - <result property="entNm" column="ent_nm" /> | |
24 | - </resultMap> | |
25 | - | |
26 | - <!-- | |
27 | - 작성자 : 박정하 | |
28 | - 작성일자 : 2024-03-20 | |
29 | - 내용 : 투자상담 등록 | |
30 | - --> | |
31 | - <insert id="ivstDscsnInsert" parameterType="IvstDscsnVO"> | |
32 | - INSERT INTO ivst_dscsn ( | |
33 | - ivst_dscsn_id | |
34 | - , ent_id | |
35 | - , ttl | |
36 | - , dt | |
37 | - , plc | |
38 | - , prtpnt | |
39 | - , dscsn_pbofc | |
40 | - , main_cn | |
41 | - , file_mng_id | |
42 | - , mvn_inten | |
43 | - , mou_inten | |
44 | - , dscsn_otln | |
45 | - , use_yn | |
46 | - , rgtr | |
47 | - , reg_dt | |
48 | - ) VALUES ( | |
49 | - #{ivstDscsnId} | |
50 | - , #{entId} | |
51 | - , #{ttl} | |
52 | - , #{dt}::timestamp | |
53 | - , #{plc} | |
54 | - , #{prtpnt} | |
55 | - , #{dscsnPbofc} | |
56 | - , #{mainCn} | |
57 | - , #{fileMngId} | |
58 | - , #{mvnInten} | |
59 | - , #{mouInten} | |
60 | - , #{dscsnOtln} | |
61 | - , 'Y' | |
62 | - , #{rgtr} | |
63 | - , now() | |
64 | - ) | |
65 | - </insert> | |
66 | - | |
67 | - <!-- SELECT SQL --> | |
68 | - <sql id="selectItem"> | |
69 | - SELECT id.ivst_dscsn_id | |
70 | - , id.ent_id | |
71 | - , id.ttl | |
72 | - , to_char(id.dt, 'YYYY-MM-DD') AS dt | |
73 | - , id.plc | |
74 | - , id.prtpnt | |
75 | - , id.dscsn_pbofc | |
76 | - , id.main_cn | |
77 | - , id.file_mng_id | |
78 | - , id.mvn_inten | |
79 | - , id.mou_inten | |
80 | - , id.dscsn_otln | |
81 | - , id.use_yn | |
82 | - , id.rgtr | |
83 | - , to_char(id.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
84 | - , id.mdfr | |
85 | - , to_char(id.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
86 | - , ei.ent_nm | |
87 | - from ivst_dscsn AS id | |
88 | - LEFT JOIN ent_info AS ei | |
89 | - ON id.ent_id = ei.ent_id | |
90 | - </sql> | |
91 | - | |
92 | - <sql id="selectRequirement"> | |
93 | - <if test="searchText != null and searchText != ''"> | |
94 | - <choose> | |
95 | - <when test="searchType != null and searchType != ''"> | |
96 | - <if test="searchType == 'ent_nm'"> | |
97 | - AND ei.ent_nm LIKE '%' || #{searchText} || '%' | |
98 | - </if> | |
99 | - <if test="searchType == 'ttl'"> | |
100 | - AND id.ttl LIKE '%' || #{searchText} || '%' | |
101 | - </if> | |
102 | - </when> | |
103 | - <otherwise> | |
104 | - AND ( | |
105 | - ei.ent_nm LIKE '%' || #{searchText} || '%' | |
106 | - OR | |
107 | - id.ttl LIKE '%' || #{searchText} || '%' | |
108 | - ) | |
109 | - </otherwise> | |
110 | - </choose> | |
111 | - </if> | |
112 | - <if test="cateId == 'ent_id' and cateValue != null and cateValue != ''"> | |
113 | - AND ei.ent_id = #{cateValue} | |
114 | - </if> | |
115 | - <if test="mvnInten != null and mvnInten != ''"> | |
116 | - AND id.mvn_inten = #{mvnInten} | |
117 | - </if> | |
118 | - <if test="mouInten != null and mouInten != ''"> | |
119 | - AND id.mou_inten = #{mouInten} | |
120 | - </if> | |
121 | - </sql> | |
122 | - | |
123 | - <!-- | |
124 | - 작성자 : 박정하 | |
125 | - 작성일자 : 2024-03-26 | |
126 | - 내용 : 투자상담 목록 조회 | |
127 | - --> | |
128 | - <select id="ivstDscsnList" resultMap="ivstDscsnMap"> | |
129 | - SELECT id.ivst_dscsn_id | |
130 | - , ei.ent_nm | |
131 | - , id.ent_id | |
132 | - , id.ttl | |
133 | - , id.dt | |
134 | - , id.plc | |
135 | - , id.prtpnt | |
136 | - , id.dscsn_pbofc | |
137 | - , id.main_cn | |
138 | - , id.file_mng_id | |
139 | - , id.mvn_inten | |
140 | - , id.mou_inten | |
141 | - , id.dscsn_otln | |
142 | - , id.use_yn | |
143 | - , id.rgtr | |
144 | - , to_char(id.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
145 | - , id.mdfr | |
146 | - , to_char(id.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
147 | - FROM ivst_dscsn AS id | |
148 | - LEFT JOIN ent_info AS ei | |
149 | - ON id.ent_id = ei.ent_id | |
150 | - WHERE id.use_yn = 'Y' | |
151 | - <include refid="selectRequirement" /> | |
152 | - ORDER BY id.reg_dt DESC | |
153 | - OFFSET #{limitStart} LIMIT #{recordSize} | |
154 | - </select> | |
155 | - | |
156 | - <!-- | |
157 | - 작성자 : 박정하 | |
158 | - 작성일자 : 2024-03-26 | |
159 | - 내용 : 투자상담 목록 총 개수 조회 | |
160 | - --> | |
161 | - <select id="ivstDscsnListCount" resultType="int"> | |
162 | - SELECT count(*) | |
163 | - FROM ivst_dscsn AS id | |
164 | - LEFT JOIN ent_info AS ei | |
165 | - ON id.ent_id = ei.ent_id | |
166 | - WHERE id.use_yn = 'Y' | |
167 | - <include refid="selectRequirement" /> | |
168 | - </select> | |
169 | - | |
170 | - <!-- | |
171 | - 작 성 자 : 박정하 | |
172 | - 작 성 일 : 2024.03.26 | |
173 | - 내 용 : 투자상담 상세 조회 | |
174 | - --> | |
175 | - <select id="selectIvstDscsnDetail" parameterType="String" resultMap="ivstDscsnMap"> | |
176 | - <include refid="selectItem" /> | |
177 | - WHERE id.use_yn = 'Y' | |
178 | - AND id.ivst_dscsn_id = #{ivstDscsnId} | |
179 | - </select> | |
180 | - | |
181 | - <!-- | |
182 | - 작성자 : 박정하 | |
183 | - 작성일자 : 2024-03-27 | |
184 | - 내용 : 투자상담 수정 | |
185 | - --> | |
186 | - <update id="ivstDscsnUpdate" parameterType="IvstDscsnVO"> | |
187 | - UPDATE ivst_dscsn | |
188 | - SET ent_id = #{entId} | |
189 | - , ttl = #{ttl} | |
190 | - , dt = #{dt}::timestamp | |
191 | - , plc = #{plc} | |
192 | - , prtpnt = #{prtpnt} | |
193 | - , dscsn_pbofc = #{dscsnPbofc} | |
194 | - , main_cn = #{mainCn} | |
195 | - , file_mng_id = #{fileMngId} | |
196 | - , mvn_inten = #{mvnInten} | |
197 | - , mou_inten = #{mouInten} | |
198 | - , dscsn_otln = #{dscsnOtln} | |
199 | - , use_yn = #{useYn} | |
200 | - , mdfr = #{mdfr} | |
201 | - , mdfcn_dt = now() | |
202 | - WHERE ivst_dscsn_id = #{ivstDscsnId} | |
203 | - </update> | |
204 | - | |
205 | - <!-- | |
206 | - 작성자 : 박정하 | |
207 | - 작성일자 : 2024-03-28 | |
208 | - 내용 : 투자상담 최근 1건 조회 | |
209 | - --> | |
210 | - <select id="ivstDscsnByNewOne" parameterType="IvstDscsnVO" resultMap="ivstDscsnMap"> | |
211 | - <include refid="selectItem" /> | |
212 | - where id.use_yn = 'Y' | |
213 | - AND id.ent_id = #{entId} | |
214 | - order by id.reg_dt DESC | |
215 | - LIMIT 1; | |
216 | - </select> | |
217 | - | |
218 | - <!-- | |
219 | - 작성자 : 박정하 | |
220 | - 작성일자 : 2024-06-12 | |
221 | - 내용 : 투자상담 목록 조회 (기업정보 삭제용) | |
222 | - --> | |
223 | - <select id="ivstDscsnListByIvstDscsnId" resultMap="ivstDscsnMap"> | |
224 | - SELECT ivst_dscsn_id | |
225 | - , ent_id | |
226 | - , ttl | |
227 | - , dt | |
228 | - , plc | |
229 | - , prtpnt | |
230 | - , dscsn_pbofc | |
231 | - , main_cn | |
232 | - , file_mng_id | |
233 | - , mvn_inten | |
234 | - , mou_inten | |
235 | - , dscsn_otln | |
236 | - , use_yn | |
237 | - , rgtr | |
238 | - , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
239 | - , mdfr | |
240 | - , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
241 | - FROM ivst_dscsn | |
242 | - WHERE use_yn = 'Y' | |
243 | - AND ent_id = #{ent_Id} | |
244 | - ORDER BY reg_dt DESC | |
245 | - </select> | |
246 | -</mapper>(No newline at end of file) |
--- src/main/resources/mybatis/mapper/main/governmentMain-SQL.xml
... | ... | @@ -1,166 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | - | |
4 | -<!-- | |
5 | - 작 성 자 : 박정하 | |
6 | - 작 성 일 : 2024.05.29 | |
7 | - 내 용 : 메인 통계 관련 | |
8 | ---> | |
9 | -<mapper namespace="com.takensoft.portal.main.dao.GovernmentMainDAO"> | |
10 | - <!-- 공무원 메인페이지 통계정보 관련 --> | |
11 | - <!-- SELECT SQL --> | |
12 | - <sql id="selectItem"> | |
13 | - <if test="searchKeyword != null and searchText != ''"> | |
14 | - <if test="searchKeyword == 'day'"> | |
15 | - , stats_date::DATE AS stats_date | |
16 | - </if> | |
17 | - <if test="searchKeyword == 'month'"> | |
18 | - , to_char(DATE_TRUNC('month', stats_date), 'YYYY-MM') AS stats_date | |
19 | - </if> | |
20 | - <if test="searchKeyword == 'year'"> | |
21 | - , to_char(DATE_TRUNC('year', stats_date), 'YYYY') AS stats_date | |
22 | - </if> | |
23 | - </if> | |
24 | - </sql> | |
25 | - <sql id="groupItem"> | |
26 | - <if test="searchKeyword != null and searchText != ''"> | |
27 | - GROUP BY true::boolean | |
28 | - <if test="searchKeyword == 'day'"> | |
29 | - , stats_date::DATE | |
30 | - </if> | |
31 | - <if test="searchKeyword == 'month'"> | |
32 | - , to_char(DATE_TRUNC('month', stats_date), 'YYYY-MM') | |
33 | - </if> | |
34 | - <if test="searchKeyword == 'year'"> | |
35 | - , to_char(DATE_TRUNC('year', stats_date), 'YYYY') | |
36 | - </if> | |
37 | - </if> | |
38 | - </sql> | |
39 | - <!-- | |
40 | - 작 성 자 : 박정하 | |
41 | - 작 성 일 : 2024.06.03 | |
42 | - 내 용 : 공무원 메인페이지 통계정보 조회 : 분류별 통계 | |
43 | - --> | |
44 | - <select id="selectCategoryStats" parameterType="HashMap"> | |
45 | - SELECT sum(ei_cnt) AS "새 기업정보 수" | |
46 | - , sum(eda_cnt) AS "새 기업상담신청 수" | |
47 | - , sum(rm_cnt) AS "새 검토사항 수" | |
48 | - , sum(id_cnt) AS "새 투자상담 수" | |
49 | - <include refid="selectItem" /> | |
50 | - FROM ( | |
51 | - SELECT generate_series AS stats_date | |
52 | - , COALESCE(ei.count, 0) AS ei_cnt | |
53 | - , COALESCE(eda.count, 0) AS eda_cnt | |
54 | - , COALESCE(rm.count, 0) AS rm_cnt | |
55 | - , COALESCE(id.count, 0) AS id_cnt | |
56 | - FROM (SELECT GENERATE_SERIES( | |
57 | - <if test="searchKeyword != null and searchText != ''"> | |
58 | - <if test="searchKeyword == 'day'"> | |
59 | - (now() + '-30 days')::DATE | |
60 | - </if> | |
61 | - <if test="searchKeyword == 'month'"> | |
62 | - (now() + '-1 year')::DATE | |
63 | - </if> | |
64 | - <if test="searchKeyword == 'year'">( | |
65 | - select MIN(min) | |
66 | - from ( | |
67 | - (select MIN(reg_dt)::DATE FROM ent_info WHERE use_yn = 'Y') union all | |
68 | - (select MIN(reg_dt)::DATE FROM ent_dscsn_aply WHERE use_yn = 'Y') union all | |
69 | - (select MIN(reg_dt)::DATE FROM rvw_mttr WHERE use_yn = 'Y') union all | |
70 | - (select MIN(reg_dt)::DATE FROM ivst_dscsn WHERE use_yn = 'Y') | |
71 | - ) as since | |
72 | - ) | |
73 | - </if> | |
74 | - </if> | |
75 | - , NOW(), '1 day'::INTERVAL)::date) AS date | |
76 | - LEFT JOIN (SELECT reg_dt::DATE, COUNT(ent_id) FROM ent_info WHERE use_yn = 'Y' GROUP BY reg_dt::DATE) AS ei | |
77 | - ON date.generate_series = ei.reg_dt | |
78 | - LEFT JOIN (SELECT reg_dt::DATE, COUNT(ent_dscsn_aply_id) FROM ent_dscsn_aply WHERE use_yn = 'Y' GROUP BY reg_dt::DATE) AS eda | |
79 | - ON date.generate_series = eda.reg_dt | |
80 | - LEFT JOIN (SELECT reg_dt::DATE, COUNT(rvw_mttr_id) FROM rvw_mttr WHERE use_yn = 'Y' GROUP BY reg_dt::DATE) AS rm | |
81 | - ON date.generate_series = rm.reg_dt | |
82 | - LEFT JOIN (SELECT reg_dt::DATE, COUNT(ivst_dscsn_id) FROM ivst_dscsn WHERE use_yn = 'Y' GROUP BY reg_dt::DATE) AS id | |
83 | - ON date.generate_series = id.reg_dt | |
84 | - ORDER BY date.generate_series | |
85 | - ) AS datas | |
86 | - <include refid="groupItem" /> | |
87 | - ORDER BY stats_date | |
88 | - </select> | |
89 | - | |
90 | - <!-- | |
91 | - 작 성 자 : 박정하 | |
92 | - 작 성 일 : 2024.06.03 | |
93 | - 내 용 : 공무원 메인페이지 통계정보 조회 : 상담신청 통계 | |
94 | - --> | |
95 | - <select id="selectEntDscsnAplyStats" parameterType="HashMap"> | |
96 | - SELECT SUM(coalesce) AS "새 상담신청 수" | |
97 | - <include refid="selectItem" /> | |
98 | - FROM ( | |
99 | - SELECT stats_date | |
100 | - , COALESCE(eda.count, 0) | |
101 | - FROM (SELECT GENERATE_SERIES::DATE AS stats_date | |
102 | - FROM GENERATE_SERIES( | |
103 | - <if test="searchKeyword != null and searchText != ''"> | |
104 | - <if test="searchKeyword == 'day'"> | |
105 | - (now() + '-30 days')::DATE | |
106 | - </if> | |
107 | - <if test="searchKeyword == 'month'"> | |
108 | - (now() + '-1 year')::DATE | |
109 | - </if> | |
110 | - <if test="searchKeyword == 'year'"> | |
111 | - (select MIN(reg_dt) FROM ent_dscsn_aply WHERE use_yn = 'Y') | |
112 | - </if> | |
113 | - </if> | |
114 | - , NOW()::DATE, '1 day'::INTERVAL)) as date | |
115 | - LEFT JOIN ( | |
116 | - SELECT COUNT(ent_dscsn_aply_id) | |
117 | - , reg_dt::DATE AS reg_dt | |
118 | - FROM ent_dscsn_aply | |
119 | - WHERE use_yn = 'Y' | |
120 | - GROUP BY reg_dt::DATE | |
121 | - ) AS eda | |
122 | - ON date.stats_date = eda.reg_dt | |
123 | - ORDER BY stats_date) AS datas | |
124 | - <include refid="groupItem" /> | |
125 | - ORDER BY stats_date | |
126 | - </select> | |
127 | - | |
128 | - <!-- | |
129 | - 작 성 자 : 박정하 | |
130 | - 작 성 일 : 2024.06.03 | |
131 | - 내 용 : 공무원 메인페이지 통계정보 조회 : 검토사항 통계 | |
132 | - --> | |
133 | - <select id="selectRvwMttrStats" parameterType="HashMap"> | |
134 | - SELECT SUM(coalesce) AS "새 검토사항 수" | |
135 | - <include refid="selectItem" /> | |
136 | - FROM ( | |
137 | - SELECT stats_date | |
138 | - , COALESCE(eda.count, 0) | |
139 | - FROM (SELECT GENERATE_SERIES::DATE AS stats_date | |
140 | - FROM GENERATE_SERIES( | |
141 | - <if test="searchKeyword != null and searchText != ''"> | |
142 | - <if test="searchKeyword == 'day'"> | |
143 | - (now() + '-30 days')::DATE | |
144 | - </if> | |
145 | - <if test="searchKeyword == 'month'"> | |
146 | - (now() + '-1 year')::DATE | |
147 | - </if> | |
148 | - <if test="searchKeyword == 'year'"> | |
149 | - (select MIN(reg_dt) FROM ent_dscsn_aply WHERE use_yn = 'Y') | |
150 | - </if> | |
151 | - </if> | |
152 | - , NOW()::DATE, '1 day'::INTERVAL)) as date | |
153 | - LEFT JOIN ( | |
154 | - SELECT COUNT(rvw_mttr_id) | |
155 | - , reg_dt::DATE AS reg_dt | |
156 | - FROM rvw_mttr | |
157 | - WHERE use_yn = 'Y' | |
158 | - GROUP BY reg_dt::DATE | |
159 | - ) AS eda | |
160 | - ON date.stats_date = eda.reg_dt | |
161 | - ORDER BY stats_date) AS datas | |
162 | - <include refid="groupItem" /> | |
163 | - ORDER BY stats_date | |
164 | - </select> | |
165 | - <!-- // 공무원 메인페이지 통계정보 관련 --> | |
166 | -</mapper>(No newline at end of file) |
--- src/main/resources/mybatis/mapper/rvwMttr/rvwMttr-SQL.xml
... | ... | @@ -1,294 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | -<!-- | |
4 | - 작성자 : 박정하 | |
5 | - 작성일 : 2024.03.29 | |
6 | - 내 용 : 검토사항 관련 | |
7 | ---> | |
8 | -<mapper namespace="com.takensoft.portal.rvwMttr.dao.RvwMttrDAO"> | |
9 | - <!-- 검토사항 resultMap --> | |
10 | - <resultMap id="rvwMttrMap" type="RvwMttrVO"> | |
11 | - <result property="rvwMttrId" column="rvw_mttr_id" /> | |
12 | - <result property="ivstDscsnId" column="ivst_dscsn_id" /> | |
13 | - <result property="type" column="type" /> | |
14 | - <result property="clr" column="clr" /> | |
15 | - <result property="rcptDt" column="rcpt_dt" /> | |
16 | - <result property="rcptCn" column="rcpt_cn" /> | |
17 | - <result property="useYn" column="use_yn" /> | |
18 | - <result property="rgtr" column="rgtr" /> | |
19 | - <result property="regDt" column="reg_dt" /> | |
20 | - <result property="mdfr" column="mdfr" /> | |
21 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
22 | - <result property="entId" column="ent_Id" /> | |
23 | - <result property="entNm" column="ent_nm" /> | |
24 | - <result property="ttl" column="ttl" /> | |
25 | - <result property="clrNm" column="clr_nm" /> | |
26 | - <result property="nowPrgrsCrs" column="now_prgrs_crs" /> | |
27 | - <result property="fileMngId" column="file_mng_id" /> | |
28 | - <result property="mainCn" column="main_cn" /> | |
29 | - <collection property="prgrsList" column="{rvwMttrId = rvw_mttr_id}" javaType="java.util.ArrayList" ofType="RvwMttrPrgrsVO" select="selectRvwMttrPrgrsList" /> | |
30 | - </resultMap> | |
31 | - | |
32 | - <!-- 검토사항진행 resultMap --> | |
33 | - <resultMap id="rvwMttrPrgrsMap" type="RvwMttrPrgrsVO"> | |
34 | - <result property="rvwMttrPrgrsId" column="rvw_mttr_prgrs_id" /> | |
35 | - <result property="rvwMttrId" column="rvw_mttr_id" /> | |
36 | - <result property="picId" column="pic_id" /> | |
37 | - <result property="prgrsCrs" column="prgrs_crs" /> | |
38 | - <result property="prgrsDt" column="prgrs_dt" /> | |
39 | - <result property="sprtMthd" column="sprt_mthd" /> | |
40 | - <result property="rgtr" column="rgtr" /> | |
41 | - <result property="regDt" column="reg_dt" /> | |
42 | - <result property="mdfr" column="mdfr" /> | |
43 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
44 | - <result property="picNm" column="pic_nm" /> | |
45 | - </resultMap> | |
46 | - | |
47 | - <!-- | |
48 | - 작성자 : 박정하 | |
49 | - 작성일자 : 2024-03-29 | |
50 | - 내용 : 검토사항 등록 | |
51 | - --> | |
52 | - <insert id="rvwMttrInsert" parameterType="RvwMttrVO"> | |
53 | - INSERT INTO rvw_mttr ( | |
54 | - rvw_mttr_id | |
55 | - , ivst_dscsn_id | |
56 | - , type | |
57 | - , clr | |
58 | - , rcpt_dt | |
59 | - , rcpt_cn | |
60 | - , use_yn | |
61 | - , rgtr | |
62 | - , reg_dt | |
63 | - , file_mng_id | |
64 | - ) VALUES ( | |
65 | - #{rvwMttrId} | |
66 | - , #{ivstDscsnId} | |
67 | - , #{type} | |
68 | - , #{clr} | |
69 | - , #{rcptDt}::timestamp | |
70 | - , #{rcptCn} | |
71 | - , 'Y' | |
72 | - , #{rgtr} | |
73 | - , now() | |
74 | - , #{fileMngId} | |
75 | - ) | |
76 | - </insert> | |
77 | - | |
78 | - <!-- 검색 조건 --> | |
79 | - <sql id="selectRequirement"> | |
80 | - <if test="searchText != null and searchText != ''"> | |
81 | - <choose> | |
82 | - <when test="searchType != null and searchType != ''"> | |
83 | - <if test="searchType == 'ent_nm'"> | |
84 | - AND ei.ent_nm LIKE '%' || #{searchText} || '%' | |
85 | - </if> | |
86 | - <if test="searchType == 'ttl'"> | |
87 | - AND id.ttl LIKE '%' || #{searchText} || '%' | |
88 | - </if> | |
89 | - </when> | |
90 | - <otherwise> | |
91 | - AND ( | |
92 | - ei.ent_nm LIKE '%' || #{searchText} || '%' | |
93 | - OR | |
94 | - id.ttl LIKE '%' || #{searchText} || '%' | |
95 | - ) | |
96 | - </otherwise> | |
97 | - </choose> | |
98 | - </if> | |
99 | - <if test="cateId == 'ivst_dscsn_id' and cateValue != null and cateValue != ''"> | |
100 | - AND rm.ivst_dscsn_id = #{cateValue} | |
101 | - </if> | |
102 | - <if test="type != null and type != ''"> | |
103 | - AND rm.type = #{type} | |
104 | - </if> | |
105 | - </sql> | |
106 | - | |
107 | - <!-- | |
108 | - 작성자 : 박정하 | |
109 | - 작성일자 : 2024-03-29 | |
110 | - 내용 : 검토사항 목록 조회 | |
111 | - --> | |
112 | - <select id="rvwMttrSelectList" resultMap="rvwMttrMap"> | |
113 | - SELECT | |
114 | - rvw_mttr_id | |
115 | - , ivst_dscsn_id | |
116 | - , type | |
117 | - , clr | |
118 | - , to_char(rcpt_dt, 'YYYY-MM-DD HH24:MI') AS rcpt_dt | |
119 | - , rcpt_cn | |
120 | - , use_yn | |
121 | - , rgtr | |
122 | - , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
123 | - , mdfr | |
124 | - , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
125 | - , ttl | |
126 | - , ent_id | |
127 | - , ent_nm | |
128 | - , now_prgrs_crs | |
129 | - , file_mng_id | |
130 | - FROM ( | |
131 | - SELECT rm.rvw_mttr_id | |
132 | - , rm.ivst_dscsn_id | |
133 | - , rm.type | |
134 | - , rm.clr | |
135 | - , rm.rcpt_dt | |
136 | - , rm.rcpt_cn | |
137 | - , rm.use_yn | |
138 | - , rm.rgtr | |
139 | - , rm.reg_dt | |
140 | - , rm.mdfr | |
141 | - , rm.mdfcn_dt | |
142 | - , id.ttl | |
143 | - , ei.ent_id | |
144 | - , ei.ent_nm | |
145 | - , (select rmp.prgrs_crs | |
146 | - from rvw_mttr_prgrs AS rmp | |
147 | - where rmp.rvw_mttr_id = rm.rvw_mttr_id | |
148 | - order by rmp.reg_dt DESC | |
149 | - limit 1 ) AS now_prgrs_crs | |
150 | - , rm.file_mng_id | |
151 | - FROM rvw_mttr AS rm | |
152 | - LEFT JOIN ivst_dscsn AS id | |
153 | - ON rm.ivst_dscsn_id = id.ivst_dscsn_id | |
154 | - LEFT JOIN ent_info AS ei | |
155 | - ON id.ent_id = ei.ent_id | |
156 | - WHERE rm.use_yn = 'Y' | |
157 | - <include refid="selectRequirement" /> | |
158 | - ) AS datas | |
159 | - WHERE TRUE | |
160 | - <if test="prgrsCrs != null and prgrsCrs != ''"> | |
161 | - AND now_prgrs_crs = #{prgrsCrs} | |
162 | - </if> | |
163 | - ORDER BY rvw_mttr_id DESC | |
164 | - OFFSET #{limitStart} LIMIT #{recordSize} | |
165 | - </select> | |
166 | - | |
167 | - <!-- | |
168 | - 작성자 : 박정하 | |
169 | - 작성일자 : 2024-03-29 | |
170 | - 내용 : 검토사항 목록 총 개수 조회 | |
171 | - --> | |
172 | - <select id="rvwMttrSelectListCount" resultType="int"> | |
173 | - SELECT count(*) | |
174 | - FROM rvw_mttr AS rm | |
175 | - LEFT JOIN ivst_dscsn AS id | |
176 | - ON rm.ivst_dscsn_id = id.ivst_dscsn_id | |
177 | - LEFT JOIN ent_info AS ei | |
178 | - ON id.ent_id = ei.ent_id | |
179 | - WHERE rm.use_yn = 'Y' | |
180 | - <include refid="selectRequirement" /> | |
181 | - </select> | |
182 | - | |
183 | - <!-- | |
184 | - 작 성 자 : 박정하 | |
185 | - 작 성 일 : 2024-06-04 | |
186 | - 내 용 : 검토사항 상세 조회 | |
187 | - --> | |
188 | - <select id="selectRvwMttrDetail" parameterType="String" resultMap="rvwMttrMap"> | |
189 | - SELECT rm.rvw_mttr_id | |
190 | - , rm.type | |
191 | - , rm.clr | |
192 | - , to_char(rm.rcpt_dt, 'YYYY-MM-DD') AS rcpt_dt | |
193 | - , rm.rcpt_cn | |
194 | - , rm.use_yn | |
195 | - , rm.rgtr | |
196 | - , to_char(rm.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
197 | - , rm.mdfr | |
198 | - , to_char(rm.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
199 | - , rm.ivst_dscsn_id | |
200 | - , ei.ent_id | |
201 | - , ei.ent_nm | |
202 | - , id.ttl | |
203 | - , mi.mbr_nm AS clr_nm | |
204 | - , rm.file_mng_id | |
205 | - , id.main_cn | |
206 | - FROM rvw_mttr AS rm | |
207 | - LEFT JOIN ivst_dscsn AS id | |
208 | - ON rm.ivst_dscsn_id = id.ivst_dscsn_id | |
209 | - LEFT JOIN ent_info AS ei | |
210 | - ON id.ent_id = ei.ent_id | |
211 | - LEFT JOIN mbr_info AS mi | |
212 | - ON rm.clr = mi.mbr_id | |
213 | - WHERE rm.use_yn = 'Y' | |
214 | - AND rm.rvw_mttr_id = #{rvwMttrId} | |
215 | - </select> | |
216 | - | |
217 | - <!-- | |
218 | - 작 성 자 : 박정하 | |
219 | - 작 성 일 : 2024-06-04 | |
220 | - 내 용 : 검토사항진행 목록 조회 | |
221 | - --> | |
222 | - <select id="selectRvwMttrPrgrsList" parameterType="RvwMttrVO" resultMap="rvwMttrPrgrsMap"> | |
223 | - SELECT rmp.rvw_mttr_prgrs_id | |
224 | - , rmp.rvw_mttr_id | |
225 | - , rmp.pic_id | |
226 | - , mi.mbr_nm AS pic_nm | |
227 | - , rmp.prgrs_crs | |
228 | - , to_char(rmp.prgrs_dt, 'YYYY-MM-DD') AS prgrs_dt | |
229 | - , rmp.sprt_mthd | |
230 | - , rmp.rgtr | |
231 | - , to_char(rmp.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
232 | - , rmp.mdfr | |
233 | - , to_char(rmp.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
234 | - FROM rvw_mttr_prgrs AS rmp | |
235 | - LEFT JOIN mbr_info AS mi | |
236 | - ON rmp.pic_id = mi.mbr_id | |
237 | - WHERE rmp.rvw_mttr_id = #{rvwMttrId} | |
238 | - ORDER BY prgrs_dt, rvw_mttr_prgrs_id | |
239 | - </select> | |
240 | - | |
241 | - <!-- | |
242 | - 작 성 자 : 박정하 | |
243 | - 작 성 일 : 2024.04.01 | |
244 | - 내 용 : 검토사항 수정 | |
245 | - --> | |
246 | - <update id="rvwMttrUpdate" parameterType="RvwMttrVO"> | |
247 | - UPDATE rvw_mttr | |
248 | - SET ivst_dscsn_id = #{ivstDscsnId} | |
249 | - , type = #{type} | |
250 | - , clr = #{clr} | |
251 | - , rcpt_dt = #{rcptDt}::timestamp | |
252 | - , rcpt_cn = #{rcptCn} | |
253 | - , use_yn = #{useYn} | |
254 | - , mdfr = #{mdfr} | |
255 | - , mdfcn_dt = now() | |
256 | - , file_mng_id = #{fileMngId} | |
257 | - WHERE rvw_mttr_id = #{rvwMttrId} | |
258 | - </update> | |
259 | - | |
260 | - <!-- | |
261 | - 작 성 자 : 박정하 | |
262 | - 작 성 일 : 2024.04.01 | |
263 | - 내 용 : 검토사항 삭제 | |
264 | - --> | |
265 | - <update id="rvwMttrDelete" parameterType="RvwMttrVO"> | |
266 | - UPDATE rvw_mttr | |
267 | - SET use_yn = 'N' | |
268 | - WHERE rvw_mttr_id = #{rvwMttrId} | |
269 | - </update> | |
270 | - | |
271 | - <!-- | |
272 | - 작 성 자 : 박정하 | |
273 | - 작 성 일 : 2024.06.12 | |
274 | - 내 용 : 검토사항 목록 조회 (검토사항 삭제용) | |
275 | - --> | |
276 | - <select id="rvwMttrListByIvstDscsnId" resultMap="rvwMttrMap"> | |
277 | - SELECT rm.rvw_mttr_id | |
278 | - , rm.ivst_dscsn_id | |
279 | - , rm.type | |
280 | - , rm.clr | |
281 | - , to_char(rm.rcpt_dt, 'YYYY-MM-DD HH24:MI') AS rcpt_dt | |
282 | - , rm.rcpt_cn | |
283 | - , rm.use_yn | |
284 | - , rm.rgtr | |
285 | - , to_char(rm.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
286 | - , rm.mdfr | |
287 | - , to_char(rm.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
288 | - , rm.file_mng_id | |
289 | - FROM rvw_mttr AS rm | |
290 | - WHERE rm.use_yn = 'Y' | |
291 | - AND rm.ivst_dscsn_id = #{ivst_dscsn_id} | |
292 | - ORDER BY rm.rvw_mttr_id DESC | |
293 | - </select> | |
294 | -</mapper>(No newline at end of file) |
--- src/main/resources/mybatis/mapper/rvwMttr/rvwMttrPrgrs-SQL.xml
... | ... | @@ -1,81 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | -<mapper namespace="com.takensoft.portal.rvwMttr.dao.RvwMttrPrgrsDAO"> | |
4 | - <!-- 검토사항진행 resultMap --> | |
5 | - <resultMap id="rvwMttrPrgrsMap" type="HashMap"> | |
6 | - <result property="rvwMttrPrgrsId" column="rvw_mttr_prgrs_id" /> | |
7 | - <result property="rvwMttrId" column="rvw_mttr_id" /> | |
8 | - <result property="picId" column="pic_id" /> | |
9 | - <result property="mbrNm" column="mbr_nm" /> | |
10 | - <result property="prgrsCrs" column="prgrs_crs" /> | |
11 | - <result property="prgrsDt" column="prgrs_dt" /> | |
12 | - <result property="sprtMthd" column="sprt_mthd" /> | |
13 | - <result property="rgtr" column="rgtr" /> | |
14 | - <result property="regDt" column="reg_dt" /> | |
15 | - <result property="mdfr" column="mdfr" /> | |
16 | - <result property="mdfcnDt" column="mdfcn_dt" /> | |
17 | - </resultMap> | |
18 | - | |
19 | - <!-- | |
20 | - 작 성 자 : 박정하 | |
21 | - 작 성 일 : 2024.04.25 | |
22 | - 내 용 : 검토사항진행 등록 | |
23 | - --> | |
24 | - <insert id="prgrsInsert" parameterType="RvwMttrPrgrsVO"> | |
25 | - INSERT INTO rvw_mttr_prgrs ( | |
26 | - rvw_mttr_id | |
27 | - , pic_id | |
28 | - , prgrs_crs | |
29 | - , prgrs_dt | |
30 | - , sprt_mthd | |
31 | - , rgtr | |
32 | - , reg_dt | |
33 | - ) VALUES ( | |
34 | - #{rvwMttrId} | |
35 | - , #{picId} | |
36 | - , #{prgrsCrs} | |
37 | - , #{prgrsDt}::timestamp | |
38 | - , #{sprtMthd} | |
39 | - , #{rgtr} | |
40 | - , now() | |
41 | - ) | |
42 | - </insert> | |
43 | - | |
44 | - <!-- | |
45 | - 작 성 자 : 박정하 | |
46 | - 작 성 일 : 2024.04.25 | |
47 | - 내 용 : 검토사항진행 수정 | |
48 | - --> | |
49 | - <update id="prgrsUpdate" parameterType="RvwMttrPrgrsVO"> | |
50 | - UPDATE rvw_mttr_prgrs | |
51 | - SET pic_id = #{picId} | |
52 | - , prgrs_crs = #{prgrsCrs} | |
53 | - , prgrs_dt = #{prgrsDt}::timestamp | |
54 | - , sprt_mthd = #{sprtMthd} | |
55 | - , mdfr = #{mdfr} | |
56 | - , mdfcn_dt = now() | |
57 | - WHERE rvw_mttr_prgrs_id = #{rvwMttrPrgrsId} | |
58 | - </update> | |
59 | - | |
60 | - <!-- | |
61 | - 작 성 자 : 박정하 | |
62 | - 작 성 일 : 2024-04-01 | |
63 | - 내 용 : 검토사항진행 삭제 | |
64 | - --> | |
65 | - <delete id="prgrsDelete" parameterType="int"> | |
66 | - DELETE | |
67 | - FROM rvw_mttr_prgrs | |
68 | - WHERE rvw_mttr_prgrs_id = #{rvwMttrPrgrsId} | |
69 | - </delete> | |
70 | - | |
71 | - <!-- | |
72 | - 작 성 자 : 박정하 | |
73 | - 작 성 일 : 2024-06-04 | |
74 | - 내 용 : 검토사항진행 삭제 (검토사항 삭제용) | |
75 | - --> | |
76 | - <delete id="prgrsDeleteForRvwMttr" parameterType="String"> | |
77 | - DELETE | |
78 | - FROM rvw_mttr_prgrs | |
79 | - WHERE rvw_mttr_id = #{rvwMttrId} | |
80 | - </delete> | |
81 | -</mapper>(No newline at end of file) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?