| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.pojo.*; |
| | | import com.consum.base.service.BaseCategoryServiceImpl; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.pojo.LWhFormOutputExtend; |
| | | import com.consum.base.pojo.LWhFormOutputInsertParam; |
| | | import com.consum.base.pojo.LWhFormOutputParam; |
| | | import com.consum.base.service.LWhFormOutputServiceImpl; |
| | | import com.consum.base.service.LWhGoodsService; |
| | | import com.consum.base.service.LWhProcureModelService; |
| | | import com.consum.model.po.*; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhFormOutput; |
| | | import com.consum.model.po.LWhProcureModel; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.web.ResponseValue; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @Description 出库单 |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/10/27 |
| | | */ |
| | | @Api(value = "出库单", tags = "出库单") |
| | | @RestController |
| | | @RequestMapping("/pc/l/wh/form/output") |
| | | public class LWhFormOutputController extends BaseController { |
| | |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/10/27 |
| | | */ |
| | | @ApiOperation(value = "新增出库单", notes = "新增出库单") |
| | | // @ApiImplicitParam(name = "param", value = "出库单实体", required = true, dataType = "LWhFormOutputInsertParam") |
| | | @PostMapping("/add") |
| | | public ResponseValue add(@RequestBody LWhFormOutputInsertParam param) { |
| | | public ResponseValue add() { |
| | | LWhFormOutputInsertParam param = CommonUtil.getObjFromReqBody(LWhFormOutputInsertParam.class); |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | | } |
| | | int result = this.lWhFormOutputService.add(param, currentUser,this.getSysInfo()); |
| | | if (result > 0) return ResponseValue.success(1); |
| | | int result = this.lWhFormOutputService.add(param, currentUser, this.getSysInfo()); |
| | | if (result > 0) { |
| | | return ResponseValue.success(1); |
| | | } |
| | | return ResponseValue.error("新增失败!"); |
| | | } |
| | | |
| | | /** |
| | | * @Description 列表查询 |
| | | */ |
| | | @ApiOperation(value = "列表查询", notes = "列表查询") |
| | | @ApiImplicitParam(name = "param", value = "出库单实体", required = true, dataType = "LWhFormOutputParam") |
| | | @GetMapping("/list") |
| | | public ResponseValue queryFormOutputList(LWhFormOutputParam param) { |
| | | public ResponseValue queryFormOutputList() { |
| | | LWhFormOutputParam param = CommonUtil.getObjFromReq(LWhFormOutputParam.class); |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | |
| | | } |
| | | |
| | | /** |
| | | * @Description 根据仓库id和型号id 查询库存 |
| | | * @Description 根据仓库id和型号id 查询库存 |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/11/2 |
| | | */ |
| | | @GetMapping("/select/number") |
| | | public ResponseValue selectNumber(Long warehouseId,Long baseGoodsModelsId) { |
| | | public ResponseValue selectNumber(Long warehouseId, Long baseGoodsModelsId) { |
| | | if (warehouseId == null || baseGoodsModelsId == null) { |
| | | return ResponseValue.error("参数错误"); |
| | | } |
| | | int num = this.lWhGoodsService.queryGoodsModelNum(0, warehouseId, baseGoodsModelsId, (short) 1,null); |
| | | int num = this.lWhGoodsService.queryGoodsModelNum(0, warehouseId, baseGoodsModelsId, (short) 1, null); |
| | | return ResponseValue.success(num); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |