From 5bee31b7e5fb3066a900f01ca80225e80a48312a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=81=92=E6=9D=B0?= <2658502433@qq.com> Date: Thu, 22 Aug 2024 09:59:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E9=99=84=E5=B1=9E=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseProductAttachedController.java | 92 ++++++- .../op/mes/domain/BaseProductAttached.java | 260 ++++++++++-------- .../mes/mapper/BaseProductAttachedMapper.java | 5 + .../service/IBaseProductAttachedService.java | 5 + .../impl/BaseProductAttachedServiceImpl.java | 183 ++++++++++++ .../mapper/mes/BaseProductAttachedMapper.xml | 37 ++- 6 files changed, 466 insertions(+), 116 deletions(-) diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/BaseProductAttachedController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/BaseProductAttachedController.java index 0849d568c..ddd5f97de 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/controller/BaseProductAttachedController.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/BaseProductAttachedController.java @@ -1,8 +1,13 @@ package com.op.mes.controller; +import java.io.IOException; +import java.util.ArrayList; import java.util.List; +import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; +import com.op.common.core.domain.ExcelCol; +import com.op.common.core.utils.poi.ExcelMapUtil; import com.op.common.core.utils.poi.ExcelUtil; import com.op.common.core.web.controller.BaseController; import com.op.common.core.web.domain.AjaxResult; @@ -12,6 +17,7 @@ import com.op.common.security.annotation.RequiresPermissions; import com.op.mes.domain.BaseProductAttached; import com.op.mes.service.IBaseProductAttachedService; +import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -22,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.op.common.log.annotation.Log; +import org.springframework.web.multipart.MultipartFile; /** * 物料附属信息Controller @@ -83,7 +90,12 @@ public class BaseProductAttachedController extends BaseController @PostMapping public AjaxResult add(@RequestBody BaseProductAttached baseProductAttached) { - return toAjax(baseProductAttachedService.insertBaseProductAttached(baseProductAttached)); + + if (baseProductAttachedService.checkSpareCodeUnique(baseProductAttached)) { + return AjaxResult.error("备品备件编码已存在!"); + } else { + return toAjax(baseProductAttachedService.insertBaseProductAttached(baseProductAttached)); + } } /** @@ -109,4 +121,82 @@ public class BaseProductAttachedController extends BaseController { return toAjax(baseProductAttachedService.deleteBaseProductAttachedByIds(ids)); } + + /** + * 生成物料附属信息模板 + * + * @param response + * @throws IOException + */ + @PostMapping("/importTemplate") + @Log(title = "生成备品备件信息模板", businessType = BusinessType.EXPORT) + public void importTemplate(HttpServletResponse response) throws IOException { + + ArrayList excelCols = new ArrayList<>(); + excelCols.add(new ExcelCol("产品编号", "productCode", 20)); + excelCols.add(new ExcelCol("品类", "category", 20)); + excelCols.add(new ExcelCol("每PC单圈", "pc", 20)); + excelCols.add(new ExcelCol("标准效率", "iei", 20)); + excelCols.add(new ExcelCol("标准用人", "manStandar", 20)); + excelCols.add(new ExcelCol("喷药方式", "sprayWay", 20)); + + excelCols.add(new ExcelCol("白坯直径", "blankDiameter", 20)); + excelCols.add(new ExcelCol("白坯物料号", "blankNo", 20)); + excelCols.add(new ExcelCol("标准喷药量", "sprayVolume", 20)); + + excelCols.add(new ExcelCol("药液料号", "liquidNo", 20)); + excelCols.add(new ExcelCol("标准内膜用量", "endometrialDosage", 20)); + excelCols.add(new ExcelCol("标准外模用量(KG/PC)", "outerFilmDosage", 20)); + + + excelCols.add(new ExcelCol("支架", "support", 20)); + excelCols.add(new ExcelCol("支架物料号", "supportNo", 20)); + excelCols.add(new ExcelCol("吸塑", "pvc", 20)); + + + excelCols.add(new ExcelCol("支架盘", "supportPlate", 20)); + + excelCols.add(new ExcelCol("创建人", "createBy", 20)); + excelCols.add(new ExcelCol("库检周期", "warehouseCycle", 20)); + excelCols.add(new ExcelCol("托盘上箱数", "palletNum", 20)); + excelCols.add(new ExcelCol("垛形", "packType", 20)); + + String titleName = "物料附属信息导入"; + SXSSFWorkbook workbook = null; + try { + //设置响应头 + response.setHeader("Content-disposition", + "attachment; filename=" + titleName); + response.setContentType("application/octet-stream;charset=UTF-8"); + ServletOutputStream outputStream = response.getOutputStream(); + //调用工具类 + workbook = ExcelMapUtil.initWorkbook(titleName, null, excelCols, null); + workbook.write(outputStream); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (workbook != null) { + workbook.dispose(); + } + } + } + + /** + * 导入物料附属信息基本信息接口 + * + * @param file + * @return + * @throws Exception + */ + @Log(title = "导入物料基本信息", businessType = BusinessType.IMPORT) + @PostMapping("/importFile") + @RequiresPermissions("mes:attached:import") + public AjaxResult importFile(MultipartFile file) throws Exception { + // 创建接收对象 + ExcelUtil util = new ExcelUtil<>(BaseProductAttached.class); + // 接收表格信息 + List orderList = util.importExcel(file.getInputStream()); + return baseProductAttachedService.importFile(orderList); + } + } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/BaseProductAttached.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/BaseProductAttached.java index 730984fa8..9af6c2573 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/BaseProductAttached.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/BaseProductAttached.java @@ -54,7 +54,7 @@ public class BaseProductAttached extends BaseEntity private String blankNo; /** 标准喷药量(KG/PC) */ - @Excel(name = "标准喷药量", readConverterExp = "K=G/PC") + @Excel(name = "标准喷药量") private BigDecimal sprayVolume; /** 药液料号 */ @@ -62,7 +62,7 @@ public class BaseProductAttached extends BaseEntity private String liquidNo; /** 标准内膜用量(KG/PC) */ - @Excel(name = "标准内膜用量", readConverterExp = "K=G/PC") + @Excel(name = "标准内膜用量") private BigDecimal endometrialDosage; /** 标准外模用量(KG/PC) */ @@ -89,191 +89,225 @@ public class BaseProductAttached extends BaseEntity @Excel(name = "其它") private String other; - public void setId(String id) - { + /** 创建人 */ + @Excel(name = "创建人") + private String createBy; + + /** 库检周期 */ + @Excel(name = "库检周期") + private String warehouseCycle; + + /** 托盘上箱数 */ + @Excel(name = "托盘上箱数") + private BigDecimal palletNum; + + /** 垛形 */ + @Excel(name = "垛形") + private String packType; + + public String getId() { + return id; + } + + public void setId(String id) { this.id = id; } - public String getId() - { - return id; + public String getProductCode() { + return productCode; } - public void setProductCode(String productCode) - { + + public void setProductCode(String productCode) { this.productCode = productCode; } - public String getProductCode() - { - return productCode; + public String getCategory() { + return category; } - public void setCategory(String category) - { + + public void setCategory(String category) { this.category = category; } - public String getCategory() - { - return category; + public String getPc() { + return pc; } - public void setPc(String pc) - { + + public void setPc(String pc) { this.pc = pc; } - public String getPc() - { - return pc; + public BigDecimal getIei() { + return iei; } - public void setIei(BigDecimal iei) - { + + public void setIei(BigDecimal iei) { this.iei = iei; } - public BigDecimal getIei() - { - return iei; + public BigDecimal getManStandar() { + return manStandar; } - public void setManStandar(BigDecimal manStandar) - { + + public void setManStandar(BigDecimal manStandar) { this.manStandar = manStandar; } - public BigDecimal getManStandar() - { - return manStandar; + public String getSprayWay() { + return sprayWay; } - public void setSprayWay(String sprayWay) - { + + public void setSprayWay(String sprayWay) { this.sprayWay = sprayWay; } - public String getSprayWay() - { - return sprayWay; + public BigDecimal getBlankDiameter() { + return blankDiameter; } - public void setBlankDiameter(BigDecimal blankDiameter) - { + + public void setBlankDiameter(BigDecimal blankDiameter) { this.blankDiameter = blankDiameter; } - public BigDecimal getBlankDiameter() - { - return blankDiameter; + public String getBlankNo() { + return blankNo; } - public void setBlankNo(String blankNo) - { + + public void setBlankNo(String blankNo) { this.blankNo = blankNo; } - public String getBlankNo() - { - return blankNo; + public BigDecimal getSprayVolume() { + return sprayVolume; } - public void setSprayVolume(BigDecimal sprayVolume) - { + + public void setSprayVolume(BigDecimal sprayVolume) { this.sprayVolume = sprayVolume; } - public BigDecimal getSprayVolume() - { - return sprayVolume; + public String getLiquidNo() { + return liquidNo; } - public void setLiquidNo(String liquidNo) - { + + public void setLiquidNo(String liquidNo) { this.liquidNo = liquidNo; } - public String getLiquidNo() - { - return liquidNo; + public BigDecimal getEndometrialDosage() { + return endometrialDosage; } - public void setEndometrialDosage(BigDecimal endometrialDosage) - { + + public void setEndometrialDosage(BigDecimal endometrialDosage) { this.endometrialDosage = endometrialDosage; } - public BigDecimal getEndometrialDosage() - { - return endometrialDosage; + public BigDecimal getOuterFilmDosage() { + return outerFilmDosage; } - public void setOuterFilmDosage(BigDecimal outerFilmDosage) - { + + public void setOuterFilmDosage(BigDecimal outerFilmDosage) { this.outerFilmDosage = outerFilmDosage; } - public BigDecimal getOuterFilmDosage() - { - return outerFilmDosage; + public Long getSupport() { + return support; } - public void setSupport(Long support) - { + + public void setSupport(Long support) { this.support = support; } - public Long getSupport() - { - return support; + public String getSupportNo() { + return supportNo; } - public void setSupportNo(String supportNo) - { + + public void setSupportNo(String supportNo) { this.supportNo = supportNo; } - public String getSupportNo() - { - return supportNo; + public Long getPvc() { + return pvc; } - public void setPvc(Long pvc) - { + + public void setPvc(Long pvc) { this.pvc = pvc; } - public Long getPvc() - { - return pvc; + public Long getSupportPlate() { + return supportPlate; } - public void setSupportPlate(Long supportPlate) - { + + public void setSupportPlate(Long supportPlate) { this.supportPlate = supportPlate; } - public Long getSupportPlate() - { - return supportPlate; + public String getOther() { + return other; } - public void setOther(String other) - { + + public void setOther(String other) { this.other = other; } - public String getOther() - { - return other; + @Override + public String getCreateBy() { + return createBy; + } + + @Override + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public String getWarehouseCycle() { + return warehouseCycle; + } + + public void setWarehouseCycle(String warehouseCycle) { + this.warehouseCycle = warehouseCycle; + } + + public BigDecimal getPalletNum() { + return palletNum; + } + + public void setPalletNum(BigDecimal palletNum) { + this.palletNum = palletNum; + } + + public String getPackType() { + return packType; + } + + public void setPackType(String packType) { + this.packType = packType; } @Override public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("productCode", getProductCode()) - .append("category", getCategory()) - .append("pc", getPc()) - .append("iei", getIei()) - .append("manStandar", getManStandar()) - .append("sprayWay", getSprayWay()) - .append("blankDiameter", getBlankDiameter()) - .append("blankNo", getBlankNo()) - .append("sprayVolume", getSprayVolume()) - .append("liquidNo", getLiquidNo()) - .append("endometrialDosage", getEndometrialDosage()) - .append("outerFilmDosage", getOuterFilmDosage()) - .append("support", getSupport()) - .append("supportNo", getSupportNo()) - .append("pvc", getPvc()) - .append("supportPlate", getSupportPlate()) - .append("other", getOther()) - .append("createBy", getCreateBy()) - .toString(); + return "BaseProductAttached{" + + "id='" + id + '\'' + + ", productCode='" + productCode + '\'' + + ", category='" + category + '\'' + + ", pc='" + pc + '\'' + + ", iei=" + iei + + ", manStandar=" + manStandar + + ", sprayWay='" + sprayWay + '\'' + + ", blankDiameter=" + blankDiameter + + ", blankNo='" + blankNo + '\'' + + ", sprayVolume=" + sprayVolume + + ", liquidNo='" + liquidNo + '\'' + + ", endometrialDosage=" + endometrialDosage + + ", outerFilmDosage=" + outerFilmDosage + + ", support=" + support + + ", supportNo='" + supportNo + '\'' + + ", pvc=" + pvc + + ", supportPlate=" + supportPlate + + ", other='" + other + '\'' + + ", createBy='" + createBy + '\'' + + ", warehouseCycle='" + warehouseCycle + '\'' + + ", palletNum=" + palletNum + + ", packType='" + packType + '\'' + + '}'; } } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/BaseProductAttachedMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/BaseProductAttachedMapper.java index 1bea48073..098c9c6ef 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/BaseProductAttachedMapper.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/BaseProductAttachedMapper.java @@ -59,4 +59,9 @@ public interface BaseProductAttachedMapper * @return 结果 */ public int deleteBaseProductAttachedByIds(String[] ids); + + BaseProductAttached selectBaseProductAttachedByProductCode(String productCode); + + //检查productCode + String checkSpareCodeUnique(BaseProductAttached baseProductAttached); } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/IBaseProductAttachedService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/IBaseProductAttachedService.java index fd8afd075..301e0d441 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/IBaseProductAttachedService.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/IBaseProductAttachedService.java @@ -3,6 +3,7 @@ package com.op.mes.service; import java.util.List; +import com.op.common.core.web.domain.AjaxResult; import com.op.mes.domain.BaseProductAttached; @@ -61,4 +62,8 @@ public interface IBaseProductAttachedService * @return 结果 */ public int deleteBaseProductAttachedById(String id); + + AjaxResult importFile(List list); + boolean checkSpareCodeUnique(BaseProductAttached baseProductAttached); + } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/BaseProductAttachedServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/BaseProductAttachedServiceImpl.java index 46a917a7a..3c2e32f5d 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/BaseProductAttachedServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/BaseProductAttachedServiceImpl.java @@ -4,12 +4,25 @@ import java.util.List; import com.baomidou.dynamic.datasource.annotation.DS; import com.op.common.core.utils.DateUtils; +import com.op.common.core.utils.StringUtils; import com.op.common.core.utils.uuid.IdUtils; +import com.op.common.core.web.domain.AjaxResult; +import com.op.common.security.utils.SecurityUtils; import com.op.mes.domain.BaseProductAttached; import com.op.mes.mapper.BaseProductAttachedMapper; import com.op.mes.service.IBaseProductAttachedService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; + +import static com.op.common.core.web.domain.AjaxResult.error; +import static com.op.common.core.web.domain.AjaxResult.success; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** @@ -24,6 +37,8 @@ public class BaseProductAttachedServiceImpl implements IBaseProductAttachedServi @Autowired private BaseProductAttachedMapper baseProductAttachedMapper; + protected Logger logger = LoggerFactory.getLogger(getClass()); + /** * 查询物料附属信息 * @@ -62,6 +77,7 @@ public class BaseProductAttachedServiceImpl implements IBaseProductAttachedServi { baseProductAttached.setId(IdUtils.fastSimpleUUID()); baseProductAttached.setCreateTime(DateUtils.getNowDate()); + baseProductAttached.setCreateBy(SecurityUtils.getUsername()); return baseProductAttachedMapper.insertBaseProductAttached(baseProductAttached); } @@ -104,4 +120,171 @@ public class BaseProductAttachedServiceImpl implements IBaseProductAttachedServi { return baseProductAttachedMapper.deleteBaseProductAttachedById(id); } + + + /** + * 导入 + * @param baseProductAttached + * @return + */ + @Override + @DS("#header.poolName") + @Transactional + public AjaxResult importFile(List baseProductAttached) { + BaseProductAttached example=null; + for (BaseProductAttached table : baseProductAttached) { + table.setId(IdUtils.fastSimpleUUID()); + table.setCreateBy(SecurityUtils.getUsername()); + } + + //数据校验 + // 数据校验 + AjaxResult checkResult = checkImportFile(baseProductAttached); + + // 如果数据校验成功 + if (checkResult.isSuccess()) { + String info = syncImportFunc(baseProductAttached); + return success("信息导入完成。其中导入失败的信息:" + info); + } + // 校验失败 + return checkResult; + } + + + + private String syncImportFunc(List baseProductAttached) { + String failEquipment = ""; + for (BaseProductAttached table : baseProductAttached) { + String msg = syncFunc(table); + if (StringUtils.isNotBlank(msg)) { + failEquipment += msg + ","; + } + } + return failEquipment; + } + + @Transactional(rollbackFor = Exception.class) + public String syncFunc(BaseProductAttached table) { + String failSpareParts = ""; + BaseProductAttached Exist = baseProductAttachedMapper.selectBaseProductAttachedByProductCode(table.getProductCode()); + //不存在就插入 + if (Exist == null) { + baseProductAttachedMapper.insertBaseProductAttached(table); + logger.info("=======物料附属信息" + table.getProductCode() + "=======导入成功"); + + //存在,不允许插入 + } else { + failSpareParts = table.getProductCode(); + logger.info("=======物料附属信息" + failSpareParts + "=======导入失败"); + } + return failSpareParts; + } + + + /** + * 校验导入信息 + */ + public AjaxResult checkImportFile(List baseProductAttached){ + // 传入对象不能为空 + if (baseProductAttached.size() == 0 || StringUtils.isNull(baseProductAttached)) { + return error(500, "导入的信息不能为空!信息导入失败!"); + } + + + for (BaseProductAttached productAttached : baseProductAttached) { + //产品编码 + if (productAttached.getProductCode().isEmpty() || productAttached.getProductCode()==null){ + return error(500, "产品编号不能为空!信息导入失败!"); + } + //品类 + if (productAttached.getCategory().isEmpty() || productAttached.getCategory()==null){ + return error(500, "品类不能为空!信息导入失败!"); + } + //每PC单圈 + if (productAttached.getPc().isEmpty() || productAttached.getPc()==null){ + return error(500, "每PC单圈不能为空!信息导入失败!"); + } + //标准效率 + if (productAttached.getIei().toString().isEmpty() || productAttached.getIei()==null){ + return error(500, "标准效率不能为空!信息导入失败!"); + } + //标准用人 + if (productAttached.getManStandar().toString().isEmpty() || productAttached.getManStandar()==null){ + return error(500, "标准用人不能为空!信息导入失败!"); + } + //喷药方式 +// if (productAttached.getSprayWay().isEmpty() || productAttached.getSprayWay()==null){ +// return error(500, "喷药方式不能为空!信息导入失败!"); +// } + //白坯直径 + if (productAttached.getBlankDiameter().toString().isEmpty() || productAttached.getBlankDiameter()==null){ + return error(500, "白坯直径不能为空!信息导入失败!"); + } + //白坯物料号 + if (productAttached.getBlankNo().isEmpty() || productAttached.getBlankNo()==null){ + return error(500, "白坯物料号不能为空!信息导入失败!"); + } + //标准喷药量 + if (productAttached.getSprayVolume().toString().isEmpty() || productAttached.getSprayVolume()==null){ + return error(500, "标准喷药量不能为空!信息导入失败!"); + } + //药液料号 + if (productAttached.getLiquidNo().isEmpty() || productAttached.getLiquidNo()==null){ + return error(500, "药液料号不能为空!信息导入失败!"); + } + //标准内膜用量 + if (productAttached.getEndometrialDosage().toString().isEmpty() || productAttached.getEndometrialDosage()==null){ + return error(500, "标准内膜用量不能为空!信息导入失败!"); + } + //标准外膜用量 + if (productAttached.getOuterFilmDosage().toString().isEmpty() || productAttached.getOuterFilmDosage()==null){ + return error(500, "标准外膜用量不能为空!信息导入失败!"); + } + //支架 + if (productAttached.getSupport().toString().isEmpty() || productAttached.getSupport()==null){ + return error(500, "支架不能为空!信息导入失败!"); + } + //支架物料号 + if (productAttached.getSupportNo().isEmpty() || productAttached.getSupportNo()==null){ + return error(500, "支架物料号不能为空!信息导入失败!"); + } + //吸塑 + if (productAttached.getPvc().toString().isEmpty() || productAttached.getPvc()==null){ + return error(500, "吸塑不能为空!信息导入失败!"); + } + //支架盘 + if (productAttached.getSupportPlate().toString().isEmpty() || productAttached.getSupportPlate()==null){ + return error(500, "支架盘不能为空!信息导入失败!"); + } + //库检周期 + if (productAttached.getWarehouseCycle().isEmpty() || productAttached.getSupportPlate()==null){ + return error(500, "库检周期不能为空!信息导入失败!"); + } + //库检周期 + if (productAttached.getWarehouseCycle().isEmpty() || productAttached.getWarehouseCycle()==null){ + return error(500, "库检周期不能为空!信息导入失败!"); + } + //托盘上箱数 + if (productAttached.getPalletNum().toString().isEmpty() || productAttached.getPalletNum()==null){ + return error(500, "托盘上箱数不能为空!信息导入失败!"); + } + //垛形 + if (productAttached.getPackType().isEmpty() || productAttached.getPackType()==null){ + return error(500, "垛形不能为空!信息导入失败!"); + } + } + return success(); + + } + + @Override + @DS("#header.poolName") + public boolean checkSpareCodeUnique(BaseProductAttached baseProductAttached) { + String spareCode = baseProductAttachedMapper.checkSpareCodeUnique(baseProductAttached); + if (spareCode == null) { + return false; + } else { + return true; + } + } } diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/BaseProductAttachedMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/BaseProductAttachedMapper.xml index 887c5cea0..dc025030c 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/BaseProductAttachedMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/BaseProductAttachedMapper.xml @@ -24,10 +24,15 @@ + + + - select id, product_code, category, pc, iei, man_standar, spray_way, blank_diameter, blank_no, spray_volume, liquid_no, endometrial_dosage, outer_film_dosage, support, support_no, pvc, support_plate, other, create_by from base_product_attached + select id, product_code, category, pc, iei, man_standar, spray_way, blank_diameter, blank_no, spray_volume, liquid_no, endometrial_dosage, outer_film_dosage, support, support_no, pvc, + support_plate, + other, create_by, warehouse_cycle,pallet_num,pack_type from base_product_attached @@ -57,7 +67,18 @@ where id = #{id} - + + + + + insert into base_product_attached @@ -80,6 +101,10 @@ support_plate, other, create_by, + + warehouse_cycle, + pallet_num, + pack_type, #{id}, @@ -101,6 +126,9 @@ #{supportPlate}, #{other}, #{createBy}, + #{warehouseCycle}, + #{palletNum}, + #{packType}, @@ -125,6 +153,11 @@ support_plate = #{supportPlate}, other = #{other}, create_by = #{createBy}, + + + warehouse_cycle = #{warehouseCycle}, + pallet_num = #{palletNum}, + pack_type = #{packType}, where id = #{id}