style: 老法规数据导入代码整理
This commit is contained in:
+41
-12
@@ -12,6 +12,7 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.aspect.annotation.Translation;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.modules.laws.oldSystem.service.OldSystemDepartRelationService;
|
||||
import com.jero.modules.laws.oldSystem.service.OldSystemService;
|
||||
import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -33,7 +34,10 @@ import java.util.Map;
|
||||
public class OldSystemController {
|
||||
|
||||
@Resource
|
||||
private OldSystemDepartRelationService oldSystemService;
|
||||
private OldSystemService oldSystemService;
|
||||
|
||||
@Resource
|
||||
private OldSystemDepartRelationService oldSystemDeptRelationService;
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
@@ -46,11 +50,9 @@ public class OldSystemController {
|
||||
@AutoLog(value = "老法规系统-老部门现部门关系导入")
|
||||
public void importExcel(@ApiParam(value = "要上传的文件", required = true) @RequestParam("file") MultipartFile file,
|
||||
HttpServletResponse response) {
|
||||
oldSystemService.importData(file, response);
|
||||
oldSystemDeptRelationService.importDepartRelationData(file, response);
|
||||
}
|
||||
|
||||
@Resource
|
||||
private ILawsEnterpriseStandardService enterpriseStandardService;
|
||||
|
||||
@PostMapping("/importOldSystemExcel")
|
||||
@AutoLog(value = "老法规系统-老法规企标国标外标数据导入")
|
||||
@@ -60,7 +62,7 @@ public class OldSystemController {
|
||||
@ApiParam(value = "0不导入 1导入企标 2导入国标 3外标", required = true)
|
||||
@RequestParam("type") String type,
|
||||
HttpServletResponse response) {
|
||||
enterpriseStandardService.importExcelOldSystem(file, type, response);
|
||||
oldSystemService.importExcelOldSystem(file, type, response);
|
||||
}
|
||||
|
||||
@PostMapping("/importOldESAuthAllExcel")
|
||||
@@ -69,7 +71,7 @@ public class OldSystemController {
|
||||
@ApiOperationSupport(order = 3)
|
||||
public void importOldESAuthAllExcel(@RequestParam("file") MultipartFile file,
|
||||
HttpServletResponse response) {
|
||||
enterpriseStandardService.importOldESAuthAllExcel(file, response);
|
||||
oldSystemService.importOldESAuthAllExcel(file, response);
|
||||
}
|
||||
|
||||
@PostMapping("/importOldESAuthUserExcel")
|
||||
@@ -78,7 +80,7 @@ public class OldSystemController {
|
||||
@ApiOperationSupport(order = 4)
|
||||
public void importOldESAuthUserExcel(@RequestParam("file") MultipartFile file,
|
||||
HttpServletResponse response) {
|
||||
enterpriseStandardService.importOldESAuthUserExcel(file, response);
|
||||
oldSystemService.importOldESAuthUserExcel(file, response);
|
||||
}
|
||||
@PostMapping("/importOldESAuthDeptExcel")
|
||||
@AutoLog(value = "老法规系统-老法规企标部门权限数据导入")
|
||||
@@ -86,7 +88,7 @@ public class OldSystemController {
|
||||
@ApiOperationSupport(order = 5)
|
||||
public void importOldESAuthDeptExcel(@RequestParam("file") MultipartFile file,
|
||||
HttpServletResponse response) {
|
||||
enterpriseStandardService.importOldESAuthDeptExcel(file, response);
|
||||
oldSystemService.importOldESAuthDeptExcel(file, response);
|
||||
}
|
||||
|
||||
@PostMapping("/filterChineseStandardNo")
|
||||
@@ -95,7 +97,7 @@ public class OldSystemController {
|
||||
@ApiOperationSupport(order = 6)
|
||||
public void filterChineseStandardNo(@RequestParam("file") MultipartFile file,
|
||||
HttpServletResponse response) throws IOException {
|
||||
enterpriseStandardService.filterChineseStandardNo(file, response);
|
||||
oldSystemService.filterChineseStandardNo(file, response);
|
||||
}
|
||||
|
||||
@PostMapping("/importFileRelationExcel")
|
||||
@@ -104,7 +106,7 @@ public class OldSystemController {
|
||||
@ApiOperationSupport(order = 7)
|
||||
public void importFileRelationExcel(@RequestParam("file") MultipartFile file,
|
||||
HttpServletResponse response) throws IOException {
|
||||
enterpriseStandardService.importFileRelationExcel(file, response);
|
||||
oldSystemService.importFileRelationExcel(file, response);
|
||||
}
|
||||
|
||||
@PostMapping("/findDuplicateStandardNoData")
|
||||
@@ -113,7 +115,34 @@ public class OldSystemController {
|
||||
@ApiOperationSupport(order = 8)
|
||||
public void findDuplicateStandardNoData(@RequestParam("file") MultipartFile file,
|
||||
HttpServletResponse response) throws IOException {
|
||||
enterpriseStandardService.findDuplicateStandardNoData(file, response);
|
||||
oldSystemService.findDuplicateStandardNoData(file, response);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/importEsStandSystem")
|
||||
@AutoLog(value = "老法规系统-导入企标体系")
|
||||
@ApiOperation(value="老法规系统-导入企标体系", notes="老法规系统-导入企标体系", produces = "application/octet-stream")
|
||||
@ApiOperationSupport(order = 9)
|
||||
public void importEsStandSystem(@RequestParam("file") MultipartFile file,
|
||||
HttpServletResponse response) throws IOException {
|
||||
oldSystemService.importEsStandSystem(file, response);
|
||||
}
|
||||
|
||||
@PostMapping("/importGbStandSystem")
|
||||
@AutoLog(value = "老法规系统-导入国标体系")
|
||||
@ApiOperation(value="老法规系统-导入国标体系", notes="老法规系统-导入国标体系", produces = "application/octet-stream")
|
||||
@ApiOperationSupport(order = 10)
|
||||
public void importGbStandSystem(@RequestParam("file") MultipartFile file,
|
||||
HttpServletResponse response) throws IOException {
|
||||
oldSystemService.importGbStandSystem(file, response);
|
||||
}
|
||||
|
||||
@PostMapping("/importFbStandSystem")
|
||||
@AutoLog(value = "老法规系统-导入外标体系")
|
||||
@ApiOperation(value="老法规系统-导入外标体系", notes="老法规系统-导入外标体系", produces = "application/octet-stream")
|
||||
@ApiOperationSupport(order = 11)
|
||||
public void importFbStandSystem(@RequestParam("file") MultipartFile file,
|
||||
HttpServletResponse response) throws IOException {
|
||||
oldSystemService.importFbStandSystem(file, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
package com.jero.modules.laws.oldSystem.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName old_system_problem
|
||||
*/
|
||||
@TableName(value ="old_system_problem")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class OldSystemProblem implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 问题类型(1老法规国标导入 2老法规企标导入)
|
||||
*/
|
||||
@Excel(name = "问题类型", width = 15)
|
||||
@ApiModelProperty(value = "问题类型")
|
||||
private String problemType;
|
||||
|
||||
/**
|
||||
* 问题描述
|
||||
*/
|
||||
@Excel(name = "问题描述", width = 15)
|
||||
@ApiModelProperty(value = "问题描述")
|
||||
private String problemDescription;
|
||||
|
||||
/**
|
||||
* 问题标准号
|
||||
*/
|
||||
@Excel(name = "问题标准号", width = 15)
|
||||
@ApiModelProperty(value = "问题标准号")
|
||||
private String problemStandardNo;
|
||||
|
||||
/**
|
||||
* 最终结果
|
||||
*/
|
||||
@Excel(name = "最终结果", width = 15)
|
||||
@ApiModelProperty(value = "最终结果")
|
||||
private String result;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
package com.jero.modules.laws.oldSystem.mapper;
|
||||
|
||||
import com.jero.modules.laws.oldSystem.entity.OldSystemProblem;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
* @description 针对表【old_system_problem】的数据库操作Mapper
|
||||
* @createDate 2023-11-10 18:18:36
|
||||
* @Entity com.jero.modules.laws.oldSystem.entity.OldSystemProblem
|
||||
*/
|
||||
public interface OldSystemProblemMapper extends BaseMapper<OldSystemProblem> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+8
-1
@@ -14,5 +14,12 @@ import java.util.Map;
|
||||
*/
|
||||
public interface OldSystemDepartRelationService extends IService<OldSystemDepartRelation> {
|
||||
|
||||
void importData(MultipartFile file, HttpServletResponse response);
|
||||
/**
|
||||
* 导入新老部门关系
|
||||
*
|
||||
* @param file
|
||||
* @param response
|
||||
*/
|
||||
void importDepartRelationData(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
}
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
package com.jero.modules.laws.oldSystem.service;
|
||||
|
||||
import com.jero.modules.laws.oldSystem.entity.OldSystemProblem;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
* @description 针对表【old_system_problem】的数据库操作Service
|
||||
* @createDate 2023-11-10 18:18:36
|
||||
*/
|
||||
public interface OldSystemProblemService extends IService<OldSystemProblem> {
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.jero.modules.laws.oldSystem.service;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author: Mzaxd
|
||||
* @Date: 2023/12/5 9:48
|
||||
*/
|
||||
public interface OldSystemService {
|
||||
|
||||
/**
|
||||
* 老法规系统Excel导入
|
||||
*
|
||||
* @param file
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
void importExcelOldSystem(MultipartFile file, String type, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 老法规企标所有人权限数据导入
|
||||
*
|
||||
* @param file
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
void importOldESAuthAllExcel(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 老法规企标个人权限数据导入
|
||||
*
|
||||
* @param file
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
void importOldESAuthUserExcel(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 老法规企标部门权限数据导入
|
||||
*
|
||||
* @param file
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
void importOldESAuthDeptExcel(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 过滤中文标准号
|
||||
* @param file
|
||||
* @param response
|
||||
*/
|
||||
void filterChineseStandardNo(MultipartFile file, HttpServletResponse response) throws IOException;
|
||||
|
||||
/**
|
||||
* 导入文件关系Excel
|
||||
* @param file
|
||||
* @param response
|
||||
*/
|
||||
void importFileRelationExcel(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 找到标准号重复的数据
|
||||
* @param file
|
||||
* @param response
|
||||
*/
|
||||
void findDuplicateStandardNoData(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 导入企标体系
|
||||
* @param file
|
||||
* @param response
|
||||
*/
|
||||
void importEsStandSystem(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 导入国标体系
|
||||
* @param file
|
||||
* @param response
|
||||
*/
|
||||
void importGbStandSystem(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 导入外标体系
|
||||
* @param file
|
||||
* @param response
|
||||
*/
|
||||
void importFbStandSystem(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
}
|
||||
+1
-1
@@ -53,7 +53,7 @@ public class OldSystemDepartRelationServiceImpl extends ServiceImpl<OldSystemDep
|
||||
private ILawsEnterpriseStandardService enterpriseStandardService;
|
||||
|
||||
@Override
|
||||
public void importData(MultipartFile file, HttpServletResponse response) {
|
||||
public void importDepartRelationData(MultipartFile file, HttpServletResponse response) {
|
||||
List<OldSystemDepartRelation> errImportList = new ArrayList<>();
|
||||
|
||||
ImportParams params = new ImportParams();
|
||||
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
package com.jero.modules.laws.oldSystem.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.modules.laws.oldSystem.entity.OldSystemProblem;
|
||||
import com.jero.modules.laws.oldSystem.service.OldSystemProblemService;
|
||||
import com.jero.modules.laws.oldSystem.mapper.OldSystemProblemMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
* @description 针对表【old_system_problem】的数据库操作Service实现
|
||||
* @createDate 2023-11-10 18:18:36
|
||||
*/
|
||||
@Service
|
||||
public class OldSystemProblemServiceImpl extends ServiceImpl<OldSystemProblemMapper, OldSystemProblem>
|
||||
implements OldSystemProblemService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+1370
File diff suppressed because it is too large
Load Diff
-56
@@ -19,60 +19,4 @@ public interface ILawsEnterpriseStandardService extends IService<LawsEnterpriseS
|
||||
*/
|
||||
LawsEnterpriseStandard queryByStandardNumber(String standardNumber);
|
||||
|
||||
/**
|
||||
* 老法规系统Excel导入
|
||||
*
|
||||
* @param file
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
void importExcelOldSystem(MultipartFile file, String type, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 老法规企标所有人权限数据导入
|
||||
*
|
||||
* @param file
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
void importOldESAuthAllExcel(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 老法规企标个人权限数据导入
|
||||
*
|
||||
* @param file
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
void importOldESAuthUserExcel(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 老法规企标部门权限数据导入
|
||||
*
|
||||
* @param file
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
void importOldESAuthDeptExcel(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 过滤中文标准号
|
||||
* @param file
|
||||
* @param response
|
||||
*/
|
||||
void filterChineseStandardNo(MultipartFile file, HttpServletResponse response) throws IOException;
|
||||
|
||||
/**
|
||||
* 导入文件关系Excel
|
||||
* @param file
|
||||
* @param response
|
||||
*/
|
||||
void importFileRelationExcel(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 找到标准号重复的数据
|
||||
* @param file
|
||||
* @param response
|
||||
*/
|
||||
void findDuplicateStandardNoData(MultipartFile file, HttpServletResponse response);
|
||||
}
|
||||
|
||||
+1
-1330
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user