select task_id, type_id, ma_code, qr_code, fix_code, code_type, status, create_by, create_time, update_by, update_time, remark, company_id from purchase_macode_info insert into purchase_macode_info task_id, type_id, ma_code, fix_code, code_type, status, create_by, create_time, update_by, update_time, remark, company_id, #{taskId}, #{typeId}, #{maCode}, #{fixCode}, #{codeType}, #{status}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, #{companyId}, update purchase_macode_info task_id = #{taskId}, type_id = #{typeId}, ma_code = #{maCode}, fix_code = #{fixCode}, code_type = #{codeType}, status = #{status}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, company_id = #{companyId}, where id = #{id} delete from purchase_macode_info where task_id = #{taskId} delete from purchase_macode_info where task_id in #{taskId} delete from purchase_macode_info where id = #{id} delete from purchase_macode_info where ma_code = #{maCode} delete from ma_machine where ma_code = #{maCode} delete from ma_machine where ma_id = #{maId} update purchase_macode_info set status='2' where ma_code = #{maCode} and task_id = #{taskId} and type_id = #{typeId} delete from ma_machine_label where ma_id = #{maId} delete from ma_label_bind where ma_id = #{maId} insert into ma_machine ( type_id, ma_code, pre_code, ma_status, qr_code, buy_price, ma_vender, out_fac_time, out_fac_code, assets_code, check_man, this_check_time, next_check_time, gps_code, rfid_code, erp_code, transfer_code, in_out_num, buy_task, own_house, company_id, create_time )values( #{typeId}, #{maCode}, #{preCode}, #{maStatus}, #{qrCode}, #{buyPrice}, #{maVender}, #{outFacTime}, #{outFacCode}, #{assetsCode}, #{checkMan}, #{thisCheckTime}, #{nextCheckTime}, #{gpsCode}, #{rfidCode}, #{erpCode}, #{transferCode}, #{inOutNum}, #{buyTask}, #{ownHouse}, #{companyId}, #{createTime} ) insert into ma_input_record task_id, type_id, ma_id, input_type, input_num, status, create_by, create_time, update_by, update_time, remark, company_id, #{taskId}, #{typeId}, #{maId}, #{inputType}, #{inputNum}, #{status}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, #{companyId}, insert into ma_machine_label label_code, ma_id, is_bind, label_type, company_id, create_time #{labelCode}, #{maId}, #{isBind}, #{labelType}, #{companyId}, now() insert into ma_label_bind ma_id, label_code, type_id, binder, label_type, company_id, bind_time, status, #{maId}, #{labelCode}, #{typeId}, #{binder}, #{labelType}, #{companyId}, #{bindTime}, #{status}, insert into input_apply_details task_id, ma_id, type_id, parent_id, input_num, input_type, create_by, create_time, update_by, update_time, remark, company_id, #{taskId}, #{maId}, #{typeId}, #{parentId}, #{inputNum}, #{inputType}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, #{companyId}, update ma_type set num = #{num} where type_id = #{typeId} update ma_machine set ma_status = #{maStatus} where ma_id = #{maId} update purchase_macode_info set status = #{status} where task_id = #{taskId} and type_id = #{typeId} and ma_code = #{maCode} UPDATE ma_type SET num = ifnull( num, 0 ) + #{partNum} WHERE type_id = #{typeId}