@Api("入库")
@RestController
@RequestMapping("/pda/asn")
public class PdaDocAsnController {
@Autowired
private IBusinessService businessService;
@Autowired
private IWmsDocAsnHeaderService wmsDocAsnHeaderService;
@ApiOperation("入库位->接驳位任务下发")
@PostMapping("inToTran")
public AjaxResult inToTran(@RequestBody DocAsnHeader docAsnHeader) {
}
@Api("出库")
@RestController
@RequestMapping("/pda/so")
public class PdaDocSoController {
@Autowired
private IBusinessService businessService;
@Autowired
private IWmsDocOrderHeaderService wmsDocOrderHeaderService;
@ApiOperation("出库位->接驳位任务下发")
@PostMapping("outToTran")
public AjaxResult outToTran(@RequestBody DocOrderHeader docOrderHeader) {
}
@RestController
@RequestMapping("/pda/inv")
public class PdaInvLotLocIdController {
@Autowired
private IInvLotLocIdService invLotLocIdService;
@Autowired
private InvLotLocIdMapper invLotLocIdMapper;
@GetMapping("/getSku")
public AjaxResult getSku() {
InvLocIdSearchFrom invLocIdSearchFrom = new InvLocIdSearchFrom();
invLocIdSearchFrom.setZoneId(Constant.ZONE_TYPE.STORAGE.getValue().toString());
List<InvLotLocIdLotattVO> invLotLocIdLotattVOList = invLotLocIdMapper.selectInvLocIdSkuListGroupBy(invLocIdSearchFrom);
return AjaxResult.success("", invLotLocIdLotattVOList);
}
@RestController
@RequestMapping("/pda/qc")
public class PdaDocQcController {
@Autowired
private IDocQcHeaderService iDocQcHeaderService;
@Autowired
private IDocQcDetailsService iDocQcDetailsService;
@GetMapping("/getQcList")
public AjaxResult getQcListByInvLotLocId(String sku) {
List<DocQcListVo> qcListByInvLotLocId = iDocQcHeaderService.getQcListByInvLotLocId(sku);
if (qcListByInvLotLocId.size() == 0) {
return AjaxResult.error("没有需要质检的库存!");
}
return AjaxResult.success("获取成功!", qcListByInvLotLocId);
}
}
@Log(title = "PDA质检提交(根据库存质检)", businessType = BusinessType.UPDATE)
@PostMapping("/submit")
public AjaxResult qcSubmit(String sku, String batchNo, String status) {
return iDocQcHeaderService.qcSubmit(sku, batchNo, status);
}
public interface IBusinessService {
AjaxResult agvCall(Long flowId, AgvCallDTO agvCallDTO);
}
@Component
public class StartService implements CommandLineRunner {
@Autowired
private IBusinessService businessService;
@Autowired
private InitTaskConfig initTaskConfig;
@Autowired
private AciService aciService;
@Autowired
private AutoTranSitTask autoTranSitTask;
@Autowired
private AutoRfidReaderTask autoRfidReaderTask;
@Autowired
private AutoButtonBoxTask autoButtonBoxTask;
@Override
public void run(String... args) throws Exception {
if (initTaskConfig.getAutoSend()) {
Thread thread = new Thread(new AutoTaskThread(businessService));
thread.start();
}
if (initTaskConfig.getAciService()) {
Thread thread = new Thread(new AciServiceThread(aciService));
thread.start();
}
}
public void autoTranSitTask() {
autoTranSitTask.run();
}
public void autoRfidReaderTask() {
autoRfidReaderTask.run();
}
public void autoRfidReaderTask01() {
autoRfidReaderTask.run01();
}
public void autoButtonBoxTask() {
autoButtonBoxTask.run();
}