검색필터 점검 및 수정 완료
This commit is contained in:
@@ -3049,7 +3049,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<!-- 국내/해외 검색 -->
|
<!-- 국내/해외 검색 -->
|
||||||
<if test="search_area_cd != null and search_area_cd != ''">
|
<if test="search_area_cd != null and search_area_cd != ''">
|
||||||
AND CM.AREA_CD = #{search_area_cd}
|
AND CODE_NAME(CM.AREA_CD) = #{search_area_cd}
|
||||||
</if>
|
</if>
|
||||||
<!-- 접수일 검색 -->
|
<!-- 접수일 검색 -->
|
||||||
<if test="search_receipt_date_from != null and search_receipt_date_from != ''">
|
<if test="search_receipt_date_from != null and search_receipt_date_from != ''">
|
||||||
@@ -3060,7 +3060,11 @@
|
|||||||
</if>
|
</if>
|
||||||
<!-- 고객사 검색 -->
|
<!-- 고객사 검색 -->
|
||||||
<if test="search_customer_objid != null and search_customer_objid != ''">
|
<if test="search_customer_objid != null and search_customer_objid != ''">
|
||||||
AND CM.CUSTOMER_OBJID = REPLACE(#{search_customer_objid}, 'C_', '')
|
AND (
|
||||||
|
CM.CUSTOMER_OBJID = #{search_customer_objid}
|
||||||
|
OR CM.CUSTOMER_OBJID = REPLACE(#{search_customer_objid}, 'C_', '')
|
||||||
|
OR 'C_' || CM.CUSTOMER_OBJID = #{search_customer_objid}
|
||||||
|
)
|
||||||
</if>
|
</if>
|
||||||
<!-- 유/무상 검색 -->
|
<!-- 유/무상 검색 -->
|
||||||
<if test="search_paid_type != null and search_paid_type != ''">
|
<if test="search_paid_type != null and search_paid_type != ''">
|
||||||
@@ -3077,10 +3081,10 @@
|
|||||||
</if>
|
</if>
|
||||||
<!-- 요청납기 검색 -->
|
<!-- 요청납기 검색 -->
|
||||||
<if test="search_req_del_date_from != null and search_req_del_date_from != ''">
|
<if test="search_req_del_date_from != null and search_req_del_date_from != ''">
|
||||||
<![CDATA[AND COALESCE(CI.DUE_DATE, PM.DUE_DATE, CM.REQ_DEL_DATE) >= TO_DATE(#{search_req_del_date_from}, 'YYYY-MM-DD')]]>
|
<![CDATA[AND COALESCE(CI.DUE_DATE, PM.DUE_DATE, CM.REQ_DEL_DATE) >= #{search_req_del_date_from}]]>
|
||||||
</if>
|
</if>
|
||||||
<if test="search_req_del_date_to != null and search_req_del_date_to != ''">
|
<if test="search_req_del_date_to != null and search_req_del_date_to != ''">
|
||||||
<![CDATA[AND COALESCE(CI.DUE_DATE, PM.DUE_DATE, CM.REQ_DEL_DATE) < TO_DATE(#{search_req_del_date_to}, 'YYYY-MM-DD') + INTERVAL '1 day']]>
|
<![CDATA[AND COALESCE(CI.DUE_DATE, PM.DUE_DATE, CM.REQ_DEL_DATE) <= #{search_req_del_date_to}]]>
|
||||||
</if>
|
</if>
|
||||||
<!-- 품번 검색 (대소문자 구분 없음) -->
|
<!-- 품번 검색 (대소문자 구분 없음) -->
|
||||||
<if test="search_part_no != null and search_part_no != ''">
|
<if test="search_part_no != null and search_part_no != ''">
|
||||||
|
|||||||
@@ -711,10 +711,9 @@
|
|||||||
,DEFECT.INSPECTOR_NAME_DISPLAY AS INSPECTOR_NAME
|
,DEFECT.INSPECTOR_NAME_DISPLAY AS INSPECTOR_NAME
|
||||||
/* 검사일: YYYY-MM-DD 외 N건 형태 */
|
/* 검사일: YYYY-MM-DD 외 N건 형태 */
|
||||||
,DEFECT.INSPECTION_DATE_DISPLAY AS INSPECTION_DATE
|
,DEFECT.INSPECTION_DATE_DISPLAY AS INSPECTION_DATE
|
||||||
/* 검사결과: 하나라도 NG면 NG, 검사 대상(스킵 제외) 모두 검사완료면 OK, 일부만 검사면 검사중 */
|
/* 검사현황: 불량상세 처리결과(ACTION_RESULT)가 전부 있으면 완료, 일부만 있으면 진행중 */
|
||||||
,(CASE WHEN DEFECT.NG_COUNT > 0 THEN 'NG'
|
,(CASE WHEN DEFECT.DEFECT_TOTAL_COUNT > 0 AND DEFECT.DEFECT_TOTAL_COUNT = DEFECT.ACTION_RESULT_COUNT THEN '완료'
|
||||||
WHEN DEFECT.INSPECTION_TARGET_COUNT > 0 AND DEFECT.INSPECTION_TARGET_COUNT = DEFECT.INSPECTED_COUNT THEN 'OK'
|
WHEN DEFECT.ACTION_RESULT_COUNT > 0 THEN '진행중'
|
||||||
WHEN DEFECT.INSPECTED_COUNT > 0 THEN '검사중'
|
|
||||||
ELSE '' END) AS INSPECTION_RESULT
|
ELSE '' END) AS INSPECTION_RESULT
|
||||||
|
|
||||||
/* 검사여부: 검사가 하나라도 있으면 '검사', 모두 스킵이면 '스킵', 아무것도 없으면 빈값 */
|
/* 검사여부: 검사가 하나라도 있으면 '검사', 모두 스킵이면 '스킵', 아무것도 없으면 빈값 */
|
||||||
@@ -764,6 +763,10 @@
|
|||||||
END AS INSPECTION_DATE_DISPLAY
|
END AS INSPECTION_DATE_DISPLAY
|
||||||
/* 검사 대상 건수 (스킵 제외, 검사인 항목만) */
|
/* 검사 대상 건수 (스킵 제외, 검사인 항목만) */
|
||||||
,COUNT(CASE WHEN IID2.INSPECTION_YN = '검사' THEN 1 END) AS INSPECTION_TARGET_COUNT
|
,COUNT(CASE WHEN IID2.INSPECTION_YN = '검사' THEN 1 END) AS INSPECTION_TARGET_COUNT
|
||||||
|
/* 불량상세 테이블 전체 건수 (검사인 항목 기준) */
|
||||||
|
,COUNT(CASE WHEN IID2.INSPECTION_YN = '검사' THEN IDF.OBJID END) AS DEFECT_TOTAL_COUNT
|
||||||
|
/* 처리결과(ACTION_RESULT) 입력된 건수 */
|
||||||
|
,COUNT(CASE WHEN IID2.INSPECTION_YN = '검사' AND IDF.ACTION_RESULT IS NOT NULL AND IDF.ACTION_RESULT != '' THEN 1 END) AS ACTION_RESULT_COUNT
|
||||||
/* 검사결과 입력된 건수 */
|
/* 검사결과 입력된 건수 */
|
||||||
,COUNT(CASE WHEN IDF.INSPECTION_RESULT IS NOT NULL AND IDF.INSPECTION_RESULT != '' THEN 1 END) AS INSPECTED_COUNT
|
,COUNT(CASE WHEN IDF.INSPECTION_RESULT IS NOT NULL AND IDF.INSPECTION_RESULT != '' THEN 1 END) AS INSPECTED_COUNT
|
||||||
,COUNT(CASE WHEN IDF.INSPECTION_RESULT = 'NG' THEN 1 END) AS NG_COUNT
|
,COUNT(CASE WHEN IDF.INSPECTION_RESULT = 'NG' THEN 1 END) AS NG_COUNT
|
||||||
@@ -885,6 +888,40 @@
|
|||||||
AND REQ.DELIVERY_TOTAL_COUNT = REQ.SELECTED_COUNT
|
AND REQ.DELIVERY_TOTAL_COUNT = REQ.SELECTED_COUNT
|
||||||
AND REQ.SELECTED_COUNT > 0
|
AND REQ.SELECTED_COUNT > 0
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 제품구분 검색 -->
|
||||||
|
<if test="search_product_cd != null and search_product_cd != ''">
|
||||||
|
AND CM.PRODUCT = #{search_product_cd}
|
||||||
|
</if>
|
||||||
|
<!-- 검사여부 검색 -->
|
||||||
|
<if test="search_inspection_yn != null and search_inspection_yn != ''">
|
||||||
|
<if test="search_inspection_yn == '검사'">
|
||||||
|
AND IID.INSPECTION_YN_COUNT > 0
|
||||||
|
</if>
|
||||||
|
<if test="search_inspection_yn == '스킵'">
|
||||||
|
AND IID.SKIP_YN_COUNT > 0 AND IID.INSPECTION_YN_COUNT = 0
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<!-- 요청현황 검색 -->
|
||||||
|
<if test="search_request_status != null and search_request_status != ''">
|
||||||
|
<if test="search_request_status == '미요청'">
|
||||||
|
AND REQ.DELIVERY_TOTAL_COUNT > 0 AND REQ.SELECTED_COUNT = 0
|
||||||
|
</if>
|
||||||
|
<if test="search_request_status == '요청중'">
|
||||||
|
AND REQ.SELECTED_COUNT > 0 AND REQ.SELECTED_COUNT <![CDATA[ < ]]> REQ.DELIVERY_TOTAL_COUNT
|
||||||
|
</if>
|
||||||
|
<if test="search_request_status == '요청완료'">
|
||||||
|
AND REQ.DELIVERY_TOTAL_COUNT > 0 AND REQ.SELECTED_COUNT = REQ.DELIVERY_TOTAL_COUNT
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<!-- 검사현황 검색 -->
|
||||||
|
<if test="search_inspection_status != null and search_inspection_status != ''">
|
||||||
|
<if test="search_inspection_status == '완료'">
|
||||||
|
AND DEFECT.DEFECT_TOTAL_COUNT > 0 AND DEFECT.DEFECT_TOTAL_COUNT = DEFECT.ACTION_RESULT_COUNT
|
||||||
|
</if>
|
||||||
|
<if test="search_inspection_status == '진행중'">
|
||||||
|
AND DEFECT.ACTION_RESULT_COUNT > 0 AND DEFECT.DEFECT_TOTAL_COUNT != DEFECT.ACTION_RESULT_COUNT
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
ORDER BY POM.REGDATE DESC
|
ORDER BY POM.REGDATE DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -1108,6 +1145,7 @@
|
|||||||
FROM PROCESS_INSPECTION_DETAIL PID WHERE PID.MASTER_OBJID = PIM.OBJID
|
FROM PROCESS_INSPECTION_DETAIL PID WHERE PID.MASTER_OBJID = PIM.OBJID
|
||||||
) AS INSPECTION_RESULT
|
) AS INSPECTION_RESULT
|
||||||
, PIM.REMARK
|
, PIM.REMARK
|
||||||
|
, (SELECT COUNT(*) FROM ATTACH_FILE_INFO F WHERE F.TARGET_OBJID = PIM.OBJID AND F.DOC_TYPE = 'PROCESS_INSPECTION_FILE' AND UPPER(F.STATUS) = 'ACTIVE') AS PROCESS_INSPECTION_FILE_CNT
|
||||||
FROM PROCESS_INSPECTION_MASTER PIM
|
FROM PROCESS_INSPECTION_MASTER PIM
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
/* 프로젝트번호 */
|
/* 프로젝트번호 */
|
||||||
@@ -2317,6 +2355,14 @@
|
|||||||
, IID.REMARK
|
, IID.REMARK
|
||||||
, IMI.PURCHASE_ORDER_MASTER_OBJID
|
, IMI.PURCHASE_ORDER_MASTER_OBJID
|
||||||
, POM.PURCHASE_ORDER_NO
|
, POM.PURCHASE_ORDER_NO
|
||||||
|
/* 불량수량 합계 (INCOMING_INSPECTION_DETAIL.DEFECT_QTY에 저장된 값 사용) */
|
||||||
|
, COALESCE(NULLIF(IID.DEFECT_QTY, '')::NUMERIC, 0) AS DEFECT_QTY_SUM
|
||||||
|
/* 불량율 (불량수량합계 / 입고수량 * 100) */
|
||||||
|
, CASE WHEN IMI.RECEIPT_QTY::NUMERIC > 0
|
||||||
|
THEN ROUND(COALESCE(NULLIF(IID.DEFECT_QTY, '')::NUMERIC, 0) / IMI.RECEIPT_QTY::NUMERIC * 100, 2)
|
||||||
|
ELSE NULL END AS LEFT_DEFECT_RATE
|
||||||
|
/* 검사성적서 파일 수 */
|
||||||
|
, (SELECT COUNT(*) FROM ATTACH_FILE_INFO AFI WHERE AFI.TARGET_OBJID = IID.OBJID AND AFI.DOC_TYPE = 'INSPECTION_REPORT' AND UPPER(AFI.STATUS) = 'ACTIVE') AS INSPECTION_FILE_CNT
|
||||||
FROM INVENTORY_MGMT_IN IMI
|
FROM INVENTORY_MGMT_IN IMI
|
||||||
INNER JOIN INVENTORY_MGMT IM ON IM.OBJID = IMI.PARENT_OBJID
|
INNER JOIN INVENTORY_MGMT IM ON IM.OBJID = IMI.PARENT_OBJID
|
||||||
INNER JOIN PART_MNG PM ON PM.OBJID::VARCHAR = IM.PART_OBJID
|
INNER JOIN PART_MNG PM ON PM.OBJID::VARCHAR = IM.PART_OBJID
|
||||||
|
|||||||
@@ -684,7 +684,8 @@ function fn_openPurchaseListPopup() {
|
|||||||
<label for="search_area_cd">국내/해외</label>
|
<label for="search_area_cd">국내/해외</label>
|
||||||
<select name="search_area_cd" id="search_area_cd" style="width:100px" class="select2">
|
<select name="search_area_cd" id="search_area_cd" style="width:100px" class="select2">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
${code_map.area_cd}
|
<option value="국내">국내</option>
|
||||||
|
<option value="해외">해외</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -259,6 +259,33 @@ function fn_deliveryAcceptanceViewPopUp(objId,DELIVERY_STATUS){
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
<td><label for="">제품구분</label></td>
|
||||||
|
<td>
|
||||||
|
<select name="search_product_cd" id="search_product_cd" class="select2" autocomplete="off" style="width:120px;">
|
||||||
|
<option value="">전체</option>
|
||||||
|
${code_map.product_cd}
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td><label for="">검사여부</label></td>
|
||||||
|
<td>
|
||||||
|
<select name="search_inspection_yn" id="search_inspection_yn" class="select2" autocomplete="off" style="width:120px;">
|
||||||
|
<option value="">전체</option>
|
||||||
|
<option value="검사">검사</option>
|
||||||
|
<option value="스킵">스킵</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td><label for="">요청현황</label></td>
|
||||||
|
<td>
|
||||||
|
<select name="search_request_status" id="search_request_status" class="select2" autocomplete="off" style="width:120px;">
|
||||||
|
<option value="">전체</option>
|
||||||
|
<option value="미요청">미요청</option>
|
||||||
|
<option value="요청중">요청중</option>
|
||||||
|
<option value="요청완료">요청완료</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td><label for="">요청자</label></td>
|
<td><label for="">요청자</label></td>
|
||||||
<td><select name="request_user_id" id="request_user_id" class="select2" autocomplete="off" style="width:120px;"><option value="">선택</option>${code_map.request_user_id}</select></td>
|
<td><select name="request_user_id" id="request_user_id" class="select2" autocomplete="off" style="width:120px;"><option value="">선택</option>${code_map.request_user_id}</select></td>
|
||||||
|
|
||||||
|
|||||||
@@ -320,6 +320,14 @@ function fn_deliveryAcceptanceViewPopUp(objId,DELIVERY_STATUS){
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
<td><label for="">제품구분</label></td>
|
||||||
|
<td>
|
||||||
|
<select name="search_product_cd" id="search_product_cd" class="select2" autocomplete="off" style="width:120px;">
|
||||||
|
<option value="">전체</option>
|
||||||
|
${code_map.product_cd}
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td><label for="">검사자</label></td>
|
<td><label for="">검사자</label></td>
|
||||||
<td><select name="inspector_id" id="inspector_id" class="select2" autocomplete="off" style="width:120px;"><option value="">선택</option>${code_map.inspector_id}</select></td>
|
<td><select name="inspector_id" id="inspector_id" class="select2" autocomplete="off" style="width:120px;"><option value="">선택</option>${code_map.inspector_id}</select></td>
|
||||||
|
|
||||||
@@ -329,12 +337,12 @@ function fn_deliveryAcceptanceViewPopUp(objId,DELIVERY_STATUS){
|
|||||||
<input type="text" name="inspection_end_date" id="inspection_end_date" style="width:100px;" autocomplete="off" value="${param.inspection_end_date }" class="date_icon">
|
<input type="text" name="inspection_end_date" id="inspection_end_date" style="width:100px;" autocomplete="off" value="${param.inspection_end_date }" class="date_icon">
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td><label for="">검사결과</label></td>
|
<td><label for="">검사현황</label></td>
|
||||||
<td>
|
<td>
|
||||||
<select name="search_inspection_result" id="search_inspection_result" class="select2" autocomplete="off" style="width:120px;">
|
<select name="search_inspection_status" id="search_inspection_status" class="select2" autocomplete="off" style="width:120px;">
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>
|
||||||
<option value="OK">OK</option>
|
<option value="완료">완료</option>
|
||||||
<option value="NG">NG</option>
|
<option value="진행중">진행중</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -889,12 +889,12 @@ public class ProductionPlanningController extends BaseService {
|
|||||||
public String mBomMgmt(HttpServletRequest request, @RequestParam Map paramMap){
|
public String mBomMgmt(HttpServletRequest request, @RequestParam Map paramMap){
|
||||||
Map code_map = new HashMap();
|
Map code_map = new HashMap();
|
||||||
try{
|
try{
|
||||||
// 주문유형 (0001406)
|
// 주문유형 (0000167)
|
||||||
code_map.put("category_cd", commonService.bizMakeOptionList("0001406", (String)paramMap.get("search_category_cd"), "common.getCodeselect"));
|
code_map.put("category_cd", commonService.bizMakeOptionList("0000167", (String)paramMap.get("search_category_cd"), "common.getCodeselect"));
|
||||||
// 제품구분 (0000001)
|
// 제품구분 (0000001)
|
||||||
code_map.put("product_cd", commonService.bizMakeOptionList("0000001", (String)paramMap.get("search_product_cd"), "common.getCodeselect"));
|
code_map.put("product_cd", commonService.bizMakeOptionList("0000001", (String)paramMap.get("search_product_cd"), "common.getCodeselect"));
|
||||||
// 국내/해외 (0001395)
|
// 국내/해외 (0000172)
|
||||||
code_map.put("area_cd", commonService.bizMakeOptionList("0001395", (String)paramMap.get("search_area_cd"), "common.getCodeselect"));
|
code_map.put("area_cd", commonService.bizMakeOptionList("0000172", (String)paramMap.get("search_area_cd"), "common.getCodeselect"));
|
||||||
// 고객사 (SUPPLY_MNG + CLIENT_MNG)
|
// 고객사 (SUPPLY_MNG + CLIENT_MNG)
|
||||||
code_map.put("customer_cd", commonService.bizMakeOptionList("", (String)paramMap.get("search_customer_objid"), "common.getAllSupplySelect"));
|
code_map.put("customer_cd", commonService.bizMakeOptionList("", (String)paramMap.get("search_customer_objid"), "common.getAllSupplySelect"));
|
||||||
|
|
||||||
|
|||||||
@@ -276,6 +276,8 @@ public class QualityController {
|
|||||||
code_map.put("partner_objid", commonService.bizMakeOptionList("", (String)paramMap.get("partner_objid"), "common.getClientMngSupplySelect"));
|
code_map.put("partner_objid", commonService.bizMakeOptionList("", (String)paramMap.get("partner_objid"), "common.getClientMngSupplySelect"));
|
||||||
// 요청자
|
// 요청자
|
||||||
code_map.put("request_user_id", commonService.bizMakeOptionList("", (String)paramMap.get("request_user_id"), "common.getUserselect"));
|
code_map.put("request_user_id", commonService.bizMakeOptionList("", (String)paramMap.get("request_user_id"), "common.getUserselect"));
|
||||||
|
// 제품구분
|
||||||
|
code_map.put("product_cd", commonService.bizMakeOptionList("0000001", (String)paramMap.get("search_product_cd"), "common.getCodeselect"));
|
||||||
|
|
||||||
list = commonService.selectListPaging("quality.getIncomingInspectionList", request, paramMap);
|
list = commonService.selectListPaging("quality.getIncomingInspectionList", request, paramMap);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
@@ -306,6 +308,8 @@ public class QualityController {
|
|||||||
code_map.put("partner_objid", commonService.bizMakeOptionList("", (String)paramMap.get("partner_objid"), "common.getClientMngSupplySelect"));
|
code_map.put("partner_objid", commonService.bizMakeOptionList("", (String)paramMap.get("partner_objid"), "common.getClientMngSupplySelect"));
|
||||||
// 검사자
|
// 검사자
|
||||||
code_map.put("inspector_id", commonService.bizMakeOptionList("", (String)paramMap.get("inspector_id"), "common.getUserselect"));
|
code_map.put("inspector_id", commonService.bizMakeOptionList("", (String)paramMap.get("inspector_id"), "common.getUserselect"));
|
||||||
|
// 제품구분
|
||||||
|
code_map.put("product_cd", commonService.bizMakeOptionList("0000001", (String)paramMap.get("search_product_cd"), "common.getCodeselect"));
|
||||||
|
|
||||||
list = commonService.selectListPaging("quality.getIncomingInspectionList", request, paramMap);
|
list = commonService.selectListPaging("quality.getIncomingInspectionList", request, paramMap);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
|
|||||||
@@ -3049,7 +3049,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<!-- 국내/해외 검색 -->
|
<!-- 국내/해외 검색 -->
|
||||||
<if test="search_area_cd != null and search_area_cd != ''">
|
<if test="search_area_cd != null and search_area_cd != ''">
|
||||||
AND CM.AREA_CD = #{search_area_cd}
|
AND CODE_NAME(CM.AREA_CD) = #{search_area_cd}
|
||||||
</if>
|
</if>
|
||||||
<!-- 접수일 검색 -->
|
<!-- 접수일 검색 -->
|
||||||
<if test="search_receipt_date_from != null and search_receipt_date_from != ''">
|
<if test="search_receipt_date_from != null and search_receipt_date_from != ''">
|
||||||
@@ -3060,7 +3060,11 @@
|
|||||||
</if>
|
</if>
|
||||||
<!-- 고객사 검색 -->
|
<!-- 고객사 검색 -->
|
||||||
<if test="search_customer_objid != null and search_customer_objid != ''">
|
<if test="search_customer_objid != null and search_customer_objid != ''">
|
||||||
AND CM.CUSTOMER_OBJID = REPLACE(#{search_customer_objid}, 'C_', '')
|
AND (
|
||||||
|
CM.CUSTOMER_OBJID = #{search_customer_objid}
|
||||||
|
OR CM.CUSTOMER_OBJID = REPLACE(#{search_customer_objid}, 'C_', '')
|
||||||
|
OR 'C_' || CM.CUSTOMER_OBJID = #{search_customer_objid}
|
||||||
|
)
|
||||||
</if>
|
</if>
|
||||||
<!-- 유/무상 검색 -->
|
<!-- 유/무상 검색 -->
|
||||||
<if test="search_paid_type != null and search_paid_type != ''">
|
<if test="search_paid_type != null and search_paid_type != ''">
|
||||||
@@ -3077,10 +3081,10 @@
|
|||||||
</if>
|
</if>
|
||||||
<!-- 요청납기 검색 -->
|
<!-- 요청납기 검색 -->
|
||||||
<if test="search_req_del_date_from != null and search_req_del_date_from != ''">
|
<if test="search_req_del_date_from != null and search_req_del_date_from != ''">
|
||||||
<![CDATA[AND COALESCE(CI.DUE_DATE, PM.DUE_DATE, CM.REQ_DEL_DATE) >= TO_DATE(#{search_req_del_date_from}, 'YYYY-MM-DD')]]>
|
<![CDATA[AND COALESCE(CI.DUE_DATE, PM.DUE_DATE, CM.REQ_DEL_DATE) >= #{search_req_del_date_from}]]>
|
||||||
</if>
|
</if>
|
||||||
<if test="search_req_del_date_to != null and search_req_del_date_to != ''">
|
<if test="search_req_del_date_to != null and search_req_del_date_to != ''">
|
||||||
<![CDATA[AND COALESCE(CI.DUE_DATE, PM.DUE_DATE, CM.REQ_DEL_DATE) < TO_DATE(#{search_req_del_date_to}, 'YYYY-MM-DD') + INTERVAL '1 day']]>
|
<![CDATA[AND COALESCE(CI.DUE_DATE, PM.DUE_DATE, CM.REQ_DEL_DATE) <= #{search_req_del_date_to}]]>
|
||||||
</if>
|
</if>
|
||||||
<!-- 품번 검색 (대소문자 구분 없음) -->
|
<!-- 품번 검색 (대소문자 구분 없음) -->
|
||||||
<if test="search_part_no != null and search_part_no != ''">
|
<if test="search_part_no != null and search_part_no != ''">
|
||||||
|
|||||||
@@ -888,6 +888,40 @@
|
|||||||
AND REQ.DELIVERY_TOTAL_COUNT = REQ.SELECTED_COUNT
|
AND REQ.DELIVERY_TOTAL_COUNT = REQ.SELECTED_COUNT
|
||||||
AND REQ.SELECTED_COUNT > 0
|
AND REQ.SELECTED_COUNT > 0
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 제품구분 검색 -->
|
||||||
|
<if test="search_product_cd != null and search_product_cd != ''">
|
||||||
|
AND CM.PRODUCT = #{search_product_cd}
|
||||||
|
</if>
|
||||||
|
<!-- 검사여부 검색 -->
|
||||||
|
<if test="search_inspection_yn != null and search_inspection_yn != ''">
|
||||||
|
<if test="search_inspection_yn == '검사'">
|
||||||
|
AND IID.INSPECTION_YN_COUNT > 0
|
||||||
|
</if>
|
||||||
|
<if test="search_inspection_yn == '스킵'">
|
||||||
|
AND IID.SKIP_YN_COUNT > 0 AND IID.INSPECTION_YN_COUNT = 0
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<!-- 요청현황 검색 -->
|
||||||
|
<if test="search_request_status != null and search_request_status != ''">
|
||||||
|
<if test="search_request_status == '미요청'">
|
||||||
|
AND REQ.DELIVERY_TOTAL_COUNT > 0 AND REQ.SELECTED_COUNT = 0
|
||||||
|
</if>
|
||||||
|
<if test="search_request_status == '요청중'">
|
||||||
|
AND REQ.SELECTED_COUNT > 0 AND REQ.SELECTED_COUNT <![CDATA[ < ]]> REQ.DELIVERY_TOTAL_COUNT
|
||||||
|
</if>
|
||||||
|
<if test="search_request_status == '요청완료'">
|
||||||
|
AND REQ.DELIVERY_TOTAL_COUNT > 0 AND REQ.SELECTED_COUNT = REQ.DELIVERY_TOTAL_COUNT
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<!-- 검사현황 검색 -->
|
||||||
|
<if test="search_inspection_status != null and search_inspection_status != ''">
|
||||||
|
<if test="search_inspection_status == '완료'">
|
||||||
|
AND DEFECT.DEFECT_TOTAL_COUNT > 0 AND DEFECT.DEFECT_TOTAL_COUNT = DEFECT.ACTION_RESULT_COUNT
|
||||||
|
</if>
|
||||||
|
<if test="search_inspection_status == '진행중'">
|
||||||
|
AND DEFECT.ACTION_RESULT_COUNT > 0 AND DEFECT.DEFECT_TOTAL_COUNT != DEFECT.ACTION_RESULT_COUNT
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
ORDER BY POM.REGDATE DESC
|
ORDER BY POM.REGDATE DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user