|
@@ -242,4 +242,70 @@
|
|
|
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getReportExport" resultType="org.jeecg.modules.appInterface.entity.FbsWorkingStatistics" >
|
|
|
+ SELECT
|
|
|
+ a.*,
|
|
|
+ sum( a.qualified_number ) as qualified_number,
|
|
|
+ sum( a.working_hours ) as working_hours,
|
|
|
+ sum( a.planned_quantity ) as planned_quantity,
|
|
|
+ ROUND( sum( a.qualified_number )/ sum( a.planned_quantity ), 2 ) as speedOfProgress
|
|
|
+ FROM
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ fwdl.project_name,
|
|
|
+ fwdl.cost_item_code,
|
|
|
+ fwdl.original_price_code,
|
|
|
+ fwdl.wbs_element,
|
|
|
+ fwdl.wbs_element_description,
|
|
|
+ fwdl.work_report_wbs,
|
|
|
+ fwdl.work_report_network,
|
|
|
+ fwdl.work_reporting_activities,
|
|
|
+ sum( fws.qualified_number ) AS qualified_number,
|
|
|
+ sum( fws.working_hours ) AS working_hours,
|
|
|
+ fwdl.planned_quantity,
|
|
|
+ fwdl.production_order_number_name
|
|
|
+ FROM
|
|
|
+ fbs_working_statistics fws
|
|
|
+ LEFT JOIN fbs_workshop_dispatch_list fwdl ON fws.pk_workshop_dispatch_list = fwdl.id
|
|
|
+ where
|
|
|
+ fws.del_flag='0' and fws.is_cancel <![CDATA[ <> ]]> '2'
|
|
|
+ <if test="fbsWorkingStatistics.start!=null and fbsWorkingStatistics.end!=null and fbsWorkingStatistics.start!='' and fbsWorkingStatistics.end!='' and fbsWorkingStatistics.start!='null' and fbsWorkingStatistics.end!='null'">
|
|
|
+ and DATE_FORMAT(first_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{fbsWorkingStatistics.start}
|
|
|
+ and DATE_FORMAT(first_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{fbsWorkingStatistics.end}
|
|
|
+ </if>
|
|
|
+ <if test="fbsWorkingStatistics.personnelCode!=null and fbsWorkingStatistics.personnelCode!=''">
|
|
|
+ and fws.personnel_code = #{fbsWorkingStatistics.personnelCode}
|
|
|
+ </if>
|
|
|
+ <if test="fbsWorkingStatistics.orderNumber!=null and fbsWorkingStatistics.orderNumber!=''">
|
|
|
+ and fws.order_number=#{fbsWorkingStatistics.orderNumber}
|
|
|
+ </if>
|
|
|
+ <if test="fbsWorkingStatistics.finalInfo!=null and fbsWorkingStatistics.finalInfo!=''">
|
|
|
+ and fws.final_info =#{fbsWorkingStatistics.finalInfo}
|
|
|
+ </if>
|
|
|
+ <if test="fbsWorkingStatistics.costItemCode!=null and fbsWorkingStatistics.costItemCode!='' and fbsWorkingStatistics.costItemCode!='null'">
|
|
|
+ and fwdl.cost_item_code =#{fbsWorkingStatistics.costItemCode}
|
|
|
+ </if>
|
|
|
+ <if test="fbsWorkingStatistics.projectName!=null and fbsWorkingStatistics.projectName!=''">
|
|
|
+ and fwdl.project_name =#{fbsWorkingStatistics.projectName}
|
|
|
+ </if>
|
|
|
+ <if test="fbsWorkingStatistics.originalPriceCode!=null and fbsWorkingStatistics.originalPriceCode!=''">
|
|
|
+ and fwdl.original_price_code =#{fbsWorkingStatistics.originalPriceCode}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ GROUP BY
|
|
|
+ fwdl.production_order_number_name
|
|
|
+ ) a
|
|
|
+ GROUP BY
|
|
|
+ a.project_name,
|
|
|
+ a.cost_item_code,
|
|
|
+ a.original_price_code,
|
|
|
+ a.wbs_element,
|
|
|
+ a.wbs_element_description,
|
|
|
+ a.work_report_wbs,
|
|
|
+ a.work_report_network,
|
|
|
+ a.work_reporting_activities
|
|
|
+ ORDER BY
|
|
|
+ a.original_price_code
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|