| | |
| | | import com.jilongda.manage.dto.FrameInventoryDTO; |
| | | import com.jilongda.manage.dto.GetCurrentByParam; |
| | | import com.jilongda.manage.dto.GetCurrentByParamLens; |
| | | import com.jilongda.manage.dto.LensInventoryDTO; |
| | | import com.jilongda.manage.model.*; |
| | | import com.jilongda.manage.query.TFrameGoodsQuery; |
| | | import com.jilongda.manage.query.TInventoryQuery; |
| | |
| | | } |
| | | @ApiOperation(value = "镜片添加盘点") |
| | | @PostMapping(value = "/addLensInventory") |
| | | public ApiResult addLensInventory(@RequestBody FrameInventoryDTO query) { |
| | | public ApiResult addLensInventory(@RequestBody LensInventoryDTO query) { |
| | | TInventory tInventory = new TInventory(); |
| | | BeanUtils.copyProperties(query, tInventory); |
| | | inventoryService.save(tInventory); |
| | | for (TInventoryFrameDetail tInventoryFrameDetail : query.getList()) { |
| | | for (TInventoryLensDetail tInventoryFrameDetail : query.getList()) { |
| | | tInventoryFrameDetail.setInventoryId(tInventory.getId()); |
| | | } |
| | | inventoryFrameDetailService.saveBatch(query.getList()); |
| | | inventoryLensDetailService.saveBatch(query.getList()); |
| | | return ApiResult.success(); |
| | | } |
| | | |