ezhizao_zx 9 місяців тому
батько
коміт
9c725fcece

+ 109 - 0
src/main/java/cn/ezhizao/project/business/companyProductPackage/controller/BizCompanyProductPackageController.java

@@ -0,0 +1,109 @@
+package cn.ezhizao.project.business.companyProductPackage.controller;
+
+import java.util.List;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
+import cn.ezhizao.framework.web.controller.BaseController;
+import cn.ezhizao.framework.web.domain.AjaxResult;
+import cn.ezhizao.framework.web.page.TableDataInfo;
+import org.springframework.security.access.prepost.PreAuthorize;
+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 cn.ezhizao.project.business.companyProductPackage.domain.BizCompanyProductPackage;
+import cn.ezhizao.project.business.companyProductPackage.service.IBizCompanyProductPackageService;
+
+/**
+ * 产品包装客户关联Controller
+ *
+ * @author ezhizao
+ * @date 2024-09-10
+ */
+@RestController
+@RequestMapping("/business/companyProductPackage")
+public class BizCompanyProductPackageController extends BaseController
+{
+    @Resource
+    private IBizCompanyProductPackageService bizCompanyProductPackageService;
+
+    /**
+     * 查询产品包装客户关联列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:companyProductPackage:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BizCompanyProductPackage bizCompanyProductPackage) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizCompanyProductPackage);
+        startPage();
+        List<BizCompanyProductPackage> list = bizCompanyProductPackageService.getList(bizCompanyProductPackage);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出产品包装客户关联列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:companyProductPackage:export')")
+    @Log(title = "产品包装客户关联", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizCompanyProductPackage bizCompanyProductPackage) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizCompanyProductPackage);
+        List<BizCompanyProductPackage> list = bizCompanyProductPackageService.getList(bizCompanyProductPackage);
+        ExcelUtil<BizCompanyProductPackage> util = new ExcelUtil<BizCompanyProductPackage>(BizCompanyProductPackage.class);
+        util.exportExcel(response, list, "产品包装客户关联数据");
+    }
+
+    /**
+     * 获取产品包装客户关联详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:companyProductPackage:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(bizCompanyProductPackageService.getById(id));
+    }
+
+    /**
+     * 新增产品包装客户关联
+     */
+    @PreAuthorize("@ss.hasPermi('business:companyProductPackage:add')")
+    @Log(title = "产品包装客户关联", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BizCompanyProductPackage bizCompanyProductPackage) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizCompanyProductPackage);
+        return toAjax(bizCompanyProductPackageService.save(bizCompanyProductPackage));
+    }
+
+    /**
+     * 修改产品包装客户关联
+     */
+    @PreAuthorize("@ss.hasPermi('business:companyProductPackage:edit')")
+    @Log(title = "产品包装客户关联", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BizCompanyProductPackage bizCompanyProductPackage) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizCompanyProductPackage);
+        return toAjax(bizCompanyProductPackageService.updateById(bizCompanyProductPackage));
+    }
+
+    /**
+     * 删除产品包装客户关联
+     */
+    @PreAuthorize("@ss.hasPermi('business:companyProductPackage:remove')")
+    @Log(title = "产品包装客户关联", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable List<Long> ids)
+    {
+        return toAjax(bizCompanyProductPackageService.removeBatchByIds(ids));
+    }
+}

+ 155 - 0
src/main/java/cn/ezhizao/project/business/companyProductPackage/domain/BizCompanyProductPackage.java

