guoyujia 2 kuukautta sitten
vanhempi
commit
68ef697fce

+ 1324 - 0
src/main/java/cn/ezhizao/project/business/controller/BizProductAccessoriesMaterialController.java

@@ -0,0 +1,1324 @@
+package cn.ezhizao.project.business.controller;
+
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.stream.Collectors;
+import javax.annotation.Resource;
+
+import cn.ezhizao.common.core.text.Convert;
+import cn.ezhizao.common.utils.ServletUtils;
+import cn.ezhizao.common.utils.StringUtils;
+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.PageDomain;
+import cn.ezhizao.framework.web.page.TableDataInfo;
+import cn.ezhizao.framework.web.page.TableSupport;
+import cn.ezhizao.project.business.domain.*;
+import cn.ezhizao.project.business.service.*;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import io.swagger.annotations.Api;
+import org.apache.commons.lang3.math.NumberUtils;
+import org.springframework.transaction.annotation.Transactional;
+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 static cn.ezhizao.framework.web.page.TableSupport.PAGE_SIZE;
+
+/**
+ * 客户名称Controller
+ *
+ * @author ezhizao
+ * @date 2025-04-09
+ */
+@Api("公司管理")
+@RestController
+@RequestMapping("/business/productAccessoriesMaterial")
+public class BizProductAccessoriesMaterialController extends BaseController
+{
+    @Resource
+    private IBizProductService bizProductService;
+    @Resource
+    private IBizTenantService bizTenantService;
+    @Resource
+    private IBizAccessoriesService bizAccessoriesService;
+    @Resource
+    private IBizMaterialBaseService bizMaterialBaseService;
+    public static final String PAGE_SIZE = "pageSize";
+
+    @GetMapping("/list")
+    public AjaxResult list(BizProductAccessoriesMaterial bizProductAccessoriesMaterial) throws NoSuchFieldException, IllegalAccessException
+    {
+        //判断类别
+        if(bizProductAccessoriesMaterial.getCategory() == null){
+            return error("查询失败,类别不能为空");
+        }
+        if(bizProductAccessoriesMaterial.getCategory() != 1 && bizProductAccessoriesMaterial.getCategory() != 2 && bizProductAccessoriesMaterial.getCategory() != 3){
+            return error("查询失败,类别只能为1、2、3");
+        }
+      //判断厂别
+        if(bizProductAccessoriesMaterial.getTenantId() != null){
+            List<BizTenant> tenantList = bizTenantService.query().eq("id", bizProductAccessoriesMaterial.getTenantId()).list();
+            if(tenantList.isEmpty()){
+                return error("查询失败,租户ID不存在");
+            }
+        }
+        String pageSizeStr = ServletUtils.getParameter(PAGE_SIZE);
+        if (pageSizeStr !=null) {
+            startPage(); // 若依的分页方法
+        }
+        //类别为1 product
+        if(bizProductAccessoriesMaterial.getCategory() == 1){
+            BizProduct bizProduct = new BizProduct();
+            if(bizProductAccessoriesMaterial.getTenantId() != null){
+                bizProduct.setTenantId(bizProductAccessoriesMaterial.getTenantId());
+            }
+            if(bizProductAccessoriesMaterial.getProductCode() != null && bizProductAccessoriesMaterial.getProductCode() != ""){
+                bizProduct.setProductCode(bizProductAccessoriesMaterial.getProductCode());
+            }
+            return success(bizProductService.getList(bizProduct));
+        }
+        //类别为2 accessories
+        if(bizProductAccessoriesMaterial.getCategory() == 2){
+            BizAccessories bizAccessories = new BizAccessories();
+            if(bizProductAccessoriesMaterial.getTenantId() != null){
+                bizAccessories.setTenantId(bizProductAccessoriesMaterial.getTenantId());
+            }
+            if(bizProductAccessoriesMaterial.getAccessoriesCode() != null && bizProductAccessoriesMaterial.getAccessoriesCode() != ""){
+                bizAccessories.setAccessoriesCode(bizProductAccessoriesMaterial.getAccessoriesCode());
+            }
+            return success(bizAccessoriesService.getList(bizAccessories));
+        }
+        //类别为3 material
+        if(bizProductAccessoriesMaterial.getCategory() == 3){
+            BizMaterialBase bizMaterialBase = new BizMaterialBase();
+            if(bizProductAccessoriesMaterial.getTenantId() != null){
+                bizMaterialBase.setTenantId(bizProductAccessoriesMaterial.getTenantId());
+            }
+            if(bizProductAccessoriesMaterial.getMaterialCode() != null && bizProductAccessoriesMaterial.getMaterialCode() != ""){
+                bizMaterialBase.setMaterialCode(bizProductAccessoriesMaterial.getMaterialCode());
+            }
+            return success(bizMaterialBaseService.getList(bizMaterialBase));
+        }
+        return success();
+    }
+
+    @PostMapping
+    @Transactional
+    public AjaxResult add(@RequestBody List<BizProductAccessoriesMaterial> bizProductAccessoriesMaterialList) throws NoSuchFieldException, IllegalAccessException
+    {
+        //判断传入的个数
+        if(bizProductAccessoriesMaterialList.size() == 0){
+            throw new RuntimeException("新增失败,数据不能为空");
+        }
+        if(bizProductAccessoriesMaterialList.size() >100) {
+            Set<Integer> categorySet = bizProductAccessoriesMaterialList.stream()
+                    .filter(Objects::nonNull) // 确保对象本身不为 null
+                    .map(BizProductAccessoriesMaterial::getCategory)
+                    .filter(Objects::nonNull) // 过滤掉 category 为 null 的值
+                    .collect(Collectors.toSet());
+
+            List<Integer> categoryList = new ArrayList<>(categorySet);
+            if (categoryList.size() > 1) {
+                throw new RuntimeException("新增失败,数据过多,不允许超过100条");
+            } else {
+                if (categoryList.isEmpty()) {
+                    throw new RuntimeException("新增失败,类别不能为空");
+                } else {
+                    Integer firstCategory = categoryList.get(0);
+                    String categoryType = firstCategory.equals(1) ? "产品" : firstCategory.equals(2) ? "辅料" : "原材料";
+                    throw new RuntimeException("新增失败:" + categoryType + "不允许超过100条");
+                }
+            }
+        }else {
+            if (bizProductAccessoriesMaterialList.stream().anyMatch(material -> material.getCategory() == null)) {
+                throw new RuntimeException("新增失败,类别不能为空");
+            }
+            if (bizProductAccessoriesMaterialList.stream().anyMatch(material ->  material.getCategory() != 1 && material.getCategory() != 2 && material.getCategory() != 3)) {
+                throw new RuntimeException("新增失败,类别只能为1、2、3");
+            }
+            //查询厂别是否存在
+            Set<Long> tenantSet = bizProductAccessoriesMaterialList.stream()
+                    .filter(Objects::nonNull)
+                    .map(BizProductAccessoriesMaterial::getTenantId)
+                    .filter(Objects::nonNull)
+                    .collect(Collectors.toSet());
+
+            List<Long> tenantIdsList = new ArrayList<>(tenantSet);
+            if (tenantIdsList.size() > 1) {
+                List<BizTenant> tenantList = bizTenantService.query().in("id", tenantIdsList).list();
+                if(tenantList.isEmpty() || tenantList.size() != tenantIdsList.size()){
+                    throw new RuntimeException("新增失败,厂别不存在");
+                }
+            }
+            //产品
+            List<BizProductAccessoriesMaterial> productCollect = bizProductAccessoriesMaterialList.stream().filter(item -> item.getCategory() == 1).collect(Collectors.toList());
+            if(!productCollect.isEmpty()){
+                if (productCollect.stream().anyMatch(material -> material.getProductCode() == null)) {
+                    throw new RuntimeException("新增失败,产品编码不能为空");
+                }
+                //判断产品编码是否有重复
+                List<String> productCodes = productCollect.stream()
+                        .map(BizProductAccessoriesMaterial::getProductCode)
+                        .collect(Collectors.toList());
+                Set<String> uniqueProductCodes = new HashSet<>(productCodes);
+                if (productCodes.size() != uniqueProductCodes.size()) {
+                    throw new RuntimeException("新增失败,产品编码不能重复");
+                } else {
+                    //新增的产品编码没有重复
+                    //判断数据库是否存在相同的产品编码
+                    List<BizProduct> bizProductList = bizProductService.query().in("product_code", productCodes).list();
+                        if (!bizProductList.isEmpty()){
+                            return error("新增失败,存在重复的产品编码");
+                        }else{
+                            List<BizProduct> productList = new ArrayList<>();
+                            for (BizProductAccessoriesMaterial product : productCollect) {
+                                BizProduct bizProduct = new BizProduct();
+                                bizProduct.setTenantId(product.getTenantId() != null ? product.getTenantId() : 0L);
+                                bizProduct.setProductCode(product.getProductCode() != null ? product.getProductCode() : "");
+                                bizProduct.setPreStock(product.getPreStock() != null ? product.getPreStock() : "");
+                                bizProduct.setType(product.getType() != null ? product.getType() : "");
+                                bizProduct.setShaftBroadCategoryId(product.getShaftBroadCategoryId() != null ? product.getShaftBroadCategoryId() : 0L);
+                                bizProduct.setShaftBroadCategoryCode(product.getShaftBroadCategoryCode() != null ? product.getShaftBroadCategoryCode() : "");
+                                bizProduct.setShaftCategoryId(product.getShaftCategoryId() != null ? product.getShaftCategoryId() : 0L);
+                                bizProduct.setShaftCategoryCode(product.getShaftCategoryCode() != null ? product.getShaftCategoryCode() : "");
+                                bizProduct.setSpecification(product.getSpecification() != null ? product.getSpecification() : "");
+                                bizProduct.setDrawingNumber(product.getDrawingNumber() != null ? product.getDrawingNumber() : "");
+                                bizProduct.setDescription(product.getDescription() != null ? product.getDescription() : "");
+                                bizProduct.setProductionTenantId(product.getProductionTenantId() != null ? product.getProductionTenantId() : 0L);
+                                bizProduct.setDiameter(product.getDiameter() != null ? product.getDiameter() : BigDecimal.ZERO);
+                                bizProduct.setLenght(product.getLenght() != null ? product.getLenght() : BigDecimal.ZERO);
+                                bizProduct.setThickness(product.getThickness() != null ? product.getThickness() : BigDecimal.ZERO);
+                                bizProduct.setCompanyId(product.getCompanyId() != null ? product.getCompanyId() : 0L);
+                                bizProduct.setCompanyCode(product.getCompanyCode() != null ? product.getCompanyCode() : "");
+                                bizProduct.setCompanyAlias(product.getCompanyAlias() != null ? product.getCompanyAlias() : "");
+                                bizProduct.setMaterialId(product.getMaterialId() != null ? product.getMaterialId() : 0L);
+                                bizProduct.setMaterialCode(product.getMaterialCode() != null ? product.getMaterialCode() : "");
+                                bizProduct.setDensity(product.getDensity() != null ? product.getDensity() : BigDecimal.ZERO);
+                                bizProduct.setSalesmanId(product.getSalesmanId() != null ? product.getSalesmanId() : 0L);
+                                bizProduct.setSalesmanCode(product.getSalesmanCode() != null ? product.getSalesmanCode() : "");
+                                bizProduct.setStockKeeperId(product.getStockKeeperId() != null ? product.getStockKeeperId() : 0L);
+                                bizProduct.setStockKeeperCode(product.getStockKeeperCode() != null ? product.getStockKeeperCode() : "");
+                                bizProduct.setDispatcherId(product.getDispatcherId() != null ? product.getDispatcherId() : 0L);
+                                bizProduct.setDispatcherCode(product.getDispatcherCode() != null ? product.getDispatcherCode() : "");
+                                bizProduct.setProductStatusCode(product.getProductStatusCode() != null ? product.getProductStatusCode() : "");
+                                bizProduct.setProductStatusId(product.getProductStatusId() != null ? product.getProductStatusId() : 0L);
+                                bizProduct.setProductionTypeId(product.getProductionTypeId() != null ? product.getProductionTypeId() : 0L);
+                                bizProduct.setProductionTypeCode(product.getProductionTypeCode() != null ? product.getProductionTypeCode() : "");
+                                bizProduct.setTechnicianId(product.getTechnicianId() != null ? product.getTechnicianId() : 0L);
+                                bizProduct.setTechnicianCode(product.getTechnicianCode() != null ? product.getTechnicianCode() : "");
+                                bizProduct.setCreatorCode(product.getCreatorCode() != null ? product.getCreatorCode() : "");
+                                bizProduct.setMaterialNum(product.getMaterialNum() != null ? product.getMaterialNum() : "");
+                                productList.add(bizProduct);
+                            }
+                            bizProductService.saveBatch(productList);
+                        }
+                }
+            }
+            //辅料
+            List<BizProductAccessoriesMaterial> accessoriesCollect = bizProductAccessoriesMaterialList.stream().filter(item -> item.getCategory() == 2).collect(Collectors.toList());
+            if(!accessoriesCollect.isEmpty()){
+                if (accessoriesCollect.stream().anyMatch(material -> material.getAccessoriesCode() == null)) {
+                    throw new RuntimeException("新增失败,辅料编码不能为空");
+                }
+                //判断辅料编码是否有重复
+                List<String> accessoriesCodes = accessoriesCollect.stream()
+                        .map(BizProductAccessoriesMaterial::getAccessoriesCode)
+                        .collect(Collectors.toList());
+                Set<String> uniqueAccessoriesCodes = new HashSet<>(accessoriesCodes);
+                if (uniqueAccessoriesCodes.size() != accessoriesCodes.size()) {
+                    throw new RuntimeException("新增失败,辅料编码不能重复");
+                } else {
+                    //新增的辅料编码没有重复
+                    //判断数据库是否存在相同的辅料编码
+                    List<BizAccessories> bizAccessoriesList = bizAccessoriesService.query().in("accessories_code", accessoriesCodes).list();
+                    if (!bizAccessoriesList.isEmpty()){
+                        throw new RuntimeException("新增失败,存在重复的辅料编码");
+                    }else{
+                        List<BizAccessories> accessoriesList =  new ArrayList<>();
+                        for (BizProductAccessoriesMaterial accessories : accessoriesCollect) {
+                           BizAccessories bizAccessories = new BizAccessories();
+                            bizAccessories.setAccessoriesCode(accessories.getAccessoriesCode() != null ? accessories.getAccessoriesCode() : "");
+                            bizAccessories.setItype(accessories.getItype() != null ? accessories.getItype() : "");
+                            bizAccessories.setCusven(accessories.getCusven() != null ? accessories.getCusven() : "");
+                            bizAccessories.setDescription(accessories.getDescription() != null ? accessories.getDescription() : "");
+                            bizAccessories.setUnit(accessories.getUnit() != null ? accessories.getUnit() : "");
+                            bizAccessories.setCruser(accessories.getCruser() != null ? accessories.getCruser() : "");
+                            bizAccessories.setMddate(accessories.getMddate() != null ? accessories.getMddate() : null); // 日期类型,null可能更合适
+                            bizAccessories.setMduser(accessories.getMduser() != null ? accessories.getMduser() : "");
+                            bizAccessories.setPouom(accessories.getPouom() != null ? accessories.getPouom() : "");
+                            bizAccessories.setHtype(accessories.getHtype() != null ? accessories.getHtype() : "");
+                            bizAccessories.setHtyna(accessories.getHtyna() != null ? accessories.getHtyna() : "");
+                            bizAccessories.setWriteruser(accessories.getWriteruser() != null ? accessories.getWriteruser() : "");
+                            bizAccessories.setMonthUseAmount(accessories.getMonthUseAmount() != null ? accessories.getMonthUseAmount() : BigDecimal.ZERO);
+                            bizAccessories.setLtype(accessories.getLtype() != null ? accessories.getLtype() : "");
+                            bizAccessories.setDeliveryDate(accessories.getDeliveryDate() != null ? accessories.getDeliveryDate() : 0L);
+                            bizAccessories.setSafetyStock(accessories.getSafetyStock() != null ? accessories.getSafetyStock() : BigDecimal.ZERO);
+                            bizAccessories.setPrice(accessories.getPrice() != null ? accessories.getPrice() : BigDecimal.ZERO);
+                            bizAccessories.setStatus(accessories.getStatus() != null ? accessories.getStatus() : "");
+                            bizAccessories.setCrdate(accessories.getCrdate() != null ? accessories.getCrdate() : null); // 日期类型,null可能更合适
+                            bizAccessories.setEcoMark(accessories.getEcoMark() != null ? accessories.getEcoMark() : "");
+                            bizAccessories.setConversionRatio(accessories.getConversionRatio() != null ? accessories.getConversionRatio() : BigDecimal.ZERO);
+                            bizAccessories.setWritedate(accessories.getWritedate() != null ? accessories.getWritedate() : null); // 日期类型,null可能更合适
+                            bizAccessories.setPackageStandard(accessories.getPackageStandard() != null ? accessories.getPackageStandard() : "");
+                            bizAccessories.setYpart(accessories.getYpart() != null ? accessories.getYpart() : "");
+                            bizAccessories.setYamt(accessories.getYamt() != null ? accessories.getYamt() : BigDecimal.ZERO);
+                            bizAccessories.setMonthAvgPrice(accessories.getMonthAvgPrice() != null ? accessories.getMonthAvgPrice() : BigDecimal.ZERO);
+                            bizAccessories.setFtype(accessories.getFtype() != null ? accessories.getFtype() : "");
+                            bizAccessories.setKtype(accessories.getKtype() != null ? accessories.getKtype() : "");
+                            bizAccessories.setKtyts(accessories.getKtyts() != null ? accessories.getKtyts() : 0L);
+                            bizAccessories.setFacno(accessories.getFacno() != null ? accessories.getFacno() : "");
+                            bizAccessories.setTenantId(accessories.getTenantId() != null ? accessories.getTenantId() : 0L);
+                            accessoriesList.add(bizAccessories);
+                        }
+                    bizAccessoriesService.saveBatch(accessoriesList);
+                    }
+                }
+            }
+            //原材料
+            List<BizProductAccessoriesMaterial> materialCollect = bizProductAccessoriesMaterialList.stream().filter(item -> item.getCategory() == 3).collect(Collectors.toList());
+            if(!materialCollect.isEmpty()){
+                if (materialCollect.stream().anyMatch(material -> material.getMaterialCode() == null)) {
+                    throw new RuntimeException("新增失败,材料编码不能为空");
+                }
+                //判断原材料编码是否有重复
+                List<String> materialCodes = materialCollect.stream()
+                        .map(BizProductAccessoriesMaterial::getMaterialCode)
+                        .collect(Collectors.toList());
+                Set<String> uniqueMaterialCodes = new HashSet<>(materialCodes);
+                if (uniqueMaterialCodes.size() != materialCodes.size()) {
+                    throw new RuntimeException("新增失败,原材料编码不能重复");
+                } else {
+                    //新增的原材料编码没有重复
+                    //判断数据库是否存在相同的原材料编码
+                    List<BizMaterialBase> bizMaterialList = bizMaterialBaseService.query().in("material_code", materialCodes).list();
+                    if (!bizMaterialList.isEmpty()){
+                        throw new RuntimeException("新增失败,存在重复的原材料编码");
+                    }else{
+                        List<BizMaterialBase> materialList =  new ArrayList<>();
+                        for (BizProductAccessoriesMaterial material : materialCollect) {
+                            BizMaterialBase bizMaterialBase = new BizMaterialBase();
+                            bizMaterialBase.setMaterialCode(material.getMaterialCode() != null ? material.getMaterialCode() : "");
+                            bizMaterialBase.setType(material.getType() != null ? material.getType() : "");
+                            bizMaterialBase.setMnemonicCode(material.getMnemonicCode() != null ? material.getMnemonicCode() : "");
+                            bizMaterialBase.setItemtype(material.getItemtype() != null ? material.getItemtype() : "");
+                            bizMaterialBase.setSteelClass(material.getSteelClass() != null ? material.getSteelClass() : "");
+                            bizMaterialBase.setRepCode(material.getRepCode() != null ? material.getRepCode() : "");
+                            bizMaterialBase.setBarcode(material.getBarcode() != null ? material.getBarcode() : "");
+                            bizMaterialBase.setPrloc(material.getPrloc() != null ? material.getPrloc() : "");
+                            bizMaterialBase.setDept(material.getDept() != null ? material.getDept() : "");
+                            bizMaterialBase.setDescription(material.getDescription() != null ? material.getDescription() : "");
+                            bizMaterialBase.setSpecification(material.getSpecification() != null ? material.getSpecification() : "");
+                            bizMaterialBase.setUom(material.getUom() != null ? material.getUom() : "");
+                            bizMaterialBase.setPounit(material.getPounit() != null ? material.getPounit() : "");
+                            bizMaterialBase.setPofact(material.getPofact() != null ? material.getPofact() : BigDecimal.ZERO);
+                            bizMaterialBase.setCounit(material.getCounit() != null ? material.getCounit() : "");
+                            bizMaterialBase.setCofact(material.getCofact() != null ? material.getCofact() : BigDecimal.ZERO);
+                            bizMaterialBase.setSounit(material.getSounit() != null ? material.getSounit() : "");
+                            bizMaterialBase.setSofact(material.getSofact() != null ? material.getSofact() : BigDecimal.ZERO);
+                            bizMaterialBase.setWunit(material.getWunit() != null ? material.getWunit() : "");
+                            bizMaterialBase.setWeight(material.getWeight() != null ? material.getWeight() : BigDecimal.ZERO);
+                            bizMaterialBase.setWeigs(material.getWeigs() != null ? material.getWeigs() : 0L);
+                            bizMaterialBase.setVolume(material.getVolume() != null ? material.getVolume() : BigDecimal.ZERO);
+                            bizMaterialBase.setRounded(material.getRounded() != null ? material.getRounded() : "");
+                            bizMaterialBase.setDraw(material.getDraw() != null ? material.getDraw() : "");
+                            bizMaterialBase.setMpsok(material.getMpsok() != null ? material.getMpsok() : "");
+                            bizMaterialBase.setIsstype(material.getIsstype() != null ? material.getIsstype() : "");
+                            bizMaterialBase.setBypass(material.getBypass() != null ? material.getBypass() : "");
+                            bizMaterialBase.setBatchqty(material.getBatchqty() != null ? material.getBatchqty() : BigDecimal.ZERO);
+                            bizMaterialBase.setYield(material.getYield() != null ? material.getYield() : BigDecimal.ZERO);
+                            bizMaterialBase.setCommodity(material.getCommodity() != null ? material.getCommodity() : "");
+                            bizMaterialBase.setPrdline(material.getPrdline() != null ? material.getPrdline() : "");
+                            bizMaterialBase.setSalgrp(material.getSalgrp() != null ? material.getSalgrp() : "");
+                            bizMaterialBase.setPrcgrp(material.getPrcgrp() != null ? material.getPrcgrp() : "");
+                            bizMaterialBase.setFixmo(material.getFixmo() != null ? material.getFixmo() : "");
+                            bizMaterialBase.setPrpart(material.getPrpart() != null ? material.getPrpart() : "");
+                            bizMaterialBase.setAttrctl(material.getAttrctl() != null ? material.getAttrctl() : "");
+                            bizMaterialBase.setAbc(material.getAbc() != null ? material.getAbc() : "");
+                            bizMaterialBase.setAbcctl(material.getAbcctl() != null ? material.getAbcctl() : "");
+                            bizMaterialBase.setLcydate(material.getLcydate() != null ? material.getLcydate() : null); // 日期类型,null可能更合适
+                            bizMaterialBase.setPrice(material.getPrice() != null ? material.getPrice() : BigDecimal.ZERO);
+                            bizMaterialBase.setStdcost(material.getStdcost() != null ? material.getStdcost() : BigDecimal.ZERO);
+                            bizMaterialBase.setMaterial(material.getMaterial() != null ? material.getMaterial() : BigDecimal.ZERO);
+                            bizMaterialBase.setThismaterial(material.getThismaterial() != null ? material.getThismaterial() : BigDecimal.ZERO);
+                            bizMaterialBase.setPrematerial(material.getPrematerial() != null ? material.getPrematerial() : BigDecimal.ZERO);
+                            bizMaterialBase.setLabor(material.getLabor() != null ? material.getLabor() : BigDecimal.ZERO);
+                            bizMaterialBase.setThislabor(material.getThislabor() != null ? material.getThislabor() : BigDecimal.ZERO);
+                            bizMaterialBase.setPrelabor(material.getPrelabor() != null ? material.getPrelabor() : BigDecimal.ZERO);
+                            bizMaterialBase.setOverhead(material.getOverhead() != null ? material.getOverhead() : BigDecimal.ZERO);
+                            bizMaterialBase.setThisoverhead(material.getThisoverhead() != null ? material.getThisoverhead() : BigDecimal.ZERO);
+                            bizMaterialBase.setPreoverhead(material.getPreoverhead() != null ? material.getPreoverhead() : BigDecimal.ZERO);
+                            bizMaterialBase.setVarover(material.getVarover() != null ? material.getVarover() : BigDecimal.ZERO);
+                            bizMaterialBase.setMutqty2(material.getMutqty2() != null ? material.getMutqty2() : BigDecimal.ZERO);
+                            bizMaterialBase.setAvgprc(material.getAvgprc() != null ? material.getAvgprc() : BigDecimal.ZERO);
+                            bizMaterialBase.setStdctl(material.getStdctl() != null ? material.getStdctl() : "");
+                            bizMaterialBase.setPurchaser(material.getPurchaser() != null ? material.getPurchaser() : "");
+                            bizMaterialBase.setPlanner(material.getPlanner() != null ? material.getPlanner() : "");
+                            bizMaterialBase.setVendor1(material.getVendor1() != null ? material.getVendor1() : "");
+                            bizMaterialBase.setSafqty(material.getSafqty() != null ? material.getSafqty() : BigDecimal.ZERO);
+                            bizMaterialBase.setReorder(material.getReorder() != null ? material.getReorder() : BigDecimal.ZERO);
+                            bizMaterialBase.setMinqty(material.getMinqty() != null ? material.getMinqty() : BigDecimal.ZERO);
+                            bizMaterialBase.setMaxqty(material.getMaxqty() != null ? material.getMaxqty() : BigDecimal.ZERO);
+                            bizMaterialBase.setMutqty(material.getMutqty() != null ? material.getMutqty() : BigDecimal.ZERO);
+                            bizMaterialBase.setMaxperiod(material.getMaxperiod() != null ? material.getMaxperiod() : 0);
+                            bizMaterialBase.setMerge(material.getMerge() != null ? material.getMerge() : "");
+                            bizMaterialBase.setLead(material.getLead() != null ? material.getLead() : 0);
+                            bizMaterialBase.setDuration(material.getDuration() != null ? material.getDuration() : 0);
+                            bizMaterialBase.setVarbase1(material.getVarbase1() != null ? material.getVarbase1() : 0);
+                            bizMaterialBase.setVarbase(material.getVarbase() != null ? material.getVarbase() : 0);
+                            bizMaterialBase.setPlanitem(material.getPlanitem() != null ? material.getPlanitem() : "");
+                            bizMaterialBase.setPolice(material.getPolice() != null ? material.getPolice() : "");
+                            bizMaterialBase.setLlc(material.getLlc() != null ? material.getLlc() : 0);
+                            bizMaterialBase.setOnhand(material.getOnhand() != null ? material.getOnhand() : BigDecimal.ZERO);
+                            bizMaterialBase.setOnorder(material.getOnorder() != null ? material.getOnorder() : BigDecimal.ZERO);
+                            bizMaterialBase.setAllocate(material.getAllocate() != null ? material.getAllocate() : BigDecimal.ZERO);
+                            bizMaterialBase.setIqcqty(material.getIqcqty() != null ? material.getIqcqty() : BigDecimal.ZERO);
+                            bizMaterialBase.setPriceflag(material.getPriceflag() != null ? material.getPriceflag() : "");
+                            bizMaterialBase.setMerchandise(material.getMerchandise() != null ? material.getMerchandise() : "");
+                            bizMaterialBase.setLot(material.getLot() != null ? material.getLot() : "");
+                            bizMaterialBase.setAux(material.getAux() != null ? material.getAux() : "");
+                            bizMaterialBase.setAuxunit(material.getAuxunit() != null ? material.getAuxunit() : "");
+                            bizMaterialBase.setAuxqty(material.getAuxqty() != null ? material.getAuxqty() : BigDecimal.ZERO);
+                            bizMaterialBase.setStatus(material.getStatus() != null ? material.getStatus() : "");
+                            bizMaterialBase.setLsttxdate(material.getLsttxdate() != null ? material.getLsttxdate() : null); // 日期类型,null可能更合适
+                            bizMaterialBase.setSubor(material.getSubor() != null ? material.getSubor() : BigDecimal.ZERO);
+                            bizMaterialBase.setThissubor(material.getThissubor() != null ? material.getThissubor() : BigDecimal.ZERO);
+                            bizMaterialBase.setPresubor(material.getPresubor() != null ? material.getPresubor() : BigDecimal.ZERO);
+                            bizMaterialBase.setOther(material.getOther() != null ? material.getOther() : BigDecimal.ZERO);
+                            bizMaterialBase.setThisother(material.getThisother() != null ? material.getThisother() : BigDecimal.ZERO);
+                            bizMaterialBase.setPreother(material.getPreother() != null ? material.getPreother() : BigDecimal.ZERO);
+                            bizMaterialBase.setCreatedate(material.getCreatedate() != null ? material.getCreatedate() : null); // 日期类型,null可能更合适
+                            bizMaterialBase.setCreateuser(material.getCreateuser() != null ? material.getCreateuser() : "");
+                            bizMaterialBase.setModifydate(material.getModifydate() != null ? material.getModifydate() : null); // 日期类型,null可能更合适
+                            bizMaterialBase.setModifyuser(material.getModifyuser() != null ? material.getModifyuser() : "");
+                            bizMaterialBase.setRs(material.getRs() != null ? material.getRs() : "");
+                            bizMaterialBase.setBkitem(material.getBkitem() != null ? material.getBkitem() : "");
+                            bizMaterialBase.setBond(material.getBond() != null ? material.getBond() : "");
+                            bizMaterialBase.setBissue(material.getBissue() != null ? material.getBissue() : "");
+                            bizMaterialBase.setQclead(material.getQclead() != null ? material.getQclead() : 0);
+                            bizMaterialBase.setTfcode(material.getTfcode() != null ? material.getTfcode() : "");
+                            bizMaterialBase.setStdlabor(material.getStdlabor() != null ? material.getStdlabor() : BigDecimal.ZERO);
+                            bizMaterialBase.setStdmachine(material.getStdmachine() != null ? material.getStdmachine() : BigDecimal.ZERO);
+                            bizMaterialBase.setAccumlabor(material.getAccumlabor() != null ? material.getAccumlabor() : BigDecimal.ZERO);
+                            bizMaterialBase.setAccumachine(material.getAccumachine() != null ? material.getAccumachine() : BigDecimal.ZERO);
+                            bizMaterialBase.setMpsprice(material.getMpsprice() != null ? material.getMpsprice() : BigDecimal.ZERO);
+                            bizMaterialBase.setMpscost(material.getMpscost() != null ? material.getMpscost() : BigDecimal.ZERO);
+                            bizMaterialBase.setBigclass(material.getBigclass() != null ? material.getBigclass() : "");
+                            bizMaterialBase.setSmlclass(material.getSmlclass() != null ? material.getSmlclass() : "");
+                            bizMaterialBase.setPotype(material.getPotype() != null ? material.getPotype() : "");
+                            bizMaterialBase.setCstDynamical(material.getCstDynamical() != null ? material.getCstDynamical() : BigDecimal.ZERO);
+                            bizMaterialBase.setCstFactory(material.getCstFactory() != null ? material.getCstFactory() : "");
+                            bizMaterialBase.setCstEquipment(material.getCstEquipment() != null ? material.getCstEquipment() : BigDecimal.ZERO);
+                            bizMaterialBase.setCstType(material.getCstType() != null ? material.getCstType() : "");
+                            bizMaterialBase.setCstZj(material.getCstZj() != null ? material.getCstZj() : "");
+                            bizMaterialBase.setCstPartm(material.getCstPartm() != null ? material.getCstPartm() : "");
+                            bizMaterialBase.setCstKamt(material.getCstKamt() != null ? material.getCstKamt() : BigDecimal.ZERO);
+                            bizMaterialBase.setJsyq(material.getJsyq() != null ? material.getJsyq() : "");
+                            bizMaterialBase.setXzcode(material.getXzcode() != null ? material.getXzcode() : "");
+                            bizMaterialBase.setZjunprc(material.getZjunprc() != null ? material.getZjunprc() : BigDecimal.ZERO);
+                            bizMaterialBase.setPurtype(material.getPurtype() != null ? material.getPurtype() : "");
+                            bizMaterialBase.setPhcode(material.getPhcode() != null ? material.getPhcode() : "");
+                            bizMaterialBase.setXhcode(material.getXhcode() != null ? material.getXhcode() : "");
+                            bizMaterialBase.setAddcode(material.getAddcode() != null ? material.getAddcode() : "");
+                            bizMaterialBase.setCdcode(material.getCdcode() != null ? material.getCdcode() : "");
+                            bizMaterialBase.setCptype(material.getCptype() != null ? material.getCptype() : "");
+                            bizMaterialBase.setShaft(material.getShaft() != null ? material.getShaft() : "");
+                            bizMaterialBase.setDensity(material.getDensity() != null ? material.getDensity() : BigDecimal.ZERO);
+                            bizMaterialBase.setLenght(material.getLenght() != null ? material.getLenght() : BigDecimal.ZERO);
+                            bizMaterialBase.setDzj(material.getDzj() != null ? material.getDzj() : BigDecimal.ZERO);
+                            bizMaterialBase.setLenghts(material.getLenghts() != null ? material.getLenghts() : "");
+                            bizMaterialBase.setGccd(material.getGccd() != null ? material.getGccd() : BigDecimal.ZERO);
+                            bizMaterialBase.setDzjs(material.getDzjs() != null ? material.getDzjs() : "");
+                            bizMaterialBase.setOnqty(material.getOnqty() != null ? material.getOnqty() : BigDecimal.ZERO);
+                            bizMaterialBase.setKhjc(material.getKhjc() != null ? material.getKhjc() : "");
+                            bizMaterialBase.setInvdate(material.getInvdate() != null ? material.getInvdate() : null); // 日期类型,null可能更合适
+                            bizMaterialBase.setKhpart(material.getKhpart() != null ? material.getKhpart() : "");
+                            bizMaterialBase.setZlcd(material.getZlcd() != null ? material.getZlcd() : "");
+                            bizMaterialBase.setJsyq1(material.getJsyq1() != null ? material.getJsyq1() : "");
+                            bizMaterialBase.setRkbz(material.getRkbz() != null ? material.getRkbz() : "");
+                            bizMaterialBase.setHpart(material.getHpart() != null ? material.getHpart() : "");
+                            bizMaterialBase.setLuhao(material.getLuhao() != null ? material.getLuhao() : "");
+                            bizMaterialBase.setFacno(material.getFacno() != null ? material.getFacno() : "");
+                            bizMaterialBase.setOrderno(material.getOrderno() != null ? material.getOrderno() : "");
+                            bizMaterialBase.setBzhs(material.getBzhs() != null ? material.getBzhs() : 0);
+                            bizMaterialBase.setSpcode(material.getSpcode() != null ? material.getSpcode() : "");
+                            bizMaterialBase.setSpname(material.getSpname() != null ? material.getSpname() : "");
+                            bizMaterialBase.setCust(material.getCust() != null ? material.getCust() : "");
+                            bizMaterialBase.setYzj(material.getYzj() != null ? material.getYzj() : BigDecimal.ZERO);
+                            bizMaterialBase.setWriteuser(material.getWriteuser() != null ? material.getWriteuser() : "");
+                            bizMaterialBase.setWritedate(material.getWritedate() != null ? material.getWritedate() : null); // 日期类型,null可能更合适
+                            bizMaterialBase.setWriteruser(material.getWriteruser() != null ? material.getWriteruser() : "");
+                            bizMaterialBase.setDtype(material.getDtype() != null ? material.getDtype() : "");
+                            bizMaterialBase.setZjbxprc(material.getZjbxprc() != null ? material.getZjbxprc() : BigDecimal.ZERO);
+                            bizMaterialBase.setTenantId(material.getTenantId() != null ? material.getTenantId() : 0L);
+                            materialList.add(bizMaterialBase);
+                        }
+                    bizMaterialBaseService.saveBatch(materialList);
+                    }
+                }
+            }
+        }
+        return success();
+    }
+    @PutMapping
+    public AjaxResult edit(@RequestBody List<BizProductAccessoriesMaterial> bizProductAccessoriesMaterialList) throws NoSuchFieldException, IllegalAccessException {
+        //判断传入的个数
+        if (bizProductAccessoriesMaterialList.size() == 0) {
+            throw new RuntimeException("修改失败,数据不能为空");
+        }
+        if (bizProductAccessoriesMaterialList.size() > 100) {
+            Set<Integer> categorySet = bizProductAccessoriesMaterialList.stream()
+                    .filter(Objects::nonNull) // 确保对象本身不为 null
+                    .map(BizProductAccessoriesMaterial::getCategory)
+                    .filter(Objects::nonNull) // 过滤掉 category 为 null 的值
+                    .collect(Collectors.toSet());
+
+            List<Integer> categoryList = new ArrayList<>(categorySet);
+            if (categoryList.size() > 1) {
+                throw new RuntimeException("修改失败,数据过多,不允许超过100条");
+            } else {
+                if (categoryList.isEmpty()) {
+                    throw new RuntimeException("修改失败,类别不能为空");
+                } else {
+                    Integer firstCategory = categoryList.get(0);
+                    String categoryType = firstCategory.equals(1) ? "产品" : firstCategory.equals(2) ? "辅料" : "原材料";
+                    throw new RuntimeException("修改失败:" + categoryType + "不允许超过100条");
+                }
+            }
+        } else {
+            if (bizProductAccessoriesMaterialList.stream().anyMatch(material -> material.getId() == null)) {
+                throw new RuntimeException("修改失败,id不能为空");
+            }
+            if (bizProductAccessoriesMaterialList.stream().anyMatch(material -> material.getCategory() == null)) {
+                throw new RuntimeException("修改失败,类别不能为空");
+            }
+            if (bizProductAccessoriesMaterialList.stream().anyMatch(material -> material.getCategory() != 1 && material.getCategory() != 2 && material.getCategory() != 3)) {
+                throw new RuntimeException("修改失败,类别只能为1、2、3");
+            }
+            //查询厂别是否存在
+            Set<Long> tenantSet = bizProductAccessoriesMaterialList.stream()
+                    .filter(Objects::nonNull)
+                    .map(BizProductAccessoriesMaterial::getTenantId)
+                    .filter(Objects::nonNull)
+                    .collect(Collectors.toSet());
+
+            List<Long> tenantIdsList = new ArrayList<>(tenantSet);
+            if (tenantIdsList.size() > 1) {
+                List<BizTenant> tenantList = bizTenantService.query().in("id", tenantIdsList).list();
+                if (tenantList.isEmpty() || tenantList.size() != tenantIdsList.size()) {
+                    throw new RuntimeException("修改失败,厂别不存在");
+                }
+            }
+            //产品
+            List<BizProductAccessoriesMaterial> productCollect = bizProductAccessoriesMaterialList.stream().filter(item -> item.getCategory() == 1).collect(Collectors.toList());
+            if (!productCollect.isEmpty()) {
+                if (productCollect.stream().anyMatch(material -> material.getProductCode() == "")) {
+                    throw new RuntimeException("修改失败,产品编码不能为空");
+                }
+                //判断产品编码是否有重复(可能存在相同的id和编码写了多次
+                Map<String, List<BizProductAccessoriesMaterial>> productCodeMap = productCollect.stream()
+                        .filter(material -> material.getProductCode() != null)
+                        .collect(Collectors.groupingBy(BizProductAccessoriesMaterial::getProductCode));
+
+                boolean hasDuplicate = productCodeMap.values().stream()
+                        .anyMatch(list -> list.size() > 1 &&
+                                list.stream().map(BizProductAccessoriesMaterial::getId).distinct().count() > 1);
+
+                if (hasDuplicate) {
+                    throw new RuntimeException("修改失败,产品编码不能重复");
+                } else {
+                    //新增的产品编码没有重复
+                    //判断数据库是否存在相同的产品编码
+                    List<String> productCodes = productCollect.stream()
+                            .filter(material -> material.getProductCode() != null)
+                            .map(BizProductAccessoriesMaterial::getProductCode)
+                            .collect(Collectors.toList());
+                    if(!productCodes.isEmpty()) {
+                        List<BizProduct> bizProductList = bizProductService.query().in("product_code", productCodes).list();
+                        for (BizProductAccessoriesMaterial material : productCollect) {
+                            for (BizProduct product : bizProductList) {
+                                if (Objects.equals(material.getProductCode(), product.getProductCode()) &&
+                                        !Objects.equals(material.getId(), product.getId())) {
+                                    // 如果找到匹配的项,则抛出错误
+                                    throw new RuntimeException("修改失败,产品编码不能重复");
+                                }
+                            }
+                        }
+                    }
+                        List<BizProduct> productList = bizProductService.query().in("id", productCollect.stream()
+                                .map(BizProductAccessoriesMaterial::getId)
+                                .collect(Collectors.toList())).list();
+                        for (BizProductAccessoriesMaterial product : productCollect) {
+                            BizProduct bizProduct  = productList.stream().filter(item->item.getId().equals(product.getId())).findFirst().orElse(null);
+                            if (bizProduct == null) {
+                                throw new RuntimeException("修改失败,产品id不存在");
+                            }
+                            if (product.getTenantId() != null) {
+                                bizProduct.setTenantId(product.getTenantId());
+                            }
+                            if (product.getProductCode() != null) {
+                                bizProduct.setProductCode(product.getProductCode());
+                            }
+                            if (product.getPreStock() != null) {
+                                bizProduct.setPreStock(product.getPreStock());
+                            }
+                            if (product.getType() != null) {
+                                bizProduct.setType(product.getType());
+                            }
+                            if (product.getShaftBroadCategoryId() != null) {
+                                bizProduct.setShaftBroadCategoryId(product.getShaftBroadCategoryId());
+                            }
+                            if (product.getShaftBroadCategoryCode() != null) {
+                                bizProduct.setShaftBroadCategoryCode(product.getShaftBroadCategoryCode());
+                            }
+                            if (product.getShaftCategoryId() != null) {
+                                bizProduct.setShaftCategoryId(product.getShaftCategoryId());
+                            }
+                            if (product.getShaftCategoryCode() != null) {
+                                bizProduct.setShaftCategoryCode(product.getShaftCategoryCode());
+                            }
+                            if (product.getSpecification() != null) {
+                                bizProduct.setSpecification(product.getSpecification());
+                            }
+                            if (product.getDrawingNumber() != null) {
+                                bizProduct.setDrawingNumber(product.getDrawingNumber());
+                            }
+                            if (product.getDescription() != null) {
+                                bizProduct.setDescription(product.getDescription());
+                            }
+                            if (product.getProductionTenantId() != null) {
+                                bizProduct.setProductionTenantId(product.getProductionTenantId());
+                            }
+                            if (product.getDiameter() != null) {
+                                bizProduct.setDiameter(product.getDiameter());
+                            }
+                            if (product.getLenght() != null) {
+                                bizProduct.setLenght(product.getLenght());
+                            }
+                            if (product.getThickness() != null) {
+                                bizProduct.setThickness(product.getThickness());
+                            }
+                            if (product.getCompanyId() != null) {
+                                bizProduct.setCompanyId(product.getCompanyId());
+                            }
+                            if (product.getCompanyCode() != null) {
+                                bizProduct.setCompanyCode(product.getCompanyCode());
+                            }
+                            if (product.getCompanyAlias() != null) {
+                                bizProduct.setCompanyAlias(product.getCompanyAlias());
+                            }
+                            if (product.getMaterialId() != null) {
+                                bizProduct.setMaterialId(product.getMaterialId());
+                            }
+                            if (product.getMaterialCode() != null) {
+                                bizProduct.setMaterialCode(product.getMaterialCode());
+                            }
+                            if (product.getDensity() != null) {
+                                bizProduct.setDensity(product.getDensity());
+                            }
+                            if (product.getSalesmanId() != null) {
+                                bizProduct.setSalesmanId(product.getSalesmanId());
+                            }
+                            if (product.getSalesmanCode() != null) {
+                                bizProduct.setSalesmanCode(product.getSalesmanCode());
+                            }
+                            if (product.getStockKeeperId() != null) {
+                                bizProduct.setStockKeeperId(product.getStockKeeperId());
+                            }
+                            if (product.getStockKeeperCode() != null) {
+                                bizProduct.setStockKeeperCode(product.getStockKeeperCode());
+                            }
+                            if (product.getDispatcherId() != null) {
+                                bizProduct.setDispatcherId(product.getDispatcherId());
+                            }
+                            if (product.getDispatcherCode() != null) {
+                                bizProduct.setDispatcherCode(product.getDispatcherCode());
+                            }
+                            if (product.getProductStatusCode() != null) {
+                                bizProduct.setProductStatusCode(product.getProductStatusCode());
+                            }
+                            if (product.getProductStatusId() != null) {
+                                bizProduct.setProductStatusId(product.getProductStatusId());
+                            }
+                            if (product.getProductionTypeId() != null) {
+                                bizProduct.setProductionTypeId(product.getProductionTypeId());
+                            }
+                            if (product.getProductionTypeCode() != null) {
+                                bizProduct.setProductionTypeCode(product.getProductionTypeCode());
+                            }
+                            if (product.getTechnicianId() != null) {
+                                bizProduct.setTechnicianId(product.getTechnicianId());
+                            }
+                            if (product.getTechnicianCode() != null) {
+                                bizProduct.setTechnicianCode(product.getTechnicianCode());
+                            }
+                            if (product.getCreatorCode() != null) {
+                                bizProduct.setCreatorCode(product.getCreatorCode());
+                            }
+                            if (product.getMaterialNum() != null) {
+                                bizProduct.setMaterialNum(product.getMaterialNum());
+                            }
+                        }
+                        bizProductService.updateBatchById(productList);
+
+                }
+            }
+            //辅料
+            List<BizProductAccessoriesMaterial> accessoriesCollect = bizProductAccessoriesMaterialList.stream().filter(item -> item.getCategory() == 2).collect(Collectors.toList());
+            if (!accessoriesCollect.isEmpty()) {
+                if (accessoriesCollect.stream().anyMatch(material -> material.getAccessoriesCode() == "")) {
+                    throw new RuntimeException("修改失败,辅料编码不能为空");
+                }
+                //判断辅料编码是否有重复(可能存在相同的id和编码写了多次
+                Map<String, List<BizProductAccessoriesMaterial>> accessoriesCodeMap = accessoriesCollect.stream()
+                        .filter(material -> material.getAccessoriesCode() != null)
+                        .collect(Collectors.groupingBy(BizProductAccessoriesMaterial::getAccessoriesCode));
+
+                boolean hasDuplicate = accessoriesCodeMap.values().stream()
+                        .anyMatch(list -> list.size() > 1 &&
+                                list.stream().map(BizProductAccessoriesMaterial::getId).distinct().count() > 1);
+
+                if (hasDuplicate) {
+                    throw new RuntimeException("修改失败,辅料编码不能重复");
+                } else {
+                    //判断数据库是否存在相同的辅料编码
+                    List<String> accessorieCodes = accessoriesCollect.stream()
+                            .filter(material -> material.getAccessoriesCode() != null)
+                            .map(BizProductAccessoriesMaterial::getAccessoriesCode)
+                            .collect(Collectors.toList());
+                    if(!accessorieCodes.isEmpty()) {
+                        List<BizAccessories> bizAccessoriesList = bizAccessoriesService.query().in("accessories_code", accessorieCodes).list();
+                        for (BizProductAccessoriesMaterial material : accessoriesCollect) {
+                            for (BizAccessories accessories : bizAccessoriesList) {
+                                if (Objects.equals(material.getAccessoriesCode(), accessories.getAccessoriesCode()) &&
+                                        !Objects.equals(material.getId(), accessories.getId())) {
+                                    // 如果找到匹配的项,则抛出错误
+                                    throw new RuntimeException("修改失败,辅料编码不能重复");
+                                }
+                            }
+                        }
+                    }
+                    List<BizAccessories> accesoriesList = bizAccessoriesService.query().in("id", accessoriesCollect.stream()
+                            .map(BizProductAccessoriesMaterial::getId)
+                            .collect(Collectors.toList())).list();
+                    for (BizProductAccessoriesMaterial accessories : accessoriesCollect) {
+                        BizAccessories bizAccessories  = accesoriesList.stream().filter(item->item.getId().equals(accessories.getId())).findFirst().orElse(null);
+                        if (bizAccessories == null) {
+                            throw new RuntimeException("修改失败,辅料id不存在");
+                        }
+                        if (accessories.getAccessoriesCode() != null) {
+                            bizAccessories.setAccessoriesCode(accessories.getAccessoriesCode());
+                        }
+                        if (accessories.getItype() != null) {
+                            bizAccessories.setItype(accessories.getItype());
+                        }
+                        if (accessories.getCusven() != null) {
+                            bizAccessories.setCusven(accessories.getCusven());
+                        }
+                        if (accessories.getDescription() != null) {
+                            bizAccessories.setDescription(accessories.getDescription());
+                        }
+                        if (accessories.getUnit() != null) {
+                            bizAccessories.setUnit(accessories.getUnit());
+                        }
+                        if (accessories.getCruser() != null) {
+                            bizAccessories.setCruser(accessories.getCruser());
+                        }
+                        if (accessories.getMddate() != null) {
+                            bizAccessories.setMddate(accessories.getMddate());
+                        }
+                        if (accessories.getMduser() != null) {
+                            bizAccessories.setMduser(accessories.getMduser());
+                        }
+                        if (accessories.getPouom() != null) {
+                            bizAccessories.setPouom(accessories.getPouom());
+                        }
+                        if (accessories.getHtype() != null) {
+                            bizAccessories.setHtype(accessories.getHtype());
+                        }
+                        if (accessories.getHtyna() != null) {
+                            bizAccessories.setHtyna(accessories.getHtyna());
+                        }
+                        if (accessories.getWriteruser() != null) {
+                            bizAccessories.setWriteruser(accessories.getWriteruser());
+                        }
+                        if (accessories.getMonthUseAmount() != null) {
+                            bizAccessories.setMonthUseAmount(accessories.getMonthUseAmount());
+                        }
+                        if (accessories.getLtype() != null) {
+                            bizAccessories.setLtype(accessories.getLtype());
+                        }
+                        if (accessories.getDeliveryDate() != null) {
+                            bizAccessories.setDeliveryDate(accessories.getDeliveryDate());
+                        }
+                        if (accessories.getSafetyStock() != null) {
+                            bizAccessories.setSafetyStock(accessories.getSafetyStock());
+                        }
+                        if (accessories.getPrice() != null) {
+                            bizAccessories.setPrice(accessories.getPrice());
+                        }
+                        if (accessories.getStatus() != null) {
+                            bizAccessories.setStatus(accessories.getStatus());
+                        }
+                        if (accessories.getCrdate() != null) {
+                            bizAccessories.setCrdate(accessories.getCrdate());
+                        }
+                        if (accessories.getEcoMark() != null) {
+                            bizAccessories.setEcoMark(accessories.getEcoMark());
+                        }
+                        if (accessories.getConversionRatio() != null) {
+                            bizAccessories.setConversionRatio(accessories.getConversionRatio());
+                        }
+                        if (accessories.getWritedate() != null) {
+                            bizAccessories.setWritedate(accessories.getWritedate());
+                        }
+                        if (accessories.getPackageStandard() != null) {
+                            bizAccessories.setPackageStandard(accessories.getPackageStandard());
+                        }
+                        if (accessories.getYpart() != null) {
+                            bizAccessories.setYpart(accessories.getYpart());
+                        }
+                        if (accessories.getYamt() != null) {
+                            bizAccessories.setYamt(accessories.getYamt());
+                        }
+                        if (accessories.getMonthAvgPrice() != null) {
+                            bizAccessories.setMonthAvgPrice(accessories.getMonthAvgPrice());
+                        }
+                        if (accessories.getFtype() != null) {
+                            bizAccessories.setFtype(accessories.getFtype());
+                        }
+                        if (accessories.getKtype() != null) {
+                            bizAccessories.setKtype(accessories.getKtype());
+                        }
+                        if (accessories.getKtyts() != null) {
+                            bizAccessories.setKtyts(accessories.getKtyts());
+                        }
+                        if (accessories.getFacno() != null) {
+                            bizAccessories.setFacno(accessories.getFacno());
+                        }
+                        if (accessories.getTenantId() != null) {
+                            bizAccessories.setTenantId(accessories.getTenantId());
+                        }
+                        }
+                        bizAccessoriesService.updateBatchById(accesoriesList);
+                    }
+                }
+            //原材料
+            List<BizProductAccessoriesMaterial> materialCollect = bizProductAccessoriesMaterialList.stream().filter(item -> item.getCategory() == 3).collect(Collectors.toList());
+            if (!materialCollect.isEmpty()) {
+                if (materialCollect.stream().anyMatch(material -> material.getMaterialCode() == "")) {
+                    throw new RuntimeException("修改失败,原材料编码不能为空");
+                }
+                //判断原材料编码是否有重复(可能存在相同的id和编码写了多次
+                Map<String, List<BizProductAccessoriesMaterial>> materialCodeMap = materialCollect.stream()
+                        .filter(material -> material.getMaterialCode() != null)
+                        .collect(Collectors.groupingBy(BizProductAccessoriesMaterial::getMaterialCode));
+
+                boolean hasDuplicate = materialCodeMap.values().stream()
+                        .anyMatch(list -> list.size() > 1 &&
+                                list.stream().map(BizProductAccessoriesMaterial::getId).distinct().count() > 1);
+
+                if (hasDuplicate) {
+                    throw new RuntimeException("修改失败,原材料编码不能重复");
+                } else {
+                    //判断数据库是否存在相同的辅料编码
+                    List<String> materialCodes = materialCollect.stream()
+                            .filter(material -> material.getMaterialCode() != null)
+                            .map(BizProductAccessoriesMaterial::getMaterialCode)
+                            .collect(Collectors.toList());
+                    if (!materialCodes.isEmpty()) {
+                        List<BizMaterialBase> bizMaterialList = bizMaterialBaseService.query().in("material_code", materialCodes).list();
+                        for (BizProductAccessoriesMaterial material : materialCollect) {
+                            for (BizMaterialBase materials : bizMaterialList) {
+                                if (Objects.equals(material.getMaterialCode(), materials.getMaterial()) &&
+                                        !Objects.equals(material.getId(), materials.getId())) {
+                                    // 如果找到匹配的项,则抛出错误
+                                    throw new RuntimeException("修改失败,原材料编码不能重复");
+                                }
+                            }
+                        }
+                    }
+                    List<BizMaterialBase> materialList = bizMaterialBaseService.query().in("id", materialCollect.stream()
+                            .map(BizProductAccessoriesMaterial::getId)
+                            .collect(Collectors.toList())).list();
+                    for (BizProductAccessoriesMaterial material : materialCollect) {
+                        BizMaterialBase bizMaterialBase  = materialList.stream().filter(item->item.getId().equals(material.getId())).findFirst().orElse(null);
+                        if (bizMaterialBase == null) {
+                            throw new RuntimeException("修改失败,原材料id不存在");
+                        }
+
+                        if (material.getMaterialCode() != null) {
+                            bizMaterialBase.setMaterialCode(material.getMaterialCode());
+                        }
+                        if (material.getType() != null) {
+                            bizMaterialBase.setType(material.getType());
+                        }
+                        if (material.getMnemonicCode() != null) {
+                            bizMaterialBase.setMnemonicCode(material.getMnemonicCode());
+                        }
+                        if (material.getItemtype() != null) {
+                            bizMaterialBase.setItemtype(material.getItemtype());
+                        }
+                        if (material.getSteelClass() != null) {
+                            bizMaterialBase.setSteelClass(material.getSteelClass());
+                        }
+                        if (material.getRepCode() != null) {
+                            bizMaterialBase.setRepCode(material.getRepCode());
+                        }
+                        if (material.getBarcode() != null) {
+                            bizMaterialBase.setBarcode(material.getBarcode());
+                        }
+                        if (material.getPrloc() != null) {
+                            bizMaterialBase.setPrloc(material.getPrloc());
+                        }
+                        if (material.getDept() != null) {
+                            bizMaterialBase.setDept(material.getDept());
+                        }
+                        if (material.getDescription() != null) {
+                            bizMaterialBase.setDescription(material.getDescription());
+                        }
+                        if (material.getSpecification() != null) {
+                            bizMaterialBase.setSpecification(material.getSpecification());
+                        }
+                        if (material.getUom() != null) {
+                            bizMaterialBase.setUom(material.getUom());
+                        }
+                        if (material.getPounit() != null) {
+                            bizMaterialBase.setPounit(material.getPounit());
+                        }
+                        if (material.getPofact() != null) {
+                            bizMaterialBase.setPofact(material.getPofact());
+                        }
+                        if (material.getCounit() != null) {
+                            bizMaterialBase.setCounit(material.getCounit());
+                        }
+                        if (material.getCofact() != null) {
+                            bizMaterialBase.setCofact(material.getCofact());
+                        }
+                        if (material.getSounit() != null) {
+                            bizMaterialBase.setSounit(material.getSounit());
+                        }
+                        if (material.getSofact() != null) {
+                            bizMaterialBase.setSofact(material.getSofact());
+                        }
+                        if (material.getWunit() != null) {
+                            bizMaterialBase.setWunit(material.getWunit());
+                        }
+                        if (material.getWeight() != null) {
+                            bizMaterialBase.setWeight(material.getWeight());
+                        }
+                        if (material.getWeigs() != null) {
+                            bizMaterialBase.setWeigs(material.getWeigs());
+                        }
+                        if (material.getVolume() != null) {
+                            bizMaterialBase.setVolume(material.getVolume());
+                        }
+                        if (material.getRounded() != null) {
+                            bizMaterialBase.setRounded(material.getRounded());
+                        }
+                        if (material.getDraw() != null) {
+                            bizMaterialBase.setDraw(material.getDraw());
+                        }
+                        if (material.getMpsok() != null) {
+                            bizMaterialBase.setMpsok(material.getMpsok());
+                        }
+                        if (material.getIsstype() != null) {
+                            bizMaterialBase.setIsstype(material.getIsstype());
+                        }
+                        if (material.getBypass() != null) {
+                            bizMaterialBase.setBypass(material.getBypass());
+                        }
+                        if (material.getBatchqty() != null) {
+                            bizMaterialBase.setBatchqty(material.getBatchqty());
+                        }
+                        if (material.getYield() != null) {
+                            bizMaterialBase.setYield(material.getYield());
+                        }
+                        if (material.getCommodity() != null) {
+                            bizMaterialBase.setCommodity(material.getCommodity());
+                        }
+                        if (material.getPrdline() != null) {
+                            bizMaterialBase.setPrdline(material.getPrdline());
+                        }
+                        if (material.getSalgrp() != null) {
+                            bizMaterialBase.setSalgrp(material.getSalgrp());
+                        }
+                        if (material.getPrcgrp() != null) {
+                            bizMaterialBase.setPrcgrp(material.getPrcgrp());
+                        }
+                        if (material.getFixmo() != null) {
+                            bizMaterialBase.setFixmo(material.getFixmo());
+                        }
+                        if (material.getPrpart() != null) {
+                            bizMaterialBase.setPrpart(material.getPrpart());
+                        }
+                        if (material.getAttrctl() != null) {
+                            bizMaterialBase.setAttrctl(material.getAttrctl());
+                        }
+                        if (material.getAbc() != null) {
+                            bizMaterialBase.setAbc(material.getAbc());
+                        }
+                        if (material.getAbcctl() != null) {
+                            bizMaterialBase.setAbcctl(material.getAbcctl());
+                        }
+                        if (material.getLcydate() != null) {
+                            bizMaterialBase.setLcydate(material.getLcydate());
+                        }
+                        if (material.getPrice() != null) {
+                            bizMaterialBase.setPrice(material.getPrice());
+                        }
+                        if (material.getStdcost() != null) {
+                            bizMaterialBase.setStdcost(material.getStdcost());
+                        }
+                        if (material.getMaterial() != null) {
+                            bizMaterialBase.setMaterial(material.getMaterial());
+                        }
+                        if (material.getThismaterial() != null) {
+                            bizMaterialBase.setThismaterial(material.getThismaterial());
+                        }
+                        if (material.getPrematerial() != null) {
+                            bizMaterialBase.setPrematerial(material.getPrematerial());
+                        }
+                        if (material.getLabor() != null) {
+                            bizMaterialBase.setLabor(material.getLabor());
+                        }
+                        if (material.getThislabor() != null) {
+                            bizMaterialBase.setThislabor(material.getThislabor());
+                        }
+                        if (material.getPrelabor() != null) {
+                            bizMaterialBase.setPrelabor(material.getPrelabor());
+                        }
+                        if (material.getOverhead() != null) {
+                            bizMaterialBase.setOverhead(material.getOverhead());
+                        }
+                        if (material.getThisoverhead() != null) {
+                            bizMaterialBase.setThisoverhead(material.getThisoverhead());
+                        }
+                        if (material.getPreoverhead() != null) {
+                            bizMaterialBase.setPreoverhead(material.getPreoverhead());
+                        }
+                        if (material.getVarover() != null) {
+                            bizMaterialBase.setVarover(material.getVarover());
+                        }
+                        if (material.getMutqty2() != null) {
+                            bizMaterialBase.setMutqty2(material.getMutqty2());
+                        }
+                        if (material.getAvgprc() != null) {
+                            bizMaterialBase.setAvgprc(material.getAvgprc());
+                        }
+                        if (material.getStdctl() != null) {
+                            bizMaterialBase.setStdctl(material.getStdctl());
+                        }
+                        if (material.getPurchaser() != null) {
+                            bizMaterialBase.setPurchaser(material.getPurchaser());
+                        }
+                        if (material.getPlanner() != null) {
+                            bizMaterialBase.setPlanner(material.getPlanner());
+                        }
+                        if (material.getVendor1() != null) {
+                            bizMaterialBase.setVendor1(material.getVendor1());
+                        }
+                        if (material.getSafqty() != null) {
+                            bizMaterialBase.setSafqty(material.getSafqty());
+                        }
+                        if (material.getReorder() != null) {
+                            bizMaterialBase.setReorder(material.getReorder());
+                        }
+                        if (material.getMinqty() != null) {
+                            bizMaterialBase.setMinqty(material.getMinqty());
+                        }
+                        if (material.getMaxqty() != null) {
+                            bizMaterialBase.setMaxqty(material.getMaxqty());
+                        }
+                        if (material.getMutqty() != null) {
+                            bizMaterialBase.setMutqty(material.getMutqty());
+                        }
+                        if (material.getMaxperiod() != null) {
+                            bizMaterialBase.setMaxperiod(material.getMaxperiod());
+                        }
+                        if (material.getMerge() != null) {
+                            bizMaterialBase.setMerge(material.getMerge());
+                        }
+                        if (material.getLead() != null) {
+                            bizMaterialBase.setLead(material.getLead());
+                        }
+                        if (material.getDuration() != null) {
+                            bizMaterialBase.setDuration(material.getDuration());
+                        }
+                        if (material.getVarbase1() != null) {
+                            bizMaterialBase.setVarbase1(material.getVarbase1());
+                        }
+                        if (material.getVarbase() != null) {
+                            bizMaterialBase.setVarbase(material.getVarbase());
+                        }
+                        if (material.getPlanitem() != null) {
+                            bizMaterialBase.setPlanitem(material.getPlanitem());
+                        }
+                        if (material.getPolice() != null) {
+                            bizMaterialBase.setPolice(material.getPolice());
+                        }
+                        if (material.getLlc() != null) {
+                            bizMaterialBase.setLlc(material.getLlc());
+                        }
+                        if (material.getOnhand() != null) {
+                            bizMaterialBase.setOnhand(material.getOnhand());
+                        }
+                        if (material.getOnorder() != null) {
+                            bizMaterialBase.setOnorder(material.getOnorder());
+                        }
+                        if (material.getAllocate() != null) {
+                            bizMaterialBase.setAllocate(material.getAllocate());
+                        }
+                        if (material.getIqcqty() != null) {
+                            bizMaterialBase.setIqcqty(material.getIqcqty());
+                        }
+                        if (material.getPriceflag() != null) {
+                            bizMaterialBase.setPriceflag(material.getPriceflag());
+                        }
+                        if (material.getMerchandise() != null) {
+                            bizMaterialBase.setMerchandise(material.getMerchandise());
+                        }
+                        if (material.getLot() != null) {
+                            bizMaterialBase.setLot(material.getLot());
+                        }
+                        if (material.getAux() != null) {
+                            bizMaterialBase.setAux(material.getAux());
+                        }
+                        if (material.getAuxunit() != null) {
+                            bizMaterialBase.setAuxunit(material.getAuxunit());
+                        }
+                        if (material.getAuxqty() != null) {
+                            bizMaterialBase.setAuxqty(material.getAuxqty());
+                        }
+                        if (material.getStatus() != null) {
+                            bizMaterialBase.setStatus(material.getStatus());
+                        }
+                        if (material.getLsttxdate() != null) {
+                            bizMaterialBase.setLsttxdate(material.getLsttxdate());
+                        }
+                        if (material.getSubor() != null) {
+                            bizMaterialBase.setSubor(material.getSubor());
+                        }
+                        if (material.getThissubor() != null) {
+                            bizMaterialBase.setThissubor(material.getThissubor());
+                        }
+                        if (material.getPresubor() != null) {
+                            bizMaterialBase.setPresubor(material.getPresubor());
+                        }
+                        if (material.getOther() != null) {
+                            bizMaterialBase.setOther(material.getOther());
+                        }
+                        if (material.getThisother() != null) {
+                            bizMaterialBase.setThisother(material.getThisother());
+                        }
+                        if (material.getPreother() != null) {
+                            bizMaterialBase.setPreother(material.getPreother());
+                        }
+                        if (material.getCreatedate() != null) {
+                            bizMaterialBase.setCreatedate(material.getCreatedate());
+                        }
+                        if (material.getCreateuser() != null) {
+                            bizMaterialBase.setCreateuser(material.getCreateuser());
+                        }
+                        if (material.getModifydate() != null) {
+                            bizMaterialBase.setModifydate(material.getModifydate());
+                        }
+                        if (material.getModifyuser() != null) {
+                            bizMaterialBase.setModifyuser(material.getModifyuser());
+                        }
+                        if (material.getRs() != null) {
+                            bizMaterialBase.setRs(material.getRs());
+                        }
+                        if (material.getBkitem() != null) {
+                            bizMaterialBase.setBkitem(material.getBkitem());
+                        }
+                        if (material.getBond() != null) {
+                            bizMaterialBase.setBond(material.getBond());
+                        }
+                        if (material.getBissue() != null) {
+                            bizMaterialBase.setBissue(material.getBissue());
+                        }
+                        if (material.getQclead() != null) {
+                            bizMaterialBase.setQclead(material.getQclead());
+                        }
+                        if (material.getTfcode() != null) {
+                            bizMaterialBase.setTfcode(material.getTfcode());
+                        }
+                        if (material.getStdlabor() != null) {
+                            bizMaterialBase.setStdlabor(material.getStdlabor());
+                        }
+                        if (material.getStdmachine() != null) {
+                            bizMaterialBase.setStdmachine(material.getStdmachine());
+                        }
+                        if (material.getAccumlabor() != null) {
+                            bizMaterialBase.setAccumlabor(material.getAccumlabor());
+                        }
+                        if (material.getAccumachine() != null) {
+                            bizMaterialBase.setAccumachine(material.getAccumachine());
+                        }
+                        if (material.getMpsprice() != null) {
+                            bizMaterialBase.setMpsprice(material.getMpsprice());
+                        }
+                        if (material.getMpscost() != null) {
+                            bizMaterialBase.setMpscost(material.getMpscost());
+                        }
+                        if (material.getBigclass() != null) {
+                            bizMaterialBase.setBigclass(material.getBigclass());
+                        }
+                        if (material.getSmlclass() != null) {
+                            bizMaterialBase.setSmlclass(material.getSmlclass());
+                        }
+                        if (material.getPotype() != null) {
+                            bizMaterialBase.setPotype(material.getPotype());
+                        }
+                        if (material.getCstDynamical() != null) {
+                            bizMaterialBase.setCstDynamical(material.getCstDynamical());
+                        }
+                        if (material.getCstFactory() != null) {
+                            bizMaterialBase.setCstFactory(material.getCstFactory());
+                        }
+                        if (material.getCstEquipment() != null) {
+                            bizMaterialBase.setCstEquipment(material.getCstEquipment());
+                        }
+                        if (material.getCstType() != null) {
+                            bizMaterialBase.setCstType(material.getCstType());
+                        }
+                        if (material.getCstZj() != null) {
+                            bizMaterialBase.setCstZj(material.getCstZj());
+                        }
+                        if (material.getCstPartm() != null) {
+                            bizMaterialBase.setCstPartm(material.getCstPartm());
+                        }
+                        if (material.getCstKamt() != null) {
+                            bizMaterialBase.setCstKamt(material.getCstKamt());
+                        }
+                        if (material.getJsyq() != null) {
+                            bizMaterialBase.setJsyq(material.getJsyq());
+                        }
+                        if (material.getXzcode() != null) {
+                            bizMaterialBase.setXzcode(material.getXzcode());
+                        }
+                        if (material.getZjunprc() != null) {
+                            bizMaterialBase.setZjunprc(material.getZjunprc());
+                        }
+                        if (material.getPurtype() != null) {
+                            bizMaterialBase.setPurtype(material.getPurtype());
+                        }
+                        if (material.getPhcode() != null) {
+                            bizMaterialBase.setPhcode(material.getPhcode());
+                        }
+                        if (material.getXhcode() != null) {
+                            bizMaterialBase.setXhcode(material.getXhcode());
+                        }
+                        if (material.getAddcode() != null) {
+                            bizMaterialBase.setAddcode(material.getAddcode());
+                        }
+                        if (material.getCdcode() != null) {
+                            bizMaterialBase.setCdcode(material.getCdcode());
+                        }
+                        if (material.getCptype() != null) {
+                            bizMaterialBase.setCptype(material.getCptype());
+                        }
+                        if (material.getShaft() != null) {
+                            bizMaterialBase.setShaft(material.getShaft());
+                        }
+                        if (material.getDensity() != null) {
+                            bizMaterialBase.setDensity(material.getDensity());
+                        }
+                        if (material.getLenght() != null) {
+                            bizMaterialBase.setLenght(material.getLenght());
+                        }
+                        if (material.getDzj() != null) {
+                            bizMaterialBase.setDzj(material.getDzj());
+                        }
+                        if (material.getLenghts() != null) {
+                            bizMaterialBase.setLenghts(material.getLenghts());
+                        }
+                        if (material.getGccd() != null) {
+                            bizMaterialBase.setGccd(material.getGccd());
+                        }
+                        if (material.getDzjs() != null) {
+                            bizMaterialBase.setDzjs(material.getDzjs());
+                        }
+                        if (material.getOnqty() != null) {
+                            bizMaterialBase.setOnqty(material.getOnqty());
+                        }
+                        if (material.getKhjc() != null) {
+                            bizMaterialBase.setKhjc(material.getKhjc());
+                        }
+                        if (material.getInvdate() != null) {
+                            bizMaterialBase.setInvdate(material.getInvdate());
+                        }
+                        if (material.getKhpart() != null) {
+                            bizMaterialBase.setKhpart(material.getKhpart());
+                        }
+                        if (material.getZlcd() != null) {
+                            bizMaterialBase.setZlcd(material.getZlcd());
+                        }
+                        if (material.getJsyq1() != null) {
+                            bizMaterialBase.setJsyq1(material.getJsyq1());
+                        }
+                        if (material.getRkbz() != null) {
+                            bizMaterialBase.setRkbz(material.getRkbz());
+                        }
+                        if (material.getHpart() != null) {
+                            bizMaterialBase.setHpart(material.getHpart());
+                        }
+                        if (material.getLuhao() != null) {
+                            bizMaterialBase.setLuhao(material.getLuhao());
+                        }
+                        if (material.getFacno() != null) {
+                            bizMaterialBase.setFacno(material.getFacno());
+                        }
+                        if (material.getOrderno() != null) {
+                            bizMaterialBase.setOrderno(material.getOrderno());
+                        }
+                        if (material.getBzhs() != null) {
+                            bizMaterialBase.setBzhs(material.getBzhs());
+                        }
+                        if (material.getSpcode() != null) {
+                            bizMaterialBase.setSpcode(material.getSpcode());
+                        }
+                        if (material.getSpname() != null) {
+                            bizMaterialBase.setSpname(material.getSpname());
+                        }
+                        if (material.getCust() != null) {
+                            bizMaterialBase.setCust(material.getCust());
+                        }
+                        if (material.getYzj() != null) {
+                            bizMaterialBase.setYzj(material.getYzj());
+                        }
+                        if (material.getWriteuser() != null) {
+                            bizMaterialBase.setWriteuser(material.getWriteuser());
+                        }
+                        if (material.getWritedate() != null) {
+                            bizMaterialBase.setWritedate(material.getWritedate());
+                        }
+                        if (material.getWriteruser() != null) {
+                            bizMaterialBase.setWriteruser(material.getWriteruser());
+                        }
+                        if (material.getDtype() != null) {
+                            bizMaterialBase.setDtype(material.getDtype());
+                        }
+                        if (material.getZjbxprc() != null) {
+                            bizMaterialBase.setZjbxprc(material.getZjbxprc());
+                        }
+                        if (material.getTenantId() != null) {
+                            bizMaterialBase.setTenantId(material.getTenantId());
+                        }
+                        }
+                        bizMaterialBaseService.updateBatchById(materialList);
+                    }
+                }
+            }
+            return success();
+    }
+
+}

