From 5250b84875d8e9255d1f35b1bc8d2797c93918a9 Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Fri, 23 May 2025 10:22:44 +0800 Subject: [PATCH] 2025-05-23 --- .../TechnicalSpecificationMapper.xml | 3614 ++++++++++------- 1 file changed, 2251 insertions(+), 1363 deletions(-) diff --git a/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml b/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml index 16f955e4..1a1a3ed1 100644 --- a/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml +++ b/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml @@ -1,7 +1,6 @@ - @@ -70,1284 +69,2168 @@ - + SELECT a.id, + a.site, + a.code_no as codeNo, + a.project_id as projectId, + a.test_part_no as testPartNo, + a.status, + a.rev_no as revNo, + a.work_center_no as workCenterNo, + a.ECN_flag as ecnFlag, + a.ECN_no as ecnNo, + a.ori_code_no as oriCodeNo, + a.ECN_address as ecnAddress, + a.remark, + a.create_date as createDate, + a.create_by as createBy, + a.update_date as updateDate, + a.update_by as updateBy, + b.final_part_no as finalPartNo, + b.part_type as partTypeDesc, + b.part_type as partType, + b.part_name as partName, + b.part_desc as partDesc, + b.part_spec as partSpec, + dbo.plm_get_technicalBaseDesc(a.status, 'status') as statusDesc, + a.proofing_no as proofingNo, + b.bu_no as buNo, + dbo.plm_get_bu_desc(a.site, b.bu_no) as buDesc, + dbo.get_technicalSpecificationTeamName(a.site, a.code_no, 'engineer') as engineer, + dbo.get_technicalSpecificationTeamName(a.site, a.code_no, 'technician') as technician, + process, + dbo.get_technicalSpecificationTeamName(a.site, a.code_no, 'quotationOfficer') as quotationOfficer, + dbo.get_technicalSpecificationTeamNo(a.site, a.code_no, 'engineer') as engineerNo, + dbo.get_technicalSpecificationTeamNo(a.site, a.code_no, 'technician') as technicianNo, + c.customer_Id as customerId, + a.picture_addess as pictureAddess, + a.customerPictureChangeRemark, + a.productionFileComments, + a.bom_type as bomType, + a.eng_chg_level as engChgLevel, + a.bom_alternative_no as bomAlternativeNo, + a.routing_type as routingType, + a.routing_revision as routingRevision, + a.routing_alternative_no as routingAlternativeNo, + a.pod, + a.mpOperator, + dbo.get_userDisPlay(a.mpOperator) as mpOperatorName, + a.cqcOperator, + dbo.get_userDisPlay(a.cqcOperator) as cqcOperatorName, + a.faiOperator, + dbo.get_userDisPlay(a.faiOperator) as faiOperatorName, + a.peOperater, + dbo.get_userDisPlay(a.peOperater) as peOperaterName, + a.csOperater, + dbo.get_userDisPlay(a.csOperater) as csOperaterName, + dbo.get_technicalSpecificationTeamNo(a.site, a.code_no, 'dcc') as dccOperater, + dbo.get_technicalSpecificationTeamNames(a.site, a.code_no, 'dcc') as dccOperaterName, + d.is_reject as isReject, + d.node_id as nodeId, + d.node_name as nodeName, + pcpi.customer_part_no as customerPartNo, + dbo.get_plm_Approval_username(a.site, prh.workflow_id, d.node_id, a.code_no) as sp, + a.remarkPage, + a.rev, + a.customer_rev as customerRev, + b.plm_part_no as plmPartNo, + c.project_name as projectName + FROM plm_technical_specification_sheet a + left join view_Project_final_Part b + on a.site = b.site and a.project_id = b.project_id and a.test_part_no = b.test_part_no + left join plm_project_info c on a.site = c.site and a.project_id = c.project_id + left join plm_request_header as prh on a.site = prh.site and prh.menu_id = '103002' + left join plm_request_node as d on a.site = d.site and prh.classification_no = d.classification_no and + prh.workflow_id = d.workflow_id and a.step_id = d.step_id + left join plm_customer_part_info pcpi + on a.site = pcpi.site and a.test_part_no = pcpi.part_no and c.customer_id = pcpi.customer_no + + inner join plm_bm_prepress pbp on pbp.Site = a.site and pbp.code_no = a.code_no and + (plateNo like #{query.cutterNumber} or + cutterNumber like #{query.cutterNumber}) - - order by a.ori_code_no desc, a.rev_no desc - - - - insert into plm_technical_specification_sheet(site, code_no, project_id, test_part_no, status, rev_no, ECN_flag, - ECN_no, ECN_address, remark, - create_date, create_by, proofing_no, ori_code_no, bom_type, - eng_chg_level, bom_alternative_no, routing_type, routing_revision, - routing_alternative_no, stage, materialType, step_id - , cqcOperator, faiOperator, peOperater, csOperater, mpOperator, rev, customer_rev,certification) - values ( #{site}, #{codeNo}, #{projectId}, #{testPartNo}, #{status}, #{revNo}, #{ecnFlag}, #{ecnNo}, #{ecnAddress} - , #{remark}, GetDate(), #{createBy}, #{proofingNo}, #{oriCodeNo}, #{bomType}, #{engChgLevel,jdbcType=INTEGER} - , #{bomAlternativeNo}, #{routingType}, #{routingRevision,jdbcType=INTEGER}, #{routingAlternativeNo}, 'Sample' - , 'Label', 10 - , #{cqcOperator}, #{faiOperator}, #{peOperater}, #{csOperater}, #{mpOperator}, #{rev}, #{customerRev},'RoHs') - - - - update plm_project_part set now_bm=#{codeNo} where site=#{site} and project_id=#{projectId} and test_part_no=#{testPartNo} - - - - insert into plm_technicalSpecification_team (site,code_no,operator_id,type) - values (#{site},#{codeNo},#{operatorId},#{type}) - - - insert into plm_technicalSpecification_team (site,code_no,operator_id,type) - values + + + AND a.id = #{query.id} + + + AND a.site = #{query.site} + + + AND a.ecn_flag = #{query.ecnFlag} + + + AND a.ori_code_no like #{query.oriCodeNo} + + + AND a.code_no like #{query.codeNo} + + + AND a.project_id like #{query.projectId} + + + AND ( + a.test_part_no like #{query.testPartNo} or + b.final_part_no like #{query.testPartNo} or + a.relevance_part_no like #{query.testPartNo} or + pcpi.customer_part_no like #{query.testPartNo} + ) + + + AND ( + dbo.plm_get_customer_desc(c.site, c.customer_id) like #{query.customerDesc} or + dbo.plm_get_dictDataLabel('finalCustomer', c.final_customer_id, c.site) like #{query.customerDesc} + ) + + + AND dbo.plm_get_technicalBaseDesc(a.status, 'status') like #{query.statusDesc} + + + AND b.bu_no in (select bu_No from dbo.Get_Now_BU_chooseAble(#{query.site}, #{query.userName})) + + + AND b.bu_no like #{query.buNo} + + + order by a.ori_code_no desc, a.rev_no desc + + + + insert into plm_technical_specification_sheet(site, code_no, project_id, test_part_no, status, rev_no, ECN_flag, + ECN_no, ECN_address, remark, + create_date, create_by, proofing_no, ori_code_no, bom_type, + eng_chg_level, bom_alternative_no, routing_type, routing_revision, + routing_alternative_no, stage, materialType, step_id + , cqcOperator, faiOperator, peOperater, csOperater, mpOperator, rev, customer_rev, certification) + values ( #{site}, #{codeNo}, #{projectId}, #{testPartNo}, #{status}, #{revNo}, #{ecnFlag}, #{ecnNo} + , #{ecnAddress} + , #{remark}, GetDate(), #{createBy}, #{proofingNo}, #{oriCodeNo}, #{bomType} + , #{engChgLevel,jdbcType=INTEGER} + , #{bomAlternativeNo}, #{routingType}, #{routingRevision,jdbcType=INTEGER}, #{routingAlternativeNo} + , 'Sample' + , 'Label', 10 + , #{cqcOperator}, #{faiOperator}, #{peOperater}, #{csOperater}, #{mpOperator}, #{rev}, #{customerRev} + , 'RoHs') + + + + update plm_project_part + set now_bm=#{codeNo} + where site = #{site} + and project_id = #{projectId} + and test_part_no = #{testPartNo} + + + + insert into plm_technicalSpecification_team (site, code_no, operator_id, type) + values (#{site}, #{codeNo}, #{operatorId}, #{type}) + + + insert into plm_technicalSpecification_team (site, code_no, operator_id, type) + values - (#{item.site},#{item.codeNo},#{item.operatorId},#{item.type}) + (#{item.site}, #{item.codeNo}, #{item.operatorId}, #{item.type}) - - - - update plm_technical_specification_sheet set project_id=#{projectId},test_part_no=#{testPartNo},status=#{status} - ,rev_no=#{revNo},ECN_no=#{ecnNo},ECN_flag=#{ecnFlag},ECN_address=#{ecnAddress},remark=#{remark},update_date=GetDate(),update_by=#{updateBy} - ,cqcOperator=#{cqcOperator},faiOperator=#{faiOperator},peOperater=#{peOperater}, - csOperater=#{csOperater},mpOperator=#{mpOperator},rev=#{rev},customer_rev=#{customerRev} - where id=#{id} - - - - delete from plm_technicalSpecification_team where site=#{site} and code_no=#{codeNo} and type in ('quotationOfficer','engineer','technician','dcc','cqc','fai') - - - delete from plm_technicalSpecification_team where site=#{site} and code_no=#{codeNo} and type in ('reviewEngineer','peEngineer','cqe') - - - - - - - - - - - delete from plm_technical_specification_sheet where id=#{id} - - - update plm_technical_specification_sheet set process=#{process},overPrintOperator=#{overPrintOperator},printOperator=#{printOperator} where site=#{site} and code_no=#{codeNo} - - - - - + select operator_id + from plm_technicalSpecification_team + where type = #{type} + and site = #{site} + and code_no = #{codeNo} + + + + + + + + + + delete + from plm_technical_specification_sheet + where id = #{id} + + + update plm_technical_specification_sheet + set process=#{process}, + overPrintOperator=#{overPrintOperator}, + printOperator=#{printOperator} + where site = #{site} + and code_no = #{codeNo} + + + + + - - - - update plm_technical_specification_sheet - set status=#{status} - , stage=#{stage} - , remarkPage=#{remarkPage} - , rev_no=#{revNo} - , ECN_no=#{ecnNo} - , ECN_flag=#{ecnFlag} - , ECN_address=#{ecnAddress} - , cqcOperator=#{cqcOperator} - , update_date=GetDate() - , update_by=#{updateBy} - , faiOperator=#{faiOperator} - , peOperater=#{peOperater} - , csOperater=#{csOperater} - , pod=#{pod} - , mpOperator=#{mpOperator} - , relevance_part_no=#{relevancePartNo} - where site = #{site} - and code_no = #{codeNo} - - - - - - update plm_technical_specification_sheet - set picture_Addess=#{pictureAddess}, - materialType=#{materialType}, - customerPictureChangeRemark=#{customerPictureChangeRemark}, - productionFileComments =#{productionFileComments}, - remark=#{remark}, - update_date=GetDate(), - update_by=#{updateBy}, - certification=#{certification}, - customerRevNo=#{customerRevNo}, - materialNumber=#{materialNumber}, - customerRemark=#{customerRemark}, - projectRemark=#{projectRemark} - where site = #{site} - and code_no = #{codeNo} - - - - - - update plm_bm_packageInfo set - matrixStripped=#{matrixStripped},appliedType=#{appliedType},finalFormat=#{finalFormat},[rowCount]=#{rowCount,jdbcType=INTEGER},columnCount=#{columnCount,jdbcType=INTEGER}, - missingAllowedFlag=#{missingAllowedFlag},rollPerQty=#{rollPerQty,jdbcType=DECIMAL},addingFilmFlag=#{addingFilmFlag}, - packageRequest=#{packageRequest},coreType=#{coreType},coreDiameter=#{coreDiameter},joinAllowedFlag=#{joinAllowedFlag},coreWidth=#{coreWidth,jdbcType=DECIMAL}, - specialPositiorFlag=#{specialPositiorFlag},copyPosition=#{copyPosition},overprintingFlag=#{overprintingFlag}, - otherRequirement=#{otherRequirement},update_date=GetDate(),update_by=#{updateBy} where site=#{site} and code_no=#{codeNo} - - - - - - - - insert into plm_bm_bom (Site,code_no,erp_part_no,quantity,remark,create_by,create_date) - values(#{site},#{codeNo},#{erpPartNo},#{quantity},#{remark},#{username},GetDate()) - - - - update plm_bm_bom set quantity=#{quantity,jdbcType=DECIMAL} ,remark=#{remark},update_by=#{username}, - update_date=GetDate() where Site=#{site} and code_no=#{codeNo} and erp_part_no=#{erpPartNo} - - - - - - - delete from plm_bm_bom where code_no=#{codeNo} and site=#{site} and erp_part_no=#{erpPartNo} - - - + + + + update plm_technical_specification_sheet + set status=#{status} + , stage=#{stage} + , remarkPage=#{remarkPage} + , rev_no=#{revNo} + , ECN_no=#{ecnNo} + , ECN_flag=#{ecnFlag} + , ECN_address=#{ecnAddress} + , cqcOperator=#{cqcOperator} + , update_date=GetDate() + , update_by=#{updateBy} + , faiOperator=#{faiOperator} + , peOperater=#{peOperater} + , csOperater=#{csOperater} + , pod=#{pod} + , mpOperator=#{mpOperator} + , relevance_part_no=#{relevancePartNo} + , ecn_need_change_drawing = #{ecnNeedChangeDrawing} + where site = #{site} + and code_no = #{codeNo} + + + + + + update plm_technical_specification_sheet + set picture_Addess=#{pictureAddess}, + materialType=#{materialType}, + customerPictureChangeRemark=#{customerPictureChangeRemark}, + productionFileComments =#{productionFileComments}, + remark=#{remark}, + update_date=GetDate(), + update_by=#{updateBy}, + certification=#{certification}, + customerRevNo=#{customerRevNo}, + materialNumber=#{materialNumber}, + customerRemark=#{customerRemark}, + projectRemark=#{projectRemark} + where site = #{site} + and code_no = #{codeNo} + + + + + + update plm_bm_packageInfo + set matrixStripped=#{matrixStripped}, + appliedType=#{appliedType}, + finalFormat=#{finalFormat}, + [rowCount]=#{rowCount,jdbcType=INTEGER}, + columnCount=#{columnCount,jdbcType=INTEGER}, + missingAllowedFlag=#{missingAllowedFlag}, + rollPerQty=#{rollPerQty,jdbcType=DECIMAL}, + addingFilmFlag=#{addingFilmFlag}, + packageRequest=#{packageRequest}, + coreType=#{coreType}, + coreDiameter=#{coreDiameter}, + joinAllowedFlag=#{joinAllowedFlag}, + coreWidth=#{coreWidth,jdbcType=DECIMAL}, + specialPositiorFlag=#{specialPositiorFlag}, + copyPosition=#{copyPosition}, + overprintingFlag=#{overprintingFlag}, + otherRequirement=#{otherRequirement}, + update_date=GetDate(), + update_by=#{updateBy} + where site = #{site} + and code_no = #{codeNo} + + + + + + + + insert into plm_bm_bom (Site, code_no, erp_part_no, quantity, remark, create_by, create_date) + values (#{site}, #{codeNo}, #{erpPartNo}, #{quantity}, #{remark}, #{username}, GetDate()) + + + + update plm_bm_bom + set quantity=#{quantity,jdbcType=DECIMAL}, + remark=#{remark}, + update_by=#{username}, + update_date=GetDate() + where Site = #{site} + and code_no = #{codeNo} + and erp_part_no = #{erpPartNo} + + + + + + + delete + from plm_bm_bom + where code_no = #{codeNo} + and site = #{site} + and erp_part_no = #{erpPartNo} + + + - - - insert into plm_bm_routing (Site,code_no,processDetail,supplyAdhesiveTape,routingDrawing,drawingRevison,drawingDate,workInfo,wiRevison,wiDate, - routingRemark,routingAction,update_by,update_date) values - (#{site},#{codeNo},#{processDetail},#{supplyAdhesiveTape},#{routingDrawing},#{drawingRevison},#{drawingDate},#{workInfo},#{wiRevison},#{wiDate}, - #{routingRemark},#{routingAction},#{username},GetDate()) - - - - update plm_bm_routing set processDetail=#{processDetail},supplyAdhesiveTape=#{supplyAdhesiveTape},routingDrawing=#{routingDrawing}, - drawingRevison=#{drawingRevison},drawingDate=#{drawingDate},workInfo=#{workInfo},wiRevison=#{wiRevison},wiDate=#{wiDate}, - routingRemark=#{routingRemark},routingAction=#{routingAction},update_by=#{username},update_date=GetDate() where site=#{site} and code_no=#{codeNo} - - - - - - insert into plm_bm_propertiesValueHeader(Site,bu_no,PartNo,CodeNo,SubCodeSeqNo,SubCodeDesc,RecordType ) - select #{site},#{buNo},#{codeNo},#{type},1,code_desc,'BM' from plm_bm_model_header - where site=#{site} and bu_no=#{buNo} and function_type='BM' and code_no=#{type} - - - - insert into plm_bm_propertiesValue(Site,bu_no,PartNo,CodeNo,SubCodeSeqNo,SubCodeDesc,ItemNo,PropertiesItemNo,TextValue,NumValue,RecordType,order_id) - select #{site},#{buNo},#{codeNo},#{type},1,b.code_desc,a.seq_no,a.properties_item_no,c.DefaultValue,null,'BM',a.order_id - from plm_bm_model_header b left join plm_properties_model_detail a on a.site=#{site} and a.function_type='BM' - and a.code_no=b.properties_code_no - left join plm_properties_item c on a.properties_item_no=c.ItemNo and a.site=c.site and a.function_type=c.ItemType - where b.site=#{site} and b.bu_no=#{buNo} and b.function_type='BM' and b.code_no=#{type} and a.code_no is not null - - - - - - - - update plm_bm_propertiesValue set NumValue=#{numValue,jdbcType=DOUBLE} ,TextValue=#{textValue} where site=#{site} and bu_no=#{buNo} and PartNo=#{partNo} and RecordType=#{recordType} - and SubCodeSeqNo=#{subCodeSeqNo} and CodeNo = #{codeNo} and ItemNo=#{itemNo} - - - - - + + + insert into plm_bm_routing (Site, code_no, processDetail, supplyAdhesiveTape, routingDrawing, drawingRevison, + drawingDate, workInfo, wiRevison, wiDate, + routingRemark, routingAction, update_by, update_date) + values (#{site}, #{codeNo}, #{processDetail}, #{supplyAdhesiveTape}, #{routingDrawing}, #{drawingRevison}, + #{drawingDate}, #{workInfo}, #{wiRevison}, #{wiDate}, + #{routingRemark}, #{routingAction}, #{username}, GetDate()) + + + + update plm_bm_routing + set processDetail=#{processDetail}, + supplyAdhesiveTape=#{supplyAdhesiveTape}, + routingDrawing=#{routingDrawing}, + drawingRevison=#{drawingRevison}, + drawingDate=#{drawingDate}, + workInfo=#{workInfo}, + wiRevison=#{wiRevison}, + wiDate=#{wiDate}, + routingRemark=#{routingRemark}, + routingAction=#{routingAction}, + update_by=#{username}, + update_date=GetDate() + where site = #{site} + and code_no = #{codeNo} + + + + + + insert into plm_bm_propertiesValueHeader(Site, bu_no, PartNo, CodeNo, SubCodeSeqNo, SubCodeDesc, RecordType) + select #{site}, #{buNo}, #{codeNo}, #{type}, 1, code_desc, 'BM' + from plm_bm_model_header + where site = #{site} + and bu_no = #{buNo} + and function_type = 'BM' + and code_no = #{type} + + + + insert into plm_bm_propertiesValue(Site, bu_no, PartNo, CodeNo, SubCodeSeqNo, SubCodeDesc, ItemNo, + PropertiesItemNo, TextValue, NumValue, RecordType, order_id) + select #{site}, + #{buNo}, + #{codeNo}, + #{type}, + 1, + b.code_desc, + a.seq_no, + a.properties_item_no, + c.DefaultValue, + null, + 'BM', + a.order_id + from plm_bm_model_header b + left join plm_properties_model_detail a on a.site = #{site} and a.function_type = 'BM' + and a.code_no = b.properties_code_no + left join plm_properties_item c + on a.properties_item_no = c.ItemNo and a.site = c.site and a.function_type = c.ItemType + where b.site = #{site} + and b.bu_no = #{buNo} + and b.function_type = 'BM' + and b.code_no = #{type} + and a.code_no is not null + + + + + + + + update plm_bm_propertiesValue + set NumValue=#{numValue,jdbcType=DOUBLE}, + TextValue=#{textValue} + where site = #{site} + and bu_no = #{buNo} + and PartNo = #{partNo} + and RecordType = #{recordType} + and SubCodeSeqNo = #{subCodeSeqNo} + and CodeNo = #{codeNo} + and ItemNo = #{itemNo} + + + + + - - - insert into plm_bm_routing_detail (site,code_no,item_no,OperationDesc,remark,create_date,create_by) - values(#{site},#{codeNo},#{itemNo},#{operationDesc},#{remark},GetDate(),#{username}) - - - update plm_bm_routing_detail set item_no=#{itemNo},OperationDesc=#{operationDesc} - ,remark=#{remark},update_date=GetDate(),update_by=#{username} - where id=#{id} - - - - delete from plm_bm_routing_detail where id=#{id} - - - - - - insert into plm_bm_tpInfoDetail (site,code_no,colourMatch,environment,eordValue,customerFile,laberSize,crossNumber,hp,rowNumber,vp,remark,update_date,update_by) - values(#{site},#{codeNo},#{colourMatch},#{environment},#{eordValue},#{customerFile},#{laberSize},#{crossNumber},#{hp},#{rowNumber},#{vp},#{remark},GetDate(),#{updateBy}) - - - - update plm_bm_tpInfoDetail set colourMatch=#{colourMatch},environment=#{environment},eordValue=#{eordValue},customerFile=#{customerFile}, - laberSize=#{laberSize},crossNumber=#{crossNumber},hp=#{hp},rowNumber=#{rowNumber},vp=#{vp}, - remark=#{remark},update_date=GetDate(),update_by=#{updateBy} where site=#{site} and code_no=#{codeNo} - - - - - - insert into plm_bm_tpInfoColor (site,code_no,[order],color,inkType,colorRet,colorMatch,remark,filmNo,stencilNo,update_by,update_date) - values(#{site},#{codeNo},#{order},#{color},#{inkType},#{colorRet},#{colorMatch},#{remark},#{filmNo},#{stencilNo},#{updateBy},GetDate()) - - - - update plm_bm_tpInfoColor set [order]=#{order},color=#{color},inkType=#{inkType},colorRet=#{colorRet}, - colorMatch=#{colorMatch},remark=#{remark},filmNo=#{filmNo},stencilNo=#{stencilNo}, - update_date=GetDate(),update_by=#{updateBy} where id=#{id} - - - - delete from plm_bm_tpInfoColor where id=#{id} - - - - - - - - - insert into plm_bm_tpInfoCut (site,code_no,[order],cuttingMachine,cuttingType,cutterTooling,cutterLayout,cutterCost,p2c,c2c,cutterNo,update_date, -update_by) - values(#{site},#{codeNo},#{order},#{cuttingMachine},#{cuttingType},#{cutterTooling},#{cutterLayout},#{cutterCost},#{p2c},#{c2c},#{cutterNo},GetDate(),#{updateBy}) - - - - update plm_bm_tpInfoCut set [order]=#{order},cuttingMachine=#{cuttingMachine},cuttingType=#{cuttingType},cutterTooling=#{cutterTooling}, - cutterLayout=#{cutterLayout},cutterCost=#{cutterCost},p2c=#{p2c},c2c=#{c2c},cutterNo=#{cutterNo}, - update_date=GetDate(),update_by=#{updateBy} where id=#{id} - - - - - - delete from plm_bm_tpInfoCut where id=#{id} - - - - - - - insert into plm_bm_prepress (Site,code_no,plateNo,cutterNumber,cutterLayout,[action],remark,feedback,update_by,update_date) - values(#{site},#{codeNo},#{plateNo},#{cutterNumber},#{cutterLayout},#{action},#{remark},#{feedback},#{updateBy},GetDate()) - - - - update plm_bm_prepress - set plateNo=#{plateNo}, - cutterNumber=#{cutterNumber}, - cutterLayout=#{cutterLayout}, - [action]=#{action}, - remark=#{remark}, - feedback=#{feedback}, - update_by=#{updateBy}, - update_date=GetDate() - where site = #{site} - and code_no = #{codeNo} - - - - - - insert into plm_bm_PrepressColor (site,code_no,[order],meshModel,meshSize,angle,coatingType,filmNo,stencilNo,color,update_by,update_date) - values(#{site},#{codeNo},#{order},#{meshModel},#{meshSize},#{angle},#{coatingType},#{filmNo},#{stencilNo},#{color},#{updateBy},GetDate()) - - - - update plm_bm_PrepressColor set [order]=#{order},color=#{color},meshModel=#{meshModel},meshSize=#{meshSize}, - angle=#{angle},coatingType=#{coatingType},filmNo=#{filmNo},stencilNo=#{stencilNo}, - update_date=GetDate(),update_by=#{updateBy} where id=#{id} - - - - delete from plm_bm_PrepressColor where id=#{id} - - - - - - - - - - insert into plm_bm_PrintOther (site,code_no,remark,[action],update_date,update_by) - values(#{site},#{codeNo},#{remark},#{action},GetDate(),#{updateBy}) - - - - update plm_bm_PrintOther set remark=#{remark},[action]=#{action} where site=#{site} and code_no=#{codeNo} - - - - - - insert into plm_bm_PrintOtherColor (site,code_no,[order],seqNo,ink,[type],otherRef,update_by,update_date) - values(#{site},#{codeNo},#{order},#{seqNo},#{ink},#{type},#{otherRef},#{updateBy},GetDate()) - - - - update plm_bm_PrintOtherColor set [order]=#{order},seqNo=#{seqNo},ink=#{ink},[type]=#{type}, - otherRef=#{otherRef}, - update_date=GetDate(),update_by=#{updateBy} where id=#{id} - - - - delete from plm_bm_PrintOtherColor where id=#{id} - - - - - - update plm_bm_model_header set properties_code_no=#{propertiesCodeNo} ,active=#{active} where site=#{site} - and bu_no=#{buNo} and code_no=#{codeNo} - - - - - - - - - - - - - - - insert into plm_bm_InkMixing (site,code_no,colourMatch,visuallySetting,indicate,customerFile,remarks,[action],update_date,update_by) - values(#{site},#{codeNo},#{colourMatch},#{visuallySetting},#{indicate},#{customerFile},#{remarks},#{action},GetDate(),#{updateBy}) - - - - update plm_bm_InkMixing set colourMatch=#{colourMatch},visuallySetting=#{visuallySetting},indicate=#{indicate} - ,customerFile=#{customerFile},[action]=#{action},remarks=#{remarks},update_date=GetDate(),update_by=#{updateBy} where site=#{site} and code_no=#{codeNo} - - - - - - insert into plm_bm_InkMixingColor (site,code_no,[order],color,[type],supplier,inkUsage,mixTime,standbyTime,Viscosity,RecycleTimes,update_by,update_date) - values(#{site},#{codeNo},#{order},#{color},#{type},#{supplier},#{inkUsage},#{mixTime},#{standbyTime},#{viscosity},#{recycleTimes},#{updateBy},GetDate()) - - - - update plm_bm_InkMixingColor set [order]=#{order},color=#{color},[type]=#{type},supplier=#{supplier},inkUsage=#{inkUsage}, - mixTime=#{mixTime},standbyTime=#{standbyTime},Viscosity=#{viscosity},RecycleTimes=#{recycleTimes}, - update_date=GetDate(),update_by=#{updateBy} where id=#{id} - + - - delete from plm_bm_InkMixingColor where id=#{id} - + + insert into plm_bm_routing_detail (site, code_no, item_no, OperationDesc, remark, create_date, create_by) + values (#{site}, #{codeNo}, #{itemNo}, #{operationDesc}, #{remark}, GetDate(), #{username}) + + + update plm_bm_routing_detail + set item_no=#{itemNo} + , OperationDesc=#{operationDesc} + , remark=#{remark} + , update_date=GetDate() + , update_by=#{username} + where id = #{id} + + + + delete + from plm_bm_routing_detail + where id = #{id} + + + - + + insert into plm_bm_tpInfoDetail (site, code_no, colourMatch, environment, eordValue, customerFile, laberSize, + crossNumber, hp, rowNumber, vp, remark, update_date, update_by) + values (#{site}, #{codeNo}, #{colourMatch}, #{environment}, #{eordValue}, #{customerFile}, #{laberSize}, + #{crossNumber}, #{hp}, #{rowNumber}, #{vp}, #{remark}, GetDate(), #{updateBy}) + + + + update plm_bm_tpInfoDetail + set colourMatch=#{colourMatch}, + environment=#{environment}, + eordValue=#{eordValue}, + customerFile=#{customerFile}, + laberSize=#{laberSize}, + crossNumber=#{crossNumber}, + hp=#{hp}, + rowNumber=#{rowNumber}, + vp=#{vp}, + remark=#{remark}, + update_date=GetDate(), + update_by=#{updateBy} + where site = #{site} + and code_no = #{codeNo} + + + + + + insert into plm_bm_tpInfoColor (site, code_no, [order], color, inkType, colorRet, colorMatch, remark, filmNo, + stencilNo, update_by, update_date) + values (#{site}, #{codeNo}, #{order}, #{color}, #{inkType}, #{colorRet}, #{colorMatch}, #{remark}, #{filmNo}, + #{stencilNo}, #{updateBy}, GetDate()) + + + + update plm_bm_tpInfoColor + set [order]=#{order}, + color=#{color}, + inkType=#{inkType}, + colorRet=#{colorRet}, + colorMatch=#{colorMatch}, + remark=#{remark}, + filmNo=#{filmNo}, + stencilNo=#{stencilNo}, + update_date=GetDate(), + update_by=#{updateBy} + where id = #{id} + + + + delete + from plm_bm_tpInfoColor + where id = #{id} + + + + + + + + + insert into plm_bm_tpInfoCut (site, code_no, [order], cuttingMachine, cuttingType, cutterTooling, cutterLayout, + cutterCost, p2c, c2c, cutterNo, update_date, + update_by) + values (#{site}, #{codeNo}, #{order}, #{cuttingMachine}, #{cuttingType}, #{cutterTooling}, #{cutterLayout}, + #{cutterCost}, #{p2c}, #{c2c}, #{cutterNo}, GetDate(), #{updateBy}) + + + + update plm_bm_tpInfoCut + set [order]=#{order}, + cuttingMachine=#{cuttingMachine}, + cuttingType=#{cuttingType}, + cutterTooling=#{cutterTooling}, + cutterLayout=#{cutterLayout}, + cutterCost=#{cutterCost}, + p2c=#{p2c}, + c2c=#{c2c}, + cutterNo=#{cutterNo}, + update_date=GetDate(), + update_by=#{updateBy} + where id = #{id} + + + + + + delete + from plm_bm_tpInfoCut + where id = #{id} + + + + + + + insert into plm_bm_prepress (Site, code_no, plateNo, cutterNumber, cutterLayout, [action], remark, feedback, + update_by, update_date) + values (#{site}, #{codeNo}, #{plateNo}, #{cutterNumber}, #{cutterLayout}, #{action}, #{remark}, #{feedback}, + #{updateBy}, GetDate()) + + + + update plm_bm_prepress + set plateNo=#{plateNo}, + cutterNumber=#{cutterNumber}, + cutterLayout=#{cutterLayout}, + [action]=#{action}, + remark=#{remark}, + feedback=#{feedback}, + update_by=#{updateBy}, + update_date=GetDate() + where site = #{site} + and code_no = #{codeNo} + + + + + + insert into plm_bm_PrepressColor (site, code_no, [order], meshModel, meshSize, angle, coatingType, filmNo, + stencilNo, color, update_by, update_date) + values (#{site}, #{codeNo}, #{order}, #{meshModel}, #{meshSize}, #{angle}, #{coatingType}, #{filmNo}, + #{stencilNo}, #{color}, #{updateBy}, GetDate()) + + + + update plm_bm_PrepressColor + set [order]=#{order}, + color=#{color}, + meshModel=#{meshModel}, + meshSize=#{meshSize}, + angle=#{angle}, + coatingType=#{coatingType}, + filmNo=#{filmNo}, + stencilNo=#{stencilNo}, + update_date=GetDate(), + update_by=#{updateBy} + where id = #{id} + + + + delete + from plm_bm_PrepressColor + where id = #{id} + + + + + + + + + insert into plm_bm_PrintOther (site, code_no, remark, [action], update_date, update_by) + values (#{site}, #{codeNo}, #{remark}, #{action}, GetDate(), #{updateBy}) + + + + update plm_bm_PrintOther + set remark=#{remark}, + [action]=#{action} + where site = #{site} + and code_no = #{codeNo} + + + - - - - - - insert into plm_bm_InkFormulation (Site,code_no,remarks,label_size,qpa,[action],[cross],row,hp,vp,update_date,update_by) - values(#{site},#{codeNo},#{remarks},#{labelSize},#{qpa},#{action},#{cross},#{row},#{hp},#{vp},GetDate(),#{updateBy}) - - - - update plm_bm_InkFormulation set remarks=#{remarks},label_size=#{labelSize},qpa=#{qpa},[action]=#{action},[cross]=#{cross} - ,row=#{row},[hp]=#{hp},vp=#{vp},update_date=GetDate(),update_by=#{updateBy} where site=#{site} and code_no=#{codeNo} - - - - - - insert into plm_bm_InkFormulationColor (site,code_no,[order],hardness,tartness,printingSide,energy,dry_speed,dry_time,dry_temp,dry_time2,update_date,update_by) - values(#{site},#{codeNo},#{order},#{hardness},#{tartness},#{printingSide},#{energy},#{drySpeed},#{dryTime},#{dryTemp},#{dryTime2},GetDate(),#{updateBy}) - - - - update plm_bm_InkFormulationColor set [order]=#{order},hardness=#{hardness},[tartness]=#{tartness},printingSide=#{printingSide},energy=#{energy}, - dry_speed=#{drySpeed},dry_time=#{dryTime},dry_temp=#{dryTemp},dry_time2=#{dryTime2}, - update_date=GetDate(),update_by=#{updateBy} where id=#{id} - - - - delete from plm_bm_InkFormulationColor where id=#{id} - - - - - - - - - - insert into plm_bm_Lamination (site,code_no,[action],update_date,update_by,remark) - values(#{site},#{codeNo},#{action},GetDate(),#{updateBy},#{remark}) - - - - update plm_bm_Lamination set remark=#{remark},[action]=#{action}, - update_date=GetDate(),update_by=#{updateBy} where site=#{site} and code_no=#{codeNo} - - - - - - insert into plm_bm_LaminationCut (site,code_no,[order],station,processStep,machine,laminationType,rm_partNo,rm_partNo2,film_partNo,lamination_side,remarks, - update_date,update_by) - values(#{site},#{codeNo},#{order},#{station},#{processStep},#{machine},#{laminationType},#{rmPartNo},#{rmPartNo2},#{filmPartNo},#{laminationSide},#{remarks}, - GetDate(),#{updateBy}) - - - - update plm_bm_LaminationCut set [order]=#{order},station=#{station},[processStep]=#{processStep},machine=#{machine},laminationType=#{laminationType}, - rm_partNo=#{rmPartNo},rm_partNo2=#{rmPartNo2},film_partNo=#{filmPartNo},lamination_side=#{laminationSide},remarks=#{remarks}, - update_date=GetDate(),update_by=#{updateBy} where id=#{id} - - - - delete from plm_bm_LaminationCut where id=#{id} - - - - - - - - - - insert into plm_bm_Cnc (site,code_no,[action],update_date,update_by) - values(#{site},#{codeNo},#{action},GetDate(),#{updateBy}) - - - - update plm_bm_Cnc set [action]=#{action}, - update_date=GetDate(),update_by=#{updateBy} where site=#{site} and code_no=#{codeNo} - - - - - - insert into plm_bm_CncCut (site,code_no,[order],cutting_machine,program_name,cutting_speed,spec,p2c,c2c,remarks,update_date,update_by) - values(#{site},#{codeNo},#{order},#{cuttingMachine},#{programName},#{cuttingSpeed},#{spec},#{p2c},#{c2c},#{remarks}, - GetDate(),#{updateBy}) - - - - update plm_bm_CncCut set [order]=#{order},cutting_machine=#{cuttingMachine},[program_name]=#{programName},cutting_speed=#{cuttingSpeed},spec=#{spec}, - p2c=#{p2c},c2c=#{c2c},remarks=#{remarks}, - update_date=GetDate(),update_by=#{updateBy} where id=#{id} - - - - delete from plm_bm_CncCut where id=#{id} - - - - - - - - - - insert into plm_bm_Cut (site,code_no,[action],update_date,update_by,remarks) - values(#{site},#{codeNo},#{action},GetDate(),#{updateBy},#{remarks}) - - - - update plm_bm_Cut set [action]=#{action},remarks=#{remarks}, - update_date=GetDate(),update_by=#{updateBy} where site=#{site} and code_no=#{codeNo} - - - - - - insert into plm_bm_CutCut (site,code_no,[order],cutting_machine,cutting_type,cutting_tooling,cutter_no,cutter_layout,cutter_cost,program_name, -program_path,p2c,c2c,update_by,update_date) - values(#{site},#{codeNo},#{order},#{cuttingMachine},#{cuttingType},#{cuttingTooling},#{cutterNo},#{cutterLayout},#{cutterCost},#{programName}, - #{programPath},#{p2c},#{c2c},#{updateBy},GetDate()) - - - - update plm_bm_CutCut set [order]=#{order},cutting_machine=#{cuttingMachine},[cutting_type]=#{cuttingType},cutting_tooling=#{cuttingTooling},cutter_no=#{cutterNo}, - cutter_layout=#{cutterLayout},cutter_cost=#{cutterCost},program_name=#{programName}, p2c=#{p2c},c2c=#{c2c},program_path=#{programPath}, - update_date=GetDate(),update_by=#{updateBy} where id=#{id} - - - - delete from plm_bm_CutCut where id=#{id} - - - - - - - - - - - - - insert into plm_bm_Printing (site,code_no,colour_match,conditions,colour_indicat,customer_file,glossiness_requirement,comments,repeat,vp,label_size, -down,plate_distortion_rate,actual_number,print_position,goods_roll_width,update_date,update_by,printLayout) - values(#{site},#{codeNo},#{colourMatch},#{conditions},#{colourIndicat},#{customerFile},#{glossinessRequirement},#{comments}, - #{repeat},#{vp},#{labelSize},#{down},#{plateDistortionRate},#{actualNumber},#{printPosition},#{goodsRollWidth}, - GetDate(),#{updateBy},#{printLayout}) - - - - update plm_bm_Printing set printLayout=#{printLayout},colour_match=#{colourMatch},conditions=#{conditions},colour_indicat=#{colourIndicat},customer_file=#{customerFile},glossiness_requirement=#{glossinessRequirement},comments=#{comments}, - repeat=#{repeat},vp=#{vp},label_size=#{labelSize},down=#{down},plate_distortion_rate=#{plateDistortionRate},actual_number=#{actualNumber},print_position=#{printPosition},goods_roll_width=#{goodsRollWidth},update_date=GetDate(),update_by=#{updateBy} where site=#{site} and code_no=#{codeNo} - - - - - - insert into plm_bm_PrintingColor (site,code_no,[order],ink_type,color_reference,color_match,bcm,speed,dry,gallus,mark_andy,lp,Hexiang,update_by,update_date) - values(#{site},#{codeNo},#{order},#{inkType},#{colorReference},#{colorMatch},#{bcm},#{speed},#{dry},#{gallus},#{markAndy},#{lp},#{hexiang},#{updateBy},GetDate()) - - - - update plm_bm_PrintingColor set [order]=#{order},ink_type=#{inkType},[color_reference]=#{colorReference},color_match=#{colorMatch},bcm=#{bcm}, - speed=#{speed},dry=#{dry},gallus=#{gallus},mark_andy=#{markAndy},lp=#{lp},Hexiang=#{hexiang}, - update_date=GetDate(),update_by=#{updateBy} where id=#{id} - - - - delete from plm_bm_PrintingColor where id=#{id} - - - - - - - - - - - - - - - - - update plm_technical_specification_sheet set bom_type=#{bomType},eng_chg_level=#{engChgLevel,jdbcType=INTEGER}, - bom_alternative_no=#{bomAlternativeNo} where site=#{site} and code_no=#{codeNo} - - - update plm_technical_specification_sheet set routing_type=#{routingType},routing_revision=#{routingRevision,jdbcType=INTEGER}, - routing_alternative_no=#{routingAlternativeNo} where site=#{site} and code_no=#{codeNo} - - - - - - - update plm_technical_specification_sheet set remarkPage=#{remarkPage} where site=#{site} and code_no=#{codeNo} - - - - - - - - - - - - insert into plm_bm_printFlexoColor(site,codeNo,printSide,[order],colorReference,inkCode,colorMatch,lpi,bcm,openFlag,gallus,markAndy,hexiang,temperature, -pressure,updateDate,updateBy,remark) values - (#{site},#{codeNo},#{printSide},#{order},#{colorReference},#{inkCode},#{colorMatch},#{lpi},#{bcm},#{openFlag},#{gallus}, - #{markAndy},#{hexiang},#{temperature},#{pressure},GetDate(),#{updateBy},#{remark}) - - - - update plm_bm_printFlexoColor set printSide=#{printSide},[order]=#{order,jdbcType=INTEGER},colorReference=#{colorReference},inkCode=#{inkCode}, - colorMatch=#{colorMatch},lpi=#{lpi},bcm=#{bcm},openFlag=#{openFlag},gallus=#{gallus},markAndy=#{markAndy},hexiang=#{hexiang},temperature=#{temperature}, - pressure=#{pressure},updateDate=GetDate(),updateBy=#{updateBy},remark=#{remark} where id=#{id} - - - - delete from plm_bm_printFlexoColor where id=#{id} - - - - - - - - insert into plm_bm_printIndigoColor(site,code_no,[order],printSide,colorReference,inkCode,colorMatch,printMotion,opticalDensity,lut,lpi,screenAngle,printHits, - blanketTemperture,remark,updateBy,updateDate) values - (#{site},#{codeNo},#{order},#{printSide},#{colorReference},#{inkCode},#{colorMatch},#{printMotion},#{opticalDensity},#{lut},#{lpi}, - #{screenAngle},#{printHits},#{blanketTemperture},#{remark},#{updateBy},GetDate()) - - - - update plm_bm_printIndigoColor set printSide=#{printSide},[order]=#{order,jdbcType=INTEGER},colorReference=#{colorReference},inkCode=#{inkCode}, - colorMatch=#{colorMatch},printMotion=#{printMotion},opticalDensity=#{opticalDensity},lut=#{lut},lpi=#{lpi},screenAngle=#{screenAngle},printHits=#{printHits},blanketTemperture=#{blanketTemperture}, - remark=#{remark},updateDate=GetDate(),updateBy=#{updateBy} where id=#{id} - - - - delete from plm_bm_printIndigoColor where id=#{id} - - - + select site + from plm_bm_PrintOtherColor + where site = #{site} + and code_no = #{codeNo} + and [order] = #{order} + and seqNo = #{seqNo} + + + + update plm_bm_model_header + set properties_code_no=#{propertiesCodeNo}, + active=#{active} + where site = #{site} + and bu_no = #{buNo} + and code_no = #{codeNo} + + + + + + + + + + + + + + insert into plm_bm_InkMixing (site, code_no, colourMatch, visuallySetting, indicate, customerFile, remarks, + [action], update_date, update_by) + values (#{site}, #{codeNo}, #{colourMatch}, #{visuallySetting}, #{indicate}, #{customerFile}, #{remarks}, + #{action}, GetDate(), #{updateBy}) + + + + update plm_bm_InkMixing + set colourMatch=#{colourMatch} + , visuallySetting=#{visuallySetting} + , indicate=#{indicate} + , customerFile=#{customerFile} + , [action]=#{action} + , remarks=#{remarks} + , update_date=GetDate() + , update_by=#{updateBy} + where site = #{site} + and code_no = #{codeNo} + + + + + + insert into plm_bm_InkMixingColor (site, code_no, [order], color, [type], supplier, inkUsage, mixTime, + standbyTime, Viscosity, RecycleTimes, update_by, update_date) + values (#{site}, #{codeNo}, #{order}, #{color}, #{type}, #{supplier}, #{inkUsage}, #{mixTime}, #{standbyTime}, + #{viscosity}, #{recycleTimes}, #{updateBy}, GetDate()) + + + + update plm_bm_InkMixingColor + set [order]=#{order}, + color=#{color}, + [type]=#{type}, + supplier=#{supplier}, + inkUsage=#{inkUsage}, + mixTime=#{mixTime}, + standbyTime=#{standbyTime}, + Viscosity=#{viscosity}, + RecycleTimes=#{recycleTimes}, + update_date=GetDate(), + update_by=#{updateBy} + where id = #{id} + + + + delete + from plm_bm_InkMixingColor + where id = #{id} + + + + + + + + + + insert into plm_bm_InkFormulation (Site, code_no, remarks, label_size, qpa, [action], [cross], row, hp, vp, + update_date, update_by) + values (#{site}, #{codeNo}, #{remarks}, #{labelSize}, #{qpa}, #{action}, #{cross}, #{row}, #{hp}, #{vp}, + GetDate(), #{updateBy}) + + + + update plm_bm_InkFormulation + set remarks=#{remarks} + , label_size=#{labelSize} + , qpa=#{qpa} + , [action]=#{action} + , [cross]=#{cross} + , row=#{row} + , [hp]=#{hp} + , vp=#{vp} + , update_date=GetDate() + , update_by=#{updateBy} + where site = #{site} + and code_no = #{codeNo} + + + + + + insert into plm_bm_InkFormulationColor (site, code_no, [order], hardness, tartness, printingSide, energy, + dry_speed, dry_time, dry_temp, dry_time2, update_date, update_by) + values (#{site}, #{codeNo}, #{order}, #{hardness}, #{tartness}, #{printingSide}, #{energy}, #{drySpeed}, + #{dryTime}, #{dryTemp}, #{dryTime2}, GetDate(), #{updateBy}) + + + + update plm_bm_InkFormulationColor + set [order]=#{order}, + hardness=#{hardness}, + [tartness]=#{tartness}, + printingSide=#{printingSide}, + energy=#{energy}, + dry_speed=#{drySpeed}, + dry_time=#{dryTime}, + dry_temp=#{dryTemp}, + dry_time2=#{dryTime2}, + update_date=GetDate(), + update_by=#{updateBy} + where id = #{id} + + + + delete + from plm_bm_InkFormulationColor + where id = #{id} + + + + + + + + + + insert into plm_bm_Lamination (site, code_no, [action], update_date, update_by, remark) + values (#{site}, #{codeNo}, #{action}, GetDate(), #{updateBy}, #{remark}) + + + + update plm_bm_Lamination + set remark=#{remark}, + [action]=#{action}, + update_date=GetDate(), + update_by=#{updateBy} + where site = #{site} + and code_no = #{codeNo} + + + + + + insert into plm_bm_LaminationCut (site, code_no, [order], station, processStep, machine, laminationType, + rm_partNo, rm_partNo2, film_partNo, lamination_side, remarks, + update_date, update_by) + values (#{site}, #{codeNo}, #{order}, #{station}, #{processStep}, #{machine}, #{laminationType}, #{rmPartNo}, + #{rmPartNo2}, #{filmPartNo}, #{laminationSide}, #{remarks}, + GetDate(), #{updateBy}) + + + + update plm_bm_LaminationCut + set [order]=#{order}, + station=#{station}, + [processStep]=#{processStep}, + machine=#{machine}, + laminationType=#{laminationType}, + rm_partNo=#{rmPartNo}, + rm_partNo2=#{rmPartNo2}, + film_partNo=#{filmPartNo}, + lamination_side=#{laminationSide}, + remarks=#{remarks}, + update_date=GetDate(), + update_by=#{updateBy} + where id = #{id} + + + + delete + from plm_bm_LaminationCut + where id = #{id} + + + + + + + + + + insert into plm_bm_Cnc (site, code_no, [action], update_date, update_by) + values (#{site}, #{codeNo}, #{action}, GetDate(), #{updateBy}) + + + + update plm_bm_Cnc + set [action]=#{action}, + update_date=GetDate(), + update_by=#{updateBy} + where site = #{site} + and code_no = #{codeNo} + + + + + + insert into plm_bm_CncCut (site, code_no, [order], cutting_machine, program_name, cutting_speed, spec, p2c, c2c, + remarks, update_date, update_by) + values (#{site}, #{codeNo}, #{order}, #{cuttingMachine}, #{programName}, #{cuttingSpeed}, #{spec}, #{p2c}, + #{c2c}, #{remarks}, + GetDate(), #{updateBy}) + + + + update plm_bm_CncCut + set [order]=#{order}, + cutting_machine=#{cuttingMachine}, + [program_name]=#{programName}, + cutting_speed=#{cuttingSpeed}, + spec=#{spec}, + p2c=#{p2c}, + c2c=#{c2c}, + remarks=#{remarks}, + update_date=GetDate(), + update_by=#{updateBy} + where id = #{id} + + + + delete + from plm_bm_CncCut + where id = #{id} + + + + + + + + + + insert into plm_bm_Cut (site, code_no, [action], update_date, update_by, remarks) + values (#{site}, #{codeNo}, #{action}, GetDate(), #{updateBy}, #{remarks}) + + + + update plm_bm_Cut + set [action]=#{action}, + remarks=#{remarks}, + update_date=GetDate(), + update_by=#{updateBy} + where site = #{site} + and code_no = #{codeNo} + + + + + + insert into plm_bm_CutCut (site, code_no, [order], cutting_machine, cutting_type, cutting_tooling, cutter_no, + cutter_layout, cutter_cost, program_name, + program_path, p2c, c2c, update_by, update_date) + values (#{site}, #{codeNo}, #{order}, #{cuttingMachine}, #{cuttingType}, #{cuttingTooling}, #{cutterNo}, + #{cutterLayout}, #{cutterCost}, #{programName}, + #{programPath}, #{p2c}, #{c2c}, #{updateBy}, GetDate()) + + + + update plm_bm_CutCut + set [order]=#{order}, + cutting_machine=#{cuttingMachine}, + [cutting_type]=#{cuttingType}, + cutting_tooling=#{cuttingTooling}, + cutter_no=#{cutterNo}, + cutter_layout=#{cutterLayout}, + cutter_cost=#{cutterCost}, + program_name=#{programName}, + p2c=#{p2c}, + c2c=#{c2c}, + program_path=#{programPath}, + update_date=GetDate(), + update_by=#{updateBy} + where id = #{id} + + + + delete + from plm_bm_CutCut + where id = #{id} + + + + + + + + + + + + insert into plm_bm_Printing (site, code_no, colour_match, conditions, colour_indicat, customer_file, + glossiness_requirement, comments, repeat, vp, label_size, + down, plate_distortion_rate, actual_number, print_position, goods_roll_width, + update_date, update_by, printLayout) + values (#{site}, #{codeNo}, #{colourMatch}, #{conditions}, #{colourIndicat}, #{customerFile}, + #{glossinessRequirement}, #{comments}, + #{repeat}, #{vp}, #{labelSize}, #{down}, #{plateDistortionRate}, #{actualNumber}, #{printPosition}, + #{goodsRollWidth}, + GetDate(), #{updateBy}, #{printLayout}) + + + + update plm_bm_Printing + set printLayout=#{printLayout}, + colour_match=#{colourMatch}, + conditions=#{conditions}, + colour_indicat=#{colourIndicat}, + customer_file=#{customerFile}, + glossiness_requirement=#{glossinessRequirement}, + comments=#{comments}, + repeat=#{repeat}, + vp=#{vp}, + label_size=#{labelSize}, + down=#{down}, + plate_distortion_rate=#{plateDistortionRate}, + actual_number=#{actualNumber}, + print_position=#{printPosition}, + goods_roll_width=#{goodsRollWidth}, + update_date=GetDate(), + update_by=#{updateBy} + where site = #{site} + and code_no = #{codeNo} + + + + + + insert into plm_bm_PrintingColor (site, code_no, [order], ink_type, color_reference, color_match, bcm, speed, + dry, gallus, mark_andy, lp, Hexiang, update_by, update_date) + values (#{site}, #{codeNo}, #{order}, #{inkType}, #{colorReference}, #{colorMatch}, #{bcm}, #{speed}, #{dry}, + #{gallus}, #{markAndy}, #{lp}, #{hexiang}, #{updateBy}, GetDate()) + + + + update plm_bm_PrintingColor + set [order]=#{order}, + ink_type=#{inkType}, + [color_reference]=#{colorReference}, + color_match=#{colorMatch}, + bcm=#{bcm}, + speed=#{speed}, + dry=#{dry}, + gallus=#{gallus}, + mark_andy=#{markAndy}, + lp=#{lp}, + Hexiang=#{hexiang}, + update_date=GetDate(), + update_by=#{updateBy} + where id = #{id} + + + + delete + from plm_bm_PrintingColor + where id = #{id} + + + + + + + + + + + + + + + + + update plm_technical_specification_sheet + set bom_type=#{bomType}, + eng_chg_level=#{engChgLevel,jdbcType=INTEGER}, + bom_alternative_no=#{bomAlternativeNo} + where site = #{site} + and code_no = #{codeNo} + + + update plm_technical_specification_sheet + set routing_type=#{routingType}, + routing_revision=#{routingRevision,jdbcType=INTEGER}, + routing_alternative_no=#{routingAlternativeNo} + where site = #{site} + and code_no = #{codeNo} + + + + + + + update plm_technical_specification_sheet + set remarkPage=#{remarkPage} + where site = #{site} + and code_no = #{codeNo} + + + + + + + + + + + + insert into plm_bm_printFlexoColor(site, codeNo, printSide, [order], colorReference, inkCode, colorMatch, lpi, + bcm, openFlag, gallus, markAndy, hexiang, temperature, + pressure, updateDate, updateBy, remark) + values (#{site}, #{codeNo}, #{printSide}, #{order}, #{colorReference}, #{inkCode}, #{colorMatch}, #{lpi}, + #{bcm}, #{openFlag}, #{gallus}, + #{markAndy}, #{hexiang}, #{temperature}, #{pressure}, GetDate(), #{updateBy}, #{remark}) + + + + update plm_bm_printFlexoColor + set printSide=#{printSide}, + [order]=#{order,jdbcType=INTEGER}, + colorReference=#{colorReference}, + inkCode=#{inkCode}, + colorMatch=#{colorMatch}, + lpi=#{lpi}, + bcm=#{bcm}, + openFlag=#{openFlag}, + gallus=#{gallus}, + markAndy=#{markAndy}, + hexiang=#{hexiang}, + temperature=#{temperature}, + pressure=#{pressure}, + updateDate=GetDate(), + updateBy=#{updateBy}, + remark=#{remark} + where id = #{id} + + + + delete + from plm_bm_printFlexoColor + where id = #{id} + + + + + + + + insert into plm_bm_printIndigoColor(site, code_no, [order], printSide, colorReference, inkCode, colorMatch, + printMotion, opticalDensity, lut, lpi, screenAngle, printHits, + blanketTemperture, remark, updateBy, updateDate) + values (#{site}, #{codeNo}, #{order}, #{printSide}, #{colorReference}, #{inkCode}, #{colorMatch}, + #{printMotion}, #{opticalDensity}, #{lut}, #{lpi}, + #{screenAngle}, #{printHits}, #{blanketTemperture}, #{remark}, #{updateBy}, GetDate()) + + + + update plm_bm_printIndigoColor + set printSide=#{printSide}, + [order]=#{order,jdbcType=INTEGER}, + colorReference=#{colorReference}, + inkCode=#{inkCode}, + colorMatch=#{colorMatch}, + printMotion=#{printMotion}, + opticalDensity=#{opticalDensity}, + lut=#{lut}, + lpi=#{lpi}, + screenAngle=#{screenAngle}, + printHits=#{printHits}, + blanketTemperture=#{blanketTemperture}, + remark=#{remark}, + updateDate=GetDate(), + updateBy=#{updateBy} + where id = #{id} + + + + delete + from plm_bm_printIndigoColor + where id = #{id} + + + update plm_technical_specification_sheet - set status = #{status}, + set status = #{status}, update_date = getDate(), - update_by = #{userName} - where site = #{site} and code_no = #{codeNo} + update_by = #{userName} + where site = #{site} + and code_no = #{codeNo} - + SELECT a.site, + a.code_no, + a.operator_id, + a.type, + b.domain_control_account FROM plm_technicalSpecification_team as a - left join sys_user as b on a.operator_id = b.username - where a.site = #{site} and a.code_no = #{codeNo} + left join sys_user as b on a.operator_id = b.username + where a.site = #{site} + and a.code_no = #{codeNo} - + SELECT id, + site, + code_no, + dbo.plm_get_technicalBaseDesc(a.status, 'status') statusDesc FROM plm_technical_specification_sheet a - where a.site = #{site} and a.code_no = #{codeNo} + where a.site = #{site} + and a.code_no = #{codeNo} - + Select a.Final_Part_No, a.Test_part_no, a.Active, a.Part_desc, a.project_id, pcpi.customer_part_no, a.bu_no + from plm_project_info c + left join view_Project_Part a on a.site = c.site and a.project_id = c.project_id + left join plm_customer_part_info pcpi + on a.site = pcpi.site and a.test_part_no = pcpi.part_no and c.customer_id = pcpi.customer_no + left join part p on a.Final_Part_No = p.part_no + left join plm_technical_specification_sheet ps on a.site = ps.site and a.Test_part_no = ps.Test_part_no + + where a.project_id = #{projectId} + and a.site = #{site} + and a.Test_part_no != #{testPartNo} + and a.realFlag = 'Y' + and ps.Test_part_no is null + and dbo.Get_PartHasRealBOMRoute(a.site, a.Final_Part_No) = 'Y' SELECT a.id, - a.site, - a.code_no as codeNo, - a.project_id as projectId, - a.test_part_no as testPartNo, - a.status, - a.rev_no as revNo, - a.work_center_no as workCenterNo, - a.ECN_flag as ecnFlag, - a.ECN_no as ecnNo, - a.ori_code_no as oriCodeNo, - a.ECN_address as ecnAddress, - a.remark, - a.create_date as createDate, - a.create_by as createBy, - a.update_date as updateDate, - a.update_by as updateBy, - b.final_part_no as finalPartNo, - b.part_type as partTypeDesc, - b.part_type as partType, - b.part_name as partName, - b.part_desc as partDesc, - b.part_spec as partSpec, - dbo.plm_get_technicalBaseDesc(a.status, 'status') as statusDesc, - a.proofing_no as proofingNo, - b.bu_no as buNo, - dbo.plm_get_bu_desc(a.site, b.bu_no) as buDesc, - dbo.get_technicalSpecificationTeamName(a.site, a.code_no, 'engineer') as engineer, - dbo.get_technicalSpecificationTeamName(a.site, a.code_no, 'technician') as technician, - process, - dbo.get_technicalSpecificationTeamName(a.site, a.code_no, 'quotationOfficer') as quotationOfficer, - dbo.get_technicalSpecificationTeamNo(a.site, a.code_no, 'engineer') as engineerNo, - dbo.get_technicalSpecificationTeamNo(a.site, a.code_no, 'technician') as technicianNo, - c.customer_Id as customerId, - a.picture_addess as pictureAddess, - a.customerPictureChangeRemark, - a.productionFileComments, - a.bom_type as bomType, - a.eng_chg_level as engChgLevel, - a.bom_alternative_no as bomAlternativeNo, - a.routing_type as routingType, - a.routing_revision as routingRevision, - a.routing_alternative_no as routingAlternativeNo, - a.pod, - a.mpOperator, - dbo.get_userDisPlay(a.mpOperator) as mpOperatorName, - a.peOperater, - dbo.get_userDisPlay(a.peOperater) as peOperaterName, - a.csOperater, - dbo.get_userDisPlay(a.csOperater) as csOperaterName, - dbo.get_technicalSpecificationTeamNames(a.site, a.code_no, 'dcc') as dccOperaterName, - dbo.get_technicalSpecificationTeamNames(a.site, a.code_no, 'cqc') as cqcOperatorName, - dbo.get_technicalSpecificationTeamNames(a.site, a.code_no, 'fai') as faiOperatorName, - - - - - d.is_reject as isReject, - d.node_id as nodeId, - d.node_name as nodeName, - pcpi.customer_part_no as customerPartNo, + a.site, + a.code_no as codeNo, + a.project_id as projectId, + a.test_part_no as testPartNo, + a.status, + a.rev_no as revNo, + a.work_center_no as workCenterNo, + a.ECN_flag as ecnFlag, + a.ECN_no as ecnNo, + a.ori_code_no as oriCodeNo, + a.ECN_address as ecnAddress, + a.remark, + a.create_date as createDate, + a.create_by as createBy, + a.update_date as updateDate, + a.update_by as updateBy, + b.final_part_no as finalPartNo, + b.part_type as partTypeDesc, + b.part_type as partType, + b.part_name as partName, + b.part_desc as partDesc, + b.part_spec as partSpec, + dbo.plm_get_technicalBaseDesc(a.status, 'status') as statusDesc, + a.proofing_no as proofingNo, + b.bu_no as buNo, + dbo.plm_get_bu_desc(a.site, b.bu_no) as buDesc, + dbo.get_technicalSpecificationTeamName(a.site, a.code_no, 'engineer') as engineer, + dbo.get_technicalSpecificationTeamName(a.site, a.code_no, 'technician') as technician, + process, + dbo.get_technicalSpecificationTeamName(a.site, a.code_no, 'quotationOfficer') as quotationOfficer, + dbo.get_technicalSpecificationTeamNo(a.site, a.code_no, 'engineer') as engineerNo, + dbo.get_technicalSpecificationTeamNo(a.site, a.code_no, 'technician') as technicianNo, + c.customer_Id as customerId, + a.picture_addess as pictureAddess, + a.customerPictureChangeRemark, + a.productionFileComments, + a.bom_type as bomType, + a.eng_chg_level as engChgLevel, + a.bom_alternative_no as bomAlternativeNo, + a.routing_type as routingType, + a.routing_revision as routingRevision, + a.routing_alternative_no as routingAlternativeNo, + a.pod, + a.mpOperator, + dbo.get_userDisPlay(a.mpOperator) as mpOperatorName, + a.peOperater, + dbo.get_userDisPlay(a.peOperater) as peOperaterName, + a.csOperater, + dbo.get_userDisPlay(a.csOperater) as csOperaterName, + dbo.get_technicalSpecificationTeamNames(a.site, a.code_no, 'dcc') as dccOperaterName, + dbo.get_technicalSpecificationTeamNames(a.site, a.code_no, 'cqc') as cqcOperatorName, + dbo.get_technicalSpecificationTeamNames(a.site, a.code_no, 'fai') as faiOperatorName, + + + + + d.is_reject as isReject, + d.node_id as nodeId, + d.node_name as nodeName, + pcpi.customer_part_no as customerPartNo, dbo.get_plm_Approval_username(a.site, prh.workflow_id, d.node_id, a.code_no) as sp, a.remarkPage, a.rev, - a.customer_rev as customerRev, - b.plm_part_no as plmPartNo, - c.project_name as projectName + a.customer_rev as customerRev, + b.plm_part_no as plmPartNo, + c.project_name as projectName FROM plm_technical_specification_sheet a - left join view_Project_final_Part b - on a.site = b.site and a.project_id = b.project_id and a.test_part_no = b.test_part_no - left join plm_project_info c on a.site = c.site and a.project_id = c.project_id - left join plm_request_header as prh on a.site = prh.site and prh.menu_id = '103002' - left join plm_request_node as d on a.site = d.site and prh.classification_no = d.classification_no and - prh.workflow_id = d.workflow_id and a.step_id = d.step_id - left join plm_customer_part_info pcpi - on a.site = pcpi.site and a.test_part_no = pcpi.part_no and c.customer_id = pcpi.customer_no + left join view_Project_final_Part b + on a.site = b.site and a.project_id = b.project_id and a.test_part_no = b.test_part_no + left join plm_project_info c on a.site = c.site and a.project_id = c.project_id + left join plm_request_header as prh on a.site = prh.site and prh.menu_id = '103002' + left join plm_request_node as d on a.site = d.site and prh.classification_no = d.classification_no and + prh.workflow_id = d.workflow_id and a.step_id = d.step_id + left join plm_customer_part_info pcpi + on a.site = pcpi.site and a.test_part_no = pcpi.part_no and c.customer_id = pcpi.customer_no inner join plm_bm_prepress pbp on pbp.Site = a.site and pbp.code_no = a.code_no and - (plateNo like #{cutterNumber} or - cutterNumber like #{cutterNumber}) + (plateNo like #{cutterNumber} or + cutterNumber like #{cutterNumber}) @@ -1509,21 +2395,21 @@ step_id,reject_flag,reject_step_id,mpOperator,pod AND ( - a.test_part_no like #{testPartNo} or - b.final_part_no like #{testPartNo} or - a.relevance_part_no like #{testPartNo} or - pcpi.customer_part_no like #{testPartNo} - ) + a.test_part_no like #{testPartNo} or + b.final_part_no like #{testPartNo} or + a.relevance_part_no like #{testPartNo} or + pcpi.customer_part_no like #{testPartNo} + ) AND ( - dbo.plm_get_customer_desc(c.site, c.customer_id) like #{customerDesc}) + dbo.plm_get_customer_desc(c.site, c.customer_id) like #{customerDesc}) and a.status != 'death' - + and a.status = #{statusDesc} @@ -1537,21 +2423,20 @@ step_id,reject_flag,reject_step_id,mpOperator,pod \ No newline at end of file