<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="质保书工艺相关信息">
	<query id="JdgQcmZbsCraftResult.insert" desc="新增">
		<![CDATA[
 INSERT INTO QCM_ZBS_CRAFT_RESULT
  (ZBS_ID,
   ZBS_SEQ,
   PROCESS_CODE,
   TESTING_GRADE,
   TESTING_TYPE,
   TESTING_GRADE1,
   TESTING_TYPE1,
   HTT_TYPE,
   MIN_TEMP,
   HTT_TECHNOLOGY,
   NOTCH_INFO,
   NOTCH_LENGTH,
   NOTCH_WIDTH,
   NOTCH_DEPTH,
   LOT_NO_GROUP,
   TEST_PRESSURE,
   HOLDTIME_TIME,
   TEST_PRESSURE_Y,
   MCH_WATERGAGE_RESULT,
   MCH_PATH_RESULT,
   MCH_CHAMFERING_RESULT,
   MCH_TWISTINGLY_RESULT,
   MCH_DIMENSIONS_RESULT,
   MCH_VISUAL_RESULT,
   MCH_THREAD_INSPECTION_RESULT,
   MCH_REMANENCE_RESULT,
   MCH_RADIOACTIVITY_RESULT,
   MCH_BEVEL_RESULT,
   ANGLE_VAL,
   EDGE_VAL,
   RCL_INFO,
   TESTING_STANDAR,
   DRIFT_MODEL_MIN,
   DRIFT_MODEL_MIN2,
   DRIFT_MODEL_LEN,
   DRIFT_MODEL_LEN2,
   MEASURED_END_PART,
   MEASURED_MIDDLE_PART,
   MEASURED_TAIL_PART,
   EXIT_TEMP)
VALUES
  ('#ZBS_ID#',
   (SELECT NVL(MAX(A.ZBS_SEQ), 0) + 1
      FROM QCM_ZBS_CRAFT_RESULT A
     WHERE A.ZBS_ID = '#ZBS_ID#'),
   '#PROCESS_CODE#',
   '#TESTING_GRADE#',
   '#TESTING_TYPE#',
   '#TESTING_GRADE1#',
   '#TESTING_TYPE1#',
   '#HTT_TYPE#',
   '#MIN_TEMP#',
   '#HTT_TECHNOLOGY#',
   '#NOTCH_INFO#',
   '#NOTCH_LENGTH#',
   '#NOTCH_WIDTH#',
   '#NOTCH_DEPTH#',
   '#LOT_NO_GROUP#',
   '#TEST_PRESSURE#',
   '#HOLDTIME_TIME#',
   '#TEST_PRESSURE_Y#',
   '#MCH_WATERGAGE_RESULT#',
   '#MCH_PATH_RESULT#',
   '#MCH_CHAMFERING_RESULT#',
   '#MCH_TWISTINGLY_RESULT#',
   '#MCH_DIMENSIONS_RESULT#',
   '#MCH_VISUAL_RESULT#',
   '#MCH_THREAD_INSPECTION_RESULT#',
   '#MCH_REMANENCE_RESULT#',
   '#MCH_RADIOACTIVITY_RESULT#',
   '#MCH_BEVEL_RESULT#',
   '#ANGLE_VAL#',
   '#EDGE_VAL#',
   '#RCL_INFO#',
   '#TESTING_STANDAR#',
   '#DRIFT_MODEL_MIN#',
   '#DRIFT_MODEL_MIN2#',
   '#DRIFT_MODEL_LEN#',
   '#DRIFT_MODEL_LEN2#',
   '#MEASURED_END_PART#',
   '#MEASURED_MIDDLE_PART#',
   '#MEASURED_TAIL_PART#',
   '#EXIT_TEMP#')
		]]>
	</query>
	
	<query id="JdgQcmZbsCraftResult.delete" desc="删除">
        <![CDATA[
 DELETE FROM QCM_ZBS_CRAFT_RESULT WHERE ZBS_ID = {0}
        ]]>
    </query>
    
    <query id="JdgQcmZbsCraftResult.update" desc="修改">
        <![CDATA[
 UPDATE QCM_ZBS_CRAFT_RESULT T
   SET T.PROCESS_CODE                 = '#PROCESS_CODE#',
       T.TESTING_GRADE                = '#TESTING_GRADE#',
       T.TESTING_TYPE                 = '#TESTING_TYPE#',
       T.TESTING_GRADE1               = '#TESTING_GRADE1#',
       T.TESTING_TYPE1                = '#TESTING_TYPE1#',
       T.HTT_TYPE                     = '#HTT_TYPE#',
       T.MIN_TEMP                     = '#MIN_TEMP#',
       T.HTT_TECHNOLOGY               = '#HTT_TECHNOLOGY#',
       T.NOTCH_INFO                   = '#NOTCH_INFO#',
       T.NOTCH_LENGTH                 = '#NOTCH_LENGTH#',
       T.NOTCH_WIDTH                  = '#NOTCH_WIDTH#',
       T.NOTCH_DEPTH                  = '#NOTCH_DEPTH#',
       T.LOT_NO_GROUP                 = '#LOT_NO_GROUP#',
       T.TEST_PRESSURE                = '#TEST_PRESSURE#',
       T.HOLDTIME_TIME                = '#HOLDTIME_TIME#',
       T.TEST_PRESSURE_Y              = '#TEST_PRESSURE_Y#',
       T.MCH_WATERGAGE_RESULT         = '#MCH_WATERGAGE_RESULT#',
       T.MCH_PATH_RESULT              = '#MCH_PATH_RESULT#',
       T.MCH_CHAMFERING_RESULT        = '#MCH_CHAMFERING_RESULT#',
       T.MCH_TWISTINGLY_RESULT        = '#MCH_TWISTINGLY_RESULT#',
       T.MCH_DIMENSIONS_RESULT        = '#MCH_DIMENSIONS_RESULT#',
       T.MCH_VISUAL_RESULT            = '#MCH_VISUAL_RESULT#',
       T.MCH_THREAD_INSPECTION_RESULT = '#MCH_THREAD_INSPECTION_RESULT#',
       T.MCH_REMANENCE_RESULT         = '#MCH_REMANENCE_RESULT#',
       T.MCH_RADIOACTIVITY_RESULT     = '#MCH_RADIOACTIVITY_RESULT#',
       T.MCH_BEVEL_RESULT             = '#MCH_BEVEL_RESULT#',
       T.ANGLE_VAL                    = '#ANGLE_VAL#',
       T.EDGE_VAL                     = '#EDGE_VAL#',
       T.RCL_INFO                     = '#RCL_INFO#',
       T.TESTING_STANDAR              = '#TESTING_STANDAR#',
       T.DRIFT_MODEL_MIN              = '#DRIFT_MODEL_MIN#',
       T.MEASURED_END_PART            = '#MEASURED_END_PART#',
       T.MEASURED_MIDDLE_PART         = '#MEASURED_MIDDLE_PART#',
       T.MEASURED_TAIL_PART           = '#MEASURED_TAIL_PART#',
       T.EXIT_TEMP                    = '#EXIT_TEMP#',
       T.DRIFT_MODEL_MIN2             = '#DRIFT_MODEL_MIN2#',
       T.DRIFT_MODEL_LEN              = '#DRIFT_MODEL_LEN#',
       T.DRIFT_MODEL_LEN2             = '#DRIFT_MODEL_LEN2#',
       T.DESC_EXPLAIN                 = '#DESC_EXPLAIN#'
 WHERE T.ZBS_ID = '#ZBS_ID#'
   AND T.ZBS_SEQ = '#ZBS_SEQ#'
        ]]>
    </query>
    
    <query id="JdgQcmZbsCraftResult.getByZbsId" desc="通过质保书ID查询所有">
        <![CDATA[
 SELECT 'False' CHK,
       T.ZBS_ID,
       T.ZBS_SEQ,
       T.PROCESS_CODE,
       T2.PROCESS_DESC,
       T.TESTING_GRADE,
       T.TESTING_TYPE,
       T.TESTING_GRADE1,
       T.TESTING_TYPE1,
       T.HTT_TYPE,
       T.MIN_TEMP,
       T.HTT_TECHNOLOGY,
       T.NOTCH_INFO,
       T.NOTCH_LENGTH,
       T.NOTCH_WIDTH,
       T.NOTCH_DEPTH,
       T.LOT_NO_GROUP,
       T.TEST_PRESSURE,
       T.HOLDTIME_TIME,
       T.TEST_PRESSURE_Y,
       T.MCH_WATERGAGE_RESULT,
       T.MCH_PATH_RESULT,
       T.MCH_CHAMFERING_RESULT,
       T.MCH_TWISTINGLY_RESULT,
       T.MCH_DIMENSIONS_RESULT,
       T.MCH_VISUAL_RESULT,
       T.MCH_THREAD_INSPECTION_RESULT,
       T.MCH_REMANENCE_RESULT,
       T.MCH_RADIOACTIVITY_RESULT,
       T.MCH_BEVEL_RESULT,
       T.ANGLE_VAL,
       T.EDGE_VAL,
       T.RCL_INFO,
       T.TESTING_STANDAR,
       T.DRIFT_MODEL_MIN,
       T.MEASURED_END_PART,
       T.MEASURED_MIDDLE_PART,
       T.MEASURED_TAIL_PART,
       T.EXIT_TEMP,
       T.DRIFT_MODEL_MIN2,
       T.DRIFT_MODEL_LEN,
       T.DRIFT_MODEL_LEN2,
       T.DESC_EXPLAIN
  FROM QCM_ZBS_CRAFT_RESULT T
  LEFT JOIN COM_BASE_PROCESS T2
    ON T2.PROCESS_CODE = T.PROCESS_CODE
 WHERE T.ZBS_ID = {0}
 ORDER BY T.ZBS_SEQ
        ]]>
    </query>
</queryMap>