feat(job): 实现出库功能并优化相关接口

- 修改指定出库接口参数,由stockIds改为groupCodingNo和quantity
- 更新MydoJobMapper.xml存储过程调用参数名称
- 调整前端页面字段展示及交互逻辑,适配新的出库方式
- 优化库存查询条件和显示列,去除冗余字段
- 增加出库数量校验逻辑,确保不超过可用库存
- 更新相关服务层和控制层代码以支持新业务流程
- 修改ViewHandAllotStock实体类属性,匹配数据库视图结构
- 调整导出功能标题及相关注释说明
This commit is contained in:
liuhanqing
2025-12-09 13:10:03 +08:00
parent 4e79dcb95f
commit 458ae995a7
14 changed files with 287 additions and 941 deletions

View File

@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.List;
@RestController
@@ -69,9 +70,9 @@ public class OutMydoJobController extends BaseController {
@PreAuthorize("@ss.hasPermi('job:outmydoJob:pointOut')")
@Log(title = "指定货位出库", businessType = BusinessType.INSERT)
@RequestMapping("/pointOut")
public AjaxResult pointOut(@RequestParam("stockIds")String[] stockIds,@RequestParam("exitId")String exitId)
public AjaxResult pointOut(@RequestParam("groupCodingNo")String groupCodingNo, @RequestParam("outQuantity")String quantity)
{
return mydoJobService.pointOut(stockIds,exitId);
return mydoJobService.pointOut(groupCodingNo,quantity);
}

View File

@@ -93,11 +93,11 @@ public interface IMydoJobService
/**
* 指定出库
* @param stockIds
* @param exitId
* @param groupCodingNo
* @param quantity
* @return
*/
AjaxResult pointOut(String [] stockIds,String exitId);
AjaxResult pointOut(String groupCodingNo,String quantity);
/**
* 通过托盘码查询

View File

@@ -504,20 +504,18 @@ public class MydoJobServiceImpl implements IMydoJobService {
}
@Override
public AjaxResult pointOut(String[] stockIds, String exitId) {
public AjaxResult pointOut(String groupCodingNo, String quantity) {
HashMap<String, Object> map = new HashMap<>();
String msg = "";
String Stringbuilder = "";
for (String stockId : stockIds) {
map.put("v_stock_id", stockId);
map.put("v_exit_id", exitId);
mydoJobMapper.pointOut(map);
iToWcsService.pushOutMydoJob();
String result = map.get("v_result").toString();
msg=map.get("v_resultmsg").toString();
if (!"10".equals(result)) {
Stringbuilder += stockId + msg + "<br/>";
}
map.put("v_group_coding_no", groupCodingNo);
map.put("v_jh_quantity", quantity);
mydoJobMapper.pointOut(map);
iToWcsService.pushOutMydoJob();
String result = map.get("v_result").toString();
msg = map.get("v_resultmsg").toString();
if (!"10".equals(result)) {
Stringbuilder += groupCodingNo + msg + "<br/>";
}
if (!StrUtil.isEmpty(Stringbuilder)) {
return AjaxResult.warn(Stringbuilder);

View File

@@ -22,10 +22,10 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 手动分配库存Controller
* 指定出库Controller
*
* @author ruoyi
* @date 2025-09-16
* @date 2025-12-09
*/
@RestController
@RequestMapping("/out/handAllotStock")
@@ -35,7 +35,7 @@ public class ViewHandAllotStockController extends BaseController
private IViewHandAllotStockService viewHandAllotStockService;
/**
* 查询手动分配库存列表
* 查询指定出库列表
*/
@PreAuthorize("@ss.hasPermi('out:handAllotStock:list')")
@GetMapping("/list")
@@ -47,33 +47,33 @@ public class ViewHandAllotStockController extends BaseController
}
/**
* 导出手动分配库存列表
* 导出指定出库列表
*/
@PreAuthorize("@ss.hasPermi('out:handAllotStock:export')")
@Log(title = "手动分配库存", businessType = BusinessType.EXPORT)
@Log(title = "指定出库", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ViewHandAllotStock viewHandAllotStock)
{
List<ViewHandAllotStock> list = viewHandAllotStockService.selectViewHandAllotStockList(viewHandAllotStock);
ExcelUtil<ViewHandAllotStock> util = new ExcelUtil<ViewHandAllotStock>(ViewHandAllotStock.class);
util.exportExcel(response, list, "手动分配库存数据");
util.exportExcel(response, list, "指定出库数据");
}
/**
* 获取手动分配库存详细信息
* 获取指定出库详细信息
*/
@PreAuthorize("@ss.hasPermi('out:handAllotStock:query')")
@GetMapping(value = "/{stockId}")
public AjaxResult getInfo(@PathVariable("stockId") String stockId)
@GetMapping(value = "/{onlyIdentity}")
public AjaxResult getInfo(@PathVariable("onlyIdentity") Long onlyIdentity)
{
return success(viewHandAllotStockService.selectViewHandAllotStockByStockId(stockId));
return success(viewHandAllotStockService.selectViewHandAllotStockByOnlyIdentity(onlyIdentity));
}
/**
* 新增手动分配库存
* 新增指定出库
*/
@PreAuthorize("@ss.hasPermi('out:handAllotStock:add')")
@Log(title = "手动分配库存", businessType = BusinessType.INSERT)
@Log(title = "指定出库", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ViewHandAllotStock viewHandAllotStock)
{
@@ -81,10 +81,10 @@ public class ViewHandAllotStockController extends BaseController
}
/**
* 修改手动分配库存
* 修改指定出库
*/
@PreAuthorize("@ss.hasPermi('out:handAllotStock:edit')")
@Log(title = "手动分配库存", businessType = BusinessType.UPDATE)
@Log(title = "指定出库", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ViewHandAllotStock viewHandAllotStock)
{
@@ -92,13 +92,13 @@ public class ViewHandAllotStockController extends BaseController
}
/**
* 删除手动分配库存
* 删除指定出库
*/
@PreAuthorize("@ss.hasPermi('out:handAllotStock:remove')")
@Log(title = "手动分配库存", businessType = BusinessType.DELETE)
@DeleteMapping("/{stockIds}")
public AjaxResult remove(@PathVariable String[] stockIds)
@Log(title = "指定出库", businessType = BusinessType.DELETE)
@DeleteMapping("/{onlyIdentitys}")
public AjaxResult remove(@PathVariable Long[] onlyIdentitys)
{
return toAjax(viewHandAllotStockService.deleteViewHandAllotStockByStockIds(stockIds));
return toAjax(viewHandAllotStockService.deleteViewHandAllotStockByOnlyIdentitys(onlyIdentitys));
}
}