@@ -0,0 +1,155 @@
+package cn.ezhizao.project.business.companyProductPackage.domain;
+
+import java.math.BigDecimal;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 产品包装客户关联对象 biz_company_product_package
+ *
+ * @author ezhizao
+ * @date 2024-09-10
+ */
+@Data
+@TableName(value = "biz_company_product_package")
+public class BizCompanyProductPackage extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 产品id */
+    @ApiModelProperty(value = "${comment}")
+    private Long productId;
+
+    /** 产品编码 */
+    @Excel(name = "产品编码")
+    @ApiModelProperty(value = "产品编码")
+    private String productCode;
+
+    /** 客户id */
+    @ApiModelProperty(value = "产品编码")
+    private Long companyId;
+
+    /** 客户编码 */
+    @Excel(name = "客户编码")
+    @ApiModelProperty(value = "客户编码")
+    private String companyCode;
+
+    /** 包装形式码 */
+    @Excel(name = "包装形式码")
+    @ApiModelProperty(value = "包装形式码")
+    private String packageTypeCode;
+
+    /** 产品描述 */
+    @Excel(name = "产品描述")
+    @ApiModelProperty(value = "产品描述")
+    private String productDescription;
+
+    /** 客户助记码 */
+    @Excel(name = "客户助记码")
+    @ApiModelProperty(value = "客户助记码")
+    private String mnemonicCode;
+
+    /** 客户简称 */
+    @Excel(name = "客户简称")
+    @ApiModelProperty(value = "客户简称")
+    private String companyAlias;
+
+    /** 包装箱辅料编码 */
+    @Excel(name = "包装箱辅料编码")
+    @ApiModelProperty(value = "包装箱辅料编码")
+    private String packageCode;
+
+    /** 包装箱号 */
+    @Excel(name = "包装箱号")
+    @ApiModelProperty(value = "包装箱号")
+    private String packageNo;
+
+    /** 包装尺寸 */
+    @Excel(name = "包装尺寸")
+    @ApiModelProperty(value = "包装尺寸")
+    private String packageStandard;
+
+    /** 包装长度 */
+    @Excel(name = "包装长度")
+    @ApiModelProperty(value = "包装长度")
+    private String packageLength;
+
+    /** 包装宽度 */
+    @Excel(name = "包装宽度")
+    @ApiModelProperty(value = "包装宽度")
+    private String packageWidth;
+
+    /** 包装箱高度 */
+    @Excel(name = "包装箱高度")
+    @ApiModelProperty(value = "包装箱高度")
+    private String packageHeight;
+
+    /** 单箱毛重 */
+    @Excel(name = "单箱毛重")
+    @ApiModelProperty(value = "单箱毛重")
+    private BigDecimal singleGrossWeight;
+
+    /** 单箱支数 */
+    @Excel(name = "单箱支数")
+    @ApiModelProperty(value = "单箱支数")
+    private Long singleNumber;
+
+    /** 每层箱数 */
+    @Excel(name = "每层箱数")
+    @ApiModelProperty(value = "每层箱数")
+    private Long perNumber;
+
+    /** 满托最小箱数 */
+    @Excel(name = "满托最小箱数")
+    @ApiModelProperty(value = "满托最小箱数")
+    private Long minNumber;
+
+    /** 满托最大箱数 */
+    @Excel(name = "满托最大箱数")
+    @ApiModelProperty(value = "满托最大箱数")
+    private Long maxNumber;
+
+    /** 满托支数 */
+    @Excel(name = "满托支数")
+    @ApiModelProperty(value = "满托支数")
+    private Long maxBranchNumber;
+
+    /** 托盘规格 */
+    @Excel(name = "托盘规格")
+    @ApiModelProperty(value = "托盘规格")
+    private String palletStandard;
+
+    /** 托盘类型:0川字1田字 */
+    @Excel(name = "托盘类型:0川字1田字")
+    @ApiModelProperty(value = "托盘类型:0川字1田字")
+    private String palletType;
+
+    /** "Manual"字符-- 人工区;Automatic字符代表智能区 */
+    @Excel(name = "Manual字符-- 人工区;Automatic字符代表智能区")
+    @ApiModelProperty(value = "Manual字符-- 人工区;Automatic字符代表智能区")
+    private String areaType;
+
+    /** 库存单位 */
+    @Excel(name = "库存单位")
+    @ApiModelProperty(value = "库存单位")
+    private String unit;
+
+    /** 传送状态 */
+    @Excel(name = "传送状态")
+    @ApiModelProperty(value = "传送状态")
+    private String deliveryStatus;
+
+    /** 外箱高度 */
+    @Excel(name = "外箱高度")
+    @ApiModelProperty(value = "外箱高度")
+    private Long outboxHeight;
+
+    /** 租户id */
+    @ApiModelProperty(value = "外箱高度")
+    private Long tenantId;
+
+}

+ 29 - 0
src/main/java/cn/ezhizao/project/business/companyProductPackage/mapper/BizCompanyProductPackageMapper.java

@@ -0,0 +1,29 @@
+package cn.ezhizao.project.business.companyProductPackage.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import cn.ezhizao.project.business.companyProductPackage.domain.BizCompanyProductPackage;
+
+/**
+ * 产品包装客户关联Mapper接口
+ *
+ * @author ezhizao
+ * @date 2024-09-10
+ */
+public interface BizCompanyProductPackageMapper extends BaseMapper<BizCompanyProductPackage>
+{
+    /**
+     * 查询产品包装客户关联列表
+     *
+     * @param bizCompanyProductPackage 产品包装客户关联
+     * @return 产品包装客户关联集合
+     */
+    public List<BizCompanyProductPackage> getList(BizCompanyProductPackage bizCompanyProductPackage);
+
+    /**
+     * 物理删除
+     * @param bizCompanyProductPackage
+     * @return 删除结果
+    */
+    public int physicalDelete(BizCompanyProductPackage bizCompanyProductPackage);
+}

+ 30 - 0
src/main/java/cn/ezhizao/project/business/companyProductPackage/service/IBizCompanyProductPackageService.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.companyProductPackage.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import cn.ezhizao.project.business.companyProductPackage.domain.BizCompanyProductPackage;
+
+/**
+ * 产品包装客户关联Service接口
+ *
+ * @author ezhizao
+ * @date 2024-09-10
+ */
+public interface IBizCompanyProductPackageService extends IService<BizCompanyProductPackage>
+{
+    /**
+     * 查询产品包装客户关联列表
+     *
+     * @param bizCompanyProductPackage 产品包装客户关联
+     * @return 产品包装客户关联集合
+     */
+    public List<BizCompanyProductPackage> getList(BizCompanyProductPackage bizCompanyProductPackage);
+
+    /**
+     * 物理删除
+     * @param bizCompanyProductPackage
+     * @return 删除结果
+     */
+    public int physicalDelete(BizCompanyProductPackage bizCompanyProductPackage);
+
+}

