|
@@ -33,7 +33,7 @@ import java.util.*;
|
|
|
* @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
|
|
|
*/
|
|
|
@Slf4j
|
|
|
-@Component("dDegreeTask")
|
|
|
+@Component("degreeTask")
|
|
|
@AllArgsConstructor
|
|
|
public class DegreeTask {
|
|
|
|
|
@@ -42,7 +42,7 @@ public class DegreeTask {
|
|
|
private final RemotePositionService sbPositionService;
|
|
|
|
|
|
/**
|
|
|
- * 每天凌晨发送前天的数据
|
|
|
+ * 每天凌晨1点发送前天的数据
|
|
|
* <p>
|
|
|
* http://192.168.16.226/api/ignores/produce/record/dian
|
|
|
*/
|
|
@@ -86,11 +86,16 @@ public class DegreeTask {
|
|
|
setDegreeValue(url2, list);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 液位,当天11:30开始
|
|
|
+ * @param url
|
|
|
+ * @param list
|
|
|
+ */
|
|
|
public static void setDegreeValue(String url, List<RemoteOpcVO> list) {
|
|
|
|
|
|
// 发送
|
|
|
List<Map<String, String>> dataList = new ArrayList<>();
|
|
|
- LocalDate localDate = LocalDate.now().plusDays(-1);
|
|
|
+ LocalDate localDate = LocalDate.now();
|
|
|
for (RemoteOpcVO remoteOpcVO : list) {
|
|
|
Map<String, String> data = new HashMap<>();
|
|
|
data.put("no", remoteOpcVO.getPositionNum());
|
|
@@ -114,11 +119,12 @@ public class DegreeTask {
|
|
|
* <p>
|
|
|
* http://192.168.16.226/api/ignores/produce/record/yewei
|
|
|
*/
|
|
|
- public void generateYewei() throws IOException {
|
|
|
-
|
|
|
-
|
|
|
+ public void generateYewei() {
|
|
|
// 找到配置的点位数据,逗号分割,点位编号
|
|
|
String positions = ConfigCache.getLabelByValueAllowNull(SysConfigEnum.PURCHASE_DEGREE_NO.name());
|
|
|
+ if (StringUtils.isBlank(positions)) {
|
|
|
+ throw new BusinessException("请配置采集点位");
|
|
|
+ }
|
|
|
List<String> positionList = Arrays.asList(positions.split(","));
|
|
|
List<RemotePositionVO> remotePositionVOList = sbPositionService.selectVOList(null);
|
|
|
|