View File

@@ -1,579 +1,128 @@
package com.ruoyi.out.handAllotStock.domain;
import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 手动分配库存对象 view_hand_allot_stock
*
* 指定出库对象 view_hand_allot_stock
*
* @author ruoyi
* @date 2025-09-16
* @date 2025-12-09
*/
public class ViewHandAllotStock extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 库存编码 */
@Excel(name = "库存编码")
private String stockId;
/** 唯一id */
@Excel(name = "唯一id")
private Long onlyIdentity;
/** 货位编码 */
@Excel(name = "货位编码")
private String cargoSpaceId;
/** 列数 */
@Excel(name = "列数")
private Long theColumn;
/** 库存状态 */
@Excel(name = "库存状态")
private String stockStatus;
/** 层数 */
@Excel(name = "层数")
private Long theFloor;
/** 物品状态 */
@Excel(name = "物品状态")
private String productStatus;
/** 批次号 */
@Excel(name = "批次号")
private String lotNo;
/** 入库时间 */
@Excel(name = "入库时间")
private String inDate;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String backDate;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String productGuid;
/** 数量 */
@Excel(name = "数量")
private BigDecimal quantity;
/** 作业编码 */
@Excel(name = "作业编码")
private String jobId;
/** 托盘条码 */
@Excel(name = "托盘条码")
private String trayCode;
/** 出库数量 */
@Excel(name = "出库数量")
private String outQuantity;
/** 入库子单号 */
@Excel(name = "入库子单号")
private String stockinDetailId;
/** 入库单号 */
@Excel(name = "入库单号")
private String stockinId;
/** 入库类型 */
@Excel(name = "入库类型")
private String inType;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String inClassId;
/** 仓库编码 */
@Excel(name = "仓库编码")
private String warehouseId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String stackingId;
/** 规格 */
@Excel(name = "规格")
private String spare1;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare2;
/** 单位 */
@Excel(name = "单位")
private String spare3;
/** 型号 */
@Excel(name = "型号")
private String spare4;
/** 颜色 */
@Excel(name = "颜色")
private String spare5;
/** 序列号 */
@Excel(name = "序列号")
private String spare6;
/** 品号 */
@Excel(name = "品号")
/** 产品编码 */
@Excel(name = "产品编码")
private String productId;
/** 品名 */
@Excel(name = "品名")
/** 产品名称 */
@Excel(name = "产品名称")
private String productName;
/** 电压 */
@Excel(name = "电压")
private String voltage;
/** 通道组编码 */
@Excel(name = "通道组编码")
private String groupCodingNo;
/** 功率 */
@Excel(name = "功率")
private String power;
/** 库存数量 */
@Excel(name = "库存数量")
private String quantity;
/** 相位 */
@Excel(name = "相位")
private String phase;
/** 净重 */
@Excel(name = "净重")
private String netWeight;
/** 毛重 */
@Excel(name = "毛重")
private String grossWeight;
/** 分销 */
@Excel(name = "分销")
private String distribution;
/** 机型 */
@Excel(name = "机型")
private String model;
/** 订单号 */
@Excel(name = "订单号")
private String orderId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare7;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare8;
/** 货位名称 */
@Excel(name = "货位名称")
private String cargoSpaceName;
public void setStockId(String stockId)
public void setOnlyIdentity(Long onlyIdentity)
{
this.stockId = stockId;
this.onlyIdentity = onlyIdentity;
}
public String getStockId()
public Long getOnlyIdentity()
{
return stockId;
return onlyIdentity;
}
public void setCargoSpaceId(String cargoSpaceId)
public void setTheColumn(Long theColumn)
{
this.cargoSpaceId = cargoSpaceId;
this.theColumn = theColumn;
}
public String getCargoSpaceId()
public Long getTheColumn()
{
return cargoSpaceId;
return theColumn;
}
public void setStockStatus(String stockStatus)
public void setTheFloor(Long theFloor)
{
this.stockStatus = stockStatus;
this.theFloor = theFloor;
}
public String getStockStatus()
public Long getTheFloor()
{
return stockStatus;
return theFloor;
}
public void setProductStatus(String productStatus)
{
this.productStatus = productStatus;
}
public String getProductStatus()
{
return productStatus;
}
public void setLotNo(String lotNo)
{
this.lotNo = lotNo;
}
public String getLotNo()
{
return lotNo;
}
public void setInDate(String inDate)
{
this.inDate = inDate;
}
public String getInDate()
{
return inDate;
}
public void setBackDate(String backDate)
{
this.backDate = backDate;
}
public String getBackDate()
{
return backDate;
}
public void setProductGuid(String productGuid)
{
this.productGuid = productGuid;
}
public String getProductGuid()
{
return productGuid;
}
public void setQuantity(BigDecimal quantity)
{
this.quantity = quantity;
}
public BigDecimal getQuantity()
{
return quantity;
}
public void setJobId(String jobId)
{
this.jobId = jobId;
}
public String getJobId()
{
return jobId;
}
public void setTrayCode(String trayCode)
{
this.trayCode = trayCode;
}
public String getTrayCode()
{
return trayCode;
}
public void setOutQuantity(String outQuantity)
{
this.outQuantity = outQuantity;
}
public String getOutQuantity()
{
return outQuantity;
}
public void setStockinDetailId(String stockinDetailId)
{
this.stockinDetailId = stockinDetailId;
}
public String getStockinDetailId()
{
return stockinDetailId;
}
public void setStockinId(String stockinId)
{
this.stockinId = stockinId;
}
public String getStockinId()
{
return stockinId;
}
public void setInType(String inType)
{
this.inType = inType;
}
public String getInType()
{
return inType;
}
public void setInClassId(String inClassId)
{
this.inClassId = inClassId;
}
public String getInClassId()
{
return inClassId;
}
public void setWarehouseId(String warehouseId)
{
this.warehouseId = warehouseId;
}
public String getWarehouseId()
{
return warehouseId;
}
public void setStackingId(String stackingId)
{
this.stackingId = stackingId;
}
public String getStackingId()
{
return stackingId;
}
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
{
return spare1;
}
public void setSpare2(String spare2)
{
this.spare2 = spare2;
}
public String getSpare2()
{
return spare2;
}
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
{
return spare3;
}
public void setSpare4(String spare4)
{
this.spare4 = spare4;
}
public String getSpare4()
{
return spare4;
}
public void setSpare5(String spare5)
{
this.spare5 = spare5;
}
public String getSpare5()
{
return spare5;
}
public void setSpare6(String spare6)
{
this.spare6 = spare6;
}
public String getSpare6()
{
return spare6;
}
public void setProductId(String productId)
public void setProductId(String productId)
{
this.productId = productId;
}
public String getProductId()
public String getProductId()
{
return productId;
}
public void setProductName(String productName)
public void setProductName(String productName)
{
this.productName = productName;
}
public String getProductName()
public String getProductName()
{
return productName;
}
public void setVoltage(String voltage)
public void setGroupCodingNo(String groupCodingNo)
{
this.voltage = voltage;
this.groupCodingNo = groupCodingNo;
}
public String getVoltage()
public String getGroupCodingNo()
{
return voltage;
return groupCodingNo;
}
public void setPower(String power)
public void setQuantity(String quantity)
{
this.power = power;
this.quantity = quantity;
}
public String getPower()
public String getQuantity()
{
return power;
}
public void setPhase(String phase)
{
this.phase = phase;
}
public String getPhase()
{
return phase;
}
public void setNetWeight(String netWeight)
{
this.netWeight = netWeight;
}
public String getNetWeight()
{
return netWeight;
}
public void setGrossWeight(String grossWeight)
{
this.grossWeight = grossWeight;
}
public String getGrossWeight()
{
return grossWeight;
}
public void setDistribution(String distribution)
{
this.distribution = distribution;
}
public String getDistribution()
{
return distribution;
}
public void setModel(String model)
{
this.model = model;
}
public String getModel()
{
return model;
}
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getOrderId()
{
return orderId;
}
public void setSpare7(String spare7)
{
this.spare7 = spare7;
}
public String getSpare7()
{
return spare7;
}
public void setSpare8(String spare8)
{
this.spare8 = spare8;
}
public String getSpare8()
{
return spare8;
}
public void setCargoSpaceName(String cargoSpaceName)
{
this.cargoSpaceName = cargoSpaceName;
}
public String getCargoSpaceName()
{
return cargoSpaceName;
return quantity;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("stockId", getStockId())
.append("cargoSpaceId", getCargoSpaceId())
.append("stockStatus", getStockStatus())
.append("productStatus", getProductStatus())
.append("lotNo", getLotNo())
.append("inDate", getInDate())
.append("backDate", getBackDate())
.append("productGuid", getProductGuid())
.append("quantity", getQuantity())
.append("jobId", getJobId())
.append("trayCode", getTrayCode())
.append("outQuantity", getOutQuantity())
.append("stockinDetailId", getStockinDetailId())
.append("stockinId", getStockinId())
.append("inType", getInType())
.append("inClassId", getInClassId())
.append("warehouseId", getWarehouseId())
.append("stackingId", getStackingId())
.append("spare1", getSpare1())
.append("spare2", getSpare2())
.append("spare3", getSpare3())
.append("spare4", getSpare4())
.append("spare5", getSpare5())
.append("spare6", getSpare6())
.append("onlyIdentity", getOnlyIdentity())
.append("theColumn", getTheColumn())
.append("theFloor", getTheFloor())
.append("productId", getProductId())
.append("productName", getProductName())
.append("voltage", getVoltage())
.append("power", getPower())
.append("phase", getPhase())
.append("netWeight", getNetWeight())
.append("grossWeight", getGrossWeight())
.append("distribution", getDistribution())
.append("model", getModel())
.append("orderId", getOrderId())
.append("spare7", getSpare7())
.append("spare8", getSpare8())
.append("cargoSpaceName", getCargoSpaceName())
.append("groupCodingNo", getGroupCodingNo())
.append("quantity", getQuantity())
.toString();
}
}

