0904-需求变更问题修改
This commit is contained in:
@@ -11,6 +11,7 @@ import com.ktg.mes.pro.service.IProYearReportService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.Year;
|
||||
import java.time.YearMonth;
|
||||
import java.util.List;
|
||||
@@ -49,7 +50,13 @@ public class ProMeterialConsumeServiceImpl extends ServiceImpl<ProMeterialConsum
|
||||
this.updateById(ProMeterialConsume.builder().id(obj.getId()).productQuantity(obj.getProductQuantity())
|
||||
.itemQuantity(obj.getItemQuantity()).build());
|
||||
//修改以后更新月报表
|
||||
proMonthReportService.computeReport(YearMonth.now());
|
||||
proYearReportService.computeReport(Year.now());
|
||||
ProMeterialConsume saved = baseMapper.selectById(obj.getId());
|
||||
LocalDate localDate = saved.getRecordDate().toInstant()
|
||||
.atZone(java.time.ZoneId.systemDefault())
|
||||
.toLocalDate();
|
||||
YearMonth yearMonth = YearMonth.from(localDate);
|
||||
Year year = Year.of(yearMonth.getYear());
|
||||
proMonthReportService.computeReport(yearMonth);
|
||||
proYearReportService.computeReport(year);
|
||||
}
|
||||
}
|
||||
|
@@ -194,6 +194,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
IFNULL(t5.productQuantity, 0) AS productQuantity
|
||||
FROM
|
||||
pro_workorder t1
|
||||
left join pro_machinery_job t2 on t1.workorder_id = t2.workorder_id and t2.job_status != 'CANCEL'
|
||||
-- 获取最早发料日期(替代 ROW_NUMBER)
|
||||
LEFT JOIN (
|
||||
SELECT workorder_id, MIN(issue_date) AS issue_date
|
||||
|
Reference in New Issue
Block a user