package com.zy.asrs.controller;
|
|
import com.core.annotations.ManagerAuth;
|
import com.core.common.R;
|
import com.zy.asrs.entity.LocMast;
|
import com.zy.asrs.entity.param.ErrorDeviceParam;
|
import com.zy.asrs.service.LocMastService;
|
import com.zy.common.web.BaseController;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.ArrayList;
|
import java.util.List;
|
|
@Slf4j
|
@RestController
|
@RequestMapping("error/device")
|
public class BasErrorDeviceController extends BaseController {
|
|
@Autowired
|
private LocMastService locMastService;
|
|
@RequestMapping(value = "/task/depthAndShallowness")
|
@ManagerAuth
|
public R taskDepthAndShallowness() {
|
ArrayList<ErrorDeviceParam> errorDeviceParamList = new ArrayList<>();
|
List<LocMast> locMastList1 = locMastService.asrLocMastNotInDetl1();
|
|
for (LocMast locMast : locMastList1){
|
ErrorDeviceParam errorDeviceParam = new ErrorDeviceParam();
|
errorDeviceParam.setErrorM("库位为F但没有明细");
|
errorDeviceParam.setCategory("库位");
|
errorDeviceParam.setEquipmentNo(locMast.getLocNo());
|
errorDeviceParamList.add(errorDeviceParam);
|
}
|
|
List<LocMast> locMastList2 = locMastService.asrLocMastNotInDetl2();
|
|
for (LocMast locMast : locMastList2){
|
ErrorDeviceParam errorDeviceParam = new ErrorDeviceParam();
|
errorDeviceParam.setErrorM("库位为SRQP但没有工作档案");
|
errorDeviceParam.setCategory("库位");
|
errorDeviceParam.setEquipmentNo(locMast.getLocNo());
|
errorDeviceParamList.add(errorDeviceParam);
|
}
|
return R.ok(errorDeviceParamList);
|
}
|
|
@RequestMapping(value = "/locSts/adjacentLocMast")
|
@ManagerAuth
|
public R adjacentLocMast() {
|
return R.ok(locMastService.adjacentLocMast());
|
}
|
|
}
|