|
|
|
@ -581,6 +581,27 @@
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
and status in('w2','w3')
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getUnReadComment" resultType="com.op.plan.domain.ProOrderWorkorder">
|
|
|
|
|
select
|
|
|
|
|
concat(pow.product_date,' ',bdd.dict_value) productDateStr,
|
|
|
|
|
pow.workorder_code workorderCode,
|
|
|
|
|
pow.workorder_code_sap workorderCodeSap,
|
|
|
|
|
pow.product_code productCode,
|
|
|
|
|
pow.product_name productName,
|
|
|
|
|
pow.prod_line_code prodLineCode,
|
|
|
|
|
pow.quantity_split quantitySplit,
|
|
|
|
|
pow.unit,
|
|
|
|
|
bst.Shift_Desc shiftId,
|
|
|
|
|
DATEDIFF(HOUR, CONVERT(DATETIME, concat(pow.product_date,' ',bdd.dict_value)), GETDATE()) difHours
|
|
|
|
|
from pro_order_workorder pow
|
|
|
|
|
left join base_dict_data bdd on bdd.dict_type ='work_order_start' and bdd.dict_label = pow.shift_id
|
|
|
|
|
left join base_shifts_t bst on bst.Shift_Id = pow.shift_id
|
|
|
|
|
where pow.status='w1' and DATEDIFF(HOUR, CONVERT(DATETIME, concat(pow.product_date,' ',bdd.dict_value)), GETDATE()) >= 1
|
|
|
|
|
and pow.del_flag = '0' and bst.del_flag = '0'
|
|
|
|
|
and (pow.product_date = CONVERT(varchar(10),GETDATE(), 120)
|
|
|
|
|
or pow.product_date = CONVERT(varchar(10),DATEADD(DAY, -1, GETDATE()), 120))
|
|
|
|
|
order by pow.product_date desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="createPrepareDetails">
|
|
|
|
|
insert into mes_prepare_detail
|
|
|
|
|