id, node_name NAME,type, parent_id,ins_t,upd_t, ins_p,upd_p,data_start,orderTypeCode,bookKeeping,isBlock INSERT INTO epc_cost_type_{rule} parent_id, type, node_name, ins_t, upd_t, ins_p, upd_p, data_start, orderTypeCode, sortCode, re_course_code, id, #{parentId} , #{type}, #{nodeName}, #{insT}, #{updT}, #{insP} , #{updP} , #{dataStart} , #{orderTypeCode}, #{sortCode}, #{recourseCode}, #{recourseCode}, UPDATE epc_cost_type_{rule} node_name = #{nodeName}, isBlock = #{isBlock}, bookKeeping = #{bookKeeping} where id = #{id} update epc_cost_type_{rule} SET parent_id =#{data.parentId} where id=#{data.id} UPDATE epc_cost_type_{rule} SET data_start = 99 WHERE id = #{id} DELETE FROM epc_cost_type_{rule} WHERE re_course_code=#{recourseCode} DELETE FROM epc_cost_type_{rule} WHERE parent_id=#{parentId} UPDATE epc_cost_type_{rule} node_name=#{nodeName}, where orderTypeCode=#{orderTypeCode} and re_course_code=#{recourseCode} update epc_cost_type_{rule} type=#{type}, where parent_id=#{parentId} INSERT INTO epc_cost_type_{rule} ( codeId, type, node_name, parent_id, re_course_code, id, ins_t, upd_t, data_start, orderTypeCode, sortCode ) VALUES ( #{updataBusType.id}, #{updataBusType.type}, #{updataBusType.name}, #{updataBusType.parentId}, #{updataBusType.id}, #{updataBusType.id}, NOW(), NOW(), 0, #{updataBusType.orderTypeCode}, #{updataBusType.sortCode} ) UPDATE epc_cost_type_{rule} SET type = #{updataBusType.type}, node_name = #{updataBusType.name}, parent_id = #{updataBusType.parentId}, re_course_code = #{updataBusType.id}, upd_t = NOW(), orderTypeCode = #{updataBusType.orderTypeCode}, sortCode = #{updataBusType.sortCode} WHERE codeId = #{updataBusType.id} AND data_start = '0' delete from epc_cost_type_{rule} WHERE codeId = #{codeId} AND data_start = '0'