|
@@ -9,7 +9,9 @@ import java.util.List;
|
|
import java.util.Objects;
|
|
import java.util.Objects;
|
|
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
|
+import com.slibra.business.domain.TXinyiBigTableHour;
|
|
import com.slibra.business.domain.TXinyiDaily;
|
|
import com.slibra.business.domain.TXinyiDaily;
|
|
|
|
+import com.slibra.business.mapper.TXinyiBigTableHourMapper;
|
|
import com.slibra.business.mapper.TXinyiDailyMapper;
|
|
import com.slibra.business.mapper.TXinyiDailyMapper;
|
|
import com.slibra.business.res.XinyiDailySimple;
|
|
import com.slibra.business.res.XinyiDailySimple;
|
|
import com.slibra.business.service.ITXinyiDailyService;
|
|
import com.slibra.business.service.ITXinyiDailyService;
|
|
@@ -19,6 +21,7 @@ import com.slibra.common.utils.SecurityUtils;
|
|
import com.slibra.common.utils.StringUtils;
|
|
import com.slibra.common.utils.StringUtils;
|
|
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 org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import static com.slibra.common.constant.MyConstants.DAILY_RECORDS_TOTAL;
|
|
import static com.slibra.common.constant.MyConstants.DAILY_RECORDS_TOTAL;
|
|
import static com.slibra.common.utils.DateUtils.getAllDatesBetween;
|
|
import static com.slibra.common.utils.DateUtils.getAllDatesBetween;
|
|
@@ -35,6 +38,9 @@ public class TXinyiDailyServiceImpl implements ITXinyiDailyService
|
|
@Autowired
|
|
@Autowired
|
|
private TXinyiDailyMapper tXinyiDailyMapper;
|
|
private TXinyiDailyMapper tXinyiDailyMapper;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private TXinyiBigTableHourMapper xinyiBigTableHourMapper;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查询信义日报数据
|
|
* 查询信义日报数据
|
|
*
|
|
*
|
|
@@ -72,11 +78,93 @@ public class TXinyiDailyServiceImpl implements ITXinyiDailyService
|
|
//2024年6月9日11:11:49 编辑和新增接口改成一个
|
|
//2024年6月9日11:11:49 编辑和新增接口改成一个
|
|
Long id = tXinyiDaily.getID();
|
|
Long id = tXinyiDaily.getID();
|
|
this.addExtra(tXinyiDaily, id);
|
|
this.addExtra(tXinyiDaily, id);
|
|
|
|
+ //2024年7月6日11:13:35 大宽表的数据处理
|
|
|
|
+ this.updateBigTableHourByDaily(tXinyiDaily);
|
|
if(Objects.isNull(id))//新增
|
|
if(Objects.isNull(id))//新增
|
|
return tXinyiDailyMapper.insertTXinyiDaily(tXinyiDaily);
|
|
return tXinyiDailyMapper.insertTXinyiDaily(tXinyiDaily);
|
|
return tXinyiDailyMapper.updateTXinyiDaily(tXinyiDaily);
|
|
return tXinyiDailyMapper.updateTXinyiDaily(tXinyiDaily);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void updateBigTableHourByDaily(TXinyiDaily tXinyiDaily) {
|
|
|
|
+ List<TXinyiBigTableHour> tXinyiBigTableHours = this.xinyiBigTableHourMapper.selectTXinyiBigTableHourList(TXinyiBigTableHour.builder().testDate(tXinyiDaily.getTestDate()).build());
|
|
|
|
+ if(!CollectionUtils.isEmpty(tXinyiBigTableHours)){
|
|
|
|
+ for (TXinyiBigTableHour tXinyiBigTableHour : tXinyiBigTableHours) {
|
|
|
|
+ //更新数据
|
|
|
|
+ tXinyiBigTableHour.setRbJsCod(tXinyiDaily.getJsCod());
|
|
|
|
+ tXinyiBigTableHour.setRbJsPh(tXinyiDaily.getJsPh());
|
|
|
|
+ tXinyiBigTableHour.setRbJsBod5(tXinyiDaily.getJsBod5());
|
|
|
|
+ tXinyiBigTableHour.setRbJsSs(tXinyiDaily.getJsSs());
|
|
|
|
+ tXinyiBigTableHour.setRbJsNh3(tXinyiDaily.getJsNh3());
|
|
|
|
+ tXinyiBigTableHour.setRbJsTn(tXinyiDaily.getJsTn());
|
|
|
|
+ tXinyiBigTableHour.setRbJsTp(tXinyiDaily.getJsTp());
|
|
|
|
+ tXinyiBigTableHour.setRbJsDcgj(tXinyiDaily.getJsDcgj());
|
|
|
|
+ tXinyiBigTableHour.setRbCsCod(tXinyiDaily.getCsCod());
|
|
|
|
+ tXinyiBigTableHour.setRbCsPh(tXinyiDaily.getCsPh());
|
|
|
|
+ tXinyiBigTableHour.setRbCsBod5(tXinyiDaily.getCsBod5());
|
|
|
|
+ tXinyiBigTableHour.setRbCsSs(tXinyiDaily.getCsSs());
|
|
|
|
+ tXinyiBigTableHour.setRbCsNh3(tXinyiDaily.getCsNh3());
|
|
|
|
+ tXinyiBigTableHour.setRbCsTn(tXinyiDaily.getCsTn());
|
|
|
|
+ tXinyiBigTableHour.setRbCsTp(tXinyiDaily.getCsTp());
|
|
|
|
+ tXinyiBigTableHour.setRbCsDcgj(tXinyiDaily.getCsDcgj());
|
|
|
|
+ tXinyiBigTableHour.setRbJsSw(tXinyiDaily.getJsSw());
|
|
|
|
+ tXinyiBigTableHour.setRbCsSw(tXinyiDaily.getCsSw());
|
|
|
|
+ tXinyiBigTableHour.setRbShcOnePh(tXinyiDaily.getShcOnePh());
|
|
|
|
+ tXinyiBigTableHour.setRbShcTwoPh(tXinyiDaily.getShcTwoPh());
|
|
|
|
+ tXinyiBigTableHour.setRbShcHyOneSv(tXinyiDaily.getShcHyOneSv());
|
|
|
|
+ tXinyiBigTableHour.setRbShcHyTwoSv(tXinyiDaily.getShcHyTwoSv());
|
|
|
|
+ tXinyiBigTableHour.setRbShcHyOneSvi(tXinyiDaily.getShcHyOneSvi());
|
|
|
|
+ tXinyiBigTableHour.setRbShcHyTwoSvi(tXinyiDaily.getShcHyTwoSvi());
|
|
|
|
+ tXinyiBigTableHour.setRbShcHyOneMlss(tXinyiDaily.getShcHyOneMlss());
|
|
|
|
+ tXinyiBigTableHour.setRbShcHyTwoMlss(tXinyiDaily.getShcHyTwoMlss());
|
|
|
|
+ tXinyiBigTableHour.setRbShcHyOneMlvss(tXinyiDaily.getShcHyOneMlvss());
|
|
|
|
+ tXinyiBigTableHour.setRbShcHyTwoMlvss(tXinyiDaily.getShcHyTwoMlvss());
|
|
|
|
+ tXinyiBigTableHour.setRbShcYyOneDo(tXinyiDaily.getShcYyOneDo());
|
|
|
|
+ tXinyiBigTableHour.setRbShcYyTwoDo(tXinyiDaily.getShcYyTwoDo());
|
|
|
|
+ tXinyiBigTableHour.setRbShcQyOneDo(tXinyiDaily.getShcQyOneDo());
|
|
|
|
+ tXinyiBigTableHour.setRbShcQyTwoDo(tXinyiDaily.getShcQyTwoDo());
|
|
|
|
+ tXinyiBigTableHour.setRbShcHyOneDo(tXinyiDaily.getShcHyOneDo());
|
|
|
|
+ tXinyiBigTableHour.setRbShcHyTwoDo(tXinyiDaily.getShcHyTwoDo());
|
|
|
|
+ tXinyiBigTableHour.setRbJsl(tXinyiDaily.getJSL());
|
|
|
|
+ tXinyiBigTableHour.setRbCsl(tXinyiDaily.getCSL());
|
|
|
|
+ tXinyiBigTableHour.setRbSdclcxsl(tXinyiDaily.getSDCLCXSL());
|
|
|
|
+ tXinyiBigTableHour.setRbQsb(tXinyiDaily.getQSB());
|
|
|
|
+ tXinyiBigTableHour.setRbFM(tXinyiDaily.getFM());
|
|
|
|
+ tXinyiBigTableHour.setRbYyHrt(tXinyiDaily.getYyHrt());
|
|
|
|
+ tXinyiBigTableHour.setRbHyHrt(tXinyiDaily.getHyHrt());
|
|
|
|
+ tXinyiBigTableHour.setRbQyHrt(tXinyiDaily.getQyHrt());
|
|
|
|
+ tXinyiBigTableHour.setRbNhlR(tXinyiDaily.getNhlR());
|
|
|
|
+ tXinyiBigTableHour.setRbWhlR(tXinyiDaily.getWhlR());
|
|
|
|
+ tXinyiBigTableHour.setRbSrt(tXinyiDaily.getSRT());
|
|
|
|
+ tXinyiBigTableHour.setRbCnl(tXinyiDaily.getCNL());
|
|
|
|
+ tXinyiBigTableHour.setRbTyqBod5Tn(tXinyiDaily.getTyqBod5Tn());
|
|
|
|
+ tXinyiBigTableHour.setRbTyhBod5Tn(tXinyiDaily.getTyhBod5Tn());
|
|
|
|
+ tXinyiBigTableHour.setRbHycRjyAll(tXinyiDaily.getHycRjyAll());
|
|
|
|
+ tXinyiBigTableHour.setRbHycWnndAll(tXinyiDaily.getHycWnndAll());
|
|
|
|
+ tXinyiBigTableHour.setRbYycRjyAll(tXinyiDaily.getYycRjyAll());
|
|
|
|
+ tXinyiBigTableHour.setRbQycRjyAll(tXinyiDaily.getQycRjyAll());
|
|
|
|
+ tXinyiBigTableHour.setRbWncjbAll(tXinyiDaily.getWncjbAll());
|
|
|
|
+ tXinyiBigTableHour.setRbWntjzsAll(tXinyiDaily.getWntjzsAll());
|
|
|
|
+ tXinyiBigTableHour.setRbHfxwnndAll(tXinyiDaily.getHfxwnndAll());
|
|
|
|
+ tXinyiBigTableHour.setRbChuniliang(tXinyiDaily.getCHUNILIANG());
|
|
|
|
+ tXinyiBigTableHour.setRbCnhsl(tXinyiDaily.getCNHSL());
|
|
|
|
+ tXinyiBigTableHour.setRbGwnl(tXinyiDaily.getGWNL());
|
|
|
|
+ tXinyiBigTableHour.setRbDf(tXinyiDaily.getDF());
|
|
|
|
+ tXinyiBigTableHour.setRbXnjf(tXinyiDaily.getXNJF());
|
|
|
|
+ tXinyiBigTableHour.setRbClf(tXinyiDaily.getCLF());
|
|
|
|
+ tXinyiBigTableHour.setRbTyf(tXinyiDaily.getTYF());
|
|
|
|
+ tXinyiBigTableHour.setRbXdjf(tXinyiDaily.getXDJF());
|
|
|
|
+ tXinyiBigTableHour.setRbQtyjf(tXinyiDaily.getQTYJF());
|
|
|
|
+ tXinyiBigTableHour.setRbCnf(tXinyiDaily.getCNF());
|
|
|
|
+ tXinyiBigTableHour.setRbZlsf(tXinyiDaily.getZLSF());
|
|
|
|
+ tXinyiBigTableHour.setRbZjcb(tXinyiDaily.getZJCB());
|
|
|
|
+ tXinyiBigTableHour.setRbDwcb(tXinyiDaily.getDWCB());
|
|
|
|
+
|
|
|
|
+ //更新数据库
|
|
|
|
+ this.xinyiBigTableHourMapper.updateTXinyiBigTableHour(tXinyiBigTableHour);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
private void addExtra(TXinyiDaily tXinyiDaily, Long id) {
|
|
private void addExtra(TXinyiDaily tXinyiDaily, Long id) {
|
|
|
|
|
|
String testDate = tXinyiDaily.getTestDate();
|
|
String testDate = tXinyiDaily.getTestDate();
|