delete from wf_task_record where id = #{taskId} delete from wf_collar_details where id = #{collarId} delete from wf_ma_outstock where id = #{id} insert into wf_ma_outstock TASK_ID, MODEL_ID, OUT_TIME, OUT_PERSON, PRE_COLLAR_NUM, ALREDY_COLLAR_NUM, IS_ACTIVE, IS_SURE, #{taskId}, #{maModelId}, #{outTime}, #{outPersonId}, #{preCollerNum}, #{alreadyCollerNum}, 1, 0, update wf_ma_outstock set IS_SURE = '1' where TASK_ID = #{taskId} AND MODEL_ID = #{maModelId} update wf_collar_details set IS_EXAMINE = '1',EXAMINE_USER = #{examineUser} where TASK_ID = #{taskId} and MODEL_ID = #{maModelId} update wf_collar_details set IS_APPROVAL = '1',APPROVAL_USER = #{approvalUser} where TASK_ID = #{taskId} and MODEL_ID = #{maModelId} update wf_collar_details set IS_APPROVAL = '1' where TASK_ID = #{taskId} and MODEL_ID = #{maModelId} update wf_ma_outstock ALREDY_COLLAR_NUM = #{alOutNum} where ID =#{id} update wf_ma_outstock PRE_COLLAR_NUM = #{preOutNum}, OUT_PERSON = #{outPersonId} where TASK_ID =#{taskId} insert into wf_info_record SUP_ID, MODEL_ID, TIME, CODE, TYPE, MA_ID, NUM, #{taskId}, #{typeId}, #{outTime}, #{deviceCode}, #{type}, #{maId}, #{thisOutNum}, update wf_collar_details IS_EXAMINE = #{isExamine}, IS_APPROVAL = #{isApproval}, EXAMINE_USER = #{examineUser}, APPROVAL_USER = #{approvalUser}, audit_remark = #{auditRemark}, APPROVAL_REMARK = #{approvalRemark}, IS_SURE = '0' where TASK_ID = #{taskId} and MODEL_ID = #{maModelId} delete from wf_task_record where ID = #{outTaskId} delete from wf_ma_outstock where TASK_ID = #{outTaskId} and MODEL_ID = #{maModelId} delete from wf_collar_details where TASK_ID = #{taskId} and MODEL_ID = #{maModelId} update mm_machines set BATCH_STATUS="5" where id=#{maId} delete from wf_info_record where SUP_ID = #{id} and MODEL_ID=#{maModelId} delete from wf_ma_outstock where ID = #{id} delete from wf_task_record where ID = #{taskId} insert into wf_out_back_record (task_id,model_id,ma_id,out_num,out_time,opter,opt_time) values (#{taskId},#{maModelId},#{maId},#{outNum},#{operationTime},#{userId},now()) update mm_type set num=#{num} where id=#{maModelId} update wf_ma_outstock set is_approval = 1 where id = #{id} update mm_type set num = (ifnull(num,0) + #{outNum} ) where id = #{maModelId} delete from bm_logs where task = #{taskId} and type_id = #{maModelId}