| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.core.common.R; |
| | | import com.zy.api.entity.OrderParams; |
| | | import com.zy.api.entity.SyncMatParmas; |
| | | import com.zy.api.service.KopenApiService; |
| | | import com.zy.asrs.entity.Mat; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | */ |
| | | @ApiOperation("零件信息数据更新") |
| | | @PostMapping("/sync/mat") |
| | | public R basMatUpdate(@RequestBody Map<String, String> params) { |
| | | if (Objects.isNull(params.get("matnrs"))) { |
| | | 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); |
| | | } |
| | | |
| | | |