|
|
@@ -258,7 +258,12 @@ public class GxtEquipmentServiceImpl implements IGxtEquipmentService
|
|
|
|
|
|
// 处理维保中心和场站的部门ID
|
|
|
processDeptInfo(equipment);
|
|
|
-
|
|
|
+ if (equipment.getMaintenanceCenterId() == null) {
|
|
|
+ throw new ServiceException("第" + row + "行找不到匹配的维保中心部门!");
|
|
|
+ }
|
|
|
+ if (equipment.getStationId() == null) {
|
|
|
+ throw new ServiceException("第" + row + "行找不到匹配的设备场站部门!");
|
|
|
+ }
|
|
|
// 处理责任人信息
|
|
|
processResponsiblePerson(equipment);
|
|
|
|
|
|
@@ -338,7 +343,7 @@ public class GxtEquipmentServiceImpl implements IGxtEquipmentService
|
|
|
if (StringUtils.isNotEmpty(equipment.getMaintenanceCenter())) {
|
|
|
SysDept dept = new SysDept();
|
|
|
dept.setDeptNameNoLike(equipment.getMaintenanceCenter());
|
|
|
- //dept.setLevel("2"); // 维保中心层级为2
|
|
|
+ dept.setLevel("2"); // 维保中心层级为2
|
|
|
List<SysDept> depts = sysDeptService.selectDeptList(dept);
|
|
|
// 如果只找到一个维保中心,则设置维保中心ID
|
|
|
if (depts != null && depts.size() == 1) {
|
|
|
@@ -364,6 +369,7 @@ public class GxtEquipmentServiceImpl implements IGxtEquipmentService
|
|
|
}
|
|
|
}*/
|
|
|
SysDept dept = new SysDept();
|
|
|
+ dept.setLevel("4"); // 场站层级为4
|
|
|
dept.setDeptNameNoLike(equipment.getStation());
|
|
|
List<SysDept> depts = sysDeptService.selectDeptList(dept);
|
|
|
// 如果只找到一个场站,则设置场站ID
|