+ 792 - 0
src/main/java/cn/ezhizao/project/business/domain/BizMaterialBase.java

@@ -0,0 +1,792 @@
+package cn.ezhizao.project.business.domain;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 材料基本 来源inv10100对象 biz_material_base
+ *
+ * @author ezhizao
+ * @date 2025-04-21
+ */
+@Data
+@TableName(value = "biz_material_base")
+public class BizMaterialBase extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 材料编号 */
+    @Excel(name = "材料编号")
+    @ApiModelProperty(value = "材料编号")
+    private String materialCode;
+
+    /** 编码规则 */
+    @Excel(name = "编码规则")
+    @ApiModelProperty(value = "编码规则")
+    private String type;
+
+    /** 助记码 */
+    @Excel(name = "助记码")
+    @ApiModelProperty(value = "助记码")
+    private String mnemonicCode;
+
+    /** 不懂,原表没有注释 */
+    @Excel(name = "不懂,原表没有注释")
+    @ApiModelProperty(value = "不懂,原表没有注释")
+    private String itemtype;
+
+    /** 结构钢类别 */
+    @Excel(name = "结构钢类别")
+    @ApiModelProperty(value = "结构钢类别")
+    private String steelClass;
+
+    /** 代用群码 */
+    @Excel(name = "代用群码")
+    @ApiModelProperty(value = "代用群码")
+    private String repCode;
+
+    /** 像条形码,原表没有注释 */
+    @Excel(name = "像条形码,原表没有注释")
+    @ApiModelProperty(value = "像条形码,原表没有注释")
+    private String barcode;
+
+    /** 账号 */
+    @Excel(name = "账号")
+    @ApiModelProperty(value = "账号")
+    private String prloc;
+
+    /** 部门编号 */
+    @Excel(name = "部门编号")
+    @ApiModelProperty(value = "部门编号")
+    private String dept;
+
+    /** 名称规格图号 */
+    @Excel(name = "名称规格图号")
+    @ApiModelProperty(value = "名称规格图号")
+    private String description;
+
+    /** 规格 */
+    @Excel(name = "规格")
+    @ApiModelProperty(value = "规格")
+    private String specification;
+
+    /** 部门单位 */
+    @Excel(name = "部门单位")
+    @ApiModelProperty(value = "部门单位")
+    private String uom;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String pounit;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal pofact;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String counit;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal cofact;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String sounit;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal sofact;
+
+    /** 计量单位 */
+    @Excel(name = "计量单位")
+    @ApiModelProperty(value = "计量单位")
+    private String wunit;
+
+    /** 毛重/箱 */
+    @Excel(name = "毛重/箱")
+    @ApiModelProperty(value = "毛重/箱")
+    private BigDecimal weight;
+
+    /** 支数/箱 */
+    @Excel(name = "支数/箱")
+    @ApiModelProperty(value = "支数/箱")
+    private Long weigs;
+
+    /** 成品单个坯重 */
+    @Excel(name = "成品单个坯重")
+    @ApiModelProperty(value = "成品单个坯重")
+    private BigDecimal volume;
+
+    /** 切除尾数 */
+    @Excel(name = "切除尾数")
+    @ApiModelProperty(value = "切除尾数")
+    private String rounded;
+
+    /** 图号 */
+    @Excel(name = "图号")
+    @ApiModelProperty(value = "图号")
+    private String draw;
+
+    /** 是否为MPS料品 */
+    @Excel(name = "是否为MPS料品")
+    @ApiModelProperty(value = "是否为MPS料品")
+    private String mpsok;
+
+    /** 计料形式(Y正常N以成品单个坯重来计算用料) */
+    @Excel(name = "计料形式(Y正常N以成品单个坯重来计算用料)")
+    @ApiModelProperty(value = "计料形式(Y正常N以成品单个坯重来计算用料)")
+    private String isstype;
+
+    /** 需求运算 */
+    @Excel(name = "需求运算")
+    @ApiModelProperty(value = "需求运算")
+    private String bypass;
+
+    /** 结构批量 */
+    @Excel(name = "结构批量")
+    @ApiModelProperty(value = "结构批量")
+    private BigDecimal batchqty;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal yield;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String commodity;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String prdline;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String salgrp;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String prcgrp;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String fixmo;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String prpart;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String attrctl;
+
+    /** abc分类 */
+    @Excel(name = "abc分类")
+    @ApiModelProperty(value = "abc分类")
+    private String abc;
+
+    /** abc控制 */
+    @Excel(name = "abc控制")
+    @ApiModelProperty(value = "abc控制")
+    private String abcctl;
+
+    /** 盘点日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "盘点日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "盘点日期")
+    private Date lcydate;
+
+    /** 开账期初单价 */
+    @Excel(name = "开账期初单价")
+    @ApiModelProperty(value = "开账期初单价")
+    private BigDecimal price;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal stdcost;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal material;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal thismaterial;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal prematerial;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal labor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal thislabor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal prelabor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal overhead;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal thisoverhead;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal preoverhead;
+
+    /** 人工权数 */
+    @Excel(name = "人工权数")
+    @ApiModelProperty(value = "人工权数")
+    private BigDecimal varover;
+
+    /** 费用权数 */
+    @Excel(name = "费用权数")
+    @ApiModelProperty(value = "费用权数")
+    private BigDecimal mutqty2;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal avgprc;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String stdctl;
+
+    /** 业务员代码 */
+    @Excel(name = "业务员代码")
+    @ApiModelProperty(value = "业务员代码")
+    private String purchaser;
+
+    /** 规划人 */
+    @Excel(name = "规划人")
+    @ApiModelProperty(value = "规划人")
+    private String planner;
+
+    /** 委外/供应/制造商 */
+    @Excel(name = "委外/供应/制造商")
+    @ApiModelProperty(value = "委外/供应/制造商")
+    private String vendor1;
+
+    /** 安全存量 */
+    @Excel(name = "安全存量")
+    @ApiModelProperty(value = "安全存量")
+    private BigDecimal safqty;
+
+    /** 再订购点 */
+    @Excel(name = "再订购点")
+    @ApiModelProperty(value = "再订购点")
+    private BigDecimal reorder;
+
+    /** 最低委外/订购/制造商 */
+    @Excel(name = "最低委外/订购/制造商")
+    @ApiModelProperty(value = "最低委外/订购/制造商")
+    private BigDecimal minqty;
+
+    /** 最高委外/订购/制造商 */
+    @Excel(name = "最高委外/订购/制造商")
+    @ApiModelProperty(value = "最高委外/订购/制造商")
+    private BigDecimal maxqty;
+
+    /** 委外/订购/制造倍数 */
+    @Excel(name = "委外/订购/制造倍数")
+    @ApiModelProperty(value = "委外/订购/制造倍数")
+    private BigDecimal mutqty;
+
+    /** 供应期间 */
+    @Excel(name = "供应期间")
+    @ApiModelProperty(value = "供应期间")
+    private Integer maxperiod;
+
+    /** 令单合并 */
+    @Excel(name = "令单合并")
+    @ApiModelProperty(value = "令单合并")
+    private String merge;
+
+    /** 固定前置日 */
+    @Excel(name = "固定前置日")
+    @ApiModelProperty(value = "固定前置日")
+    private Integer lead;
+
+    /** 变动前置日 */
+    @Excel(name = "变动前置日")
+    @ApiModelProperty(value = "变动前置日")
+    private Integer duration;
+
+    /** 累计前置日 */
+    @Excel(name = "累计前置日")
+    @ApiModelProperty(value = "累计前置日")
+    private Integer varbase1;
+
+    /** 变动基数 */
+    @Excel(name = "变动基数")
+    @ApiModelProperty(value = "变动基数")
+    private Integer varbase;
+
+    /** 规划品 */
+    @Excel(name = "规划品")
+    @ApiModelProperty(value = "规划品")
+    private String planitem;
+
+    /** 供需政策 */
+    @Excel(name = "供需政策")
+    @ApiModelProperty(value = "供需政策")
+    private String police;
+
+    /** 低阶码 */
+    @Excel(name = "低阶码")
+    @ApiModelProperty(value = "低阶码")
+    private Integer llc;
+
+    /** 库存量 */
+    @Excel(name = "库存量")
+    @ApiModelProperty(value = "库存量")
+    private BigDecimal onhand;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal onorder;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal allocate;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal iqcqty;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String priceflag;
+
+    /** 商品 */
+    @Excel(name = "商品")
+    @ApiModelProperty(value = "商品")
+    private String merchandise;
+
+    /** 批号控制 */
+    @Excel(name = "批号控制")
+    @ApiModelProperty(value = "批号控制")
+    private String lot;
+
+    /** 辅助量控制 */
+    @Excel(name = "辅助量控制")
+    @ApiModelProperty(value = "辅助量控制")
+    private String aux;
+
+    /** 辅助单位 */
+    @Excel(name = "辅助单位")
+    @ApiModelProperty(value = "辅助单位")
+    private String auxunit;
+
+    /** 辅助量 */
+    @Excel(name = "辅助量")
+    @ApiModelProperty(value = "辅助量")
+    private BigDecimal auxqty;
+
+    /** 使用状况 */
+    @Excel(name = "使用状况")
+    @ApiModelProperty(value = "使用状况")
+    private String status;
+
+    /** 最近交易日 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "最近交易日", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "最近交易日")
+    private Date lsttxdate;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal subor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal thissubor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal presubor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal other;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal thisother;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal preother;
+
+    /** 建档日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "建档日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "建档日期")
+    private Date createdate;
+
+    /** 建档人 */
+    @Excel(name = "建档人")
+    @ApiModelProperty(value = "建档人")
+    private String createuser;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private Date modifydate;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String modifyuser;
+
+    /** R/S */
+    @Excel(name = "R/S")
+    @ApiModelProperty(value = "R/S")
+    private String rs;
+
+    /** 倒扣件 */
+    @Excel(name = "倒扣件")
+    @ApiModelProperty(value = "倒扣件")
+    private String bkitem;
+
+    /** 保税品 */
+    @Excel(name = "保税品")
+    @ApiModelProperty(value = "保税品")
+    private String bond;
+
+    /** 整批发料  */
+    @Excel(name = "整批发料 ")
+    @ApiModelProperty(value = "整批发料 ")
+    private String bissue;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private Integer qclead;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String tfcode;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal stdlabor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal stdmachine;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal accumlabor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal accumachine;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal mpsprice;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal mpscost;
+
+    /** 料品大分类 */
+    @Excel(name = "料品大分类")
+    @ApiModelProperty(value = "料品大分类")
+    private String bigclass;
+
+    /** 料品小分类 */
+    @Excel(name = "料品小分类")
+    @ApiModelProperty(value = "料品小分类")
+    private String smlclass;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String potype;
+
+    /** 动力权数 */
+    @Excel(name = "动力权数")
+    @ApiModelProperty(value = "动力权数")
+    private BigDecimal cstDynamical;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String cstFactory;
+
+    /** 设备权数 */
+    @Excel(name = "设备权数")
+    @ApiModelProperty(value = "设备权数")
+    private BigDecimal cstEquipment;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String cstType;
+
+    /** 组件类型 */
+    @Excel(name = "组件类型")
+    @ApiModelProperty(value = "组件类型")
+    private String cstZj;
+
+    /** 模具编号 */
+    @Excel(name = "模具编号")
+    @ApiModelProperty(value = "模具编号")
+    private String cstPartm;
+
+    /** 成品率考核指标 */
+    @Excel(name = "成品率考核指标")
+    @ApiModelProperty(value = "成品率考核指标")
+    private BigDecimal cstKamt;
+
+    /** 技术要求 */
+    @Excel(name = "技术要求")
+    @ApiModelProperty(value = "技术要求")
+    private String jsyq;
+
+    /** 原材料形状代码 */
+    @Excel(name = "原材料形状代码")
+    @ApiModelProperty(value = "原材料形状代码")
+    private String xzcode;
+
+    /** 最近采购价 */
+    @Excel(name = "最近采购价")
+    @ApiModelProperty(value = "最近采购价")
+    private BigDecimal zjunprc;
+
+    /** 0;mid(part,6,3)='000';;2:原材料3:机物料 */
+    @Excel(name = "0;mid(part,6,3)='000';;2:原材料3:机物料")
+    @ApiModelProperty(value = "0;mid(part,6,3)='000';;2:原材料3:机物料")
+    private String purtype;
+
+    /** 材料牌号 */
+    @Excel(name = "材料牌号")
+    @ApiModelProperty(value = "材料牌号")
+    private String phcode;
+
+    /** 原材料规格型号码 */
+    @Excel(name = "原材料规格型号码")
+    @ApiModelProperty(value = "原材料规格型号码")
+    private String xhcode;
+
+    /** 原材料产地1:国产2:进口3:整装进口 */
+    @Excel(name = "原材料产地1:国产2:进口3:整装进口")
+    @ApiModelProperty(value = "原材料产地1:国产2:进口3:整装进口")
+    private String addcode;
+
+    /** 原材料长度 */
+    @Excel(name = "原材料长度")
+    @ApiModelProperty(value = "原材料长度")
+    private String cdcode;
+
+    /** 0:综合类3:普通轴5:粗大轴 */
+    @Excel(name = "0:综合类3:普通轴5:粗大轴")
+    @ApiModelProperty(value = "0:综合类3:普通轴5:粗大轴")
+    private String cptype;
+
+    /** 1:shaft2:wiper shaft3:pivot shaft4:pivot tube */
+    @Excel(name = "1:shaft2:wiper shaft3:pivot shaft4:pivot tube")
+    @ApiModelProperty(value = "1:shaft2:wiper shaft3:pivot shaft4:pivot tube")
+    private String shaft;
+
+    /** 密度 */
+    @Excel(name = "密度")
+    @ApiModelProperty(value = "密度")
+    private BigDecimal density;
+
+    /** 成品长度 */
+    @Excel(name = "成品长度")
+    @ApiModelProperty(value = "成品长度")
+    private BigDecimal lenght;
+
+    /** 直径 */
+    @Excel(name = "直径")
+    @ApiModelProperty(value = "直径")
+    private BigDecimal dzj;
+
+    /** 成品长度字符型 */
+    @Excel(name = "成品长度字符型")
+    @ApiModelProperty(value = "成品长度字符型")
+    private String lenghts;
+
+    /** 公差长度含刀宽 */
+    @Excel(name = "公差长度含刀宽")
+    @ApiModelProperty(value = "公差长度含刀宽")
+    private BigDecimal gccd;
+
+    /** 成品直径字符型 */
+    @Excel(name = "成品直径字符型")
+    @ApiModelProperty(value = "成品直径字符型")
+    private String dzjs;
+
+    /** 开账期初库存量 */
+    @Excel(name = "开账期初库存量")
+    @ApiModelProperty(value = "开账期初库存量")
+    private BigDecimal onqty;
+
+    /** 客户简称 */
+    @Excel(name = "客户简称")
+    @ApiModelProperty(value = "客户简称")
+    private String khjc;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private Date invdate;
+
+    /** 客户料号 */
+    @Excel(name = "客户料号")
+    @ApiModelProperty(value = "客户料号")
+    private String khpart;
+
+    /** 直料长度 */
+    @Excel(name = "直料长度")
+    @ApiModelProperty(value = "直料长度")
+    private String zlcd;
+
+    /** 技术要求 */
+    @Excel(name = "技术要求")
+    @ApiModelProperty(value = "技术要求")
+    private String jsyq1;
+
+    /** 1:正常①,2:无半成品①②⑤,3:有半成品①②③④⑤ */
+    @Excel(name = "1:正常①,2:无半成品①②⑤,3:有半成品①②③④⑤")
+    @ApiModelProperty(value = "1:正常①,2:无半成品①②⑤,3:有半成品①②③④⑤")
+    private String rkbz;
+
+    /** 华普料号 */
+    @Excel(name = "华普料号")
+    @ApiModelProperty(value = "华普料号")
+    private String hpart;
+
+    /** 炉号 */
+    @Excel(name = "炉号")
+    @ApiModelProperty(value = "炉号")
+    private String luhao;
+
+    /** 生产厂家 */
+    @Excel(name = "生产厂家")
+    @ApiModelProperty(value = "生产厂家")
+    private String facno;
+
+    /** 客户订单号 */
+    @Excel(name = "客户订单号")
+    @ApiModelProperty(value = "客户订单号")
+    private String orderno;
+
+    /** 包装盒数 */
+    @Excel(name = "包装盒数")
+    @ApiModelProperty(value = "包装盒数")
+    private Integer bzhs;
+
+    /** 三叶商品编码 */
+    @Excel(name = "三叶商品编码")
+    @ApiModelProperty(value = "三叶商品编码")
+    private String spcode;
+
+    /** 客户商品品名 */
+    @Excel(name = "客户商品品名")
+    @ApiModelProperty(value = "客户商品品名")
+    private String spname;
+
+    /** 客户代码 */
+    @Excel(name = "客户代码")
+    @ApiModelProperty(value = "客户代码")
+    private String cust;
+
+    /** 原材料计算直径 */
+    @Excel(name = "原材料计算直径")
+    @ApiModelProperty(value = "原材料计算直径")
+    private BigDecimal yzj;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String writeuser;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private Date writedate;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String writeruser;
+
+    /** 钢材分类 */
+    @Excel(name = "钢材分类")
+    @ApiModelProperty(value = "钢材分类")
+    private String dtype;
+
+    /** 最近报销未税单价 */
+    @Excel(name = "最近报销未税单价")
+    @ApiModelProperty(value = "最近报销未税单价")
+    private BigDecimal zjbxprc;
+
+    /** 租户id */
+    @ApiModelProperty(value = "最近报销未税单价")
+    private Long tenantId;
+
+}

