|
|
|
@ -5,6 +5,7 @@ import com.gaotao.modules.scrap.entity.ScrapLabelDto; |
|
|
|
import com.gaotao.modules.scrap.entity.ScrapConfirmDto; |
|
|
|
import com.gaotao.modules.scrap.service.ScrapService; |
|
|
|
import com.gaotao.modules.sys.controller.AbstractController; |
|
|
|
import com.gaotao.modules.warehouse.service.WmsAvailabilityControlIdService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
@ -20,12 +21,17 @@ public class ScrapController extends AbstractController { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ScrapService scrapService; |
|
|
|
@Autowired |
|
|
|
private WmsAvailabilityControlIdService wmsAvailabilityControlIdService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 扫描报废标签 |
|
|
|
*/ |
|
|
|
@PostMapping("scanScrapLabel") |
|
|
|
public R scanScrapLabel(@RequestBody ScrapLabelDto dto) { |
|
|
|
if(!wmsAvailabilityControlIdService.checkPartOperationAllowed(dto.getSite(),dto.getLabelCode(),"part_scrap_control")){ |
|
|
|
throw new RuntimeException("本标签的 availability control id 不允许报废!"); |
|
|
|
} |
|
|
|
try { |
|
|
|
ScrapLabelDto labelInfo = scrapService.scanScrapLabel(dto); |
|
|
|
if (labelInfo != null) { |
|
|
|
|