物料管理

This commit is contained in:
猫猫guowen
2025-09-17 14:17:06 +08:00
parent 3ccbef0ea0
commit 080b4a3b7f
9 changed files with 1589 additions and 291 deletions

View File

@@ -22,10 +22,10 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 物料信息Controller
* 物料管理Controller
*
* @author gw
* @date 2025-09-11
* @date 2025-09-17
*/
@RestController
@RequestMapping("/bas/BasProduct")
@@ -35,7 +35,7 @@ public class BasProductController extends BaseController
private IBasProductService basProductService;
/**
* 查询物料信息列表
* 查询物料管理列表
*/
@PreAuthorize("@ss.hasPermi('bas:BasProduct:list')")
@GetMapping("/list")
@@ -47,20 +47,20 @@ public class BasProductController extends BaseController
}
/**
* 导出物料信息列表
* 导出物料管理列表
*/
@PreAuthorize("@ss.hasPermi('bas:BasProduct:export')")
@Log(title = "物料信息", businessType = BusinessType.EXPORT)
@Log(title = "物料管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BasProduct basProduct)
{
List<BasProduct> list = basProductService.selectBasProductList(basProduct);
ExcelUtil<BasProduct> util = new ExcelUtil<BasProduct>(BasProduct.class);
util.exportExcel(response, list, "物料信息数据");
util.exportExcel(response, list, "物料管理数据");
}
/**
* 获取物料信息详细信息
* 获取物料管理详细信息
*/
@PreAuthorize("@ss.hasPermi('bas:BasProduct:query')")
@GetMapping(value = "/{productGuid}")
@@ -70,10 +70,10 @@ public class BasProductController extends BaseController
}
/**
* 新增物料信息
* 新增物料管理
*/
@PreAuthorize("@ss.hasPermi('bas:BasProduct:add')")
@Log(title = "物料信息", businessType = BusinessType.INSERT)
@Log(title = "物料管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BasProduct basProduct)
{
@@ -81,10 +81,10 @@ public class BasProductController extends BaseController
}
/**
* 修改物料信息
* 修改物料管理
*/
@PreAuthorize("@ss.hasPermi('bas:BasProduct:edit')")
@Log(title = "物料信息", businessType = BusinessType.UPDATE)
@Log(title = "物料管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BasProduct basProduct)
{
@@ -92,10 +92,10 @@ public class BasProductController extends BaseController
}
/**
* 删除物料信息
* 删除物料管理
*/
@PreAuthorize("@ss.hasPermi('bas:BasProduct:remove')")
@Log(title = "物料信息", businessType = BusinessType.DELETE)
@Log(title = "物料管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{productGuids}")
public AjaxResult remove(@PathVariable String[] productGuids)
{

View File

@@ -1,22 +1,16 @@
package com.ruoyi.bas.BasProduct.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
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_product
*
* 物料管理对象 bas_product
*
* @author gw
* @date 2025-09-11
* @date 2025-09-17
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BasProduct extends BaseEntity
{
private static final long serialVersionUID = 1L;
@@ -28,34 +22,42 @@ public class BasProduct extends BaseEntity
@Excel(name = "物料编码")
private String productId;
/** 物料名称 */
@Excel(name = "物料名称")
private String productName;
/** 产品分类 */
@Excel(name = "产品分类")
private String parentId;
/** 序列号 */
@Excel(name = "序列号")
private String spare4;
/** 品号描述 */
@Excel(name = "品号描述")
private String price;
/** 相位 */
@Excel(name = "相位")
private String spare7;
/** 英文描述 */
@Excel(name = "英文描述")
private String cargoNo;
/** 图号 */
@Excel(name = "图号")
private String unit;
/** 规格 */
@Excel(name = "规格")
private String spec;
/** 型号 */
@Excel(name = "型号")
private String spare1;
/** 净重 */
@Excel(name = "净重")
/** 单件净重 */
@Excel(name = "单件净重")
private String spare2;
/** 毛重 */
@Excel(name = "毛重")
private String spare8;
/** 颜色 */
@Excel(name = "颜色")
private String spare3;
/** 序列号 */
@Excel(name = "序列号")
private String spare4;
/** 电压 */
@Excel(name = "电压")
private String spare5;
@@ -64,27 +66,663 @@ public class BasProduct extends BaseEntity
@Excel(name = "功率")
private String spare6;
/** $column.columnComment */
private String parentId;
/** 物料名称 */
@Excel(name = "物料名称")
private String productName;
/** $column.columnComment */
private String price;
/** 相位 */
@Excel(name = "相位")
private String spare7;
/** $column.columnComment */
private String cargoNo;
/** 毛重 */
@Excel(name = "毛重")
private String spare8;
/** $column.columnComment */
private String unit;
/** $column.columnComment */
private String spec;
/** $column.columnComment */
/** NC号 */
@Excel(name = "NC号")
private String spare9;
private String quantity;
/** 电源线 */
@Excel(name = "电源线")
private String spare10;
private String lotNo;
/** 插头 */
@Excel(name = "插头")
private String spare11;
/** 接嘴 */
@Excel(name = "接嘴")
private String spare12;
/** 快捷码 */
@Excel(name = "快捷码")
private String spare13;
/** 库存单位编号 */
@Excel(name = "库存单位编号")
private String spare14;
/** 库存单位名称 */
@Excel(name = "库存单位名称")
private String spare15;
/** 品号群组 */
@Excel(name = "品号群组")
private String spare16;
/** 归类品 */
@Excel(name = "归类品")
private String spare17;
/** 计量体系 */
@Excel(name = "计量体系")
private String spare18;
/** 群组名称 */
@Excel(name = "群组名称")
private String spare19;
/** 批号管理 */
@Excel(name = "批号管理")
private String spare20;
/** 状态 */
@Excel(name = "状态")
private String spare21;
/** 产品大类 */
@Excel(name = "产品大类")
private String spare22;
/** 产品二类 */
@Excel(name = "产品二类")
private String spare23;
/** 产品线/产品系列(组码) */
@Excel(name = "产品线/产品系列", readConverterExp = "组=码")
private String spare24;
/** BOM状态(组码) */
@Excel(name = "BOM状态", readConverterExp = "组=码")
private String spare25;
/** 产品定位(组码) */
@Excel(name = "产品定位", readConverterExp = "组=码")
private String spare26;
/** 电脑板型号(组码) */
@Excel(name = "电脑板型号", readConverterExp = "组=码")
private String spare27;
/** 非标要求 */
@Excel(name = "非标要求")
private String spare28;
/** 品牌(组码) */
@Excel(name = "品牌", readConverterExp = "组=码")
private String spare29;
/** 非标颜色 */
@Excel(name = "非标颜色")
private String spare30;
/** 主颜色 */
@Excel(name = "主颜色")
private String spare31;
/** 辅助颜色 */
@Excel(name = "辅助颜色")
private String spare32;
/** 是否标准款(组码) */
@Excel(name = "是否标准款", readConverterExp = "组=码")
private String spare33;
/** 包装方式 */
@Excel(name = "包装方式")
private String spare34;
/** 主要包装方式 */
@Excel(name = "主要包装方式")
private String spare35;
/** 长 */
@Excel(name = "长")
private String spare36;
/** 宽 */
@Excel(name = "宽")
private String spare37;
/** 高 */
@Excel(name = "高")
private String spare38;
/** 包装材积 */
@Excel(name = "包装材积")
private String spare39;
public void setProductGuid(String productGuid)
{
this.productGuid = productGuid;
}
public String getProductGuid()
{
return productGuid;
}
public void setProductId(String productId)
{
this.productId = productId;
}
public String getProductId()
{
return productId;
}
public void setParentId(String parentId)
{
this.parentId = parentId;
}
public String getParentId()
{
return parentId;
}
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 setUnit(String unit)
{
this.unit = unit;
}
public String getUnit()
{
return unit;
}
public void setSpec(String spec)
{
this.spec = spec;
}
public String getSpec()
{
return spec;
}
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
{
return spare1;
}
public void setSpare2(String spare2)
{
this.spare2 = spare2;
}
public String getSpare2()
{
return spare2;
}
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
{
return spare3;
}
public void setSpare4(String spare4)
{
this.spare4 = spare4;
}
public String getSpare4()
{
return spare4;
}
public void setSpare5(String spare5)
{
this.spare5 = spare5;
}
public String getSpare5()
{
return spare5;
}
public void setSpare6(String spare6)
{
this.spare6 = spare6;
}
public String getSpare6()
{
return spare6;
}
public void setProductName(String productName)
{
this.productName = productName;
}
public String getProductName()
{
return productName;
}
public void setSpare7(String spare7)
{
this.spare7 = spare7;
}
public String getSpare7()
{
return spare7;
}
public void setSpare8(String spare8)
{
this.spare8 = spare8;
}
public String getSpare8()
{
return spare8;
}
public void setSpare9(String spare9)
{
this.spare9 = spare9;
}
public String getSpare9()
{
return spare9;
}
public void setSpare10(String spare10)
{
this.spare10 = spare10;
}
public String getSpare10()
{
return spare10;
}
public void setSpare11(String spare11)
{
this.spare11 = spare11;
}
public String getSpare11()
{
return spare11;
}
public void setSpare12(String spare12)
{
this.spare12 = spare12;
}
public String getSpare12()
{
return spare12;
}
public void setSpare13(String spare13)
{
this.spare13 = spare13;
}
public String getSpare13()
{
return spare13;
}
public void setSpare14(String spare14)
{
this.spare14 = spare14;
}
public String getSpare14()
{
return spare14;
}
public void setSpare15(String spare15)
{
this.spare15 = spare15;
}
public String getSpare15()
{
return spare15;
}
public void setSpare16(String spare16)
{
this.spare16 = spare16;
}
public String getSpare16()
{
return spare16;
}
public void setSpare17(String spare17)
{
this.spare17 = spare17;
}
public String getSpare17()
{
return spare17;
}
public void setSpare18(String spare18)
{
this.spare18 = spare18;
}
public String getSpare18()
{
return spare18;
}
public void setSpare19(String spare19)
{
this.spare19 = spare19;
}
public String getSpare19()
{
return spare19;
}
public void setSpare20(String spare20)
{
this.spare20 = spare20;
}
public String getSpare20()
{
return spare20;
}
public void setSpare21(String spare21)
{
this.spare21 = spare21;
}
public String getSpare21()
{
return spare21;
}
public void setSpare22(String spare22)
{
this.spare22 = spare22;
}
public String getSpare22()
{
return spare22;
}
public void setSpare23(String spare23)
{
this.spare23 = spare23;
}
public String getSpare23()
{
return spare23;
}
public void setSpare24(String spare24)
{
this.spare24 = spare24;
}
public String getSpare24()
{
return spare24;
}
public void setSpare25(String spare25)
{
this.spare25 = spare25;
}
public String getSpare25()
{
return spare25;
}
public void setSpare26(String spare26)
{
this.spare26 = spare26;
}
public String getSpare26()
{
return spare26;
}
public void setSpare27(String spare27)
{
this.spare27 = spare27;
}
public String getSpare27()
{
return spare27;
}
public void setSpare28(String spare28)
{
this.spare28 = spare28;
}
public String getSpare28()
{
return spare28;
}
public void setSpare29(String spare29)
{
this.spare29 = spare29;
}
public String getSpare29()
{
return spare29;
}
public void setSpare30(String spare30)
{
this.spare30 = spare30;
}
public String getSpare30()
{
return spare30;
}
public void setSpare31(String spare31)
{
this.spare31 = spare31;
}
public String getSpare31()
{
return spare31;
}
public void setSpare32(String spare32)
{
this.spare32 = spare32;
}
public String getSpare32()
{
return spare32;
}
public void setSpare33(String spare33)
{
this.spare33 = spare33;
}
public String getSpare33()
{
return spare33;
}
public void setSpare34(String spare34)
{
this.spare34 = spare34;
}
public String getSpare34()
{
return spare34;
}
public void setSpare35(String spare35)
{
this.spare35 = spare35;
}
public String getSpare35()
{
return spare35;
}
public void setSpare36(String spare36)
{
this.spare36 = spare36;
}
public String getSpare36()
{
return spare36;
}
public void setSpare37(String spare37)
{
this.spare37 = spare37;
}
public String getSpare37()
{
return spare37;
}
public void setSpare38(String spare38)
{
this.spare38 = spare38;
}
public String getSpare38()
{
return spare38;
}
public void setSpare39(String spare39)
{
this.spare39 = spare39;
}
public String getSpare39()
{
return spare39;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("productGuid", getProductGuid())
.append("productId", getProductId())
.append("parentId", getParentId())
.append("price", getPrice())
.append("cargoNo", getCargoNo())
.append("unit", getUnit())
.append("spec", getSpec())
.append("remark", getRemark())
.append("spare1", getSpare1())
.append("spare2", getSpare2())
.append("spare3", getSpare3())
.append("spare4", getSpare4())
.append("spare5", getSpare5())
.append("spare6", getSpare6())
.append("productName", getProductName())
.append("spare7", getSpare7())
.append("spare8", getSpare8())
.append("spare9", getSpare9())
.append("spare10", getSpare10())
.append("spare11", getSpare11())
.append("spare12", getSpare12())
.append("spare13", getSpare13())
.append("spare14", getSpare14())
.append("spare15", getSpare15())
.append("spare16", getSpare16())
.append("spare17", getSpare17())
.append("spare18", getSpare18())
.append("spare19", getSpare19())
.append("spare20", getSpare20())
.append("spare21", getSpare21())
.append("spare22", getSpare22())
.append("spare23", getSpare23())
.append("spare24", getSpare24())
.append("spare25", getSpare25())
.append("spare26", getSpare26())
.append("spare27", getSpare27())
.append("spare28", getSpare28())
.append("spare29", getSpare29())
.append("spare30", getSpare30())
.append("spare31", getSpare31())
.append("spare32", getSpare32())
.append("spare33", getSpare33())
.append("spare34", getSpare34())
.append("spare35", getSpare35())
.append("spare36", getSpare36())
.append("spare37", getSpare37())
.append("spare38", getSpare38())
.append("spare39", getSpare39())
.toString();
}
}

View File

@@ -4,55 +4,56 @@ import java.util.List;
import com.ruoyi.bas.BasProduct.domain.BasProduct;
/**
* 物料信息Mapper接口
* 物料管理Mapper接口
*
* @author gw
* @date 2025-09-11
* @date 2025-09-17
*/
public interface BasProductMapper
{
/**
* 查询物料信息
* 查询物料管理
*
* @param productGuid 物料信息主键
* @return 物料信息
* @param productGuid 物料管理主键
* @return 物料管理
*/
public BasProduct selectBasProductByProductGuid(String productGuid);
public BasProduct selectBasProductByProductId(String productId);
/**
* 查询物料信息列表
* 查询物料管理列表
*
* @param basProduct 物料信息
* @return 物料信息集合
* @param basProduct 物料管理
* @return 物料管理集合
*/
public List<BasProduct> selectBasProductList(BasProduct basProduct);
/**
* 新增物料信息
* 新增物料管理
*
* @param basProduct 物料信息
* @param basProduct 物料管理
* @return 结果
*/
public int insertBasProduct(BasProduct basProduct);
/**
* 修改物料信息
* 修改物料管理
*
* @param basProduct 物料信息
* @param basProduct 物料管理
* @return 结果
*/
public int updateBasProduct(BasProduct basProduct);
/**
* 删除物料信息
* 删除物料管理
*
* @param productGuid 物料信息主键
* @param productGuid 物料管理主键
* @return 结果
*/
public int deleteBasProductByProductGuid(String productGuid);
/**
* 批量删除物料信息
* 批量删除物料管理
*
* @param productGuids 需要删除的数据主键集合
* @return 结果

View File

@@ -4,62 +4,62 @@ import java.util.List;
import com.ruoyi.bas.BasProduct.domain.BasProduct;
/**
* 物料信息Service接口
*
* 物料管理Service接口
*
* @author gw
* @date 2025-09-11
* @date 2025-09-17
*/
public interface IBasProductService
{
/**
* 查询物料信息
*
* @param productGuid 物料信息主键
* @return 物料信息
* 查询物料管理
*
* @param productGuid 物料管理主键
* @return 物料管理
*/
public BasProduct selectBasProductByProductGuid(String productGuid);
public BasProduct selectBasProductByProductId(String productId);
List<BasProduct> selectBasProductListByProductIds(List<String> productIds);
/**
* 查询物料信息列表
*
* @param basProduct 物料信息
* @return 物料信息集合
* 查询物料管理列表
*
* @param basProduct 物料管理
* @return 物料管理集合
*/
public List<BasProduct> selectBasProductList(BasProduct basProduct);
/**
* 新增物料信息
*
* @param basProduct 物料信息
* 新增物料管理
*
* @param basProduct 物料管理
* @return 结果
*/
public int insertBasProduct(BasProduct basProduct);
/**
* 修改物料信息
*
* @param basProduct 物料信息
* 修改物料管理
*
* @param basProduct 物料管理
* @return 结果
*/
public int updateBasProduct(BasProduct basProduct);
/**
* 批量删除物料信息
*
* @param productGuids 需要删除的物料信息主键集合
* 批量删除物料管理
*
* @param productGuids 需要删除的物料管理主键集合
* @return 结果
*/
public int deleteBasProductByProductGuids(String[] productGuids);
/**
* 删除物料信息信息
*
* @param productGuid 物料信息主键
* 删除物料管理信息
*
* @param productGuid 物料管理主键
* @return 结果
*/
public int deleteBasProductByProductGuid(String productGuid);
BasProduct selectBasProductByProductId(String productId);
List<BasProduct> selectBasProductListByProductIds(List<String> collect);
}

View File

@@ -1,8 +1,6 @@
package com.ruoyi.bas.BasProduct.service.impl;
import java.util.List;
import cn.hutool.core.util.IdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bas.BasProduct.mapper.BasProductMapper;
@@ -10,22 +8,22 @@ import com.ruoyi.bas.BasProduct.domain.BasProduct;
import com.ruoyi.bas.BasProduct.service.IBasProductService;
/**
* 物料信息Service业务层处理
*
* 物料管理Service业务层处理
*
* @author gw
* @date 2025-09-11
* @date 2025-09-17
*/
@Service
public class BasProductServiceImpl implements IBasProductService
public class BasProductServiceImpl implements IBasProductService
{
@Autowired
private BasProductMapper basProductMapper;
/**
* 查询物料信息
*
* @param productGuid 物料信息主键
* @return 物料信息
* 查询物料管理
*
* @param productGuid 物料管理主键
* @return 物料管理
*/
@Override
public BasProduct selectBasProductByProductGuid(String productGuid)
@@ -33,11 +31,23 @@ public class BasProductServiceImpl implements IBasProductService
return basProductMapper.selectBasProductByProductGuid(productGuid);
}
@Override
public BasProduct selectBasProductByProductId(String productId)
{
return basProductMapper.selectBasProductByProductId(productId);
}
@Override
public List<BasProduct> selectBasProductListByProductIds(List<String> productIds)
{
return null;
}
/**
* 查询物料信息列表
*
* @param basProduct 物料信息
* @return 物料信息
* 查询物料管理列表
*
* @param basProduct 物料管理
* @return 物料管理
*/
@Override
public List<BasProduct> selectBasProductList(BasProduct basProduct)
@@ -46,22 +56,22 @@ public class BasProductServiceImpl implements IBasProductService
}
/**
* 新增物料信息
*
* @param basProduct 物料信息
* 新增物料管理
*
* @param basProduct 物料管理
* @return 结果
*/
@Override
public int insertBasProduct(BasProduct basProduct)
{
basProduct.setProductGuid(IdUtil.fastSimpleUUID());
basProduct.setProductGuid(basProduct.getProductId());
return basProductMapper.insertBasProduct(basProduct);
}
/**
* 修改物料信息
*
* @param basProduct 物料信息
* 修改物料管理
*
* @param basProduct 物料管理
* @return 结果
*/
@Override
@@ -71,9 +81,9 @@ public class BasProductServiceImpl implements IBasProductService
}
/**
* 批量删除物料信息
*
* @param productGuids 需要删除的物料信息主键
* 批量删除物料管理
*
* @param productGuids 需要删除的物料管理主键
* @return 结果
*/
@Override
@@ -83,9 +93,9 @@ public class BasProductServiceImpl implements IBasProductService
}
/**
* 删除物料信息信息
*
* @param productGuid 物料信息主键
* 删除物料管理信息
*
* @param productGuid 物料管理主键
* @return 结果
*/
@Override
@@ -93,14 +103,4 @@ public class BasProductServiceImpl implements IBasProductService
{
return basProductMapper.deleteBasProductByProductGuid(productGuid);
}
@Override
public BasProduct selectBasProductByProductId(String productId) {
return null;
}
@Override
public List<BasProduct> selectBasProductListByProductIds(List<String> collect) {
return List.of();
}
}

