|
|
|
|
@@ -25,6 +25,7 @@ import com.njcn.prepare.harmonic.service.mysql.line.ThsSuperviseService;
|
|
|
|
|
import com.njcn.process.annotaion.HarCurrent;
|
|
|
|
|
import com.njcn.process.annotaion.HarVoltage;
|
|
|
|
|
import com.njcn.process.annotaion.InterharVoltage;
|
|
|
|
|
import com.njcn.process.api.FlowableDefineFeignClient;
|
|
|
|
|
import com.njcn.process.pojo.po.LimitRate;
|
|
|
|
|
import com.njcn.process.pojo.po.ThsWarnStrategyAss;
|
|
|
|
|
import com.njcn.system.api.DicDataFeignClient;
|
|
|
|
|
@@ -32,6 +33,7 @@ import com.njcn.system.pojo.po.DictData;
|
|
|
|
|
import com.njcn.user.api.DeptFeignClient;
|
|
|
|
|
import com.njcn.user.pojo.po.Dept;
|
|
|
|
|
import com.njcn.web.utils.RequestUtil;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
@@ -54,31 +56,33 @@ import java.util.stream.Collectors;
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
@Slf4j
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, ThsSupervise> implements ThsSuperviseService {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private PmsGeneralDeviceInfoClient pmsGeneralDeviceInfoClient;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ThsWarnStrategyMapper thsWarnStrategyMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ThsWarnStrategyAssMapper thsWarnStrategyAssMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private PmsMonitorMapper pmsMonitorMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private LimitRateMapper limitRateMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private DicDataFeignClient dicDataFeignClient;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ThsSuperviseMapper thsSuperviseMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ThsOverRunLogMapper thsOverRunLogMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private DeptFeignClient deptFeignClient;
|
|
|
|
|
@Autowired
|
|
|
|
|
private FileStorageUtil fileStorageUtil;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final ThsWarnStrategyMapper thsWarnStrategyMapper;
|
|
|
|
|
|
|
|
|
|
private final ThsWarnStrategyAssMapper thsWarnStrategyAssMapper;
|
|
|
|
|
|
|
|
|
|
private final PmsMonitorMapper pmsMonitorMapper;
|
|
|
|
|
|
|
|
|
|
private final LimitRateMapper limitRateMapper;
|
|
|
|
|
|
|
|
|
|
private final DicDataFeignClient dicDataFeignClient;
|
|
|
|
|
|
|
|
|
|
private final ThsSuperviseMapper thsSuperviseMapper;
|
|
|
|
|
|
|
|
|
|
private final ThsOverRunLogMapper thsOverRunLogMapper;
|
|
|
|
|
|
|
|
|
|
private final DeptFeignClient deptFeignClient;
|
|
|
|
|
|
|
|
|
|
private final FileStorageUtil fileStorageUtil;
|
|
|
|
|
private static final String DESCRIPTION = "description";
|
|
|
|
|
|
|
|
|
|
private final FlowableDefineFeignClient flowableDefineFeignClient;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Async("asyncExecutor")
|
|
|
|
|
@@ -217,6 +221,10 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
|
|
|
|
|
String overItem = str.substring(0, str.indexOf("次") - 1);
|
|
|
|
|
thsSupervise.setName(DateUtil.today() + dept.getName() + overRunLogList.get(0).getName() + "等" + overRunLogList.size() + "个监测点" + overItem);
|
|
|
|
|
thsSuperviseMapper.insert(thsSupervise);
|
|
|
|
|
//TODO 解决工作流写死问题
|
|
|
|
|
Map<String, Object> mapParam = new HashMap<>();
|
|
|
|
|
flowableDefineFeignClient.start("flow_yzep99kb:1:c0ff8a75-da73-11ed-829f-b07b253cdad9",thsSupervise.getSupIndex(),mapParam).getData();
|
|
|
|
|
|
|
|
|
|
for (ThsOverRunLog thsOverRunLog : overRunLogList) {
|
|
|
|
|
thsOverRunLogMapper.insert(thsOverRunLog);
|
|
|
|
|
}
|
|
|
|
|
|