浏览代码

정산 확정

marseyes 2 年之前
父节点
当前提交
fb2a2ef161

+ 5 - 0
src/main/java/com/oqpo/api/service/sttlmng/SttlInspectStateService.java

@@ -41,10 +41,15 @@ public class SttlInspectStateService extends CommonService {
41 41
     /* 정산확정  */
42 42
     @Transactional
43 43
     public void confirmSttl(String userId, SttlConfirmRequest sttlConfirmRequest) throws Exception {
44
+        // 정산기본정보 조회
45
+        StlMgntBaseInfoEntity entity = sttlReqMapper.selectStlMgntBaseInfo(sttlConfirmRequest.getSttlMgntUnqNo());
46
+
44 47
         // 정산관리기본정보 - 정산상태코드 변경
45 48
         StlMgntBaseInfoEntity infoEntity = new StlMgntBaseInfoEntity();
46 49
         infoEntity.setSttlMgntUnqNo(sttlConfirmRequest.getSttlMgntUnqNo());
47 50
         infoEntity.setSttlStCd(SttlStCd.STTL_CONFIRM.getCd());
51
+        infoEntity.setSttlDt(DateUtil.getCurrentDate());
52
+        infoEntity.setSttlAmt(entity.getSttlReqAmt()); // 정산요청금액을 정산금액으로 지정한다.
48 53
         sttlReqMapper.updateStlMgntBaseInfo4SttlConfirm(userId, infoEntity);
49 54
     }
50 55
 

+ 9 - 7
src/main/resources/mybatis/sqlmaps/sttlmng/SttlReq.xml

@@ -389,19 +389,21 @@
389 389
     <update id="updateStlMgntBaseInfo4SttlConfirm" >
390 390
         /* SttlReqMapper.updateStlMgntBaseInfo4SttlConfirm */
391 391
         UPDATE stl_mgnt_base_info SET
392
-        sttl_st_cd = #{entity.sttlStCd},
393
-        sys_chg_dttm = NOW(),
394
-        sys_chg_id = #{userId}
392
+            sttl_st_cd = #{entity.sttlStCd},
393
+            sttl_dt = #{entity.sttlDt},
394
+            sttl_amt = #{entity.sttlAmt},
395
+            sys_chg_dttm = NOW(),
396
+            sys_chg_id = #{userId}
395 397
         WHERE sttl_mgnt_unq_no = #{entity.sttlMgntUnqNo}
396 398
     </update>
397 399
 
398 400
     <update id="updateStlMgntBaseInfo4SttlReject" >
399 401
         /* SttlReqMapper.updateStlMgntBaseInfo4SttlReject */
400 402
         UPDATE stl_mgnt_base_info SET
401
-        sttl_st_cd = #{entity.sttlStCd},
402
-        sttl_rjct_rsn = #{entity.sttlRjctRsn},
403
-        sys_chg_dttm = NOW(),
404
-        sys_chg_id = #{userId}
403
+            sttl_st_cd = #{entity.sttlStCd},
404
+            sttl_rjct_rsn = #{entity.sttlRjctRsn},
405
+            sys_chg_dttm = NOW(),
406
+            sys_chg_id = #{userId}
405 407
         WHERE sttl_mgnt_unq_no = #{entity.sttlMgntUnqNo}
406 408
     </update>
407 409