代码修改
This commit is contained in:
@@ -9,6 +9,7 @@ import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.domain.Material;
|
||||
import com.ruoyi.in.stockin.domain.vo.InstockInVo;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.in.stockinfinish.service.IInStockinFinishService;
|
||||
@@ -17,6 +18,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -116,4 +118,25 @@ public class InStockinController extends BaseController
|
||||
{
|
||||
return inStockinService.productBack(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入物料数据
|
||||
*/
|
||||
@Log(title = "物料管理", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file) throws Exception {
|
||||
ExcelUtil<Material> util = new ExcelUtil<>(Material.class);
|
||||
List<Material> materialList = util.importExcel(file.getInputStream());
|
||||
String message = inStockinService.importMaterial(materialList);
|
||||
return AjaxResult.success(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载模板
|
||||
*/
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil<Material> util = new ExcelUtil<>(Material.class);
|
||||
util.importTemplateExcel(response, "物料数据");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,16 @@ public class InStockin extends BaseEntity
|
||||
private String materialDesc;
|
||||
|
||||
private List<String> typeData;
|
||||
/*代号*/
|
||||
private String spare9;
|
||||
|
||||
public String getSpare9() {
|
||||
return spare9;
|
||||
}
|
||||
|
||||
public void setSpare9(String spare9) {
|
||||
this.spare9 = spare9;
|
||||
}
|
||||
|
||||
public List<String> getTypeData() {
|
||||
return typeData;
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.ruoyi.in.stockin.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 物料领用/来件对象(根据你的Excel字段生成)
|
||||
*/
|
||||
@Data
|
||||
public class Material extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 代号 */
|
||||
@Excel(name = "代号")
|
||||
private String code;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 单重 */
|
||||
@Excel(name = "单重")
|
||||
private BigDecimal singleWeight;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Integer quantity;
|
||||
|
||||
/** 实来数量 */
|
||||
@Excel(name = "实来数量")
|
||||
private Integer actualArriveQuantity;
|
||||
|
||||
/** 实领数量 */
|
||||
@Excel(name = "实领数量")
|
||||
private Integer actualReceiveQuantity;
|
||||
|
||||
/** 领件人 */
|
||||
@Excel(name = "领件人")
|
||||
private String receiver;
|
||||
|
||||
/** 领件日期 */
|
||||
@Excel(name = "领件日期", dateFormat = "yyyy-MM-dd")
|
||||
private Date receiveTime;
|
||||
|
||||
/** 存放地 */
|
||||
@Excel(name = "存放地")
|
||||
private String storageLocation;
|
||||
|
||||
/** 剩余数量 */
|
||||
@Excel(name = "剩余数量")
|
||||
private Integer remainQuantity;
|
||||
|
||||
/** 来件厂家 */
|
||||
@Excel(name = "来件厂家")
|
||||
private String supplier;
|
||||
|
||||
/** 来件日期 */
|
||||
@Excel(name = "来件日期", dateFormat = "yyyy-MM-dd")
|
||||
private Date arriveTime;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 路线 */
|
||||
@Excel(name = "路线")
|
||||
private String route;
|
||||
|
||||
/** 台次 */
|
||||
@Excel(name = "台次")
|
||||
private String tableNumber;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String projectName;
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.in.stockin.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.domain.Material;
|
||||
import com.ruoyi.in.stockin.domain.vo.InstockInVo;
|
||||
import com.ruoyi.search.ViewOutJobFlow.domain.ViewOutJobFlow;
|
||||
|
||||
@@ -75,4 +76,6 @@ public interface IInStockinService
|
||||
public List<InStockin> selectStockinByDetail(String stockinDetailId);
|
||||
|
||||
AjaxResult productBack(List<ViewOutJobFlow> list);
|
||||
|
||||
String importMaterial(List<Material> materialList);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.ruoyi.in.stockin.service.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@@ -13,6 +15,7 @@ import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.in.bind.domain.InStockTraycodeBindMsg;
|
||||
import com.ruoyi.in.bind.mapper.InStockTraycodeBindMsgMapper;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.domain.Material;
|
||||
import com.ruoyi.in.stockin.domain.vo.InstockInVo;
|
||||
import com.ruoyi.in.stockin.mapper.InStockinMapper;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
@@ -127,7 +130,7 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
//@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult insertInStockin(InstockInVo inStockinVo) {
|
||||
List<BasProduct> productVoList = inStockinVo.getProductVoList();
|
||||
if (CollUtil.isEmpty(productVoList)){
|
||||
@@ -159,7 +162,6 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
inStockin.setWarehouseId(inStockinVo.getWarehouseId());
|
||||
inStockin.setStatus("1");
|
||||
inStockin.setStockSource(inStockinVo.getStockSource());
|
||||
//inStockin.setSpare1(inStockinVo.getProductType());
|
||||
inStockin.setSpare5(inStockinVo.getRemark());
|
||||
inStockinMapper.insertInStockin(inStockin);
|
||||
for (int i = 1; i <= productVoList.size(); i++) {
|
||||
@@ -235,12 +237,9 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
if (CollUtil.isEmpty(oldBasStockList) && is4DigitNumber(inStockTraycodeBindMsg.getTrayCode())) {
|
||||
throw new RuntimeException(inStockTraycodeBindMsg.getTrayCode() + "尚未入库,查询不到库存");
|
||||
}
|
||||
//查询 合同号 产品号 代号 台次 物料编码 一致的老库存 进行数量合并
|
||||
//查询 代号物料编码 一致的老库存 进行数量合并
|
||||
Optional<BasStock> sameStock = oldBasStockList.stream().filter(x ->
|
||||
inStockinDetail.getSpare6().equals(x.getOrderId()) &&
|
||||
inStockinDetail.getSpare7().equals(x.getPower()) &&
|
||||
inStockinDetail.getSpare9().equals(x.getDistribution()) &&
|
||||
inStockinDetail.getSpare5().equals(x.getSpare5()) &&
|
||||
inStockinDetail.getProductId().equals(x.getProductId())
|
||||
).findFirst();
|
||||
if (sameStock.isPresent()) {
|
||||
@@ -275,7 +274,7 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
stock.setStockinDetailId(inStockinDetail.getStockinDetailId());
|
||||
stock.setInType(old.getInType());
|
||||
//stock.setLotNo(mydoJobDetail.getLotNo());
|
||||
stock.setProductName(inStockinDetail.getProductName());
|
||||
stock.setProductName(inStockinDetail.getSpare8());
|
||||
//合同号
|
||||
stock.setOrderId(inStockinDetail.getSpare6());
|
||||
//产品号
|
||||
@@ -286,6 +285,16 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
stock.setSpare5(inStockinDetail.getSpare5());
|
||||
//部门
|
||||
stock.setModel(SecurityUtils.getDeptId().toString());
|
||||
//存货名称
|
||||
stock.setProductName(inStockinDetail.getSpare8());
|
||||
//单重
|
||||
stock.setNetWeight(inStockinDetail.getSpare4());
|
||||
//路线
|
||||
stock.setGrossWeight(inStockinDetail.getSpare3());
|
||||
//供应商
|
||||
stock.setPhase(inStockinDetail.getSupplierId());
|
||||
stock.setRemark(inStockinDetail.getRemark());
|
||||
|
||||
basStockList.add(stock);
|
||||
}
|
||||
}
|
||||
@@ -440,4 +449,49 @@ public class InStockinServiceImpl implements IInStockinService
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String importMaterial(List<Material> materialList) {
|
||||
//未到货
|
||||
List<Material> list1 = materialList.stream().filter(x -> ObjUtil.isNull(x.getActualArriveQuantity())).toList();
|
||||
//生成入库单据
|
||||
String warehouseId = null;
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
List<SysRole> roles = loginUser.getUser().getRoles();
|
||||
if (CollUtil.isEmpty(roles)) {
|
||||
//如果未设置角色 ,直接返回空列表
|
||||
return "未设置角色";
|
||||
}
|
||||
//入库需要查看本部门任务
|
||||
Optional<SysRole> first = roles.stream().filter(x -> "role1".equals(x.getRoleKey()) || "role3".equals(x.getRoleKey())).findFirst();
|
||||
if (first.isPresent()) {
|
||||
//二联合普通人员
|
||||
warehouseId= "02";
|
||||
}
|
||||
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey()) || "role4".equals(x.getRoleKey())).findFirst();
|
||||
if (first1.isPresent()) {
|
||||
//三联合普通人员
|
||||
warehouseId= "01";
|
||||
}
|
||||
for (Material material : list1) {
|
||||
InstockInVo inStockinVo = new InstockInVo();
|
||||
inStockinVo.setStockSource("1");
|
||||
inStockinVo.setInType("1");
|
||||
inStockinVo.setWarehouseId(warehouseId);
|
||||
List<BasProduct> list = new ArrayList<>();
|
||||
BasProduct basProduct = new BasProduct();
|
||||
basProduct.setProductId(material.getCode());
|
||||
basProduct.setSpare9(material.getCode());
|
||||
basProduct.setSpare8(material.getName());
|
||||
basProduct.setSpare4(Convert.toStr(material.getSingleWeight()));
|
||||
basProduct.setQuantity(material.getQuantity());
|
||||
basProduct.setSpare3(material.getRoute());
|
||||
basProduct.setSpare5(material.getTableNumber());
|
||||
basProduct.setSupplierId(material.getSupplier());
|
||||
list.add(basProduct);
|
||||
inStockinVo.setProductVoList(list);
|
||||
insertInStockin(inStockinVo);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class InStockinDetail extends BaseEntity
|
||||
/** 子单ID */
|
||||
private String stockinDetailId;
|
||||
|
||||
/** 主单GUID */
|
||||
/** 主单GUID inStockinDetail*/
|
||||
@Excel(name = "主单GUID")
|
||||
private String stockinGuid;
|
||||
|
||||
|
||||
@@ -494,7 +494,6 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
stock.setStockStatus("1");
|
||||
stock.setOutQuantity("0");
|
||||
stock.setProductStatus(productStatus);
|
||||
stock.setLotNo(mydoJobDetail.getLotNo());
|
||||
stock.setInDate(DateUtil.formatDateTime(new Date()));
|
||||
stock.setProductGuid(mydoJobDetail.getProductGuid());
|
||||
stock.setQuantity(mydoJobDetail.getInQuantity());
|
||||
@@ -506,20 +505,14 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
stock.setStockinDetailId(mydoJobDetail.getInOrOutDId());
|
||||
stock.setInType(mydoJob.getInOrOut());
|
||||
stock.setLotNo(mydoJobDetail.getLotNo());
|
||||
stock.setProductName(mydoJobDetail.getProductName());
|
||||
stock.setSpare1(mydoJobDetail.getSpare1());
|
||||
stock.setSpare3(mydoJobDetail.getSpare3());
|
||||
stock.setSpare4(mydoJobDetail.getSpare4());
|
||||
stock.setSpare5(mydoJobDetail.getSpare5());
|
||||
stock.setSpare6(mydoJobDetail.getPrintDate());
|
||||
stock.setSpare8(mydoJobDetail.getSpare8());
|
||||
stock.setVoltage(mydoJobDetail.getSpare2());
|
||||
stock.setPower(mydoJobDetail.getSpare7());
|
||||
stock.setPhase(mydoJobDetail.getSupplierId());
|
||||
stock.setDistribution(mydoJobDetail.getSpare9());
|
||||
stock.setInClassId(mydoJobDetail.getUnit());
|
||||
stock.setProductName(mydoJobDetail.getSpare1());
|
||||
stock.setOrderId(mydoJobDetail.getSpare6());
|
||||
//stock.setNetWeight(mydoJob.getLineId());
|
||||
stock.setPower(mydoJobDetail.getSpare7());
|
||||
stock.setDistribution(mydoJobDetail.getSpare9());
|
||||
stock.setSpare5(mydoJobDetail.getSpare5());
|
||||
stock.setNetWeight(mydoJobDetail.getSpare2());
|
||||
stock.setGrossWeight(mydoJobDetail.getSpare3());
|
||||
stock.setPhase(mydoJobDetail.getSupplierId());
|
||||
return stock;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,8 +137,8 @@ public class OutStockoutController extends BaseController {
|
||||
@Log(title = "出库主单状态改变", businessType = BusinessType.OTHER)
|
||||
@RequestMapping("/changeStatus")
|
||||
@ResponseBody
|
||||
public String changeStatus(@RequestParam("stockoutIds") String[] stockoutIds, @RequestParam("status") String status,@RequestParam("newStatus")String newStatus,@RequestParam(value = "exitId",required = false)String exitId) {
|
||||
String s = outStockoutService.updateOutStockoutStatus(stockoutIds, status, newStatus,exitId);
|
||||
public String changeStatus(@RequestParam("stockoutIds") String[] stockoutIds, @RequestParam("status") String status,@RequestParam("newStatus")String newStatus,@RequestParam(value = "exitId",required = false)String exitId,@RequestParam(value = "pickUser",required = false)String pickUser) {
|
||||
String s = outStockoutService.updateOutStockoutStatus(stockoutIds, status, newStatus,exitId,pickUser);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public interface IOutStockoutService
|
||||
*/
|
||||
public String saveBill(OutStockoutVo outStockoutVo);
|
||||
|
||||
public String updateOutStockoutStatus(String[] stockoutIds, String status,String newStatus,String exitId);
|
||||
public String updateOutStockoutStatus(String[] stockoutIds, String status,String newStatus,String exitId,String pickUser);
|
||||
|
||||
AjaxResult autoAllot(String stockoutId);
|
||||
|
||||
|
||||
@@ -129,13 +129,11 @@ public class OutStockoutServiceImpl implements IOutStockoutService {
|
||||
outStockout.setStockoutId(stockOutId);
|
||||
outStockout.setStockoutGuid(UUID.randomUUID().toString());
|
||||
outStockout.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
|
||||
String username = SecurityContextHolder.getContext().getAuthentication().getName();
|
||||
outStockout.setCreateManId(username);
|
||||
outStockout.setStatus("1");
|
||||
outStockout.setStockoutSource(outStockoutVo.getOutStockout().getStockoutSource());
|
||||
try {
|
||||
if ("1".equals(outStockoutVo.getOutStockout().getStockoutSource())) {
|
||||
outStockout.setCreateManId(com.ruoyi.common.core.text.Convert.toStr(SecurityUtils.getUserId()));
|
||||
outStockout.setCreateManId(Convert.toStr(SecurityUtils.getUserId()));
|
||||
outStockout.setDepartmentNo(Convert.toStr(SecurityUtils.getDeptId()));
|
||||
} else if ("2".equals(outStockoutVo.getOutStockout().getStockoutSource())) {
|
||||
outStockout.setCreateManId("1");
|
||||
@@ -164,7 +162,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String updateOutStockoutStatus(String[] stockoutIds, String status, String newStatus, String exitId) {
|
||||
public String updateOutStockoutStatus(String[] stockoutIds, String status, String newStatus, String exitId,String pickUser) {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (String stockoutId : stockoutIds) {
|
||||
@@ -173,6 +171,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService {
|
||||
map.put("newStatus", newStatus);
|
||||
map.put("exitId", exitId);
|
||||
map.put("userName", SecurityUtils.getUsername());
|
||||
map.put("pickUser", pickUser);
|
||||
outStockoutMapper.updateOutStockoutStatus(map);
|
||||
stringBuilder.append(",").append(map.get("v_resultString"));
|
||||
}
|
||||
|
||||
@@ -153,11 +153,11 @@ public class OutStockoutDetail
|
||||
|
||||
/** 净重 */
|
||||
@Excel(name = "净重")
|
||||
private BigDecimal netWeight;
|
||||
private String netWeight;
|
||||
|
||||
/** 毛重 */
|
||||
@Excel(name = "毛重")
|
||||
private BigDecimal grossWeight;
|
||||
private String grossWeight;
|
||||
|
||||
/** 分销 */
|
||||
@Excel(name = "分销")
|
||||
@@ -313,19 +313,19 @@ public class OutStockoutDetail
|
||||
this.phase = phase;
|
||||
}
|
||||
|
||||
public BigDecimal getNetWeight() {
|
||||
public String getNetWeight() {
|
||||
return netWeight;
|
||||
}
|
||||
|
||||
public void setNetWeight(BigDecimal netWeight) {
|
||||
public void setNetWeight(String netWeight) {
|
||||
this.netWeight = netWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getGrossWeight() {
|
||||
public String getGrossWeight() {
|
||||
return grossWeight;
|
||||
}
|
||||
|
||||
public void setGrossWeight(BigDecimal grossWeight) {
|
||||
public void setGrossWeight(String grossWeight) {
|
||||
this.grossWeight = grossWeight;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 库存物资Controller
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-12
|
||||
* @date 2026-03-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/productAndStock")
|
||||
@@ -45,17 +45,6 @@ public class ViewProductAndStockController extends BaseController
|
||||
List<ViewProductAndStock> list = viewProductAndStockService.selectViewProductAndStockList(viewProductAndStock);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询库存物资列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:productAndStock:list')")
|
||||
@GetMapping("/pd/list")
|
||||
public TableDataInfo pdList(ViewProductAndStock viewProductAndStock)
|
||||
{
|
||||
startPage();
|
||||
List<ViewProductAndStock> list = viewProductAndStockService.selectViewProductAndStockPdList(viewProductAndStock);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出库存物资列表
|
||||
|
||||
@@ -7,394 +7,194 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 库存物资对象 view_product_and_stock
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-21
|
||||
* @date 2026-03-25
|
||||
*/
|
||||
public class ViewProductAndStock
|
||||
public class ViewProductAndStock extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 序号 */
|
||||
@Excel(name = "序号")
|
||||
/** id */
|
||||
@Excel(name = "id")
|
||||
private Long onlyIdentity;
|
||||
|
||||
/** 物料编码 */
|
||||
@Excel(name = "物料编码")
|
||||
private String productId;
|
||||
|
||||
/** 批次 */
|
||||
@Excel(name = "批次")
|
||||
private String lotNo;
|
||||
|
||||
/** 物料名称 */
|
||||
@Excel(name = "物料名称")
|
||||
private String productName;
|
||||
|
||||
/** 库存数量 */
|
||||
@Excel(name = "库存数量")
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private String quantity;
|
||||
|
||||
/** 仓库 */
|
||||
@Excel(name = "仓库")
|
||||
/** 仓库id */
|
||||
@Excel(name = "仓库id")
|
||||
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;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String voltage;
|
||||
|
||||
/** 件次 */
|
||||
@Excel(name = "件次")
|
||||
private String power;
|
||||
|
||||
/** 供应商 */
|
||||
// @Excel(name = "供应商")
|
||||
private String phase;
|
||||
|
||||
private String supplierName;
|
||||
|
||||
/** 管理号 */
|
||||
@Excel(name = "管理号")
|
||||
private String distribution;
|
||||
|
||||
/** 合同号 */
|
||||
@Excel(name = "合同号")
|
||||
private String orderId;
|
||||
|
||||
/** 质量等级 */
|
||||
@Excel(name = "质量等级")
|
||||
private String spare8;
|
||||
/** 产品号 */
|
||||
@Excel(name = "产品号")
|
||||
private String power;
|
||||
|
||||
/** 单价 */
|
||||
@Excel(name = "单价")
|
||||
private String price;
|
||||
/** 代号 */
|
||||
@Excel(name = "代号")
|
||||
private String distribution;
|
||||
|
||||
/** 图号 */
|
||||
@Excel(name = "图号")
|
||||
private String cargoNo;
|
||||
/** 台次 */
|
||||
@Excel(name = "台次")
|
||||
private String spare5;
|
||||
|
||||
/** 物料状态 */
|
||||
@Excel(name = "物料状态")
|
||||
private String productStatus;
|
||||
/** 单重 */
|
||||
@Excel(name = "单重")
|
||||
private String netWeight;
|
||||
|
||||
/** 常用编码 */
|
||||
@Excel(name = "常用编码")
|
||||
private String parentId;
|
||||
/** 路线 */
|
||||
@Excel(name = "路线")
|
||||
private String grossWeight;
|
||||
|
||||
/** 启用标识 */
|
||||
@Excel(name = "启用标识")
|
||||
private String spare7;
|
||||
/** 供应商 */
|
||||
@Excel(name = "供应商")
|
||||
private String phase;
|
||||
|
||||
@Excel(name = "创建时间")
|
||||
private String createTime;
|
||||
/** 部门 */
|
||||
@Excel(name = "部门")
|
||||
private String model;
|
||||
|
||||
/** 创建用户 */
|
||||
@Excel(name = "创建用户")
|
||||
private String createSys;
|
||||
|
||||
/** 规格型号 */
|
||||
@Excel(name = "规格型号")
|
||||
private String spec;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseName;
|
||||
|
||||
public String getWarehouseName() {
|
||||
return warehouseName;
|
||||
}
|
||||
|
||||
public void setWarehouseName(String warehouseName) {
|
||||
this.warehouseName = warehouseName;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public void setOnlyIdentity(Long onlyIdentity)
|
||||
public void setOnlyIdentity(Long onlyIdentity)
|
||||
{
|
||||
this.onlyIdentity = onlyIdentity;
|
||||
}
|
||||
|
||||
public Long getOnlyIdentity()
|
||||
public Long getOnlyIdentity()
|
||||
{
|
||||
return onlyIdentity;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity)
|
||||
public void setQuantity(String quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getQuantity()
|
||||
public String getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
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)
|
||||
public void setOrderId(String orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getOrderId()
|
||||
public String getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setSpare8(String spare8)
|
||||
public void setPower(String power)
|
||||
{
|
||||
this.spare8 = spare8;
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public String getSpare8()
|
||||
public String getPower()
|
||||
{
|
||||
return spare8;
|
||||
return power;
|
||||
}
|
||||
|
||||
public void setPrice(String price)
|
||||
public void setDistribution(String distribution)
|
||||
{
|
||||
this.price = price;
|
||||
this.distribution = distribution;
|
||||
}
|
||||
|
||||
public String getPrice()
|
||||
public String getDistribution()
|
||||
{
|
||||
return price;
|
||||
return distribution;
|
||||
}
|
||||
|
||||
public void setCargoNo(String cargoNo)
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.cargoNo = cargoNo;
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getCargoNo()
|
||||
public String getSpare5()
|
||||
{
|
||||
return cargoNo;
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setProductStatus(String productStatus)
|
||||
public void setNetWeight(String netWeight)
|
||||
{
|
||||
this.productStatus = productStatus;
|
||||
this.netWeight = netWeight;
|
||||
}
|
||||
|
||||
public String getProductStatus()
|
||||
public String getNetWeight()
|
||||
{
|
||||
return productStatus;
|
||||
return netWeight;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId)
|
||||
public void setGrossWeight(String grossWeight)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
this.grossWeight = grossWeight;
|
||||
}
|
||||
|
||||
public String getParentId()
|
||||
public String getGrossWeight()
|
||||
{
|
||||
return parentId;
|
||||
return grossWeight;
|
||||
}
|
||||
|
||||
public void setSpare7(String spare7)
|
||||
public void setPhase(String phase)
|
||||
{
|
||||
this.spare7 = spare7;
|
||||
this.phase = phase;
|
||||
}
|
||||
|
||||
public String getSpare7()
|
||||
public String getPhase()
|
||||
{
|
||||
return spare7;
|
||||
return phase;
|
||||
}
|
||||
|
||||
public void setCreateSys(String createSys)
|
||||
public void setModel(String model)
|
||||
{
|
||||
this.createSys = createSys;
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getCreateSys()
|
||||
public String getModel()
|
||||
{
|
||||
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;
|
||||
return model;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -402,30 +202,17 @@ public class ViewProductAndStock
|
||||
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("power", getPower())
|
||||
.append("distribution", getDistribution())
|
||||
.append("spare5", getSpare5())
|
||||
.append("netWeight", getNetWeight())
|
||||
.append("grossWeight", getGrossWeight())
|
||||
.append("phase", getPhase())
|
||||
.append("model", getModel())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
|
||||
/**
|
||||
* 库存物资Mapper接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-12
|
||||
* @date 2026-03-25
|
||||
*/
|
||||
public interface ViewProductAndStockMapper
|
||||
public interface ViewProductAndStockMapper
|
||||
{
|
||||
/**
|
||||
* 查询库存物资
|
||||
*
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 库存物资
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ public interface ViewProductAndStockMapper
|
||||
|
||||
/**
|
||||
* 查询库存物资列表
|
||||
*
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 库存物资集合
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ public interface ViewProductAndStockMapper
|
||||
|
||||
/**
|
||||
* 新增库存物资
|
||||
*
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ public interface ViewProductAndStockMapper
|
||||
|
||||
/**
|
||||
* 修改库存物资
|
||||
*
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public interface ViewProductAndStockMapper
|
||||
|
||||
/**
|
||||
* 删除库存物资
|
||||
*
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -53,11 +53,9 @@ public interface ViewProductAndStockMapper
|
||||
|
||||
/**
|
||||
* 批量删除库存物资
|
||||
*
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentitys(Long[] onlyIdentitys);
|
||||
|
||||
List<ViewProductAndStock> selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock);
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ import com.ruoyi.out.productAndStock.domain.ViewProductAndStock;
|
||||
|
||||
/**
|
||||
* 库存物资Service接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-12
|
||||
* @date 2026-03-25
|
||||
*/
|
||||
public interface IViewProductAndStockService
|
||||
public interface IViewProductAndStockService
|
||||
{
|
||||
/**
|
||||
* 查询库存物资
|
||||
*
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 库存物资
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ public interface IViewProductAndStockService
|
||||
|
||||
/**
|
||||
* 查询库存物资列表
|
||||
*
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 库存物资集合
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ public interface IViewProductAndStockService
|
||||
|
||||
/**
|
||||
* 新增库存物资
|
||||
*
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ public interface IViewProductAndStockService
|
||||
|
||||
/**
|
||||
* 修改库存物资
|
||||
*
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public interface IViewProductAndStockService
|
||||
|
||||
/**
|
||||
* 批量删除库存物资
|
||||
*
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的库存物资主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -53,11 +53,9 @@ public interface IViewProductAndStockService
|
||||
|
||||
/**
|
||||
* 删除库存物资信息
|
||||
*
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity);
|
||||
|
||||
List<ViewProductAndStock> selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock);
|
||||
}
|
||||
|
||||
@@ -9,19 +9,19 @@ import com.ruoyi.out.productAndStock.service.IViewProductAndStockService;
|
||||
|
||||
/**
|
||||
* 库存物资Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-12
|
||||
* @date 2026-03-25
|
||||
*/
|
||||
@Service
|
||||
public class ViewProductAndStockServiceImpl implements IViewProductAndStockService
|
||||
public class ViewProductAndStockServiceImpl implements IViewProductAndStockService
|
||||
{
|
||||
@Autowired
|
||||
private ViewProductAndStockMapper viewProductAndStockMapper;
|
||||
|
||||
/**
|
||||
* 查询库存物资
|
||||
*
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 库存物资
|
||||
*/
|
||||
@@ -33,7 +33,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
|
||||
/**
|
||||
* 查询库存物资列表
|
||||
*
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 库存物资
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
|
||||
/**
|
||||
* 新增库存物资
|
||||
*
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -57,7 +57,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
|
||||
/**
|
||||
* 修改库存物资
|
||||
*
|
||||
*
|
||||
* @param viewProductAndStock 库存物资
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -69,7 +69,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
|
||||
/**
|
||||
* 批量删除库存物资
|
||||
*
|
||||
*
|
||||
* @param onlyIdentitys 需要删除的库存物资主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -81,7 +81,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
|
||||
/**
|
||||
* 删除库存物资信息
|
||||
*
|
||||
*
|
||||
* @param onlyIdentity 库存物资主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -90,10 +90,4 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi
|
||||
{
|
||||
return viewProductAndStockMapper.deleteViewProductAndStockByOnlyIdentity(onlyIdentity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ViewProductAndStock> selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock) {
|
||||
return viewProductAndStockMapper.selectViewProductAndStockPdList(viewProductAndStock);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,8 +85,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="materialDesc !=null and materialDesc!=''">
|
||||
and is2.stockin_id in (
|
||||
select distinct stockin_id from in_stockin_detail isd
|
||||
left join bas_product bp on isd.product_id = bp.product_id
|
||||
where bp.product_name like concat('%',#{materialDesc},'%')
|
||||
where isd.spare8 like concat('%',#{materialDesc},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="spare9 !=null and spare9!=''">
|
||||
and is2.stockin_id in (
|
||||
select stockin_id from in_stockin_detail isd
|
||||
where isd.spare9 like concat('%',#{spare9},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="lotNo !=null and lotNo!=''">
|
||||
|
||||
@@ -40,7 +40,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
left join out_stockout_detail d on d.stockout_id = o.stockout_id
|
||||
left join bas_customer bc on bc.customer_no = d.out_id
|
||||
left join bas_warehouse bw on bw.warehouse_id = d.warehouse_id
|
||||
left join bas_supplier bs on bs.supplier_no = d.supplier_id
|
||||
left join bas_product bp on bp.product_id = d.product_id
|
||||
left join sys_user su on su.user_id = o.create_man_id
|
||||
<where>
|
||||
@@ -157,6 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{newStatus,mode=IN,jdbcType=VARCHAR},
|
||||
#{exitId,mode=IN,jdbcType=VARCHAR},
|
||||
#{userName,mode=IN,jdbcType=VARCHAR},
|
||||
#{pickUser,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=VARCHAR},
|
||||
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
|
||||
)
|
||||
|
||||
@@ -3,74 +3,46 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.out.productAndStock.mapper.ViewProductAndStockMapper">
|
||||
|
||||
|
||||
<resultMap type="ViewProductAndStock" id="ViewProductAndStockResult">
|
||||
<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="warehouseName" column="warehouse_name" />
|
||||
<result property="power" column="power" />
|
||||
<result property="distribution" column="distribution" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="netWeight" column="net_weight" />
|
||||
<result property="grossWeight" column="gross_weight" />
|
||||
<result property="phase" column="phase" />
|
||||
<result property="model" column="model" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectViewProductAndStockVo">
|
||||
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,warehouse_name from view_product_and_stock
|
||||
select only_identity, product_id, product_name, quantity, warehouse_id, order_id, power, distribution, spare5, net_weight, gross_weight, phase, model from view_product_and_stock
|
||||
</sql>
|
||||
|
||||
<select id="selectViewProductAndStockList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult">
|
||||
<include refid="selectViewProductAndStockVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id like concat('%', #{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 like concat('%',#{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 like concat('%',#{power}, '%')</if>
|
||||
<if test="phase != null and phase != ''"> and phase like concat('%',#{phase}, '%')</if>
|
||||
<if test="distribution != null and distribution != ''"> and distribution like concat('%', #{distribution}, '%')</if>
|
||||
<if test="orderId != null and orderId != ''"> and order_id like concat('%', #{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 like concat('%', #{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 like concat('%', #{createSys}, '%')</if>
|
||||
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
|
||||
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
|
||||
|
||||
<if test="power != null and power != ''"> and power = #{power}</if>
|
||||
<if test="distribution != null and distribution != ''"> and distribution like concat('%', #{distribution}, '%')</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
<if test="netWeight != null and netWeight != ''"> and net_weight = #{netWeight}</if>
|
||||
<if test="grossWeight != null and grossWeight != ''"> and gross_weight = #{grossWeight}</if>
|
||||
<if test="phase != null and phase != ''"> and phase = #{phase}</if>
|
||||
<if test="model != null and model != ''"> and model = #{model}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectViewProductAndStockByOnlyIdentity" parameterType="Long" resultMap="ViewProductAndStockResult">
|
||||
<include refid="selectViewProductAndStockVo"/>
|
||||
where only_identity = #{onlyIdentity}
|
||||
@@ -81,60 +53,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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="power != null">power,</if>
|
||||
<if test="distribution != null">distribution,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="netWeight != null">net_weight,</if>
|
||||
<if test="grossWeight != null">gross_weight,</if>
|
||||
<if test="phase != null">phase,</if>
|
||||
<if test="model != null">model,</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="power != null">#{power},</if>
|
||||
<if test="distribution != null">#{distribution},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="netWeight != null">#{netWeight},</if>
|
||||
<if test="grossWeight != null">#{grossWeight},</if>
|
||||
<if test="phase != null">#{phase},</if>
|
||||
<if test="model != null">#{model},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -142,31 +86,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
update view_product_and_stock
|
||||
<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="power != null">power = #{power},</if>
|
||||
<if test="distribution != null">distribution = #{distribution},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="netWeight != null">net_weight = #{netWeight},</if>
|
||||
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
|
||||
<if test="phase != null">phase = #{phase},</if>
|
||||
<if test="model != null">model = #{model},</if>
|
||||
</trim>
|
||||
where only_identity = #{onlyIdentity}
|
||||
</update>
|
||||
@@ -176,9 +106,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteViewProductAndStockByOnlyIdentitys" parameterType="String">
|
||||
delete from view_product_and_stock where only_identity in
|
||||
delete from view_product_and_stock where only_identity in
|
||||
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
|
||||
#{onlyIdentity}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
@@ -67,29 +67,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
bs.cargo_space_id, --库位编码
|
||||
bs.tray_code, --托盘
|
||||
bs.product_id, --产品编码
|
||||
bp.product_name,--产品名称
|
||||
bp.spec, -- 规格
|
||||
bs.product_name,--产品名称
|
||||
bs.quantity, -- 数量
|
||||
bs.spare6, -- 金额
|
||||
bp.price, --单价
|
||||
bp.spare1 as productType, --产品状态
|
||||
bp.unit, -- 单位
|
||||
bp.cargo_no, --图号
|
||||
bs.order_id, --合同号
|
||||
bs.spare5, --台次
|
||||
bs.power, --件次
|
||||
bs.spare8, --质量
|
||||
bp.parent_id, --常用编码
|
||||
bs.stockin_id, --入库单号
|
||||
bs2.supplier_name, --供应商名称
|
||||
bs2.supplier_no, --供应商编号
|
||||
bs.phase as supplier_name, --供应商名称
|
||||
bw.warehouse_id, --仓库编码
|
||||
bw.warehouse_name, --仓库名称
|
||||
bs.in_date, --入库时间
|
||||
bs.stacking_id, --出库时间
|
||||
bs.spare7, --盘点标识
|
||||
bs.back_date, --盘点时间
|
||||
bp.remark, --备注
|
||||
bs.stock_id, --库存编码
|
||||
bs.stock_status, --库存状态
|
||||
bs.lot_no, --批次号
|
||||
@@ -98,13 +90,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
bs.spare1, --用途
|
||||
bs.distribution, --用途
|
||||
bs.model, --用途
|
||||
bcs.the_type as net_weight, --重量
|
||||
bs.stockin_detail_id --入库子单
|
||||
bs.net_weight , --重量
|
||||
bs.stockin_detail_id, --入库子单
|
||||
bs.gross_weight--路线
|
||||
from bas_stock bs
|
||||
left join bas_product bp on bs.product_id = bp.product_id
|
||||
left join bas_warehouse bw on bs.warehouse_id = bw.warehouse_id
|
||||
left join bas_cargo_space bcs on bs.cargo_space_id = bcs.cargo_space_id
|
||||
left join bas_supplier bs2 on bs.phase = bs2.supplier_no
|
||||
</sql>
|
||||
|
||||
<select id="selectBasStockList" parameterType="BasStock" resultMap="BasStockResult">
|
||||
@@ -151,14 +142,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="theFloor != null and theFloor != ''"> and bcs.the_floor = #{theFloor}</if>
|
||||
<if test="thePlatoon != null and thePlatoon != ''"> and bcs.the_platoon = #{thePlatoon}</if>
|
||||
<if test="theColumn != null and theColumn != ''"> and bcs.the_column = #{theColumn}</if>
|
||||
<if test="spec != null and spec != ''"> and bp.spec = #{spec}</if>
|
||||
<if test="parentId != null and parentId != ''"> and bp.parent_id = #{parentId}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and bs2.supplier_no = #{supplierId}</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and bs2.supplier_name = #{supplierName}</if>
|
||||
<if test="price != null and price != ''"> and bp.price = #{price}</if>
|
||||
<if test="inDateStart != null and inDateStart != ''"> and bs.in_date >= #{inDateStart}</if>
|
||||
<if test="inDateEnd != null and inDateEnd != ''"> and bs.in_date <= #{inDateEnd}</if>
|
||||
<if test="productType != null and productType != ''"> and bp.spare1 = #{productType}</if>
|
||||
|
||||
|
||||
</where>
|
||||
|
||||
Reference in New Issue
Block a user