+ 35 - 19
src/main/java/cn/ezhizao/project/business/domain/BizProduct.java

@@ -26,6 +26,11 @@ public class BizProduct extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
+    /** 料号 */
+    /** 隶属厂别(租户id) */
+    @ApiModelProperty(value = "${comment}")
+    private Long tenantId;
+
     /** 料号 */
     @Excel(name = "料号")
     @ApiModelProperty(value = "料号")
@@ -41,13 +46,8 @@ public class BizProduct extends BaseEntity
     @ApiModelProperty(value = "类别9:成品8:半成品")
     private String type;
 
-    /** 租户id */
-    @ApiModelProperty(value = "${comment}")
-    private Long tenantId;
-
     /** 轴类型大类id */
-    @Excel(name = "轴类型大类id")
-    @ApiModelProperty(value = "轴类型大类id")
+    @ApiModelProperty(value = "类别9:成品8:半成品")
     private Long shaftBroadCategoryId;
 
     /** 轴类型大类A=视窗系统零部件B=动力系统零部件C=车身及底盘系统零部件D=工业精密零部件 */
@@ -59,9 +59,9 @@ public class BizProduct extends BaseEntity
     @ApiModelProperty(value = "轴类型大类A=视窗系统零部件B=动力系统零部件C=车身及底盘系统零部件D=工业精密零部件")
     private Long shaftCategoryId;
 
