fo bo 머지작업 - 오류수정

This commit is contained in:
jazz
2025-11-28 18:06:52 +09:00
parent 672e97f7ee
commit 99eb2d1e58
3 changed files with 37 additions and 19 deletions

View File

@@ -1,5 +1,6 @@
package com.wb.domainserver.domain.mngr.stats.sleAnals.controller;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.wb.domainserver.common.mvc.tags.ui.pagination.PaginationInfo;
import com.wb.domainserver.common.prop.PaginationProperties;
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
@@ -28,6 +29,7 @@ import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -96,16 +98,20 @@ public class SleAnalsController {
*/
@Policy(AuthPolicy.RESTRICTED)
@RequestMapping(value="/selectMngrSleRsltChart1Inqire", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<WnbtResponse> selectMngrSleRsltChart1Inqire(@CookieValue(value = "authSopmalCd") String authSopmalCd, DataMap vo) {
vo.put("sopmalCd", authSopmalCd);
public ResponseEntity<WnbtResponse> selectMngrSleRsltChart1Inqire(@CookieValue(value = "authSopmalCd") String authSopmalCd, SleAnalsVO vo) {
vo.setSopmalCd(authSopmalCd);
ObjectMapper objectMapper = new ObjectMapper();
DataMap param = objectMapper.convertValue(vo, DataMap.class);
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
if("01".equals(user.getSysDvCd())){
vo.put("sopmalCd", user.getSopmalCd());
param.put("sopmalCd", user.getSopmalCd());
}
// 응답 메세지 객체
Map<String, Object> content = service.selectBOMngrSleRsltChart1Inqire(vo);
Map<String, Object> content = service.selectBOMngrSleRsltChart1Inqire(param);
return ResponseEntity.ok(
WnbtResponse.builder()
@@ -124,16 +130,20 @@ public class SleAnalsController {
*/
@Policy(AuthPolicy.RESTRICTED)
@RequestMapping(value="/selectMngrSleRsltChart2Inqire", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<WnbtResponse> selectMngrSleRsltChart2Inqire(@CookieValue(value = "authSopmalCd") String authSopmalCd, DataMap vo) {
vo.put("sopmalCd", authSopmalCd);
public ResponseEntity<WnbtResponse> selectMngrSleRsltChart2Inqire(@CookieValue(value = "authSopmalCd") String authSopmalCd, SleAnalsVO vo) {
vo.setSopmalCd(authSopmalCd);
ObjectMapper objectMapper = new ObjectMapper();
DataMap param = objectMapper.convertValue(vo, DataMap.class);
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
if("01".equals(user.getSysDvCd())){
vo.put("sopmalCd", user.getSopmalCd());
param.put("sopmalCd", user.getSopmalCd());
}
// 응답 메세지 객체
List<DataMap> content = service.selectBOMngrSleRsltChart2Inqire(vo);
List<DataMap> content = service.selectBOMngrSleRsltChart2Inqire(param);
return ResponseEntity.ok(
WnbtResponse.builder()
.resBody(new WnbtResponseBody(content))
@@ -358,16 +368,19 @@ public class SleAnalsController {
*/
@Policy(AuthPolicy.RESTRICTED)
@RequestMapping(value="/selectMngrGoodsRsltChartInqire", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<WnbtResponse> selectMngrGoodsRsltChartInqire(@CookieValue(value = "authSopmalCd") String authSopmalCd, DataMap vo) {
vo.put("sopmalCd", authSopmalCd);
public ResponseEntity<WnbtResponse> selectMngrGoodsRsltChartInqire(@CookieValue(value = "authSopmalCd") String authSopmalCd, SleAnalsVO vo) {
vo.setSopmalCd(authSopmalCd);
ObjectMapper objectMapper = new ObjectMapper();
DataMap param = objectMapper.convertValue(vo, DataMap.class);
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
if("01".equals(user.getSysDvCd())){
vo.put("sopmalCd", user.getSopmalCd());
param.put("sopmalCd", user.getSopmalCd());
}
// 응답 메세지 객체
Map<String, Object> content = service.selectBOMngrGoodsRsltChartInqire(vo);
Map<String, Object> content = service.selectBOMngrGoodsRsltChartInqire(param);
return ResponseEntity.ok(
WnbtResponse.builder()
@@ -772,16 +785,19 @@ public class SleAnalsController {
*/
@Policy(AuthPolicy.RESTRICTED)
@RequestMapping(value="/selectMngrGoodsPopulationStatsChartInqire", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<WnbtResponse> selectMngrGoodsPopulationStatsChartInqire(@CookieValue(value = "authSopmalCd") String authSopmalCd, DataMap vo) {
vo.put("sopmalCd", authSopmalCd);
public ResponseEntity<WnbtResponse> selectMngrGoodsPopulationStatsChartInqire(@CookieValue(value = "authSopmalCd") String authSopmalCd, SleAnalsVO vo) {
vo.setSopmalCd(authSopmalCd);
ObjectMapper objectMapper = new ObjectMapper();
DataMap param = objectMapper.convertValue(vo, DataMap.class);
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
if("01".equals(user.getSysDvCd())){
vo.put("sopmalCd", user.getSopmalCd());
param.put("sopmalCd", user.getSopmalCd());
}
// 응답 메세지 객체
Map<String, Object> content = service.selectBOMngrGoodsPopulationStatsChartInqire(vo);
Map<String, Object> content = service.selectBOMngrGoodsPopulationStatsChartInqire(param);
return ResponseEntity.ok(
WnbtResponse.builder()