修改nms上报接口支持批量提交,修改为阀门中域添加额外属性时的阀门库编号
This commit is contained in:
@@ -4,8 +4,8 @@ import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.restful.AbnormalMachine;
|
||||
import com.nis.domain.restful.TrafficNmsServerStatistic;
|
||||
import com.nis.web.dao.TrafficNmsServerStatisticDao;
|
||||
|
||||
@@ -14,16 +14,13 @@ public class TrafficNmsServerStatisticService {
|
||||
@Autowired
|
||||
TrafficNmsServerStatisticDao trafficNmsServerStatisticDao;
|
||||
|
||||
public TrafficNmsServerStatistic saveNmsServer(TrafficNmsServerStatistic trafficNmsServerStatistic) {
|
||||
trafficNmsServerStatisticDao.insert(trafficNmsServerStatistic);
|
||||
return trafficNmsServerStatistic;
|
||||
}
|
||||
|
||||
public void saveAbnormalMachine(Integer id, List<AbnormalMachine> abnormalMachineList) {
|
||||
trafficNmsServerStatisticDao.insertAbnormalMachine(id, abnormalMachineList);
|
||||
}
|
||||
|
||||
public void delNmsServer(TrafficNmsServerStatistic trafficNmsServerStatistic) {
|
||||
trafficNmsServerStatisticDao.delete(trafficNmsServerStatistic);
|
||||
@Transactional
|
||||
public void saveNmsInfo(List<TrafficNmsServerStatistic> trafficNmsServerList) {
|
||||
for (TrafficNmsServerStatistic trafficNmsServerStatistic : trafficNmsServerList) {
|
||||
trafficNmsServerStatisticDao.insert(trafficNmsServerStatistic);
|
||||
trafficNmsServerStatisticDao.insertAbnormalMachine(trafficNmsServerStatistic.getId(),
|
||||
trafficNmsServerStatistic.getAbnormalMachineList());
|
||||
}
|
||||
Integer.parseInt(null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user