提交 bfb6c8f3 authored 作者: zjm's avatar zjm

合并分支 'master' 到 'dev'

Master 查看合并请求 !92
......@@ -266,5 +266,13 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
@Query("update DeviceLibrary o set o.ownUnit = :updateUnitName where o.ownUnit = :originUnitName")
int updateOwnUnit( @Param("originUnitName") String originUnitName,
@Param("updateUnitName") String updateUnitName);
@Modifying
@Transactional
@Query("update DeviceLibrary d set d.model = :newModel where d.packingId in :packingIds")
int batchUpdateDevicesByPackingIds(@Param("newModel")String newModel, @Param("packingIds")List<Integer> packingIds);
}
......@@ -564,5 +564,5 @@ public interface DeviceLibraryService {
*/
Map<String,Object> fnConditionQuery(QueryTheWarehouseVo queryTheWarehouseVo);
void batchUpdateDevicesByPackingIds(String newModel,List<Integer> packingIds);
}
......@@ -1427,6 +1427,11 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
deviceLibraryDao.deleteById(id);
}
@Override
public void batchUpdateDevicesByPackingIds(String newModel, List<Integer> packingIds) {
deviceLibraryDao.batchUpdateDevicesByPackingIds(newModel, packingIds);
}
private Specification<DeviceLibrary> getSelectSpecification(DeviceLibrarySelectVo deviceLibrarySelectVo) {
PredicateBuilder<DeviceLibrary> predicateBuilder = getPredicateBuilder(deviceLibrarySelectVo);
//unitId为空,默认查询当前单位
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论