|
@@ -10,6 +10,7 @@ import com.gyee.backconfig.model.auto.ProEconEquipmentmodel;
|
|
import com.gyee.backconfig.model.auto.ProEconLogicalUnit;
|
|
import com.gyee.backconfig.model.auto.ProEconLogicalUnit;
|
|
import com.gyee.backconfig.service.auto.IProBasicLogicalUnitService;
|
|
import com.gyee.backconfig.service.auto.IProBasicLogicalUnitService;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
+import com.gyee.backconfig.service.auto.IProEconEquipmentmodelService;
|
|
import com.gyee.common.model.StringUtils;
|
|
import com.gyee.common.model.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -31,6 +32,7 @@ public class ProBasicLogicalUnitServiceImpl extends ServiceImpl<ProBasicLogicalU
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private IProBasicLogicalUnitService proBasicLogicalUnitService;//部件
|
|
private IProBasicLogicalUnitService proBasicLogicalUnitService;//部件
|
|
|
|
+ private IProEconEquipmentmodelService proEconEquipmentmodelService;//型号
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public IPage<ProBasicLogicalUnit> Bylist(String nemCode, String pageNum, String pageSize) {
|
|
public IPage<ProBasicLogicalUnit> Bylist(String nemCode, String pageNum, String pageSize) {
|
|
@@ -45,7 +47,8 @@ public class ProBasicLogicalUnitServiceImpl extends ServiceImpl<ProBasicLogicalU
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public boolean addxh(ProEconEquipmentmodel jx) {
|
|
|
|
|
|
+// 新增型号更新多个部件
|
|
|
|
+ public boolean addgxbj(ProEconEquipmentmodel jx) {
|
|
|
|
|
|
List<ProBasicLogicalUnit> list = new ArrayList<>();
|
|
List<ProBasicLogicalUnit> list = new ArrayList<>();
|
|
List<ProBasicLogicalUnit> units = CacheContext.unitls;//部件
|
|
List<ProBasicLogicalUnit> units = CacheContext.unitls;//部件
|
|
@@ -74,4 +77,36 @@ public class ProBasicLogicalUnitServiceImpl extends ServiceImpl<ProBasicLogicalU
|
|
|
|
|
|
return proBasicLogicalUnitService.saveOrUpdateBatch(list);
|
|
return proBasicLogicalUnitService.saveOrUpdateBatch(list);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ //更新部件新增型号
|
|
|
|
+ public boolean addgxxh(ProBasicLogicalUnit jx) {
|
|
|
|
+ List<ProBasicLogicalUnit> list = new ArrayList<>();
|
|
|
|
+ List<ProBasicLogicalUnit> units = CacheContext.unitls;//部件
|
|
|
|
+
|
|
|
|
+ List<ProEconEquipmentmodel> list1 = new ArrayList<>();
|
|
|
|
+ List<ProEconEquipmentmodel> modells = CacheContext.Equipments;//型号
|
|
|
|
+
|
|
|
|
+ if (!units.isEmpty()) {
|
|
|
|
+
|
|
|
|
+ for (ProBasicLogicalUnit p1 : units) {
|
|
|
|
+ ProEconEquipmentmodel vo1 = new ProEconEquipmentmodel();
|
|
|
|
+ if (StringUtils.notEmp(p1.getName())) {
|
|
|
|
+
|
|
|
|
+ for (ProEconEquipmentmodel p2 : modells) {
|
|
|
|
+ vo1.setId(p2.getId());
|
|
|
|
+ vo1.setNemCode(p2.getNemCode());
|
|
|
|
+ vo1.setName(p2.getName());
|
|
|
|
+ vo1.setAname(p2.getAname());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ list1.add(vo1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ return proEconEquipmentmodelService.saveOrUpdateBatch(list1);
|
|
|
|
+ }
|
|
}
|
|
}
|