| | |
| | | package com.zy.api.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | |
| | | import com.core.common.R; |
| | | import com.zy.api.entity.OrderParams; |
| | | import com.zy.api.entity.PubOrderParams; |
| | | import com.zy.api.entity.ReportOrderParam; |
| | | import com.zy.api.entity.SyncMatParmas; |
| | | import com.zy.api.service.KopenApiService; |
| | | import com.zy.asrs.entity.Mat; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | @RestController |
| | |
| | | * @return com.core.common.R |
| | | */ |
| | | @ApiOperation("上架派工单") |
| | | @PostMapping("/order/add") |
| | | public R receiveOrders(@RequestBody OrderParams params) { |
| | | @PostMapping("/sendInDispatch") |
| | | public R receiveOrders(@RequestBody PubOrderParams params) { |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | |
| | | * @return com.core.common.R |
| | | */ |
| | | @ApiOperation("零件信息数据更新") |
| | | @PostMapping("/sync/mat") |
| | | public R basMatUpdate(@RequestBody Map<String, String> params) { |
| | | if (Objects.isNull(params.get("matnrs"))) { |
| | | @PostMapping("/sendPartsMaster") |
| | | public R basMatUpdate(@RequestBody SyncMatParmas params) { |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (params.get("matnrs").isEmpty()) { |
| | | return R.error("变更零件明细不能为空!!"); |
| | | if (Objects.isNull(params.getPro_komcode())) { |
| | | return R.error("零件编码不能为空!!"); |
| | | } |
| | | List<Mat> mats = JSON.parseArray(params.get("matnrs"), Mat.class); |
| | | |
| | | return kopenApiService.basMatupdate(mats); |
| | | return kopenApiService.basMatupdate(params); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 上架派工单反馈 |
| | | * @author Ryan |
| | | * @date 2025/11/24 15:20 |
| | | * @param params |
| | | * @return com.core.common.R |
| | | */ |
| | | @ApiOperation("上架派工单反馈") |
| | | @PostMapping("/getInDispatchResult") |
| | | public R getInDispatchResult(@RequestBody ReportOrderParam params) { |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (Objects.isNull(params.getKopen_id()) && Objects.isNull(params.getInv_no()) && Objects.isNull(params.getDispatch_no())) { |
| | | return R.error("取消条件不能为空!!"); |
| | | } |
| | | return kopenApiService.getInDispatchResult(params); |
| | | } |
| | | |
| | | } |