|
@@ -1,6 +1,7 @@
|
|
|
package cn.fastfun.controller.api;
|
|
|
|
|
|
import cn.fastfun.controller.param.LibraryQueryParam;
|
|
|
+import cn.fastfun.service.AppDeviceService;
|
|
|
import cn.fastfun.service.AppLibraryLogService;
|
|
|
import cn.fastfun.service.entity.AppDevice;
|
|
|
import cn.fastfun.service.entity.AppLibraryLog;
|
|
@@ -63,8 +64,8 @@ public class ApiAppLibraryLogController {
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "显示批次待入库的电池")
|
|
|
- @RequestMapping(value = "appDevice", method = RequestMethod.POST)
|
|
|
- public ApiDTO importRestDevice(@RequestBody LibraryQueryParam param) {
|
|
|
+ @RequestMapping(value = "showAppDevice", method = RequestMethod.POST)
|
|
|
+ public ApiDTO showRestDevice(@RequestBody LibraryQueryParam param) {
|
|
|
List<AppDevice> appDevices = appLibraryLogService.showAppDevice(param.getBatchName());
|
|
|
appDevices.sort(Comparator.comparing(AppDevice::getAddTime).reversed());
|
|
|
int resultSize = appDevices.size();
|
|
@@ -86,4 +87,11 @@ public class ApiAppLibraryLogController {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "入库批次待入库的电池")
|
|
|
+ @RequestMapping(value = "importAppDevice", method = RequestMethod.POST)
|
|
|
+ public ApiDTO importRestDevice(@RequestBody LibraryQueryParam param) {
|
|
|
+ int snSize = appLibraryLogService.importAppDevices(param.getSnArray());
|
|
|
+ return ApiDTO.ok("入库成功",snSize);
|
|
|
+ }
|
|
|
+
|
|
|
}
|