View File

@@ -4,58 +4,58 @@ import java.util.List;
import com.ruoyi.out.handAllotStock.domain.ViewHandAllotStock;
/**
* 手动分配库存Mapper接口
* 指定出库Mapper接口
*
* @author ruoyi
* @date 2025-09-16
* @date 2025-12-09
*/
public interface ViewHandAllotStockMapper
{
/**
* 查询手动分配库存
* 查询指定出库
*
* @param stockId 手动分配库存主键
* @return 手动分配库存
* @param onlyIdentity 指定出库主键
* @return 指定出库
*/
public ViewHandAllotStock selectViewHandAllotStockByStockId(String stockId);
public ViewHandAllotStock selectViewHandAllotStockByOnlyIdentity(Long onlyIdentity);
/**
* 查询手动分配库存列表
* 查询指定出库列表
*
* @param viewHandAllotStock 手动分配库存
* @return 手动分配库存集合
* @param viewHandAllotStock 指定出库
* @return 指定出库集合
*/
public List<ViewHandAllotStock> selectViewHandAllotStockList(ViewHandAllotStock viewHandAllotStock);
/**
* 新增手动分配库存
* 新增指定出库
*
* @param viewHandAllotStock 手动分配库存
* @param viewHandAllotStock 指定出库
* @return 结果
*/
public int insertViewHandAllotStock(ViewHandAllotStock viewHandAllotStock);
/**
* 修改手动分配库存
* 修改指定出库
*
* @param viewHandAllotStock 手动分配库存
* @param viewHandAllotStock 指定出库
* @return 结果
*/
public int updateViewHandAllotStock(ViewHandAllotStock viewHandAllotStock);
/**
* 删除手动分配库存
* 删除指定出库
*
* @param stockId 手动分配库存主键
* @param onlyIdentity 指定出库主键
* @return 结果
*/
public int deleteViewHandAllotStockByStockId(String stockId);
public int deleteViewHandAllotStockByOnlyIdentity(Long onlyIdentity);
/**
* 批量删除手动分配库存
* 批量删除指定出库
*
* @param stockIds 需要删除的数据主键集合
* @param onlyIdentitys 需要删除的数据主键集合
* @return 结果
*/
public int deleteViewHandAllotStockByStockIds(String[] stockIds);
public int deleteViewHandAllotStockByOnlyIdentitys(Long[] onlyIdentitys);
}

