<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="权限功能表查询">

	<query id="CoreProcessParametersD.GetProcessGL" desc="获取工序点以及关联条数">
		<![CDATA[
			select a.station_Code,
				   a.station_Desc,
				   a.process_Code,
				   a.process_Desc,
				   count(b.station_code) GL 
				   from COM_BASE_STATION a,COM_BASE_STATION_R_CRAFT b 
				   where a.station_Code=b.station_Code(+)
 				   group by a.station_Code,a.station_Desc,a.process_Code,a.process_Desc 
 				   order by a.station_Code
		]]>
	</query>


	<query id="CoreProcessParametersD.QUERY" desc="权限功能">
		<![CDATA[
			SELECT  'FALSE' CHK,
					a.CRAFT_CODE,
				    a.CRAFTITEM_DESC,
				    a.CRAFTITEM_TYPE,
					DECODE(a.CRAFTITEM_LV, 'A', '一级', 'B', '二级', '未识别') CRAFTITEM_LV,
          			b.ALLOW_COUNT
					FROM COM_BASE_CRAFT a,
					(select AllOW_COUNT,craftitem_code from COM_BASE_STATION_R_CRAFT
					 where station_code=?) b 
          			where a.craft_code=b.craftitem_code(+) 
          			order by craft_code
		]]>
	</query>
	
	
	<query id="CoreProcessParametersD.doSave" desc="权限功能">
		<![CDATA[
			INSERT INTO COM_BASE_STATION_R_CRAFT
							(
								PROCESS_CODE,
								PROCESS_DESC,
								STATION_CODE,
								STATION_DESC,
								CRAFTITEM_CODE,
								CRAFTITEM_DESC,
								ALLOW_COUNT
							)
							VALUES(?,?,?,?,?,?,?)
		]]>
	</query>
	
	<query id="CoreProcessParametersD.GetParameters" desc="根据工序点查询对应的工艺参数">
		<![CDATA[
			 SELECT CRAFTITEM_CODE FROM  COM_BASE_STATION_R_CRAFT
			 WHERE  STATION_CODE=?
							]]>
	</query>
	
	<query id="CoreProcessParametersD.doDelete" desc="清除数据">
		<![CDATA[
			 DELETE COM_BASE_STATION_R_CRAFT WHERE STATION_CODE=?
							]]>
	</query>
	
	
	</queryMap>