|
@@ -7,6 +7,7 @@ import com.alibaba.fastjson2.JSONArray;
|
|
|
import com.slibra.business.domain.*;
|
|
|
import com.slibra.business.mapper.*;
|
|
|
import com.slibra.business.req.ChatReq;
|
|
|
+import com.slibra.business.res.XinyiDailyFeeSimple;
|
|
|
import com.slibra.business.res.XinyiIndustrySimple;
|
|
|
import com.slibra.business.service.IFrontService;
|
|
|
import com.slibra.common.exception.ServiceException;
|
|
@@ -39,6 +40,9 @@ public class FrontServiceImpl implements IFrontService {
|
|
|
@Autowired
|
|
|
private TXinyiDailyMapper xinyiDailyMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TXinyiRobotMapper xinyiRobotMapper;
|
|
|
+
|
|
|
@Autowired
|
|
|
private TXinyiNormConfigMapper tXinyiNormConfigMapper;
|
|
|
|
|
@@ -143,6 +147,16 @@ public class FrontServiceImpl implements IFrontService {
|
|
|
return this.xinyiChatRecordMapper.selectTXinyiChatRecordList(TXinyiChatRecord.builder().warningId(warningId).type(3).build());
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public XinyiDailyFeeSimple recentlyOneFeeInfo() {
|
|
|
+ //获取最新的一条日报
|
|
|
+ TXinyiDaily tXinyiDaily = this.xinyiDailyMapper.selectNewestData();
|
|
|
+ XinyiDailyFeeSimple xinyiDailyFeeSimple = new XinyiDailyFeeSimple();
|
|
|
+ if(!Objects.isNull(tXinyiDaily))
|
|
|
+ BeanUtils.copyProperties(tXinyiDaily, xinyiDailyFeeSimple);
|
|
|
+ return xinyiDailyFeeSimple;
|
|
|
+ }
|
|
|
+
|
|
|
private XinyiIndustrySimple calculateData(XinyiIndustrySimple xinyiIndustrySimple, LocalDateTime nowTime) {
|
|
|
LocalDateTime yesterdaySameTime = nowTime.plusDays(-1);
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DateUtils.YYYYMMDDHH_TS);
|
|
@@ -243,10 +257,10 @@ public class FrontServiceImpl implements IFrontService {
|
|
|
|
|
|
private XinyiIndustrySimple getRealTimeData(String[] queryTags, LocalDateTime nowTime) {
|
|
|
|
|
|
- AtomicReference<XinyiIndustrySimple> result = new AtomicReference<>();
|
|
|
+ /*AtomicReference<XinyiIndustrySimple> result = new AtomicReference<>();
|
|
|
|
|
|
- /*String time = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH, DateUtils.getNowDate());
|
|
|
- time = time + ":00:00";*/
|
|
|
+ *//*String time = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH, DateUtils.getNowDate());
|
|
|
+ time = time + ":00:00";*//*
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD_HH_MM_SS);
|
|
|
|
|
|
//获取当前的时间
|
|
@@ -358,7 +372,17 @@ public class FrontServiceImpl implements IFrontService {
|
|
|
});
|
|
|
}
|
|
|
XinyiIndustrySimple xinyiIndustrySimple = result.get();
|
|
|
- return Objects.isNull(xinyiIndustrySimple) ? new XinyiIndustrySimple() : xinyiIndustrySimple;
|
|
|
+ return Objects.isNull(xinyiIndustrySimple) ? new XinyiIndustrySimple() : xinyiIndustrySimple;*/
|
|
|
+ //2024年6月11日16:16:17 逻辑调整,获取最新的那条工业库的数据
|
|
|
+ TXinyiIndustry tXinyiIndustry = this.xinyiIndustryMapper.selectTXinyiIndustryNewest();
|
|
|
+ XinyiIndustrySimple xinyiIndustrySimple = new XinyiIndustrySimple();
|
|
|
+ if(!Objects.isNull(tXinyiIndustry))
|
|
|
+ BeanUtils.copyProperties(tXinyiIndustry, xinyiIndustrySimple);
|
|
|
+ //获取化验室的最新的一条数据
|
|
|
+ TXinyiRobot tXinyiRobot = this.xinyiRobotMapper.selectNewest();
|
|
|
+ if(!Objects.isNull(tXinyiRobot))
|
|
|
+ BeanUtils.copyProperties(tXinyiRobot, xinyiIndustrySimple);
|
|
|
+ return xinyiIndustrySimple;
|
|
|
}
|
|
|
|
|
|
|