You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

539 lines
24 KiB

8 months ago
8 months ago
8 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
7 months ago
1 year ago
1 year ago
8 months ago
8 months ago
7 months ago
7 months ago
8 months ago
8 months ago
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.spring.modules.request.mapper.RequestManageMapper">
  4. <select id="getRequestMainData" parameterType="com.spring.modules.request.vo.PlmRequestHeaderVo" resultType="com.spring.modules.request.vo.PlmRequestHeaderVo">
  5. SELECT
  6. a.site,
  7. a.bu,
  8. d.bu_desc,
  9. a.classification_no,
  10. a.classification_name,
  11. a.menu_id,
  12. c.name,
  13. a.workflow_id,
  14. b.workflowname,
  15. a.status,
  16. (case when a.status = 'Y' then '启用' else '停用' end) statusDesc,
  17. a.remark,
  18. a.create_by,
  19. a.create_date,
  20. a.update_by,
  21. a.update_date
  22. FROM plm_request_header a
  23. LEFT JOIN [VIEW_Process_management_OA_PLM] b ON a.workflow_id = b.workflowid
  24. LEFT JOIN sys_menu c ON a.menu_id = c.menu_id
  25. LEFT JOIN BU d ON a.site = d.site AND a.bu = d.bu_no
  26. <where>
  27. <if test = "query.site != null and query.site != ''">
  28. AND a.site like #{query.site}
  29. </if>
  30. <if test = "query.name != null and query.name != ''">
  31. AND c.name like #{query.name}
  32. </if>
  33. <if test = "query.status != null and query.status != ''">
  34. AND a.status = #{query.status}
  35. </if>
  36. <if test = "query.workflowId != null and query.workflowId != ''">
  37. AND a.workflow_id like #{query.workflowId}
  38. </if>
  39. <if test = "query.workflowname != null and query.workflowname != ''">
  40. AND b.workflowname like #{query.workflowname}
  41. </if>
  42. <if test = "query.classificationNo != null and query.classificationNo != ''">
  43. AND a.workflow_id like #{query.classificationNo}
  44. </if>
  45. </where>
  46. group by a.site, a.bu, d.bu_desc, a.classification_no, a.classification_name, a.menu_id, c.name, a.workflow_id,
  47. b.workflowname, a.status, a.remark, a.create_by, a.create_date, a.update_by, a.update_date
  48. </select>
  49. <select id="getRequestMainDataByList" parameterType="com.spring.modules.request.vo.PlmRequestHeaderVo" resultType="com.spring.modules.request.vo.PlmRequestHeaderVo">
  50. SELECT
  51. a.site,
  52. a.bu,
  53. d.bu_desc,
  54. a.classification_no,
  55. a.classification_name,
  56. a.menu_id,
  57. c.name,
  58. a.workflow_id,
  59. b.workflowname,
  60. a.status,
  61. (case when a.status = 'Y' then '启用' else '停用' end) statusDesc,
  62. a.remark,
  63. a.create_by,
  64. a.create_date,
  65. a.update_by,
  66. a.update_date
  67. FROM plm_request_header a
  68. LEFT JOIN [VIEW_Process_management_OA_PLM] b ON a.workflow_id = b.workflowid
  69. LEFT JOIN sys_menu c ON a.site = c.site AND a.menu_id = c.menu_id
  70. LEFT JOIN BU d ON a.site = d.site AND a.bu = d.bu_no
  71. <where>
  72. <if test = "query.site != null and query.site != ''">
  73. AND a.site like #{query.site}
  74. </if>
  75. <if test = "query.name != null and query.name != ''">
  76. AND c.name like #{query.name}
  77. </if>
  78. <if test = "query.workflowId != null and query.workflowId != ''">
  79. AND a.workflow_id like #{query.workflowId}
  80. </if>
  81. <if test = "query.classificationNo != null and query.classificationNo != ''">
  82. AND a.classification_no like #{query.classificationNo}
  83. </if>
  84. </where>
  85. group by a.site, a.bu, d.bu_desc, a.classification_no, a.classification_name, a.menu_id, c.name, a.workflow_id,
  86. b.workflowname, a.status, a.remark, a.create_by, a.create_date, a.update_by, a.update_date
  87. </select>
  88. <insert id="saveRequestHeader">
  89. INSERT INTO plm_request_header (site,bu,classification_no,classification_name,workflow_id,menu_id,status,create_date,create_by,remark)
  90. values(#{site},#{bu},#{classificationNo},#{classificationName},#{workflowId},#{menuId},#{status},#{createDate},#{createBy},#{remark})
  91. </insert>
  92. <update id="updateRequestHeader" parameterType="com.spring.modules.request.vo.PlmRequestHeaderVo">
  93. update plm_request_header
  94. set classification_name = #{classificationName},
  95. workflow_id = #{workflowId},
  96. menu_id = #{menuId},
  97. status = #{status},
  98. remark = #{remark},
  99. update_date = GETDATE(),
  100. update_by = #{updateBy}
  101. where classification_no = #{classificationNo}
  102. </update>
  103. <delete id="deleteRequestHeader">
  104. delete from plm_request_header
  105. where site = #{data.site} and classification_no = #{data.classificationNo}
  106. </delete>
  107. <delete id="deleteRequestNode">
  108. delete from plm_request_node
  109. where site = #{data.site} and classification_no = #{data.classificationNo}
  110. </delete>
  111. <delete id="deleteRequestNodeDetail">
  112. delete from plm_request_node_detail
  113. where site = #{data.site} and classification_no = #{data.classificationNo}
  114. </delete>
  115. <delete id="deleteRequestNodeAuthority">
  116. delete from plm_request_node_authority
  117. where site = #{data.site} and classification_no = #{data.classificationNo}
  118. </delete>
  119. <insert id="saveRequestNodeDetail">
  120. INSERT INTO plm_request_node_detail (site, bu, classification_no, node_id, node_name,
  121. create_date, create_by, remark, plm_field, oa_field, field_value,
  122. order_ref1, order_ref2, order_ref3, order_ref4, field_desc, workflow_id, plm_table, field_type, review)
  123. values
  124. <foreach item="data" index="index" collection="list" separator=",">
  125. (#{data.site}, #{data.bu},#{data.classificationNo},#{data.nodeId},#{data.nodeName},
  126. GETDATE(),#{data.createBy},#{data.remark},#{data.plmField},#{data.oaField},#{data.fieldValue}
  127. ,#{data.orderRef1},#{data.orderRef2},#{data.orderRef3},#{data.orderRef4},#{data.fieldDesc},#{data.workflowId}, #{data.plmTable}, #{data.fieldType}, #{data.review})
  128. </foreach>
  129. </insert>
  130. <delete id="deleteRequestNodeDetailByLine">
  131. delete from plm_request_node_detail
  132. where site = #{site} and workflow_id = #{workflowId}
  133. and node_id = #{nodeId}
  134. and classification_no = #{classificationNo}
  135. </delete>
  136. <select id="getRequestNodeData" resultType="com.spring.modules.request.vo.PlmRequestDetailVo">
  137. SELECT
  138. a.nodeid nodeId,
  139. a.nodename nodeName,
  140. a.nodeorder seqNo
  141. FROM VIEW_Process_management_OA_PLM a
  142. <where>
  143. <if test = "workflowId != null and workflowId != ''">
  144. AND a.workflowid like #{workflowId}
  145. </if>
  146. order by a.nodeorder
  147. </where>
  148. </select>
  149. <insert id="saveRequestNode">
  150. INSERT INTO plm_request_node (site,bu,classification_no,node_id,node_name,node_type,create_date,create_by,remark,workflow_id, seq_no, step_id, is_reject)
  151. values
  152. <foreach item="data" index="index" collection="list" separator=",">
  153. (#{data.site}, #{data.bu},#{data.classificationNo},#{data.nodeId},#{data.nodeName},#{data.nodeType},#{data.createDate}
  154. ,#{data.createBy},#{data.remark},#{data.workflowId},#{data.seqNo}, #{data.stepId}, 'Y')
  155. </foreach>
  156. </insert>
  157. <select id="getNodeInfoByWorkflow" parameterType="com.spring.modules.request.vo.PlmRequestDetailVo" resultType="com.spring.modules.request.vo.PlmRequestDetailVo">
  158. SELECT
  159. a.site,
  160. a.classification_no,
  161. a.workflow_id,
  162. c.workflowname,
  163. a.node_id,
  164. a.node_name,
  165. a.node_type,
  166. a.seq_no,
  167. a.is_reject,
  168. case when a.is_reject = 'Y' then '是' when a.is_reject = 'N' then '否' else '' end as isRejectDesc,
  169. a.countersignature_item
  170. FROM plm_request_node a
  171. LEFT JOIN plm_request_header b ON a.site = b.site and a.classification_no = b.classification_no and a.workflow_id = b.workflow_id
  172. LEFT JOIN VIEW_Process_management_OA_PLM c ON a.workflow_id = c.workflowid
  173. <where>
  174. <if test = "query.site != null and query.site != ''">
  175. AND a.site like #{query.site}
  176. </if>
  177. <if test = "query.classificationNo != null and query.classificationNo != ''">
  178. AND a.classification_no like #{query.classificationNo}
  179. </if>
  180. <if test = "query.workflowId != null and query.workflowId != ''">
  181. AND a.workflow_id like #{query.workflowId}
  182. </if>
  183. </where>
  184. group by a.site, a.classification_no, a.workflow_id, c.workflowname, a.node_id, a.node_name, a.node_type, a.seq_no, a.is_reject, a.countersignature_item
  185. order by a.seq_no
  186. </select>
  187. <select id="getNodeDetail" parameterType="com.spring.modules.request.vo.PlmRequestDetailVo" resultType="com.spring.modules.request.vo.PlmRequestDetailVo">
  188. select
  189. site,
  190. bu,
  191. classification_no,
  192. node_id,
  193. node_name,
  194. create_date,
  195. create_by,
  196. update_date,
  197. update_by,
  198. remark,
  199. plm_field,
  200. oa_field,
  201. field_value,
  202. field_desc,
  203. workflow_id,
  204. order_ref1,
  205. order_ref2,
  206. order_ref3,
  207. order_ref4,
  208. plm_table,
  209. field_type,
  210. review
  211. from
  212. plm_request_node_detail
  213. <where>
  214. <if test = "query.site != null and query.site != ''">
  215. AND site like #{query.site}
  216. </if>
  217. <if test = "query.classificationNo != null and query.classificationNo != ''">
  218. AND classification_no like #{query.classificationNo}
  219. </if>
  220. <if test = "query.workflowId != null and query.workflowId != ''">
  221. AND workflow_id like #{query.workflowId}
  222. </if>
  223. <if test = "query.nodeId != null and query.nodeId != ''">
  224. AND node_id like #{query.nodeId}
  225. </if>
  226. </where>
  227. </select>
  228. <select id="getTableList" parameterType="com.spring.modules.request.vo.TableDataVo" resultType="TableData">
  229. SELECT name as tableId
  230. FROM sys.tables where (name like #{data.tableType} + '%'
  231. <if test = "data.addTable != null and data.addTable.size() > 0">
  232. or name in (
  233. <foreach collection="data.addTable" item="item1" separator=",">
  234. #{item1}
  235. </foreach>
  236. )
  237. </if>
  238. )
  239. <if test = "data.passTable != null and data.passTable.size() > 0">
  240. AND name not in (
  241. <foreach collection="data.passTable" item="item2" separator=",">
  242. #{item2}
  243. </foreach>
  244. )
  245. </if>
  246. </select>
  247. <!-- <select id="getFieldList" parameterType="TableData" resultType="PlmFieldData">-->
  248. <!-- SELECT-->
  249. <!-- CONVERT(varchar(50), c.COLUMN_NAME) as fieldId,-->
  250. <!-- CONVERT(varchar(50), ep.value) as fieldName-->
  251. <!-- FROM INFORMATION_SCHEMA.COLUMNS c-->
  252. <!-- LEFT JOIN sys.extended_properties ep ON ep.major_id = OBJECT_ID(c.TABLE_SCHEMA + '.' + c.TABLE_NAME) AND ep.minor_id = c.ORDINAL_POSITION AND ep.name = 'MS_Description'-->
  253. <!-- WHERE c.TABLE_NAME = #{tableId} and CONVERT(varchar(50), ep.value) is not null and CONVERT(varchar(50), ep.value) <![CDATA[<>]]> ''-->
  254. <!-- </select>-->
  255. <select id="getFieldList" parameterType="TableData" resultType="PlmFieldData">
  256. SELECT
  257. col.name AS fieldId,
  258. CONVERT(varchar(50), comm.value) AS fieldName
  259. FROM
  260. sys.columns AS col
  261. INNER JOIN sys.tables AS tbl ON col.object_id = tbl.object_id
  262. INNER JOIN sys.schemas AS scm ON tbl.schema_id = scm.schema_id
  263. INNER JOIN sys.types AS typ ON col.user_type_id = typ.user_type_id
  264. LEFT JOIN sys.extended_properties AS comm ON comm.major_id = col.object_id AND comm.minor_id = col.column_id AND comm.name = N'MS_Description'
  265. WHERE
  266. tbl.name = #{tableId} and CONVERT(varchar(50), comm.value) is not null and CONVERT(varchar(50), comm.value) <![CDATA[<>]]> ''
  267. ORDER BY col.column_id
  268. </select>
  269. <select id="getAuthorityFieldList" parameterType="TableData" resultType="PlmFieldData">
  270. select
  271. a.fieldId,
  272. a.fieldName,
  273. isnull(b.update_flag,'N') updateFlag,
  274. #{tableId} as tableId,
  275. b.required
  276. from (SELECT
  277. col.name AS fieldId,
  278. CONVERT(varchar(50), comm.value) AS fieldName
  279. FROM
  280. sys.columns AS col
  281. INNER JOIN sys.tables AS tbl ON col.object_id = tbl.object_id
  282. INNER JOIN sys.schemas AS scm ON tbl.schema_id = scm.schema_id
  283. INNER JOIN sys.types AS typ ON col.user_type_id = typ.user_type_id
  284. LEFT JOIN sys.extended_properties AS comm ON comm.major_id = col.object_id AND comm.minor_id = col.column_id AND comm.name = N'MS_Description'
  285. WHERE
  286. tbl.name = #{tableId}) as a
  287. left join plm_request_node_authority as b on a.fieldId = b.field_id and b.site = #{site} and b.classification_no = #{classificationNo} and b.node_id = #{nodeId} and b.table_id = #{tableId}
  288. where a.fieldName is not null and a.fieldName <![CDATA[<>]]> ''
  289. </select>
  290. <delete id="deleteNodeAuthority" parameterType="TableData">
  291. delete from plm_request_node_authority
  292. where site = #{site} and bu = #{bu} and classification_no = #{classificationNo} and node_id = #{nodeId} and table_id = #{tableId}
  293. </delete>
  294. <insert id="saveNodeAuthority">
  295. INSERT INTO plm_request_node_authority
  296. (site, bu, classification_no, node_id, node_name, field_id, update_flag, create_date, create_by, table_id, required)
  297. values
  298. <foreach item="data" index="index" collection="list" separator=",">
  299. (#{data.site}, #{data.bu}, #{data.classificationNo}, #{data.nodeId}, #{data.nodeName}, #{data.fieldId}, #{data.updateFlag}, getDate(), #{data.createBy}, #{data.tableId}, #{data.required})
  300. </foreach>
  301. </insert>
  302. <update id="editNodeInfo" parameterType="com.spring.modules.request.vo.PlmRequestDetailVo">
  303. update plm_request_node
  304. set is_reject = #{isReject},
  305. update_date = GETDATE(),
  306. update_by = #{updateBy},
  307. countersignature_item = #{countersignatureItem}
  308. where classification_no = #{classificationNo} and site = #{site} and node_id = #{nodeId}
  309. </update>
  310. <select id="getProcessControlList" resultType="PlmProcessControllBaseData">
  311. select
  312. role_id,
  313. workflow_id,
  314. remark,
  315. #{nodeId} as node_id,
  316. #{site} as site
  317. from plm_process_controll_base
  318. where workflow_id = #{workflowId}
  319. </select>
  320. <select id="getProcessSelect" resultType="PlmProcessControllBaseData">
  321. select
  322. a.site,
  323. a.workflow_id,
  324. a.node_id,
  325. a.role_id,
  326. b.remark
  327. from plm_process_controll_value a
  328. left join plm_process_controll_base b on a.role_id = b.role_id and a.workflow_id = b.workflow_id
  329. where b.remark is not null
  330. and a.site = #{site} and a.workflow_id = #{workflowId} and a.node_id = #{nodeId}
  331. </select>
  332. <delete id="deleteProcessControlList">
  333. delete from plm_process_controll_value where site=#{site} and workflow_id=#{workflowId} and node_id=#{nodeId}
  334. </delete>
  335. <insert id="saveProcessControlList">
  336. insert into plm_process_controll_value(site,workflow_id,node_id,role_id)
  337. values (#{site},#{workflowId},#{nodeId},#{roleId})
  338. </insert>
  339. <update id="updateBMStage">
  340. update plm_technical_specification_sheet set stage='Mass Production' where site=#{site} and code_no=#{orderNo}
  341. </update>
  342. <select id="getBomAndRouteFromBM" resultType="PlmTechnicalSpecificationSheetData">
  343. select
  344. a.site,
  345. a.bom_type,
  346. a.eng_chg_level,
  347. a.bom_alternative_no,
  348. a.routing_type,
  349. a.routing_revision,
  350. a.routing_alternative_no,
  351. b.final_part_no
  352. from plm_technical_specification_sheet a
  353. left join plm_project_part b on a.site = b.site and a.test_part_no = b.test_part_no and a.project_id = b.project_id
  354. where a.site = #{site} and a.code_no = #{codeNo}
  355. </select>
  356. <select id="checkBomOfficialFlag" resultType="com.spring.modules.part.vo.BomDetailVo">
  357. select site from plm_bom_detail where site=#{site} and part_no=#{finalPartNo} and bom_type=#{bomType}
  358. and alternative_no=#{bomAlternativeNo} and eng_chg_level=#{engChgLevel,jdbcType=INTEGER}
  359. </select>
  360. <select id="checkRoutingOfficialFlag" resultType="com.spring.modules.part.vo.RoutingDetailVo">
  361. select site from plm_routing_detail where site=#{site} and part_no=#{finalPartNo} and routing_type=#{routingType}
  362. and alternative_no=#{routingAlternativeNo} and routing_revision=#{routingRevision,jdbcType=INTEGER}
  363. </select>
  364. <select id="getProcessFlowInformation" parameterType="com.spring.modules.change.vo.ProcessFormVo" resultType="com.spring.modules.change.vo.ProcessFormVo">
  365. SELECT
  366. a.site,
  367. a.bu,
  368. a.request_id,
  369. a.workflow_id,
  370. b.workflowname as workflowName,
  371. a.node_id,
  372. b.nodename as nodeName,
  373. a.domain_control_account,
  374. d.username as updateBy,
  375. a.document_no,
  376. dbo.get_display_no(a.site, a.document_no, a.document_type) as displayNo,
  377. a.document_type,
  378. a.seq_no,
  379. a.reject_flag,
  380. a.reject_node_id,
  381. a.node_conclusion,
  382. a.submit_date,
  383. a.submitted_by,
  384. a.create_date,
  385. a.create_by,
  386. a.update_date,
  387. a.id,
  388. a.is_remark,
  389. a.classification_no,
  390. a.step_id,
  391. a.menu_id,
  392. a.reject_opinion,
  393. dbo.get_document_status(a.site, a.document_no, a.document_type) as documentStatus,
  394. dbo.get_revision_no(a.site, a.document_no, a.document_type) as revisionNo
  395. FROM plm_process_form as a
  396. LEFT JOIN [VIEW_Process_management_OA_PLM] as b ON a.workflow_id = b.workflowid AND a.node_id = b.nodeid
  397. LEFT JOIN sys_user as d ON a.domain_control_account = d.domain_control_account
  398. <where>
  399. a.site = #{query.site} and a.is_remark = 0 and isnull(a.process_intervention_flag, ' ') <![CDATA[<>]]> 'Y'
  400. <if test = "query.documentNo != null and query.documentNo != ''">
  401. AND a.document_no like #{query.documentNo}
  402. </if>
  403. <if test = "query.workflowId != null and query.workflowId != ''">
  404. AND a.workflow_id like #{query.workflowId}
  405. </if>
  406. <if test = "query.workflowName != null and query.workflowName != ''">
  407. AND b.workflowname like #{query.workflowName}
  408. </if>
  409. <if test = "query.nodeId != null and query.nodeId != ''">
  410. AND a.node_id like #{query.nodeId}
  411. </if>
  412. <if test = "query.nodeName != null and query.nodeName != ''">
  413. AND b.nodename like #{query.nodeName}
  414. </if>
  415. <if test = "query.createBy != null and query.createBy != ''">
  416. AND a.create_by like #{query.createBy}
  417. </if>
  418. <if test = "query.updateBy != null and query.updateBy != ''">
  419. AND d.username like #{query.updateBy}
  420. </if>
  421. <if test = "query.documentStatus != null and query.documentStatus != ''">
  422. and dbo.get_document_status(a.site, a.document_no, a.document_type) = #{query.documentStatus}
  423. </if>
  424. </where>
  425. </select>
  426. <update id="updateProcessInterventionFlag" parameterType="com.spring.modules.change.vo.ProcessFormVo">
  427. update plm_process_form
  428. set process_intervention_flag = #{processInterventionFlag}
  429. where site = #{site} and document_no = #{documentNo} and request_id = #{requestId} and node_id = #{nodeId} and is_remark = 0
  430. </update>
  431. <update id="updateProcessInterventionFlag2" parameterType="com.spring.modules.change.vo.ProcessFormVo">
  432. update plm_process_form
  433. set process_intervention_flag = #{processInterventionFlag},
  434. is_remark = 1
  435. where site = #{site} and document_no = #{documentNo} and request_id = #{requestId} and node_id = #{nodeId} and is_remark = 0
  436. </update>
  437. <select id="getThePreviousProcessInfo" resultType="com.spring.modules.change.vo.ProcessFormVo">
  438. <!-- 2025-06-17 同一个流程有多个路线 导致不能按照顺序取stepId -->
  439. WITH OrderedData AS (
  440. SELECT site, bu, node_id, id, is_remark, step_id,
  441. ROW_NUMBER() OVER (ORDER BY id DESC) AS rn,
  442. LAG(step_id) OVER (ORDER BY id DESC) AS prev_step_id
  443. FROM plm_process_form
  444. WHERE site = #{site} AND document_no = #{documentNo} and ISNULL(process_intervention_flag ,' ') <![CDATA[<>]]> 'Y'
  445. ),
  446. Filtered AS (
  447. SELECT *
  448. FROM OrderedData
  449. WHERE step_id != prev_step_id OR prev_step_id IS NULL
  450. )
  451. SELECT site, bu, node_id, id, is_remark, step_id
  452. FROM Filtered
  453. ORDER BY rn OFFSET 1 ROW FETCH NEXT 1 ROW ONLY
  454. <!-- select-->
  455. <!-- site,-->
  456. <!-- bu,-->
  457. <!-- node_id,-->
  458. <!-- id,-->
  459. <!-- is_remark-->
  460. <!-- from plm_process_form-->
  461. <!-- where site = #{site} and bu = #{bu} and document_no = #{documentNo} and step_id = #{stepId} and ISNULL(process_intervention_flag ,' ') <![CDATA[<>]]> 'Y'-->
  462. </select>
  463. <update id="updateIsRemarkToZero">
  464. update plm_process_form
  465. set is_remark = 0
  466. where id = #{id}
  467. </update>
  468. <select id="getProcessSelect2" resultType="com.spring.modules.base.entity.PlmProcessControllBaseData">
  469. select
  470. a.site,
  471. a.workflow_id,
  472. a.node_id,
  473. a.role_id,
  474. b.remark
  475. from plm_process_controll_value a
  476. left join plm_process_controll_base b on a.role_id = b.role_id and a.workflow_id = b.workflow_id
  477. where b.remark is not null
  478. and a.site = #{site} and a.workflow_id = #{workflowId} and a.node_id = #{nodeId} and a.role_id = #{roleId}
  479. </select>
  480. <select id="getProcessFlowInformation2" resultType="com.spring.modules.change.vo.ProcessFormVo">
  481. EXEC dbo.get_process_form_infor #{site}, #{workflowId}, #{documentNo}, #{workflowName}, #{nodeId}, #{nodeName}, #{createBy}, #{updateBy}, #{documentType}, #{documentStatus}, #{page}, #{limit}
  482. </select>
  483. <update id="updateProcessNodeByIntervention1">
  484. update plm_process_form
  485. set node_conclusion = #{nodeConclusion2}
  486. where site = #{site} and document_no = #{documentNo} and is_remark = #{isRemark} and node_conclusion = #{nodeConclusion1}
  487. </update>
  488. <update id="updateProcessNodeByIntervention2">
  489. update plm_process_form
  490. set node_conclusion = #{nodeConclusion2},
  491. update_date = getDate(),
  492. update_by = #{userName}
  493. where site = #{site} and document_no = #{documentNo} and is_remark = #{isRemark} and (node_conclusion = #{nodeConclusion1} or node_conclusion = '')
  494. </update>
  495. <select id="getStepIdFromProcessForm" resultType="com.spring.modules.change.vo.ProcessFormVo">
  496. select
  497. step_id
  498. from plm_process_form
  499. where site = #{site} and document_no = #{documentNo} and is_remark = #{isRemark}
  500. </select>
  501. </mapper>