|
|
|
|
@ -20,7 +20,6 @@ |
|
|
|
|
<result column="UNIT" property="unit"/> |
|
|
|
|
<result column="QUOTATION" property="quotation"/> |
|
|
|
|
<result column="ROS_STATUS" property="rosStatus"/> |
|
|
|
|
<result column="APPROVAL_STATUS" property="approvalStatus"/> |
|
|
|
|
<result column="MEMO" property="memo"/> |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
@ -42,7 +41,6 @@ |
|
|
|
|
<result column="UNIT" property="unit"/> |
|
|
|
|
<result column="QUOTATION" property="quotation"/> |
|
|
|
|
<result column="ROS_STATUS" property="rosStatus"/> |
|
|
|
|
<result column="APPROVAL_STATUS" property="approvalStatus"/> |
|
|
|
|
<result column="MEMO" property="memo"/> |
|
|
|
|
<result column="SETTLE_TIME" property="settleTime"/> |
|
|
|
|
<result column="APPROVAL_TIME" property="approvalTime"/> |
|
|
|
|
@ -99,133 +97,9 @@ |
|
|
|
|
<result column="SETTLE_DATE" property="settleDate"/> |
|
|
|
|
<result column="APPROVAL_DATE" property="approvalDate"/> |
|
|
|
|
<result column="PUSH_DATE" property="pushDate"/> |
|
|
|
|
<result column="PRODUCT_IDENT" property="productIdent"/> |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
<!-- <select id="selectOemStatementPage" resultMap="StatementVOResultMap">--> |
|
|
|
|
<!-- SELECT--> |
|
|
|
|
<!-- wm_concat(to_char(f.WO_CODE)) as WO_CODE,--> |
|
|
|
|
<!-- wm_concat(to_char(e.PART_CODE)) AS part_code,--> |
|
|
|
|
<!-- d.BATCH_NO,--> |
|
|
|
|
<!-- wm_concat(to_char(e.PRODUCT_IDENT)) AS PROD_IDENT,--> |
|
|
|
|
<!-- -- g.BOP_NAME,--> |
|
|
|
|
<!-- wm_concat(g.MANUAL) AS MANUAL,--> |
|
|
|
|
<!-- wm_concat(to_char(d.PUT_STORE_TIME, 'yyyy-MM-dd')) AS PUT_STORE_TIME,--> |
|
|
|
|
<!-- wm_concat(d.MAKE_QTY) AS MAKE_QTY,--> |
|
|
|
|
<!-- wm_concat(to_char(e.YP_AREA, 'fm99999999999999999990.9999999999')) AS YP_AREA,--> |
|
|
|
|
<!-- sum(d.MAKE_QTY * e.YP_AREA) AS total_area,--> |
|
|
|
|
<!-- c.OC_NAME,--> |
|
|
|
|
<!-- wm_concat(to_char(e.PLATE)) AS PLATE,--> |
|
|
|
|
<!-- wm_concat(to_char(f.ID)) AS wor_id,--> |
|
|
|
|
<!-- wm_concat(to_char(p.plate_thickness)) AS plate_thickness,--> |
|
|
|
|
<!-- d.id as WO_ID,--> |
|
|
|
|
<!-- c.id as OC_ID,--> |
|
|
|
|
<!-- g.id as OP_ID,--> |
|
|
|
|
<!-- a.id as WP_ID,--> |
|
|
|
|
<!-- h.id,--> |
|
|
|
|
<!-- wm_concat(to_char(h.UNIT_PRICE)) AS UNIT_PRICE,--> |
|
|
|
|
<!-- wm_concat(to_char(h.UNIT)) AS UNIT,--> |
|
|
|
|
<!-- wm_concat(to_char(h.TOTAL_PRICE)) AS TOTAL_PRICE,--> |
|
|
|
|
<!-- wm_concat(to_char(h.QUOTATION)) AS QUOTATION,--> |
|
|
|
|
<!-- wm_concat(to_char(h.MEMO)) AS MEMO,--> |
|
|
|
|
<!-- wm_concat(to_char(h.APPROVAL_STATUS)) AS APPROVAL_STATUS,--> |
|
|
|
|
<!-- MAX( h.UPDATE_TIME) AS UPDATE_TIME,--> |
|
|
|
|
<!-- wm_concat(to_char(NVL(h.ROS_STATUS, 1))) AS ROS_STATUS,--> |
|
|
|
|
<!-- wm_concat(to_char(p.plate_code)) AS plate_code,--> |
|
|
|
|
<!-- wm_concat(to_char(p.plate_goods_code)) AS plate_goods_code,--> |
|
|
|
|
<!-- c.code as OC_CODE,--> |
|
|
|
|
<!-- a.HOUR_QUOTA,--> |
|
|
|
|
<!-- wm_concat(to_char(a.scrap_qty)) AS scrap_qty,--> |
|
|
|
|
<!-- wm_concat(to_char(a.loss_qty)) AS loss_qty,--> |
|
|
|
|
<!-- wm_concat(to_char(a.test_qty)) AS test_qty,--> |
|
|
|
|
<!-- wm_concat(to_char(p.tsb_num)) AS tsb_num,--> |
|
|
|
|
<!-- wm_concat(to_char(p.tsd_num)) AS tsd_num,--> |
|
|
|
|
<!-- wm_concat(to_char(p.tjt_num)) AS tjt_num,--> |
|
|
|
|
<!-- e.yo_code,--> |
|
|
|
|
<!-- b.code AS ps_code,--> |
|
|
|
|
<!-- b.name AS ps_name,--> |
|
|
|
|
<!-- i.ca_name,--> |
|
|
|
|
<!-- wm_concat(to_char(p.part_name)) AS part_name,--> |
|
|
|
|
<!-- wm_concat(to_char(h.ros_thickness)) AS ros_thickness,--> |
|
|
|
|
<!-- e.use_dept,--> |
|
|
|
|
<!-- wm_concat(to_char(h.id)) AS ros_id--> |
|
|
|
|
<!-- FROM MES_WORK_PLAN a--> |
|
|
|
|
<!-- INNER JOIN BS_PROCESS_SET b on a.PPS_ID = b.ID--> |
|
|
|
|
<!-- INNER JOIN MES_OEM_PROCESS g ON b.ID = g.PROCESS_ID--> |
|
|
|
|
<!-- INNER JOIN BS_OEM c on a.OC_ID = c.ID--> |
|
|
|
|
<!-- INNER JOIN MES_WORK_ORDER d on a.WO_ID = d.ID--> |
|
|
|
|
<!-- INNER JOIN MES_YIELD_ORDER e on d.YO_ID = e.ID--> |
|
|
|
|
<!-- INNER JOIN MES_WORK_ORDER_RUN f on d.WOR_ID = f.ID--> |
|
|
|
|
<!-- INNER JOIN DS_PART p ON e.PART_CODE = p.PART_CODE--> |
|
|
|
|
<!-- LEFT JOIN MES_OEM_STATEMENT h ON h.WP_ID = a.ID--> |
|
|
|
|
<!-- INNER JOIN BS_CRAFT_ABILITY I on I.ID = a.CA_ID--> |
|
|
|
|
<!-- WHERE d.PUT_STORE_TIME is not null--> |
|
|
|
|
<!-- /*AND (g.craft_ids like '%'||i.ID||'%' or g.craft_ids is null)--> |
|
|
|
|
<!-- and ((g.bop_name in ('浸保护剂','除镀层','清洗(返修)') and e.po_code not like 'W%') OR g.bop_name not in--> |
|
|
|
|
<!-- ('浸保护剂','除镀层','清洗(返修)'))*/--> |
|
|
|
|
<!-- /*AND ((h.ROS_STATUS IS NOT NULL) OR ( a.ID NOT IN ( SELECT WP_ID FROM MES_OEM_STATEMENT)))*/--> |
|
|
|
|
<!-- <choose>--> |
|
|
|
|
<!-- <!– 查询未结算的记录 –>--> |
|
|
|
|
<!-- <when test="query.rosStatusList != null and query.rosStatusList.contains("1")">--> |
|
|
|
|
<!-- AND a.ID NOT IN ( SELECT WP_ID FROM MES_OEM_STATEMENT)--> |
|
|
|
|
<!-- </when>--> |
|
|
|
|
<!-- <!– 查询已结算状态的记录 –>--> |
|
|
|
|
<!-- <when test="query.rosStatusList != null and query.rosStatusList != ''">--> |
|
|
|
|
<!-- AND h.ROS_STATUS IN--> |
|
|
|
|
<!-- <foreach collection="query.rosStatusList.split(',')" item="status"--> |
|
|
|
|
<!-- open="(" separator="," close=")" index="index">--> |
|
|
|
|
<!-- #{status}--> |
|
|
|
|
<!-- </foreach>--> |
|
|
|
|
<!-- </when>--> |
|
|
|
|
<!-- </choose>--> |
|
|
|
|
<!-- <!– 动态条件拼接 –>--> |
|
|
|
|
<!-- <if test="query.postPlatingStorageTimeStart != null">--> |
|
|
|
|
<!-- AND d.PUT_STORE_TIME >= #{query.postPlatingStorageTimeStart}--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- <if test="query.postPlatingStorageTimeEnd != null">--> |
|
|
|
|
<!-- AND d.PUT_STORE_TIME < #{query.postPlatingStorageTimeEnd} + 1--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- <if test="query.prodIdent != null and query.prodIdent != ''">--> |
|
|
|
|
<!-- AND e.PRODUCT_IDENT = #{query.prodIdent}--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- <if test="query.manual != null and query.manual != ''">--> |
|
|
|
|
<!-- AND g.manual = #{query.manual}--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- <if test="query.woCode != null and query.woCode != ''">--> |
|
|
|
|
<!-- AND (f.WO_CODE LIKE CONCAT('%', CONCAT(#{query.woCode}, '%')) OR d.WO_CODE LIKE CONCAT('%',--> |
|
|
|
|
<!-- CONCAT(#{query.woCode}, '%')))--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- <if test="query.partCode != null and query.partCode != ''">--> |
|
|
|
|
<!-- AND e.PART_CODE LIKE CONCAT('%', CONCAT(#{query.partCode}, '%'))--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- <if test="query.batchNo != null and query.batchNo != ''">--> |
|
|
|
|
<!-- AND d.BATCH_NO LIKE CONCAT('%', CONCAT(#{query.batchNo}, '%'))--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- <if test="query.ocIds != null and query.ocIds != ''">--> |
|
|
|
|
<!-- AND c.ID IN--> |
|
|
|
|
<!-- <foreach collection="query.ocIds.split(',')" item="id"--> |
|
|
|
|
<!-- open="(" separator="," close=")" index="index">--> |
|
|
|
|
<!-- #{id}--> |
|
|
|
|
<!-- </foreach>--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- <if test="query.psCode != null and query.psCode != ''">--> |
|
|
|
|
<!-- AND g.oem_process_code IN--> |
|
|
|
|
<!-- <foreach collection="query.psCode.split(',')" item="id"--> |
|
|
|
|
<!-- open="(" separator="," close=")" index="index">--> |
|
|
|
|
<!-- #{id}--> |
|
|
|
|
<!-- </foreach>--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- <if test="query.approvalStatusList != null and query.approvalStatusList != ''">--> |
|
|
|
|
<!-- AND h.APPROVAL_STATUS IN--> |
|
|
|
|
<!-- <foreach collection="query.approvalStatusList.split(',')" item="status"--> |
|
|
|
|
<!-- open="(" separator="," close=")" index="index">--> |
|
|
|
|
<!-- #{status}--> |
|
|
|
|
<!-- </foreach>--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- GROUP BY g.PROCESS_ID, a.ID, c.OC_NAME, c.ID, g.ID, d.ID, d.BATCH_NO, c.CODE, a.HOUR_QUOTA, e.yo_code,--> |
|
|
|
|
<!-- i.ca_name, e.use_dept,b.name,b.code,h.id--> |
|
|
|
|
<!-- </select>--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="exportOemStatement" resultType="org.springblade.desk.oem.pojo.excel.OemStatementExcel"> |
|
|
|
|
SELECT * |
|
|
|
|
FROM MES_OEM_STATEMENT ${ew.customSqlSegment} |
|
|
|
|
@ -244,7 +118,8 @@ |
|
|
|
|
d.REWORK_CODE, |
|
|
|
|
d.REWORK_NO, |
|
|
|
|
d.wo_code, |
|
|
|
|
to_char(d.PUT_STORE_TIME, 'yyyy-MM-dd') AS PUT_STORE_TIME, |
|
|
|
|
d.PUT_STORE_TIME AS PUT_STORE_TIME, |
|
|
|
|
to_char(h.PUT_STORE_TIME, 'yyyy-MM-dd') as PUT_STORE_DATE, |
|
|
|
|
d.MAKE_QTY, |
|
|
|
|
d.MAKE_QTY * e.YP_AREA AS total_area, |
|
|
|
|
e.PLATE_THICKNESS1 as ROS_THICKNESS, |
|
|
|
|
@ -252,7 +127,7 @@ |
|
|
|
|
e.PLAN_DEPTCODE, |
|
|
|
|
e.plate, |
|
|
|
|
e.PART_CODE, |
|
|
|
|
e.PRODUCT_IDENT as PROD_IDENT, |
|
|
|
|
e.PRODUCT_IDENT, |
|
|
|
|
e.tsb_num AS tsb_num, |
|
|
|
|
e.tsd_num AS tsd_num, |
|
|
|
|
e.tjt_num AS tjt_num, |
|
|
|
|
@ -261,6 +136,7 @@ |
|
|
|
|
e.RES_DEPT as RES_DEPT, |
|
|
|
|
e.USE_DEPT as USE_DEPT, |
|
|
|
|
e.USE_DEPT_CODE AS USE_DEPT_CODE, |
|
|
|
|
e.BATCH_NO, |
|
|
|
|
g.manual, |
|
|
|
|
g.CRAFT_IDS, |
|
|
|
|
i.WX_LIMIT, |
|
|
|
|
@ -272,7 +148,6 @@ |
|
|
|
|
INNER JOIN BS_OEM c ON a.OC_ID = c.ID AND c.IS_DELETED = 0 |
|
|
|
|
INNER JOIN MES_WORK_ORDER d ON a.WO_ID = d.ID AND d.IS_DELETED = 0 |
|
|
|
|
INNER JOIN MES_YIELD_ORDER e ON d.YO_ID = e.ID AND e.IS_DELETED = 0 |
|
|
|
|
-- INNER JOIN MES_WORK_ORDER_RUN f on d.WOR_ID = f.ID AND f.IS_DELETED = 0 |
|
|
|
|
INNER JOIN MES_OEM_PROCESS g ON b.ID = g.PROCESS_ID AND g.IS_DELETED = 0 |
|
|
|
|
LEFT JOIN MES_OEM_STATEMENT h ON h.WP_ID = a.ID AND h.IS_DELETED = 0 |
|
|
|
|
INNER JOIN BS_CRAFT_ABILITY i ON i.ID = a.CA_ID AND i.IS_DELETED = 0 |
|
|
|
|
@ -284,7 +159,6 @@ |
|
|
|
|
AND d.PUT_STORE_TIME >= #{postPlatingStorageTimeStart} |
|
|
|
|
</if> |
|
|
|
|
<if test="woCode != null and woCode != ''"> |
|
|
|
|
-- AND (f.WO_CODE LIKE CONCAT('%', CONCAT(#{woCode}, '%')) OR d.WO_CODE LIKE CONCAT('%', CONCAT(#{woCode}, '%'))) |
|
|
|
|
AND d.WO_CODE LIKE CONCAT('%', CONCAT(#{woCode}, '%')) |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
@ -327,7 +201,8 @@ |
|
|
|
|
h.TJT_NUM, |
|
|
|
|
h.PLAN_DEPTCODE, |
|
|
|
|
h.USE_DEPT_CODE, |
|
|
|
|
to_char(h.PUT_STORE_TIME, 'yyyy-MM-dd') as PUT_STORE_TIME, |
|
|
|
|
h.PUT_STORE_TIME, |
|
|
|
|
to_char(h.PUT_STORE_TIME, 'yyyy-MM-dd') as PUT_STORE_DATE, |
|
|
|
|
h.QUOTATION, |
|
|
|
|
h.UNIT, |
|
|
|
|
h.UNIT_PRICE, |
|
|
|
|
@ -367,8 +242,6 @@ |
|
|
|
|
AND g.manual = #{query.manual} |
|
|
|
|
</if> |
|
|
|
|
<if test="query.woCode != null and query.woCode != ''"> |
|
|
|
|
-- AND (f.WO_CODE LIKE CONCAT('%', CONCAT(#{query.woCode}, '%')) OR d.WO_CODE LIKE CONCAT('%', |
|
|
|
|
-- CONCAT(#{query.woCode}, '%'))) |
|
|
|
|
AND h.WO_CODE LIKE CONCAT('%', CONCAT(#{query.woCode}, '%')) |
|
|
|
|
</if> |
|
|
|
|
<if test="query.partCode != null and query.partCode != ''"> |
|
|
|
|
@ -391,13 +264,6 @@ |
|
|
|
|
#{id} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="query.approvalStatusList != null and query.approvalStatusList != ''"> |
|
|
|
|
AND h.APPROVAL_STATUS IN |
|
|
|
|
<foreach collection="query.approvalStatusList.split(',')" item="status" |
|
|
|
|
open="(" separator="," close=")" index="index"> |
|
|
|
|
#{status} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
order by PUT_STORE_TIME desc |
|
|
|
|
</select> |
|
|
|
|
|