|
@@ -58,7 +58,7 @@ public class RemoteOpcServiceImpl extends BaseServiceImpl<RemoteOpcMapper, Remot
|
|
|
// 新增判断点位是否已经存在了
|
|
|
Weekend<RemoteOpc> weekend = new Weekend<>(RemoteOpc.class);
|
|
|
WeekendCriteria<RemoteOpc, Object> weekendCriteria = weekend.weekendCriteria();
|
|
|
- weekendCriteria.andEqualTo(RemoteOpc::getDescription, model.getDescription());
|
|
|
+ weekendCriteria.andEqualTo(RemoteOpc::getDescription, model.getDescription()).andEqualTo(RemoteOpc::getLine, model.getLine());
|
|
|
int count = mapper.selectCountByExample(weekend);
|
|
|
// 不存在在设置点位信息
|
|
|
if (count > 0) {
|
|
@@ -92,7 +92,7 @@ public class RemoteOpcServiceImpl extends BaseServiceImpl<RemoteOpcMapper, Remot
|
|
|
// 新增判断点位是否已经存在了
|
|
|
Weekend<RemoteOpc> weekend = new Weekend<>(RemoteOpc.class);
|
|
|
WeekendCriteria<RemoteOpc, Object> weekendCriteria = weekend.weekendCriteria();
|
|
|
- weekendCriteria.andEqualTo(RemoteOpc::getDescription, model.getDescription());
|
|
|
+ weekendCriteria.andEqualTo(RemoteOpc::getDescription, model.getDescription()).andEqualTo(RemoteOpc::getLine, model.getLine());
|
|
|
List<RemoteOpc> list = mapper.selectByExample(weekend);
|
|
|
// 不存在在设置点位信息
|
|
|
if (!CollectionUtils.isEmpty(list)) {
|
|
@@ -223,10 +223,10 @@ public class RemoteOpcServiceImpl extends BaseServiceImpl<RemoteOpcMapper, Remot
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public RemoteOpc getModelByPositionNum(String positionNum) {
|
|
|
+ public RemoteOpc getModelByPositionNumAndLine(String positionNum, String line) {
|
|
|
Weekend<RemoteOpc> weekend = new Weekend<>(RemoteOpc.class);
|
|
|
WeekendCriteria<RemoteOpc, Object> weekendCriteria = weekend.weekendCriteria();
|
|
|
- weekendCriteria.andEqualTo(RemoteOpc::getDescription, positionNum);
|
|
|
+ weekendCriteria.andEqualTo(RemoteOpc::getDescription, positionNum).andEqualTo(RemoteOpc::getLine, line);
|
|
|
return mapper.selectOneByExample(weekend);
|
|
|
}
|
|
|
|