This commit is contained in:
2024-10-30 18:45:29 +08:00
parent 66530aa5aa
commit b659dd055f
5 changed files with 28 additions and 8 deletions

View File

@@ -13,6 +13,8 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.oss.utils.FileStorageUtil;
import com.njcn.process.mapper.SupvPlanMapper;
@@ -186,6 +188,19 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
if(supvPlan.getSupvType().equals("05")){
//电容器组需要上送对象
List<SupvPlanRel> supvPlanRelList = supvPlanRelMapper.selectList(new LambdaQueryWrapper<SupvPlanRel>().eq(SupvPlanRel::getPlanId,supvPlan.getPlanId()));
if(CollUtil.isNotEmpty(supvPlanRelList)){
System.out.println("njcnnjcnnjcn");
ObjectMapper objectMapper = new ObjectMapper();
supvPlanRelList.forEach(item -> {
String jsonString = null;
try {
jsonString = objectMapper.writeValueAsString(item);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
System.out.println(jsonString);
});
}
supvPlan.setPlanRel(supvPlanRelList);
}