View File

@@ -4,58 +4,58 @@ import java.util.List;
import com.ruoyi.out.handAllotStock.domain.ViewHandAllotStock;
/**
* 手动分配库存Service接口
* 指定出库Service接口
*
* @author ruoyi
* @date 2025-09-16
* @date 2025-12-09
*/
public interface IViewHandAllotStockService
{
/**
* 查询手动分配库存
* 查询指定出库
*
* @param stockId 手动分配库存主键
* @return 手动分配库存
* @param onlyIdentity 指定出库主键
* @return 指定出库
*/
public ViewHandAllotStock selectViewHandAllotStockByStockId(String stockId);
public ViewHandAllotStock selectViewHandAllotStockByOnlyIdentity(Long onlyIdentity);
/**
* 查询手动分配库存列表
* 查询指定出库列表
*
* @param viewHandAllotStock 手动分配库存
* @return 手动分配库存集合
* @param viewHandAllotStock 指定出库
* @return 指定出库集合
*/
public List<ViewHandAllotStock> selectViewHandAllotStockList(ViewHandAllotStock viewHandAllotStock);
/**
* 新增手动分配库存
* 新增指定出库
*
* @param viewHandAllotStock 手动分配库存
* @param viewHandAllotStock 指定出库
* @return 结果
*/
public int insertViewHandAllotStock(ViewHandAllotStock viewHandAllotStock);
/**
* 修改手动分配库存
* 修改指定出库
*
* @param viewHandAllotStock 手动分配库存
* @param viewHandAllotStock 指定出库
* @return 结果
*/
public int updateViewHandAllotStock(ViewHandAllotStock viewHandAllotStock);
/**
* 批量删除手动分配库存
* 批量删除指定出库
*
* @param stockIds 需要删除的手动分配库存主键集合
* @param onlyIdentitys 需要删除的指定出库主键集合
* @return 结果
*/
public int deleteViewHandAllotStockByStockIds(String[] stockIds);
public int deleteViewHandAllotStockByOnlyIdentitys(Long[] onlyIdentitys);
/**
* 删除手动分配库存信息
* 删除指定出库信息
*
* @param stockId 手动分配库存主键
* @param onlyIdentity 指定出库主键
* @return 结果
*/
public int deleteViewHandAllotStockByStockId(String stockId);
public int deleteViewHandAllotStockByOnlyIdentity(Long onlyIdentity);
}

