|
@@ -642,12 +642,58 @@
|
|
IF(statement.assets_name IS NULL, assets.name, statement.assets_name) AS projectName,
|
|
IF(statement.assets_name IS NULL, assets.name, statement.assets_name) AS projectName,
|
|
statement.production_no AS statementNo,
|
|
statement.production_no AS statementNo,
|
|
statement.create_production_date AS writeStatementDate,
|
|
statement.create_production_date AS writeStatementDate,
|
|
|
|
+ (
|
|
|
|
+ SELECT GROUP_CONCAT(
|
|
|
|
+ IF(target.evaluation_type_defined_sec IS NOT NULL, CONCAT(type.type_name, '-', secType.type_name,
|
|
|
|
+ '-', target.evaluation_type_defined_sec),
|
|
|
|
+ CONCAT(type.type_name, '-', secType.type_name))
|
|
|
|
+ SEPARATOR '; '
|
|
|
|
+ ) AS targetTypeName
|
|
|
|
+ FROM assets_evaluation_target AS target
|
|
|
|
+ LEFT JOIN assets_evaluation_target_type AS type ON type.id = target.evaluation_type_id
|
|
|
|
+ LEFT JOIN assets_evaluation_target_type AS secType ON secType.id = target.evaluation_type_sec_id
|
|
|
|
+ WHERE target.deleted = 0
|
|
|
|
+ AND IF(statement.production_no IS NOT NULL, target.statement_no = statement.production_no, target.assets_id = assets.id)
|
|
|
|
+ ) AS targetTypeName,
|
|
|
|
+ (
|
|
|
|
+ SELECT GROUP_CONCAT(
|
|
|
|
+ purpose.purpose_name
|
|
|
|
+ SEPARATOR '; '
|
|
|
|
+ ) AS targetTypeName
|
|
|
|
+ FROM assets_evaluation_target AS target
|
|
|
|
+ LEFT JOIN assets_evaluation_target_purpose AS purpose ON purpose.id = target.evaluation_purpose_id
|
|
|
|
+ WHERE target.deleted = 0
|
|
|
|
+ AND IF(statement.production_no IS NOT NULL, target.statement_no = statement.production_no, target.assets_id = assets.id)
|
|
|
|
+ ) AS purposeName,
|
|
</if>
|
|
</if>
|
|
<if test="dto != null and dto.efficiencyType != 'statement'">
|
|
<if test="dto != null and dto.efficiencyType != 'statement'">
|
|
IF(report.assets_name IS NULL, assets.name, report.assets_name) AS projectName,
|
|
IF(report.assets_name IS NULL, assets.name, report.assets_name) AS projectName,
|
|
report.production_no AS reportNo,
|
|
report.production_no AS reportNo,
|
|
report.create_production_date AS writeReportDate,
|
|
report.create_production_date AS writeReportDate,
|
|
(SELECT SUM(check_value) FROM assets_evaluation_target WHERE report_no = report.production_no AND deleted = 0) AS checkValueSum,
|
|
(SELECT SUM(check_value) FROM assets_evaluation_target WHERE report_no = report.production_no AND deleted = 0) AS checkValueSum,
|
|
|
|
+ (
|
|
|
|
+ SELECT GROUP_CONCAT(
|
|
|
|
+ IF(target.evaluation_type_defined_sec IS NOT NULL, CONCAT(type.type_name, '-', secType.type_name,
|
|
|
|
+ '-', target.evaluation_type_defined_sec),
|
|
|
|
+ CONCAT(type.type_name, '-', secType.type_name))
|
|
|
|
+ SEPARATOR '; '
|
|
|
|
+ ) AS targetTypeName
|
|
|
|
+ FROM assets_evaluation_target AS target
|
|
|
|
+ LEFT JOIN assets_evaluation_target_type AS type ON type.id = target.evaluation_type_id
|
|
|
|
+ LEFT JOIN assets_evaluation_target_type AS secType ON secType.id = target.evaluation_type_sec_id
|
|
|
|
+ WHERE target.deleted = 0
|
|
|
|
+ AND IF(report.production_no IS NOT NULL, target.report_no = report.production_no, target.assets_id = assets.id)
|
|
|
|
+ ) AS targetTypeName,
|
|
|
|
+ (
|
|
|
|
+ SELECT GROUP_CONCAT(
|
|
|
|
+ purpose.purpose_name
|
|
|
|
+ SEPARATOR '; '
|
|
|
|
+ ) AS targetTypeName
|
|
|
|
+ FROM assets_evaluation_target AS target
|
|
|
|
+ LEFT JOIN assets_evaluation_target_purpose AS purpose ON purpose.id = target.evaluation_purpose_id
|
|
|
|
+ WHERE target.deleted = 0
|
|
|
|
+ AND IF(report.production_no IS NOT NULL, target.report_no = report.production_no, target.assets_id = assets.id)
|
|
|
|
+ ) AS purposeName,
|
|
</if>
|
|
</if>
|
|
order_fund.should_amount AS shouldAmount,
|
|
order_fund.should_amount AS shouldAmount,
|
|
order_fund.real_amount AS realAmount,
|
|
order_fund.real_amount AS realAmount,
|