-    /** 轴类型=基本上=SCLASS */
-    @Excel(name = "轴类型=基本上=SCLASS")
-    @ApiModelProperty(value = "轴类型=基本上=SCLASS")
+    /** 轴类型 */
+    @Excel(name = "轴类型")
+    @ApiModelProperty(value = "轴类型")
     private String shaftCategoryCode;
 
     /** 规格,不允许出现下划线_ */
@@ -74,11 +74,6 @@ public class BizProduct extends BaseEntity
     @ApiModelProperty(value = "图号,不允许出现下划线_")
     private String drawingNumber;
 
-    /** 客户集团简称,产品描述用 */
-    @Excel(name = "客户集团简称,产品描述用")
-    @ApiModelProperty(value = "客户集团简称,产品描述用")
-    private String companyAlias;
-
     /** =客户简称_图号_规格 */
     @Excel(name = "=客户简称_图号_规格")
     @ApiModelProperty(value = "=客户简称_图号_规格")
@@ -92,6 +87,7 @@ public class BizProduct extends BaseEntity
     @Excel(name = "直径")
     @ApiModelProperty(value = "直径")
     private BigDecimal diameter;
+
     /** 成品长度 */
     @Excel(name = "成品长度")
     @ApiModelProperty(value = "成品长度")
@@ -110,13 +106,28 @@ public class BizProduct extends BaseEntity
     @Excel(name = "客户代号")
     @ApiModelProperty(value = "客户代号")
     private String companyCode;
