<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="">
	<query id="JdgComBasePhyC.getPhyDept" desc="获取工艺理化试样组对应的科室">
        <![CDATA[
SELECT D.PHY_DEPTID
  FROM PLN_SALEORD                  A,
       CRAFT_ORD_DESIGN             B,
       CRAFT_ORD_DESIGN_STD_PIC_SMP C,
       COM_BASE_PHY_C               D
 WHERE A.ORD_LN_DLY_PK = {0}
   AND B.ORD_LN_PK = A.ORD_LN_PK
   AND B.CRAFT_SEQ = {1}
   AND C.DESGIN_KEY = B.DESGIN_KEY
   AND C.MSC_PLINE = {2}
   AND C.PROCESS_CODE = {3}
   AND C.PIC = {4}
   AND D.PHY_CODE = C.PHY_CODE_MIN
 GROUP BY D.PHY_DEPTID
        ]]>
    </query>
</queryMap>