select machId, machType, machName, machNo, machBrand, machSpec, machBuydate, machUsestatus, machOwnername, machOwnermobile from FmsMach insert into FmsMach machId, machType, machName, machNo, machBrand, machSpec, machBuydate, machUsestatus, machOwnername, machOwnermobile, machSystype, tid #{machId}, #{machType}, #{machName}, #{machNo}, #{machBrand}, #{machSpec}, #{machBuydate}, #{machUsestatus}, #{machOwnername}, #{machOwnermobile}, '0', #{tid} update FmsMach machType = #{machType}, machName = #{machName}, machNo = #{machNo}, machBrand = #{machBrand}, machSpec = #{machSpec}, machBuydate = #{machBuydate}, machUsestatus = #{machUsestatus}, machOwnername = #{machOwnername}, machOwnermobile = #{machOwnermobile}, tid = #{tid}, where machId = #{machId} and machSystype = '0' and tid = #{tid} delete from FmsMach where machId = #{machId} and machSystype = '0' and tid = #{tid} delete from FmsMach where machSystype = '0' and tid = #{tid} and machId in #{machId}