盘点自动分配 盘出作业手动作废

This commit is contained in:
liuhanqing
2025-10-22 16:07:29 +08:00
parent 1483019e1f
commit 937a8da316
18 changed files with 1300 additions and 172 deletions

View File

@@ -0,0 +1,104 @@
package com.ruoyi.check.productAndStock.controller;
import java.util.List;
import jakarta.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.check.productAndStock.domain.ViewProductAndStockPd;
import com.ruoyi.check.productAndStock.service.IViewProductAndStockPdService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* productAndStockController
*
* @author ruoyi
* @date 2025-10-22
*/
@RestController
@RequestMapping("/check/ProductAndStockPd")
public class ViewProductAndStockPdController extends BaseController
{
@Autowired
private IViewProductAndStockPdService viewProductAndStockPdService;
/**
* 查询productAndStock列表
*/
@PreAuthorize("@ss.hasPermi('check:check:list')")
@GetMapping("/list")
public TableDataInfo list(ViewProductAndStockPd viewProductAndStockPd)
{
startPage();
List<ViewProductAndStockPd> list = viewProductAndStockPdService.selectViewProductAndStockPdList(viewProductAndStockPd);
return getDataTable(list);
}
/**
* 导出productAndStock列表
*/
@PreAuthorize("@ss.hasPermi('check:check:export')")
@Log(title = "productAndStock", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ViewProductAndStockPd viewProductAndStockPd)
{
List<ViewProductAndStockPd> list = viewProductAndStockPdService.selectViewProductAndStockPdList(viewProductAndStockPd);
ExcelUtil<ViewProductAndStockPd> util = new ExcelUtil<ViewProductAndStockPd>(ViewProductAndStockPd.class);
util.exportExcel(response, list, "productAndStock数据");
}
/**
* 获取productAndStock详细信息
*/
@PreAuthorize("@ss.hasPermi('check:check:query')")
@GetMapping(value = "/{productId}")
public AjaxResult getInfo(@PathVariable("productId") String productId)
{
return success(viewProductAndStockPdService.selectViewProductAndStockPdByProductId(productId));
}
/**
* 新增productAndStock
*/
@PreAuthorize("@ss.hasPermi('check:check:add')")
@Log(title = "productAndStock", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ViewProductAndStockPd viewProductAndStockPd)
{
return toAjax(viewProductAndStockPdService.insertViewProductAndStockPd(viewProductAndStockPd));
}
/**
* 修改productAndStock
*/
@PreAuthorize("@ss.hasPermi('check:check:edit')")
@Log(title = "productAndStock", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ViewProductAndStockPd viewProductAndStockPd)
{
return toAjax(viewProductAndStockPdService.updateViewProductAndStockPd(viewProductAndStockPd));
}
/**
* 删除productAndStock
*/
@PreAuthorize("@ss.hasPermi('check:check:remove')")
@Log(title = "productAndStock", businessType = BusinessType.DELETE)
@DeleteMapping("/{productIds}")
public AjaxResult remove(@PathVariable String[] productIds)
{
return toAjax(viewProductAndStockPdService.deleteViewProductAndStockPdByProductIds(productIds));
}
}

View File

