Compare commits
2 Commits
982d7840d8
...
c50af27e61
| Author | SHA1 | Date |
|---|---|---|
|
|
c50af27e61 | |
|
|
f11b811a5f |
|
|
@ -113,7 +113,7 @@ public class ImsIntoInventoryController extends BaseController
|
||||||
//@PreventRepeatSubmit
|
//@PreventRepeatSubmit
|
||||||
//@RequiresPermissions("ims:inventory:remove")
|
//@RequiresPermissions("ims:inventory:remove")
|
||||||
@SysLog(title = "入库记录", businessType = OperaType.DELETE, logType = 1,module = "入库记录->删除入库记录")
|
@SysLog(title = "入库记录", businessType = OperaType.DELETE, logType = 1,module = "入库记录->删除入库记录")
|
||||||
@PostMapping("/{intoIds}")
|
@PostMapping("/del/{intoIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] intoIds)
|
public AjaxResult remove(@PathVariable Long[] intoIds)
|
||||||
{
|
{
|
||||||
return toAjax(imsIntoInventoryService.deleteImsIntoInventoryByIntoIds(intoIds));
|
return toAjax(imsIntoInventoryService.deleteImsIntoInventoryByIntoIds(intoIds));
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ public class ImsInventoryController extends BaseController
|
||||||
//@PreventRepeatSubmit
|
//@PreventRepeatSubmit
|
||||||
//@RequiresPermissions("ims:inventory:remove")
|
//@RequiresPermissions("ims:inventory:remove")
|
||||||
@SysLog(title = "库存", businessType = OperaType.DELETE, logType = 1,module = "库存->删除库存")
|
@SysLog(title = "库存", businessType = OperaType.DELETE, logType = 1,module = "库存->删除库存")
|
||||||
@PostMapping("/{inventoryIds}")
|
@PostMapping("/del/{inventoryIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] inventoryIds)
|
public AjaxResult remove(@PathVariable Long[] inventoryIds)
|
||||||
{
|
{
|
||||||
return toAjax(imsInventoryService.deleteImsInventoryByInventoryIds(inventoryIds));
|
return toAjax(imsInventoryService.deleteImsInventoryByInventoryIds(inventoryIds));
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ public class ImsOutInventoryController extends BaseController
|
||||||
//@PreventRepeatSubmit
|
//@PreventRepeatSubmit
|
||||||
//@RequiresPermissions("ims:inventory:remove")
|
//@RequiresPermissions("ims:inventory:remove")
|
||||||
@SysLog(title = "出库记录", businessType = OperaType.DELETE, logType = 1,module = "出库记录->删除出库记录")
|
@SysLog(title = "出库记录", businessType = OperaType.DELETE, logType = 1,module = "出库记录->删除出库记录")
|
||||||
@PostMapping("/{outIds}")
|
@PostMapping("/del/{outIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] outIds)
|
public AjaxResult remove(@PathVariable Long[] outIds)
|
||||||
{
|
{
|
||||||
return toAjax(imsOutInventoryService.deleteImsOutInventoryByOutIds(outIds));
|
return toAjax(imsOutInventoryService.deleteImsOutInventoryByOutIds(outIds));
|
||||||
|
|
|
||||||
|
|
@ -27,17 +27,17 @@ public class ImsInventoryUpdate implements Serializable
|
||||||
@NotNull(message = "库存id不能为空")
|
@NotNull(message = "库存id不能为空")
|
||||||
private Long inventoryId;
|
private Long inventoryId;
|
||||||
|
|
||||||
/** 仓库id */
|
// /** 仓库id */
|
||||||
@ApiModelProperty(value = "仓库id")
|
// @ApiModelProperty(value = "仓库id")
|
||||||
private Long warehouseId;
|
// private Long warehouseId;
|
||||||
|
|
||||||
/** 原料id */
|
// /** 原料id */
|
||||||
@ApiModelProperty(value = "原料id")
|
// @ApiModelProperty(value = "原料id")
|
||||||
private Long materialId;
|
// private Long materialId;
|
||||||
|
//
|
||||||
/** 计量单位id */
|
// /** 计量单位id */
|
||||||
@ApiModelProperty(value = "计量单位id")
|
// @ApiModelProperty(value = "计量单位id")
|
||||||
private Long unitId;
|
// private Long unitId;
|
||||||
|
|
||||||
/** 最小库存 */
|
/** 最小库存 */
|
||||||
@ApiModelProperty(value = "最小库存")
|
@ApiModelProperty(value = "最小库存")
|
||||||
|
|
@ -47,18 +47,18 @@ public class ImsInventoryUpdate implements Serializable
|
||||||
@ApiModelProperty(value = "最大库存")
|
@ApiModelProperty(value = "最大库存")
|
||||||
private BigDecimal maxNum;
|
private BigDecimal maxNum;
|
||||||
|
|
||||||
/** 当前库存数量 */
|
// /** 当前库存数量 */
|
||||||
@ApiModelProperty(value = "当前库存数量")
|
// @ApiModelProperty(value = "当前库存数量")
|
||||||
private BigDecimal materialNum;
|
// private BigDecimal materialNum;
|
||||||
|
//
|
||||||
/** 库存状态(1-正常,2-不足,3-超额) */
|
// /** 库存状态(1-正常,2-不足,3-超额) */
|
||||||
@ApiModelProperty(value = "库存状态(1-正常,2-不足,3-超额)")
|
// @ApiModelProperty(value = "库存状态(1-正常,2-不足,3-超额)")
|
||||||
private Long inventoryStatus;
|
// private Long inventoryStatus;
|
||||||
|
//
|
||||||
/** 出库数量 */
|
// /** 出库数量 */
|
||||||
@ApiModelProperty(value = "出库数量")
|
// @ApiModelProperty(value = "出库数量")
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
private BigDecimal fetchNum;
|
// private BigDecimal fetchNum;
|
||||||
//
|
//
|
||||||
// /** 删除标志(0代表存在 2代表删除) */
|
// /** 删除标志(0代表存在 2代表删除) */
|
||||||
// private String delFlag;
|
// private String delFlag;
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,8 @@ public interface IImsInventoryService
|
||||||
*/
|
*/
|
||||||
public int updateImsInventory(ImsInventoryUpdate imsInventoryUpdate);
|
public int updateImsInventory(ImsInventoryUpdate imsInventoryUpdate);
|
||||||
|
|
||||||
|
public int updateImsInventory(ImsInventory imsInventory);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除库存
|
* 批量删除库存
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,17 @@ public class ImsInventoryServiceImpl implements IImsInventoryService
|
||||||
return imsInventoryMapper.updateImsInventory(imsInventory);
|
return imsInventoryMapper.updateImsInventory(imsInventory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateImsInventory(ImsInventory imsInventory)
|
||||||
|
{
|
||||||
|
if(Objects.isNull(imsInventory.getInventoryId())) {
|
||||||
|
throw new RuntimeException("库存id不能为空");
|
||||||
|
}
|
||||||
|
imsInventory.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
imsInventory.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
return imsInventoryMapper.updateImsInventory(imsInventory);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除库存
|
* 批量删除库存
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.bonus.canteen.core.ims.domain.ImsIntoInventoryDetail;
|
import com.bonus.canteen.core.ims.domain.ImsIntoInventoryDetail;
|
||||||
|
import com.bonus.canteen.core.ims.domain.ImsInventory;
|
||||||
import com.bonus.canteen.core.ims.domain.param.*;
|
import com.bonus.canteen.core.ims.domain.param.*;
|
||||||
import com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryVO;
|
import com.bonus.canteen.core.ims.domain.vo.ImsIntoInventoryVO;
|
||||||
import com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryDetailVO;
|
import com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryDetailVO;
|
||||||
|
|
@ -214,7 +215,7 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
||||||
if(Objects.isNull(imsOutInventoryDetail.getFetchNum())) {
|
if(Objects.isNull(imsOutInventoryDetail.getFetchNum())) {
|
||||||
throw new ServiceException("出库数量不能为空");
|
throw new ServiceException("出库数量不能为空");
|
||||||
}
|
}
|
||||||
ImsInventoryUpdate imsInventoryUpdate = new ImsInventoryUpdate();
|
ImsInventory imsInventoryUpdate = new ImsInventory();
|
||||||
imsInventoryUpdate.setInventoryId(imsOutInventoryDetail.getInventoryId());
|
imsInventoryUpdate.setInventoryId(imsOutInventoryDetail.getInventoryId());
|
||||||
imsInventoryUpdate.setFetchNum(imsOutInventoryDetail.getFetchNum());
|
imsInventoryUpdate.setFetchNum(imsOutInventoryDetail.getFetchNum());
|
||||||
int rows = imsInventoryService.updateImsInventory(imsInventoryUpdate);
|
int rows = imsInventoryService.updateImsInventory(imsInventoryUpdate);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue