package com.tianbo.analysis.controller; import com.tianbo.analysis.model.AdvanceArrive; import com.tianbo.analysis.model.ResultJson; import com.tianbo.analysis.service.ArriveMasterService; import com.tianbo.analysis.tools.WaybillTools; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** * 运抵接口 */ @RestController @RequestMapping("/arrive/") public class ArrivedAMasterController { @Autowired ArriveMasterService arriveMasterService; @ApiOperation(value = "提前运抵接口",notes = "接收卡口车辆过卡放行后的通知,车单数据") @PostMapping("forkako") public ResultJson applyfor(@RequestBody AdvanceArrive carAndWayBill){ boolean result = arriveMasterService.arrivedAhead(carAndWayBill); return result? new ResultJson("200","处理完毕"):new ResultJson("处理失败"); } @RequestMapping("check") public void check(@RequestParam String waybill){ WaybillTools.checkWaybillFormat(waybill); } @ApiOperation(value = "提前运抵-接收申请数据通知接口",notes = "接收卡口进出场申请中的提前运抵运单数据,并更新到预配中") @PostMapping("prebill") public ResultJson acceptWaybill(@RequestBody AdvanceArrive preArrivedWaybillList){ int result = arriveMasterService.updatePremasterArrivedHeadStatus(preArrivedWaybillList); return result>0? new ResultJson("200","提前运抵状态已更新"):new ResultJson("提前运抵状态更新失败"); } }