<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="热处理操作人员维护">
	<query id="FrmHttPerson.doQuery" desc="维护人员实绩查询">
	 <![CDATA[ 
SELECT T.* FROM MCH_PERSON T WHERE 1 = 1 and (t.pline_code like '热处理%' or t.pline_code like '深加工%')
	  ]]>
	</query>
	
		<query id="FrmHttPerson.queryOffMaxRESULT" desc="查询最大的人员编号">
	 <![CDATA[ 
SELECT ? ||
       LPAD(SUBSTR(NVL(MAX(T.MAN_CODE), '0000'), -2, 2) + 1, 4, '0') AS MAN_CODE
  FROM mch_person T
 WHERE 1=1
	  ]]>
	</query>
	
	<query id="FrmHttPerson.addPerson" desc="维护人员实绩新增">
	 <![CDATA[ 
INSERT INTO MCH_PERSON
  (MAN_NAME,
   MAN_CODE,
   PLINE_CODE,
   PRO_BZ)
VALUES
  (?,?, ?, ?)
	  ]]>
	</query>
	
		<query id="FrmHttPerson.doQuerypline" desc="查询产线">
	 <![CDATA[ 
SELECT t.PLINE_CODE,t.PLINE_NAME FROM COM_BASE_PLINE t
where t.DEPARTMENT_DESC_P = '管加工部' and t.PROCESS_CODE ='F'
	  ]]>
	</query>
		<query id="FrmHttPerson.updatePerson" desc="修改人员">
	 <![CDATA[ 
 UPDATE MCH_PERSON T
   SET T.MAN_NAME = ?,T.PLINE_CODE = ?,T.PRO_BZ = ?
 WHERE T.MAN_NAME = ? AND T.MAN_CODE = ?
	  ]]>
	</query>
	
		<query id="FrmHttPerson.deletePerson" desc="删除人员">
	 <![CDATA[ 
 DELETE FROM MCH_PERSON T WHERE T.MAN_NAME= ? and t.MAN_CODE = ?
	  ]]>
	</query>
	

</queryMap>