wangwei 2 months ago
parent
commit
342364027a
  1. 13
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/dhc/DhcProductController.java
  2. 113
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/dhc/ProductConfigController.java
  3. 260
      ruoyi-plan/src/main/java/com/ruoyi/dhc/domain/DhcProduct.java
  4. 117
      ruoyi-plan/src/main/java/com/ruoyi/dhc/domain/ProductConfig.java
  5. 63
      ruoyi-plan/src/main/java/com/ruoyi/dhc/mapper/ProductConfigMapper.java
  6. 61
      ruoyi-plan/src/main/java/com/ruoyi/dhc/service/IProductConfigService.java
  7. 96
      ruoyi-plan/src/main/java/com/ruoyi/dhc/service/impl/ProductConfigServiceImpl.java
  8. 27
      ruoyi-plan/src/main/resources/mapper/dhc/DhcProductMapper.xml
  9. 93
      ruoyi-plan/src/main/resources/mapper/dhc/ProductConfigMapper.xml

13
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dhc/DhcProductController.java

@ -20,15 +20,18 @@ import com.ruoyi.dhc.domain.DhcProduct; @@ -20,15 +20,18 @@ import com.ruoyi.dhc.domain.DhcProduct;
import com.ruoyi.dhc.service.IDhcProductService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* 产品信息Controller
*
* @author ruoyi
* @date 2024-10-08
* @date 2025-03-14
*/
@Api(tags = "产品信息管理")
@RestController
@RequestMapping("/dhc/product")
@RequestMapping("/dhc/dhcProduct")
public class DhcProductController extends BaseController
{
@Autowired
@ -37,6 +40,7 @@ public class DhcProductController extends BaseController @@ -37,6 +40,7 @@ public class DhcProductController extends BaseController
/**
* 查询产品信息列表
*/
@ApiOperation("查询产品信息列表")
@PreAuthorize("@ss.hasPermi('dhc:product:list')")
@GetMapping("/list")
public TableDataInfo list(DhcProduct dhcProduct)
@ -49,6 +53,7 @@ public class DhcProductController extends BaseController @@ -49,6 +53,7 @@ public class DhcProductController extends BaseController
/**
* 导出产品信息列表
*/
@ApiOperation("导出产品信息列表")
@PreAuthorize("@ss.hasPermi('dhc:product:export')")
@Log(title = "产品信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ -62,6 +67,7 @@ public class DhcProductController extends BaseController @@ -62,6 +67,7 @@ public class DhcProductController extends BaseController
/**
* 获取产品信息详细信息
*/
@ApiOperation("获取产品信息详细信息")
@PreAuthorize("@ss.hasPermi('dhc:product:query')")
@GetMapping(value = "/{productId}")
public AjaxResult getInfo(@PathVariable("productId") Long productId)
@ -72,6 +78,7 @@ public class DhcProductController extends BaseController @@ -72,6 +78,7 @@ public class DhcProductController extends BaseController
/**
* 新增产品信息
*/
@ApiOperation("新增产品信息")
@PreAuthorize("@ss.hasPermi('dhc:product:add')")
@Log(title = "产品信息", businessType = BusinessType.INSERT)
@PostMapping
@ -83,6 +90,7 @@ public class DhcProductController extends BaseController @@ -83,6 +90,7 @@ public class DhcProductController extends BaseController
/**
* 修改产品信息
*/
@ApiOperation("修改产品信息")
@PreAuthorize("@ss.hasPermi('dhc:product:edit')")
@Log(title = "产品信息", businessType = BusinessType.UPDATE)
@PutMapping
@ -94,6 +102,7 @@ public class DhcProductController extends BaseController @@ -94,6 +102,7 @@ public class DhcProductController extends BaseController
/**
* 删除产品信息
*/
@ApiOperation("删除产品信息")
@PreAuthorize("@ss.hasPermi('dhc:product:remove')")
@Log(title = "产品信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{productIds}")

113
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dhc/ProductConfigController.java

@ -0,0 +1,113 @@ @@ -0,0 +1,113 @@
package com.ruoyi.web.controller.dhc;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.dhc.domain.ProductConfig;
import com.ruoyi.dhc.service.IProductConfigService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* 产品配置信息Controller
*
* @author ruoyi
* @date 2025-03-14
*/
@Api(tags = "产品配置信息管理")
@RestController
@RequestMapping("/dhc/productConfig")
public class ProductConfigController extends BaseController
{
@Autowired
private IProductConfigService productConfigService;
/**
* 查询产品配置信息列表
*/
@ApiOperation("查询产品配置信息列表")
@PreAuthorize("@ss.hasPermi('dhc:config:list')")
@GetMapping("/list")
public TableDataInfo list(ProductConfig productConfig)
{
startPage();
List<ProductConfig> list = productConfigService.selectProductConfigList(productConfig);
return getDataTable(list);
}
/**
* 导出产品配置信息列表
*/
@ApiOperation("导出产品配置信息列表")
@PreAuthorize("@ss.hasPermi('dhc:config:export')")
@Log(title = "产品配置信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProductConfig productConfig)
{
List<ProductConfig> list = productConfigService.selectProductConfigList(productConfig);
ExcelUtil<ProductConfig> util = new ExcelUtil<ProductConfig>(ProductConfig.class);
util.exportExcel(response, list, "产品配置信息数据");
}
/**
* 获取产品配置信息详细信息
*/
@ApiOperation("获取产品配置信息详细信息")
@PreAuthorize("@ss.hasPermi('dhc:config:query')")
@GetMapping(value = "/{productId}")
public AjaxResult getInfo(@PathVariable("productId") Long productId)
{
return success(productConfigService.selectProductConfigByProductId(productId));
}
/**
* 新增产品配置信息
*/
@ApiOperation("新增产品配置信息")
@PreAuthorize("@ss.hasPermi('dhc:config:add')")
@Log(title = "产品配置信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ProductConfig productConfig)
{
return toAjax(productConfigService.insertProductConfig(productConfig));
}
/**
* 修改产品配置信息
*/
@ApiOperation("修改产品配置信息")
@PreAuthorize("@ss.hasPermi('dhc:config:edit')")
@Log(title = "产品配置信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ProductConfig productConfig)
{
return toAjax(productConfigService.updateProductConfig(productConfig));
}
/**
* 删除产品配置信息
*/
@ApiOperation("删除产品配置信息")
@PreAuthorize("@ss.hasPermi('dhc:config:remove')")
@Log(title = "产品配置信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{productIds}")
public AjaxResult remove(@PathVariable Long[] productIds)
{
return toAjax(productConfigService.deleteProductConfigByProductIds(productIds));
}
}

260
ruoyi-plan/src/main/java/com/ruoyi/dhc/domain/DhcProduct.java

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
package com.ruoyi.dhc.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
@ -11,7 +12,7 @@ import io.swagger.annotations.ApiModelProperty; @@ -11,7 +12,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* 产品信息对象 dhc_product
*
*
* @author ruoyi
* @date 2025-03-14
*/
@ -33,29 +34,24 @@ public class DhcProduct extends BaseEntity @@ -33,29 +34,24 @@ public class DhcProduct extends BaseEntity
@Excel(name = "产品线名称")
private String productLineName;
/** 立项单号 */
@ApiModelProperty("立项单号")
@Excel(name = "立项单号")
private String projectNum;
/** 内部型号 */
@ApiModelProperty("内部型号")
@Excel(name = "内部型号")
private String internalModel;
/** 产品大类编码 */
@ApiModelProperty("产品大类编码")
@Excel(name = "产品大类编码")
/** 产品大类 */
@ApiModelProperty("产品大类")
@Excel(name = "产品大类")
private String productCategoryLarge;
/** 产品中类编码 */
@ApiModelProperty("产品中类编码")
@Excel(name = "产品中类编码")
/** 产品中类 */
@ApiModelProperty("产品中类")
@Excel(name = "产品中类")
private String productCategoryMiddle;
/** 产品小类编码 */
@ApiModelProperty("产品小类编码")
@Excel(name = "产品小类编码")
/** 产品小类 */
@ApiModelProperty("产品小类")
@Excel(name = "产品小类")
private String productCategorySmall;
/** 产品品类 */
@ -63,11 +59,6 @@ public class DhcProduct extends BaseEntity @@ -63,11 +59,6 @@ public class DhcProduct extends BaseEntity
@Excel(name = "产品品类")
private String productCategory;
/** 产品系列 */
@ApiModelProperty("产品系列")
@Excel(name = "产品系列")
private String productSeries;
/** 基础型号 */
@ApiModelProperty("基础型号")
@Excel(name = "基础型号")
@ -130,21 +121,6 @@ public class DhcProduct extends BaseEntity @@ -130,21 +121,6 @@ public class DhcProduct extends BaseEntity
@Excel(name = "产品尺寸-高")
private BigDecimal productHeight;
/** 装柜数量-20GP */
@ApiModelProperty("装柜数量-20GP")
@Excel(name = "装柜数量-20GP")
private Long loadingQuantity20gp;
/** 装柜数量-40GP */
@ApiModelProperty("装柜数量-40GP")
@Excel(name = "装柜数量-40GP")
private Long loadingQuantity40gp;
/** 装柜数量-40HQ */
@ApiModelProperty("装柜数量-40HQ")
@Excel(name = "装柜数量-40HQ")
private Long loadingQuantity40hq;
/** 最小订单量 */
@ApiModelProperty("最小订单量")
@Excel(name = "最小订单量")
@ -168,273 +144,228 @@ public class DhcProduct extends BaseEntity @@ -168,273 +144,228 @@ public class DhcProduct extends BaseEntity
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
public void setProductId(Long productId)
public void setProductId(Long productId)
{
this.productId = productId;
}
public Long getProductId()
public Long getProductId()
{
return productId;
}
public void setProductLine(String productLine)
public void setProductLine(String productLine)
{
this.productLine = productLine;
}
public String getProductLine()
public String getProductLine()
{
return productLine;
}
public void setProductLineName(String productLineName)
public void setProductLineName(String productLineName)
{
this.productLineName = productLineName;
}
public String getProductLineName()
public String getProductLineName()
{
return productLineName;
}
public void setProjectNum(String projectNum)
{
this.projectNum = projectNum;
}
public String getProjectNum()
{
return projectNum;
}
public void setInternalModel(String internalModel)
public void setInternalModel(String internalModel)
{
this.internalModel = internalModel;
}
public String getInternalModel()
public String getInternalModel()
{
return internalModel;
}
public void setProductCategoryLarge(String productCategoryLarge)
public void setProductCategoryLarge(String productCategoryLarge)
{
this.productCategoryLarge = productCategoryLarge;
}
public String getProductCategoryLarge()
public String getProductCategoryLarge()
{
return productCategoryLarge;
}
public void setProductCategoryMiddle(String productCategoryMiddle)
public void setProductCategoryMiddle(String productCategoryMiddle)
{
this.productCategoryMiddle = productCategoryMiddle;
}
public String getProductCategoryMiddle()
public String getProductCategoryMiddle()
{
return productCategoryMiddle;
}
public void setProductCategorySmall(String productCategorySmall)
public void setProductCategorySmall(String productCategorySmall)
{
this.productCategorySmall = productCategorySmall;
}
public String getProductCategorySmall()
public String getProductCategorySmall()
{
return productCategorySmall;
}
public void setProductCategory(String productCategory)
public void setProductCategory(String productCategory)
{
this.productCategory = productCategory;
}
public String getProductCategory()
public String getProductCategory()
{
return productCategory;
}
public void setProductSeries(String productSeries)
{
this.productSeries = productSeries;
}
public String getProductSeries()
{
return productSeries;
}
public void setBaseModel(String baseModel)
public void setBaseModel(String baseModel)
{
this.baseModel = baseModel;
}
public String getBaseModel()
public String getBaseModel()
{
return baseModel;
}
public void setFactoryModel(String factoryModel)
public void setFactoryModel(String factoryModel)
{
this.factoryModel = factoryModel;
}
public String getFactoryModel()
public String getFactoryModel()
{
return factoryModel;
}
public void setCustomerModel(String customerModel)
public void setCustomerModel(String customerModel)
{
this.customerModel = customerModel;
}
public String getCustomerModel()
public String getCustomerModel()
{
return customerModel;
}
public void setBrandId(Long brandId)
public void setBrandId(Long brandId)
{
this.brandId = brandId;
}
public Long getBrandId()
public Long getBrandId()
{
return brandId;
}
public void setBrandName(String brandName)
public void setBrandName(String brandName)
{
this.brandName = brandName;
}
public String getBrandName()
public String getBrandName()
{
return brandName;
}
public void setIrDatetime(Date irDatetime)
public void setIrDatetime(Date irDatetime)
{
this.irDatetime = irDatetime;
}
public Date getIrDatetime()
public Date getIrDatetime()
{
return irDatetime;
}
public void setDrDatetime(Date drDatetime)
public void setDrDatetime(Date drDatetime)
{
this.drDatetime = drDatetime;
}
public Date getDrDatetime()
public Date getDrDatetime()
{
return drDatetime;
}
public void setPackWayCode(String packWayCode)
public void setPackWayCode(String packWayCode)
{
this.packWayCode = packWayCode;
}
public String getPackWayCode()
public String getPackWayCode()
{
return packWayCode;
}
public void setProductNetWeight(BigDecimal productNetWeight)
public void setProductNetWeight(BigDecimal productNetWeight)
{
this.productNetWeight = productNetWeight;
}
public BigDecimal getProductNetWeight()
public BigDecimal getProductNetWeight()
{
return productNetWeight;
}
public void setProductLength(BigDecimal productLength)
public void setProductLength(BigDecimal productLength)
{
this.productLength = productLength;
}
public BigDecimal getProductLength()
public BigDecimal getProductLength()
{
return productLength;
}
public void setProductWidth(BigDecimal productWidth)
public void setProductWidth(BigDecimal productWidth)
{
this.productWidth = productWidth;
}
public BigDecimal getProductWidth()
public BigDecimal getProductWidth()
{
return productWidth;
}
public void setProductHeight(BigDecimal productHeight)
public void setProductHeight(BigDecimal productHeight)
{
this.productHeight = productHeight;
}
public BigDecimal getProductHeight()
public BigDecimal getProductHeight()
{
return productHeight;
}
public void setLoadingQuantity20gp(Long loadingQuantity20gp)
{
this.loadingQuantity20gp = loadingQuantity20gp;
}
public Long getLoadingQuantity20gp()
{
return loadingQuantity20gp;
}
public void setLoadingQuantity40gp(Long loadingQuantity40gp)
{
this.loadingQuantity40gp = loadingQuantity40gp;
}
public Long getLoadingQuantity40gp()
{
return loadingQuantity40gp;
}
public void setLoadingQuantity40hq(Long loadingQuantity40hq)
{
this.loadingQuantity40hq = loadingQuantity40hq;
}
public Long getLoadingQuantity40hq()
{
return loadingQuantity40hq;
}
public void setMinOrderQuantity(Long minOrderQuantity)
public void setMinOrderQuantity(Long minOrderQuantity)
{
this.minOrderQuantity = minOrderQuantity;
}
public Long getMinOrderQuantity()
public Long getMinOrderQuantity()
{
return minOrderQuantity;
}
public void setOtherRequirement(String otherRequirement)
public void setOtherRequirement(String otherRequirement)
{
this.otherRequirement = otherRequirement;
}
public String getOtherRequirement()
public String getOtherRequirement()
{
return otherRequirement;
}
public void setSTATUS(String STATUS)
public void setSTATUS(String STATUS)
{
this.STATUS = STATUS;
}
public String getSTATUS()
public String getSTATUS()
{
return STATUS;
}
public void setApproveStatus(String approveStatus)
public void setApproveStatus(String approveStatus)
{
this.approveStatus = approveStatus;
}
public String getApproveStatus()
public String getApproveStatus()
{
return approveStatus;
}
public void setDelFlag(String delFlag)
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
public String getDelFlag()
{
return delFlag;
}
@ -442,40 +373,35 @@ public class DhcProduct extends BaseEntity @@ -442,40 +373,35 @@ public class DhcProduct extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("productId", getProductId())
.append("productLine", getProductLine())
.append("productLineName", getProductLineName())
.append("projectNum", getProjectNum())
.append("internalModel", getInternalModel())
.append("productCategoryLarge", getProductCategoryLarge())
.append("productCategoryMiddle", getProductCategoryMiddle())
.append("productCategorySmall", getProductCategorySmall())
.append("productCategory", getProductCategory())
.append("productSeries", getProductSeries())
.append("baseModel", getBaseModel())
.append("factoryModel", getFactoryModel())
.append("customerModel", getCustomerModel())
.append("brandId", getBrandId())
.append("brandName", getBrandName())
.append("irDatetime", getIrDatetime())
.append("drDatetime", getDrDatetime())
.append("packWayCode", getPackWayCode())
.append("productNetWeight", getProductNetWeight())
.append("productLength", getProductLength())
.append("productWidth", getProductWidth())
.append("productHeight", getProductHeight())
.append("loadingQuantity20gp", getLoadingQuantity20gp())
.append("loadingQuantity40gp", getLoadingQuantity40gp())
.append("loadingQuantity40hq", getLoadingQuantity40hq())
.append("minOrderQuantity", getMinOrderQuantity())
.append("otherRequirement", getOtherRequirement())
.append("STATUS", getSTATUS())
.append("approveStatus", getApproveStatus())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
.append("productId", getProductId())
.append("productLine", getProductLine())
.append("productLineName", getProductLineName())
.append("internalModel", getInternalModel())
.append("productCategoryLarge", getProductCategoryLarge())
.append("productCategoryMiddle", getProductCategoryMiddle())
.append("productCategorySmall", getProductCategorySmall())
.append("productCategory", getProductCategory())
.append("baseModel", getBaseModel())
.append("factoryModel", getFactoryModel())
.append("customerModel", getCustomerModel())
.append("brandId", getBrandId())
.append("brandName", getBrandName())
.append("irDatetime", getIrDatetime())
.append("drDatetime", getDrDatetime())
.append("packWayCode", getPackWayCode())
.append("productNetWeight", getProductNetWeight())
.append("productLength", getProductLength())
.append("productWidth", getProductWidth())
.append("productHeight", getProductHeight())
.append("minOrderQuantity", getMinOrderQuantity())
.append("otherRequirement", getOtherRequirement())
.append("STATUS", getSTATUS())
.append("approveStatus", getApproveStatus())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

117
ruoyi-plan/src/main/java/com/ruoyi/dhc/domain/ProductConfig.java

@ -0,0 +1,117 @@ @@ -0,0 +1,117 @@
package com.ruoyi.dhc.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 产品配置信息对象 product_config
*
* @author ruoyi
* @date 2025-03-14
*/
@ApiModel(value = "ProductConfig", description = "产品配置信息")
public class ProductConfig extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 产品序列号 */
private Long productId;
/** 产品编号 */
@ApiModelProperty("产品编号")
@Excel(name = "产品编号")
private String productCode;
/** 产品编号 */
@ApiModelProperty("产品编号")
@Excel(name = "产品编号")
private String productName;
/** 模块名称 */
@ApiModelProperty("模块名称")
@Excel(name = "模块名称")
private String cfgModuleName;
/** 类型编码 */
@ApiModelProperty("类型编码")
@Excel(name = "类型编码")
private String cfgLookupCode;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
public void setProductId(Long productId)
{
this.productId = productId;
}
public Long getProductId()
{
return productId;
}
public void setProductCode(String productCode)
{
this.productCode = productCode;
}
public String getProductCode()
{
return productCode;
}
public void setProductName(String productName)
{
this.productName = productName;
}
public String getProductName()
{
return productName;
}
public void setCfgModuleName(String cfgModuleName)
{
this.cfgModuleName = cfgModuleName;
}
public String getCfgModuleName()
{
return cfgModuleName;
}
public void setCfgLookupCode(String cfgLookupCode)
{
this.cfgLookupCode = cfgLookupCode;
}
public String getCfgLookupCode()
{
return cfgLookupCode;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("productId", getProductId())
.append("productCode", getProductCode())
.append("productName", getProductName())
.append("cfgModuleName", getCfgModuleName())
.append("cfgLookupCode", getCfgLookupCode())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

63
ruoyi-plan/src/main/java/com/ruoyi/dhc/mapper/ProductConfigMapper.java

@ -0,0 +1,63 @@ @@ -0,0 +1,63 @@
package com.ruoyi.dhc.mapper;
import com.ruoyi.dhc.domain.ProductConfig;
import java.util.List;
/**
* 产品配置信息Mapper接口
*
* @author ruoyi
* @date 2025-03-14
*/
public interface ProductConfigMapper
{
/**
* 查询产品配置信息
*
* @param productId 产品配置信息主键
* @return 产品配置信息
*/
public ProductConfig selectProductConfigByProductId(Long productId);
/**
* 查询产品配置信息列表
*
* @param productConfig 产品配置信息
* @return 产品配置信息集合
*/
public List<ProductConfig> selectProductConfigList(ProductConfig productConfig);
/**
* 新增产品配置信息
*
* @param productConfig 产品配置信息
* @return 结果
*/
public int insertProductConfig(ProductConfig productConfig);
/**
* 修改产品配置信息
*
* @param productConfig 产品配置信息
* @return 结果
*/
public int updateProductConfig(ProductConfig productConfig);
/**
* 删除产品配置信息
*
* @param productId 产品配置信息主键
* @return 结果
*/
public int deleteProductConfigByProductId(Long productId);
/**
* 批量删除产品配置信息
*
* @param productIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteProductConfigByProductIds(Long[] productIds);
}

61
ruoyi-plan/src/main/java/com/ruoyi/dhc/service/IProductConfigService.java

@ -0,0 +1,61 @@ @@ -0,0 +1,61 @@
package com.ruoyi.dhc.service;
import java.util.List;
import com.ruoyi.dhc.domain.ProductConfig;
/**
* 产品配置信息Service接口
*
* @author ruoyi
* @date 2025-03-14
*/
public interface IProductConfigService
{
/**
* 查询产品配置信息
*
* @param productId 产品配置信息主键
* @return 产品配置信息
*/
public ProductConfig selectProductConfigByProductId(Long productId);
/**
* 查询产品配置信息列表
*
* @param productConfig 产品配置信息
* @return 产品配置信息集合
*/
public List<ProductConfig> selectProductConfigList(ProductConfig productConfig);
/**
* 新增产品配置信息
*
* @param productConfig 产品配置信息
* @return 结果
*/
public int insertProductConfig(ProductConfig productConfig);
/**
* 修改产品配置信息
*
* @param productConfig 产品配置信息
* @return 结果
*/
public int updateProductConfig(ProductConfig productConfig);
/**
* 批量删除产品配置信息
*
* @param productIds 需要删除的产品配置信息主键集合
* @return 结果
*/
public int deleteProductConfigByProductIds(Long[] productIds);
/**
* 删除产品配置信息信息
*
* @param productId 产品配置信息主键
* @return 结果
*/
public int deleteProductConfigByProductId(Long productId);
}

96
ruoyi-plan/src/main/java/com/ruoyi/dhc/service/impl/ProductConfigServiceImpl.java

@ -0,0 +1,96 @@ @@ -0,0 +1,96 @@
package com.ruoyi.dhc.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dhc.mapper.ProductConfigMapper;
import com.ruoyi.dhc.domain.ProductConfig;
import com.ruoyi.dhc.service.IProductConfigService;
/**
* 产品配置信息Service业务层处理
*
* @author ruoyi
* @date 2025-03-14
*/
@Service
public class ProductConfigServiceImpl implements IProductConfigService
{
@Autowired
private ProductConfigMapper productConfigMapper;
/**
* 查询产品配置信息
*
* @param productId 产品配置信息主键
* @return 产品配置信息
*/
@Override
public ProductConfig selectProductConfigByProductId(Long productId)
{
return productConfigMapper.selectProductConfigByProductId(productId);
}
/**
* 查询产品配置信息列表
*
* @param productConfig 产品配置信息
* @return 产品配置信息
*/
@Override
public List<ProductConfig> selectProductConfigList(ProductConfig productConfig)
{
return productConfigMapper.selectProductConfigList(productConfig);
}
/**
* 新增产品配置信息
*
* @param productConfig 产品配置信息
* @return 结果
*/
@Override
public int insertProductConfig(ProductConfig productConfig)
{
productConfig.setCreateTime(DateUtils.getNowDate());
return productConfigMapper.insertProductConfig(productConfig);
}
/**
* 修改产品配置信息
*
* @param productConfig 产品配置信息
* @return 结果
*/
@Override
public int updateProductConfig(ProductConfig productConfig)
{
productConfig.setUpdateTime(DateUtils.getNowDate());
return productConfigMapper.updateProductConfig(productConfig);
}
/**
* 批量删除产品配置信息
*
* @param productIds 需要删除的产品配置信息主键
* @return 结果
*/
@Override
public int deleteProductConfigByProductIds(Long[] productIds)
{
return productConfigMapper.deleteProductConfigByProductIds(productIds);
}
/**
* 删除产品配置信息信息
*
* @param productId 产品配置信息主键
* @return 结果
*/
@Override
public int deleteProductConfigByProductId(Long productId)
{
return productConfigMapper.deleteProductConfigByProductId(productId);
}
}

27
ruoyi-plan/src/main/resources/mapper/dhc/DhcProductMapper.xml

@ -8,13 +8,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -8,13 +8,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="productId" column="product_id" />
<result property="productLine" column="product_line" />
<result property="productLineName" column="product_line_name" />
<result property="projectNum" column="project_num" />
<result property="internalModel" column="Internal_model" />
<result property="productCategoryLarge" column="product_category_large" />
<result property="productCategoryMiddle" column="product_category_middle" />
<result property="productCategorySmall" column="product_category_small" />
<result property="productCategory" column="product_category" />
<result property="productSeries" column="product_series" />
<result property="baseModel" column="base_model" />
<result property="factoryModel" column="factory_model" />
<result property="customerModel" column="customer_model" />
@ -27,9 +25,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -27,9 +25,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="productLength" column="product_length" />
<result property="productWidth" column="product_width" />
<result property="productHeight" column="product_height" />
<result property="loadingQuantity20gp" column="loading_quantity_20GP" />
<result property="loadingQuantity40gp" column="loading_quantity_40GP" />
<result property="loadingQuantity40hq" column="loading_quantity_40HQ" />
<result property="minOrderQuantity" column="min_order_quantity" />
<result property="otherRequirement" column="other_requirement" />
<result property="STATUS" column="STATUS" />
@ -42,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -42,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDhcProductVo">
select product_id, product_line, product_line_name, project_num, Internal_model, product_category_large, product_category_middle, product_category_small, product_category, product_series, base_model, factory_model, customer_model, brand_id, brand_name, ir_datetime, dr_datetime, pack_way_code, product_net_weight, product_length, product_width, product_height, loading_quantity_20GP, loading_quantity_40GP, loading_quantity_40HQ, min_order_quantity, other_requirement, STATUS, approve_status, del_flag, create_by, create_time, update_by, update_time from dhc_product
select product_id, product_line, product_line_name, Internal_model, product_category_large, product_category_middle, product_category_small, product_category, base_model, factory_model, customer_model, brand_id, brand_name, ir_datetime, dr_datetime, pack_way_code, product_net_weight, product_length, product_width, product_height, min_order_quantity, other_requirement, STATUS, approve_status, del_flag, create_by, create_time, update_by, update_time from dhc_product
</sql>
<select id="selectDhcProductList" parameterType="DhcProduct" resultMap="DhcProductResult">
@ -50,13 +45,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -50,13 +45,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="productLine != null and productLine != ''"> and product_line = #{productLine}</if>
<if test="productLineName != null and productLineName != ''"> and product_line_name like concat('%', #{productLineName}, '%')</if>
<if test="projectNum != null and projectNum != ''"> and project_num = #{projectNum}</if>
<if test="internalModel != null and internalModel != ''"> and Internal_model = #{internalModel}</if>
<if test="productCategoryLarge != null and productCategoryLarge != ''"> and product_category_large = #{productCategoryLarge}</if>
<if test="productCategoryMiddle != null and productCategoryMiddle != ''"> and product_category_middle = #{productCategoryMiddle}</if>
<if test="productCategorySmall != null and productCategorySmall != ''"> and product_category_small = #{productCategorySmall}</if>
<if test="productCategory != null and productCategory != ''"> and product_category = #{productCategory}</if>
<if test="productSeries != null and productSeries != ''"> and product_series = #{productSeries}</if>
<if test="baseModel != null and baseModel != ''"> and base_model = #{baseModel}</if>
<if test="factoryModel != null and factoryModel != ''"> and factory_model = #{factoryModel}</if>
<if test="customerModel != null and customerModel != ''"> and customer_model = #{customerModel}</if>
@ -69,9 +62,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -69,9 +62,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productLength != null "> and product_length = #{productLength}</if>
<if test="productWidth != null "> and product_width = #{productWidth}</if>
<if test="productHeight != null "> and product_height = #{productHeight}</if>
<if test="loadingQuantity20gp != null "> and loading_quantity_20GP = #{loadingQuantity20gp}</if>
<if test="loadingQuantity40gp != null "> and loading_quantity_40GP = #{loadingQuantity40gp}</if>
<if test="loadingQuantity40hq != null "> and loading_quantity_40HQ = #{loadingQuantity40hq}</if>
<if test="minOrderQuantity != null "> and min_order_quantity = #{minOrderQuantity}</if>
<if test="otherRequirement != null and otherRequirement != ''"> and other_requirement = #{otherRequirement}</if>
<if test="STATUS != null and STATUS != ''"> and STATUS = #{STATUS}</if>
@ -89,13 +79,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -89,13 +79,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="productLine != null">product_line,</if>
<if test="productLineName != null">product_line_name,</if>
<if test="projectNum != null">project_num,</if>
<if test="internalModel != null">Internal_model,</if>
<if test="productCategoryLarge != null">product_category_large,</if>
<if test="productCategoryMiddle != null">product_category_middle,</if>
<if test="productCategorySmall != null">product_category_small,</if>
<if test="productCategory != null">product_category,</if>
<if test="productSeries != null">product_series,</if>
<if test="baseModel != null">base_model,</if>
<if test="factoryModel != null">factory_model,</if>
<if test="customerModel != null">customer_model,</if>
@ -108,9 +96,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -108,9 +96,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productLength != null">product_length,</if>
<if test="productWidth != null">product_width,</if>
<if test="productHeight != null">product_height,</if>
<if test="loadingQuantity20gp != null">loading_quantity_20GP,</if>
<if test="loadingQuantity40gp != null">loading_quantity_40GP,</if>
<if test="loadingQuantity40hq != null">loading_quantity_40HQ,</if>
<if test="minOrderQuantity != null">min_order_quantity,</if>
<if test="otherRequirement != null">other_requirement,</if>
<if test="STATUS != null">STATUS,</if>
@ -124,13 +109,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -124,13 +109,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productLine != null">#{productLine},</if>
<if test="productLineName != null">#{productLineName},</if>
<if test="projectNum != null">#{projectNum},</if>
<if test="internalModel != null">#{internalModel},</if>
<if test="productCategoryLarge != null">#{productCategoryLarge},</if>
<if test="productCategoryMiddle != null">#{productCategoryMiddle},</if>
<if test="productCategorySmall != null">#{productCategorySmall},</if>
<if test="productCategory != null">#{productCategory},</if>
<if test="productSeries != null">#{productSeries},</if>
<if test="baseModel != null">#{baseModel},</if>
<if test="factoryModel != null">#{factoryModel},</if>
<if test="customerModel != null">#{customerModel},</if>
@ -143,9 +126,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -143,9 +126,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productLength != null">#{productLength},</if>
<if test="productWidth != null">#{productWidth},</if>
<if test="productHeight != null">#{productHeight},</if>
<if test="loadingQuantity20gp != null">#{loadingQuantity20gp},</if>
<if test="loadingQuantity40gp != null">#{loadingQuantity40gp},</if>
<if test="loadingQuantity40hq != null">#{loadingQuantity40hq},</if>
<if test="minOrderQuantity != null">#{minOrderQuantity},</if>
<if test="otherRequirement != null">#{otherRequirement},</if>
<if test="STATUS != null">#{STATUS},</if>
@ -163,13 +143,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -163,13 +143,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="productLine != null">product_line = #{productLine},</if>
<if test="productLineName != null">product_line_name = #{productLineName},</if>
<if test="projectNum != null">project_num = #{projectNum},</if>
<if test="internalModel != null">Internal_model = #{internalModel},</if>
<if test="productCategoryLarge != null">product_category_large = #{productCategoryLarge},</if>
<if test="productCategoryMiddle != null">product_category_middle = #{productCategoryMiddle},</if>
<if test="productCategorySmall != null">product_category_small = #{productCategorySmall},</if>
<if test="productCategory != null">product_category = #{productCategory},</if>
<if test="productSeries != null">product_series = #{productSeries},</if>
<if test="baseModel != null">base_model = #{baseModel},</if>
<if test="factoryModel != null">factory_model = #{factoryModel},</if>
<if test="customerModel != null">customer_model = #{customerModel},</if>
@ -182,9 +160,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -182,9 +160,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productLength != null">product_length = #{productLength},</if>
<if test="productWidth != null">product_width = #{productWidth},</if>
<if test="productHeight != null">product_height = #{productHeight},</if>
<if test="loadingQuantity20gp != null">loading_quantity_20GP = #{loadingQuantity20gp},</if>
<if test="loadingQuantity40gp != null">loading_quantity_40GP = #{loadingQuantity40gp},</if>
<if test="loadingQuantity40hq != null">loading_quantity_40HQ = #{loadingQuantity40hq},</if>
<if test="minOrderQuantity != null">min_order_quantity = #{minOrderQuantity},</if>
<if test="otherRequirement != null">other_requirement = #{otherRequirement},</if>
<if test="STATUS != null">STATUS = #{STATUS},</if>

93
ruoyi-plan/src/main/resources/mapper/dhc/ProductConfigMapper.xml

@ -0,0 +1,93 @@ @@ -0,0 +1,93 @@
<?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.dhc.mapper.ProductConfigMapper">
<resultMap type="ProductConfig" id="ProductConfigResult">
<result property="productId" column="product_id" />
<result property="productCode" column="PRODUCT_CODE" />
<result property="productName" column="PRODUCT_NAME" />
<result property="cfgModuleName" column="CFG_MODULE_NAME" />
<result property="cfgLookupCode" column="CFG_LOOKUP_CODE" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectProductConfigVo">
select product_id, PRODUCT_CODE, PRODUCT_NAME, CFG_MODULE_NAME, CFG_LOOKUP_CODE, del_flag, create_by, create_time, update_by, update_time from product_config
</sql>
<select id="selectProductConfigList" parameterType="ProductConfig" resultMap="ProductConfigResult">
<include refid="selectProductConfigVo"/>
<where>
<if test="productCode != null and productCode != ''"> and PRODUCT_CODE = #{productCode}</if>
<if test="productName != null and productName != ''"> and PRODUCT_NAME like concat('%', #{productName}, '%')</if>
<if test="cfgModuleName != null and cfgModuleName != ''"> and CFG_MODULE_NAME like concat('%', #{cfgModuleName}, '%')</if>
<if test="cfgLookupCode != null and cfgLookupCode != ''"> and CFG_LOOKUP_CODE = #{cfgLookupCode}</if>
</where>
</select>
<select id="selectProductConfigByProductId" parameterType="Long" resultMap="ProductConfigResult">
<include refid="selectProductConfigVo"/>
where product_id = #{productId}
</select>
<insert id="insertProductConfig" parameterType="ProductConfig">
insert into product_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="productId != null">product_id,</if>
<if test="productCode != null">PRODUCT_CODE,</if>
<if test="productName != null">PRODUCT_NAME,</if>
<if test="cfgModuleName != null">CFG_MODULE_NAME,</if>
<if test="cfgLookupCode != null">CFG_LOOKUP_CODE,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productId != null">#{productId},</if>
<if test="productCode != null">#{productCode},</if>
<if test="productName != null">#{productName},</if>
<if test="cfgModuleName != null">#{cfgModuleName},</if>
<if test="cfgLookupCode != null">#{cfgLookupCode},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateProductConfig" parameterType="ProductConfig">
update product_config
<trim prefix="SET" suffixOverrides=",">
<if test="productCode != null">PRODUCT_CODE = #{productCode},</if>
<if test="productName != null">PRODUCT_NAME = #{productName},</if>
<if test="cfgModuleName != null">CFG_MODULE_NAME = #{cfgModuleName},</if>
<if test="cfgLookupCode != null">CFG_LOOKUP_CODE = #{cfgLookupCode},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where product_id = #{productId}
</update>
<delete id="deleteProductConfigByProductId" parameterType="Long">
delete from product_config where product_id = #{productId}
</delete>
<delete id="deleteProductConfigByProductIds" parameterType="String">
delete from product_config where product_id in
<foreach item="productId" collection="array" open="(" separator="," close=")">
#{productId}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save