Browse Source

역량평가 생성 오류 수정

SH 1 month ago
parent
commit
cd3575c19e

+ 1 - 3
src/main/java/sgc/portal/cw/cw0621/persistence/CW06210001UMapper.java

@@ -1,13 +1,11 @@
 package sgc.portal.cw.cw0621.persistence;
 
 import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
 import sgc.portal.base.util.EasyHashMap;
 import sgc.portal.cw.cw0621.dto.CW06210001USearch;
 import sgc.portal.cw.cw0621.model.CW06210001U;
 
 import java.util.List;
-import java.util.Map;
 
 @Mapper
 public interface CW06210001UMapper {
@@ -17,7 +15,7 @@ public interface CW06210001UMapper {
 
     int insert(CW06210001U cW06210001U);
 
-    Map<String, Object> updateCre(CW06210001U cW06210001U);
+    void updateCre(CW06210001U cW06210001U);
 
     int updatePrev(CW06210001U cW06210001U);
 

+ 5 - 8
src/main/java/sgc/portal/cw/cw0621/service/CW06210001UService.java

@@ -51,15 +51,12 @@ public class CW06210001UService {
         Map<String, String> result = new HashMap<>();
 
         for (CW06210001U cW06210001U : CW06210001U) {
-            // ... (rest of your code)
+        	
+            mapper.updateCre(cW06210001U);
+            String errCode = cW06210001U.getErrCode(); // 출력 파라미터 값 가져오기
+            String errMsg = cW06210001U.getErrMsg();
 
-            // Add error handling for PL/SQL calls
-            Map<String, Object> outParams = mapper.updateCre(cW06210001U);
-            String errCode = (String) outParams.get("errCode");
-            String errMsg = (String) outParams.get("errMsg");
-
-        	//System.out.println("=========================================== "+errCode + "  ======== " + errMsg);
-            if (!errCode.equals("X")) {
+            if (errCode.equals("X")) {
                 result.put("errCode", errCode);
                 result.put("errMsg", errMsg);
                 return result;