-    /** 客户代号 */
-    @Excel(name = "备注")
-    @ApiModelProperty(value = "备注")
-    private String remark;
+
+    /** 客户集团简称,产品描述用 */
+    @Excel(name = "客户集团简称,产品描述用")
+    @ApiModelProperty(value = "客户集团简称,产品描述用")
+    private String companyAlias;
+
+    /** 材质id */
+    @ApiModelProperty(value = "客户集团简称,产品描述用")
+    private Long materialId;
+
+    /** 材质编码 */
+    @Excel(name = "材质编码")
+    @ApiModelProperty(value = "材质编码")
+    private String materialCode;
+
+    /** 密度 */
+    @Excel(name = "密度")
+    @ApiModelProperty(value = "密度")
+    private BigDecimal density;
 
     /** 销售员id */
-    @ApiModelProperty(value = "客户代号")
+    @ApiModelProperty(value = "密度")
     private Long salesmanId;
 
     /** 销售员编码 */
@@ -174,4 +185,9 @@ public class BizProduct extends BaseEntity
     @ApiModelProperty(value = "创建者编码")
     private String creatorCode;
 
+    /** 物料编号 */
+    @Excel(name = "物料编号")
+    @ApiModelProperty(value = "物料编号")
+    private String materialNum;
+
 }

