guoyujia 2 kuukautta sitten
vanhempi
commit
8f94a66a7f

+ 164 - 11
src/main/java/cn/ezhizao/project/business/controller/BizCompanyProductPackageController.java

@@ -6,8 +6,14 @@ 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 cn.ezhizao.project.business.domain.BizAccessories;
+import cn.ezhizao.project.business.domain.BizCompany;
 import cn.ezhizao.project.business.domain.BizCompanyProductPackage;
+import cn.ezhizao.project.business.domain.BizProduct;
+import cn.ezhizao.project.business.service.IBizAccessoriesService;
 import cn.ezhizao.project.business.service.IBizCompanyProductPackageService;
+import cn.ezhizao.project.business.service.IBizCompanyService;
+import cn.ezhizao.project.business.service.IBizProductService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -17,10 +23,11 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
 import java.util.List;
 
 /**
- * 产品包装客户关联Controller
+ * 包装方式Controller
  *
  * @author ezhizao
  * @date 2024-09-10
@@ -32,9 +39,15 @@ public class BizCompanyProductPackageController extends BaseController
 {
     @Resource
     private IBizCompanyProductPackageService bizCompanyProductPackageService;
+    @Resource
+    private IBizProductService bizProductService;
+    @Resource
+    private IBizCompanyService bizCompanyService;
+    @Resource
+    private IBizAccessoriesService bizAccessoriesService;
 
     /**
-     * 查询产品包装客户关联列表
+     * 查询包装方式列表
      */
     @ApiOperation("获取包装方式详细")
     @ApiImplicitParams({
@@ -42,7 +55,7 @@ public class BizCompanyProductPackageController extends BaseController
             @ApiImplicitParam(name = "packageCode", value = "包装箱辅料编码",  dataType = "String", paramType = "path", dataTypeClass = String.class),
             @ApiImplicitParam(name = "productCode", value = "产品编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
     })
-    @Log(title = "产品包装客户关联查询")
+    @Log(title = "包装方式查询")
     @GetMapping("/list")
     public TableDataInfo list(BizCompanyProductPackage bizCompanyProductPackage) throws NoSuchFieldException, IllegalAccessException
     {
@@ -51,9 +64,9 @@ public class BizCompanyProductPackageController extends BaseController
     }
 
     /**
-     * 获取产品包装客户关联详细信息
+     * 获取包装方式详细信息
      */
-    @Log(title = "产品包装客户关联查询详细信息")
+    @Log(title = "包装方式查询详细信息")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
@@ -61,29 +74,169 @@ public class BizCompanyProductPackageController extends BaseController
     }
 
     /**
-     * 新增产品包装客户关联
+     * 新增包装方式
      */
