|
楼主 |
发表于 2023-6-15 08:52:12
|
显示全部楼层
select CONTRACT,SQL.UUID() as fID,CONTRACT.PO_NO as PO_NO,CONTRACT.PO_C_NAME as PO_C_NAME,CONTRACT.CON_U_NAME as CON_U_NAME,CONTRACT.PO_TOTAL as PO_TOTAL,DEPARTMENT.DEPT_NAME as YF_DEPT_NAME,PO_PAY.PAY_CODE as PAY_CODE,PO_PAY.PERIOD_CODE as PERIOD_CODE,PO_PAY.END_PAY as END_PAY,PO_PAY.NMGGZ as NMGGZ,PROJECT.DESCRIPTION as PROJECT_NAME,CONTRACT_CAT.TYPE_NAME as TYPE_NAME
from CONTRACT CONTRACT
optional join PO_PAY PO_PAY on CONTRACT.PO_NO = PO_PAY.PO_NO AND PO_PAY.STATUS = '数据锁定'
optional join DEPARTMENT DEPARTMENT on CONTRACT.CON_U_CODE = DEPARTMENT
optional join PROJECT PROJECT on PROJECT.PROJECT_CODE = CONTRACT.PROJECT_CODE
optional join CONTRACT_CAT CONTRACT_CAT on CONTRACT_CAT = CONTRACT.CO_TYPE
实际上到前端fid还是contract表的id,不是我生成的id |
|