@@ -0,0 +1,429 @@
package com.ruoyi.check.productAndStock.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;
/**
* productAndStock对象 view_product_and_stock_pd
*
* @author ruoyi
* @date 2025-10-22
*/
public class ViewProductAndStockPd extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Long onlyIdentity;
/** */
@Excel(name = "")
private String productId;
/** */
@Excel(name = "")
private String lotNo;
/** */
@Excel(name = "")
private String productName;
/** */
@Excel(name = "")
private String quantity;
/** */
@Excel(name = "")
private String warehouseId;
/** */
@Excel(name = "")
private String spare1;
/** */
@Excel(name = "")
private String spare3;
/** */
@Excel(name = "")
private String spare4;
/** */
@Excel(name = "")
private String spare5;
/** */
@Excel(name = "")
private String spare6;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String voltage;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String power;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String phase;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String distribution;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String orderId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare8;
/** */
@Excel(name = "")
private String price;
/** */
@Excel(name = "")
private String cargoNo;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String productStatus;
/** */
@Excel(name = "")
private String parentId;
/** */
@Excel(name = "")
private String spare7;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String createSys;
/** */
@Excel(name = "")
private String spec;
/** */
@Excel(name = "")
private String unit;
/** */
@Excel(name = "")
private String supplierName;
/** */
@Excel(name = "")
private String checkFlag;
public void setOnlyIdentity(Long onlyIdentity)
{
this.onlyIdentity = onlyIdentity;
}
public Long getOnlyIdentity()
{
return onlyIdentity;
}
public void setProductId(String productId)
{
this.productId = productId;
}
public String getProductId()
{
return productId;
}
public void setLotNo(String lotNo)
{
this.lotNo = lotNo;
}
public String getLotNo()
{
return lotNo;
}
public void setProductName(String productName)
{
this.productName = productName;
}
public String getProductName()
{
return productName;
}
public void setQuantity(String quantity)
{
this.quantity = quantity;
}
public String getQuantity()
{
return quantity;
}
public void setWarehouseId(String warehouseId)
{
this.warehouseId = warehouseId;
}
public String getWarehouseId()
{
return warehouseId;
}
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
{
return spare1;
}
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 setVoltage(String voltage)
{
this.voltage = voltage;
}
public String getVoltage()
{
return voltage;
}
public void setPower(String power)
{
this.power = power;
}
public String getPower()
{
return power;
}
public void setPhase(String phase)
{
this.phase = phase;
}
public String getPhase()
{
return phase;
}
public void setDistribution(String distribution)
{
this.distribution = distribution;
}
public String getDistribution()
{
return distribution;
}
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getOrderId()
{
return orderId;
}
public void setSpare8(String spare8)
{
this.spare8 = spare8;
}
public String getSpare8()
{
return spare8;
}
public void setPrice(String price)
{
this.price = price;
}
public String getPrice()
{
return price;
}
public void setCargoNo(String cargoNo)
{
this.cargoNo = cargoNo;
}
public String getCargoNo()
{
return cargoNo;
}
public void setProductStatus(String productStatus)
{
this.productStatus = productStatus;
}
public String getProductStatus()
{
return productStatus;
}
public void setParentId(String parentId)
{
this.parentId = parentId;
}
public String getParentId()
{
return parentId;
}
public void setSpare7(String spare7)
{
this.spare7 = spare7;
}
public String getSpare7()
{
return spare7;
}
public void setCreateSys(String createSys)
{
this.createSys = createSys;
}
public String getCreateSys()
{
return createSys;
}
public void setSpec(String spec)
{
this.spec = spec;
}
public String getSpec()
{
return spec;
}
public void setUnit(String unit)
{
this.unit = unit;
}
public String getUnit()
{
return unit;
}
public void setSupplierName(String supplierName)
{
this.supplierName = supplierName;
}
public String getSupplierName()
{
return supplierName;
}
public void setCheckFlag(String checkFlag)
{
this.checkFlag = checkFlag;
}
public String getCheckFlag()
{
return checkFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("onlyIdentity", getOnlyIdentity())
.append("productId", getProductId())
.append("lotNo", getLotNo())
.append("productName", getProductName())
.append("quantity", getQuantity())
.append("warehouseId", getWarehouseId())
.append("spare1", getSpare1())
.append("spare3", getSpare3())
.append("spare4", getSpare4())
.append("spare5", getSpare5())
.append("spare6", getSpare6())
.append("voltage", getVoltage())
.append("power", getPower())
.append("phase", getPhase())
.append("distribution", getDistribution())
.append("orderId", getOrderId())
.append("spare8", getSpare8())
.append("price", getPrice())
.append("cargoNo", getCargoNo())
.append("productStatus", getProductStatus())
.append("parentId", getParentId())
.append("spare7", getSpare7())
.append("createTime", getCreateTime())
.append("createSys", getCreateSys())
.append("spec", getSpec())
.append("unit", getUnit())
.append("supplierName", getSupplierName())
.append("checkFlag", getCheckFlag())
.toString();
}
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.check.productAndStock.mapper;
import java.util.List;
import com.ruoyi.check.productAndStock.domain.ViewProductAndStockPd;
/**
* productAndStockMapper接口
*
* @author ruoyi
* @date 2025-10-22
*/
public interface ViewProductAndStockPdMapper
{
/**
* 查询productAndStock
*
* @param productId productAndStock主键
* @return productAndStock
*/
public ViewProductAndStockPd selectViewProductAndStockPdByProductId(String productId);
/**
* 查询productAndStock列表
*
* @param viewProductAndStockPd productAndStock
* @return productAndStock集合
*/
public List<ViewProductAndStockPd> selectViewProductAndStockPdList(ViewProductAndStockPd viewProductAndStockPd);
/**
* 新增productAndStock
*
* @param viewProductAndStockPd productAndStock
* @return 结果
*/
public int insertViewProductAndStockPd(ViewProductAndStockPd viewProductAndStockPd);
/**
* 修改productAndStock
*
* @param viewProductAndStockPd productAndStock
* @return 结果
*/
public int updateViewProductAndStockPd(ViewProductAndStockPd viewProductAndStockPd);
/**
* 删除productAndStock
*
* @param productId productAndStock主键
* @return 结果
*/
public int deleteViewProductAndStockPdByProductId(String productId);
/**
* 批量删除productAndStock
*
* @param productIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteViewProductAndStockPdByProductIds(String[] productIds);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.check.productAndStock.service;
import java.util.List;
import com.ruoyi.check.productAndStock.domain.ViewProductAndStockPd;
/**
* productAndStockService接口
*
* @author ruoyi
* @date 2025-10-22
*/
public interface IViewProductAndStockPdService
{
/**
* 查询productAndStock
*
* @param productId productAndStock主键
* @return productAndStock
*/
public ViewProductAndStockPd selectViewProductAndStockPdByProductId(String productId);
/**
* 查询productAndStock列表
*
* @param viewProductAndStockPd productAndStock
* @return productAndStock集合
*/
public List<ViewProductAndStockPd> selectViewProductAndStockPdList(ViewProductAndStockPd viewProductAndStockPd);
/**
* 新增productAndStock
*
* @param viewProductAndStockPd productAndStock
* @return 结果
*/
public int insertViewProductAndStockPd(ViewProductAndStockPd viewProductAndStockPd);
/**
* 修改productAndStock
*
* @param viewProductAndStockPd productAndStock
* @return 结果
*/
public int updateViewProductAndStockPd(ViewProductAndStockPd viewProductAndStockPd);
/**
* 批量删除productAndStock
*
* @param productIds 需要删除的productAndStock主键集合
* @return 结果
*/
public int deleteViewProductAndStockPdByProductIds(String[] productIds);
/**
* 删除productAndStock信息
*
* @param productId productAndStock主键
* @return 结果
*/
public int deleteViewProductAndStockPdByProductId(String productId);
}

View File

@@ -0,0 +1,93 @@
package com.ruoyi.check.productAndStock.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.check.productAndStock.mapper.ViewProductAndStockPdMapper;
import com.ruoyi.check.productAndStock.domain.ViewProductAndStockPd;
import com.ruoyi.check.productAndStock.service.IViewProductAndStockPdService;
/**
* productAndStockService业务层处理
*
* @author ruoyi
* @date 2025-10-22
*/
@Service
public class ViewProductAndStockPdServiceImpl implements IViewProductAndStockPdService
{
@Autowired
private ViewProductAndStockPdMapper viewProductAndStockPdMapper;
/**
* 查询productAndStock
*
* @param productId productAndStock主键
* @return productAndStock
*/
@Override
public ViewProductAndStockPd selectViewProductAndStockPdByProductId(String productId)
{
return viewProductAndStockPdMapper.selectViewProductAndStockPdByProductId(productId);
}
/**
* 查询productAndStock列表
*
* @param viewProductAndStockPd productAndStock
* @return productAndStock
*/
@Override
public List<ViewProductAndStockPd> selectViewProductAndStockPdList(ViewProductAndStockPd viewProductAndStockPd)
{
return viewProductAndStockPdMapper.selectViewProductAndStockPdList(viewProductAndStockPd);
}
/**
* 新增productAndStock
*
* @param viewProductAndStockPd productAndStock
* @return 结果
*/
@Override
public int insertViewProductAndStockPd(ViewProductAndStockPd viewProductAndStockPd)
{
return viewProductAndStockPdMapper.insertViewProductAndStockPd(viewProductAndStockPd);
}
/**
* 修改productAndStock
*
* @param viewProductAndStockPd productAndStock
* @return 结果
*/
@Override
public int updateViewProductAndStockPd(ViewProductAndStockPd viewProductAndStockPd)
{
return viewProductAndStockPdMapper.updateViewProductAndStockPd(viewProductAndStockPd);
}
/**
* 批量删除productAndStock
*
* @param productIds 需要删除的productAndStock主键
* @return 结果
*/
@Override
public int deleteViewProductAndStockPdByProductIds(String[] productIds)
{
return viewProductAndStockPdMapper.deleteViewProductAndStockPdByProductIds(productIds);
}
/**
* 删除productAndStock信息
*
* @param productId productAndStock主键
* @return 结果
*/
@Override
public int deleteViewProductAndStockPdByProductId(String productId)
{
return viewProductAndStockPdMapper.deleteViewProductAndStockPdByProductId(productId);
}
}

View File

@@ -166,5 +166,7 @@ public class CheckStockinDetail extends BaseEntity
private ExtraField extraField;
private String supplierName;
}

