|
@@ -39,7 +39,8 @@ import java.util.List;
|
|
|
*/
|
|
|
@AllArgsConstructor
|
|
|
@Service("remoteOpcService")
|
|
|
-public class RemoteOpcServiceImpl extends BaseServiceImpl<RemoteOpcMapper, RemoteOpc, RemoteOpcDTO> implements RemoteOpcService {
|
|
|
+public class RemoteOpcServiceImpl extends BaseServiceImpl<RemoteOpcMapper, RemoteOpc, RemoteOpcDTO>
|
|
|
+ implements RemoteOpcService {
|
|
|
|
|
|
private final SysDictMapper sysDictMapper;
|
|
|
|
|
@@ -175,17 +176,19 @@ public class RemoteOpcServiceImpl extends BaseServiceImpl<RemoteOpcMapper, Remot
|
|
|
remoteOpc.setPositionNum(remoteOpc.getDescription() + "_AV");// 初始化都是AV,也可以导入的时候配置好
|
|
|
remoteOpc.setCreatedFlag(YesNoEnum.NO.getValue());
|
|
|
remoteOpc.setPositionFlag(YesNoEnum.NO.getValue());
|
|
|
- /* boolean find = false;
|
|
|
- for (SysDict sysDict : sysDictList) {
|
|
|
- if (sysDict.getLabel().equals(remoteOpc.getRemark())) {
|
|
|
- remoteOpc.setType(Integer.valueOf(sysDict.getValue()));
|
|
|
- find = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if (!find) {
|
|
|
- throw new BusinessException("opc数据类型未配置,请配置数据字典:" + remoteOpc.getRemark());
|
|
|
- }*/
|
|
|
+ /*
|
|
|
+ * boolean find = false;
|
|
|
+ * for (SysDict sysDict : sysDictList) {
|
|
|
+ * if (sysDict.getLabel().equals(remoteOpc.getRemark())) {
|
|
|
+ * remoteOpc.setType(Integer.valueOf(sysDict.getValue()));
|
|
|
+ * find = true;
|
|
|
+ * break;
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * if (!find) {
|
|
|
+ * throw new BusinessException("opc数据类型未配置,请配置数据字典:" + remoteOpc.getRemark());
|
|
|
+ * }
|
|
|
+ */
|
|
|
}
|
|
|
// sbInfoMapper.insertListforComplex(addSbInfoList);
|
|
|
mapper.insertListforComplex(items);
|
|
@@ -223,7 +226,7 @@ public class RemoteOpcServiceImpl extends BaseServiceImpl<RemoteOpcMapper, Remot
|
|
|
public RemoteOpc getModelByPositionNum(String positionNum) {
|
|
|
Weekend<RemoteOpc> weekend = new Weekend<>(RemoteOpc.class);
|
|
|
WeekendCriteria<RemoteOpc, Object> weekendCriteria = weekend.weekendCriteria();
|
|
|
- weekendCriteria.andEqualTo(RemoteOpc::getPositionNum, positionNum);
|
|
|
+ weekendCriteria.andEqualTo(RemoteOpc::getDescription, positionNum);
|
|
|
return mapper.selectOneByExample(weekend);
|
|
|
}
|
|
|
|