Browse Source

입고처리 일부 작업중 커밋, 사용자 비번 초기화 수정

dwkim 2 years ago
parent
commit
b36147cdae

+ 16 - 4
src/main/java/com/oqpo/api/entity/stockmng/WhsProcInfoPtclEntity.java

@@ -20,22 +20,34 @@ public class WhsProcInfoPtclEntity implements Serializable {
20 20
     private String dlvSttmtUnqNo;
21 21
     @ApiModelProperty(value = "브랜드아이디")
22 22
     private String brandId;
23
+    @ApiModelProperty(value = "브랜드명")
24
+    private String brandNm;
23 25
     @ApiModelProperty(value = "매장아이디")
24 26
     private String storeId;
27
+    @ApiModelProperty(value = "매장명")
28
+    private String storeNm;
25 29
     @ApiModelProperty(value = "창고아이디")
26 30
     private String whsId;
27 31
     @ApiModelProperty(value = "LOCATION")
28 32
     private String location;
33
+    @ApiModelProperty(value = "창고명")
34
+    private String whsNm;
35
+    @ApiModelProperty(value = "LOCATION명")
36
+    private String locationNm;
29 37
     @ApiModelProperty(value = "창고구분")
30 38
     private String whsDvsn;
39
+    @ApiModelProperty(value = "창고구분명")
40
+    private String whsDvsnNm;
31 41
     @ApiModelProperty(value = "발주수량")
32
-    private String podrQty;
42
+    private Integer podrQty;
33 43
     @ApiModelProperty(value = "납품수량")
34
-    private String dlvQty;
44
+    private Integer dlvQty;
35 45
     @ApiModelProperty(value = "입고수량")
36
-    private String whsQty;
46
+    private Integer whsQty;
37 47
     @ApiModelProperty(value = "단위")
38 48
     private String unit;
49
+    @ApiModelProperty(value = "단위명")
50
+    private String unitNm;
39 51
     @ApiModelProperty(value = "납품요청일자")
40 52
     private String dlvReqDt;
41 53
     @ApiModelProperty(value = "납품예정일자")
@@ -57,7 +69,7 @@ public class WhsProcInfoPtclEntity implements Serializable {
57 69
     @ApiModelProperty(value = "품목명")
58 70
     private String itemNm;
59 71
     @ApiModelProperty(value = "입고금액")
60
-    private String whsAmt;
72
+    private Integer whsAmt;
61 73
     @ApiModelProperty(value = "입고배송비")
62 74
     private String whsDlvChrg;
63 75
     @ApiModelProperty(value = "납품담당자아이디")

+ 2 - 1
src/main/java/com/oqpo/api/enums/SystemMessageCode.java

@@ -40,7 +40,8 @@ public enum SystemMessageCode {
40 40
     ERR_DLV001 (40014, "배송구분은 공급사 배송이되야 합니다.", HttpStatus.BAD_REQUEST),
41 41
     ERR_OUTWHS (40015, "출고창고 정보가 없습니다.", HttpStatus.BAD_REQUEST),
42 42
     ERR_POSHNONQTY (40016, "발주 수량보다 출고 수량이 많습니다.", HttpStatus.BAD_REQUEST),
43
-    ERR_NONEXPRY (40017, "유통기한을 입력해주세요!", HttpStatus.BAD_REQUEST)
43
+    ERR_NONEXPRY (40017, "유통기한을 입력해주세요!", HttpStatus.BAD_REQUEST),
44
+    ERR_NOTWAREHOUSE (40018, "입고수량은 납품수량보다 적거나 같아야 합니다.", HttpStatus.BAD_REQUEST)
44 45
     ;
45 46
 
46 47
 

+ 5 - 0
src/main/java/com/oqpo/api/mapper/inoutmng/ShmtOdrMapper.java

@@ -7,6 +7,7 @@ import com.oqpo.api.entity.inoutmng.ShmtOdrBaseEntity;
7 7
 import com.oqpo.api.entity.inoutmng.ShmtOdrDtlEntity;
8 8
 import com.oqpo.api.entity.pomng.PchOdrBaseInfoEntity;
9 9
 import com.oqpo.api.entity.pomng.PchOdrDtlPtclEntity;
10
+import com.oqpo.api.entity.stockmng.WhsProcInfoPtclEntity;
10 11
 import com.oqpo.api.web.dto.request.GridRequest;
11 12
 import org.apache.ibatis.annotations.Mapper;
12 13
 import org.apache.ibatis.annotations.Param;
@@ -48,4 +49,8 @@ public interface ShmtOdrMapper {
48 49
     List<DeliInfoMgntEntity> selectWarehouseTargetGridList(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sWhsId") String sWhsId,  @Param("sSpplyId") String sSpplyId, @Param("sDlvSttmtUnqNo") String  sDlvSttmtUnqNo,  @Param("sItemNm") String sItemNm, GridRequest gridRequest )throws Exception;
49 50
     int selectWarehouseTargetGridCnt(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sWhsId") String sWhsId,  @Param("sSpplyId") String sSpplyId, @Param("sDlvSttmtUnqNo") String  sDlvSttmtUnqNo,  @Param("sItemNm") String sItemNm )throws Exception;
50 51
 
52
+    int insertWhsProcInfoPtcl(@Param("userId") String userId, List<WhsProcInfoPtclEntity> gridInsertData)throws Exception;
53
+
54
+    List<DeliInfoMgntEntity> selectWarehouseProcList(@Param("brandId") String brandId, @Param("whsId") String whsId, List<DeliDtlMgntEntity> gridUpdateData )throws Exception;
55
+
51 56
 }

+ 2 - 0
src/main/java/com/oqpo/api/mapper/oper/UserMngMapper.java

@@ -53,4 +53,6 @@ public interface UserMngMapper {
53 53
 
54 54
     UserMngEntity selectGroupUserInfo(@Param("userId") String userId) throws Exception;
55 55
 
56
+    String selectInitPwData(@Param("authTpCd") String authTpCd, @Param("serData") String serData) throws Exception;
57
+
56 58
 }

+ 3 - 2
src/main/java/com/oqpo/api/service/SigninService.java

@@ -66,7 +66,7 @@ public class SigninService implements UserDetailsService {
66 66
             Authentication authentication = authenticationManager.authenticate(token);
67 67
             SecurityContextHolder.getContext().setAuthentication(authentication);
68 68
             memberEntity = (MemberEntity) authentication.getPrincipal();
69
-            System.out.println("==getUserNm=====================> " + memberEntity.getUserNm());
69
+            //System.out.println("==getUserNm=====================> " + memberEntity.getUserNm());
70 70
             connKey = jwtTokenProvider.createToken (
71 71
                     memberEntity.getUserId(),
72 72
                     memberEntity.getUserNm(),
@@ -82,7 +82,8 @@ public class SigninService implements UserDetailsService {
82 82
             userMngService.updateLoginDt(memberEntity.getUserId());
83 83
 
84 84
         } catch (Exception e) {
85
-            e.getStackTrace();
85
+            //e.getStackTrace();
86
+            e.printStackTrace();
86 87
             throw new GlobalException(SystemMessageCode.SIGNIN_FAIL);
87 88
         }
88 89
         return JwtResponse.toDTO(connKey);

+ 99 - 0
src/main/java/com/oqpo/api/service/inoutmng/ShmtOdrService.java

@@ -13,6 +13,7 @@ import com.oqpo.api.entity.stinfo.SpplyEntity;
13 13
 import com.oqpo.api.entity.stinfo.StoreBaseInfoEntity;
14 14
 import com.oqpo.api.entity.stockmng.StckMgntBaseInfoEntity;
15 15
 import com.oqpo.api.entity.stockmng.StckMgntDtlHistEntity;
16
+import com.oqpo.api.entity.stockmng.WhsProcInfoPtclEntity;
16 17
 import com.oqpo.api.enums.ChgDvsn;
17 18
 import com.oqpo.api.enums.InOutCd;
18 19
 import com.oqpo.api.enums.SystemMessageCode;
@@ -29,6 +30,7 @@ import com.oqpo.api.service.pomng.PchOrdService;
29 30
 import com.oqpo.api.web.dto.request.GridRequest;
30 31
 import com.oqpo.api.web.dto.request.inoutmng.InstShmtOdrRequest;
31 32
 import com.oqpo.api.web.dto.request.inoutmng.SaveSpplyDlvRequest;
33
+import com.oqpo.api.web.dto.request.inoutmng.SaveWarehouseProcRequest;
32 34
 import com.oqpo.api.web.dto.response.GridResponse;
33 35
 import com.oqpo.api.web.dto.response.inoutmng.*;
34 36
 import com.oqpo.api.web.dto.response.pomng.pchOrd.SpplyPoOdrSearchListResponse;
@@ -832,6 +834,103 @@ public class ShmtOdrService extends CommonService {
832 834
         return GridResponse.toDTO(gridPage, gridTotal, gridRecords, gridRows);
833 835
     }
834 836
 
837
+    /* 입고처리 저장 */
838
+    @Transactional
839
+    public void saveWarehouseProc(String userId, SaveWarehouseProcRequest saveWarehouseProcRequest) throws Exception {
840
+        try {
841
+
842
+            List<WhsProcInfoPtclEntity> gridInsertData = saveWarehouseProcRequest.toCodeEntities(saveWarehouseProcRequest.getGridInsertData());
843
+            List<DeliDtlMgntEntity> serarchList = new ArrayList<DeliDtlMgntEntity>();
844
+            if (gridInsertData.size() > 0) {
845
+                for (int i = 0 ; i < gridInsertData.size() ; i++) {
846
+                    WhsProcInfoPtclEntity whsProcData = gridInsertData.get(i);
847
+                    DeliDtlMgntEntity deliData = new DeliDtlMgntEntity();
848
+                    deliData.setDlvSttmtDtlNo(whsProcData.getDlvSttmtUnqNo() + whsProcData.getDlvSttmtDtlNo());
849
+                    serarchList.add(deliData);
850
+                }
851
+
852
+                List<DeliInfoMgntEntity> targetList  =   shmtOdrMapper.selectWarehouseProcList(saveWarehouseProcRequest.getBrandId(), saveWarehouseProcRequest.getWhsId(), serarchList);
853
+
854
+                List<WhsProcInfoPtclEntity> gridUpdateData = new ArrayList<WhsProcInfoPtclEntity>();
855
+/*
856
+                // 우선 입고수량과 납품수량 비교를 처리함
857
+                for (int i = 0 ; i < gridInsertData.size() ; i++) {
858
+                    WhsProcInfoPtclEntity whsProcData = gridInsertData.get(i);
859
+
860
+                    for (int j = 0  ; j < targetList.size() ; j++) {
861
+                        DeliInfoMgntEntity targetData = targetList.get(j);
862
+
863
+                        if (whsProcData.getDlvSttmtUnqNo().equals(targetData.getDlvSttmtUnqNo()) && whsProcData.getDlvSttmtDtlNo().equals(targetData.getDeliDtlMgntInfo().getDlvSttmtDtlNo())) {
864
+
865
+                            if (whsProcData.getWhsQty() > targetData.getDeliDtlMgntInfo().getDlvQty()) {
866
+                                 // 오류 처리
867
+                                throw new GlobalException(SystemMessageCode.ERR_NOTWAREHOUSE);
868
+                            }
869
+
870
+                            // 입고번호 생성
871
+                            whsProcData.setWhsMgntUnqNo(fnGetDealNo(17,""));
872
+                            whsProcData.setDlvSttmtDtlNo(targetData.getDlvSttmtUnqNo());
873
+                            whsProcData.setDlvSttmtUnqNo(targetData.getDeliDtlMgntInfo().getDlvSttmtDtlNo());
874
+                            whsProcData.setBrandId(targetData.getBrandId());
875
+                            whsProcData.setStoreId(targetData.getStoreId());
876
+                            whsProcData.setWhsId(targetData.getWhsId());
877
+                            whsProcData.setLocation(targetData.getLocation());
878
+                            whsProcData.setSpplyId(targetData.getSpplyId());
879
+                            whsProcData.setSpplyNm(targetData.getSpplyNm());
880
+                            whsProcData.setWhsDvsn();
881
+                            whsProcData.setPodrQty();
882
+                            whsProcData.setDlvQty();
883
+                            whsProcData.setWhsQty();
884
+                            whsProcData.setUnit();
885
+                            whsProcData.setUnitAmt();
886
+                            whsProcData.setDlvReqDt();
887
+                            whsProcData.setDlvSchDt();
888
+                            whsProcData.setDlvCmpltDt();
889
+                            whsProcData.setWhsCnfmNm();
890
+                            whsProcData.setDlvMgrNm();
891
+                            whsProcData.setDlvMgrTelNo();
892
+                            whsProcData.setDlvMgrEmal();
893
+                            whsProcData.setDlvMgrMblNo();
894
+                            whsProcData.setItemId();
895
+                            whsProcData.setItemNm();
896
+                            whsProcData.setWhsAmt();
897
+                            whsProcData.setWhsDlvChrg();
898
+                            whsProcData.setDlvMgrId();
899
+                            whsProcData.setDlvCnfmDocFileNo();
900
+                            whsProcData.setSttlYn();
901
+                            whsProcData.setPchPodrUnqNo();
902
+                            whsProcData.setPchPodrDtlNo();
903
+                            whsProcData.setPchReqUnqNo();
904
+                            whsProcData.setPchReqDtlNo();
905
+                            whsProcData.setShmtReqUnqNo();
906
+
907
+
908
+                            //whsProcData
909
+
910
+
911
+                        }
912
+
913
+
914
+                    }
915
+
916
+                }
917
+*/
918
+            }
919
+
920
+
921
+
922
+
923
+
924
+        } catch (GlobalException e) {
925
+            //e.getStackTrace();
926
+            e.printStackTrace();
927
+            throw new GlobalException(e.getSystemMessageCode());
928
+        } catch (Exception e) {
929
+            e.printStackTrace();
930
+            throw new RuntimeException();
931
+        }
932
+    }
933
+
835 934
 }
836 935
 
837 936
 

+ 24 - 1
src/main/java/com/oqpo/api/service/oper/UserMngService.java

@@ -148,7 +148,30 @@ public class UserMngService extends CommonService {
148 148
         // 사용자 정보를 가져옴
149 149
         try {
150 150
             UserMngEntity entity = userMngMapper.selectUserInfo(userId);
151
-            String password = passwordEncoder.encode(entity.getTelNo().replace("-", ""));//aes256.aesEncode(entity.getTelNo());
151
+            String serData = "";
152
+            String userPwData = "";
153
+            if ("30".equals(entity.getAuthTpCd())) {
154
+                //가맹점 사업자번호
155
+                serData = entity.getAfflShopId();
156
+            } else if ("40".equals(entity.getAuthTpCd())) {
157
+                //브랜드 사업자번호
158
+                serData = entity.getBrandId();
159
+            } else if ("50".equals(entity.getAuthTpCd())) {
160
+                //매장 사업자번호
161
+                serData = userId;
162
+            } if ("60".equals(entity.getAuthTpCd())) {
163
+                //공급사 사업자번호
164
+                serData = userId;
165
+            } else {
166
+                //전화번호
167
+                userPwData =  entity.getTelNo();
168
+            }
169
+
170
+            if ("30".equals(entity.getAuthTpCd()) || "40".equals(entity.getAuthTpCd()) || "50".equals(entity.getAuthTpCd()) || "60".equals(entity.getAuthTpCd())) {
171
+                userPwData =  userMngMapper.selectInitPwData(entity.getAuthTpCd(), serData);
172
+            }
173
+
174
+            String password = passwordEncoder.encode(userPwData.replace("-", ""));//aes256.aesEncode(entity.getTelNo());
152 175
             userMngMapper.updateInitUserPw(userId, password);
153 176
             return password;
154 177
         } catch (GlobalException e) {

+ 63 - 0
src/main/java/com/oqpo/api/web/dto/request/inoutmng/SaveWarehouseProcRequest.java

@@ -0,0 +1,63 @@
1
+package com.oqpo.api.web.dto.request.inoutmng;
2
+
3
+import com.oqpo.api.entity.pomng.PchOdrDtlPtclEntity;
4
+import com.oqpo.api.entity.stockmng.WhsProcInfoPtclEntity;
5
+import io.swagger.annotations.ApiModelProperty;
6
+import lombok.*;
7
+
8
+import javax.validation.constraints.NotBlank;
9
+import java.util.ArrayList;
10
+import java.util.List;
11
+
12
+@Getter
13
+@Setter
14
+public class SaveWarehouseProcRequest {
15
+    @NotBlank
16
+    @ApiModelProperty(value = "CRUD")
17
+    private String viewCd;
18
+
19
+    @NotBlank
20
+    @ApiModelProperty(value = "브랜드아이디") private String brandId;
21
+
22
+    @NotBlank
23
+    @ApiModelProperty(value = "창고아이디") private String whsId;
24
+
25
+    @ApiModelProperty(value = "입고 리스트")
26
+    private List<WareHouseProcDataList> gridInsertData;
27
+
28
+
29
+    public List<WhsProcInfoPtclEntity> toCodeEntities(List<WareHouseProcDataList> gridData) {
30
+        List<WhsProcInfoPtclEntity> entities = new ArrayList<>();
31
+        if (gridData == null || gridData.size() == 0)
32
+            return entities;
33
+
34
+        gridData.forEach(x -> {
35
+            WhsProcInfoPtclEntity entity = new WhsProcInfoPtclEntity();
36
+            entity.setDlvSttmtUnqNo(x.getDlvSttmtUnqNo());
37
+            entity.setDlvSttmtDtlNo(x.getDlvSttmtDtlNo());
38
+            entity.setItemId(x.getItemId());
39
+            entity.setWhsQty(x.getWhsQty());
40
+            entities.add(entity);
41
+        });
42
+        return entities;
43
+    }
44
+
45
+    @Getter
46
+    @Builder
47
+    @AllArgsConstructor(access = AccessLevel.PROTECTED)
48
+    static class WareHouseProcDataList {
49
+
50
+        @NotBlank
51
+        @ApiModelProperty(value = "납품서번호") private String dlvSttmtUnqNo;
52
+
53
+        @NotBlank
54
+        @ApiModelProperty(value = "납품서항번") private String dlvSttmtDtlNo;
55
+
56
+        @ApiModelProperty(value = "품목아이디") private String itemId;
57
+
58
+        @NotBlank
59
+        @ApiModelProperty(value = "입고수량") private Integer whsQty;
60
+
61
+
62
+    }
63
+}

+ 47 - 2
src/main/resources/mybatis/sqlmaps/inoutmng/ShmtOdr.xml

@@ -152,14 +152,14 @@
152 152
         (dlv_sttmt_unq_no, dlv_sttmt_dtl_no, pch_podr_unq_no, pch_podr_dtl_no, pch_req_unq_no
153 153
         , pch_req_dtl_no, item_id, item_nm, unit, unit_amt
154 154
         , price_unit, podr_qty, dlv_qty, podr_amt, dlv_amt
155
-        , expry_date, delay_yn, delay_rsn
155
+        , expry_date, delay_yn, delay_rsn,dlv_dtl_st_cd
156 156
         , sys_reg_dttm, sys_reg_id, sys_chg_dttm, sys_chg_id)
157 157
         VALUES
158 158
         <foreach collection="gridInsertData" item="item" separator=",">
159 159
         (#{item.dlvSttmtUnqNo}, #{item.dlvSttmtDtlNo}, #{item.pchPodrUnqNo}, #{item.pchPodrDtlNo}, #{item.pchReqUnqNo}
160 160
         , #{item.pchReqDtlNo}, #{item.itemId}, #{item.itemNm}, #{item.unit}, #{item.unitAmt}
161 161
         , #{item.priceUnit}, #{item.podrQty}, #{item.dlvQty}, #{item.podrAmt}, #{item.dlvAmt}
162
-        , #{item.expryDate}, #{item.delayYn}, #{item.delayRsn}
162
+        , #{item.expryDate}, #{item.delayYn}, #{item.delayRsn}, 'DLD0'
163 163
         , NOW(), #{userId}, NOW(), #{userId})
164 164
         </foreach>
165 165
     </insert>
@@ -534,6 +534,7 @@
534 534
         and info.brand_id = #{sBrandId}
535 535
         and info.dlv_sch_dt between #{fromDt} and #{endDt}
536 536
         and info.dlv_st_cd = 'DLV0'
537
+        and ptcl.dlv_dtl_st_cd = 'DLD0'
537 538
         and info.whs_id = #{sWhsId}
538 539
         <if test="sSpplyId != null and sSpplyId != ''">
539 540
         and info.spply_id = #{sSpplyId}
@@ -573,6 +574,7 @@
573 574
         and info.brand_id = #{sBrandId}
574 575
         and info.dlv_sch_dt between #{fromDt} and #{endDt}
575 576
         and info.dlv_st_cd = 'DLV0'
577
+        and ptcl.dlv_dtl_st_cd = 'DLD0'
576 578
         and info.whs_id = #{whsId}
577 579
         <if test="sSpplyId != null and sSpplyId != ''">
578 580
             and info.spply_id = #{sSpplyId}
@@ -585,6 +587,49 @@
585 587
         </if>
586 588
     </select>
587 589
 
590
+    <insert id="insertWhsProcInfoPtcl">
591
+        insert into whs_proc_info_ptcl
592
+        (whs_mgnt_unq_no, dlv_sttmt_dtl_no, dlv_sttmt_unq_no, brand_id, store_id
593
+        , whs_dt,  whs_id, location, whs_dvsn, podr_qty, dlv_qty
594
+        , whs_qty, unit, dlv_req_dt, dlv_sch_dt, dlv_cmplt_dt
595
+        , whs_cnfm_nm, dlv_mgr_nm, dlv_mgr_tel_no, dlv_mgr_emal, dlv_mgr_mbl_no
596
+        , item_id, item_nm, whs_amt, whs_dlv_chrg, dlv_mgr_id
597
+        , dlv_cnfm_doc_file_no, sttl_yn, pch_podr_unq_no, pch_podr_dtl_no, pch_req_unq_no
598
+        , pch_req_dtl_no, shmt_req_unq_no, sys_reg_dttm, sys_reg_id, sys_chg_dttm, sys_chg_id)
599
+        values
600
+        <foreach collection="gridInsertData" item="item" separator=",">
601
+        (#{item.whsMgntUnqNo}, #{item.dlvSttmtDtlNo}, #{item.dlvSttmtUnqNo}, #{item.brandId}, #{item.storeId}
602
+        , date_format(now(),'%Y%m%d'),#{item.whsId}, #{item.location}, #{item.whsDvsn}, #{item.podrQty}, #{item.dlvQty}
603
+        , #{item.whsQty}, #{item.unit}, #{item.dlvReqDt}, #{item.dlvSchDt}, #{item.dlvCmpltDt}
604
+        , #{item.whsCnfmNm}, #{item.dlvMgrNm}, #{item.dlvMgrTelNo}, #{item.dlvMgrEmal}, #{item.dlvMgrMblNo}
605
+        , #{item.itemId}, #{item.itemNm}, #{item.whsAmt}, #{item.whsDlvChrg}, #{item.dlvMgrId}
606
+        , #{item.dlvCnfmDocFileNo}, #{item.sttlYn}, #{item.pchPodrUnqNo}, #{item.pchPodrDtlNo}, #{item.pchReqUnqNo}
607
+        , #{item.pchReqDtlNo}, #{item.shmtReqUnqNo}, NOW(), #{userId}, NOW(), #{userId})
608
+        </foreach>
609
+    </insert>
588 610
 
611
+    <select id="selectWarehouseProcList" resultType="com.oqpo.api.entity.inoutmng.DeliInfoMgntEntity">
612
+        select	/* shmtOdr.selectWarehouseProcList  */info.brand_id, info.store_id
613
+                , info.dlv_sttmt_unq_no, ptcl.dlv_sttmt_dtl_no as 'deliDtlMgntInfo.dlv_sttmt_dtl_no'
614
+                , info.whs_id, info.location, info.spply_id, info.spply_nm
615
+                , info.whs_dvsn, ptcl.podr_qty as 'deliDtlMgntInfo.podr_qty'
616
+                , ptcl.dlv_qty as 'deliDtlMgntInfo.dlv_qty', ptcl.unit as 'deliDtlMgntInfo.unit'
617
+                , ptcl.unit_amt as 'deliDtlMgntInfo.unit_amt', info.dlv_req_dt, info.dlv_sch_dt
618
+                , info.dlv_mgr_nm, info.dlv_mgr_mbl_no, info.dlv_mgr_tel_no
619
+                , ptcl.item_id as 'deliDtlMgntInfo.item_id' , ptcl.item_nm as 'deliDtlMgntInfo.item_nm'
620
+                , ptcl.pch_podr_unq_no as 'deliDtlMgntInfo.pch_podr_unq_no', ptcl.pch_podr_dtl_no as 'deliDtlMgntInfo.pch_podr_dtl_no'
621
+                , ptcl.pch_req_unq_no as 'deliDtlMgntInfo.pch_req_unq_no', ptcl.pch_req_dtl_no as 'deliDtlMgntInfo.pch_req_dlt_no'
622
+        from deli_info_mgnt info
623
+        join deli_dtl_ptcl ptcl on info.dlv_sttmt_unq_no = ptcl.dlv_sttmt_unq_no
624
+               and concat(ptcl.dlv_sttmt_unq_no, ptcl.dlv_sttmt_dtl_no) in
625
+                <foreach collection="gridUpdateData" item="item" separator="," open="(" close=")">
626
+                #{dlvSttmtDtlNo}
627
+                </foreach>
628
+                and ptcl.dlv_dtl_st_cd = 'DLD0'
629
+        where 1=1
630
+        and info.brand_id = #{brandId}
631
+        and info.dlv_st_cd = 'DLV0'
632
+        and info.whs_id = #{whsId}
633
+    </select>
589 634
 
590 635
 </mapper>

+ 30 - 1
src/main/resources/mybatis/sqlmaps/oper/UserMng.xml

@@ -96,6 +96,7 @@
96 96
               ,tel_no           = #{entity.telNo}
97 97
               ,email            = #{entity.email}
98 98
               ,user_stat_cd     = #{entity.userStatCd}
99
+              ,user_nm          = #{entity.userNm}
99 100
               ,user_stat_dt     = case when user_stat_cd = #{entity.userStatCd} then user_stat_dt else now() end
100 101
         where user_id = #{entity.userId}
101 102
     </update>
@@ -127,7 +128,8 @@
127 128
     <select id="selectUserInfo" resultType="com.oqpo.api.entity.oper.UserMngEntity">
128 129
             select user_id, user_nm, fn_get_telno(tel_no) as tel_no, email, user_pw, user_stat_cd, fn_code_nm('USER_STAT_CD', user_stat_cd) as user_stat_nm ,
129 130
                    date_format(user_stat_dt, '%Y.%m.%d') as user_stat_dt, date_format(last_login_dt, '%Y.%m.%d %H:%i:%s') as last_login_dt,
130
-                   date_format(add_dt, '%Y.%m.%d') as add_dt, brand_id, affl_shop_id, fn_affl_nm(affl_shop_id) as affl_shop_nm, fn_brand_nm(brand_id) as brand_nm
131
+                   date_format(add_dt, '%Y.%m.%d') as add_dt, brand_id, affl_shop_id, fn_affl_nm(affl_shop_id) as affl_shop_nm, fn_brand_nm(brand_id) as brand_nm,
132
+                   auth_tp_cd
131 133
             from  np_user_info
132 134
             where user_id = #{userId}
133 135
     </select>
@@ -292,4 +294,31 @@
292 294
         from np_user_info uinfo
293 295
         where user_id = #{userId}
294 296
     </select>
297
+
298
+    <select id="selectInitPwData" resultType="String">
299
+        select /* selectInitPwData */ bsns_reg_no
300
+        <if test="authTpCd == '30'">
301
+            from affl_shop_base_info
302
+            where affl_shop_id = #{serData}
303
+        </if>
304
+        <if test="authTpCd == '40'">
305
+            from brand_base_info
306
+            where brand_id = #{serData}
307
+        </if>
308
+        <if test="authTpCd == '50'">
309
+            from store_base_info
310
+            where store_id = #{serData}
311
+        </if>
312
+        <if test="authTpCd == '60'">
313
+            from  spply_base_info
314
+            where spply_id = #{serData}
315
+        </if>
316
+    </select>
317
+
318
+
319
+
320
+
321
+
322
+
323
+
295 324
 </mapper>