select PO_ID, PO_NO, Work_NO, PI_NO, P_CODE, P_Name, Begin_date, End_date, PO_date, Send_date, workorder_Class, CP_CODE, CP_NAME, CP_TYPE, CP_MachineNO, CP_DW, CP_QTY, YL_CP_QTY, CP_IN_QTY, QD_QTY, BZ_memo, End_flag, China_in_or_out, Is_delete, cpwldm, nowcpstockqty, NWX, haveprint, BOM_Version_NO, BAD_QTY, ja_man, ja_time, department, CP_Weizhi, MJ_Weizhi, Version_NO, Factory, Made_Qty, Q_Made_Qty from workorderhead insert into workorderhead PO_ID, PO_NO, Work_NO, PI_NO, P_CODE, P_Name, Begin_date, End_date, PO_date, Send_date, workorder_Class, CP_CODE, CP_NAME, CP_TYPE, CP_MachineNO, CP_DW, CP_QTY, YL_CP_QTY, CP_IN_QTY, QD_QTY, BZ_memo, End_flag, China_in_or_out, Is_delete, cpwldm, nowcpstockqty, NWX, haveprint, BOM_Version_NO, BAD_QTY, ja_man, ja_time, department, CP_Weizhi, MJ_Weizhi, Version_NO, Factory, Made_Qty, Q_Made_Qty, #{poId}, #{poNo}, #{workNo}, #{piNo}, #{pCode}, #{pName}, #{beginDate}, #{endDate}, #{poDate}, #{sendDate}, #{workorderClass}, #{cpCode}, #{cpName}, #{cpType}, #{cpMachineno}, #{cpDw}, #{cpQty}, #{ylCpQty}, #{cpInQty}, #{qdQty}, #{bzMemo}, #{endFlag}, #{chinaInOrOut}, #{isDelete}, #{cpwldm}, #{nowcpstockqty}, #{NWX}, #{haveprint}, #{bomVersionNo}, #{badQty}, #{jaMan}, #{jaTime}, #{department}, #{cpWeizhi}, #{mjWeizhi}, #{versionNo}, #{Factory}, #{madeQty}, #{qMadeQty}, update workorderhead PO_NO = #{poNo}, Work_NO = #{workNo}, PI_NO = #{piNo}, P_CODE = #{pCode}, P_Name = #{pName}, Begin_date = #{beginDate}, End_date = #{endDate}, PO_date = #{poDate}, Send_date = #{sendDate}, workorder_Class = #{workorderClass}, CP_CODE = #{cpCode}, CP_NAME = #{cpName}, CP_TYPE = #{cpType}, CP_MachineNO = #{cpMachineno}, CP_DW = #{cpDw}, CP_QTY = #{cpQty}, YL_CP_QTY = #{ylCpQty}, CP_IN_QTY = #{cpInQty}, QD_QTY = #{qdQty}, BZ_memo = #{bzMemo}, End_flag = #{endFlag}, China_in_or_out = #{chinaInOrOut}, Is_delete = #{isDelete}, cpwldm = #{cpwldm}, nowcpstockqty = #{nowcpstockqty}, NWX = #{NWX}, haveprint = #{haveprint}, BOM_Version_NO = #{bomVersionNo}, BAD_QTY = #{badQty}, ja_man = #{jaMan}, ja_time = #{jaTime}, department = #{department}, CP_Weizhi = #{cpWeizhi}, MJ_Weizhi = #{mjWeizhi}, Version_NO = #{versionNo}, Factory = #{Factory}, Made_Qty = #{madeQty}, Q_Made_Qty = #{qMadeQty}, where PO_ID = #{poId} delete from workorderhead where PO_ID = #{poId} delete from workorderhead where PO_ID in #{poId}