View File

@@ -8,10 +8,10 @@ import com.ruoyi.out.handAllotStock.domain.ViewHandAllotStock;
import com.ruoyi.out.handAllotStock.service.IViewHandAllotStockService;
/**
* 手动分配库存Service业务层处理
* 指定出库Service业务层处理
*
* @author ruoyi
* @date 2025-09-16
* @date 2025-12-09
*/
@Service
public class ViewHandAllotStockServiceImpl implements IViewHandAllotStockService
@@ -20,22 +20,22 @@ public class ViewHandAllotStockServiceImpl implements IViewHandAllotStockService
private ViewHandAllotStockMapper viewHandAllotStockMapper;
/**
* 查询手动分配库存
* 查询指定出库
*
* @param stockId 手动分配库存主键
* @return 手动分配库存
* @param onlyIdentity 指定出库主键
* @return 指定出库
*/
@Override
public ViewHandAllotStock selectViewHandAllotStockByStockId(String stockId)
public ViewHandAllotStock selectViewHandAllotStockByOnlyIdentity(Long onlyIdentity)
{
return viewHandAllotStockMapper.selectViewHandAllotStockByStockId(stockId);
return viewHandAllotStockMapper.selectViewHandAllotStockByOnlyIdentity(onlyIdentity);
}
/**
* 查询手动分配库存列表
* 查询指定出库列表
*
* @param viewHandAllotStock 手动分配库存
* @return 手动分配库存
* @param viewHandAllotStock 指定出库
* @return 指定出库
*/
@Override
public List<ViewHandAllotStock> selectViewHandAllotStockList(ViewHandAllotStock viewHandAllotStock)
@@ -44,9 +44,9 @@ public class ViewHandAllotStockServiceImpl implements IViewHandAllotStockService
}
/**
* 新增手动分配库存
* 新增指定出库
*
* @param viewHandAllotStock 手动分配库存
* @param viewHandAllotStock 指定出库
* @return 结果
*/
@Override
@@ -56,9 +56,9 @@ public class ViewHandAllotStockServiceImpl implements IViewHandAllotStockService
}
/**
* 修改手动分配库存
* 修改指定出库
*
* @param viewHandAllotStock 手动分配库存
* @param viewHandAllotStock 指定出库
* @return 结果
*/
@Override
@@ -68,26 +68,26 @@ public class ViewHandAllotStockServiceImpl implements IViewHandAllotStockService
}
/**
* 批量删除手动分配库存
* 批量删除指定出库
*
* @param stockIds 需要删除的手动分配库存主键
* @param onlyIdentitys 需要删除的指定出库主键
* @return 结果
*/
@Override
public int deleteViewHandAllotStockByStockIds(String[] stockIds)
public int deleteViewHandAllotStockByOnlyIdentitys(Long[] onlyIdentitys)
{
return viewHandAllotStockMapper.deleteViewHandAllotStockByStockIds(stockIds);
return viewHandAllotStockMapper.deleteViewHandAllotStockByOnlyIdentitys(onlyIdentitys);
}
/**
* 删除手动分配库存信息
* 删除指定出库信息
*
* @param stockId 手动分配库存主键
* @param onlyIdentity 指定出库主键
* @return 结果
*/
@Override
public int deleteViewHandAllotStockByStockId(String stockId)
public int deleteViewHandAllotStockByOnlyIdentity(Long onlyIdentity)
{
return viewHandAllotStockMapper.deleteViewHandAllotStockByStockId(stockId);
return viewHandAllotStockMapper.deleteViewHandAllotStockByOnlyIdentity(onlyIdentity);
}
}

