| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.management.domain.InventoriesSupplies; |
| | | import com.ruoyi.management.domain.InventoriesSuppliesInfo; |
| | | import com.ruoyi.management.domain.SlStoreManagement; |
| | |
| | | public class InventoriesSuppliesInfoController { |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | @Autowired |
| | | private SlGoodsMaterialsService slGoodsMaterialsService; |
| | |
| | | @GetMapping("/getInfoById") |
| | | @ApiOperation(value = "根据盘点id获取盘点信息") |
| | | public R<PdInfoVO> inventoriesSuppliesInfoService(Long id) { |
| | | tokenService.getLoginUser(); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | InventoriesSupplies byId = inventoriesSuppliesService.getById(id); |
| | | String format = simpleDateFormat.format(byId.getPdTime()); |
| | |
| | | @PostMapping("/getInventoriesSuppliesInfoList") |
| | | @ApiOperation(value = "分页获物资盘点详情") |
| | | public R<PageDTO<InventoriesSuppliesInfoVO>> inventoriesSuppliesInfoService(@RequestBody InventoriesSuppliesInfoQuery inventoriesSuppliesInfoQuery) { |
| | | tokenService.getLoginUser(); |
| | | return R.ok(inventoriesSuppliesInfoService.inventoriesSuppliesInfoService(inventoriesSuppliesInfoQuery)); |
| | | } |
| | | |
| | | @PostMapping("/addInventoriesSuppliesInfo") |
| | | @ApiOperation(value = "添加/修改物资盘点详情") |
| | | public R addInventoriesSuppliesInfo(@RequestBody List<InventoriesSuppliesInfoDTO> inventoriesSuppliesInfoDTO) { |
| | | tokenService.getLoginUser(); |
| | | inventoriesSuppliesInfoService.addInventoriesSuppliesInfo(inventoriesSuppliesInfoDTO); |
| | | return R.ok(); |
| | | } |
| | |
| | | @PostMapping("/getInventoriesSuppliesInfo") |
| | | @ApiOperation(value = "通过入库id查询是否已经有物资详情") |
| | | public R<InventoriesSuppliesInfo> getInventoriesSuppliesInfo(@RequestBody InventoriesSuppliesInfoDTO inventoriesSuppliesInfoDTO) { |
| | | tokenService.getLoginUser(); |
| | | return R.ok( inventoriesSuppliesInfoService.getInventoriesSuppliesInfo(inventoriesSuppliesInfoDTO)); |
| | | } |
| | | |
| | | @PostMapping("/submitInventoriesSuppliesInfo") |
| | | @ApiOperation(value = "提交物资盘点数据") |
| | | public R submitInventoriesSuppliesInfo(@RequestBody ADDPdDTO dto) { |
| | | |
| | | tokenService.getLoginUser(); |
| | | return R.ok(inventoriesSuppliesInfoService.submitInventoriesSuppliesInfo(dto)); |
| | | } |
| | | |
| | | @PostMapping("/accomplishInventoriesSuppliesInfo") |
| | | @ApiOperation(value = "完成物资盘点数据--更新库存") |
| | | public R accomplishInventoriesSuppliesInfo(@RequestBody InventoriesSuppliesInfoDTO inventoriesSuppliesInfoDTO) { |
| | | tokenService.getLoginUser(); |
| | | inventoriesSuppliesInfoService.accomplishInventoriesSuppliesInfo(inventoriesSuppliesInfoDTO); |
| | | return R.ok(); |
| | | } |