package com.example.erp.controller.mm;
|
|
|
|
import com.example.erp.common.Constants;
|
import com.example.erp.common.Result;
|
import com.example.erp.entity.mm.FinishedOperateLog;
|
import com.example.erp.entity.pp.FlowCard;
|
import com.example.erp.entity.sd.OrderDetail;
|
import com.example.erp.exception.ServiceException;
|
import com.example.erp.service.mm.FinishedGoodsInventoryService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
import com.example.erp.entity.mm.FinishedGoodsInventory;
|
|
|
import java.util.List;
|
import java.util.Map;
|
|
@RestController
|
@RequestMapping("/FinishedGoodsInventory")
|
public class FinishedGoodsInventoryController {
|
@Autowired
|
FinishedGoodsInventoryService finishedGoodsInventoryService;
|
|
/*成品库存查询*/
|
@PostMapping("/getselet/{pageNum}/{pageSize}")
|
public Result defaultDateFinishedGoodsInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedGoodsInventory finishedGoodsInventory){
|
return Result.seccess(finishedGoodsInventoryService.defaultDateFinishedGoodsInventory(pageNum,pageSize,finishedGoodsInventory));
|
}
|
|
/*查询可入库的成品数据*/
|
@PostMapping("/getseletwarehousing/{pageNum}/{pageSize}")
|
public Result getseletwarehousing(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FlowCard flowCard){
|
return Result.seccess(finishedGoodsInventoryService.getseletwarehousing(pageNum,pageSize,flowCard));
|
}
|
|
/*成品入库*/
|
@PostMapping("/addseletwarehousing")
|
public Result addseletwarehousing( @RequestBody Map<String,Object> object){
|
if(finishedGoodsInventoryService.addseletwarehousing(object)){
|
return Result.seccess();
|
}else {
|
throw new ServiceException(Constants.Code_500,"入库失败");
|
|
}
|
}
|
|
/*查询可发货的成品数据*/
|
@PostMapping("/getseletdeliveryDetail/{pageNum}/{pageSize}")
|
public Result getseletdeliveryDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){
|
return Result.seccess(finishedGoodsInventoryService.getseletdeliveryDetail(pageNum,pageSize,orderDetail));
|
}
|
|
/*成品发货*/
|
@PostMapping("/adddeliveryDetail")
|
public Result adddeliveryDetail( @RequestBody Map<String,Object> object){
|
if(finishedGoodsInventoryService.adddeliveryDetail(object)){
|
return Result.seccess();
|
}else {
|
throw new ServiceException(Constants.Code_500,"出库失败");
|
|
}
|
}
|
|
/* 调拨查询*/
|
@PostMapping("/getSelectAllocate/{pageNum}/{pageSize}")
|
public Result getSelectAllocate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){
|
return Result.seccess(finishedGoodsInventoryService.getSelectAllocate(pageNum,pageSize,orderDetail));
|
}
|
|
/*订单调拨*/
|
@PostMapping("/updateFinishedGoodsInventoryAllocate")
|
public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object> object){
|
if(finishedGoodsInventoryService.updateFinishedGoodsInventoryAllocate(object)){
|
|
return Result.seccess();
|
|
}else {
|
throw new ServiceException(Constants.Code_500,"调拨失败");
|
|
}
|
}
|
|
/*领出查询*/
|
@PostMapping("/getselectAllocateFinishedOperateLog/{pageNum}/{pageSize}")
|
public Result getselectAllocateFinishedOperateLog(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedOperateLog finishedOperateLog){
|
return Result.seccess(finishedGoodsInventoryService.getselectAllocateFinishedOperateLog(pageNum,pageSize,finishedOperateLog));
|
}
|
|
/*订单领出*/
|
@PostMapping("/updateFinishedGoodsInventoryTakeOut")
|
public Result updateFinishedGoodsInventoryTakeOut( @RequestBody Map<String,Object> object){
|
|
if(finishedGoodsInventoryService.updateFinishedGoodsInventoryTakeOut(object)){
|
return Result.seccess();
|
|
}else {
|
throw new ServiceException(Constants.Code_500,"领出失败");
|
|
}
|
}
|
|
/*领出记录查询*/
|
@PostMapping("/getSelectOperateRecord/{pageNum}/{pageSize}")
|
public Result getSelectOperateRecord(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedOperateLog finishedOperateLog){
|
return Result.seccess(finishedGoodsInventoryService.getSelectOperateRecord(pageNum,pageSize,finishedOperateLog));
|
}
|
}
|