+ 1054 - 0
src/main/java/cn/ezhizao/project/business/domain/BizProductAccessoriesMaterial.java

@@ -0,0 +1,1054 @@
+package cn.ezhizao.project.business.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+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)
+public class BizProductAccessoriesMaterial extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+    //产品
+
+    /** 料号 */
+    /** 隶属厂别(租户id) */
+    @ApiModelProperty(value = "${comment}")
+    private Long tenantId;
+
+    /** 料号 */
+    @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 = "类别9:成品8:半成品")
+    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;
+
+    /** 轴类型 */
+    @Excel(name = "轴类型")
+    @ApiModelProperty(value = "轴类型")
+    private String shaftCategoryCode;
+
+    /** 规格,不允许出现下划线_ */
+    @Excel(name = "规格,不允许出现下划线_")
+    @ApiModelProperty(value = "规格,不允许出现下划线_")
+    private String specification;
+
+    /** 图号,不允许出现下划线_ */
+    @Excel(name = "图号,不允许出现下划线_")
+    @ApiModelProperty(value = "图号,不允许出现下划线_")
+    private String drawingNumber;
+
+    /** =客户简称_图号_规格 */
+    @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 companyAlias;
+
+    /** 材质id */
+    @ApiModelProperty(value = "客户集团简称,产品描述用")
+    private Long materialId;
+
+    /** 材质编码 */
+    @Excel(name = "材质编码")
+    @ApiModelProperty(value = "材质编码")
+    private String materialCode;
+
+    /** 密度 */
+    @Excel(name = "密度")
+    @ApiModelProperty(value = "密度")
+    private BigDecimal density;
+
+    /** 销售员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;
+
+    /** 物料编号 */
+    @Excel(name = "物料编号")
+    @ApiModelProperty(value = "物料编号")
+    private String materialNum;
+
+    //辅料
+    /** 辅料编号 */
+    @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 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;
+
+    //原料
+    /** 助记码 */
+    @Excel(name = "助记码")
+    @ApiModelProperty(value = "助记码")
+    private String mnemonicCode;
+
+    /** 不懂,原表没有注释 */
+    @Excel(name = "不懂,原表没有注释")
+    @ApiModelProperty(value = "不懂,原表没有注释")
+    private String itemtype;
+
+    /** 结构钢类别 */
+    @Excel(name = "结构钢类别")
+    @ApiModelProperty(value = "结构钢类别")
+    private String steelClass;
+
+    /** 代用群码 */
+    @Excel(name = "代用群码")
+    @ApiModelProperty(value = "代用群码")
+    private String repCode;
+
+    /** 像条形码,原表没有注释 */
+    @Excel(name = "像条形码,原表没有注释")
+    @ApiModelProperty(value = "像条形码,原表没有注释")
+    private String barcode;
+
+    /** 账号 */
+    @Excel(name = "账号")
+    @ApiModelProperty(value = "账号")
+    private String prloc;
+
+    /** 部门编号 */
+    @Excel(name = "部门编号")
+    @ApiModelProperty(value = "部门编号")
+    private String dept;
+    /** 部门单位 */
+    @Excel(name = "部门单位")
+    @ApiModelProperty(value = "部门单位")
+    private String uom;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String pounit;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal pofact;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String counit;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal cofact;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String sounit;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal sofact;
+
+    /** 计量单位 */
+    @Excel(name = "计量单位")
+    @ApiModelProperty(value = "计量单位")
+    private String wunit;
+
+    /** 毛重/箱 */
+    @Excel(name = "毛重/箱")
+    @ApiModelProperty(value = "毛重/箱")
+    private BigDecimal weight;
+
+    /** 支数/箱 */
+    @Excel(name = "支数/箱")
+    @ApiModelProperty(value = "支数/箱")
+    private Long weigs;
+
+    /** 成品单个坯重 */
+    @Excel(name = "成品单个坯重")
+    @ApiModelProperty(value = "成品单个坯重")
+    private BigDecimal volume;
+
+    /** 切除尾数 */
+    @Excel(name = "切除尾数")
+    @ApiModelProperty(value = "切除尾数")
+    private String rounded;
+
+    /** 图号 */
+    @Excel(name = "图号")
+    @ApiModelProperty(value = "图号")
+    private String draw;
+
+    /** 是否为MPS料品 */
+    @Excel(name = "是否为MPS料品")
+    @ApiModelProperty(value = "是否为MPS料品")
+    private String mpsok;
+
+    /** 计料形式(Y正常N以成品单个坯重来计算用料) */
+    @Excel(name = "计料形式(Y正常N以成品单个坯重来计算用料)")
+    @ApiModelProperty(value = "计料形式(Y正常N以成品单个坯重来计算用料)")
+    private String isstype;
+
+    /** 需求运算 */
+    @Excel(name = "需求运算")
+    @ApiModelProperty(value = "需求运算")
+    private String bypass;
+
+    /** 结构批量 */
+    @Excel(name = "结构批量")
+    @ApiModelProperty(value = "结构批量")
+    private BigDecimal batchqty;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal yield;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String commodity;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String prdline;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String salgrp;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String prcgrp;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String fixmo;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String prpart;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String attrctl;
+
+    /** abc分类 */
+    @Excel(name = "abc分类")
+    @ApiModelProperty(value = "abc分类")
+    private String abc;
+
+    /** abc控制 */
+    @Excel(name = "abc控制")
+    @ApiModelProperty(value = "abc控制")
+    private String abcctl;
+
+    /** 盘点日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "盘点日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "盘点日期")
+    private Date lcydate;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal stdcost;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal material;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal thismaterial;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal prematerial;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal labor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal thislabor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal prelabor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal overhead;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal thisoverhead;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal preoverhead;
+
+    /** 人工权数 */
+    @Excel(name = "人工权数")
+    @ApiModelProperty(value = "人工权数")
+    private BigDecimal varover;
+
+    /** 费用权数 */
+    @Excel(name = "费用权数")
+    @ApiModelProperty(value = "费用权数")
+    private BigDecimal mutqty2;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal avgprc;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String stdctl;
+
+    /** 业务员代码 */
+    @Excel(name = "业务员代码")
+    @ApiModelProperty(value = "业务员代码")
+    private String purchaser;
+
+    /** 规划人 */
+    @Excel(name = "规划人")
+    @ApiModelProperty(value = "规划人")
+    private String planner;
+
+    /** 委外/供应/制造商 */
+    @Excel(name = "委外/供应/制造商")
+    @ApiModelProperty(value = "委外/供应/制造商")
+    private String vendor1;
+
+    /** 安全存量 */
+    @Excel(name = "安全存量")
+    @ApiModelProperty(value = "安全存量")
+    private BigDecimal safqty;
+
+    /** 再订购点 */
+    @Excel(name = "再订购点")
+    @ApiModelProperty(value = "再订购点")
+    private BigDecimal reorder;
+
+    /** 最低委外/订购/制造商 */
+    @Excel(name = "最低委外/订购/制造商")
+    @ApiModelProperty(value = "最低委外/订购/制造商")
+    private BigDecimal minqty;
+
+    /** 最高委外/订购/制造商 */
+    @Excel(name = "最高委外/订购/制造商")
+    @ApiModelProperty(value = "最高委外/订购/制造商")
+    private BigDecimal maxqty;
+
+    /** 委外/订购/制造倍数 */
+    @Excel(name = "委外/订购/制造倍数")
+    @ApiModelProperty(value = "委外/订购/制造倍数")
+    private BigDecimal mutqty;
+
+    /** 供应期间 */
+    @Excel(name = "供应期间")
+    @ApiModelProperty(value = "供应期间")
+    private Integer maxperiod;
+
+    /** 令单合并 */
+    @Excel(name = "令单合并")
+    @ApiModelProperty(value = "令单合并")
+    private String merge;
+
+    /** 固定前置日 */
+    @Excel(name = "固定前置日")
+    @ApiModelProperty(value = "固定前置日")
+    private Integer lead;
+
+    /** 变动前置日 */
+    @Excel(name = "变动前置日")
+    @ApiModelProperty(value = "变动前置日")
+    private Integer duration;
+
+    /** 累计前置日 */
+    @Excel(name = "累计前置日")
+    @ApiModelProperty(value = "累计前置日")
+    private Integer varbase1;
+
+    /** 变动基数 */
+    @Excel(name = "变动基数")
+    @ApiModelProperty(value = "变动基数")
+    private Integer varbase;
+
+    /** 规划品 */
+    @Excel(name = "规划品")
+    @ApiModelProperty(value = "规划品")
+    private String planitem;
+
+    /** 供需政策 */
+    @Excel(name = "供需政策")
+    @ApiModelProperty(value = "供需政策")
+    private String police;
+
+    /** 低阶码 */
+    @Excel(name = "低阶码")
+    @ApiModelProperty(value = "低阶码")
+    private Integer llc;
+
+    /** 库存量 */
+    @Excel(name = "库存量")
+    @ApiModelProperty(value = "库存量")
+    private BigDecimal onhand;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal onorder;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal allocate;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal iqcqty;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String priceflag;
+
+    /** 商品 */
+    @Excel(name = "商品")
+    @ApiModelProperty(value = "商品")
+    private String merchandise;
+
+    /** 批号控制 */
+    @Excel(name = "批号控制")
+    @ApiModelProperty(value = "批号控制")
+    private String lot;
+
+    /** 辅助量控制 */
+    @Excel(name = "辅助量控制")
+    @ApiModelProperty(value = "辅助量控制")
+    private String aux;
+
+    /** 辅助单位 */
+    @Excel(name = "辅助单位")
+    @ApiModelProperty(value = "辅助单位")
+    private String auxunit;
+
+    /** 辅助量 */
+    @Excel(name = "辅助量")
+    @ApiModelProperty(value = "辅助量")
+    private BigDecimal auxqty;
+
+    /** 最近交易日 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "最近交易日", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "最近交易日")
+    private Date lsttxdate;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal subor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal thissubor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal presubor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal other;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal thisother;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal preother;
+
+    /** 建档日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "建档日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "建档日期")
+    private Date createdate;
+
+    /** 建档人 */
+    @Excel(name = "建档人")
+    @ApiModelProperty(value = "建档人")
+    private String createuser;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private Date modifydate;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String modifyuser;
+
+    /** R/S */
+    @Excel(name = "R/S")
+    @ApiModelProperty(value = "R/S")
+    private String rs;
+
+    /** 倒扣件 */
+    @Excel(name = "倒扣件")
+    @ApiModelProperty(value = "倒扣件")
+    private String bkitem;
+
+    /** 保税品 */
+    @Excel(name = "保税品")
+    @ApiModelProperty(value = "保税品")
+    private String bond;
+
+    /** 整批发料  */
+    @Excel(name = "整批发料 ")
+    @ApiModelProperty(value = "整批发料 ")
+    private String bissue;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private Integer qclead;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String tfcode;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal stdlabor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal stdmachine;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal accumlabor;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal accumachine;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal mpsprice;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private BigDecimal mpscost;
+
+    /** 料品大分类 */
+    @Excel(name = "料品大分类")
+    @ApiModelProperty(value = "料品大分类")
+    private String bigclass;
+
+    /** 料品小分类 */
+    @Excel(name = "料品小分类")
+    @ApiModelProperty(value = "料品小分类")
+    private String smlclass;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String potype;
+
+    /** 动力权数 */
+    @Excel(name = "动力权数")
+    @ApiModelProperty(value = "动力权数")
+    private BigDecimal cstDynamical;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String cstFactory;
+
+    /** 设备权数 */
+    @Excel(name = "设备权数")
+    @ApiModelProperty(value = "设备权数")
+    private BigDecimal cstEquipment;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String cstType;
+
+    /** 组件类型 */
+    @Excel(name = "组件类型")
+    @ApiModelProperty(value = "组件类型")
+    private String cstZj;
+
+    /** 模具编号 */
+    @Excel(name = "模具编号")
+    @ApiModelProperty(value = "模具编号")
+    private String cstPartm;
+
+    /** 成品率考核指标 */
+    @Excel(name = "成品率考核指标")
+    @ApiModelProperty(value = "成品率考核指标")
+    private BigDecimal cstKamt;
+
+    /** 技术要求 */
+    @Excel(name = "技术要求")
+    @ApiModelProperty(value = "技术要求")
+    private String jsyq;
+
+    /** 原材料形状代码 */
+    @Excel(name = "原材料形状代码")
+    @ApiModelProperty(value = "原材料形状代码")
+    private String xzcode;
+
+    /** 最近采购价 */
+    @Excel(name = "最近采购价")
+    @ApiModelProperty(value = "最近采购价")
+    private BigDecimal zjunprc;
+
+    /** 0;mid(part,6,3)='000';;2:原材料3:机物料 */
+    @Excel(name = "0;mid(part,6,3)='000';;2:原材料3:机物料")
+    @ApiModelProperty(value = "0;mid(part,6,3)='000';;2:原材料3:机物料")
+    private String purtype;
+
+    /** 材料牌号 */
+    @Excel(name = "材料牌号")
+    @ApiModelProperty(value = "材料牌号")
+    private String phcode;
+
+    /** 原材料规格型号码 */
+    @Excel(name = "原材料规格型号码")
+    @ApiModelProperty(value = "原材料规格型号码")
+    private String xhcode;
+
+    /** 原材料产地1:国产2:进口3:整装进口 */
+    @Excel(name = "原材料产地1:国产2:进口3:整装进口")
+    @ApiModelProperty(value = "原材料产地1:国产2:进口3:整装进口")
+    private String addcode;
+
+    /** 原材料长度 */
+    @Excel(name = "原材料长度")
+    @ApiModelProperty(value = "原材料长度")
+    private String cdcode;
+
+    /** 0:综合类3:普通轴5:粗大轴 */
+    @Excel(name = "0:综合类3:普通轴5:粗大轴")
+    @ApiModelProperty(value = "0:综合类3:普通轴5:粗大轴")
+    private String cptype;
+
+    /** 1:shaft2:wiper shaft3:pivot shaft4:pivot tube */
+    @Excel(name = "1:shaft2:wiper shaft3:pivot shaft4:pivot tube")
+    @ApiModelProperty(value = "1:shaft2:wiper shaft3:pivot shaft4:pivot tube")
+    private String shaft;
+
+    /** 直径 */
+    @Excel(name = "直径")
+    @ApiModelProperty(value = "直径")
+    private BigDecimal dzj;
+
+    /** 成品长度字符型 */
+    @Excel(name = "成品长度字符型")
+    @ApiModelProperty(value = "成品长度字符型")
+    private String lenghts;
+
+    /** 公差长度含刀宽 */
+    @Excel(name = "公差长度含刀宽")
+    @ApiModelProperty(value = "公差长度含刀宽")
+    private BigDecimal gccd;
+
+    /** 成品直径字符型 */
+    @Excel(name = "成品直径字符型")
+    @ApiModelProperty(value = "成品直径字符型")
+    private String dzjs;
+
+    /** 开账期初库存量 */
+    @Excel(name = "开账期初库存量")
+    @ApiModelProperty(value = "开账期初库存量")
+    private BigDecimal onqty;
+
+    /** 客户简称 */
+    @Excel(name = "客户简称")
+    @ApiModelProperty(value = "客户简称")
+    private String khjc;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private Date invdate;
+
+    /** 客户料号 */
+    @Excel(name = "客户料号")
+    @ApiModelProperty(value = "客户料号")
+    private String khpart;
+
+    /** 直料长度 */
+    @Excel(name = "直料长度")
+    @ApiModelProperty(value = "直料长度")
+    private String zlcd;
+
+    /** 技术要求 */
+    @Excel(name = "技术要求")
+    @ApiModelProperty(value = "技术要求")
+    private String jsyq1;
+
+    /** 1:正常①,2:无半成品①②⑤,3:有半成品①②③④⑤ */
+    @Excel(name = "1:正常①,2:无半成品①②⑤,3:有半成品①②③④⑤")
+    @ApiModelProperty(value = "1:正常①,2:无半成品①②⑤,3:有半成品①②③④⑤")
+    private String rkbz;
+
+    /** 华普料号 */
+    @Excel(name = "华普料号")
+    @ApiModelProperty(value = "华普料号")
+    private String hpart;
+
+    /** 炉号 */
+    @Excel(name = "炉号")
+    @ApiModelProperty(value = "炉号")
+    private String luhao;
+
+    /** 客户订单号 */
+    @Excel(name = "客户订单号")
+    @ApiModelProperty(value = "客户订单号")
+    private String orderno;
+
+    /** 包装盒数 */
+    @Excel(name = "包装盒数")
+    @ApiModelProperty(value = "包装盒数")
+    private Integer bzhs;
+
+    /** 三叶商品编码 */
+    @Excel(name = "三叶商品编码")
+    @ApiModelProperty(value = "三叶商品编码")
+    private String spcode;
+
+    /** 客户商品品名 */
+    @Excel(name = "客户商品品名")
+    @ApiModelProperty(value = "客户商品品名")
+    private String spname;
+
+    /** 客户代码 */
+    @Excel(name = "客户代码")
+    @ApiModelProperty(value = "客户代码")
+    private String cust;
+
+    /** 原材料计算直径 */
+    @Excel(name = "原材料计算直径")
+    @ApiModelProperty(value = "原材料计算直径")
+    private BigDecimal yzj;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @ApiModelProperty(value = "${comment}")
+    private String writeuser;
+
+    /** 钢材分类 */
+    @Excel(name = "钢材分类")
+    @ApiModelProperty(value = "钢材分类")
+    private String dtype;
+
+    /** 最近报销未税单价 */
+    @Excel(name = "最近报销未税单价")
+    @ApiModelProperty(value = "最近报销未税单价")
+    private BigDecimal zjbxprc;
+
+
+    private Integer category;
+
+    private List<Long> ids;
+
+}

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

