| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.PageUtil; |
| | | import com.consum.base.pojo.query.LWhFormInventoryQry; |
| | | import com.consum.base.pojo.request.FormInventoryParam; |
| | | import com.consum.base.pojo.request.LWhFormInventoryParam; |
| | | import com.consum.base.pojo.response.FormInventoryDetailVO; |
| | | import com.consum.base.pojo.response.FormInventoryGoodsVO; |
| | | import com.consum.base.pojo.response.FormInventoryVO; |
| | | import com.consum.base.service.FinSysTenantUserServiceImpl; |
| | | import com.consum.base.service.LWhFormInventoryGoodsServiceImpl; |
| | | import com.consum.base.service.LWhFormInventoryServiceImpl; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhFormInventory; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private LWhFormInventoryServiceImpl lWhFormInventoryService; |
| | | @Autowired |
| | | private FinSysTenantUserServiceImpl finSysTenantUserService; |
| | | @Autowired |
| | | private LWhFormInventoryGoodsServiceImpl inventoryGoodsService; |
| | | |
| | | /** |
| | | * @Description 新增 |
| | |
| | | @ApiImplicitParam(name = "param", value = "盘点条件", dataType = "LWhFormInventoryParam", required = true, paramType = "query") |
| | | }) |
| | | @GetMapping("/list") |
| | | public ResponseValue queryList(com.consum.base.pojo.LWhFormInventoryParam param) { |
| | | public ResponseValue queryList(LWhFormInventoryQry param) { |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | |
| | | return ResponseValue.success(pager); |
| | | } |
| | | |
| | | @ApiOperation(value = "盘点单物品列表查询", notes = "盘点单物品列表查询") |
| | | @ApiOperation(value = "盘点单物品列表查询", notes = "盘点单物品列表查询", response = FormInventoryVO.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "盘点单id", dataType = "Long", required = true, paramType = "query") |
| | | }) |
| | | @ApiResponse(code = 200, message = "成功", response = FormInventoryVO.class) |
| | | @GetMapping("/query") |
| | | public ResponseValue queryInventBaseGoodTemplate(Long id) { |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | |
| | | return ResponseValue.error("参数不能为空"); |
| | | } |
| | | FormInventoryVO formInventoryVO = this.lWhFormInventoryService.queryInventBaseGoodTemplate(id); |
| | | |
| | | this.lWhFormInventoryService.saveInventory(formInventoryVO, id); |
| | | return ResponseValue.success(formInventoryVO); |
| | | } |
| | | |
| | |
| | | return ResponseValue.success(1); |
| | | } |
| | | |
| | | /** |
| | | * @Description 盘点 |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/10/31 |
| | | */ |
| | | @ApiOperation(value = "盘点", notes = "盘点") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "盘点单id", dataType = "Long", required = true, paramType = "query") |
| | | }) |
| | | @GetMapping("/select/pdList") |
| | | @Deprecated |
| | | public ResponseValue queryPdList(Long id) { |
| | | if (id == null) { |
| | | return ResponseValue.error("盘点失败!"); |
| | | } |
| | | |
| | | List list = this.lWhFormInventoryService.queryPdList(id); |
| | | return ResponseValue.success(list); |
| | | } |
| | | |
| | | /** |
| | | * 暂存 |
| | |
| | | return ResponseValue.error("参数错误"); |
| | | } |
| | | |
| | | int num = this.lWhFormInventoryService.temporaryStorage(dto, 1); |
| | | int num = this.lWhFormInventoryService.updateInventoryInfo(dto, 1); |
| | | return num > 0 ? ResponseValue.success(1) : ResponseValue.error("暂存失败!"); |
| | | } |
| | | |
| | |
| | | return ResponseValue.error("参数错误"); |
| | | } |
| | | |
| | | int num = this.lWhFormInventoryService.temporaryStorage(dto, 2); |
| | | int num = this.lWhFormInventoryService.updateInventoryInfo(dto, 2); |
| | | return num > 0 ? ResponseValue.success(1) : ResponseValue.error("盘点失败!"); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation(value = "异常明细列表查询", notes = "异常明细列表查询") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "param", value = "盘点条件", dataType = "LWhFormInventoryParam", required = true, paramType = "query") |
| | | @ApiImplicitParam(name = "param", value = "盘点条件", dataType = "LWhFormInventoryParam", paramType = "query") |
| | | }) |
| | | @GetMapping("/list/PdDetail") |
| | | public ResponseValue queryPdDetailList(com.consum.base.pojo.LWhFormInventoryParam param) { |
| | | public ResponseValue queryPdDetailList(LWhFormInventoryQry param) { |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | | } |
| | | GenericPager<Map<String, Object>> pager = this.lWhFormInventoryService.queryPdDetailList(param, sysInfo); |
| | | return ResponseValue.success(pager); |
| | | PageUtil<FormInventoryDetailVO> result = this.lWhFormInventoryService.queryPdDetailList(param, sysInfo); |
| | | return ResponseValue.success(result); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据id查询盘点物品详细信息", notes = "根据id查询盘点物品详细信息") |