提交 96408939 authored 作者: zhoushaopan's avatar zhoushaopan

feat(列装模块,装备模块): 修改列装,装备对应修改

修改列装型号,已入库的装备的该型号也要修改
上级 b0425448
...@@ -162,5 +162,12 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>, ...@@ -162,5 +162,12 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
List<DeviceLibrary> findAllByPackingId(Integer packingIds); List<DeviceLibrary> findAllByPackingId(Integer packingIds);
List<DeviceLibrary> findAllByPackingIdIn(List<Integer> packingIds); List<DeviceLibrary> findAllByPackingIdIn(List<Integer> packingIds);
@Transactional
@Modifying
@Query("update DeviceLibrary o set o.model = :model where o.id in :ids")
int batchUpdateDevices(String model, List<Integer> ids);
List<DeviceLibrary> findAllByModel(String model);
} }
...@@ -226,4 +226,14 @@ public interface DeviceLibraryService { ...@@ -226,4 +226,14 @@ public interface DeviceLibraryService {
Map<Integer,List<DeviceLibrary>> findAllByPackingId3(); Map<Integer,List<DeviceLibrary>> findAllByPackingId3();
/**
* 批量更新装备
* @param model 装备的型号
* @param ids 装备的id
*/
void batchUpdateDevices(String model,List<Integer> ids);
/**
* 通过型号查询装备
*/
List<DeviceLibrary> findAllByModel(String model);
} }
...@@ -663,6 +663,16 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService { ...@@ -663,6 +663,16 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
return map; return map;
} }
@Override
public void batchUpdateDevices(String model, List<Integer> ids) {
deviceLibraryDao.batchUpdateDevices(model,ids);
}
@Override
public List<DeviceLibrary> findAllByModel(String model) {
return deviceLibraryDao.findAllByModel(model);
}
@Override @Override
public void isNotLoss(List<Integer> ids) { public void isNotLoss(List<Integer> ids) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论