diff --git a/evo/pom.xml b/evo/pom.xml
index a47ccc9..14d6279 100644
--- a/evo/pom.xml
+++ b/evo/pom.xml
@@ -35,6 +35,7 @@
3.17
3.9.1
1.7
+
@@ -50,7 +51,16 @@
poi-ooxml
3.17
-->
-
+
+ org.projectlombok
+ lombok
+ 1.18.26
+
+
+ com.alibaba
+ easyexcel
+ 4.0.3
+
com.belerweb
diff --git a/evo/src/main/java/com/ruoyi/common/utils/ValidatorUtils.java b/evo/src/main/java/com/ruoyi/common/utils/ValidatorUtils.java
new file mode 100644
index 0000000..1fe2eaf
--- /dev/null
+++ b/evo/src/main/java/com/ruoyi/common/utils/ValidatorUtils.java
@@ -0,0 +1,29 @@
+package com.ruoyi.common.utils;
+
+import com.ruoyi.common.utils.spring.SpringUtils;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.ConstraintViolationException;
+import javax.validation.Validator;
+import java.util.Set;
+
+/**
+ * Validator 校验框架工具
+ *
+ * @author Lion Li
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public class ValidatorUtils {
+
+ private static final Validator VALID = SpringUtils.getBean(Validator.class);
+
+ public static void validate(T object, Class>... groups) {
+ Set> validate = VALID.validate(object, groups);
+ if (!validate.isEmpty()) {
+ throw new ConstraintViolationException("参数校验异常", validate);
+ }
+ }
+
+}
diff --git a/evo/src/main/java/com/ruoyi/common/utils/listener/DefaultExcelListener.java b/evo/src/main/java/com/ruoyi/common/utils/listener/DefaultExcelListener.java
new file mode 100644
index 0000000..b30e95b
--- /dev/null
+++ b/evo/src/main/java/com/ruoyi/common/utils/listener/DefaultExcelListener.java
@@ -0,0 +1,95 @@
+package com.ruoyi.common.utils.listener;
+
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.event.AnalysisEventListener;
+import com.alibaba.excel.exception.ExcelAnalysisException;
+import com.alibaba.excel.exception.ExcelDataConvertException;
+import com.ruoyi.common.utils.ValidatorUtils;
+import com.ruoyi.common.utils.sql.JsonUtils;
+import lombok.NoArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.ConstraintViolationException;
+import java.util.Map;
+import java.util.Set;
+@Slf4j
+@NoArgsConstructor
+public class DefaultExcelListener extends AnalysisEventListener implements ExcelListener{
+ /**
+ * 是否Validator检验,默认为是
+ */
+ private Boolean isValidate = Boolean.TRUE;
+
+
+ /**
+ * excel 表头数据
+ */
+ private Map headMap;
+
+ /**
+ * 导入回执
+ */
+ private ExcelResult excelResult;
+
+
+ public DefaultExcelListener(boolean isValidate) {
+ this.excelResult = new DefaultExcelResult<>();
+ this.isValidate = isValidate;
+ }
+
+
+
+ @Override
+ public void onException(Exception exception, AnalysisContext context) throws Exception {
+ String errMsg = null;
+ if (exception instanceof ExcelDataConvertException) {
+ // 如果是某一个单元格的转换异常 能获取到具体行号
+ ExcelDataConvertException excelDataConvertException = (ExcelDataConvertException) exception;
+ Integer rowIndex = excelDataConvertException.getRowIndex();
+ Integer columnIndex = excelDataConvertException.getColumnIndex();
+ errMsg = StrUtil.format("第{}行-第{}列-表头{}: 解析异常
",
+ rowIndex + 1, columnIndex + 1, headMap.get(columnIndex));
+ if (log.isDebugEnabled()) {
+ log.error(errMsg);
+ }
+ }
+ if (exception instanceof ConstraintViolationException) {
+ ConstraintViolationException constraintViolationException = (ConstraintViolationException) exception;
+ Set> constraintViolations = constraintViolationException.getConstraintViolations();
+
+ }
+ excelResult.getErrorList().add(errMsg);
+ throw new ExcelAnalysisException(errMsg);
+ }
+ @Override
+ public void invokeHeadMap(Map headMap, AnalysisContext context) {
+ this.headMap = headMap;
+ log.debug("解析到一条表头数据: {}", JsonUtils.toJsonString(headMap));
+ }
+ @Override
+ public void invoke(T data, AnalysisContext context) {
+ if (isValidate) {
+ ValidatorUtils.validate(data);
+ }
+ excelResult.getList().add(data);
+ }
+
+
+ @Override
+ public void doAfterAllAnalysed(AnalysisContext analysisContext) {
+ log.debug("所有数据解析完成!");
+ }
+
+ @Override
+ public boolean hasNext(AnalysisContext context) {
+ return super.hasNext(context);
+ }
+
+
+ @Override
+ public ExcelResult getExcelResult() {
+ return excelResult;
+ }
+}
diff --git a/evo/src/main/java/com/ruoyi/common/utils/listener/DefaultExcelResult.java b/evo/src/main/java/com/ruoyi/common/utils/listener/DefaultExcelResult.java
new file mode 100644
index 0000000..b618904
--- /dev/null
+++ b/evo/src/main/java/com/ruoyi/common/utils/listener/DefaultExcelResult.java
@@ -0,0 +1,74 @@
+package com.ruoyi.common.utils.listener;
+
+import cn.hutool.core.util.StrUtil;
+import com.ruoyi.common.utils.listener.ExcelResult;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 默认excel返回对象
+ *
+ * @author Yjoioooo
+ * @author Lion Li
+ */
+public class DefaultExcelResult implements ExcelResult {
+
+ /**
+ * 数据对象list
+ */
+ @Setter
+ private List list;
+
+ /**
+ * 错误信息列表
+ */
+ @Setter
+ private List errorList;
+
+ public DefaultExcelResult() {
+ this.list = new ArrayList<>();
+ this.errorList = new ArrayList<>();
+ }
+
+ public DefaultExcelResult(List list, List errorList) {
+ this.list = list;
+ this.errorList = errorList;
+ }
+
+ public DefaultExcelResult(ExcelResult excelResult) {
+ this.list = excelResult.getList();
+ this.errorList = excelResult.getErrorList();
+ }
+
+ @Override
+ public List getList() {
+ return list;
+ }
+
+ @Override
+ public List getErrorList() {
+ return errorList;
+ }
+
+ /**
+ * 获取导入回执
+ *
+ * @return 导入回执
+ */
+ @Override
+ public String getAnalysis() {
+ int successCount = list.size();
+ int errorCount = errorList.size();
+ if (successCount == 0) {
+ return "读取失败,未解析到数据";
+ } else {
+ if (errorCount == 0) {
+ return StrUtil.format("恭喜您,全部读取成功!共{}条", successCount);
+ } else {
+ return "";
+ }
+ }
+ }
+}
diff --git a/evo/src/main/java/com/ruoyi/common/utils/listener/ExcelListener.java b/evo/src/main/java/com/ruoyi/common/utils/listener/ExcelListener.java
new file mode 100644
index 0000000..a7936a5
--- /dev/null
+++ b/evo/src/main/java/com/ruoyi/common/utils/listener/ExcelListener.java
@@ -0,0 +1,14 @@
+package com.ruoyi.common.utils.listener;
+
+import com.alibaba.excel.read.listener.ReadListener;
+
+/**
+ * Excel 导入监听
+ *
+ * @author tzy
+ */
+public interface ExcelListener extends ReadListener {
+
+ ExcelResult getExcelResult();
+
+}
diff --git a/evo/src/main/java/com/ruoyi/common/utils/listener/ExcelResult.java b/evo/src/main/java/com/ruoyi/common/utils/listener/ExcelResult.java
new file mode 100644
index 0000000..f3e73b1
--- /dev/null
+++ b/evo/src/main/java/com/ruoyi/common/utils/listener/ExcelResult.java
@@ -0,0 +1,26 @@
+package com.ruoyi.common.utils.listener;
+
+import java.util.List;
+
+/**
+ * excel返回对象
+ *
+ * @author Lion Li
+ */
+public interface ExcelResult {
+
+ /**
+ * 对象列表
+ */
+ List getList();
+
+ /**
+ * 错误列表
+ */
+ List getErrorList();
+
+ /**
+ * 导入回执
+ */
+ String getAnalysis();
+}
diff --git a/evo/src/main/java/com/ruoyi/common/utils/sql/JsonUtils.java b/evo/src/main/java/com/ruoyi/common/utils/sql/JsonUtils.java
new file mode 100644
index 0000000..912a390
--- /dev/null
+++ b/evo/src/main/java/com/ruoyi/common/utils/sql/JsonUtils.java
@@ -0,0 +1,113 @@
+package com.ruoyi.common.utils.sql;
+
+import cn.hutool.core.lang.Dict;
+import cn.hutool.core.util.ArrayUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.exc.MismatchedInputException;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * JSON 工具类
+ *
+ * @author 芋道源码
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public class JsonUtils {
+
+ private static final ObjectMapper OBJECT_MAPPER = SpringUtils.getBean(ObjectMapper.class);
+
+ public static ObjectMapper getObjectMapper() {
+ return OBJECT_MAPPER;
+ }
+
+ public static String toJsonString(Object object) {
+ if (ObjectUtil.isNull(object)) {
+ return null;
+ }
+ try {
+ return OBJECT_MAPPER.writeValueAsString(object);
+ } catch (JsonProcessingException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static T parseObject(String text, Class clazz) {
+ if (StringUtils.isEmpty(text)) {
+ return null;
+ }
+ try {
+ return OBJECT_MAPPER.readValue(text, clazz);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static T parseObject(byte[] bytes, Class clazz) {
+ if (ArrayUtil.isEmpty(bytes)) {
+ return null;
+ }
+ try {
+ return OBJECT_MAPPER.readValue(bytes, clazz);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static T parseObject(String text, TypeReference typeReference) {
+ if (StringUtils.isBlank(text)) {
+ return null;
+ }
+ try {
+ return OBJECT_MAPPER.readValue(text, typeReference);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static Dict parseMap(String text) {
+ if (StringUtils.isBlank(text)) {
+ return null;
+ }
+ try {
+ return OBJECT_MAPPER.readValue(text, OBJECT_MAPPER.getTypeFactory().constructType(Dict.class));
+ } catch (MismatchedInputException e) {
+ // 类型不匹配说明不是json
+ return null;
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static List parseArrayMap(String text) {
+ if (StringUtils.isBlank(text)) {
+ return null;
+ }
+ try {
+ return OBJECT_MAPPER.readValue(text, OBJECT_MAPPER.getTypeFactory().constructCollectionType(List.class, Dict.class));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static List parseArray(String text, Class clazz) {
+ if (StringUtils.isEmpty(text)) {
+ return new ArrayList<>();
+ }
+ try {
+ return OBJECT_MAPPER.readValue(text, OBJECT_MAPPER.getTypeFactory().constructCollectionType(List.class, clazz));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+}
diff --git a/evo/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java b/evo/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java
index 23f1884..2d1ac45 100644
--- a/evo/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java
+++ b/evo/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java
@@ -4,6 +4,8 @@ import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -17,42 +19,53 @@ public class BaseEntity implements Serializable
private static final long serialVersionUID = 1L;
/** 搜索值 */
+ @ExcelIgnore
private String searchValue;
/** 创建者 */
+ @ExcelIgnore
private String createBy;
/** 创建时间 */
+ @ExcelIgnore
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 更新者 */
+ @ExcelIgnore
private String updateBy;
/** 更新时间 */
+ @ExcelIgnore
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 备注 */
+ @ExcelIgnore
private String remark;
/** 开始时间 */
@JsonIgnore
+ @ExcelIgnore
private String beginTime;
/** 结束时间 */
@JsonIgnore
+ @ExcelIgnore
private String endTime;
/** 开始时间 */
+ @ExcelIgnore
@JsonIgnore
private String beginTimeTwo;
/** 结束时间 */
+ @ExcelIgnore
@JsonIgnore
private String endTimeTwo;
/** 请求参数 */
+ @ExcelIgnore
private Map params;
public String getSearchValue()
diff --git a/evo/src/main/java/com/ruoyi/project/management/controller/CwAttendanceRecordDetailController.java b/evo/src/main/java/com/ruoyi/project/management/controller/CwAttendanceRecordDetailController.java
index f131e89..3bd1a73 100644
--- a/evo/src/main/java/com/ruoyi/project/management/controller/CwAttendanceRecordDetailController.java
+++ b/evo/src/main/java/com/ruoyi/project/management/controller/CwAttendanceRecordDetailController.java
@@ -177,7 +177,7 @@ public class CwAttendanceRecordDetailController extends BaseController
//判断list中最后一条数据,如果最后一条数据的打卡类型为 上班卡(单班制),上班卡(双班制),上班卡(三班制)和加班卡,则返回 下班卡权限和撤销权限
CwAttendanceRecordDetail attendanceRecordDetail = list.get(list.size()-1);
if(null!=attendanceRecordDetail&&null!=attendanceRecordDetail.getButtonType()&&(attendanceRecordDetail.getButtonType().equals("上班卡(单班制)")||attendanceRecordDetail.getButtonType().equals("上班卡(双班制)")||attendanceRecordDetail.getButtonType().equals("上班卡(三班制)")||attendanceRecordDetail.getButtonType().equals("加班卡"))){
- cardV.setResult(0);
+ cardV.setResult(0);
cardV.setMsg("验证通过");
//下班卡和撤销权限
cardD.setButton("000011000");
diff --git a/evo/src/main/java/com/ruoyi/project/management/controller/PcRigidChainController.java b/evo/src/main/java/com/ruoyi/project/management/controller/PcRigidChainController.java
index 768ace8..7daccac 100644
--- a/evo/src/main/java/com/ruoyi/project/management/controller/PcRigidChainController.java
+++ b/evo/src/main/java/com/ruoyi/project/management/controller/PcRigidChainController.java
@@ -1,15 +1,31 @@
package com.ruoyi.project.management.controller;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
+import java.io.*;
+import java.util.*;
+import java.util.stream.Collectors;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.json.JSONUtil;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.read.builder.ExcelReaderBuilder;
+import com.alibaba.excel.read.metadata.ReadSheet;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.fasterxml.jackson.databind.exc.InvalidFormatException;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.listener.DefaultExcelListener;
+import com.ruoyi.common.utils.sql.JsonUtils;
import com.ruoyi.project.management.domain.*;
+import com.ruoyi.project.management.domain.vo.PcRigidChainVO;
+import com.ruoyi.project.management.mapper.PcRigidChainMapper;
import com.ruoyi.project.management.service.IImMaterialGroupService;
import com.ruoyi.project.management.service.IImMaterialTypeService;
import com.ruoyi.project.management.service.IImMeteringUnitService;
+import org.apache.poi.openxml4j.opc.OPCPackage;
+import org.apache.poi.openxml4j.opc.PackageAccess;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -37,6 +53,8 @@ import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
+import javax.servlet.ReadListener;
+
/**
* 销齿链型号Controller
*
@@ -45,8 +63,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/management/rigidChain")
-public class PcRigidChainController extends BaseController
-{
+public class PcRigidChainController extends BaseController {
@Autowired
private IPcRigidChainService pcRigidChainService;
//用户标识信息
@@ -60,14 +77,15 @@ public class PcRigidChainController extends BaseController
//物料分组
@Autowired
private IImMaterialGroupService imMaterialGroupService;
+ @Autowired
+ private PcRigidChainMapper pcRigidChainMapper;
/**
* 查询销齿链型号列表(报价时查询,型号去重)
*/
// @PreAuthorize("@ss.hasPermi('management:rigidChain:list')")
@GetMapping("/getTypeList")
- public TableDataInfo getTypeList()
- {
+ public TableDataInfo getTypeList() {
List list = pcRigidChainService.selectPcRigidChainByTypeList();
return getDataTable(list);
}
@@ -77,8 +95,7 @@ public class PcRigidChainController extends BaseController
*/
// @PreAuthorize("@ss.hasPermi('management:rigidChain:list')")
@GetMapping("/getJourneyList")
- public TableDataInfo getJourneyList(String type)
- {
+ public TableDataInfo getJourneyList(String type) {
List list = pcRigidChainService.selectPcRigidChainByJourneyList(type);
return getDataTable(list);
}
@@ -88,8 +105,7 @@ public class PcRigidChainController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('management:rigidChain:list')")
@GetMapping("/list")
- public TableDataInfo list(PcRigidChain pcRigidChain)
- {
+ public TableDataInfo list(PcRigidChain pcRigidChain) {
startPage();
List list = pcRigidChainService.selectPcRigidChainList(pcRigidChain);
return getDataTable(list);
@@ -98,23 +114,123 @@ public class PcRigidChainController extends BaseController
/**
* 导出销齿链型号列表
*/
-// @PreAuthorize("@ss.hasPermi('management:rigidChain:export')")
@Log(title = "销齿链型号", businessType = BusinessType.EXPORT)
@GetMapping("/export")
- public AjaxResult export(PcRigidChain pcRigidChain)
- {
+ public AjaxResult export(PcRigidChain pcRigidChain) {
List list = pcRigidChainService.selectPcRigidChainList(pcRigidChain);
- ExcelUtil util = new ExcelUtil(PcRigidChain.class);
+ ExcelUtil util = new ExcelUtil<>(PcRigidChain.class);
return util.exportExcel(list, "rigidChain");
}
+ @PreAuthorize("@ss.hasPermi('management:rigidChain:importVariableData')")
+ @PostMapping("/importVariableData")
+ public AjaxResult importVariableData(@RequestParam("file") MultipartFile file) throws Exception {
+ if (file == null || file.isEmpty()) {
+ return AjaxResult.error("上传文件不能为空");
+ }
+ // 将输入流转为字节数组以便多次读取
+ byte[] fileBytes = file.getBytes();
+ String originalFilename = file.getOriginalFilename();
+ if (originalFilename == null || originalFilename.isEmpty()) {
+ return AjaxResult.error("文件名不能为空");
+ }
+ String type = "";
+
+ if (originalFilename.contains("30D")) {
+ type = "30D";
+ } else if (originalFilename.contains("30S")) {
+ type = "30S";
+ } else if (originalFilename.contains("35E_R")) {
+ type = "35E";
+ } else if (originalFilename.contains("40R")) {
+ type = "40R";
+ } else if (originalFilename.contains("40S")) {
+ type = "40S";
+ } else if (originalFilename.contains("60R")) {
+ type = "60R";
+ } else if (originalFilename.contains("80R")) {
+ type = "80R";
+ } else if (originalFilename.contains("100R")) {
+ type = "100R";
+ } else if (originalFilename.contains("125R")) {
+ type = "125R";
+ }
+
+ //每个产品都会有 左,右,左+右
+ List AxialDirection = Arrays.asList("R", "L", "L+R");
+ ExcelReaderBuilder read = EasyExcel.read(new ByteArrayInputStream(fileBytes));
+ for (ReadSheet readSheet : read.build().excelExecutor().sheetList()) {
+ DefaultExcelListener excelListener = new DefaultExcelListener<>(true);
+ EasyExcel.read(new ByteArrayInputStream(fileBytes), PcRigidChainVO.class, excelListener)
+ .excelType(ExcelTypeEnum.XLS)
+ .sheet(readSheet.getSheetNo())
+ .headRowNumber(4)
+ .doRead();
+
+ List list = excelListener.getExcelResult().getList();
+ List pcRigidChainsToUpdate = new ArrayList<>();
+
+ // 批量查询数据库中的记录
+ List chains = pcRigidChainMapper.selectPcRigidChainByType(type);
+ Map chainMap = chains.stream()
+ .collect(Collectors.toMap(c -> c.getTypeName() + "_" + c.getAxialDirection(), c -> c));
+
+ for (String s : AxialDirection) {
+ for (PcRigidChainVO pcRigidChainVO : list) {
+ Long vOne = pcRigidChainVO.getVOne();
+ String sheetName = readSheet.getSheetName();
+ String box = "";
+ if (sheetName != null && sheetName.contains("单层") ) {
+ box = "S";
+ } else if (sheetName != null && sheetName.contains("双层") ) {
+ box = "D";
+ } else if (sheetName != null && sheetName.contains("三层")) {
+ box = "T";
+ }
+
+ String typeName = type + "/" + s + "-" + vOne + "/" + box;
+
+ logger.debug("此物料的完整图号:=====================>{}", typeName);
+
+ // 从缓存中查找
+ PcRigidChain dbChain = chainMap.get(typeName + "_" + s);
+ if (dbChain != null) {
+ BeanUtil.copyProperties(pcRigidChainVO, dbChain,"id");
+ dbChain.setJourney(vOne);
+ dbChain.setTypeName(typeName);
+ dbChain.setType(type);
+ dbChain.setBox(box);
+ dbChain.setAxialDirection(s);
+ // dbChain.setUpdateBy(SecurityUtils.getUsername());
+ dbChain.setCreateTime(new Date());
+ pcRigidChainsToUpdate.add(dbChain);
+ }
+ }
+ }
+
+ if (!pcRigidChainsToUpdate.isEmpty()) {
+
+ for (PcRigidChain pcRigidChain : pcRigidChainsToUpdate) {
+ int i = pcRigidChainMapper.updatePcRigidChain(pcRigidChain);
+ if (i > 0) {
+ logger.debug("物料:{}更新成功!!", pcRigidChain.getTypeName());
+ } else {
+ logger.debug("物料:{}更新失败!!", pcRigidChain.getTypeName());
+ }
+ }
+ }else {
+ return AjaxResult.error("没有找到要更新的数据");
+ }
+ }
+
+ return AjaxResult.success("导入成功!!");
+ }
/**
* 获取销齿链型号详细信息
*/
// @PreAuthorize("@ss.hasPermi('management:rigidChain:query')")
@GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") Long id)
- {
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(pcRigidChainService.selectPcRigidChainById(id));
}
@@ -124,27 +240,27 @@ public class PcRigidChainController extends BaseController
@PreAuthorize("@ss.hasPermi('management:rigidChain:add')")
@Log(title = "销齿链型号", businessType = BusinessType.INSERT)
@PostMapping
- public AjaxResult add(@RequestBody PcRigidChain pcRigidChain){
- //防止出现null指针异常
- if(null==pcRigidChain){
- return AjaxResult.error(600,"参数不能为空,请传参");
- }
- //型号名称为必填,校验非空
- if(null==pcRigidChain.getTypeName()||"".equals(pcRigidChain.getTypeName())){
- return AjaxResult.error(10,"请输入型号名称");
- }
- //拼接型号全称
+ public AjaxResult add(@RequestBody PcRigidChain pcRigidChain) {
+ //防止出现null指针异常
+ if (null == pcRigidChain) {
+ return AjaxResult.error(600, "参数不能为空,请传参");
+ }
+ //型号名称为必填,校验非空
+ if (null == pcRigidChain.getTypeName() || "".equals(pcRigidChain.getTypeName())) {
+ return AjaxResult.error(10, "请输入型号名称");
+ }
+ //拼接型号全称
// String typeName = pcRigidChain.getType()+"/"+pcRigidChain.getAxialDirection()+"-"+pcRigidChain.getJourney()+"/"+pcRigidChain.getBox();
- //判断型号是否存在
- PcRigidChain rigidChain = pcRigidChainService.selectPcRigidChainByTypeName(pcRigidChain.getTypeName());
- if(null!=rigidChain){
- return AjaxResult.error(11, "型号名称已存在");
- }
- //行程
- pcRigidChain.setJourney(pcRigidChain.getvOne());
- //产品名称
- //pcRigidChain.setProductName("销齿链");
- pcRigidChain.setDelFlag(0L);
+ //判断型号是否存在
+ PcRigidChain rigidChain = pcRigidChainService.selectPcRigidChainByTypeName(pcRigidChain.getTypeName());
+ if (null != rigidChain) {
+ return AjaxResult.error(11, "型号名称已存在");
+ }
+ //行程
+ pcRigidChain.setJourney(pcRigidChain.getvOne());
+ //产品名称
+ //pcRigidChain.setProductName("销齿链");
+ pcRigidChain.setDelFlag(0L);
return toAjax(pcRigidChainService.insertPcRigidChain(pcRigidChain));
}
@@ -154,15 +270,15 @@ public class PcRigidChainController extends BaseController
@PreAuthorize("@ss.hasPermi('management:rigidChain:edit')")
@Log(title = "销齿链型号", businessType = BusinessType.UPDATE)
@PutMapping
- public AjaxResult edit(@RequestBody PcRigidChain pcRigidChain){
- if(null==pcRigidChain.getTypeName()||"".equals(pcRigidChain.getTypeName())){
- return AjaxResult.error(10,"请输入型号名称");
- }
- //判断型号是否存在
- List list = pcRigidChainService.selectPcRigidChainList(pcRigidChain);
- if(list.size()>0){
- return AjaxResult.error(11, "型号名称已存在");
- }
+ public AjaxResult edit(@RequestBody PcRigidChain pcRigidChain) {
+ if (null == pcRigidChain.getTypeName() || "".equals(pcRigidChain.getTypeName())) {
+ return AjaxResult.error(10, "请输入型号名称");
+ }
+ //判断型号是否存在
+ List list = pcRigidChainService.selectPcRigidChainList(pcRigidChain);
+ if (list.size() > 0) {
+ return AjaxResult.error(11, "型号名称已存在");
+ }
return toAjax(pcRigidChainService.updatePcRigidChain(pcRigidChain));
}
@@ -171,9 +287,8 @@ public class PcRigidChainController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('management:rigidChain:remove')")
@Log(title = "销齿链型号", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable Long[] ids)
- {
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(pcRigidChainService.deletePcRigidChainByIds(ids));
}
@@ -184,18 +299,18 @@ public class PcRigidChainController extends BaseController
*/
// @PreAuthorize("@ss.hasPermi('management:rigidChain:list')")
@RequestMapping("/getRigidChain")
- public AjaxResult selectRigidChain(PcRigidChain pcRigidChain){
- if(null==pcRigidChain){
- return AjaxResult.error("参数不能为空,请传参");
- }
- if(null==pcRigidChain.getTypeName()||"".equals(pcRigidChain.getTypeName().trim())){
- return AjaxResult.error("参数不能为空,请传参");
- }
- List list = pcRigidChainService.selectPcRigidChainList(pcRigidChain);
- if(list.size()>0){
- return AjaxResult.error("型号名称已存在");
- }
- return AjaxResult.success();
+ public AjaxResult selectRigidChain(PcRigidChain pcRigidChain) {
+ if (null == pcRigidChain) {
+ return AjaxResult.error("参数不能为空,请传参");
+ }
+ if (null == pcRigidChain.getTypeName() || "".equals(pcRigidChain.getTypeName().trim())) {
+ return AjaxResult.error("参数不能为空,请传参");
+ }
+ List list = pcRigidChainService.selectPcRigidChainList(pcRigidChain);
+ if (list.size() > 0) {
+ return AjaxResult.error("型号名称已存在");
+ }
+ return AjaxResult.success();
}
/**
@@ -204,16 +319,16 @@ public class PcRigidChainController extends BaseController
*/
// @PreAuthorize("@ss.hasPermi('management:rigidChain:list')")
@RequestMapping("/getPcRigidChainByTypeName")
- public AjaxResult getPcRigidChainByTypeName(String typeName){
- //获取当前登录用户信息,查询当前登录用户的vip等级
- LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+ public AjaxResult getPcRigidChainByTypeName(String typeName) {
+ //获取当前登录用户信息,查询当前登录用户的vip等级
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
SysUser user = loginUser.getUser();
//获取用户vip的等级
double vipLevel = user.getVipLevel();
//根据型号全称查询型号信息
PcRigidChain rigidChain = pcRigidChainService.selectPcRigidChainByTypeName(typeName);
- if(null==rigidChain){
- return AjaxResult.error("暂无此型号");
+ if (null == rigidChain) {
+ return AjaxResult.error("暂无此型号");
}
rigidChain.setVipLevel(vipLevel);
return AjaxResult.success(rigidChain);
@@ -224,41 +339,41 @@ public class PcRigidChainController extends BaseController
*/
@RequestMapping("/uploadLableNumber")
@ResponseBody
- public AjaxResult uploadLableNumber(@RequestParam("file") MultipartFile filePath){
- String originalFilename = filePath.getOriginalFilename();
- //校验文件后缀
- String postfix = originalFilename.substring(originalFilename.length()-3);
- String substring = originalFilename.substring(originalFilename.length()-4);
- //判断是否是xlsx文件或xls文件
- if("xls".equals(postfix)||"xlsx".equals(substring)){
- try {
- InputStream is = filePath.getInputStream();
- byte[] bytes = new byte[is.available()];
- is.read(bytes);
- File file = new File("D:/lableExcel/"+originalFilename);
- FileOutputStream fos = new FileOutputStream(file);
- BufferedOutputStream bos = new BufferedOutputStream(fos);
- bos.write(bytes);
- bos.flush();
- is.close();
- fos.close();
- bos.close();
- File files = new File(file.getAbsolutePath());
- ArrayList> result = ExcelU.readExcel(files);
- for (int i = 1; i < result.size(); i++) {
- for (int j = 1; j < result.get(i).size(); j++) {
- PcRigidChain rigidChain = pcRigidChainService.selectPcRigidChainByTypeName("XCL"+result.get(i).get(1).toString());
- if(null!=rigidChain){
- rigidChain.setLableNumber(result.get(i).get(0).toString());
- pcRigidChainService.updatePcRigidChain(rigidChain);
- }
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- return AjaxResult.success("文件上传成功");
- }
- return AjaxResult.error("非excel文件不允许上传");
+ public AjaxResult uploadLableNumber(@RequestParam("file") MultipartFile filePath) {
+ String originalFilename = filePath.getOriginalFilename();
+ //校验文件后缀
+ String postfix = originalFilename.substring(originalFilename.length() - 3);
+ String substring = originalFilename.substring(originalFilename.length() - 4);
+ //判断是否是xlsx文件或xls文件
+ if ("xls".equals(postfix) || "xlsx".equals(substring)) {
+ try {
+ InputStream is = filePath.getInputStream();
+ byte[] bytes = new byte[is.available()];
+ is.read(bytes);
+ File file = new File("D:/lableExcel/" + originalFilename);
+ FileOutputStream fos = new FileOutputStream(file);
+ BufferedOutputStream bos = new BufferedOutputStream(fos);
+ bos.write(bytes);
+ bos.flush();
+ is.close();
+ fos.close();
+ bos.close();
+ File files = new File(file.getAbsolutePath());
+ ArrayList> result = ExcelU.readExcel(files);
+ for (int i = 1; i < result.size(); i++) {
+ for (int j = 1; j < result.get(i).size(); j++) {
+ PcRigidChain rigidChain = pcRigidChainService.selectPcRigidChainByTypeName("XCL" + result.get(i).get(1).toString());
+ if (null != rigidChain) {
+ rigidChain.setLableNumber(result.get(i).get(0).toString());
+ pcRigidChainService.updatePcRigidChain(rigidChain);
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return AjaxResult.success("文件上传成功");
+ }
+ return AjaxResult.error("非excel文件不允许上传");
}
}
diff --git a/evo/src/main/java/com/ruoyi/project/management/controller/PwProductionBillController.java b/evo/src/main/java/com/ruoyi/project/management/controller/PwProductionBillController.java
index a991ae4..9f71402 100644
--- a/evo/src/main/java/com/ruoyi/project/management/controller/PwProductionBillController.java
+++ b/evo/src/main/java/com/ruoyi/project/management/controller/PwProductionBillController.java
@@ -2033,7 +2033,7 @@ public class PwProductionBillController extends BaseController {
}else{
arr += "F:/20"+code.substring(2,4);
}
- arr += "/product/";
+ arr += "/";
//删除目录和文件夹
DeleteFile.deleteDirectory(arr+code+"/zip");
//创建打包的文件夹,如果存在,先删除再创建
diff --git a/evo/src/main/java/com/ruoyi/project/management/domain/PcRigidChain.java b/evo/src/main/java/com/ruoyi/project/management/domain/PcRigidChain.java
index bfca877..8cacc66 100644
--- a/evo/src/main/java/com/ruoyi/project/management/domain/PcRigidChain.java
+++ b/evo/src/main/java/com/ruoyi/project/management/domain/PcRigidChain.java
@@ -38,13 +38,6 @@ public class PcRigidChain extends BaseEntity
@Excel(name = "物料编码")
private String materialCode;
- public String getMaterialCode() {
- return materialCode;
- }
-
- public void setMaterialCode(String materialCode) {
- this.materialCode = materialCode;
- }
/** 轴向 */
@Excel(name = "轴向")
@@ -207,6 +200,7 @@ public class PcRigidChain extends BaseEntity
/** 导向条长度2数量 */
@Excel(name = "导向条长度2数量")
+ //@Excel(name = "导向条2数量")
private Long vThirteen;
/** 导向条长度3 */
@@ -215,6 +209,7 @@ public class PcRigidChain extends BaseEntity
/** 导向条长度3数量 */
@Excel(name = "导向条长度3数量")
+ //@Excel(name = "导向条3数量")
private Long vFifteen;
/** 孔位总长1 */
@@ -370,11 +365,11 @@ public class PcRigidChain extends BaseEntity
private Long vFiftyThree;
/** 重量 */
- // @Excel(name = "重量")
+ @Excel(name = "铝箱1重量")
private Double gOne;
/** 重量 */
- // @Excel(name = "重量")
+ @Excel(name = "铝箱2重量")
private Double gTwo;
/** 重量 */
@@ -386,15 +381,15 @@ public class PcRigidChain extends BaseEntity
private Double gFour;
/** 重量 */
- // @Excel(name = "重量")
+ @Excel(name = "导向条1单重")
private Double gFive;
/** 重量 */
- // @Excel(name = "重量")
+ @Excel(name = "导向条2单重")
private Double gSix;
/** 重量 */
- // @Excel(name = "重量")
+ @Excel(name = "导向条3单重")
private Double gSeven;
/** 重量 */
@@ -453,6 +448,13 @@ public class PcRigidChain extends BaseEntity
private String spline;
private Long number;
+ public String getMaterialCode() {
+ return materialCode;
+ }
+
+ public void setMaterialCode(String materialCode) {
+ this.materialCode = materialCode;
+ }
public void setId(Long id)
{
this.id = id;
diff --git a/evo/src/main/java/com/ruoyi/project/management/domain/vo/PcRigidChainVO.java b/evo/src/main/java/com/ruoyi/project/management/domain/vo/PcRigidChainVO.java
new file mode 100644
index 0000000..ec1edd1
--- /dev/null
+++ b/evo/src/main/java/com/ruoyi/project/management/domain/vo/PcRigidChainVO.java
@@ -0,0 +1,452 @@
+package com.ruoyi.project.management.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 销齿链型号对象 pc_rigid_chain
+ *
+ * @author zhukangchao
+ * @date 2020-10-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class PcRigidChainVO extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ /** 主键 */
+ private Long id;
+
+ /** 类型 */
+ @ExcelProperty("类型")
+ private String type;
+
+ /** 型号全称 */
+ @ExcelProperty("型号")
+ private String typeName;
+
+ /** 产品id */
+ @ExcelProperty("产品id")
+ private Long productId;
+
+ /** 产品名称 */
+ @ExcelProperty("产品名称")
+ private String productName;
+
+ /** 物料编码 */
+ @ExcelProperty("物料编码")
+ private String materialCode;
+
+
+ /** 轴向 */
+ @ExcelProperty("轴向")
+ private String axialDirection;
+
+ /** 箱体 */
+ @ExcelProperty("箱体")
+ private String box;
+
+ /** 行程(mm) */
+ //@ExcelProperty("{V1}")
+ private Long journey;
+
+ /** 标记号 */
+ @ExcelProperty("标记号")
+ private String lableNumber;
+
+ /** L1(mm) */
+ @ExcelProperty("L1")
+ private Long lOne;
+
+ /** L2(mm) */
+ @ExcelProperty("L2")
+ private Long lTwo;
+
+ /** L3(mm) */
+ @ExcelProperty("L3")
+ private Long lThree;
+
+ /** 总重量 */
+ @ExcelProperty("总重量")
+ private Long sumWeight;
+
+ /** 链条自重 */
+ @ExcelProperty("链条自重")
+ private Long chainWeight;
+
+ /** 动载荷(KN) */
+ @ExcelProperty("动载荷")
+ private Long dynamicLoad;
+
+ /** 静载荷(KN) */
+ @ExcelProperty("静载荷")
+ private Long deadLoad;
+
+ /** 每转上升高度(mm) */
+ @ExcelProperty("每转上升高度")
+ private Long riseInHeightPerRevolution;
+
+ /** 速度(mm/s) */
+ @ExcelProperty("速度")
+ private Double speed;
+
+ /** 系统效率(%) */
+ @ExcelProperty("系统效率")
+ private Long efficiency;
+
+ /** 链条节距(mm) */
+ @ExcelProperty("链条节距")
+ private Long chainPitch;
+
+ /** 节圆半径(mm) */
+ @ExcelProperty("节圆半径")
+ private Long pitchRadius;
+
+ /** 最低高度(mm) */
+ @ExcelProperty("最低高度")
+ private Long minimumAltitude;
+
+ /** 一米链条自重(Kg/m) */
+ @ExcelProperty("一米链条自重")
+ private Double singleMeterChainWeight;
+
+ /** 驱动箱重量(Kg) */
+ @ExcelProperty("驱动箱重量")
+ private Long drivingBoxWeight;
+
+ /** 链箱重量(Kg/m) */
+ @ExcelProperty("链箱重量")
+ private Double chainBoxWeight;
+
+ /** 单价 */
+ @ExcelProperty("单价")
+ private Double univalence;
+
+ /** 图片 */
+ @ExcelProperty("图片")
+ private String picture;
+
+ /** 部件id集合 */
+ @ExcelProperty("部件id集合")
+ private String partId;
+
+ /** 备用字段1 */
+ @ExcelProperty("备用字段1")
+ private String sparedOne;
+
+ /** 备用字段2 */
+ @ExcelProperty("备用字段2")
+ private String sparedTwo;
+
+ /** 备用字段3 */
+ @ExcelProperty("备用字段3")
+ private Long sparedThree;
+
+ /** 备用字段4 */
+ @ExcelProperty("备用字段4")
+ private Long sparedFour;
+
+ /** 删除标记(0:未删除,1:已删除) */
+ private Long delFlag;
+
+ /** 行程 */
+ @ExcelProperty("{V1}")
+ private Long vOne;
+
+ /** 设备总长 */
+ @ExcelProperty("{V2}")
+ private Long vTwo;
+
+ /** 地脚位置1 */
+ @ExcelProperty("{V3}")
+ private Long vThree;
+
+ /** 地脚位置2 */
+ @ExcelProperty("{V4}")
+ private Long vFour;
+
+ /** 箱体装配长度 */
+ @ExcelProperty("{V5}")
+ private Long vFive;
+
+ /** 箱体地脚位置1 */
+ @ExcelProperty("{V6}")
+ private Long vSix;
+
+ /** 箱体地脚位置2 */
+ @ExcelProperty("{V7}")
+ private Long vSeven;
+
+ /** 铝箱长度1 */
+ @ExcelProperty("{V8}")
+ private Long vEight;
+
+ /** 铝箱长度2 */
+ @ExcelProperty("{V9}")
+ private Long vNine;
+
+ /** 导向条长度1 */
+ @ExcelProperty("{V10}")
+ private Long vTen;
+
+ /** 导向条长度1数量 */
+ @ExcelProperty("{V11}")
+ private Long vEleven;
+
+ /** 导向条长度2 */
+ @ExcelProperty("{V12}")
+ private Long vTwelve;
+
+ /** 导向条长度2数量 */
+ @ExcelProperty("{V13}")
+ //@Excel(name = "导向条2数量")
+ private Long vThirteen;
+
+ /** 导向条长度3 */
+ @ExcelProperty("{V14}")
+ private Long vFourteen;
+
+ /** 导向条长度3数量 */
+ @ExcelProperty("{V15}")
+ //@Excel(name = "导向条3数量")
+ private Long vFifteen;
+
+ /** 孔位总长1 */
+ @ExcelProperty("{V16}")
+ private Long vSixteen;
+
+ /** 间隔数量1 */
+ @ExcelProperty("{V17}")
+ private Long vSeveteen;
+
+ /** 孔位总长2 */
+ @ExcelProperty("{V18}")
+ private Long vEighteen;
+
+ /** 间隔数量2 */
+ @ExcelProperty("{V19}")
+ private Long vNineteen;
+
+ /** 铆钉数量 */
+ @ExcelProperty("{V20}")
+ private Long vTwenty;
+
+ /** 待定义 */
+ @ExcelProperty("{V21}")
+ private Long vTwentyOne;
+
+ /** 待定义 */
+ @ExcelProperty("{V22}")
+ private Long vTwentyTwo;
+
+ /** 待定义 */
+ @ExcelProperty("{V23}")
+ private Long vTwentyThree;
+
+ /** 待定义 */
+ @ExcelProperty("{V24}")
+ private Long vTwentyFour;
+
+ /** 待定义 */
+ @ExcelProperty("{V25}")
+ private Long vTwentyFive;
+
+ /** 待定义 */
+ @ExcelProperty("{V26}")
+ private Long vTwentySix;
+
+ /** 待定义 */
+ @ExcelProperty("{V27}")
+ private Long vTwentySeven;
+
+ /** 待定义 */
+ @ExcelProperty("{V28}")
+ private Long vTwentyEight;
+
+ /** 待定义 */
+ @ExcelProperty("{V29}")
+ private Long vTwentyNine;
+
+ /** 待定义 */
+ @ExcelProperty("{V30}")
+ private Long vThirty;
+
+ /** 待定义 */
+ @ExcelProperty("{V31}")
+ private Long vThirtyOne;
+
+ /** 待定义 */
+ @ExcelProperty("{V32}")
+ private Long vThirtyTwo;
+
+ /** 待定义 */
+ @ExcelProperty("{V33}")
+ private Long vThirtyThree;
+
+ /** 待定义 */
+ @ExcelProperty("{V34}")
+ private Long vThirtyFour;
+
+ /** 待定义 */
+ @ExcelProperty("{V35}")
+ private Long vThirtyFive;
+
+ /** 待定义 */
+ @ExcelProperty("{V36}")
+ private Long vThirtySix;
+
+ /** 待定义 */
+ @ExcelProperty("{V37}")
+ private Long vThirtySeven;
+
+ /** 待定义 */
+ @ExcelProperty("{V38}")
+ private Long vThirtyEight;
+
+ /** 待定义 */
+ @ExcelProperty("{V39}")
+ private Long vThirtyNine;
+
+ /** 待定义 */
+ @ExcelProperty("{V40}")
+ private Long vForty;
+
+ /** X1 */
+ @ExcelProperty("{V41}")
+ private Long vFortyOne;
+
+ /** X2 */
+ @ExcelProperty("{V42}")
+ private Long vFortyTwo;
+
+ /** X3 */
+ @ExcelProperty("{V43}")
+ private Long vFortyThree;
+
+ /** X4 */
+ @ExcelProperty("{V44}")
+ private Long vFortyFour;
+
+ /** X5 */
+ @ExcelProperty("{V45}")
+ private Long vFortyFive;
+
+ /** X6 */
+ @ExcelProperty("{V46}")
+ private Long vFortySix;
+
+ /** X7 */
+ @ExcelProperty("{V48}")
+ private Long vFortySeven;
+
+ /** X8 */
+ @ExcelProperty("V48")
+ private Long vFortyEight;
+
+ /** X9 */
+ @ExcelProperty("{V49}")
+ private Long vFortyNine;
+
+ /** X10 */
+ @ExcelProperty("{V50}")
+ private Long vFifty;
+
+ /** X11 */
+ @ExcelProperty("{V51}")
+ private Long vFiftyOne;
+
+ /** X12 */
+ @ExcelProperty("{V52}")
+ private Long vFiftyTwo;
+
+ /** X13 */
+ @ExcelProperty("{V53}")
+ private Long vFiftyThree;
+
+ /** 重量 */
+ @ExcelProperty("{G1}")
+ private Double gOne;
+
+ /** 重量 */
+ @ExcelProperty("{G2}")
+ private Double gTwo;
+
+ /** 重量 */
+ @ExcelProperty("{G3}")
+ private Double gThree;
+
+ /** 重量 */
+ @ExcelProperty("{G4}")
+ private Double gFour;
+
+ /** 重量 */
+ @ExcelProperty("{G5}")
+ private Double gFive;
+
+ /** 重量 */
+ @ExcelProperty("{G6}")
+ private Double gSix;
+
+ /** 重量 */
+ @ExcelProperty("{G7}")
+ private Double gSeven;
+
+ /** 重量 */
+ @ExcelProperty("{G8}")
+ private Double gEight;
+
+ /** 重量 */
+ @ExcelProperty("{G9}")
+ private Double gNine;
+
+ /** 重量 */
+ @ExcelProperty("{G10}")
+ private Double gTen;
+
+ /** 重量 */
+ @ExcelProperty("{G11}")
+ private Double gEleven;
+
+ /** 重量 */
+ @ExcelProperty("{G12}")
+ private Double gTwelve;
+
+ /** 重量 */
+ @ExcelProperty("{G13}")
+ private Double gThirteen;
+
+ /** 重量 */
+ @ExcelProperty("{G14}")
+ private Double gFourteen;
+
+ /** 重量 */
+ @ExcelProperty("{G15}")
+ private Double gFifteen;
+
+ /** 重量 */
+ @ExcelProperty("{G16}")
+ private Double gSixteen;
+
+ /** 重量 */
+ @ExcelProperty("{G17}")
+ private Double gSeveteen;
+
+ /** 重量 */
+ @ExcelProperty("{G18}")
+ private Double gEighteen;
+
+ /** 重量 */
+ @ExcelProperty("{G19}")
+ private Double gNineteen;
+
+ /** 重量 */
+ @ExcelProperty("{G20}")
+ private Double gTwenty;
+
+ private Double vipLevel;
+ private String spline;
+ private Long number;
+
+}
diff --git a/evo/src/main/java/com/ruoyi/project/management/mapper/PcRigidChainMapper.java b/evo/src/main/java/com/ruoyi/project/management/mapper/PcRigidChainMapper.java
index 0f8e725..693d110 100644
--- a/evo/src/main/java/com/ruoyi/project/management/mapper/PcRigidChainMapper.java
+++ b/evo/src/main/java/com/ruoyi/project/management/mapper/PcRigidChainMapper.java
@@ -2,6 +2,7 @@ package com.ruoyi.project.management.mapper;
import java.util.List;
import com.ruoyi.project.management.domain.PcRigidChain;
+import com.ruoyi.project.management.domain.vo.PcRigidChainVO;
/**
* 销齿链型号Mapper接口
@@ -42,6 +43,7 @@ public interface PcRigidChainMapper
* @return 结果
*/
public int updatePcRigidChain(PcRigidChain pcRigidChain);
+ public int updatePcRigidChainVO(PcRigidChainVO pcRigidChain);
/**
* 删除销齿链型号
@@ -80,4 +82,6 @@ public interface PcRigidChainMapper
public List selectPcRigidChainByJourneyList(String type);
public List selectPcRigidChainByType(String type);
+
+ int updateBatchById(List pcRigidChainsToUpdate);
}
diff --git a/evo/src/main/java/com/ruoyi/project/management/service/IPcRigidChainService.java b/evo/src/main/java/com/ruoyi/project/management/service/IPcRigidChainService.java
index 3aefbf1..3027eb9 100644
--- a/evo/src/main/java/com/ruoyi/project/management/service/IPcRigidChainService.java
+++ b/evo/src/main/java/com/ruoyi/project/management/service/IPcRigidChainService.java
@@ -78,4 +78,6 @@ public interface IPcRigidChainService
public List selectPcRigidChainByJourneyList(String type);
public List selectPcRigidChainByType(String type);
+
+ int updateBatchById(List pcRigidChainsToUpdate);
}
diff --git a/evo/src/main/java/com/ruoyi/project/management/service/impl/PcRigidChainServiceImpl.java b/evo/src/main/java/com/ruoyi/project/management/service/impl/PcRigidChainServiceImpl.java
index debd364..e1226dd 100644
--- a/evo/src/main/java/com/ruoyi/project/management/service/impl/PcRigidChainServiceImpl.java
+++ b/evo/src/main/java/com/ruoyi/project/management/service/impl/PcRigidChainServiceImpl.java
@@ -15,7 +15,7 @@ import com.ruoyi.project.management.service.IPcRigidChainService;
* @date 2020-06-09
*/
@Service
-public class PcRigidChainServiceImpl implements IPcRigidChainService
+public class PcRigidChainServiceImpl implements IPcRigidChainService
{
@Autowired
private PcRigidChainMapper pcRigidChainMapper;
@@ -128,4 +128,10 @@ public class PcRigidChainServiceImpl implements IPcRigidChainService
return list;
}
+ @Override
+ public int updateBatchById(List pcRigidChainsToUpdate) {
+ //批量更新
+ return pcRigidChainMapper.updateBatchById(pcRigidChainsToUpdate);
+ }
+
}
diff --git a/evo/src/main/resources/mybatis/management/PcRigidChainMapper.xml b/evo/src/main/resources/mybatis/management/PcRigidChainMapper.xml
index 46b97fb..84637c9 100644
--- a/evo/src/main/resources/mybatis/management/PcRigidChainMapper.xml
+++ b/evo/src/main/resources/mybatis/management/PcRigidChainMapper.xml
@@ -652,5 +652,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where type = #{type} and del_flag = 0
-
+
+
+ update pc_rigid_chain
+