<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="计量">
	<query id="LimsDataTask.getCarActual" desc="查询">
		<![CDATA[
			 SELECT
				   T.ACTUAL_NO,
				   T.PREDICTION_NO,
				   T.NOTICE_NO,
				   T.CAR_NO,
				   T.TRAILER_NO,
				   T.MATTER_NO,
				   T.MATTER_NAME,
				   T.CONTRACT_NO,
				   T.BATCH_NO,
				   T.CUSTOMER_SUPPLIER_NO,
				   T.CUSTOMER_SUPPLIER_NAME,
				   T.FORWARDING_UNIT_NO,
				   T.FORWARDING_UNIT_NAME,
				   T.RECEIVING_UINT_NO,
				   T.RECEIVING_UINT_NAME,
				   T.MATERIAL_NO,
				   T.MATERIAL_NAME,
				   T.SPEC_NO,
				   T.SPEC_NAME,
				   T.LOAD_POINT_NO,
				   T.LOAD_POINT_NAME,
				   T.SAMPLE_NO,
				   T.SAMPLE_VOUCHER,
				   T.CARRIER_UNIT_NO,
				   T.CARRIER_UNIT_NAME,
				   T.METER_TYPE_NO,
				   T.METER_TYPE_NAME,
				   T.METER_PROCESS_NO,
				   T.METER_PROCESS_EDITION_NO,
				   T.ACTUAL_FIRST1_NO,
				   T.GROSS_WEIGHT,
				   T.GROSS_MAN_NO,
				   T.GROSS_MAN_NAME,
				   TO_CHAR(T.GROSS_TIME, 'YYYY-MM-DD HH24:MI:SS') GROSS_TIME,
				   T.BASE_SPOT1_NO,
				   T.BASE_SPOT1_NAME,
				   T.GROSS_CLASS,
				   T.GROSS_GROUP,
				   T.GROSS_MODE,
				   T.ACTUAL_FIRST2_NO,
				   T.TARE_WEIGHT,
				   T.TARE_MAN_NO,
				   T.TARE_MAN_NAME,
				   TO_CHAR(T.TARE_TIME, 'YYYY-MM-DD HH24:MI:SS') TARE_TIME,
				   T.BASE_SPOT2_NO,
				   T.BASE_SPOT2_NAME,
				   T.TARE_CLASS,
				   T.TARE_GROUP,
				   T.TARE_MODE,
				   T.NET_WEIGHT,
				   T.METER_NUM,
				   T.NET_MAN_NO,
				   T.NET_MAN_NAME,
				   TO_CHAR(T.NET_TIME, 'YYYY-MM-DD HH24:MI:SS') NET_TIME,
				   T.NET_SPOT3_NO,
				   T.NET_SPOT3_NAME,
				   T.NET_GROUP,
				   T.NET_MODE,
				   T.VALUE_FLAG,
				   T.UPLOAD_FLAG,
				   T.CHECK_MAN_NO,
				   T.CHECK_MAN_NAME,
				   TO_CHAR(T.CHECK_TIME, 'YYYY-MM-DD HH24:MI:SS') CHECK_TIME,
				   T.UPLOAD_MAN_NO,
				   T.UPLOAD_MAN_NAME,
				   TO_CHAR(T.UPLOAD_TIME, 'YYYY-MM-DD HH24:MI:SS') UPLOAD_TIME,
				   T.ADD_WEIGHT,
				   T.NET_CLASS,
				   T.TB_FLAGE,
				   T.RAILWAY_NO,
				   T.UPDATE_MAN_NO,
				   T.UPDATE_MAN_NAME,
				   TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
				   T.MEMO,
				   (SELECT MEMO FROM PRE_TRACK_NOTICE WHERE CONTRACT_NO = T.CONTRACT_NO AND ROWNUM = 1) CHECK_MEMO,
				   T.HEAT_NO,
				   T.SHIPMENT_GROSS_WEIGHT,
				   T.SHIPMENT_NET_WEIGHT,
				   T.SHIPMENT_NUM,
				   T.BIND_CARD_NO,
				   T.PREDICTION_TYPE,
				   T.PREDICTION_COMBINATION,
				   T.INTER_READ,
				   T.INDEX_MATTER_NAME,
				   T.JUDGE_TYPE_NO,
				   T.JUDGE_TYPE_NAME,
				   T.VALID_MAN,
				   nvl(T.IMPURITY_WGT,0) IMPURITY_WGT,
				   nvl(T.LEN_WGT,0) LEN_WGT,
				   nvl(T.FE_WGT,0) FE_WGT,
				   nvl(T.LIGHT_WGT,0) LIGHT_WGT,
				   nvl(T.CUT_WGT,0) CUT_WGT,
				   T.MEME2,
				   TO_CHAR(T.MINUS_TIME, 'YYYY-MM-DD HH24:MI:SS') MINUS_TIME,
				   T.MINUS_MAN_NO,
				   T.MINUS_MAN_NAME,
				   T.ADD_WGT_NO,
				   T.ADD_WGT_PK,
				   nvl(T.GROSS_CAR_WEIGHT,0) GROSS_CAR_WEIGHT,
				   nvl(T.TARE_CAR_WEIGHT,0) TARE_CAR_WEIGHT,
				   T.GROSS_CAR_NO,
				   T.TARE_CAR_NO,
				   T.UNLOAD_UNIT_NO,
				   T.UNLOAD_UNIT_NAME,
				   T.UNLOAD_ADDR_NO,
				   T.UNLOAD_ADDR_NAME,
				   T.PRINT_COUNT,
				   T.PRINT_MAN_NO,
				   T.PRINT_MAN_NAME,
				   TO_CHAR(T.PRINT_TIME, 'YYYY-MM-DD HH24:MI:SS') PRINT_TIME,
				   T.SETTLEMENT_NO
			 FROM METER_WORK_CAR_ACTUAL T
			 WHERE
				 T.INTER_READ in ('0')
				 AND T.METER_TYPE_NO IN ('001006001','001006002','001006003','001006009','001006010','001006011','001006012')
				 -- T.PREDICTION_NO='202109100257'
				 -- T.ACTUAL_NO IN ('202109120257') OR T.NOTICE_NO IN ('202109120257')
				  -- and T.VALUE_FLAG = '0'
				  -- AND T.UPLOAD_FLAG = '1'
				 and ROWNUM < 30
		]]>
	</query>

	<query id="LimsDataTask.updateCarActual" desc="修改同步">
		<![CDATA[
			UPDATE METER_WORK_CAR_ACTUAL T
			SET
			T.INTER_READ = '#INTER_READ#'
			WHERE
			T.ACTUAL_NO = '#ACTUAL_NO#'
		]]>
	</query>

	<query id="LimsDataTask.getCarActualFirst" desc="查询一次计量">
		<![CDATA[
			SELECT
			T.ACTUAL_FIRST_NO,
			T.PREDICTION_NO,
			T.NOTICE_NO,
			T.CAR_NO,
			T.TRAILER_NO,
			T.MATTER_NO,
			T.MATTER_NAME,
			T.CONTRACT_NO,
			T.BATCH_NO,
			T.CUSTOMER_SUPPLIER_NO,
			T.CUSTOMER_SUPPLIER_NAME,
			T.FORWARDING_UNIT_NO,
			T.FORWARDING_UNIT_NAME,
			T.RECEIVING_UINT_NO,
			T.RECEIVING_UINT_NAME,
			T.MATERIAL_NO,
			T.MATERIAL_NAME,
			T.SPEC_NO,
			T.SPEC_NAME,
			T.SHIPMENT_GROSS_WEIGHT,
			T.SHIPMENT_NET_WEIGHT,
			T.SHIPMENT_NUM,
			T.BIND_CARD_NO,
			T.LOAD_POINT_NO,
			T.LOAD_POINT_NAME,
			T.SAMPLE_NO,
			T.SAMPLE_VOUCHER,
			T.CARRIER_UNIT_NO,
			T.CARRIER_UNIT_NAME,
			T.PREDICTION_TYPE,
			T.PREDICTION_COMBINATION,
			T.METER_TYPE_NO,
			T.METER_TYPE_NAME,
			T.RAILWAY_NO,
			T.METER_PROCESS_NO,
			T.METER_PROCESS_EDITION_NO,
			T.METER_WEIGHT,
			T.ADD_WEIGHT,
			T.METER_NUM,
			T.WEIGHT_TYPE,
			T.CREATE_MAN_NO,
			T.CREATE_MAN_NAME,
			TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
			T.BASE_SPOT_NO,
			T.BASE_SPOT_NAME,
			T.METER_CLASS,
			T.METER_GROUP,
			T.MEMO,
			T.VALUE_FLAG,
			T.UPDATE_MAN_NO,
			T.UPDATE_MAN_NAME,
			TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
			T.CHECK_FLAG,
			T.CHECK_MAN_NO,
			T.CHECK_MAN_NAME,
			TO_CHAR(T.CHECK_TIME, 'YYYY-MM-DD HH24:MI:SS') CHECK_TIME,
			T.METER_MODE,
			T.METER_REASON_NO,
			T.METER_REASON_NAME,
			TO_CHAR(T.LOAD_END_TIME, 'YYYY-MM-DD HH24:MI:SS') LOAD_END_TIME,
			T.ADD_WGT_NO,
			T.ADD_WGT_PK,
			T.LIMS_SAMPLING_FLAG,
			T.HEAT_NO
			FROM METER_WORK_CAR_ACTUAL_FIRST T
			WHERE
				T.VALUE_FLAG in ('1','0')
				and T.LIMS_SAMPLING_FLAG = '0'
				and T.METER_TYPE_NO IN ('001006006','001006007')
				and ROWNUM < 30
		]]>
	</query>

	<query id="LimsDataTask.updateCarActualFirst" desc="修改同步一次计量">
		<![CDATA[
			UPDATE METER_WORK_CAR_ACTUAL_FIRST T
			SET
			T.LIMS_SAMPLING_FLAG = '#LIMS_SAMPLING_FLAG#'
			WHERE
			T.ACTUAL_FIRST_NO = '#ACTUAL_FIRST_NO#'
		]]>
	</query>

	<query id="LimsDataTask.getMeasure" desc="查询">
		<![CDATA[
			  SELECT
				   T.MATCHID,
				   T.ICNO,
				   T.CARNO,
				   T.CARTYPE,
				   T.OPERATYPE,
				   T.TASKCODE,
				   T.ORDERNO,
				   T.MATERIALCODE,
				   T.MATERIALNAME,
				   T.MATERIALRULE,
				   T.MATERIALQUALITY,
				   T.SOURCECODE,
				   T.SOURCENAME,
				   T.TARGETCODE,
				   T.TARGETNAME,
				   T.BASKET,
				   T.GROSS,
				   TO_CHAR(T.GROSSTIME, 'YYYY-MM-DD HH24:MI:SS') GROSSTIME,
				   T.GROSSWEIGHID,
				   T.GROSSWEIGH,
				   T.GROSSWEIGHGROUP,
				   T.GROSSOPERATORID,
				   T.GROSSOPERATOR,
				   T.GROSSGROUPNO,
				   T.GROSSSERIAL,
				   T.TARE,
				   TO_CHAR(T.TARETIME, 'YYYY-MM-DD HH24:MI:SS') TARETIME,
				   T.TAREWEIGHID,
				   T.TAREWEIGH,
				   T.TAREWEIGHGROUP,
				   T.TAREOPERATORID,
				   T.TAREOPERATOR,
				   T.TAREGROUPNO,
				   T.TARESERIAL,
				   T.SUTTLE,
				   TO_CHAR(T.SUTTLETIME, 'YYYY-MM-DD HH24:MI:SS') SUTTLETIME,
				   T.SUTTLEWEIGHID,
				   T.SUTTLEWEIGH,
				   T.SUTTLEWEIGHGROUP,
				   T.SUTTLEOPERATORID,
				   T.SUTTLEOPERATOR,
				   T.DEDUCTION,
				   TO_CHAR(T.DEDUCTIONTIME, 'YYYY-MM-DD HH24:MI:SS') DEDUCTIONTIME,
				   T.DEDUCTIONUNIT,
				   T.DEDUCTIONOPERATORID,
				   T.DEDUCTIONOPERATOR,
				   T.BMATCHID,
				   T.BGROSS,
				   T.BTARE,
				   T.BSUTTLE,
				   T.PRINTNUM,
				   T.MSRMEMO,
				   T.SYSMEMO,
				   T.VALIDSTATE,
				   TO_CHAR(T.VALIDSTATETIME, 'YYYY-MM-DD HH24:MI:SS') VALIDSTATETIME,
				   T.VALIDSTATEOPERATOR,
				   TO_CHAR(T.ADDTIME, 'YYYY-MM-DD HH24:MI:SS') ADDTIME,
				   T.RECORDTYPE,
				   T.TCODE,
				   T.TNAME,
				   T.CLIENTID,
				   T.SHIPCODE,
				   T.SHIP,
				   T.MATERIALCOUNT,
				   T.STARTINGSTATION,
				   T.TAREQHPZ,
				   T.TAREZYPZ,
				   T.GROSSQHPZ,
				   T.GROSSZYPZ
			 FROM M_MEASURE_T T
			 WHERE
				T.MATCHID = '#OLDMATCHID#'
		]]>
	</query>

	<query id="LimsDataTask.deleteMeasure" desc="删除">
		delete from M_MEASURE_T t where T.MATCHID = '#MATCHID#'

	</query>

	<query id="LimsDataTask.insertMeasure" desc="新增">
		<![CDATA[
			 INSERT INTO M_MEASURE_T(
					MATCHID,
					ICNO,
					CARNO,
					CARTYPE,
					OPERATYPE,
					TASKCODE,
					ORDERNO,
					MATERIALCODE,
					MATERIALNAME,
					MATERIALRULE,
					MATERIALQUALITY,
					SOURCECODE,
					SOURCENAME,
					TARGETCODE,
					TARGETNAME,
					BASKET,
					GROSS,
					GROSSTIME,
					GROSSWEIGHID,
					GROSSWEIGH,
					GROSSWEIGHGROUP,
					GROSSOPERATORID,
					GROSSOPERATOR,
					GROSSGROUPNO,
					GROSSSERIAL,
					TARE,
					TARETIME,
					TAREWEIGHID,
					TAREWEIGH,
					TAREWEIGHGROUP,
					TAREOPERATORID,
					TAREOPERATOR,
					TAREGROUPNO,
					TARESERIAL,
					SUTTLE,
					SUTTLETIME,
					SUTTLEWEIGHID,
					SUTTLEWEIGH,
					SUTTLEWEIGHGROUP,
					SUTTLEOPERATORID,
					SUTTLEOPERATOR,
					DEDUCTION,
					DEDUCTIONTIME,
					DEDUCTIONUNIT,
					DEDUCTIONOPERATORID,
					DEDUCTIONOPERATOR,
					BMATCHID,
					BGROSS,
					BTARE,
					BSUTTLE,
					PRINTNUM,
					MSRMEMO,
					SYSMEMO,
					VALIDSTATE,
					VALIDSTATETIME,
					VALIDSTATEOPERATOR,
					ADDTIME,
					RECORDTYPE,
					TCODE,
					TNAME,
					CLIENTID,
					SHIPCODE,
					SHIP,
					MATERIALCOUNT,
					STARTINGSTATION,
					TAREQHPZ,
					TAREZYPZ,
					GROSSQHPZ,
					GROSSZYPZ)
			 VALUES(
					'#MATCHID#',
					'#ICNO#',
					'#CARNO#',
					'#CARTYPE#',
					'#OPERATYPE#',
					'#TASKCODE#',
					'#ORDERNO#',
					'#MATERIALCODE#',
					'#MATERIALNAME#',
					'#MATERIALRULE#',
					'#MATERIALQUALITY#',
					'#SOURCECODE#',
					'#SOURCENAME#',
					'#TARGETCODE#',
					'#TARGETNAME#',
					'#BASKET#',
					'#GROSS#',
					TO_DATE('#GROSSTIME#','YYYY-MM-DD HH24:MI:SS'),
					'#GROSSWEIGHID#',
					'#GROSSWEIGH#',
					'#GROSSWEIGHGROUP#',
					'#GROSSOPERATORID#',
					'#GROSSOPERATOR#',
					'#GROSSGROUPNO#',
					'#GROSSSERIAL#',
					'#TARE#',
					TO_DATE('#TARETIME#','YYYY-MM-DD HH24:MI:SS'),
					'#TAREWEIGHID#',
					'#TAREWEIGH#',
					'#TAREWEIGHGROUP#',
					'#TAREOPERATORID#',
					'#TAREOPERATOR#',
					'#TAREGROUPNO#',
					'#TARESERIAL#',
					'#SUTTLE#',
					TO_DATE('#SUTTLETIME#','YYYY-MM-DD HH24:MI:SS'),
					'#SUTTLEWEIGHID#',
					'#SUTTLEWEIGH#',
					'#SUTTLEWEIGHGROUP#',
					'#SUTTLEOPERATORID#',
					'#SUTTLEOPERATOR#',
					'#DEDUCTION#',
					TO_DATE('#GROSSTIME#','YYYY-MM-DD HH24:MI:SS'),
					'#DEDUCTIONUNIT#',
					'#DEDUCTIONOPERATORID#',
					'#DEDUCTIONOPERATOR#',
					'#BMATCHID#',
					'#BGROSS#',
					'#BTARE#',
					'#BSUTTLE#',
					'#PRINTNUM#',
					'#MSRMEMO#',
					'#SYSMEMO#',
					'#VALIDSTATE#',
					TO_DATE('#VALIDSTATETIME#','YYYY-MM-DD HH24:MI:SS'),
					'#VALIDSTATEOPERATOR#',
					SYSDATE,
					'#RECORDTYPE#',
					'#TCODE#',
					'#TNAME#',
					'#CLIENTID#',
					'#SHIPCODE#',
					'#SHIP#',
					'#MATERIALCOUNT#',
					'#STARTINGSTATION#',
					'#TAREQHPZ#',
					'#TAREZYPZ#',
					'#GROSSQHPZ#',
					'#GROSSZYPZ#')
		]]>
	</query>

	<query id="LimsDataTask.updateMeasure" desc="修改">
		<![CDATA[
			  UPDATE M_MEASURE_T T
			   SET
			   		T.MATCHID = '#MATCHID#',
					T.ICNO = '#ICNO#',
					T.CARNO = '#CARNO#',
					T.CARTYPE = '#CARTYPE#',
					T.OPERATYPE = '#OPERATYPE#',
					T.TASKCODE = '#TASKCODE#',
					T.ORDERNO = '#ORDERNO#',
					T.MATERIALCODE = '#MATERIALCODE#',
					T.MATERIALNAME = '#MATERIALNAME#',
					T.MATERIALRULE = '#MATERIALRULE#',
					T.MATERIALQUALITY = '#MATERIALQUALITY#',
					T.SOURCECODE = '#SOURCECODE#',
					T.SOURCENAME = '#SOURCENAME#',
					T.TARGETCODE = '#TARGETCODE#',
					T.TARGETNAME = '#TARGETNAME#',
					T.BASKET = '#BASKET#',
					T.GROSS = '#GROSS#',
					T.GROSSTIME = TO_DATE('#GROSSTIME#','YYYY-MM-DD HH24:MI:SS'),
					T.GROSSWEIGHID = '#GROSSWEIGHID#',
					T.GROSSWEIGH = '#GROSSWEIGH#',
					T.GROSSWEIGHGROUP = '#GROSSWEIGHGROUP#',
					T.GROSSOPERATORID = '#GROSSOPERATORID#',
					T.GROSSOPERATOR = '#GROSSOPERATOR#',
					T.GROSSGROUPNO = '#GROSSGROUPNO#',
					T.GROSSSERIAL = '#GROSSSERIAL#',
					T.TARE = '#TARE#',
					T.TARETIME = TO_DATE('#TARETIME#','YYYY-MM-DD HH24:MI:SS'),
					T.TAREWEIGHID = '#TAREWEIGHID#',
					T.TAREWEIGH = '#TAREWEIGH#',
					T.TAREWEIGHGROUP = '#TAREWEIGHGROUP#',
					T.TAREOPERATORID = '#TAREOPERATORID#',
					T.TAREOPERATOR = '#TAREOPERATOR#',
					T.TAREGROUPNO = '#TAREGROUPNO#',
					T.TARESERIAL = '#TARESERIAL#',
					T.SUTTLE = '#SUTTLE#',
					T.SUTTLETIME = TO_DATE('#SUTTLETIME#','YYYY-MM-DD HH24:MI:SS'),
					T.SUTTLEWEIGHID = '#SUTTLEWEIGHID#',
					T.SUTTLEWEIGH = '#SUTTLEWEIGH#',
					T.SUTTLEWEIGHGROUP = '#SUTTLEWEIGHGROUP#',
					T.SUTTLEOPERATORID = '#SUTTLEOPERATORID#',
					T.SUTTLEOPERATOR = '#SUTTLEOPERATOR#',
					T.DEDUCTION = '#DEDUCTION#',
					T.DEDUCTIONTIME = TO_DATE('#DEDUCTIONTIME#','YYYY-MM-DD HH24:MI:SS'),
					T.DEDUCTIONUNIT = '#DEDUCTIONUNIT#',
					T.DEDUCTIONOPERATORID = '#DEDUCTIONOPERATORID#',
					T.DEDUCTIONOPERATOR = '#DEDUCTIONOPERATOR#',
					T.BMATCHID = '#BMATCHID#',
					T.BGROSS = '#BGROSS#',
					T.BTARE = '#BTARE#',
					T.BSUTTLE = '#BSUTTLE#',
					T.PRINTNUM = '#PRINTNUM#',
					T.MSRMEMO = '#MSRMEMO#',
					T.SYSMEMO = '#SYSMEMO#',
					T.VALIDSTATE = '#VALIDSTATE#',
					T.VALIDSTATETIME = TO_DATE('#VALIDSTATETIME#','YYYY-MM-DD HH24:MI:SS'),
					T.VALIDSTATEOPERATOR = '#VALIDSTATEOPERATOR#',
					T.RECORDTYPE = '#RECORDTYPE#',
					T.TCODE = '#TCODE#',
					T.TNAME = '#TNAME#',
					T.CLIENTID = '#CLIENTID#',
					T.SHIPCODE = '#SHIPCODE#',
					T.SHIP = '#SHIP#',
					T.MATERIALCOUNT = '#MATERIALCOUNT#',
					T.STARTINGSTATION = '#STARTINGSTATION#',
					T.TAREQHPZ = '#TAREQHPZ#',
					T.TAREZYPZ = '#TAREZYPZ#',
					T.GROSSQHPZ = '#GROSSQHPZ#',
					T.GROSSZYPZ = '#GROSSZYPZ#'
			 WHERE
				T.MATCHID = '#OLDMATCHID#'
		]]>
	</query>

	<query id="LimsDataTask.getSteels" desc="查询">
		<![CDATA[
		 SELECT
			   T.ID,
			   T.MATCHID,
			   T.MATERIEL_RULE,
			   T.DEDUCTION1,
			   T.DEDUCTION2,
			   T.DEDUCTION3,
			   T.DEDUCTION4,
			   T.CHECK_OPERATOR1,
			   T.CHECK_OPERATOR2,
			   T.CHECK_OPERATOR3,
			   T.CHECK_JSTJ,
			   T.SPACES,
			   T.SPACETYPE,
			   T.BIG,
			   T.CHECK_MEMO,
			   TO_CHAR(T.ADDTIME, 'YYYY-MM-DD HH24:MI:SS') ADDTIME,
			   T.ADDOPERATORID,
			   T.ADDOPERATOR,
			   T.CANCELED,
			   TO_CHAR(T.CANCELED_TIME, 'YYYY-MM-DD HH24:MI:SS') CANCELED_TIME,
			   T.CANCELED_OPERATORID,
			   T.CANCELED_OPERATOR,
			   T.DOWNUNIT,
			   T.BELONGDEPT,
			   T.MATERIEL
		 FROM Q_STEELS_T T
		 WHERE
		 	CANCELED = '1' AND T.MATCHID = '#MATCHID#'
		]]>
	</query>

	<query id="LimsDataTask.insertSteels" desc="添加">
		<![CDATA[
		  INSERT INTO Q_STEELS_T(
				ID,
				MATCHID,
				MATERIEL_RULE,
				DEDUCTION1,
				DEDUCTION2,
				DEDUCTION3,
				DEDUCTION4,
				CHECK_OPERATOR1,
				CHECK_OPERATOR2,
				CHECK_OPERATOR3,
				CHECK_JSTJ,
				SPACES,
				SPACETYPE,
				BIG,
				CHECK_MEMO,
				ADDTIME,
				ADDOPERATORID,
				ADDOPERATOR,
				CANCELED,
				CANCELED_TIME,
				CANCELED_OPERATORID,
				CANCELED_OPERATOR,
				DOWNUNIT,
				BELONGDEPT,
				MATERIEL,
				SYS_FLAG)
		 VALUES(
				(SELECT MAX(to_number(ID)) + 1 FROM Q_STEELS_T),
				'#MATCHID#',
				'#MATERIEL_RULE#',
				'#DEDUCTION1#',
				'#DEDUCTION2#',
				'#DEDUCTION3#',
				'#DEDUCTION4#',
				'#CHECK_OPERATOR1#',
				'#CHECK_OPERATOR2#',
				'#CHECK_OPERATOR3#',
				'#CHECK_JSTJ#',
				'#SPACES#',
				'#SPACETYPE#',
				'#BIG#',
				'#CHECK_MEMO#',
				TO_DATE('#ADDTIME#','YYYY-MM-DD HH24:MI:SS'),
				'#ADDOPERATORID#',
				'#ADDOPERATOR#',
				'#CANCELED#',
				TO_DATE('#CANCELED_TIME#','YYYY-MM-DD HH24:MI:SS'),
				'#CANCELED_OPERATORID#',
				'#CANCELED_OPERATOR#',
				'#DOWNUNIT#',
				'#BELONGDEPT#',
				'#MATERIEL#',
				'#SYS_FLAG#')
		]]>
	</query>

	<query id="LimsDataTask.deleteSteels" desc="删除">
		<![CDATA[
		  DELETE FROM Q_STEELS_T WHERE MATCHID = '#MATCHID#' and SYS_FLAG = '1'
		]]>
	</query>

	<query id="LimsDataTask.getMatInfo" desc="查询">
		<![CDATA[
			 SELECT
				   T.MATTER_NO,
				   T.MATTER_NAME,
				   T.INDEX_CODE,
				   T.MNEMONIC_CODE,
				   T.MATTER_NATURE_NO,
				   T.MATTER_NATURE_NAME,
				   T.METER_NATURE_NO,
				   T.METER_NATURE_NAME,
				   T.VALID_FLAG,
				   T.CREATE_MAN_NO,
				   T.CREATE_MAN_NAME,
				   TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
				   T.UPDATE_MAN_NO,
				   T.UPDATE_MAN_NAME,
				   TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
				   T.DELETE_MAN_NO,
				   T.DELETE_MAN_NAME,
				   TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
				   T.METER_CODE,
				   T.ALLOWED_TARE_WEIGHT,
				   T.ALLOWED_ADD_WEIGHT,
				   T.SCALE_VALID_PERIOD,
				   T.SPEC_NAME,
				   T.MEMO,
				   T.REPORT_CODE,
				   T.SETTLEMENT_UNIT,
				   T.SETTLEMENT_PRICE
			 FROM METER_BASE_MATTER_INFO T
			 WHERE
			T.MATTER_NO = '#MATTER_NO#'
		]]>
	</query>

	<query id="LimsDataTask.getSuppInfo" desc="查询">
		<![CDATA[
			 SELECT
				   T.CUSTOMER_SUPPLIER_NO,
				   T.CUSTOMER_SUPPLIER_NAME,
				   T.MNEMONIC_CODE,
				   T.CUSTOMER_SUPPLIER_TYPE,
				   T.CUSTOMER_SUPPLIER_PASSWORD,
				   T.VALID_FLAG,
				   T.CREATE_MAN_NO,
				   T.CREATE_MAN_NAME,
				   TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
				   T.UPDATE_MAN_NO,
				   T.UPDATE_MAN_NAME,
				   TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
				   T.DELETE_MAN_NO,
				   T.DELETE_MAN_NAME,
				   TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
				   T.CUSTOMER_SUPPLIER_LOGIN,
				   T.CHECK_FLAG,
				   T.MEMO,
				   T.INDEX_CODE
			 FROM METER_BASE_CUSTOMER_SUPPLIER T
			 WHERE
			T.CUSTOMER_SUPPLIER_NO = '#CUSTOMER_SUPPLIER_NO#'
		]]>
	</query>

	<query id="LimsDataTask.getOldUnit" desc="查询">
		<![CDATA[
		 SELECT
			   T.UNITCODE,
			   T.UNITNAME,
			   T.ERPCODE,
			   T.UNITTYPE,
			   T.USERCOUNT,
			   TO_CHAR(T.UPTIME, 'YYYY-MM-DD HH24:MI:SS') UPTIME,
			   T.UPOPERATORID,
			   T.UPOPERATOR,
			   T.VALIDFLAG,
			   T.RECORDTYPE,
			   T.UPTIMESTAMP
		 FROM M_UNIT_T T
		 WHERE
		 	T.VALIDFLAG = '1'
			AND T.UNITNAME = '#UNITNAME#'
		]]>
	</query>

	<query id="LimsDataTask.getMaterial" desc="查询">
		<![CDATA[
		 SELECT
			   T.MATERIELCODE,
			   T.MATERIELNAME,
			   T.ERPCODE,
			   T.CHECKFLAG,
			   T.USERCOUNT,
			   TO_CHAR(T.UPTIME, 'YYYY-MM-DD HH24:MI:SS') UPTIME,
			   T.UPOPERATORID,
			   T.UPOPERATOR,
			   T.RECORDTYPE,
			   T.VALIDFLAG,
			   T.UPTIMESTAMP
		 FROM M_MATERIAL_T T
		 WHERE
			 T.VALIDFLAG = '1'
			 AND T.MATERIELNAME = '#MATERIELNAME#'
		]]>
	</query>


	<query id="LimsDataTask.getMaterialAll" desc="查询">
		<![CDATA[
		 SELECT
			   T.MATERIELCODE,
			   T.MATERIELNAME,
			   T.ERPCODE,
			   T.CHECKFLAG,
			   T.USERCOUNT,
			   TO_CHAR(T.UPTIME, 'YYYY-MM-DD HH24:MI:SS') UPTIME,
			   T.UPOPERATORID,
			   T.UPOPERATOR,
			   T.RECORDTYPE,
			   T.VALIDFLAG,
			   T.UPTIMESTAMP
		 FROM M_MATERIAL_T T
		 WHERE
			 T.ADDTIME >= TO_DATE('2021-09-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS')
			AND T.SYSMEMO = '新计量同步'
			AND T.VALIDSTATE = '1'
		]]>
	</query>


	<query id="LimsDataTask.getCarActualAll" desc="查询">
		<![CDATA[
		 		SELECT
				   T.ACTUAL_NO,
				   T.PREDICTION_NO,
				   T.NOTICE_NO,
				   T.CAR_NO,
				   T.TRAILER_NO,
				   T.MATTER_NO,
				   T.MATTER_NAME,
				   T.CONTRACT_NO,
				   T.BATCH_NO,
				   T.CUSTOMER_SUPPLIER_NO,
				   T.CUSTOMER_SUPPLIER_NAME,
				   T.FORWARDING_UNIT_NO,
				   T.FORWARDING_UNIT_NAME,
				   T.RECEIVING_UINT_NO,
				   T.RECEIVING_UINT_NAME,
				   T.MATERIAL_NO,
				   T.MATERIAL_NAME,
				   T.SPEC_NO,
				   T.SPEC_NAME,
				   T.LOAD_POINT_NO,
				   T.LOAD_POINT_NAME,
				   T.SAMPLE_NO,
				   T.SAMPLE_VOUCHER,
				   T.CARRIER_UNIT_NO,
				   T.CARRIER_UNIT_NAME,
				   T.METER_TYPE_NO,
				   T.METER_TYPE_NAME,
				   T.METER_PROCESS_NO,
				   T.METER_PROCESS_EDITION_NO,
				   T.ACTUAL_FIRST1_NO,
				   T.GROSS_WEIGHT,
				   T.GROSS_MAN_NO,
				   T.GROSS_MAN_NAME,
				   TO_CHAR(T.GROSS_TIME, 'YYYY-MM-DD HH24:MI:SS') GROSS_TIME,
				   T.BASE_SPOT1_NO,
				   T.BASE_SPOT1_NAME,
				   T.GROSS_CLASS,
				   T.GROSS_GROUP,
				   T.GROSS_MODE,
				   T.ACTUAL_FIRST2_NO,
				   T.TARE_WEIGHT,
				   T.TARE_MAN_NO,
				   T.TARE_MAN_NAME,
				   TO_CHAR(T.TARE_TIME, 'YYYY-MM-DD HH24:MI:SS') TARE_TIME,
				   T.BASE_SPOT2_NO,
				   T.BASE_SPOT2_NAME,
				   T.TARE_CLASS,
				   T.TARE_GROUP,
				   T.TARE_MODE,
				   T.NET_WEIGHT,
				   T.METER_NUM,
				   T.NET_MAN_NO,
				   T.NET_MAN_NAME,
				   TO_CHAR(T.NET_TIME, 'YYYY-MM-DD HH24:MI:SS') NET_TIME,
				   T.NET_SPOT3_NO,
				   T.NET_SPOT3_NAME,
				   T.NET_GROUP,
				   T.NET_MODE,
				   T.VALUE_FLAG,
				   T.UPLOAD_FLAG,
				   T.CHECK_MAN_NO,
				   T.CHECK_MAN_NAME,
				   TO_CHAR(T.CHECK_TIME, 'YYYY-MM-DD HH24:MI:SS') CHECK_TIME,
				   T.UPLOAD_MAN_NO,
				   T.UPLOAD_MAN_NAME,
				   TO_CHAR(T.UPLOAD_TIME, 'YYYY-MM-DD HH24:MI:SS') UPLOAD_TIME,
				   T.ADD_WEIGHT,
				   T.NET_CLASS,
				   T.TB_FLAGE,
				   T.RAILWAY_NO,
				   T.UPDATE_MAN_NO,
				   T.UPDATE_MAN_NAME,
				   TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
				   T.MEMO,
				   T.HEAT_NO,
				   T.SHIPMENT_GROSS_WEIGHT,
				   T.SHIPMENT_NET_WEIGHT,
				   T.SHIPMENT_NUM,
				   T.BIND_CARD_NO,
				   T.PREDICTION_TYPE,
				   T.PREDICTION_COMBINATION,
				   T.INTER_READ,
				   T.INDEX_MATTER_NAME,
				   T.JUDGE_TYPE_NO,
				   T.JUDGE_TYPE_NAME,
				   T.VALID_MAN,
				   nvl(T.IMPURITY_WGT,0) IMPURITY_WGT,
				   nvl(T.LEN_WGT,0) LEN_WGT,
				   nvl(T.FE_WGT,0) FE_WGT,
				   nvl(T.LIGHT_WGT,0) LIGHT_WGT,
				   nvl(T.CUT_WGT,0) CUT_WGT,
				   T.MEME2,
				   TO_CHAR(T.MINUS_TIME, 'YYYY-MM-DD HH24:MI:SS') MINUS_TIME,
				   T.MINUS_MAN_NO,
				   T.MINUS_MAN_NAME,
				   T.ADD_WGT_NO,
				   T.ADD_WGT_PK,
				   nvl(T.GROSS_CAR_WEIGHT,0) GROSS_CAR_WEIGHT,
				   nvl(T.TARE_CAR_WEIGHT,0) TARE_CAR_WEIGHT,
				   T.GROSS_CAR_NO,
				   T.TARE_CAR_NO,
				   T.UNLOAD_UNIT_NO,
				   T.UNLOAD_UNIT_NAME,
				   T.UNLOAD_ADDR_NO,
				   T.UNLOAD_ADDR_NAME,
				   T.PRINT_COUNT,
				   T.PRINT_MAN_NO,
				   T.PRINT_MAN_NAME,
				   TO_CHAR(T.PRINT_TIME, 'YYYY-MM-DD HH24:MI:SS') PRINT_TIME,
				   T.SETTLEMENT_NO
			 FROM METER_WORK_CAR_ACTUAL T
			 WHERE
			 	T.ACTUAL_NO = '#ACTUAL_NO#'
			 	OR T.NOTICE_NO = '#NOTICE_NO#'
		]]>
	</query>
</queryMap>
