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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.Year;
|
import java.time.Year;
|
||||||
import java.time.YearMonth;
|
import java.time.YearMonth;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -49,7 +50,13 @@ public class ProMeterialConsumeServiceImpl extends ServiceImpl<ProMeterialConsum
|
|||||||
this.updateById(ProMeterialConsume.builder().id(obj.getId()).productQuantity(obj.getProductQuantity())
|
this.updateById(ProMeterialConsume.builder().id(obj.getId()).productQuantity(obj.getProductQuantity())
|
||||||
.itemQuantity(obj.getItemQuantity()).build());
|
.itemQuantity(obj.getItemQuantity()).build());
|
||||||
//修改以后更新月报表
|
//修改以后更新月报表
|
||||||
proMonthReportService.computeReport(YearMonth.now());
|
ProMeterialConsume saved = baseMapper.selectById(obj.getId());
|
||||||
proYearReportService.computeReport(Year.now());
|
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
|
IFNULL(t5.productQuantity, 0) AS productQuantity
|
||||||
FROM
|
FROM
|
||||||
pro_workorder t1
|
pro_workorder t1
|
||||||
|
left join pro_machinery_job t2 on t1.workorder_id = t2.workorder_id and t2.job_status != 'CANCEL'
|
||||||
-- 获取最早发料日期(替代 ROW_NUMBER)
|
-- 获取最早发料日期(替代 ROW_NUMBER)
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT workorder_id, MIN(issue_date) AS issue_date
|
SELECT workorder_id, MIN(issue_date) AS issue_date
|
||||||
|
Reference in New Issue
Block a user