Compare commits

...

2 Commits

Author SHA1 Message Date
gaowdong c50af27e61 Merge remote-tracking branch 'origin/master' 2025-07-10 13:29:24 +08:00
gaowdong f11b811a5f 库存管理 2025-07-10 13:29:05 +08:00
7 changed files with 40 additions and 26 deletions

View File

@ -113,7 +113,7 @@ public class ImsIntoInventoryController extends BaseController
//@PreventRepeatSubmit
//@RequiresPermissions("ims:inventory:remove")
@SysLog(title = "入库记录", businessType = OperaType.DELETE, logType = 1,module = "入库记录->删除入库记录")
@PostMapping("/{intoIds}")
@PostMapping("/del/{intoIds}")
public AjaxResult remove(@PathVariable Long[] intoIds)
{
return toAjax(imsIntoInventoryService.deleteImsIntoInventoryByIntoIds(intoIds));

View File

@ -118,7 +118,7 @@ public class ImsInventoryController extends BaseController
//@PreventRepeatSubmit
//@RequiresPermissions("ims:inventory:remove")
@SysLog(title = "库存", businessType = OperaType.DELETE, logType = 1,module = "库存->删除库存")
@PostMapping("/{inventoryIds}")
@PostMapping("/del/{inventoryIds}")
public AjaxResult remove(@PathVariable Long[] inventoryIds)
{
return toAjax(imsInventoryService.deleteImsInventoryByInventoryIds(inventoryIds));

View File

@ -113,7 +113,7 @@ public class ImsOutInventoryController extends BaseController
//@PreventRepeatSubmit
//@RequiresPermissions("ims:inventory:remove")
@SysLog(title = "出库记录", businessType = OperaType.DELETE, logType = 1,module = "出库记录->删除出库记录")
@PostMapping("/{outIds}")
@PostMapping("/del/{outIds}")
public AjaxResult remove(@PathVariable Long[] outIds)
{
return toAjax(imsOutInventoryService.deleteImsOutInventoryByOutIds(outIds));

View File

@ -27,17 +27,17 @@ public class ImsInventoryUpdate implements Serializable
@NotNull(message = "库存id不能为空")
private Long inventoryId;
/** 仓库id */
@ApiModelProperty(value = "仓库id")
private Long warehouseId;
// /** 仓库id */
// @ApiModelProperty(value = "仓库id")
// private Long warehouseId;
/** 原料id */
@ApiModelProperty(value = "原料id")
private Long materialId;
/** 计量单位id */
@ApiModelProperty(value = "计量单位id")
private Long unitId;
// /** 原料id */
// @ApiModelProperty(value = "原料id")
// private Long materialId;
//
// /** 计量单位id */
// @ApiModelProperty(value = "计量单位id")
// private Long unitId;
/** 最小库存 */
@ApiModelProperty(value = "最小库存")
@ -47,18 +47,18 @@ public class ImsInventoryUpdate implements Serializable
@ApiModelProperty(value = "最大库存")
private BigDecimal maxNum;
/** 当前库存数量 */
@ApiModelProperty(value = "当前库存数量")
private BigDecimal materialNum;
/** 库存状态(1-正常,2-不足,3-超额) */
@ApiModelProperty(value = "库存状态(1-正常,2-不足,3-超额)")
private Long inventoryStatus;
/** 出库数量 */
@ApiModelProperty(value = "出库数量")
@JsonIgnore
private BigDecimal fetchNum;
// /** 当前库存数量 */
// @ApiModelProperty(value = "当前库存数量")
// private BigDecimal materialNum;
//
// /** 库存状态(1-正常,2-不足,3-超额) */
// @ApiModelProperty(value = "库存状态(1-正常,2-不足,3-超额)")
// private Long inventoryStatus;
//
// /** 出库数量 */
// @ApiModelProperty(value = "出库数量")
// @JsonIgnore
// private BigDecimal fetchNum;
//
// /** 删除标志0代表存在 2代表删除 */
// private String delFlag;

View File

@ -47,6 +47,8 @@ public interface IImsInventoryService
*/
public int updateImsInventory(ImsInventoryUpdate imsInventoryUpdate);
public int updateImsInventory(ImsInventory imsInventory);
/**
* 批量删除库存
*

View File

@ -133,6 +133,17 @@ public class ImsInventoryServiceImpl implements IImsInventoryService
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);
}
/**
* 批量删除库存
*

View File

@ -5,6 +5,7 @@ import java.util.List;
import cn.hutool.core.collection.CollUtil;
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.vo.ImsIntoInventoryVO;
import com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryDetailVO;
@ -214,7 +215,7 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
if(Objects.isNull(imsOutInventoryDetail.getFetchNum())) {
throw new ServiceException("出库数量不能为空");
}
ImsInventoryUpdate imsInventoryUpdate = new ImsInventoryUpdate();
ImsInventory imsInventoryUpdate = new ImsInventory();
imsInventoryUpdate.setInventoryId(imsOutInventoryDetail.getInventoryId());
imsInventoryUpdate.setFetchNum(imsOutInventoryDetail.getFetchNum());
int rows = imsInventoryService.updateImsInventory(imsInventoryUpdate);