<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="工艺评审试样码科室">
	<query id="CraftSplineUnit.query" desc="查询">
		<![CDATA[
SELECT T.DEPARTID UNIT_CODE,
       T.DEPARTNAME UNIT_DESC,
       A.DEPARTNAME DEPART_DESC,
       DECODE(B.UNIT_CODE, NULL, 'False', 'True') CHK
  FROM CORE_APP_DEPARTMENT T
  LEFT JOIN CRAFT_SPLINE_UNIT B
    ON B.UNIT_CODE = T.DEPARTID, CORE_APP_DEPARTMENT A
 WHERE T.PID IN ('002001001', '002001007')
   AND T.PID = A.DEPARTID
 ORDER BY A.DEPARTNAME, T.DEPARTNAME    
		]]>
	</query>
	<query id="CraftSplineUnit.queryUnit" desc="查询维护科室">
		<![CDATA[
SELECT T.UNIT_CODE, A.DEPARTNAME UNIT_DESC FROM  CRAFT_SPLINE_UNIT T
LEFT JOIN CORE_APP_DEPARTMENT A
ON A.DEPARTID = T.UNIT_CODE
		]]>
	</query>
	<query id="CraftSplineUnit.delete" desc="删除">
		<![CDATA[
DELETE FROM CRAFT_SPLINE_UNIT T
		]]>
	</query>
	<query id="CraftSplineUnit.insert" desc="新增">
		<![CDATA[
INSERT INTO CRAFT_SPLINE_UNIT (UNIT_CODE) VALUES (?)
		]]>
	</query>
</queryMap>