|
@@ -816,21 +816,18 @@
|
|
|
max(apro.AUDITDATE) as auditDate, -- 订单评审日期
|
|
|
-- 坯料批次号
|
|
|
max(
|
|
|
- IF(apope.ID = apope.ROOTTASKID,
|
|
|
IF(apope.BLANKBATCHNUMBER is not null and apope.BLANKBATCHNUMBER!='',
|
|
|
apope.BLANKBATCHNUMBER,
|
|
|
IF(abo.PREPAREMATERIAL = '是',
|
|
|
SUBSTRING_INDEX( abo.PREPAREMATERIALBATCHNO, ',', 1 ),
|
|
|
apope.BACHMATERIALPROCESS
|
|
|
)
|
|
|
- ),
|
|
|
- null
|
|
|
)
|
|
|
) AS blankBatchNumber,
|
|
|
- max(IF(apope.ID = apope.ROOTTASKID, ifnull(arr.REPORTOUTMATERREQUEST,abo.INPUTREPORTDESCRIBE), null)) as blankDesc , -- 坯料描述
|
|
|
- max(IF(apope.ID = apope.ROOTTASKID, arr.ID, null)) as reportId, -- 坯料报工记录ID
|
|
|
- max(IF(apope.ID = apope.ROOTTASKID, arr.CHECKDATE, null)) as checkDate, -- 坯料检验日期
|
|
|
- max(IF(apope.ID = apope.ROOTTASKID, arr.BLANKLEVEL, null)) as insepctionLevel, -- 坯料检验等级
|
|
|
+ max(ifnull(arr.REPORTOUTMATERREQUEST,abo.INPUTREPORTDESCRIBE)) as blankDesc , -- 坯料描述
|
|
|
+ max(arr.ID) as reportId, -- 坯料报工记录ID
|
|
|
+ max(arr.CHECKDATE) as checkDate, -- 坯料检验日期
|
|
|
+ max(arr.BLANKLEVEL) as insepctionLevel, -- 坯料检验等级
|
|
|
-- 卡片状态
|
|
|
apope.status,
|
|
|
-- 最近修改时间
|
|
@@ -937,21 +934,18 @@
|
|
|
max(apro.AUDITDATE) as auditDate, -- 订单评审日期
|
|
|
-- 坯料批次号
|
|
|
max(
|
|
|
- IF(apope.ID = apope.ROOTTASKID,
|
|
|
IF(apope.BLANKBATCHNUMBER is not null and apope.BLANKBATCHNUMBER!='',
|
|
|
apope.BLANKBATCHNUMBER,
|
|
|
IF(abo.PREPAREMATERIAL = '是',
|
|
|
SUBSTRING_INDEX( abo.PREPAREMATERIALBATCHNO, ',', 1 ),
|
|
|
apope.BACHMATERIALPROCESS
|
|
|
)
|
|
|
- ),
|
|
|
- null
|
|
|
)
|
|
|
) AS blankBatchNumber,
|
|
|
- max(IF(apope.ID = apope.ROOTTASKID, ifnull(arr.REPORTOUTMATERREQUEST,abo.INPUTREPORTDESCRIBE), null)) as blankDesc , -- 坯料描述
|
|
|
- max(IF(apope.ID = apope.ROOTTASKID, arr.ID, null)) as reportId, -- 坯料报工记录ID
|
|
|
- max(IF(apope.ID = apope.ROOTTASKID, arr.CHECKDATE, null)) as checkDate, -- 坯料检验日期
|
|
|
- max(IF(apope.ID = apope.ROOTTASKID, arr.BLANKLEVEL, null)) as insepctionLevel, -- 坯料检验等级
|
|
|
+ max(ifnull(arr.REPORTOUTMATERREQUEST,abo.INPUTREPORTDESCRIBE)) as blankDesc , -- 坯料描述
|
|
|
+ max(arr.ID) as reportId, -- 坯料报工记录ID
|
|
|
+ max(arr.CHECKDATE) as checkDate, -- 坯料检验日期
|
|
|
+ max(arr.BLANKLEVEL) as insepctionLevel, -- 坯料检验等级
|
|
|
-- 卡片状态
|
|
|
apope.status,
|
|
|
-- 最近修改时间
|