View File

@@ -0,0 +1,34 @@
package com.ruoyi.job.mydojob.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.job.mydojob.domain.MydoJob;
import com.ruoyi.job.mydojob.service.IMydoJobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/job/checkMydoJob")
public class CheckMydoJobController {
@Autowired
private IMydoJobService mydoJobService;
/**
* 盘出作业手动作废任务表
*/
@PreAuthorize("@ss.hasAnyPermi('job:checkMydoJob:OuthandFinish')")
@Log(title = "任务表", businessType = BusinessType.DELETE)
@PostMapping("/manualInvalidation")
public AjaxResult manualInvalidation(@RequestBody MydoJob mydoJob)
{
return mydoJobService.manualInvalidationCheckMydoJob(mydoJob);
}
}

View File

@@ -107,4 +107,8 @@ public interface IMydoJobService
MydoJob selectMydoJobByTrayCode(String trayCode);
MydoJob selectMydoJobByEntranceId(MydoJob mydoJob);
AjaxResult manualInvalidationCheckMydoJob(MydoJob mydoJob);
AjaxResult manualCompletedCheckMydoJob(MydoJob mydoJob, int i);
}

View File

@@ -13,6 +13,8 @@ import com.ruoyi.bas.warehouse.domain.BasWarehouse;
import com.ruoyi.bas.warehouse.service.IBasWarehouseService;
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
import com.ruoyi.check.difference.service.ICheckDifferenceRecordService;
import com.ruoyi.check.stockcheckdetail.domain.CheckStockinDetail;
import com.ruoyi.check.stockcheckdetail.service.ICheckStockinDetailService;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils;
@@ -66,6 +68,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
@Autowired
private IInStockinDetailService inStockinDetailService;
@Autowired
private ICheckStockinDetailService checkStockinDetailService;
@Autowired
private IBasStockService basStockService;
@Autowired
private IOutStockoutDetailService outStockoutDetailService;
@@ -270,6 +274,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
//生成盘点待审批库存
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "2");
stockByInStockinDetail.setSpare7("1");
stockByInStockinDetail.setBackDate(DateUtil.formatDateTime(DateUtil.date()));
list.add(stockByInStockinDetail);
//修改异常记录中的库存id
CheckDifferenceRecord checkDifferenceRecord = first.get();
@@ -279,6 +284,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
} else {
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
stockByInStockinDetail.setSpare7("1");
stockByInStockinDetail.setBackDate(DateUtil.formatDateTime(DateUtil.date()));
//正常库存
list.add(stockByInStockinDetail);
}
@@ -392,8 +398,6 @@ public class MydoJobServiceImpl implements IMydoJobService {
stock.setVoltage(mydoJobDetail.getSpare2());
stock.setPower(mydoJobDetail.getSpare7());
stock.setPhase(mydoJobDetail.getSupplierId());
stock.setNetWeight(mydoJobDetail.getSpec());
stock.setGrossWeight(mydoJobDetail.getStackingId());
stock.setDistribution(mydoJobDetail.getSpare9());
stock.setModel(mydoJobDetail.getUnit());
stock.setOrderId(mydoJobDetail.getSpare6());
@@ -511,4 +515,48 @@ public class MydoJobServiceImpl implements IMydoJobService {
public MydoJob selectMydoJobByEntranceId(MydoJob mydoJob) {
return mydoJobMapper.selectMydoJobByEntranceId(mydoJob);
}
@Override
public AjaxResult manualInvalidationCheckMydoJob(MydoJob mydoJob) {
String jobId = mydoJob.getJobId();
MydoJob job = selectMydoJobByJobId(jobId);
if (job == null) {
return AjaxResult.warn("任务不存在");
}
if (!"1".equals(job.getStatus())) {
return AjaxResult.warn("只能作废未开始的任务");
}
MydoJobDetail param = new MydoJobDetail();
param.setJobId(jobId);
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
String inOrOutDId = mydoJobDetail.getInOrOutDId();
CheckStockinDetail checkStockinDetail = checkStockinDetailService.selectCheckStockinDetailByStockCheckDetailId(inOrOutDId);
BigDecimal stockInNum = Convert.toBigDecimal(checkStockinDetail.getScanNum());
BigDecimal jobOutNum = Convert.toBigDecimal(mydoJobDetail.getOutQuantity());
BigDecimal subtract = stockInNum.subtract(jobOutNum);
checkStockinDetail.setScanNum(Convert.toStr(subtract));
checkStockinDetailService.updateCheckStockinDetail(checkStockinDetail);
}
//修改货位状态
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
basCargoSpace.setStatus("1");
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
mydoJob.setStatus("5");
mydoJob.setFinishTime(DateUtil.formatDateTime(new Date()));
updateMydoJob(mydoJob);
//插入历史表
insertHistory(mydoJob.getJobId());
//通知wcs
AjaxResult ajaxResult = iToWcsService.cancelTaskByTaskNo(job.getTaskNo());
log.info("取消任务结果:{}", ajaxResult);
return AjaxResult.success();
}
@Override
public AjaxResult manualCompletedCheckMydoJob(MydoJob mydoJob, int i) {
return null;
}
}

