|
@@ -17,6 +17,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.tofly.common.core.entity.ResultRespone;
|
|
|
+import com.tofly.common.oauth.exception.ToflyDeniedException;
|
|
|
import com.tofly.scada.entity.Scada;
|
|
|
import com.tofly.scada.entity.ScadaLjFlow;
|
|
|
import com.tofly.scada.entity.ScadaSynHis;
|
|
@@ -88,7 +89,7 @@ public class ScadaSynHisServiceImpl extends ServiceImpl<ScadaSynHisMapper, Scada
|
|
|
public void automaticSynchronousThirdParty(){
|
|
|
try {
|
|
|
Calendar calYersterday = Calendar.getInstance();
|
|
|
- calYersterday.add(Calendar.DATE, -1);
|
|
|
+ calYersterday.add(Calendar.DATE, -2);
|
|
|
synchronousThirdParty(null, DateUtil.format(calYersterday.getTime(), "yyyy-MM-dd"), DateUtil.format(new Date(), "yyyy-MM-dd"));
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage());
|
|
@@ -144,6 +145,9 @@ public class ScadaSynHisServiceImpl extends ServiceImpl<ScadaSynHisMapper, Scada
|
|
|
|
|
|
JSONObject jsonObject = JSON.parseObject(result);
|
|
|
log.info("第三方返回:{}",jsonObject);
|
|
|
+ if (jsonObject == null) {
|
|
|
+ throw new ToflyDeniedException("第三方无结果返回");
|
|
|
+ }
|
|
|
Integer status = (Integer) jsonObject.get("status");
|
|
|
if(1==status){
|
|
|
|