Преглед на файлове

1、处置搜索页面字段
2、修改调拨状态不可被调回
3、修改仅入库状态能被调拨

su-lmstack преди 3 години
родител
ревизия
863631eb52

+ 1 - 4
src/main/java/cn/fastfun/controller/api/ApiAppDeviceLogController.java

@@ -354,10 +354,7 @@ public class ApiAppDeviceLogController {
     @RequestMapping(value = "transferBack/pageQuery", method = RequestMethod.POST)
     public ApiPageDTO transferBackPageQuery(@RequestBody TransferBySnQueryParam param) {
 
-        List<Integer> statusList = new ArrayList<>();
-        statusList.add(2);
-        statusList.add(3);
-        param.addParam(QueryParamExp.in("status", statusList.toArray(new Integer[]{})));
+        param.addParam(QueryParamExp.eq("status", 3));
         Page<AppDevice> devicePage = appDeviceService.findByParam(param);
         return new ApiPageDTO(null, devicePage);
     }

+ 2 - 2
src/main/java/cn/fastfun/service/impl/AppDeviceLogServiceImpl.java

@@ -152,9 +152,9 @@ public class AppDeviceLogServiceImpl extends JpaServiceImp<AppDeviceLog, String>
                     allowTransfer.set(false);
                     throw new ApiRuntimeException(p + "设备信息不存在!");
                 }
-                if (1 != appDevice.getStatus() && 2 != appDevice.getStatus() && 3 != appDevice.getStatus()) {
+                if (1 != appDevice.getStatus() && 2 != appDevice.getStatus()) {
                     allowTransfer.set(false);
-                    throw new ApiRuntimeException(p + "不是入库或出库状态,不能调拨!");
+                    throw new ApiRuntimeException(p + "不是入库状态,不能调拨!");
                 }
                 if (1 != appDevice.getCheckStatus()) {
                     allowTransfer.set(false);