View File

@@ -217,8 +217,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="pointOut" parameterType="java.util.Map" statementType="CALLABLE">
{call proc_point_out(
#{v_stock_id,jdbcType=VARCHAR,mode=IN},
#{v_exit_id,jdbcType=VARCHAR,mode=IN},
#{v_group_coding_no,jdbcType=VARCHAR,mode=IN},
#{v_jh_quantity,jdbcType=NUMERIC,mode=IN},
#{v_result,mode=OUT,jdbcType=INTEGER},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)}

View File

@@ -5,231 +5,80 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.out.handAllotStock.mapper.ViewHandAllotStockMapper">
<resultMap type="ViewHandAllotStock" id="ViewHandAllotStockResult">
<result property="stockId" column="stock_id" />
<result property="cargoSpaceId" column="cargo_space_id" />
<result property="stockStatus" column="stock_status" />
<result property="productStatus" column="product_status" />
<result property="lotNo" column="lot_no" />
<result property="inDate" column="in_date" />
<result property="backDate" column="back_date" />
<result property="productGuid" column="product_guid" />
<result property="quantity" column="quantity" />
<result property="jobId" column="job_id" />
<result property="trayCode" column="tray_code" />
<result property="outQuantity" column="out_quantity" />
<result property="stockinDetailId" column="stockin_detail_id" />
<result property="stockinId" column="stockin_id" />
<result property="inType" column="in_type" />
<result property="inClassId" column="in_class_id" />
<result property="warehouseId" column="warehouse_id" />
<result property="stackingId" column="stacking_id" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="onlyIdentity" column="only_identity" />
<result property="theColumn" column="the_column" />
<result property="theFloor" column="the_floor" />
<result property="productId" column="product_id" />
<result property="productName" column="product_name" />
<result property="voltage" column="voltage" />
<result property="power" column="power" />
<result property="phase" column="phase" />
<result property="netWeight" column="net_weight" />
<result property="grossWeight" column="gross_weight" />
<result property="distribution" column="distribution" />
<result property="model" column="model" />
<result property="orderId" column="order_id" />
<result property="spare7" column="spare7" />
<result property="spare8" column="spare8" />
<result property="cargoSpaceName" column="cargo_space_name" />
<result property="groupCodingNo" column="group_coding_no" />
<result property="quantity" column="quantity" />
</resultMap>
<sql id="selectViewHandAllotStockVo">
select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_guid, quantity, job_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, in_class_id, warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6, product_id, product_name, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id, spare7, spare8, cargo_space_name from view_hand_allot_stock
select only_identity, the_column, the_floor, product_id, product_name, group_coding_no, quantity from view_hand_allot_stock
</sql>
<select id="selectViewHandAllotStockList" parameterType="ViewHandAllotStock" resultMap="ViewHandAllotStockResult">
<include refid="selectViewHandAllotStockVo"/>
<where>
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="stockStatus != null and stockStatus != ''"> and stock_status = #{stockStatus}</if>
<if test="productStatus != null and productStatus != ''"> and product_status = #{productStatus}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
<if test="inDate != null and inDate != ''"> and in_date like concat('%', #{inDate}, '%')</if>
<if test="backDate != null and backDate != ''"> and back_date = #{backDate}</if>
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
<if test="quantity != null "> and quantity = #{quantity}</if>
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="outQuantity != null and outQuantity != ''"> and out_quantity = #{outQuantity}</if>
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id = #{stockinDetailId}</if>
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
<if test="inType != null and inType != ''"> and in_type = #{inType}</if>
<if test="inClassId != null and inClassId != ''"> and in_class_id = #{inClassId}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="stackingId != null and stackingId != ''"> and stacking_id = #{stackingId}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
<if test="theColumn != null "> and the_column = #{theColumn}</if>
<if test="theFloor != null "> and the_floor = #{theFloor}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="voltage != null and voltage != ''"> and voltage = #{voltage}</if>
<if test="power != null and power != ''"> and power = #{power}</if>
<if test="phase != null and phase != ''"> and phase = #{phase}</if>
<if test="netWeight != null "> and net_weight = #{netWeight}</if>
<if test="grossWeight != null "> and gross_weight = #{grossWeight}</if>
<if test="distribution != null and distribution != ''"> and distribution = #{distribution}</if>
<if test="model != null and model != ''"> and model = #{model}</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="groupCodingNo != null and groupCodingNo != ''"> and group_coding_no = #{groupCodingNo}</if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
</where>
</select>
<select id="selectViewHandAllotStockByStockId" parameterType="String" resultMap="ViewHandAllotStockResult">
<select id="selectViewHandAllotStockByOnlyIdentity" parameterType="Long" resultMap="ViewHandAllotStockResult">
<include refid="selectViewHandAllotStockVo"/>
where stock_id = #{stockId}
where only_identity = #{onlyIdentity}
</select>
<insert id="insertViewHandAllotStock" parameterType="ViewHandAllotStock">
insert into view_hand_allot_stock
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockId != null and stockId != ''">stock_id,</if>
<if test="cargoSpaceId != null">cargo_space_id,</if>
<if test="stockStatus != null">stock_status,</if>
<if test="productStatus != null">product_status,</if>
<if test="lotNo != null">lot_no,</if>
<if test="inDate != null">in_date,</if>
<if test="backDate != null">back_date,</if>
<if test="productGuid != null">product_guid,</if>
<if test="quantity != null">quantity,</if>
<if test="jobId != null">job_id,</if>
<if test="trayCode != null">tray_code,</if>
<if test="outQuantity != null">out_quantity,</if>
<if test="stockinDetailId != null">stockin_detail_id,</if>
<if test="stockinId != null">stockin_id,</if>
<if test="inType != null">in_type,</if>
<if test="inClassId != null">in_class_id,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="stackingId != null">stacking_id,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare4 != null">spare4,</if>
<if test="spare5 != null">spare5,</if>
<if test="spare6 != null">spare6,</if>
<if test="onlyIdentity != null">only_identity,</if>
<if test="theColumn != null">the_column,</if>
<if test="theFloor != null">the_floor,</if>
<if test="productId != null">product_id,</if>
<if test="productName != null">product_name,</if>
<if test="voltage != null">voltage,</if>
<if test="power != null">power,</if>
<if test="phase != null">phase,</if>
<if test="netWeight != null">net_weight,</if>
<if test="grossWeight != null">gross_weight,</if>
<if test="distribution != null">distribution,</if>
<if test="model != null">model,</if>
<if test="orderId != null">order_id,</if>
<if test="spare7 != null">spare7,</if>
<if test="spare8 != null">spare8,</if>
<if test="cargoSpaceName != null">cargo_space_name,</if>
<if test="groupCodingNo != null">group_coding_no,</if>
<if test="quantity != null">quantity,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockId != null and stockId != ''">#{stockId},</if>
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
<if test="stockStatus != null">#{stockStatus},</if>
<if test="productStatus != null">#{productStatus},</if>
<if test="lotNo != null">#{lotNo},</if>
<if test="inDate != null">#{inDate},</if>
<if test="backDate != null">#{backDate},</if>
<if test="productGuid != null">#{productGuid},</if>
<if test="quantity != null">#{quantity},</if>
<if test="jobId != null">#{jobId},</if>
<if test="trayCode != null">#{trayCode},</if>
<if test="outQuantity != null">#{outQuantity},</if>
<if test="stockinDetailId != null">#{stockinDetailId},</if>
<if test="stockinId != null">#{stockinId},</if>
<if test="inType != null">#{inType},</if>
<if test="inClassId != null">#{inClassId},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="stackingId != null">#{stackingId},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare4 != null">#{spare4},</if>
<if test="spare5 != null">#{spare5},</if>
<if test="spare6 != null">#{spare6},</if>
<if test="onlyIdentity != null">#{onlyIdentity},</if>
<if test="theColumn != null">#{theColumn},</if>
<if test="theFloor != null">#{theFloor},</if>
<if test="productId != null">#{productId},</if>
<if test="productName != null">#{productName},</if>
<if test="voltage != null">#{voltage},</if>
<if test="power != null">#{power},</if>
<if test="phase != null">#{phase},</if>
<if test="netWeight != null">#{netWeight},</if>
<if test="grossWeight != null">#{grossWeight},</if>
<if test="distribution != null">#{distribution},</if>
<if test="model != null">#{model},</if>
<if test="orderId != null">#{orderId},</if>
<if test="spare7 != null">#{spare7},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="cargoSpaceName != null">#{cargoSpaceName},</if>
<if test="groupCodingNo != null">#{groupCodingNo},</if>
<if test="quantity != null">#{quantity},</if>
</trim>
</insert>
<update id="updateViewHandAllotStock" parameterType="ViewHandAllotStock">
update view_hand_allot_stock
<trim prefix="SET" suffixOverrides=",">
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
<if test="stockStatus != null">stock_status = #{stockStatus},</if>
<if test="productStatus != null">product_status = #{productStatus},</if>
<if test="lotNo != null">lot_no = #{lotNo},</if>
<if test="inDate != null">in_date = #{inDate},</if>
<if test="backDate != null">back_date = #{backDate},</if>
<if test="productGuid != null">product_guid = #{productGuid},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="jobId != null">job_id = #{jobId},</if>
<if test="trayCode != null">tray_code = #{trayCode},</if>
<if test="outQuantity != null">out_quantity = #{outQuantity},</if>
<if test="stockinDetailId != null">stockin_detail_id = #{stockinDetailId},</if>
<if test="stockinId != null">stockin_id = #{stockinId},</if>
<if test="inType != null">in_type = #{inType},</if>
<if test="inClassId != null">in_class_id = #{inClassId},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="stackingId != null">stacking_id = #{stackingId},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
<if test="spare6 != null">spare6 = #{spare6},</if>
<if test="theColumn != null">the_column = #{theColumn},</if>
<if test="theFloor != null">the_floor = #{theFloor},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="voltage != null">voltage = #{voltage},</if>
<if test="power != null">power = #{power},</if>
<if test="phase != null">phase = #{phase},</if>
<if test="netWeight != null">net_weight = #{netWeight},</if>
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
<if test="distribution != null">distribution = #{distribution},</if>
<if test="model != null">model = #{model},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="spare7 != null">spare7 = #{spare7},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="cargoSpaceName != null">cargo_space_name = #{cargoSpaceName},</if>
<if test="groupCodingNo != null">group_coding_no = #{groupCodingNo},</if>
<if test="quantity != null">quantity = #{quantity},</if>
</trim>
where stock_id = #{stockId}
where only_identity = #{onlyIdentity}
</update>
<delete id="deleteViewHandAllotStockByStockId" parameterType="String">
delete from view_hand_allot_stock where stock_id = #{stockId}
<delete id="deleteViewHandAllotStockByOnlyIdentity" parameterType="Long">
delete from view_hand_allot_stock where only_identity = #{onlyIdentity}
</delete>
<delete id="deleteViewHandAllotStockByStockIds" parameterType="String">
delete from view_hand_allot_stock where stock_id in
<foreach item="stockId" collection="array" open="(" separator="," close=")">
#{stockId}
<delete id="deleteViewHandAllotStockByOnlyIdentitys" parameterType="String">
delete from view_hand_allot_stock where only_identity in
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
#{onlyIdentity}
</foreach>
</delete>
</mapper>