|
@@ -14,6 +14,7 @@ import com.platform.dao.enums.SysConfigEnum;
|
|
|
import com.platform.dao.vo.query.remote.RemoteOpcVO;
|
|
|
import com.platform.dao.vo.remote.RemotePositionVO;
|
|
|
import com.platform.service.big.BigScreenSbInfoService;
|
|
|
+import com.platform.service.produce.ProduceReportService;
|
|
|
import com.platform.service.remote.RemoteOpcService;
|
|
|
import com.platform.service.remote.RemotePositionService;
|
|
|
import lombok.AllArgsConstructor;
|
|
@@ -22,6 +23,7 @@ import org.springframework.stereotype.Component;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import tk.mybatis.mapper.util.StringUtil;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.time.LocalDate;
|
|
@@ -39,8 +41,8 @@ import java.util.*;
|
|
|
public class DegreeTask {
|
|
|
|
|
|
private final BigScreenSbInfoService bigScreenSbInfoService;
|
|
|
-
|
|
|
private final RemoteOpcService remoteOpcService;
|
|
|
+ private final ProduceReportService produceReportService;
|
|
|
|
|
|
/**
|
|
|
* 每天凌晨1点发送前天的数据
|
|
@@ -123,4 +125,18 @@ public class DegreeTask {
|
|
|
public void generateYe() {
|
|
|
remoteOpcService.sendToPurchase();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成前一天的数据
|
|
|
+ */
|
|
|
+ public void generateReport() {
|
|
|
+ log.info("开始-计算生产报表");
|
|
|
+ LocalDate now = LocalDate.now().plusDays(-1);
|
|
|
+ // 报表
|
|
|
+ produceReportService.generate(now);
|
|
|
+ // 液位
|
|
|
+ produceReportService.generateYeweiAll(now);
|
|
|
+ log.info("结束-计算生产报表");
|
|
|
+ }
|
|
|
}
|