View File

@@ -89,20 +89,17 @@ public class PdaServiceImp implements PdaService {
@Override
public AjaxResult outMakeSure(TrayCodeMakeSure trayCodeMakeSure) {
String trayCode = trayCodeMakeSure.getTrayCode();
String[] split = trayCode.split(" ");
String productId = split[8].substring(10);
MydoJob mydoJob = new MydoJob();
mydoJob.setExitId(trayCodeMakeSure.getExitId());
mydoJob.setProductId(productId);
mydoJob.setStatus("3");
mydoJob.setInOrOut("21");
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailListByExit(mydoJob);
if(mydoJobDetails.size()==0){
MydoJob mydoJobParam = new MydoJob();
//mydoJobParam.setExitId(trayCodeMakeSure.getExitId());
mydoJobParam.setTrayCode(trayCodeMakeSure.getTrayCode());
mydoJobParam.setStatus("3");
mydoJobParam.setInOrOut("21");
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailListByExit(mydoJobParam);
if(mydoJobDetails.isEmpty()){
return AjaxResult.error("该物料没有出库作业,请检查");
}
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", mydoJobDetails.get(0).getTrayCode());
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
pdaMapper.outMakeSure(map);
String result = map.get("v_result").toString();
if ("10".equals(result)) {

View File

@@ -41,23 +41,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="spare9" column="spare9" />
<result property="productName" column="product_name" />
<result property="orderId" column="order_id" />
<result property="supplierName" column="supplier_name" />
</resultMap>
<sql id="selectCheckStockinDetailVo">
select csd.stock_check_detail_id, csd.stock_check_guid, csd.stock_check_id, csd.lot_no, csd.product_guid, csd.product_id,
csd.quantity, csd.quantity_x, csd.quantity_j, csd.price, csd.cargo_no, csd.remark, csd.assign_num, csd.assign_num_x,
csd.assign_num_j, csd.print_date, csd.stock_status, csd.supplier_id, csd.customer_id, csd.unit, csd.spec,
csd.quantity, csd.quantity_x, csd.quantity_j, csd.remark, csd.assign_num, csd.assign_num_x,
csd.assign_num_j, csd.print_date, csd.stock_status, csd.supplier_id, csd.customer_id,
csd.scan_num, csd.scan_num_x, csd.scan_num_j, csd.spare1, csd.spare2, csd.spare3, csd.spare4,csd.spare5, csd.spare6,
bp.product_name,
bcs.cargo_space_name,
csd.spare7,
csd.spare8,
csd.spare9,
csd.order_id
csd.order_id,
bp.price ,
bp.unit ,
bp.cargo_no,
bp.spec,
bs.supplier_name
from check_stockin_detail csd
left join bas_product bp on csd.product_id = bp.product_id
left join bas_cargo_space bcs on csd.cargo_space_id = bcs.cargo_space_id
left join bas_supplier bs on csd.supplier_id = bs.supplier_no
</sql>
<select id="selectCheckStockinDetailList" parameterType="CheckStockinDetail" resultMap="CheckStockinDetailResult">

View File

@@ -0,0 +1,188 @@
<?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.check.productAndStock.mapper.ViewProductAndStockPdMapper">
<resultMap type="ViewProductAndStockPd" id="ViewProductAndStockPdResult">
<result property="onlyIdentity" column="only_identity" />
<result property="productId" column="product_id" />
<result property="lotNo" column="lot_no" />
<result property="productName" column="product_name" />
<result property="quantity" column="quantity" />
<result property="warehouseId" column="warehouse_id" />
<result property="spare1" column="spare1" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="voltage" column="voltage" />
<result property="power" column="power" />
<result property="phase" column="phase" />
<result property="distribution" column="distribution" />
<result property="orderId" column="order_id" />
<result property="spare8" column="spare8" />
<result property="price" column="price" />
<result property="cargoNo" column="cargo_no" />
<result property="productStatus" column="product_status" />
<result property="parentId" column="parent_id" />
<result property="spare7" column="spare7" />
<result property="createTime" column="create_time" />
<result property="createSys" column="create_sys" />
<result property="spec" column="spec" />
<result property="unit" column="unit" />
<result property="supplierName" column="supplier_name" />
<result property="checkFlag" column="check_flag" />
</resultMap>
<sql id="selectViewProductAndStockPdVo">
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, distribution, order_id, spare8, price, cargo_no, product_status, parent_id, spare7, create_time, create_sys, spec, unit, supplier_name, check_flag from view_product_and_stock_pd
</sql>
<select id="selectViewProductAndStockPdList" parameterType="ViewProductAndStockPd" resultMap="ViewProductAndStockPdResult">
<include refid="selectViewProductAndStockPdVo"/>
<where>
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</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="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="distribution != null and distribution != ''"> and distribution = #{distribution}</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
<if test="price != null and price != ''"> and price = #{price}</if>
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
<if test="productStatus != null and productStatus != ''"> and product_status = #{productStatus}</if>
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="createSys != null and createSys != ''"> and create_sys = #{createSys}</if>
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="checkFlag != null and checkFlag != ''"> and check_flag = #{checkFlag}</if>
</where>
</select>
<select id="selectViewProductAndStockPdByOnlyIdentity" parameterType="Long" resultMap="ViewProductAndStockPdResult">
<include refid="selectViewProductAndStockPdVo"/>
where only_identity = #{onlyIdentity}
</select>
<insert id="insertViewProductAndStockPd" parameterType="ViewProductAndStockPd">
insert into view_product_and_stock_pd
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="onlyIdentity != null">only_identity,</if>
<if test="productId != null">product_id,</if>
<if test="lotNo != null">lot_no,</if>
<if test="productName != null">product_name,</if>
<if test="quantity != null">quantity,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="spare1 != null">spare1,</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="voltage != null">voltage,</if>
<if test="power != null">power,</if>
<if test="phase != null">phase,</if>
<if test="distribution != null">distribution,</if>
<if test="orderId != null">order_id,</if>
<if test="spare8 != null">spare8,</if>
<if test="price != null">price,</if>
<if test="cargoNo != null">cargo_no,</if>
<if test="productStatus != null">product_status,</if>
<if test="parentId != null">parent_id,</if>
<if test="spare7 != null">spare7,</if>
<if test="createTime != null">create_time,</if>
<if test="createSys != null">create_sys,</if>
<if test="spec != null">spec,</if>
<if test="unit != null">unit,</if>
<if test="supplierName != null">supplier_name,</if>
<if test="checkFlag != null">check_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="onlyIdentity != null">#{onlyIdentity},</if>
<if test="productId != null">#{productId},</if>
<if test="lotNo != null">#{lotNo},</if>
<if test="productName != null">#{productName},</if>
<if test="quantity != null">#{quantity},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="spare1 != null">#{spare1},</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="voltage != null">#{voltage},</if>
<if test="power != null">#{power},</if>
<if test="phase != null">#{phase},</if>
<if test="distribution != null">#{distribution},</if>
<if test="orderId != null">#{orderId},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="price != null">#{price},</if>
<if test="cargoNo != null">#{cargoNo},</if>
<if test="productStatus != null">#{productStatus},</if>
<if test="parentId != null">#{parentId},</if>
<if test="spare7 != null">#{spare7},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createSys != null">#{createSys},</if>
<if test="spec != null">#{spec},</if>
<if test="unit != null">#{unit},</if>
<if test="supplierName != null">#{supplierName},</if>
<if test="checkFlag != null">#{checkFlag},</if>
</trim>
</insert>
<update id="updateViewProductAndStockPd" parameterType="ViewProductAndStockPd">
update view_product_and_stock_pd
<trim prefix="SET" suffixOverrides=",">
<if test="productId != null">product_id = #{productId},</if>
<if test="lotNo != null">lot_no = #{lotNo},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="spare1 != null">spare1 = #{spare1},</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="voltage != null">voltage = #{voltage},</if>
<if test="power != null">power = #{power},</if>
<if test="phase != null">phase = #{phase},</if>
<if test="distribution != null">distribution = #{distribution},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="price != null">price = #{price},</if>
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
<if test="productStatus != null">product_status = #{productStatus},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="spare7 != null">spare7 = #{spare7},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createSys != null">create_sys = #{createSys},</if>
<if test="spec != null">spec = #{spec},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
<if test="checkFlag != null">check_flag = #{checkFlag},</if>
</trim>
where only_identity = #{onlyIdentity}
</update>
<delete id="deleteViewProductAndStockPdByOnlyIdentity" parameterType="Long">
delete from view_product_and_stock_pd where only_identity = #{onlyIdentity}
</delete>
<delete id="deleteViewProductAndStockPdByOnlyIdentitys" parameterType="String">
delete from view_product_and_stock_pd where only_identity in
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
#{onlyIdentity}
</foreach>
</delete>
</mapper>