@@ -0,0 +1,29 @@
+package cn.ezhizao.project.business.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import cn.ezhizao.project.business.domain.BizMaterialBase;
+
+/**
+ * 材料基本 来源inv10100Mapper接口
+ *
+ * @author ezhizao
+ * @date 2025-04-21
+ */
+public interface BizMaterialBaseMapper extends BaseMapper<BizMaterialBase>
+{
+    /**
+     * 查询材料基本 来源inv10100列表
+     *
+     * @param bizMaterialBase 材料基本 来源inv10100
+     * @return 材料基本 来源inv10100集合
+     */
+    public List<BizMaterialBase> getList(BizMaterialBase bizMaterialBase);
+
+    /**
+     * 物理删除
+     * @param bizMaterialBase
+     * @return 删除结果
+    */
+    public int physicalDelete(BizMaterialBase bizMaterialBase);
+}

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

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import cn.ezhizao.project.business.domain.BizMaterialBase;
+
+/**
+ * 材料基本 来源inv10100Service接口
+ *
+ * @author ezhizao
+ * @date 2025-04-21
+ */
+public interface IBizMaterialBaseService extends IService<BizMaterialBase>
+{
+    /**
+     * 查询材料基本 来源inv10100列表
+     *
+     * @param bizMaterialBase 材料基本 来源inv10100
+     * @return 材料基本 来源inv10100集合
+     */
+    public List<BizMaterialBase> getList(BizMaterialBase bizMaterialBase);
+
+    /**
+     * 物理删除
+     * @param bizMaterialBase
+     * @return 删除结果
+     */
+    public int physicalDelete(BizMaterialBase bizMaterialBase);
+
+}

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

