<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="权限功能表查询">
	<query id="CoreStandardPsc.QUERY" desc="权限功能">
		<![CDATA[
			SELECT  'FALSE' PSC_CHK,
					PSC,
				    PSC_DESC,
				    PRODUCCODE,
				    PRODUCNAME,
				    STD_CODE,
					STD_NAME,
					STEELCODE,
					STEELNAME,
					STD_STYLE,
					STD_STYLE_DESC,
					NEW_PROC_CODE,
					NEW_PROC_DESC,
					DEPARTMENT_CODE,
					DEPARTMENT_DESC,
					UNIT_CODE,
					AUTOJUDGE,
					UNIT_DESC,
					CREATE_NAME,
					TO_CHAR(CREATE_TIME,'yyyy-mm-dd hh24:mi:ss') CREATE_TIME,
					UPDATE_NAME,
					TO_CHAR(UPDATE_TIME,'yyyy-mm-dd hh24:mi:ss') UPDATE_TIME,
					DELETE_NAME,
					TO_CHAR(DELETE_TIME,'yyyy-mm-dd hh24:mi:ss') DELETE_TIME,
					VALIDFLAG,
					decode(VALIDFLAG,'1','有效','无效') VALIDFLAGNAME,
					MEMO
				FROM COM_PSC
				   WHERE VALIDFLAG in ('1' , ?)
				   ORDER BY PSC
		]]>
	</query>	
	<query id="CoreStandardPsc.ADD" desc="新增">
		<![CDATA[
			 INSERT INTO COM_PSC
							(PSC,
						    PSC_DESC,
						    PRODUCCODE,
						    PRODUCNAME,
						    STD_CODE,
							STD_NAME,
							STEELCODE,
							STEELNAME,
							STD_STYLE,
							STD_STYLE_DESC,
							NEW_PROC_CODE,
							NEW_PROC_DESC,
							DEPARTMENT_CODE,
							DEPARTMENT_DESC,
							UNIT_CODE,
							AUTOJUDGE,
							UNIT_DESC,
					        CREATE_NAME,
					        CREATE_TIME,
					        VALIDFLAG,
					        MEMO)
							VALUES(?,?,?,?,
							?,?,?,?,?,?,?,?,?,?,?,?,?,?,SYSDATE,
							'1',?)
							
			  
		]]>
	</query>
	<query id="CoreStandardPsc.MODIFY" desc="修改">
		<![CDATA[
			 UPDATE COM_PSC set
							PSC_DESC=?,
							PRODUCCODE=?,
							PRODUCNAME=?,
						    STD_CODE=?,
							STD_NAME=?,
							STEELCODE=?,
							STEELNAME=?,
							STD_STYLE=?,
							STD_STYLE_DESC=?,
							NEW_PROC_CODE=?,
							NEW_PROC_DESC=?,
							DEPARTMENT_CODE=?,
							DEPARTMENT_DESC=?,
							UNIT_CODE=?,
							AUTOJUDGE=?,
							UNIT_DESC=?,
							UPDATE_NAME=?, 
							UPDATE_TIME=SYSDATE,
							MEMO=? 
							WHERE PSC=?
		]]>
	</query>
	<query id="CoreStandardPsc.DELETE" desc="作废">
		<![CDATA[
			 UPDATE COM_PSC T
			   SET T.DELETE_NAME = ?, T.DELETE_TIME = SYSDATE, T.VALIDFLAG = '0'
			 WHERE T.PSC = ?
		]]>
	</query>
	<query id="CoreStandardPsc.RESUME" desc="恢复">
		<![CDATA[
			UPDATE COM_PSC T
               SET T.DELETE_NAME = '', T.DELETE_TIME = '', T.VALIDFLAG = '1'
             WHERE T.PSC = ?
		]]>
	</query>
</queryMap>