| | |
| | | </resultMap> |
| | | |
| | | <select id="saveProject" parameterType="com.mes.pp.entity.request.OptimizeRequest" resultMap="sequenceMap"> |
| | | select a.project_no, 1 as glass_type, a.width, a.height, REGEXP_REPLACE(b.glass_thickness, '\\D', '')as glass_thickness, a.heat_layout_sort, 0 as state |
| | | select a.project_no, |
| | | 1 as glass_type, |
| | | a.width, |
| | | a.height, |
| | | REGEXP_REPLACE(b.glass_thickness, '\\D', '') as glass_thickness, |
| | | a.heat_layout_sort, |
| | | 0 as state |
| | | from optimize_detail a |
| | | left join optimize_project b on a.project_no = b.project_no |
| | | where a.project_no = #{projectNo} |
| | |
| | | p.project_name |
| | | from pp.optimize_project p |
| | | where p.state = 100 |
| | | and p.project_no not in ( |
| | | and p.project_no not in ( |
| | | select es.project_no |
| | | from north_glass_mes.engineer_scheduling es |
| | | where es.project_no is not null |
| | | ) |
| | | ) |
| | | order by p.id |
| | | </select> |
| | | |
| | | <select id="engineerScheduling" parameterType="com.mes.pp.entity.request.OptimizeRequest" resultMap="resultMap"> |
| | | select es.project_no, |
| | | es.project_name, |
| | | es.type |
| | | es.project_name, |
| | | es.type |
| | | from north_glass_mes.engineer_scheduling es |
| | | where es.state = 100 |
| | | <if test="type != null and type != ''"> |
| | |
| | | |
| | | <!-- 根据类型删除engineer_scheduling表中的数据 --> |
| | | <delete id="deleteByType"> |
| | | DELETE FROM north_glass_mes.engineer_scheduling |
| | | DELETE |
| | | FROM north_glass_mes.engineer_scheduling |
| | | WHERE type = #{type} |
| | | </delete> |
| | | <delete id="deleteByScheduling"> |
| | | DELETE |
| | | FROM north_glass_mes.engineer_scheduling |
| | | WHERE project_no = #{engineerId} |
| | | and type in ( |
| | | <foreach collection="types" item="item" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | ) |
| | | </delete> |
| | | |
| | | <!-- 批量插入数据到engineer_scheduling表 --> |
| | | <insert id="batchInsert"> |