-    @Log(title = "产品包装客户关联新增", businessType = BusinessType.INSERT)
+    @ApiOperation("新增包装方式")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "productCode", value = "产品编码",required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "companyCode", value = "客户编码",required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageCode", value = "包装箱辅料编码",required = true,  dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageTypeCode", value = "包装形式码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageNo", value = "包装箱号", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageStandard", value = "包装尺寸", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageLength", value = "包装长度", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageWidth", value = "包装宽度", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageHeight", value = "包装箱高度", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "singleGrossWeight", value = "单箱毛重", dataType = "BigDecimal", paramType = "path", dataTypeClass = BigDecimal.class),
+            @ApiImplicitParam(name = "singleNumber", value = "单箱支数", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+            @ApiImplicitParam(name = "perNumber", value = "每层箱数", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+            @ApiImplicitParam(name = "minNumber", value = "满托最小箱数", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+            @ApiImplicitParam(name = "maxNumber", value = "满托最大箱数", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+            @ApiImplicitParam(name = "maxBranchNumber", value = "满托支数", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+            @ApiImplicitParam(name = "palletStandard", value = "托盘规格", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "palletType", value = "托盘类型", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "areaType", value = "放置区域", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "unit", value = "库存单位", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "deliveryStatus", value = "传送状态", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "outboxHeight", value = "外箱高度", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+            @ApiImplicitParam(name = "recipientName", value = "收货方", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packingOrder", value = "装运单", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "purchaseOrderNo", value = "采购订单号", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "customerPartNo", value = "客户零件编号", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "customerPartName", value = "客户零件名称", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "netWeight", value = "净重", dataType = "BigDecimal", paramType = "path", dataTypeClass = BigDecimal.class),
+            @ApiImplicitParam(name = "engineerChangeNumber", value = "工程变更号", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "supplierCode", value = "供应商编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "tenantId", value = "租户ID", dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+    })
+    @Log(title = "包装方式新增", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody BizCompanyProductPackage bizCompanyProductPackage) throws NoSuchFieldException, IllegalAccessException
     {
+        if(bizCompanyProductPackage.getProductCode() == null || bizCompanyProductPackage.getProductCode() == ""||bizCompanyProductPackage.getCompanyCode() == null || bizCompanyProductPackage.getCompanyCode() == "" || bizCompanyProductPackage.getPackageCode() == null || bizCompanyProductPackage.getPackageCode() == ""){
+            return error("新增包装方式失败,必填项:产品编码,客户编码,包装箱辅料编码不能为空");
+        }
+        if(bizCompanyProductPackage.getAreaType() != null && bizCompanyProductPackage.getAreaType() != "" && !(bizCompanyProductPackage.getAreaType().equals("Manual")|| bizCompanyProductPackage.getAreaType().equals("Automatic"))){
+            return error("新增包装方式失败,区域类型只能为1或2");
+        }
+        if(bizCompanyProductPackage.getPalletType() != null && bizCompanyProductPackage.getPalletType() != "" && !(bizCompanyProductPackage.getPalletType().equals("0" ) || bizCompanyProductPackage.getPalletType().equals("1"))){
+            return error("新增包装方式失败,托盘类型只能为0或1");
+        }
+        //查询产品编码是否存在
+        List<BizProduct> productList = bizProductService.query().eq("product_code", bizCompanyProductPackage.getProductCode()).list();
+        if(productList.isEmpty()){
+            return error("新增包装方式失败,产品编码不存在");
+        }
+        bizCompanyProductPackage.setProductId(productList.get(0).getId());
+        bizCompanyProductPackage.setProductDescription(productList.get(0).getDescription());
+        //查询客户编码是否存在
+        List<BizCompany> companyList = bizCompanyService.query().eq("company_code", bizCompanyProductPackage.getCompanyCode()).list();
+        if (companyList.isEmpty()){
+            return error("新增包装方式失败,客户编码不存在");
+        }
+        bizCompanyProductPackage.setCompanyId(companyList.get(0).getId());
+        bizCompanyProductPackage.setCompanyAlias(companyList.get(0).getCompanyAlias());
+        bizCompanyProductPackage.setMnemonicCode(companyList.get(0).getMnemonicCode());
+        //查询包装箱辅料编码是否存在
+        List<BizAccessories> accessoriesList = bizAccessoriesService.query().eq("accessories_code", bizCompanyProductPackage.getPackageCode()).list();
+        if(accessoriesList.isEmpty()){
+            return error("新增包装方式失败,包装箱辅料编码不存在");
+        }
+        bizCompanyProductPackage.setAccessoriesId(accessoriesList.get(0).getId());
         return toAjax(bizCompanyProductPackageService.save(bizCompanyProductPackage));
     }
 
     /**
-     * 修改产品包装客户关联
+     * 修改包装方式
      */
-    @Log(title = "产品包装客户关联修改", businessType = BusinessType.UPDATE)
+    @ApiOperation("修改包装方式")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "包装方式ID",required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+            @ApiImplicitParam(name = "productCode", value = "产品编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "companyCode", value = "客户编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageCode", value = "包装箱辅料编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageTypeCode", value = "包装形式码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageNo", value = "包装箱号", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageStandard", value = "包装尺寸", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageLength", value = "包装长度", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageWidth", value = "包装宽度", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packageHeight", value = "包装箱高度", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "singleGrossWeight", value = "单箱毛重", dataType = "BigDecimal", paramType = "path", dataTypeClass = BigDecimal.class),
+            @ApiImplicitParam(name = "singleNumber", value = "单箱支数", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+            @ApiImplicitParam(name = "perNumber", value = "每层箱数", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+            @ApiImplicitParam(name = "minNumber", value = "满托最小箱数", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+            @ApiImplicitParam(name = "maxNumber", value = "满托最大箱数", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+            @ApiImplicitParam(name = "maxBranchNumber", value = "满托支数", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+            @ApiImplicitParam(name = "palletStandard", value = "托盘规格", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "palletType", value = "托盘类型", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "areaType", value = "放置区域", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "unit", value = "库存单位", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "deliveryStatus", value = "传送状态", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "outboxHeight", value = "外箱高度", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+            @ApiImplicitParam(name = "recipientName", value = "收货方", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "packingOrder", value = "装运单", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "purchaseOrderNo", value = "采购订单号", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "customerPartNo", value = "客户零件编号", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "customerPartName", value = "客户零件名称", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "netWeight", value = "净重", dataType = "BigDecimal", paramType = "path", dataTypeClass = BigDecimal.class),
+            @ApiImplicitParam(name = "engineerChangeNumber", value = "工程变更号", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "supplierCode", value = "供应商编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "tenantId", value = "租户ID", dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+    })
+    @Log(title = "包装方式修改", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody BizCompanyProductPackage bizCompanyProductPackage) throws NoSuchFieldException, IllegalAccessException
     {
+        if(bizCompanyProductPackage.getId() == null){
+            return error("修改包装方式失败,包装方式ID不能为空");
+        }
+        if(bizCompanyProductPackage.getProductCode() == ""||bizCompanyProductPackage.getCompanyCode() == "" || bizCompanyProductPackage.getPackageCode() == ""){
+            return error("修改包装方式失败,产品编码,客户编码,包装箱辅料编码不能为空");
+        }
+        if(bizCompanyProductPackage.getAreaType() != null && bizCompanyProductPackage.getAreaType() != "" && !(bizCompanyProductPackage.getAreaType().equals("Manual") || bizCompanyProductPackage.getAreaType().equals("Automatic"))){
+            return error("修改包装方式失败,区域类型只能为1或2");
+        }
+        if(bizCompanyProductPackage.getPalletType() != null && bizCompanyProductPackage.getPalletType() != "" && !(bizCompanyProductPackage.getPalletType().equals("0" ) || bizCompanyProductPackage.getPalletType().equals("1"))){
+            return error("修改包装方式失败,托盘类型只能为0或1");
+        }
+        //查询产品编码是否存在
+        if(bizCompanyProductPackage.getProductCode() != null) {
+            List<BizProduct> productList = bizProductService.query().eq("product_code", bizCompanyProductPackage.getProductCode()).list();
+            if (productList.isEmpty()) {
+                return error("修改包装方式失败,产品编码不存在");
+            }
+            bizCompanyProductPackage.setProductId(productList.get(0).getId());
+            bizCompanyProductPackage.setProductDescription(productList.get(0).getDescription());
+        }
+        //查询客户编码是否存在
+        if(bizCompanyProductPackage.getCompanyCode() != null) {
+            List<BizCompany> companyList = bizCompanyService.query().eq("company_code", bizCompanyProductPackage.getCompanyCode()).list();
+            if (companyList.isEmpty()) {
+                return error("修改包装方式失败,客户编码不存在");
+            }
+            bizCompanyProductPackage.setCompanyId(companyList.get(0).getId());
+            bizCompanyProductPackage.setCompanyAlias(companyList.get(0).getCompanyAlias());
+            bizCompanyProductPackage.setMnemonicCode(companyList.get(0).getMnemonicCode());
+        }
+        //查询包装箱辅料编码是否存在
+        if(bizCompanyProductPackage.getPackageCode() != null) {
+            List<BizAccessories> accessoriesList = bizAccessoriesService.query().eq("accessories_code", bizCompanyProductPackage.getPackageCode()).list();
+            if (accessoriesList.isEmpty()) {
+                return error("修改包装方式失败,包装箱辅料编码不存在");
+            }
+            bizCompanyProductPackage.setAccessoriesId(accessoriesList.get(0).getId());
+        }
         return toAjax(bizCompanyProductPackageService.updateById(bizCompanyProductPackage));
     }
 
     /**
-     * 删除产品包装客户关联
+     * 删除包装方式
      */
-    @Log(title = "产品包装客户关联删除", businessType = BusinessType.DELETE)
+    @ApiOperation("删除包装方式")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "包装方式ID", required = true, dataType = "List<Long>", paramType = "path", dataTypeClass = List.class)
+    })
+    @Log(title = "包装方式删除", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable List<Long> ids)
     {

+ 39 - 39
src/main/java/cn/ezhizao/project/business/controller/BizSupplierController.java

@@ -54,12 +54,12 @@ public class BizSupplierController extends BaseController
     /**
      * 查询外协厂信息列表
      */
-            @ApiOperation("获取供应商详细")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "code", value = "供应商编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "name", value = "供应商名称",  dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "mnemonicCode", value = "供应商助记码", dataType = "String", paramType = "path", dataTypeClass = String.class),
-   })
+//            @ApiOperation("获取供应商详细")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "code", value = "供应商编码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "name", value = "供应商名称",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "mnemonicCode", value = "供应商助记码", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//   })
     @GetMapping("/list")
     public TableDataInfo list(BizSupplier bizSupplier) throws NoSuchFieldException, IllegalAccessException
     {
@@ -70,20 +70,20 @@ public class BizSupplierController extends BaseController
     /**
      * 新增外协厂信息
      */
-            @ApiOperation("新增供应商")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "tenantId", value = "租户ID",dataType = "Long", paramType = "path", dataTypeClass = Long.class),
-            @ApiImplicitParam(name = "code", value = "供应商编码", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "name", value = "供应商名称", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "alias", value = "供应商别名", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "mnemonicCode", value = "供应商助记码",required = true,  dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "deliveryMethod", value = "发货方式", dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "settlementType", value = "结算方式", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "freightPrice", value = "外协单价",  dataType = "BigDecimal", paramType = "path", dataTypeClass = BigDecimal.class),
-            @ApiImplicitParam(name = "lossLimit", value = "损耗上限", dataType = "BigDecimal", paramType = "path", dataTypeClass = BigDecimal.class),
-            @ApiImplicitParam(name = "remark", value = "备注",  dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "isInnerOutsource", value = "是否内部外协商", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
-    })
+//            @ApiOperation("新增供应商")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "tenantId", value = "租户ID",dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "code", value = "供应商编码", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "name", value = "供应商名称", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "alias", value = "供应商别名", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "mnemonicCode", value = "供应商助记码",required = true,  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "deliveryMethod", value = "发货方式", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "settlementType", value = "结算方式", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "freightPrice", value = "外协单价",  dataType = "BigDecimal", paramType = "path", dataTypeClass = BigDecimal.class),
+//            @ApiImplicitParam(name = "lossLimit", value = "损耗上限", dataType = "BigDecimal", paramType = "path", dataTypeClass = BigDecimal.class),
+//            @ApiImplicitParam(name = "remark", value = "备注",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "isInnerOutsource", value = "是否内部外协商", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+//    })
     @Log(title = "外协厂信息", businessType = BusinessType.INSERT)
     @PostMapping
     @Transactional
@@ -136,21 +136,21 @@ public class BizSupplierController extends BaseController
     /**
      * 修改外协厂信息
      */
-    @ApiOperation("修改供应商")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "供应商ID", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class),
-            @ApiImplicitParam(name = "tenantId", value = "租户ID",dataType = "Long", paramType = "path", dataTypeClass = Long.class),
-            @ApiImplicitParam(name = "code", value = "供应商编码",  dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "name", value = "供应商名称",  dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "alias", value = "供应商别名",  dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "mnemonicCode", value = "供应商助记码",  dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "deliveryMethod", value = "发货方式", dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "settlementType", value = "结算方式",  dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "freightPrice", value = "外协单价",  dataType = "BigDecimal", paramType = "path", dataTypeClass = BigDecimal.class),
-            @ApiImplicitParam(name = "lossLimit", value = "损耗上限", dataType = "BigDecimal", paramType = "path", dataTypeClass = BigDecimal.class),
-            @ApiImplicitParam(name = "remark", value = "备注",  dataType = "String", paramType = "path", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "isInnerOutsource", value = "是否内部外协商", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
-    })
+//    @ApiOperation("修改供应商")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "id", value = "供应商ID", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "tenantId", value = "租户ID",dataType = "Long", paramType = "path", dataTypeClass = Long.class),
+//            @ApiImplicitParam(name = "code", value = "供应商编码",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "name", value = "供应商名称",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "alias", value = "供应商别名",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "mnemonicCode", value = "供应商助记码",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "deliveryMethod", value = "发货方式", dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "settlementType", value = "结算方式",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "freightPrice", value = "外协单价",  dataType = "BigDecimal", paramType = "path", dataTypeClass = BigDecimal.class),
+//            @ApiImplicitParam(name = "lossLimit", value = "损耗上限", dataType = "BigDecimal", paramType = "path", dataTypeClass = BigDecimal.class),
+//            @ApiImplicitParam(name = "remark", value = "备注",  dataType = "String", paramType = "path", dataTypeClass = String.class),
+//            @ApiImplicitParam(name = "isInnerOutsource", value = "是否内部外协商", dataType = "Integer", paramType = "path", dataTypeClass = Integer.class),
+//    })
     @Log(title = "外协厂信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody BizSupplier bizSupplier) throws NoSuchFieldException, IllegalAccessException
@@ -195,10 +195,10 @@ public class BizSupplierController extends BaseController
     /**
      * 删除外协厂信息
      */
-            @ApiOperation("删除外协商")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "供应商ID", required = true, dataType = "List<Long>", paramType = "path", dataTypeClass = List.class)
-    })
+//            @ApiOperation("删除外协商")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "id", value = "供应商ID", required = true, dataType = "List<Long>", paramType = "path", dataTypeClass = List.class)
+//    })
     @Log(title = "外协厂信息", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable List<Long> ids)

+ 182 - 0
src/main/java/cn/ezhizao/project/business/domain/BizAccessories.java

@@ -0,0 +1,182 @@
+package cn.ezhizao.project.business.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 辅料管理对象 biz_accessories
+ *
+ * @author ezhizao
+ * @date 2024-09-09
+ */
+@Data
+@TableName(value = "biz_accessories")
+public class BizAccessories extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 辅料编号 */
+    @Excel(name = "辅料编号")
+    @ApiModelProperty(value = "辅料编号")
+    private String accessoriesCode;
+
+    /** 账号 */
+    @Excel(name = "账号")
+    @ApiModelProperty(value = "账号")
+    private String itype;
+
+    /** 主管部门 */
+    @Excel(name = "主管部门")
+    @ApiModelProperty(value = "主管部门")
+    private String cusven;
+
+    /** 物料描述 */
+    @Excel(name = "物料描述")
+    @ApiModelProperty(value = "物料描述")
+    private String description;
+
+    /** 采购单位 */
+    @Excel(name = "采购单位")
+    @ApiModelProperty(value = "采购单位")
+    private String unit;
+
+    /** 建立者 */
+    @Excel(name = "建立者")
+    @ApiModelProperty(value = "建立者")
+    private String cruser;
+
+    /** 修改日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "修改日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "修改日期")
+    private Date mddate;
+
+    /** 修改者 */
+    @Excel(name = "修改者")
+    @ApiModelProperty(value = "修改者")
+    private String mduser;
+
+    /** 换算单位 */
+    @Excel(name = "换算单位")
+    @ApiModelProperty(value = "换算单位")
+    private String pouom;
+
+    /** 环保大类码501\502\503\504 */
+    @Excel(name = "环保大类码501\502\503\504")
+    @ApiModelProperty(value = "环保大类码501\502\503\504")
+    private String htype;
+
+    /** 环保大类简称 */
+    @Excel(name = "环保大类简称")
+    @ApiModelProperty(value = "环保大类简称")
+    private String htyna;
+
+    /** 操作者 */
+    @Excel(name = "操作者")
+    @ApiModelProperty(value = "操作者")
+    private String writeruser;
+
+    /** 月用量 */
+    @Excel(name = "月用量")
+    @ApiModelProperty(value = "月用量")
+    private BigDecimal monthUseAmount;
+
+    /** 类别 备库物资 */
+    @Excel(name = "类别 备库物资")
+    @ApiModelProperty(value = "类别 备库物资")
+    private String ltype;
+
+    /** 交货天数 */
+    @Excel(name = "交货天数")
+    @ApiModelProperty(value = "交货天数")
+    private Long deliveryDate;
+
+    /** 安全库存量 */
+    @Excel(name = "安全库存量")
+    @ApiModelProperty(value = "安全库存量")
+    private BigDecimal safetyStock;
+
+    /** 单价 */
+    @Excel(name = "单价")
+    @ApiModelProperty(value = "单价")
+    private BigDecimal price;
+
+    /** NA 正常FM封存 CL 停用 */
+    @Excel(name = "NA 正常FM封存 CL 停用")
+    @ApiModelProperty(value = "NA 正常FM封存 CL 停用")
+    private String status;
+
+    /** 建立日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "建立日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "建立日期")
+    private Date crdate;
+
+    /** 环保标志Y-有环保要求N-无 */
+    @Excel(name = "环保标志Y-有环保要求N-无")
+    @ApiModelProperty(value = "环保标志Y-有环保要求N-无")
+    private String ecoMark;
+
+    /** 单位换算比例 */
+    @Excel(name = "单位换算比例")
+    @ApiModelProperty(value = "单位换算比例")
+    private BigDecimal conversionRatio;
+
+    /** 更新日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "更新日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "更新日期")
+    private Date writedate;
+
+    /** 包装箱尺寸 */
+    @Excel(name = "包装箱尺寸")
+    @ApiModelProperty(value = "包装箱尺寸")
+    private String packageStandard;
+
+    /** 美捷原系统物料编码 */
+    @Excel(name = "美捷原系统物料编码")
+    @ApiModelProperty(value = "美捷原系统物料编码")
+    private String ypart;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal yamt;
+
+    /** 当月加权平均单价(未税) */
+    @Excel(name = "当月加权平均单价", readConverterExp = "未=税")
+    @ApiModelProperty(value = "当月加权平均单价")
+    private BigDecimal monthAvgPrice;
+
+    /** 可变费/固定费=K/G */
+    @Excel(name = "可变费/固定费=K/G")
+    @ApiModelProperty(value = "可变费/固定费=K/G")
+    private String ftype;
+
+    /** 领用计费形式整体/天数/产量(Z/T/C)整体就是不可分割领用后全部消耗 */
+    @Excel(name = "领用计费形式整体/天数/产量(Z/T/C)整体就是不可分割领用后全部消耗")
+    @ApiModelProperty(value = "领用计费形式整体/天数/产量(Z/T/C)整体就是不可分割领用后全部消耗")
+    private String ktype;
+
+    /** 标准寿命天数:从领用日起开始计算使用天数(按月计算) */
+    @Excel(name = "标准寿命天数:从领用日起开始计算使用天数(按月计算)")
+    @ApiModelProperty(value = "标准寿命天数:从领用日起开始计算使用天数(按月计算)")
+    private Long ktyts;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String facno;
+
+    /** 租户id */
+    @ApiModelProperty(value = "${comment}")
+    private Long tenantId;
+
+}

+ 13 - 12
src/main/java/cn/ezhizao/project/business/domain/BizCompanyProductPackage.java

@@ -1,19 +1,18 @@
 package cn.ezhizao.project.business.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.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-
-import java.math.BigDecimal;
+import io.swagger.annotations.ApiModelProperty;
 
 /**
  * 产品包装客户关联对象 biz_company_product_package
  *
  * @author ezhizao
- * @date 2024-09-10
+ * @date 2024-09-04
  */
 @Data
 @TableName(value = "biz_company_product_package")
@@ -59,10 +58,6 @@ public class BizCompanyProductPackage extends BaseEntity
     @ApiModelProperty(value = "客户简称")
     private String companyAlias;
 
-    @Excel(name = "包装外键")
-    @ApiModelProperty(value = "包装外键")
-    private Long accessoriesId;
-
     /** 包装箱辅料编码 */
     @Excel(name = "包装箱辅料编码")
     @ApiModelProperty(value = "包装箱辅料编码")
@@ -157,7 +152,13 @@ public class BizCompanyProductPackage extends BaseEntity
     @ApiModelProperty(value = "外箱高度")
     private Long tenantId;
 
-    @TableField(exist = true)
-    private String remark;
-
+    private Long accessoriesId;
+    private String recipientName;
+    private String packingOrder;
+    private String purchaseOrderNo;
+    private String customerPartNo;
+    private String customerPartName;
+    private String netWeight;
+    private String engineerChangeNumber;
+    private String supplierCode;
 }

+ 177 - 0
src/main/java/cn/ezhizao/project/business/domain/BizProduct.java

@@ -0,0 +1,177 @@
+package cn.ezhizao.project.business.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 产品管理对象 biz_product
+ *
+ * @author ezhizao
+ * @date 2023-11-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName(value = "biz_product")
+public class BizProduct extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 料号 */
+    @Excel(name = "料号")
+    @ApiModelProperty(value = "料号")
+    private String productCode;
+
+    /** 预入仓库 */
+    @Excel(name = "预入仓库")
+    @ApiModelProperty(value = "预入仓库")
+    private String preStock;
+
+    /** 类别9:成品8:半成品 */
+    @Excel(name = "类别9:成品8:半成品")
+    @ApiModelProperty(value = "类别9:成品8:半成品")
+    private String type;
+
+    /** 租户id */
+    @ApiModelProperty(value = "${comment}")
+    private Long tenantId;
+
+    /** 轴类型大类id */
+    @Excel(name = "轴类型大类id")
+    @ApiModelProperty(value = "轴类型大类id")
+    private Long shaftBroadCategoryId;
+
+    /** 轴类型大类A=视窗系统零部件B=动力系统零部件C=车身及底盘系统零部件D=工业精密零部件 */
+    @Excel(name = "轴类型大类A=视窗系统零部件B=动力系统零部件C=车身及底盘系统零部件D=工业精密零部件")
+    @ApiModelProperty(value = "轴类型大类A=视窗系统零部件B=动力系统零部件C=车身及底盘系统零部件D=工业精密零部件")
+    private String shaftBroadCategoryCode;
+
+    /** 轴类型id */
+    @ApiModelProperty(value = "轴类型大类A=视窗系统零部件B=动力系统零部件C=车身及底盘系统零部件D=工业精密零部件")
+    private Long shaftCategoryId;
+
+    /** 轴类型=基本上=SCLASS */
+    @Excel(name = "轴类型=基本上=SCLASS")
+    @ApiModelProperty(value = "轴类型=基本上=SCLASS")
+    private String shaftCategoryCode;
+
+    /** 规格,不允许出现下划线_ */
+    @Excel(name = "规格,不允许出现下划线_")
+    @ApiModelProperty(value = "规格,不允许出现下划线_")
+    private String specification;
+
+    /** 图号,不允许出现下划线_ */
+    @Excel(name = "图号,不允许出现下划线_")
+    @ApiModelProperty(value = "图号,不允许出现下划线_")
+    private String drawingNumber;
+
+    /** 客户集团简称,产品描述用 */
+    @Excel(name = "客户集团简称,产品描述用")
+    @ApiModelProperty(value = "客户集团简称,产品描述用")
+    private String companyAlias;
+
+    /** =客户简称_图号_规格 */
+    @Excel(name = "=客户简称_图号_规格")
+    @ApiModelProperty(value = "=客户简称_图号_规格")
+    private String description;
+
+    /** 生产单位(租户id) */
+    @ApiModelProperty(value = "=客户简称_图号_规格")
+    private Long productionTenantId;
+
+    /** 直径 */
+    @Excel(name = "直径")
+    @ApiModelProperty(value = "直径")
+    private BigDecimal diameter;
+    /** 成品长度 */
+    @Excel(name = "成品长度")
+    @ApiModelProperty(value = "成品长度")
+    private BigDecimal lenght;
+
+    /** 厚度 */
+    @Excel(name = "厚度")
+    @ApiModelProperty(value = "厚度")
+    private BigDecimal thickness;
+
+    /** 客户id */
+    @ApiModelProperty(value = "厚度")
+    private Long companyId;
+
+    /** 客户代号 */
+    @Excel(name = "客户代号")
+    @ApiModelProperty(value = "客户代号")
+    private String companyCode;
+    /** 客户代号 */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    /** 销售员id */
+    @ApiModelProperty(value = "客户代号")
+    private Long salesmanId;
+
+    /** 销售员编码 */
+    @Excel(name = "销售员编码")
+    @ApiModelProperty(value = "销售员编码")
+    private String salesmanCode;
+
+    /** 保管员id(对应sys_user的id) */
+    @ApiModelProperty(value = "销售员编码")
+    private Long stockKeeperId;
+
+    /** 保管员编码 */
+    @Excel(name = "保管员编码")
+    @ApiModelProperty(value = "保管员编码")
+    private String stockKeeperCode;
+
+    /** 调度员id(对应员工id) */
+    @ApiModelProperty(value = "保管员编码")
+    private Long dispatcherId;
+
+    /** 调度员编号(对应员工编码) */
+    @Excel(name = "调度员编号", readConverterExp = "对=应员工编码")
+    @ApiModelProperty(value = "调度员编号")
+    private String dispatcherCode;
+
+    /** 产品状态:NA:正常;CL:不用;OP:封存 */
+    @Excel(name = "产品状态:NA:正常;CL:不用;OP:封存")
+    @ApiModelProperty(value = "产品状态:NA:正常;CL:不用;OP:封存")
+    private String productStatusCode;
+
+    /** 产品状态id(对应数据字典id) */
+    @ApiModelProperty(value = "产品状态:NA:正常;CL:不用;OP:封存")
+    private Long productStatusId;
+
+    /** 生产类型id */
+    @ApiModelProperty(value = "产品状态:NA:正常;CL:不用;OP:封存")
+    private Long productionTypeId;
+
+    /** 生产类型(Y:样品;N:量产;T:图号升级) */
+    @Excel(name = "生产类型", readConverterExp = "Y=:样品;N:量产;T:图号升级")
+    @ApiModelProperty(value = "生产类型")
+    private String productionTypeCode;
+
+    /** 技术员id(对应sys_user的id) */
+    @ApiModelProperty(value = "生产类型")
+    private Long technicianId;
+
+    /** 技术员编码 */
+    @Excel(name = "技术员编码")
+    @ApiModelProperty(value = "技术员编码")
+    private String technicianCode;
+
+    /** 创建者编码 */
+    @Excel(name = "创建者编码")
+    @ApiModelProperty(value = "创建者编码")
+    private String creatorCode;
+
+}

+ 30 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizAccessoriesMapper.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.mapper;
+
+import cn.ezhizao.project.business.domain.BizAccessories;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * 辅料管理Mapper接口
+ *
+ * @author ezhizao
+ * @date 2024-09-09
+ */
+public interface BizAccessoriesMapper extends BaseMapper<BizAccessories>
+{
+    /**
+     * 查询辅料管理列表
+     *
+     * @param bizAccessories 辅料管理
+     * @return 辅料管理集合
+     */
+    public List<BizAccessories> getList(BizAccessories bizAccessories);
+
+    /**
+     * 物理删除
+     * @param bizAccessories
+     * @return 删除结果
+    */
+    public int physicalDelete(BizAccessories bizAccessories);
+}

+ 30 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizProductMapper.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.mapper;
+
+import cn.ezhizao.project.business.domain.BizProduct;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * 产品管理Mapper接口
+ *
+ * @author ezhizao
+ * @date 2023-11-13
+ */
+public interface BizProductMapper extends BaseMapper<BizProduct>
+{
+    /**
+     * 查询产品管理列表
+     *
+     * @param bizProduct 产品管理
+     * @return 产品管理集合
+     */
+    public List<BizProduct> getList(BizProduct bizProduct);
+
+    /**
+     * 物理删除
+     * @param bizProduct 待删除项
+     * @return 删除结果
+    */
+    public int physicalDelete(BizProduct bizProduct);
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/service/IBizAccessoriesService.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.service;
+
+import cn.ezhizao.project.business.domain.BizAccessories;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 辅料管理Service接口
+ *
+ * @author ezhizao
+ * @date 2024-09-09
+ */
+public interface IBizAccessoriesService extends IService<BizAccessories>
+{
+    /**
+     * 查询辅料管理列表
+     *
+     * @param bizAccessories 辅料管理
+     * @return 辅料管理集合
+     */
+    public List<BizAccessories> getList(BizAccessories bizAccessories);
+
+    /**
+     * 物理删除
+     * @param bizAccessories
+     * @return 删除结果
+     */
+    public int physicalDelete(BizAccessories bizAccessories);
+
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/service/IBizProductService.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.service;
+
+import cn.ezhizao.project.business.domain.BizProduct;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 产品管理Service接口
+ *
+ * @author ezhizao
+ * @date 2023-11-13
+ */
+public interface IBizProductService extends IService<BizProduct>
+{
+    /**
+     * 查询产品管理列表
+     *
+     * @param bizProduct 产品管理
+     * @return 产品管理集合
+     */
+    List<BizProduct> getList(BizProduct bizProduct);
+
+    /**
+     * 物理删除
+     * @param bizProduct
+     * @return 删除结果
+     */
+    int physicalDelete(BizProduct bizProduct);
+
+}

+ 44 - 0
src/main/java/cn/ezhizao/project/business/service/impl/BizAccessoriesServiceImpl.java

@@ -0,0 +1,44 @@
+package cn.ezhizao.project.business.service.impl;
+
+import cn.ezhizao.project.business.domain.BizAccessories;
+import cn.ezhizao.project.business.mapper.BizAccessoriesMapper;
+import cn.ezhizao.project.business.service.IBizAccessoriesService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 辅料管理Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2024-09-09
+ */
+@Service
+public class BizAccessoriesServiceImpl extends ServiceImpl<BizAccessoriesMapper, BizAccessories> implements IBizAccessoriesService
+{
+    @Resource
+    private BizAccessoriesMapper bizAccessoriesMapper;
+
+    /**
+     * 查询辅料管理列表
+     *
+     * @param bizAccessories 辅料管理
+     * @return 辅料管理
+     */
+    @Override
+    public List<BizAccessories> getList(BizAccessories bizAccessories)
+    {
+        return bizAccessoriesMapper.getList(bizAccessories);
+    }
+
+    /**
+     * 物理删除
+     * @param bizAccessories
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizAccessories bizAccessories){ return bizAccessoriesMapper.physicalDelete(bizAccessories); };
+
+}

+ 44 - 0
src/main/java/cn/ezhizao/project/business/service/impl/BizProductServiceImpl.java

@@ -0,0 +1,44 @@
+package cn.ezhizao.project.business.service.impl;
+
+import cn.ezhizao.project.business.domain.BizProduct;
+import cn.ezhizao.project.business.mapper.BizProductMapper;
+import cn.ezhizao.project.business.service.IBizProductService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 产品管理Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2023-11-13
+ */
+@Service
+public class BizProductServiceImpl extends ServiceImpl<BizProductMapper, BizProduct> implements IBizProductService
+{
+    @Resource
+    private BizProductMapper bizProductMapper;
+
+    /**
+     * 查询产品管理列表
+     *
+     * @param bizProduct 产品管理
+     * @return 产品管理
+     */
+    @Override
+    public List<BizProduct> getList(BizProduct bizProduct)
+    {
+        return bizProductMapper.getList(bizProduct);
+    }
+
+    /**
+     * 物理删除
+     * @param bizProduct 待删除
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizProduct bizProduct){ return bizProductMapper.physicalDelete(bizProduct); }
+
+}

+ 58 - 0
src/main/resources/mybatis/business/BizAccessoriesMapper.xml

@@ -0,0 +1,58 @@
+<?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.mapper.BizAccessoriesMapper">
+
+    <resultMap type="cn.ezhizao.project.business.domain.BizAccessories" id="BizAccessoriesResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizAccessories" resultMap="BizAccessoriesResult">
+        SELECT * FROM biz_accessories
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="accessoriesCode != null  and accessoriesCode != ''"> AND accessories_code like concat('%',#{accessoriesCode},'%')</if>
+            <if test="itype != null  and itype != ''"> AND itype = #{itype}</if>
+            <if test="cusven != null  and cusven != ''"> AND cusven = #{cusven}</if>
+            <if test="description != null  and description != ''"> AND description like concat('%',#{description},'%')</if>
+            <if test="unit != null  and unit != ''"> AND unit = #{unit}</if>
+            <if test="cruser != null  and cruser != ''"> AND cruser = #{cruser}</if>
+            <if test="mddate != null "> AND mddate = #{mddate}</if>
+            <if test="mduser != null  and mduser != ''"> AND mduser = #{mduser}</if>
+            <if test="pouom != null  and pouom != ''"> AND pouom = #{pouom}</if>
+            <if test="htype != null  and htype != ''"> AND htype = #{htype}</if>
+            <if test="htyna != null  and htyna != ''"> AND htyna = #{htyna}</if>
+            <if test="writeruser != null  and writeruser != ''"> AND writeruser = #{writeruser}</if>
+            <if test="monthUseAmount != null "> AND month_use_amount = #{monthUseAmount}</if>
+            <if test="ltype != null  and ltype != ''"> AND ltype = #{ltype}</if>
+            <if test="deliveryDate != null "> AND delivery_date = #{deliveryDate}</if>
+            <if test="safetyStock != null "> AND safety_stock = #{safetyStock}</if>
+            <if test="price != null "> AND price = #{price}</if>
+            <if test="status != null  and status != ''"> AND status = #{status}</if>
+            <if test="crdate != null "> AND crdate = #{crdate}</if>
+            <if test="ecoMark != null  and ecoMark != ''"> AND eco_mark = #{ecoMark}</if>
+            <if test="conversionRatio != null "> AND conversion_ratio = #{conversionRatio}</if>
+            <if test="writedate != null "> AND writedate = #{writedate}</if>
+            <if test="packageStandard != null  and packageStandard != ''"> AND package_standard = #{packageStandard}</if>
+            <if test="ypart != null  and ypart != ''"> AND ypart = #{ypart}</if>
+            <if test="yamt != null "> AND yamt = #{yamt}</if>
+            <if test="monthAvgPrice != null "> AND month_avg_price = #{monthAvgPrice}</if>
+            <if test="ftype != null  and ftype != ''"> AND ftype = #{ftype}</if>
+            <if test="ktype != null  and ktype != ''"> AND ktype = #{ktype}</if>
+            <if test="ktyts != null "> AND ktyts = #{ktyts}</if>
+            <if test="facno != null  and facno != ''"> AND facno = #{facno}</if>
+        </trim>
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_accessories
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>

+ 48 - 0
src/main/resources/mybatis/business/BizProductMapper.xml

@@ -0,0 +1,48 @@
+<?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.mapper.BizProductMapper">
+
+    <resultMap type="cn.ezhizao.project.business.domain.BizProduct" id="BizProductResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+    <select id="getList" parameterType="BizProduct" resultMap="BizProductResult">
+        SELECT * FROM biz_product
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="id!=null and id!=''"> AND id = #{id}</if>
+            <if test="productCode != null  and productCode != ''"> AND product_code like CONCAT('%', #{productCode}, '%')</if>
+            <if test="preStock != null  and preStock != ''"> AND pre_stock = #{preStock}</if>
+            <if test="type != null  and type != ''"> AND type = #{type}</if>
+            <if test="shaftBroadCategoryCode != null  and shaftBroadCategoryCode != ''"> AND shaft_broad_category_code = #{shaftBroadCategoryCode}</if>
+            <if test="shaftCategoryCode != null  and shaftCategoryCode != ''"> AND shaft_category_code = #{shaftCategoryCode}</if>
+            <if test="specification != null  and specification != ''"> AND specification LIKE CONCAT('%', #{specification}, '%')</if>
+            <if test="drawingNumber != null  and drawingNumber != ''"> AND drawing_number LIKE CONCAT('%',#{drawingNumber},'%')</if>
+            <if test="companyAlias != null  and companyAlias != ''">  AND company_alias LIKE CONCAT('%', #{companyAlias}, '%')</if>
+            <if test="description != null  and description != ''"> AND description like concat('%',#{description},'%')</if>
+            <if test="diameter != null "> AND diameter = #{diameter}</if>
+            <if test="lenght != null "> AND lenght = #{lenght}</if>
+            <if test="thickness != null "> AND thickness = #{thickness}</if>
+            <if test="companyCode != null  and companyCode != ''"> AND company_code = #{companyCode}</if>
+            <if test="salesmanCode != null  and salesmanCode != ''"> AND salesman_code = #{salesmanCode}</if>
+            <if test="stockKeeperCode != null  and stockKeeperCode != ''"> AND stock_keeper_code = #{stockKeeperCode}</if>
+            <if test="dispatcherCode != null  and dispatcherCode != ''"> AND dispatcher_code = #{dispatcherCode}</if>
+            <if test="productStatusCode != null  and productStatusCode != ''"> AND product_status_code = #{productStatusCode}</if>
+            <if test="productionTypeCode != null  and productionTypeCode != ''"> AND production_type_code = #{productionTypeCode}</if>
+            <if test="technicianCode != null  and technicianCode != ''"> AND technician_code = #{technicianCode}</if>
+            <if test="creatorCode != null  and creatorCode != ''"> AND creator_code = #{creatorCode}</if>
+            <if test="tenantId != null  and tenantId != 0"> AND tenant_id = #{tenantId}</if>
+        </trim>
+    </select>
+    <delete id="physicalDelete">
+        DELETE FROM biz_product
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>