@@ -0,0 +1,43 @@
+package cn.ezhizao.project.business.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.mapper.BizMaterialBaseMapper;
+import cn.ezhizao.project.business.domain.BizMaterialBase;
+import cn.ezhizao.project.business.service.IBizMaterialBaseService;
+
+/**
+ * 材料基本 来源inv10100Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2025-04-21
+ */
+@Service
+public class BizMaterialBaseServiceImpl  extends ServiceImpl<BizMaterialBaseMapper, BizMaterialBase> implements IBizMaterialBaseService
+{
+    @Resource
+    private BizMaterialBaseMapper bizMaterialBaseMapper;
+
+    /**
+     * 查询材料基本 来源inv10100列表
+     *
+     * @param bizMaterialBase 材料基本 来源inv10100
+     * @return 材料基本 来源inv10100
+     */
+    @Override
+    public List<BizMaterialBase> getList(BizMaterialBase bizMaterialBase)
+    {
+        return bizMaterialBaseMapper.getList(bizMaterialBase);
+    }
+
+    /**
+     * 物理删除
+     * @param bizMaterialBase
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizMaterialBase bizMaterialBase){ return bizMaterialBaseMapper.physicalDelete(bizMaterialBase); };
+
+}

+ 180 - 0
src/main/resources/mybatis/business/BizMaterialBaseMapper.xml

@@ -0,0 +1,180 @@
+<?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.BizMaterialBaseMapper">
+
+    <resultMap type="cn.ezhizao.project.business.domain.BizMaterialBase" id="BizMaterialBaseResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizMaterialBase" resultMap="BizMaterialBaseResult">
+        SELECT * FROM biz_material_base
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="materialCode != null  and materialCode != ''"> AND material_code = #{materialCode}</if>
+            <if test="type != null  and type != ''"> AND type = #{type}</if>
+            <if test="mnemonicCode != null  and mnemonicCode != ''"> AND mnemonic_code = #{mnemonicCode}</if>
+            <if test="itemtype != null  and itemtype != ''"> AND itemtype = #{itemtype}</if>
+            <if test="steelClass != null  and steelClass != ''"> AND steel_class = #{steelClass}</if>
+            <if test="repCode != null  and repCode != ''"> AND rep_code = #{repCode}</if>
+            <if test="barcode != null  and barcode != ''"> AND barcode = #{barcode}</if>
+            <if test="prloc != null  and prloc != ''"> AND prloc = #{prloc}</if>
+            <if test="dept != null  and dept != ''"> AND dept = #{dept}</if>
+            <if test="description != null  and description != ''"> AND description = #{description}</if>
+            <if test="specification != null  and specification != ''"> AND specification = #{specification}</if>
+            <if test="uom != null  and uom != ''"> AND uom = #{uom}</if>
+            <if test="pounit != null  and pounit != ''"> AND pounit = #{pounit}</if>
+            <if test="pofact != null "> AND pofact = #{pofact}</if>
+            <if test="counit != null  and counit != ''"> AND counit = #{counit}</if>
+            <if test="cofact != null "> AND cofact = #{cofact}</if>
+            <if test="sounit != null  and sounit != ''"> AND sounit = #{sounit}</if>
+            <if test="sofact != null "> AND sofact = #{sofact}</if>
+            <if test="wunit != null  and wunit != ''"> AND wunit = #{wunit}</if>
+            <if test="weight != null "> AND weight = #{weight}</if>
+            <if test="weigs != null "> AND weigs = #{weigs}</if>
+            <if test="volume != null "> AND volume = #{volume}</if>
+            <if test="rounded != null  and rounded != ''"> AND rounded = #{rounded}</if>
+            <if test="draw != null  and draw != ''"> AND draw = #{draw}</if>
+            <if test="mpsok != null  and mpsok != ''"> AND mpsok = #{mpsok}</if>
+            <if test="isstype != null  and isstype != ''"> AND isstype = #{isstype}</if>
+            <if test="bypass != null  and bypass != ''"> AND bypass = #{bypass}</if>
+            <if test="batchqty != null "> AND batchqty = #{batchqty}</if>
+            <if test="yield != null "> AND yield = #{yield}</if>
+            <if test="commodity != null  and commodity != ''"> AND commodity = #{commodity}</if>
+            <if test="prdline != null  and prdline != ''"> AND prdline = #{prdline}</if>
+            <if test="salgrp != null  and salgrp != ''"> AND salgrp = #{salgrp}</if>
+            <if test="prcgrp != null  and prcgrp != ''"> AND prcgrp = #{prcgrp}</if>
+            <if test="fixmo != null  and fixmo != ''"> AND fixmo = #{fixmo}</if>
+            <if test="prpart != null  and prpart != ''"> AND prpart = #{prpart}</if>
+            <if test="attrctl != null  and attrctl != ''"> AND attrctl = #{attrctl}</if>
+            <if test="abc != null  and abc != ''"> AND abc = #{abc}</if>
+            <if test="abcctl != null  and abcctl != ''"> AND abcctl = #{abcctl}</if>
+            <if test="lcydate != null "> AND lcydate = #{lcydate}</if>
+            <if test="price != null "> AND price = #{price}</if>
+            <if test="stdcost != null "> AND stdcost = #{stdcost}</if>
+            <if test="material != null "> AND material = #{material}</if>
+            <if test="thismaterial != null "> AND thismaterial = #{thismaterial}</if>
+            <if test="prematerial != null "> AND prematerial = #{prematerial}</if>
+            <if test="labor != null "> AND labor = #{labor}</if>
+            <if test="thislabor != null "> AND thislabor = #{thislabor}</if>
+            <if test="prelabor != null "> AND prelabor = #{prelabor}</if>
+            <if test="overhead != null "> AND overhead = #{overhead}</if>
+            <if test="thisoverhead != null "> AND thisoverhead = #{thisoverhead}</if>
+            <if test="preoverhead != null "> AND preoverhead = #{preoverhead}</if>
+            <if test="varover != null "> AND varover = #{varover}</if>
+            <if test="mutqty2 != null "> AND mutqty2 = #{mutqty2}</if>
+            <if test="avgprc != null "> AND avgprc = #{avgprc}</if>
+            <if test="stdctl != null  and stdctl != ''"> AND stdctl = #{stdctl}</if>
+            <if test="purchaser != null  and purchaser != ''"> AND purchaser = #{purchaser}</if>
+            <if test="planner != null  and planner != ''"> AND planner = #{planner}</if>
+            <if test="vendor1 != null  and vendor1 != ''"> AND vendor1 = #{vendor1}</if>
+            <if test="safqty != null "> AND safqty = #{safqty}</if>
+            <if test="reorder != null "> AND reorder = #{reorder}</if>
+            <if test="minqty != null "> AND minqty = #{minqty}</if>
+            <if test="maxqty != null "> AND maxqty = #{maxqty}</if>
+            <if test="mutqty != null "> AND mutqty = #{mutqty}</if>
+            <if test="maxperiod != null "> AND maxperiod = #{maxperiod}</if>
+            <if test="merge != null  and merge != ''"> AND merge = #{merge}</if>
+            <if test="lead != null "> AND lead = #{lead}</if>
+            <if test="duration != null "> AND duration = #{duration}</if>
+            <if test="varbase1 != null "> AND varbase1 = #{varbase1}</if>
+            <if test="varbase != null "> AND varbase = #{varbase}</if>
+            <if test="planitem != null  and planitem != ''"> AND planitem = #{planitem}</if>
+            <if test="police != null  and police != ''"> AND police = #{police}</if>
+            <if test="llc != null "> AND llc = #{llc}</if>
+            <if test="onhand != null "> AND onhand = #{onhand}</if>
+            <if test="onorder != null "> AND onorder = #{onorder}</if>
+            <if test="allocate != null "> AND allocate = #{allocate}</if>
+            <if test="iqcqty != null "> AND iqcqty = #{iqcqty}</if>
+            <if test="priceflag != null  and priceflag != ''"> AND priceflag = #{priceflag}</if>
+            <if test="merchandise != null  and merchandise != ''"> AND merchandise = #{merchandise}</if>
+            <if test="lot != null  and lot != ''"> AND lot = #{lot}</if>
+            <if test="aux != null  and aux != ''"> AND aux = #{aux}</if>
+            <if test="auxunit != null  and auxunit != ''"> AND auxunit = #{auxunit}</if>
+            <if test="auxqty != null "> AND auxqty = #{auxqty}</if>
+            <if test="status != null  and status != ''"> AND status = #{status}</if>
+            <if test="lsttxdate != null "> AND lsttxdate = #{lsttxdate}</if>
+            <if test="subor != null "> AND subor = #{subor}</if>
+            <if test="thissubor != null "> AND thissubor = #{thissubor}</if>
+            <if test="presubor != null "> AND presubor = #{presubor}</if>
+            <if test="other != null "> AND other = #{other}</if>
+            <if test="thisother != null "> AND thisother = #{thisother}</if>
+            <if test="preother != null "> AND preother = #{preother}</if>
+            <if test="createdate != null "> AND createdate = #{createdate}</if>
+            <if test="createuser != null  and createuser != ''"> AND createuser = #{createuser}</if>
+            <if test="modifydate != null "> AND modifydate = #{modifydate}</if>
+            <if test="modifyuser != null  and modifyuser != ''"> AND modifyuser = #{modifyuser}</if>
+            <if test="rs != null  and rs != ''"> AND rs = #{rs}</if>
+            <if test="bkitem != null  and bkitem != ''"> AND bkitem = #{bkitem}</if>
+            <if test="bond != null  and bond != ''"> AND bond = #{bond}</if>
+            <if test="bissue != null  and bissue != ''"> AND bissue = #{bissue}</if>
+            <if test="qclead != null "> AND qclead = #{qclead}</if>
+            <if test="tfcode != null  and tfcode != ''"> AND tfcode = #{tfcode}</if>
+            <if test="stdlabor != null "> AND stdlabor = #{stdlabor}</if>
+            <if test="stdmachine != null "> AND stdmachine = #{stdmachine}</if>
+            <if test="accumlabor != null "> AND accumlabor = #{accumlabor}</if>
+            <if test="accumachine != null "> AND accumachine = #{accumachine}</if>
+            <if test="mpsprice != null "> AND mpsprice = #{mpsprice}</if>
+            <if test="mpscost != null "> AND mpscost = #{mpscost}</if>
+            <if test="bigclass != null  and bigclass != ''"> AND bigclass = #{bigclass}</if>
+            <if test="smlclass != null  and smlclass != ''"> AND smlclass = #{smlclass}</if>
+            <if test="potype != null  and potype != ''"> AND potype = #{potype}</if>
+            <if test="cstDynamical != null "> AND cst_dynamical = #{cstDynamical}</if>
+            <if test="cstFactory != null  and cstFactory != ''"> AND cst_factory = #{cstFactory}</if>
+            <if test="cstEquipment != null "> AND cst_equipment = #{cstEquipment}</if>
+            <if test="cstType != null  and cstType != ''"> AND cst_type = #{cstType}</if>
+            <if test="cstZj != null  and cstZj != ''"> AND cst_zj = #{cstZj}</if>
+            <if test="cstPartm != null  and cstPartm != ''"> AND cst_partm = #{cstPartm}</if>
+            <if test="cstKamt != null "> AND cst_kamt = #{cstKamt}</if>
+            <if test="jsyq != null  and jsyq != ''"> AND jsyq = #{jsyq}</if>
+            <if test="xzcode != null  and xzcode != ''"> AND xzcode = #{xzcode}</if>
+            <if test="zjunprc != null "> AND zjunprc = #{zjunprc}</if>
+            <if test="purtype != null  and purtype != ''"> AND purtype = #{purtype}</if>
+            <if test="phcode != null  and phcode != ''"> AND phcode = #{phcode}</if>
+            <if test="xhcode != null  and xhcode != ''"> AND xhcode = #{xhcode}</if>
+            <if test="addcode != null  and addcode != ''"> AND addcode = #{addcode}</if>
+            <if test="cdcode != null  and cdcode != ''"> AND cdcode = #{cdcode}</if>
+            <if test="cptype != null  and cptype != ''"> AND cptype = #{cptype}</if>
+            <if test="shaft != null  and shaft != ''"> AND shaft = #{shaft}</if>
+            <if test="density != null "> AND density = #{density}</if>
+            <if test="lenght != null "> AND lenght = #{lenght}</if>
+            <if test="dzj != null "> AND dzj = #{dzj}</if>
+            <if test="lenghts != null  and lenghts != ''"> AND lenghts = #{lenghts}</if>
+            <if test="gccd != null "> AND gccd = #{gccd}</if>
+            <if test="dzjs != null  and dzjs != ''"> AND dzjs = #{dzjs}</if>
+            <if test="onqty != null "> AND onqty = #{onqty}</if>
+            <if test="khjc != null  and khjc != ''"> AND khjc = #{khjc}</if>
+            <if test="invdate != null "> AND invdate = #{invdate}</if>
+            <if test="khpart != null  and khpart != ''"> AND khpart = #{khpart}</if>
+            <if test="zlcd != null  and zlcd != ''"> AND zlcd = #{zlcd}</if>
+            <if test="jsyq1 != null  and jsyq1 != ''"> AND jsyq1 = #{jsyq1}</if>
+            <if test="rkbz != null  and rkbz != ''"> AND rkbz = #{rkbz}</if>
+            <if test="hpart != null  and hpart != ''"> AND hpart = #{hpart}</if>
+            <if test="luhao != null  and luhao != ''"> AND luhao = #{luhao}</if>
+            <if test="facno != null  and facno != ''"> AND facno = #{facno}</if>
+            <if test="orderno != null  and orderno != ''"> AND orderno = #{orderno}</if>
+            <if test="bzhs != null "> AND bzhs = #{bzhs}</if>
+            <if test="spcode != null  and spcode != ''"> AND spcode = #{spcode}</if>
+            <if test="spname != null  and spname != ''"> AND spname like concat('%', #{spname}, '%')</if>
+            <if test="cust != null  and cust != ''"> AND cust = #{cust}</if>
+            <if test="yzj != null "> AND yzj = #{yzj}</if>
+            <if test="writeuser != null  and writeuser != ''"> AND writeuser = #{writeuser}</if>
+            <if test="writedate != null "> AND writedate = #{writedate}</if>
+            <if test="writeruser != null  and writeruser != ''"> AND writeruser = #{writeruser}</if>
+            <if test="dtype != null  and dtype != ''"> AND dtype = #{dtype}</if>
+            <if test="zjbxprc != null "> AND zjbxprc = #{zjbxprc}</if>
+        </trim>
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_material_base
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>