库存页面 入库页面手动完成和手动作废
This commit is contained in:
@@ -23,7 +23,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 任务表Controller
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@@ -101,4 +101,26 @@ public class MydoJobController extends BaseController
|
||||
{
|
||||
return toAjax(mydoJobService.deleteMydoJobByJobIds(jobIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动作废任务表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:manualInvalidation')")
|
||||
@Log(title = "任务表", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/manualInvalidation")
|
||||
public AjaxResult manualInvalidation(@RequestBody MydoJob mydoJob)
|
||||
{
|
||||
return mydoJobService.manualInvalidation(mydoJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动完成任务表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:manualCompleted')")
|
||||
@Log(title = "任务表", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/manualCompleted")
|
||||
public AjaxResult manualCompleted(@RequestBody MydoJob mydoJob)
|
||||
{
|
||||
return mydoJobService.manualCompleted(mydoJob);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
|
||||
/**
|
||||
* 任务表Mapper接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface MydoJobMapper
|
||||
public interface MydoJobMapper
|
||||
{
|
||||
/**
|
||||
* 查询任务表
|
||||
*
|
||||
*
|
||||
* @param jobId 任务表主键
|
||||
* @return 任务表
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ public interface MydoJobMapper
|
||||
|
||||
/**
|
||||
* 查询任务表列表
|
||||
*
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 任务表集合
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ public interface MydoJobMapper
|
||||
|
||||
/**
|
||||
* 新增任务表
|
||||
*
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ public interface MydoJobMapper
|
||||
|
||||
/**
|
||||
* 修改任务表
|
||||
*
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public interface MydoJobMapper
|
||||
|
||||
/**
|
||||
* 删除任务表
|
||||
*
|
||||
*
|
||||
* @param jobId 任务表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -53,9 +53,11 @@ public interface MydoJobMapper
|
||||
|
||||
/**
|
||||
* 批量删除任务表
|
||||
*
|
||||
*
|
||||
* @param jobIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobByJobIds(String[] jobIds);
|
||||
|
||||
void insertHistory(String jobId);
|
||||
}
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
package com.ruoyi.job.mydojob.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
|
||||
/**
|
||||
* 任务表Service接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface IMydoJobService
|
||||
public interface IMydoJobService
|
||||
{
|
||||
/**
|
||||
* 查询任务表
|
||||
*
|
||||
*
|
||||
* @param jobId 任务表主键
|
||||
* @return 任务表
|
||||
*/
|
||||
@@ -21,7 +23,7 @@ public interface IMydoJobService
|
||||
|
||||
/**
|
||||
* 查询任务表列表
|
||||
*
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 任务表集合
|
||||
*/
|
||||
@@ -29,7 +31,7 @@ public interface IMydoJobService
|
||||
|
||||
/**
|
||||
* 新增任务表
|
||||
*
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -37,7 +39,7 @@ public interface IMydoJobService
|
||||
|
||||
/**
|
||||
* 修改任务表
|
||||
*
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -45,7 +47,7 @@ public interface IMydoJobService
|
||||
|
||||
/**
|
||||
* 批量删除任务表
|
||||
*
|
||||
*
|
||||
* @param jobIds 需要删除的任务表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -53,9 +55,23 @@ public interface IMydoJobService
|
||||
|
||||
/**
|
||||
* 删除任务表信息
|
||||
*
|
||||
*
|
||||
* @param jobId 任务表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobByJobId(String jobId);
|
||||
|
||||
/**
|
||||
* 手动作废任务
|
||||
* @param mydoJob
|
||||
* @return
|
||||
*/
|
||||
AjaxResult manualInvalidation(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 手动完成任务
|
||||
* @param mydoJob
|
||||
* @return
|
||||
*/
|
||||
AjaxResult manualCompleted(MydoJob mydoJob);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
package com.ruoyi.job.mydojob.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||
import com.ruoyi.bas.taskNo.service.IBasTaskNoService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.job.mydojob.mapper.MydoJobMapper;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojob.service.IMydoJobService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 任务表Service业务层处理
|
||||
@@ -27,6 +38,13 @@ public class MydoJobServiceImpl implements IMydoJobService
|
||||
private IBasJobIdService basJobIdService;
|
||||
@Autowired
|
||||
private IBasTaskNoService basTaskNoService;
|
||||
@Autowired
|
||||
private IMydoJobDetailService mydoJobDetailService;
|
||||
@Autowired
|
||||
private IInStockinDetailService inStockinDetailService;
|
||||
@Autowired
|
||||
private IBasStockService basStockService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询任务表
|
||||
@@ -102,4 +120,95 @@ public class MydoJobServiceImpl implements IMydoJobService
|
||||
{
|
||||
return mydoJobMapper.deleteMydoJobByJobId(jobId);
|
||||
}
|
||||
/**
|
||||
* 手动作废任务表
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult manualInvalidation(MydoJob mydoJob) {
|
||||
String jobId = mydoJob.getJobId();
|
||||
MydoJob job = selectMydoJobByJobId(jobId);
|
||||
if (job == null){
|
||||
return AjaxResult.warn("任务不存在");
|
||||
}
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(jobId);
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
String inOrOutDId = mydoJobDetail.getInOrOutDId();
|
||||
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId);
|
||||
BigDecimal stockInNum = Convert.toBigDecimal(inStockinDetail.getScanNum());
|
||||
BigDecimal jobInNum = Convert.toBigDecimal(mydoJobDetail.getInQuantity());
|
||||
BigDecimal subtract = stockInNum.subtract(jobInNum);
|
||||
inStockinDetail.setScanNum(Convert.toStr(subtract));
|
||||
inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||
}
|
||||
mydoJob.setStatus("5");
|
||||
updateMydoJob(mydoJob);
|
||||
//插入历史表
|
||||
insertHistory(mydoJob.getJobId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入历史表
|
||||
* @param jobId
|
||||
*/
|
||||
private void insertHistory(String jobId) {
|
||||
mydoJobMapper.insertHistory(jobId);
|
||||
mydoJobDetailService.insertHistory(jobId);
|
||||
mydoJobMapper.deleteMydoJobByJobId(jobId);
|
||||
mydoJobDetailService.deleteMydoJobDetailByJobId(jobId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动完成任务表
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult manualCompleted(MydoJob mydoJob) {
|
||||
//插入库存
|
||||
|
||||
String jobId = mydoJob.getJobId();
|
||||
MydoJob job = selectMydoJobByJobId(jobId);
|
||||
if (job == null){
|
||||
return AjaxResult.warn("任务不存在");
|
||||
}
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(jobId);
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
if (CollUtil.isNotEmpty(mydoJobDetails)){
|
||||
List<BasStock> list = new ArrayList<>();
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
list.add(getStockByInStockinDetail(mydoJobDetail,job));
|
||||
}
|
||||
basStockService.insertBasStockList(list);
|
||||
mydoJob.setStatus("4");
|
||||
updateMydoJob(mydoJob);
|
||||
//插入历史表
|
||||
insertHistory(mydoJob.getJobId());
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
private BasStock getStockByInStockinDetail(MydoJobDetail mydoJobDetail,MydoJob mydoJob) {
|
||||
BasStock stock = new BasStock();
|
||||
stock.setStockId(basJobIdService.getJobId("KC"));
|
||||
stock.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
stock.setStockStatus("1");
|
||||
stock.setProductStatus("1");
|
||||
stock.setLotNo(mydoJobDetail.getLotNo());
|
||||
stock.setInDate(DateUtils.getDate());
|
||||
stock.setProductGuid(mydoJobDetail.getProductGuid());
|
||||
stock.setQuantity(mydoJobDetail.getInQuantity());
|
||||
stock.setJobId(mydoJob.getJobId());
|
||||
stock.setTrayCode(mydoJob.getTrayCode());
|
||||
stock.setInClassId(mydoJob.getClassId());
|
||||
stock.setWarehouseId(mydoJob.getWarehouseId());
|
||||
stock.setStackingId(mydoJobDetail.getStackingId());
|
||||
return stock;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
|
||||
/**
|
||||
* 子任务Mapper接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-22
|
||||
*/
|
||||
public interface MydoJobDetailMapper
|
||||
public interface MydoJobDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询子任务
|
||||
*
|
||||
*
|
||||
* @param jobDetailId 子任务主键
|
||||
* @return 子任务
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ public interface MydoJobDetailMapper
|
||||
|
||||
/**
|
||||
* 查询子任务列表
|
||||
*
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 子任务集合
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ public interface MydoJobDetailMapper
|
||||
|
||||
/**
|
||||
* 新增子任务
|
||||
*
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ public interface MydoJobDetailMapper
|
||||
|
||||
/**
|
||||
* 修改子任务
|
||||
*
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public interface MydoJobDetailMapper
|
||||
|
||||
/**
|
||||
* 删除子任务
|
||||
*
|
||||
*
|
||||
* @param jobDetailId 子任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -53,9 +53,13 @@ public interface MydoJobDetailMapper
|
||||
|
||||
/**
|
||||
* 批量删除子任务
|
||||
*
|
||||
*
|
||||
* @param jobDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobDetailByJobDetailIds(String[] jobDetailIds);
|
||||
|
||||
void insertHistory(String jobId);
|
||||
|
||||
void deleteMydoJobDetailByJobId(String jobId);
|
||||
}
|
||||
|
||||
@@ -58,4 +58,8 @@ public interface IMydoJobDetailService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobDetailByJobDetailId(String jobDetailId);
|
||||
|
||||
void insertHistory(String jobId);
|
||||
|
||||
void deleteMydoJobDetailByJobId(String jobId);
|
||||
}
|
||||
|
||||
@@ -9,19 +9,19 @@ import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
|
||||
|
||||
/**
|
||||
* 子任务Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-22
|
||||
*/
|
||||
@Service
|
||||
public class MydoJobDetailServiceImpl implements IMydoJobDetailService
|
||||
public class MydoJobDetailServiceImpl implements IMydoJobDetailService
|
||||
{
|
||||
@Autowired
|
||||
private MydoJobDetailMapper mydoJobDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询子任务
|
||||
*
|
||||
*
|
||||
* @param jobDetailId 子任务主键
|
||||
* @return 子任务
|
||||
*/
|
||||
@@ -33,7 +33,7 @@ public class MydoJobDetailServiceImpl implements IMydoJobDetailService
|
||||
|
||||
/**
|
||||
* 查询子任务列表
|
||||
*
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 子任务
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public class MydoJobDetailServiceImpl implements IMydoJobDetailService
|
||||
|
||||
/**
|
||||
* 新增子任务
|
||||
*
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -57,7 +57,7 @@ public class MydoJobDetailServiceImpl implements IMydoJobDetailService
|
||||
|
||||
/**
|
||||
* 修改子任务
|
||||
*
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -69,7 +69,7 @@ public class MydoJobDetailServiceImpl implements IMydoJobDetailService
|
||||
|
||||
/**
|
||||
* 批量删除子任务
|
||||
*
|
||||
*
|
||||
* @param jobDetailIds 需要删除的子任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -81,7 +81,7 @@ public class MydoJobDetailServiceImpl implements IMydoJobDetailService
|
||||
|
||||
/**
|
||||
* 删除子任务信息
|
||||
*
|
||||
*
|
||||
* @param jobDetailId 子任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -90,4 +90,14 @@ public class MydoJobDetailServiceImpl implements IMydoJobDetailService
|
||||
{
|
||||
return mydoJobDetailMapper.deleteMydoJobDetailByJobDetailId(jobDetailId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertHistory(String jobId) {
|
||||
mydoJobDetailMapper.insertHistory(jobId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteMydoJobDetailByJobId(String jobId) {
|
||||
mydoJobDetailMapper.deleteMydoJobDetailByJobId(jobId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.stock.stock.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
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.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 库存信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/stock/management")
|
||||
public class BasStockController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBasStockService basStockService;
|
||||
|
||||
/**
|
||||
* 查询库存信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:management:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BasStock basStock)
|
||||
{
|
||||
startPage();
|
||||
List<BasStock> list = basStockService.selectBasStockList(basStock);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出库存信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:management:export')")
|
||||
@Log(title = "库存信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BasStock basStock)
|
||||
{
|
||||
List<BasStock> list = basStockService.selectBasStockList(basStock);
|
||||
ExcelUtil<BasStock> util = new ExcelUtil<BasStock>(BasStock.class);
|
||||
util.exportExcel(response, list, "库存信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库存信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:management:query')")
|
||||
@GetMapping(value = "/{stockId}")
|
||||
public AjaxResult getInfo(@PathVariable("stockId") String stockId)
|
||||
{
|
||||
return success(basStockService.selectBasStockByStockId(stockId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:management:add')")
|
||||
@Log(title = "库存信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BasStock basStock)
|
||||
{
|
||||
return toAjax(basStockService.insertBasStock(basStock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:management:edit')")
|
||||
@Log(title = "库存信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BasStock basStock)
|
||||
{
|
||||
return toAjax(basStockService.updateBasStock(basStock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库存信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:management:remove')")
|
||||
@Log(title = "库存信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockIds}")
|
||||
public AjaxResult remove(@PathVariable String[] stockIds)
|
||||
{
|
||||
return toAjax(basStockService.deleteBasStockByStockIds(stockIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,383 @@
|
||||
package com.ruoyi.stock.stock.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 库存信息对象 bas_stock
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-24
|
||||
*/
|
||||
public class BasStock extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 库存id */
|
||||
@Excel(name = "库存id")
|
||||
private String stockId;
|
||||
|
||||
/** 货位id */
|
||||
@Excel(name = "货位id")
|
||||
private String cargoSpaceId;
|
||||
|
||||
/** 库存状态 */
|
||||
@Excel(name = "库存状态")
|
||||
private String stockStatus;
|
||||
|
||||
/** 物料状态 */
|
||||
@Excel(name = "物料状态")
|
||||
private String productStatus;
|
||||
|
||||
/** 批次号 */
|
||||
@Excel(name = "批次号")
|
||||
private String lotNo;
|
||||
|
||||
/** 入库时间 */
|
||||
@Excel(name = "入库时间")
|
||||
private String inDate;
|
||||
|
||||
/** 回流时间 */
|
||||
@Excel(name = "回流时间")
|
||||
private String backDate;
|
||||
|
||||
/** 物料GUID */
|
||||
@Excel(name = "物料GUID")
|
||||
private String productGuid;
|
||||
|
||||
/** 库存数量 */
|
||||
@Excel(name = "库存数量")
|
||||
private String quantity;
|
||||
|
||||
/** 作业ID */
|
||||
@Excel(name = "作业ID")
|
||||
private String jobId;
|
||||
|
||||
/** 托盘条码 */
|
||||
@Excel(name = "托盘条码")
|
||||
private String trayCode;
|
||||
|
||||
/** 出库数量 */
|
||||
@Excel(name = "出库数量")
|
||||
private String outQuantity;
|
||||
|
||||
/** 入库子单id */
|
||||
@Excel(name = "入库子单id")
|
||||
private String stockinDetailId;
|
||||
|
||||
/** 入库主单 */
|
||||
@Excel(name = "入库主单")
|
||||
private String stockinId;
|
||||
|
||||
/** 入库类型 */
|
||||
@Excel(name = "入库类型")
|
||||
private String inType;
|
||||
|
||||
/** 入库班组ID */
|
||||
@Excel(name = "入库班组ID")
|
||||
private String inClassId;
|
||||
|
||||
/** 仓库 */
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseId;
|
||||
|
||||
/** 垛型ID */
|
||||
@Excel(name = "垛型ID")
|
||||
private String stackingId;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String spare1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String spare3;
|
||||
|
||||
/** 备用字段4 */
|
||||
@Excel(name = "备用字段4")
|
||||
private String spare4;
|
||||
|
||||
/** 备用字段5 */
|
||||
@Excel(name = "备用字段5")
|
||||
private String spare5;
|
||||
|
||||
/** 备用字段6 */
|
||||
@Excel(name = "备用字段6")
|
||||
private String spare6;
|
||||
|
||||
public void setStockId(String stockId)
|
||||
{
|
||||
this.stockId = stockId;
|
||||
}
|
||||
|
||||
public String getStockId()
|
||||
{
|
||||
return stockId;
|
||||
}
|
||||
|
||||
public void setCargoSpaceId(String cargoSpaceId)
|
||||
{
|
||||
this.cargoSpaceId = cargoSpaceId;
|
||||
}
|
||||
|
||||
public String getCargoSpaceId()
|
||||
{
|
||||
return cargoSpaceId;
|
||||
}
|
||||
|
||||
public void setStockStatus(String stockStatus)
|
||||
{
|
||||
this.stockStatus = stockStatus;
|
||||
}
|
||||
|
||||
public String getStockStatus()
|
||||
{
|
||||
return stockStatus;
|
||||
}
|
||||
|
||||
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(String quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String 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;
|
||||
}
|
||||
|
||||
@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())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.stock.stock.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
|
||||
/**
|
||||
* 库存信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-24
|
||||
*/
|
||||
public interface BasStockMapper
|
||||
{
|
||||
/**
|
||||
* 查询库存信息
|
||||
*
|
||||
* @param stockId 库存信息主键
|
||||
* @return 库存信息
|
||||
*/
|
||||
public BasStock selectBasStockByStockId(String stockId);
|
||||
|
||||
/**
|
||||
* 查询库存信息列表
|
||||
*
|
||||
* @param basStock 库存信息
|
||||
* @return 库存信息集合
|
||||
*/
|
||||
public List<BasStock> selectBasStockList(BasStock basStock);
|
||||
|
||||
/**
|
||||
* 新增库存信息
|
||||
*
|
||||
* @param basStock 库存信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasStock(BasStock basStock);
|
||||
|
||||
/**
|
||||
* 修改库存信息
|
||||
*
|
||||
* @param basStock 库存信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasStock(BasStock basStock);
|
||||
|
||||
/**
|
||||
* 删除库存信息
|
||||
*
|
||||
* @param stockId 库存信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasStockByStockId(String stockId);
|
||||
|
||||
/**
|
||||
* 批量删除库存信息
|
||||
*
|
||||
* @param stockIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasStockByStockIds(String[] stockIds);
|
||||
|
||||
void insertBasStockList(List<BasStock> list);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.stock.stock.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
|
||||
/**
|
||||
* 库存信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-24
|
||||
*/
|
||||
public interface IBasStockService
|
||||
{
|
||||
/**
|
||||
* 查询库存信息
|
||||
*
|
||||
* @param stockId 库存信息主键
|
||||
* @return 库存信息
|
||||
*/
|
||||
public BasStock selectBasStockByStockId(String stockId);
|
||||
|
||||
/**
|
||||
* 查询库存信息列表
|
||||
*
|
||||
* @param basStock 库存信息
|
||||
* @return 库存信息集合
|
||||
*/
|
||||
public List<BasStock> selectBasStockList(BasStock basStock);
|
||||
|
||||
/**
|
||||
* 新增库存信息
|
||||
*
|
||||
* @param basStock 库存信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasStock(BasStock basStock);
|
||||
|
||||
/**
|
||||
* 修改库存信息
|
||||
*
|
||||
* @param basStock 库存信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasStock(BasStock basStock);
|
||||
|
||||
/**
|
||||
* 批量删除库存信息
|
||||
*
|
||||
* @param stockIds 需要删除的库存信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasStockByStockIds(String[] stockIds);
|
||||
|
||||
/**
|
||||
* 删除库存信息信息
|
||||
*
|
||||
* @param stockId 库存信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasStockByStockId(String stockId);
|
||||
|
||||
void insertBasStockList(List<BasStock> list);
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.stock.stock.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.stock.stock.mapper.BasStockMapper;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
|
||||
/**
|
||||
* 库存信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-24
|
||||
*/
|
||||
@Service
|
||||
public class BasStockServiceImpl implements IBasStockService
|
||||
{
|
||||
@Autowired
|
||||
private BasStockMapper basStockMapper;
|
||||
|
||||
/**
|
||||
* 查询库存信息
|
||||
*
|
||||
* @param stockId 库存信息主键
|
||||
* @return 库存信息
|
||||
*/
|
||||
@Override
|
||||
public BasStock selectBasStockByStockId(String stockId)
|
||||
{
|
||||
return basStockMapper.selectBasStockByStockId(stockId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库存信息列表
|
||||
*
|
||||
* @param basStock 库存信息
|
||||
* @return 库存信息
|
||||
*/
|
||||
@Override
|
||||
public List<BasStock> selectBasStockList(BasStock basStock)
|
||||
{
|
||||
return basStockMapper.selectBasStockList(basStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存信息
|
||||
*
|
||||
* @param basStock 库存信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBasStock(BasStock basStock)
|
||||
{
|
||||
return basStockMapper.insertBasStock(basStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存信息
|
||||
*
|
||||
* @param basStock 库存信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBasStock(BasStock basStock)
|
||||
{
|
||||
return basStockMapper.updateBasStock(basStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存信息
|
||||
*
|
||||
* @param stockIds 需要删除的库存信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasStockByStockIds(String[] stockIds)
|
||||
{
|
||||
return basStockMapper.deleteBasStockByStockIds(stockIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库存信息信息
|
||||
*
|
||||
* @param stockId 库存信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasStockByStockId(String stockId)
|
||||
{
|
||||
return basStockMapper.deleteBasStockByStockId(stockId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertBasStockList(List<BasStock> list) {
|
||||
basStockMapper.insertBasStockList(list);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.job.mydojobdetail.mapper.MydoJobDetailMapper">
|
||||
|
||||
|
||||
<resultMap type="MydoJobDetail" id="MydoJobDetailResult">
|
||||
<result property="jobDetailId" column="job_detail_id" />
|
||||
<result property="jobId" column="job_id" />
|
||||
@@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectMydoJobDetailList" parameterType="MydoJobDetail" resultMap="MydoJobDetailResult">
|
||||
<include refid="selectMydoJobDetailVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="jobDetailId != null and jobDetailId != ''"> and job_detail_id = #{jobDetailId}</if>
|
||||
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
|
||||
@@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectMydoJobDetailByJobDetailId" parameterType="String" resultMap="MydoJobDetailResult">
|
||||
<include refid="selectMydoJobDetailVo"/>
|
||||
where job_detail_id = #{jobDetailId}
|
||||
@@ -133,6 +133,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertHistory">
|
||||
insert into mydo_job_detail_finish select * from mydo_job_detail where job_id = #{jobId}
|
||||
</insert>
|
||||
|
||||
<update id="updateMydoJobDetail" parameterType="MydoJobDetail">
|
||||
update mydo_job_detail
|
||||
@@ -171,9 +174,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMydoJobDetailByJobDetailIds" parameterType="String">
|
||||
delete from mydo_job_detail where job_detail_id in
|
||||
delete from mydo_job_detail where job_detail_id in
|
||||
<foreach item="jobDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{jobDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
<delete id="deleteMydoJobDetailByJobId">
|
||||
delete from mydo_job_detail where job_id = #{jobId}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.job.mydojob.mapper.MydoJobMapper">
|
||||
|
||||
|
||||
<resultMap type="MydoJob" id="MydoJobResult">
|
||||
<result property="jobId" column="job_id" />
|
||||
<result property="status" column="status" />
|
||||
@@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult">
|
||||
<include refid="selectMydoJobVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="onLineType != null and onLineType != ''"> and on_line_type = #{onLineType}</if>
|
||||
@@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="faultFlag != null and faultFlag != ''"> and fault_flag = #{faultFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectMydoJobByJobId" parameterType="String" resultMap="MydoJobResult">
|
||||
<include refid="selectMydoJobVo"/>
|
||||
where job_id = #{jobId}
|
||||
@@ -128,6 +128,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="faultFlag != null">#{faultFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertHistory">
|
||||
insert into mydo_job_finish
|
||||
select * from mydo_job where job_id = #{jobId}
|
||||
</insert>
|
||||
|
||||
<update id="updateMydoJob" parameterType="MydoJob">
|
||||
update mydo_job
|
||||
@@ -165,9 +169,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMydoJobByJobIds" parameterType="String">
|
||||
delete from mydo_job where job_id in
|
||||
delete from mydo_job where job_id in
|
||||
<foreach item="jobId" collection="array" open="(" separator="," close=")">
|
||||
#{jobId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
227
ruoyi-admin/src/main/resources/mapper/stock/BasStockMapper.xml
Normal file
227
ruoyi-admin/src/main/resources/mapper/stock/BasStockMapper.xml
Normal file
@@ -0,0 +1,227 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.stock.stock.mapper.BasStockMapper">
|
||||
|
||||
<resultMap type="BasStock" id="BasStockResult">
|
||||
<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" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasStockVo">
|
||||
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 from bas_stock
|
||||
</sql>
|
||||
|
||||
<select id="selectBasStockList" parameterType="BasStock" resultMap="BasStockResult">
|
||||
<include refid="selectBasStockVo"/>
|
||||
<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="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 = #{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 != ''"> 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>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasStockByStockId" parameterType="String" resultMap="BasStockResult">
|
||||
<include refid="selectBasStockVo"/>
|
||||
where stock_id = #{stockId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasStock" parameterType="BasStock">
|
||||
insert into bas_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>
|
||||
</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>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertBasStockList">
|
||||
INSERT INTO bas_stock
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="list[0].stockId != null and list[0].stockId != ''">stock_id,</if>
|
||||
<if test="list[0].cargoSpaceId != null">cargo_space_id,</if>
|
||||
<if test="list[0].stockStatus != null">stock_status,</if>
|
||||
<if test="list[0].productStatus != null">product_status,</if>
|
||||
<if test="list[0].lotNo != null">lot_no,</if>
|
||||
<if test="list[0].inDate != null">in_date,</if>
|
||||
<if test="list[0].backDate != null">back_date,</if>
|
||||
<if test="list[0].productGuid != null">product_guid,</if>
|
||||
<if test="list[0].quantity != null">quantity,</if>
|
||||
<if test="list[0].jobId != null">job_id,</if>
|
||||
<if test="list[0].trayCode != null">tray_code,</if>
|
||||
<if test="list[0].outQuantity != null">out_quantity,</if>
|
||||
<if test="list[0].stockinDetailId != null">stockin_detail_id,</if>
|
||||
<if test="list[0].stockinId != null">stockin_id,</if>
|
||||
<if test="list[0].inType != null">in_type,</if>
|
||||
<if test="list[0].inClassId != null">in_class_id,</if>
|
||||
<if test="list[0].warehouseId != null">warehouse_id,</if>
|
||||
<if test="list[0].stackingId != null">stacking_id,</if>
|
||||
<if test="list[0].spare1 != null">spare1,</if>
|
||||
<if test="list[0].spare2 != null">spare2,</if>
|
||||
<if test="list[0].spare3 != null">spare3,</if>
|
||||
<if test="list[0].spare4 != null">spare4,</if>
|
||||
<if test="list[0].spare5 != null">spare5,</if>
|
||||
<if test="list[0].spare6 != null">spare6,</if>
|
||||
</trim>
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="item.stockId != null and item.stockId != ''">#{item.stockId},</if>
|
||||
<if test="item.cargoSpaceId != null">#{item.cargoSpaceId},</if>
|
||||
<if test="item.stockStatus != null">#{item.stockStatus},</if>
|
||||
<if test="item.productStatus != null">#{item.productStatus},</if>
|
||||
<if test="item.lotNo != null">#{item.lotNo},</if>
|
||||
<if test="item.inDate != null">#{item.inDate},</if>
|
||||
<if test="item.backDate != null">#{item.backDate},</if>
|
||||
<if test="item.productGuid != null">#{item.productGuid},</if>
|
||||
<if test="item.quantity != null">#{item.quantity},</if>
|
||||
<if test="item.jobId != null">#{item.jobId},</if>
|
||||
<if test="item.trayCode != null">#{item.trayCode},</if>
|
||||
<if test="item.outQuantity != null">#{item.outQuantity},</if>
|
||||
<if test="item.stockinDetailId != null">#{item.stockinDetailId},</if>
|
||||
<if test="item.stockinId != null">#{item.stockinId},</if>
|
||||
<if test="item.inType != null">#{item.inType},</if>
|
||||
<if test="item.inClassId != null">#{item.inClassId},</if>
|
||||
<if test="item.warehouseId != null">#{item.warehouseId},</if>
|
||||
<if test="item.stackingId != null">#{item.stackingId},</if>
|
||||
<if test="item.spare1 != null">#{item.spare1},</if>
|
||||
<if test="item.spare2 != null">#{item.spare2},</if>
|
||||
<if test="item.spare3 != null">#{item.spare3},</if>
|
||||
<if test="item.spare4 != null">#{item.spare4},</if>
|
||||
<if test="item.spare5 != null">#{item.spare5},</if>
|
||||
<if test="item.spare6 != null">#{item.spare6},</if>
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasStock" parameterType="BasStock">
|
||||
update bas_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>
|
||||
</trim>
|
||||
where stock_id = #{stockId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasStockByStockId" parameterType="String">
|
||||
delete from bas_stock where stock_id = #{stockId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasStockByStockIds" parameterType="String">
|
||||
delete from bas_stock where stock_id in
|
||||
<foreach item="stockId" collection="array" open="(" separator="," close=")">
|
||||
#{stockId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user