<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="客户信息管理">
	<query id="CoreBasePrdcrRStation.getPrdcrInfo" desc="根据客户名称查询客户编码">
		<![CDATA[
			 SELECT BASECODE,BASENAME FROM COM_BASE_INFO
			 WHERE SORTCODE = '1222' AND VALIDFLAG = '1'
		]]>
	</query>
	<query id="CoreBasePrdcrRStation.GetStationInfo" desc="根据客户ID查询收货单位是否存在">
		<![CDATA[
			 SELECT 'TRUE' CHK,
       BASECODE,
       BASENAME,
       STATION_CODE,
       STATION_DESC,
       PROCESS_CDOE,
       PROCESS_DESC,
       PROCESS_CDOE_C,
       PROCESS_DESC_C
  FROM COM_BASE_PRDCR_R_STATION
 WHERE BASECODE = ?
UNION ALL
SELECT 'FALSE' CHK,
       '' BASECODE,
       '' BASENAME,
       STATION_CODE,
       STATION_DESC,
       PROCESS_CODE,
       PROCESS_DESC,
       PROCESS_CODE_C,
       PROCESS_DESC_C
  FROM COM_BASE_STATION T
 WHERE NOT EXISTS (SELECT 1
          FROM COM_BASE_PRDCR_R_STATION R
         WHERE T.STATION_CODE = R.STATION_CODE AND BASECODE = ?)
   AND T.VALIDFLAG = '1'

		]]>
	</query>
	
	<query id="CoreBasePrdcrRStation.DeletePrdrStation" desc="根据客户名称查询客户编码">
		<![CDATA[
			 DELETE FROM COM_BASE_PRDCR_R_STATION 
			 WHERE BASECODE = ?
		]]>
	</query>
	
	<query id="CoreBasePrdcrRStation.InsertPrdrStation" desc="根据客户名称查询客户编码">
		<![CDATA[
			  INSERT INTO COM_BASE_PRDCR_R_STATION
  (BASECODE,
   BASENAME,
   STATION_CODE,
   STATION_DESC,
   PROCESS_CDOE,
   PROCESS_DESC,
   PROCESS_CDOE_C,
   PROCESS_DESC_C,
   CREATE_NAME,
   CREATE_TIME)
   VALUES
  (?, ?, ?, ?, ?, ?, ?, ?, ?, SYSDATE)
			  
		]]>
	</query>
	 
</queryMap>