提交 030b2610 authored 作者: zhoushaopan's avatar zhoushaopan

fix(配套设备): 修改BUG

修改BUG
上级 ce1a10cc
...@@ -29,10 +29,11 @@ public interface MatchingDeviceLibraryDao extends JpaRepository<MatchingDeviceLi ...@@ -29,10 +29,11 @@ public interface MatchingDeviceLibraryDao extends JpaRepository<MatchingDeviceLi
@Transactional @Transactional
@Modifying @Modifying
@Query("update MatchingDeviceLibrary m set m.matchingDeviceStatus = :status, m.remake = :remake, m.statusJson = :statusJson where m.id in :matchingDeviceIds") @Query("update MatchingDeviceLibrary m set m.matchingDeviceStatus = :status, m.remake = :remake, m.statusJson = :statusJson, m.stopUnitId = :stopUnitId where m.id in :matchingDeviceIds")
int batchUpdateStatus(@Param("status") Integer status, int batchUpdateStatus(@Param("status") Integer status,
@Param("remake") String remake, @Param("remake") String remake,
@Param("statusJson") String statusJson, @Param("statusJson") String statusJson,
@Param("matchingDeviceIds") List<Integer> matchingDeviceIds); @Param("matchingDeviceIds") List<Integer> matchingDeviceIds,
@Param("stopUnitId") Integer stopUnitId);
} }
...@@ -352,11 +352,12 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe ...@@ -352,11 +352,12 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe
Integer status = statusVO.getStatus(); Integer status = statusVO.getStatus();
String remake = statusVO.getRemake(); String remake = statusVO.getRemake();
List<Integer> matchingDeviceIds = statusVO.getMatchingDeviceIds(); List<Integer> matchingDeviceIds = statusVO.getMatchingDeviceIds();
Integer stopUnitId = userUtils.getCurrentUnitId();
String statusJson =null; String statusJson =null;
if (statusVO.getFileRet() != null){ if (statusVO.getFileRet() != null){
statusJson = JacksonUtil.toJSon(statusVO.getFileRet()); statusJson = JacksonUtil.toJSon(statusVO.getFileRet());
} }
matchingDeviceLibraryDao.batchUpdateStatus(status,remake,statusJson,matchingDeviceIds); matchingDeviceLibraryDao.batchUpdateStatus(status,remake,statusJson,matchingDeviceIds,stopUnitId);
Integer currentUserId = userUtils.getCurrentUserId(); Integer currentUserId = userUtils.getCurrentUserId();
//增加日志 //增加日志
List<DeviceLogDto> deviceLogDtos = new ArrayList<>(); List<DeviceLogDto> deviceLogDtos = new ArrayList<>();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论