+ 43 - 0
src/main/java/cn/ezhizao/project/business/companyProductPackage/service/impl/BizCompanyProductPackageServiceImpl.java

@@ -0,0 +1,43 @@
+package cn.ezhizao.project.business.companyProductPackage.service.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import cn.ezhizao.project.business.companyProductPackage.mapper.BizCompanyProductPackageMapper;
+import cn.ezhizao.project.business.companyProductPackage.domain.BizCompanyProductPackage;
+import cn.ezhizao.project.business.companyProductPackage.service.IBizCompanyProductPackageService;
+
+/**
+ * 产品包装客户关联Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2024-09-10
+ */
+@Service
+public class BizCompanyProductPackageServiceImpl  extends ServiceImpl<BizCompanyProductPackageMapper, BizCompanyProductPackage> implements IBizCompanyProductPackageService
+{
+    @Resource
+    private BizCompanyProductPackageMapper bizCompanyProductPackageMapper;
+
+    /**
+     * 查询产品包装客户关联列表
+     *
+     * @param bizCompanyProductPackage 产品包装客户关联
+     * @return 产品包装客户关联
+     */
+    @Override
+    public List<BizCompanyProductPackage> getList(BizCompanyProductPackage bizCompanyProductPackage)
+    {
+        return bizCompanyProductPackageMapper.getList(bizCompanyProductPackage);
+    }
+
+    /**
+     * 物理删除
+     * @param bizCompanyProductPackage
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizCompanyProductPackage bizCompanyProductPackage){ return bizCompanyProductPackageMapper.physicalDelete(bizCompanyProductPackage); };
+
+}

+ 52 - 0
src/main/resources/mybatis/business/companyProductPackage/BizCompanyProductPackageMapper.xml

@@ -0,0 +1,52 @@
+<?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="cn.ezhizao.project.business.companyProductPackage.mapper.BizCompanyProductPackageMapper">
+
+    <resultMap type="cn.ezhizao.project.business.companyProductPackage.domain.BizCompanyProductPackage" id="BizCompanyProductPackageResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizCompanyProductPackage" resultMap="BizCompanyProductPackageResult">
+        SELECT * FROM biz_company_product_package
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="productCode != null  and productCode != ''"> AND product_code = #{productCode}</if>
+            <if test="companyCode != null  and companyCode != ''"> AND company_code = #{companyCode}</if>
+            <if test="packageTypeCode != null  and packageTypeCode != ''"> AND package_type_code = #{packageTypeCode}</if>
+            <if test="productDescription != null  and productDescription != ''"> AND product_description = #{productDescription}</if>
+            <if test="mnemonicCode != null  and mnemonicCode != ''"> AND mnemonic_code = #{mnemonicCode}</if>
+            <if test="companyAlias != null  and companyAlias != ''"> AND company_alias = #{companyAlias}</if>
+            <if test="packageCode != null  and packageCode != ''"> AND package_code = #{packageCode}</if>
+            <if test="packageNo != null  and packageNo != ''"> AND package_no = #{packageNo}</if>
+            <if test="packageStandard != null  and packageStandard != ''"> AND package_standard = #{packageStandard}</if>
+            <if test="packageLength != null  and packageLength != ''"> AND package_length = #{packageLength}</if>
+            <if test="packageWidth != null  and packageWidth != ''"> AND package_width = #{packageWidth}</if>
+            <if test="packageHeight != null  and packageHeight != ''"> AND package_height = #{packageHeight}</if>
+            <if test="singleGrossWeight != null "> AND single_gross_weight = #{singleGrossWeight}</if>
+            <if test="singleNumber != null "> AND single_number = #{singleNumber}</if>
+            <if test="perNumber != null "> AND per_number = #{perNumber}</if>
+            <if test="minNumber != null "> AND min_number = #{minNumber}</if>
+            <if test="maxNumber != null "> AND max_number = #{maxNumber}</if>
+            <if test="maxBranchNumber != null "> AND max_branch_number = #{maxBranchNumber}</if>
+            <if test="palletStandard != null  and palletStandard != ''"> AND pallet_standard = #{palletStandard}</if>
+            <if test="palletType != null  and palletType != ''"> AND pallet_type = #{palletType}</if>
+            <if test="areaType != null  and areaType != ''"> AND area_type = #{areaType}</if>
+            <if test="unit != null  and unit != ''"> AND unit = #{unit}</if>
+            <if test="deliveryStatus != null  and deliveryStatus != ''"> AND delivery_status = #{deliveryStatus}</if>
+            <if test="outboxHeight != null "> AND outbox_height = #{outboxHeight}</if>
+        </trim>
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_company_product_package
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>