View File

@@ -181,8 +181,8 @@ public class ReceiveStockinServiceImpl implements IReceiveStockinService
List<BasProduct> result = iBasProductService.selectBasProductListByProductIds(collect);
for (BasProduct basProduct : result) {
Optional<ReceiveProductVo> first = list.stream().filter(x -> x.getProductId().equals(basProduct.getProductId())).findFirst();
first.ifPresent(receiveProductVo -> basProduct.setQuantity(receiveProductVo.getQuantity()));
first.ifPresent(receiveProductVo -> basProduct.setLotNo(receiveProductVo.getLotNo()));
// first.ifPresent(receiveProductVo -> basProduct.setQuantity(receiveProductVo.getQuantity()));
// first.ifPresent(receiveProductVo -> basProduct.setLotNo(receiveProductVo.getLotNo()));
first.ifPresent(receiveProductVo -> basProduct.setSpare3(receiveProductVo.getCartonNo()));
first.ifPresent(receiveProductVo -> basProduct.setSpare4(receiveProductVo.getPackingMethod()));
}

View File

@@ -7,41 +7,107 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="BasProduct" id="BasProductResult">
<result property="productGuid" column="product_guid" />
<result property="productId" column="product_id" />
<result property="productName" column="product_name" />
<result property="spare4" column="spare4" />
<result property="spare7" column="spare7" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare8" column="spare8" />
<result property="spare3" column="spare3" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="remark" column="remark" />
<result property="parentId" column="parent_id" />
<result property="price" column="price" />
<result property="cargoNo" column="cargo_no" />
<result property="unit" column="unit" />
<result property="spec" column="spec" />
<result property="remark" column="remark" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="productName" column="product_name" />
<result property="spare7" column="spare7" />
<result property="spare8" column="spare8" />
<result property="spare9" column="spare9" />
<result property="spare10" column="spare10" />
<result property="spare11" column="spare11" />
<result property="spare12" column="spare12" />
<result property="spare13" column="spare13" />
<result property="spare14" column="spare14" />
<result property="spare15" column="spare15" />
<result property="spare16" column="spare16" />
<result property="spare17" column="spare17" />
<result property="spare18" column="spare18" />
<result property="spare19" column="spare19" />
<result property="spare20" column="spare20" />
<result property="spare21" column="spare21" />
<result property="spare22" column="spare22" />
<result property="spare23" column="spare23" />
<result property="spare24" column="spare24" />
<result property="spare25" column="spare25" />
<result property="spare26" column="spare26" />
<result property="spare27" column="spare27" />
<result property="spare28" column="spare28" />
<result property="spare29" column="spare29" />
<result property="spare30" column="spare30" />
<result property="spare31" column="spare31" />
<result property="spare32" column="spare32" />
<result property="spare33" column="spare33" />
<result property="spare34" column="spare34" />
<result property="spare35" column="spare35" />
<result property="spare36" column="spare36" />
<result property="spare37" column="spare37" />
<result property="spare38" column="spare38" />
<result property="spare39" column="spare39" />
</resultMap>
<sql id="selectBasProductVo">
select product_guid, product_id, product_name, spare4, spare7, spare1, spare2, spare8, spare3, spare5, spare6, remark, parent_id, price, cargo_no, unit, spec, spare9 from bas_product
select product_guid, product_id, parent_id, price, cargo_no, unit, spec, remark, spare1, spare2, spare3, spare4, spare5, spare6, product_name, spare7, spare8, spare9, spare10, spare11, spare12, spare13, spare14, spare15, spare16, spare17, spare18, spare19, spare20, spare21, spare22, spare23, spare24, spare25, spare26, spare27, spare28, spare29, spare30, spare31, spare32, spare33, spare34, spare35, spare36, spare37, spare38, spare39 from bas_product
</sql>
<select id="selectBasProductList" parameterType="BasProduct" resultMap="BasProductResult">
<include refid="selectBasProductVo"/>
<where>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="parentId != null and parentId != ''"> and parent_id like concat('%', #{parentId}, '%')</if>
<if test="price != null and price != ''"> and price like concat('%', #{price}, '%')</if>
<if test="cargoNo != null and cargoNo != ''"> and cargo_no like concat('%', #{cargoNo}, '%')</if>
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="spare9 != null and spare9 != ''"> and spare9 like concat('%', #{spare9}, '%')</if>
<if test="spare10 != null and spare10 != ''"> and spare10 like concat('%', #{spare10}, '%')</if>
<if test="spare11 != null and spare11 != ''"> and spare11 like concat('%', #{spare11}, '%')</if>
<if test="spare12 != null and spare12 != ''"> and spare12 like concat('%', #{spare12}, '%')</if>
<if test="spare13 != null and spare13 != ''"> and spare13 like concat('%', #{spare13}, '%')</if>
<if test="spare14 != null and spare14 != ''"> and spare14 like concat('%', #{spare14}, '%')</if>
<if test="spare15 != null and spare15 != ''"> and spare15 like concat('%', #{spare15}, '%')</if>
<if test="spare16 != null and spare16 != ''"> and spare16 like concat('%', #{spare16}, '%')</if>
<if test="spare17 != null and spare17 != ''"> and spare17 like concat('%', #{spare17}, '%')</if>
<if test="spare18 != null and spare18 != ''"> and spare18 like concat('%', #{spare18}, '%')</if>
<if test="spare19 != null and spare19 != ''"> and spare19 like concat('%', #{spare19}, '%')</if>
<if test="spare20 != null and spare20 != ''"> and spare20 like concat('%', #{spare20}, '%')</if>
<if test="spare21 != null and spare21 != ''"> and spare21 like concat('%', #{spare21}, '%')</if>
<if test="spare22 != null and spare22 != ''"> and spare22 like concat('%', #{spare22}, '%')</if>
<if test="spare23 != null and spare23 != ''"> and spare23 like concat('%', #{spare23}, '%')</if>
<if test="spare24 != null and spare24 != ''"> and spare24 like concat('%', #{spare24}, '%')</if>
<if test="spare25 != null and spare25 != ''"> and spare25 like concat('%', #{spare25}, '%')</if>
<if test="spare26 != null and spare26 != ''"> and spare26 like concat('%', #{spare26}, '%')</if>
<if test="spare27 != null and spare27 != ''"> and spare27 like concat('%', #{spare27}, '%')</if>
<if test="spare28 != null and spare28 != ''"> and spare28 like concat('%', #{spare28}, '%')</if>
<if test="spare29 != null and spare29 != ''"> and spare29 like concat('%', #{spare29}, '%')</if>
<if test="spare30 != null and spare30 != ''"> and spare30 like concat('%', #{spare30}, '%')</if>
<if test="spare31 != null and spare31 != ''"> and spare31 like concat('%', #{spare31}, '%')</if>
<if test="spare32 != null and spare32 != ''"> and spare32 like concat('%', #{spare32}, '%')</if>
<if test="spare33 != null and spare33 != ''"> and spare33 like concat('%', #{spare33}, '%')</if>
<if test="spare34 != null and spare34 != ''"> and spare34 like concat('%', #{spare34}, '%')</if>
<if test="spare35 != null and spare35 != ''"> and spare35 like concat('%', #{spare35}, '%')</if>
<if test="spare36 != null and spare36 != ''"> and spare36 like concat('%', #{spare36}, '%')</if>
<if test="spare37 != null and spare37 != ''"> and spare37 like concat('%', #{spare37}, '%')</if>
<if test="spare38 != null and spare38 != ''"> and spare38 like concat('%', #{spare38}, '%')</if>
<if test="spare39 != null and spare39 != ''"> and spare39 like concat('%', #{spare39}, '%')</if>
</where>
</select>
@@ -49,71 +115,164 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectBasProductVo"/>
where product_guid = #{productGuid}
</select>
<select id="selectBasProductByProductId" parameterType="String" resultMap="BasProductResult">
<include refid="selectBasProductVo"/>
where product_id = #{productId}
</select>
<insert id="insertBasProduct" parameterType="BasProduct">
insert into bas_product
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="productGuid != null">product_guid,</if>
<if test="productId != null">product_id,</if>
<if test="productName != null">product_name,</if>
<if test="spare4 != null">spare4,</if>
<if test="spare7 != null">spare7,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare8 != null">spare8,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare5 != null">spare5,</if>
<if test="spare6 != null">spare6,</if>
<if test="remark != null">remark,</if>
<if test="productId != null and productId != ''">product_id,</if>
<if test="parentId != null">parent_id,</if>
<if test="price != null">price,</if>
<if test="cargoNo != null">cargo_no,</if>
<if test="unit != null">unit,</if>
<if test="spec != null">spec,</if>
<if test="remark != null">remark,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare4 != null">spare4,</if>
<if test="spare5 != null">spare5,</if>
<if test="spare6 != null">spare6,</if>
<if test="productName != null and productName != ''">product_name,</if>
<if test="spare7 != null">spare7,</if>
<if test="spare8 != null">spare8,</if>
<if test="spare9 != null">spare9,</if>
<if test="spare10 != null">spare10,</if>
<if test="spare11 != null">spare11,</if>
<if test="spare12 != null">spare12,</if>
<if test="spare13 != null">spare13,</if>
<if test="spare14 != null">spare14,</if>
<if test="spare15 != null">spare15,</if>
<if test="spare16 != null">spare16,</if>
<if test="spare17 != null">spare17,</if>
<if test="spare18 != null">spare18,</if>
<if test="spare19 != null">spare19,</if>
<if test="spare20 != null">spare20,</if>
<if test="spare21 != null">spare21,</if>
<if test="spare22 != null">spare22,</if>
<if test="spare23 != null">spare23,</if>
<if test="spare24 != null">spare24,</if>
<if test="spare25 != null">spare25,</if>
<if test="spare26 != null">spare26,</if>
<if test="spare27 != null">spare27,</if>
<if test="spare28 != null">spare28,</if>
<if test="spare29 != null">spare29,</if>
<if test="spare30 != null">spare30,</if>
<if test="spare31 != null">spare31,</if>
<if test="spare32 != null">spare32,</if>
<if test="spare33 != null">spare33,</if>
<if test="spare34 != null">spare34,</if>
<if test="spare35 != null">spare35,</if>
<if test="spare36 != null">spare36,</if>
<if test="spare37 != null">spare37,</if>
<if test="spare38 != null">spare38,</if>
<if test="spare39 != null">spare39,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productGuid != null">#{productGuid},</if>
<if test="productId != null">#{productId},</if>
<if test="productName != null">#{productName},</if>
<if test="spare4 != null">#{spare4},</if>
<if test="spare7 != null">#{spare7},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare5 != null">#{spare5},</if>
<if test="spare6 != null">#{spare6},</if>
<if test="remark != null">#{remark},</if>
<if test="productId != null and productId != ''">#{productId},</if>
<if test="parentId != null">#{parentId},</if>
<if test="price != null">#{price},</if>
<if test="cargoNo != null">#{cargoNo},</if>
<if test="unit != null">#{unit},</if>
<if test="spec != null">#{spec},</if>
<if test="remark != null">#{remark},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare4 != null">#{spare4},</if>
<if test="spare5 != null">#{spare5},</if>
<if test="spare6 != null">#{spare6},</if>
<if test="productName != null and productName != ''">#{productName},</if>
<if test="spare7 != null">#{spare7},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="spare9 != null">#{spare9},</if>
<if test="spare10 != null">#{spare10},</if>
<if test="spare11 != null">#{spare11},</if>
<if test="spare12 != null">#{spare12},</if>
<if test="spare13 != null">#{spare13},</if>
<if test="spare14 != null">#{spare14},</if>
<if test="spare15 != null">#{spare15},</if>
<if test="spare16 != null">#{spare16},</if>
<if test="spare17 != null">#{spare17},</if>
<if test="spare18 != null">#{spare18},</if>
<if test="spare19 != null">#{spare19},</if>
<if test="spare20 != null">#{spare20},</if>
<if test="spare21 != null">#{spare21},</if>
<if test="spare22 != null">#{spare22},</if>
<if test="spare23 != null">#{spare23},</if>
<if test="spare24 != null">#{spare24},</if>
<if test="spare25 != null">#{spare25},</if>
<if test="spare26 != null">#{spare26},</if>
<if test="spare27 != null">#{spare27},</if>
<if test="spare28 != null">#{spare28},</if>
<if test="spare29 != null">#{spare29},</if>
<if test="spare30 != null">#{spare30},</if>
<if test="spare31 != null">#{spare31},</if>
<if test="spare32 != null">#{spare32},</if>
<if test="spare33 != null">#{spare33},</if>
<if test="spare34 != null">#{spare34},</if>
<if test="spare35 != null">#{spare35},</if>
<if test="spare36 != null">#{spare36},</if>
<if test="spare37 != null">#{spare37},</if>
<if test="spare38 != null">#{spare38},</if>
<if test="spare39 != null">#{spare39},</if>
</trim>
</insert>
<update id="updateBasProduct" parameterType="BasProduct">
update bas_product
<trim prefix="SET" suffixOverrides=",">
<if test="productId != null">product_id = #{productId},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
<if test="spare7 != null">spare7 = #{spare7},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
<if test="spare6 != null">spare6 = #{spare6},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="productId != null and productId != ''">product_id = #{productId},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="price != null">price = #{price},</if>
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="spec != null">spec = #{spec},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
<if test="spare6 != null">spare6 = #{spare6},</if>
<if test="productName != null and productName != ''">product_name = #{productName},</if>
<if test="spare7 != null">spare7 = #{spare7},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="spare9 != null">spare9 = #{spare9},</if>
<if test="spare10 != null">spare10 = #{spare10},</if>
<if test="spare11 != null">spare11 = #{spare11},</if>
<if test="spare12 != null">spare12 = #{spare12},</if>
<if test="spare13 != null">spare13 = #{spare13},</if>
<if test="spare14 != null">spare14 = #{spare14},</if>
<if test="spare15 != null">spare15 = #{spare15},</if>
<if test="spare16 != null">spare16 = #{spare16},</if>
<if test="spare17 != null">spare17 = #{spare17},</if>
<if test="spare18 != null">spare18 = #{spare18},</if>
<if test="spare19 != null">spare19 = #{spare19},</if>
<if test="spare20 != null">spare20 = #{spare20},</if>
<if test="spare21 != null">spare21 = #{spare21},</if>
<if test="spare22 != null">spare22 = #{spare22},</if>
<if test="spare23 != null">spare23 = #{spare23},</if>
<if test="spare24 != null">spare24 = #{spare24},</if>
<if test="spare25 != null">spare25 = #{spare25},</if>
<if test="spare26 != null">spare26 = #{spare26},</if>
<if test="spare27 != null">spare27 = #{spare27},</if>
<if test="spare28 != null">spare28 = #{spare28},</if>
<if test="spare29 != null">spare29 = #{spare29},</if>
<if test="spare30 != null">spare30 = #{spare30},</if>
<if test="spare31 != null">spare31 = #{spare31},</if>
<if test="spare32 != null">spare32 = #{spare32},</if>
<if test="spare33 != null">spare33 = #{spare33},</if>
<if test="spare34 != null">spare34 = #{spare34},</if>
<if test="spare35 != null">spare35 = #{spare35},</if>
<if test="spare36 != null">spare36 = #{spare36},</if>
<if test="spare37 != null">spare37 = #{spare37},</if>
<if test="spare38 != null">spare38 = #{spare38},</if>
<if test="spare39 != null">spare39 = #{spare39},</if>
</trim>
where product_guid = #{productGuid}
</update>