首页统计

master
zhaoxiaolin 1 month ago
parent ae07d60a0f
commit 226c432a5c

@ -96,6 +96,9 @@ public interface MesReportWorkMapper {
@MapKey("nameDate")
Map<String, MesReportProduction> getLineChartsDatas(MesReportProduction mesReportProduction);
@MapKey("nameDate")
Map<String, MesReportProduction> getLineChartsDayDatas(MesReportProduction mesReportProduction);
@MapKey("name")
Map<String, MesReportProduction> getDayOfMonthDatas(MesReportProduction mesReportProduction);

@ -688,7 +688,7 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
//日期名称数组
List<String> xAxisDatas = getDays(startTime,endTime);
lineChartDto.setxAxisDatas(xAxisDatas);
Map<String,MesReportProduction> productdatas = mesReportWorkMapper.getLineChartsDatas(mesReportProduction);
Map<String,MesReportProduction> productdatas = mesReportWorkMapper.getLineChartsDayDatas(mesReportProduction);
//值
List<String> datas = new ArrayList<>();
for(String dayStr:xAxisDatas) {

@ -310,6 +310,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)mrw
group by mrw.nameDate,mrw.productCode,mrw.productName,mrw.feedbackTime
</select>
<select id="getLineChartsDayDatas" resultType="com.op.mes.domain.MesReportProduction">
select mrw.nameDate,
mrw.feedbackTime,
sum(mrw.quantity) quantity
from(
select
CONVERT(varchar(10),feedback_time, 120) nameDate,
product_code productCode,
product_name productName,
CONVERT(varchar(10),feedback_time, 120) feedbackTime,
quantity_feedback quantity
from mes_report_work
where
CONVERT(varchar(10),feedback_time, 120) >= #{productDateStart}
and #{productDateEnd} >= CONVERT(varchar(10),feedback_time, 120)
and parent_order = '0' and del_flag = '0'
)mrw
group by mrw.nameDate,mrw.feedbackTime
</select>
<select id="getDayOfMonthDatas" resultType="com.op.mes.domain.MesReportProduction">
select mrw.nameDate,
mrw.feedbackTime,
@ -766,7 +785,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bp.umrez spec,
bp.report_rate reportRate
from base_equipment be
left join pro_order_workorder pow on be.equipment_code = pow.workorder_name
left join on be.equipment_code = pow.workorder_name
left join mes_line_product mlp on pow.workorder_name = mlp.line_code and pow.product_code = mlp.product_code and mlp.del_flag='0'
left join base_product bp on bp.product_code = pow.product_code
where be.del_flag = '0' and be.sap_code is not null and pow.status in ('w2','w3')

Loading…
Cancel
Save