Merge remote-tracking branch 'origin/master'
This commit is contained in:
+35
-2
@@ -20,7 +20,9 @@ import com.jero.modules.laws.common.service.ILawsCommonService;
|
|||||||
import com.jero.modules.laws.common.util.ImportUtil;
|
import com.jero.modules.laws.common.util.ImportUtil;
|
||||||
import com.jero.modules.laws.common.vo.ManyStandardSelectionBox;
|
import com.jero.modules.laws.common.vo.ManyStandardSelectionBox;
|
||||||
import com.jero.modules.laws.common.vo.ManyStandardSelectionBoxVO;
|
import com.jero.modules.laws.common.vo.ManyStandardSelectionBoxVO;
|
||||||
|
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardAuthDept;
|
||||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspectContent;
|
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspectContent;
|
||||||
|
import com.jero.modules.laws.enterprise.service.EnterpriseStandardAuthDeptService;
|
||||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardAuthUserService;
|
import com.jero.modules.laws.enterprise.service.EnterpriseStandardAuthUserService;
|
||||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardInspectContentService;
|
import com.jero.modules.laws.enterprise.service.EnterpriseStandardInspectContentService;
|
||||||
import com.jero.modules.laws.enterprise.util.EnterpriseStandardUtil;
|
import com.jero.modules.laws.enterprise.util.EnterpriseStandardUtil;
|
||||||
@@ -133,6 +135,8 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
private ILawsOverseasStandardService lawsOverseasStandardService;
|
private ILawsOverseasStandardService lawsOverseasStandardService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ILawsEnterpriseStandardService lawsEnterpriseStandardService;
|
private ILawsEnterpriseStandardService lawsEnterpriseStandardService;
|
||||||
|
@Resource
|
||||||
|
private EnterpriseStandardAuthDeptService enterpriseAuthDeptService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
@@ -1076,6 +1080,14 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
esIcWrapper.eq(EnterpriseStandardInspectContent::getStandardId, id);
|
esIcWrapper.eq(EnterpriseStandardInspectContent::getStandardId, id);
|
||||||
List<EnterpriseStandardInspectContent> list = esInspectContentService.list(esIcWrapper);
|
List<EnterpriseStandardInspectContent> list = esInspectContentService.list(esIcWrapper);
|
||||||
stringObjectMap.put("checkList", list);
|
stringObjectMap.put("checkList", list);
|
||||||
|
// 企标独有的授权部门
|
||||||
|
LambdaQueryWrapper<EnterpriseStandardAuthDept> authDeptWrapper = new LambdaQueryWrapper<>();
|
||||||
|
authDeptWrapper.eq(EnterpriseStandardAuthDept::getStandardId, id);
|
||||||
|
List<EnterpriseStandardAuthDept> authDeptList = enterpriseAuthDeptService.list(authDeptWrapper);
|
||||||
|
// 将authDeptList的所有auth_dept取出来转换成逗号拼接的字符串
|
||||||
|
String authDept = authDeptList.stream().map(EnterpriseStandardAuthDept::getAuthDept)
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
|
stringObjectMap.put(FieldCommon.AUTH_DEPT, authDept);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 标准拆分标识
|
// 标准拆分标识
|
||||||
@@ -1440,7 +1452,28 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
FileUnZip.deleteDir(saveDirectory);
|
FileUnZip.deleteDir(saveDirectory);
|
||||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||||
}
|
}
|
||||||
|
String excelName = excelfilelist.get(0).getName();
|
||||||
|
if (tableName.equals(TableNameEnum.ENTERPRISE_STANDARDS.getTableName())) {
|
||||||
|
// 检查Excel的文件名
|
||||||
|
if (!excelName.equals("企业标准导入模板.xlsx")) {
|
||||||
|
FileUnZip.deleteDir(saveDirectory);
|
||||||
|
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tableName.equals(TableNameEnum.DOMESTIC_REGULATIONS.getTableName())) {
|
||||||
|
// 检查Excel的文件名
|
||||||
|
if (!excelName.equals("国内标准导入模板.xlsx")) {
|
||||||
|
FileUnZip.deleteDir(saveDirectory);
|
||||||
|
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tableName.equals(TableNameEnum.FOREIGN_REGULATIONS.getTableName())) {
|
||||||
|
// 检查Excel的文件名
|
||||||
|
if (!excelName.equals("海外标准导入模板.xlsx")) {
|
||||||
|
FileUnZip.deleteDir(saveDirectory);
|
||||||
|
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||||
|
}
|
||||||
|
}
|
||||||
// 数据内容格式校验
|
// 数据内容格式校验
|
||||||
Map<String, File> fileMap = new HashMap<>();
|
Map<String, File> fileMap = new HashMap<>();
|
||||||
try (Workbook workbook = new XSSFWorkbook(Files.newInputStream(excelfilelist.get(0).toPath()))) {
|
try (Workbook workbook = new XSSFWorkbook(Files.newInputStream(excelfilelist.get(0).toPath()))) {
|
||||||
@@ -1955,7 +1988,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
ByteArrayOutputStream baosZip = new ByteArrayOutputStream();
|
ByteArrayOutputStream baosZip = new ByteArrayOutputStream();
|
||||||
try (ZipOutputStream zos = new ZipOutputStream(baosZip)) {
|
try (ZipOutputStream zos = new ZipOutputStream(baosZip)) {
|
||||||
// 添加第一个文件到ZIP中
|
// 添加第一个文件到ZIP中
|
||||||
ZipEntry entry1 = new ZipEntry("企标导入模板.xlsx");
|
ZipEntry entry1 = new ZipEntry("企标标准导入模板.xlsx");
|
||||||
zos.putNextEntry(entry1);
|
zos.putNextEntry(entry1);
|
||||||
zos.write(mainWorkbookBytes);
|
zos.write(mainWorkbookBytes);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
|
|||||||
+6
-6
@@ -150,27 +150,27 @@
|
|||||||
AND p.change_status = #{param.changeStatus}
|
AND p.change_status = #{param.changeStatus}
|
||||||
</if>
|
</if>
|
||||||
<!--推进人工号-->
|
<!--推进人工号-->
|
||||||
<if test="param.standardPromoterWorkNo != null and param.standardPromoterWorkNo != null">
|
<if test="param.standardPromoterWorkNo != null and param.standardPromoterWorkNo != ''">
|
||||||
AND u3.username LIKE CONCAT('%',#{param.standardPromoterWorkNo},'%')
|
AND u3.username LIKE CONCAT('%',#{param.standardPromoterWorkNo},'%')
|
||||||
</if>
|
</if>
|
||||||
<!--标准类型-->
|
<!--标准类型-->
|
||||||
<if test="param.standardType != null and param.standardType != null">
|
<if test="param.standardType != null and param.standardType != ''">
|
||||||
AND p.standard_type = #{param.standardType}
|
AND p.standard_type = #{param.standardType}
|
||||||
</if>
|
</if>
|
||||||
<!--制修订类型-->
|
<!--制修订类型-->
|
||||||
<if test="param.applicationCategory != null and param.applicationCategory != null">
|
<if test="param.revisionType != null and param.revisionType != ''">
|
||||||
AND p.application_category = #{param.revisionType}
|
AND p.application_category = #{param.revisionType}
|
||||||
</if>
|
</if>
|
||||||
<!--申请类型-->
|
<!--申请类型-->
|
||||||
<if test="param.applicationCategory != null and param.applicationCategory != null">
|
<if test="param.applicationCategory != null and param.applicationCategory != ''">
|
||||||
AND p.application_category = #{param.applicationCategory}
|
AND p.application_category = #{param.applicationCategory}
|
||||||
</if>
|
</if>
|
||||||
<!--计划报批日期-->
|
<!--计划报批日期-->
|
||||||
<if test="param.planApprovalStartDate != null and param.planApprovalEndDate != null">
|
<if test="param.planApprovalStartDate != null and param.planApprovalEndDate != ''">
|
||||||
AND p.plan_approval_date BETWEEN #{param.planApprovalStartDate} AND #{param.planApprovalEndDate}
|
AND p.plan_approval_date BETWEEN #{param.planApprovalStartDate} AND #{param.planApprovalEndDate}
|
||||||
</if>
|
</if>
|
||||||
<!--创建日期-->
|
<!--创建日期-->
|
||||||
<if test="param.createStartDate != null and param.createEndDate != null">
|
<if test="param.createStartDate != null and param.createEndDate != ''">
|
||||||
AND p.create_time BETWEEN #{param.createStartDate} AND #{param.createEndDate}
|
AND p.create_time BETWEEN #{param.createStartDate} AND #{param.createEndDate}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.idList != null and param.idList.size() > 0">
|
<if test="param.idList != null and param.idList.size() > 0">
|
||||||
|
|||||||
Reference in New Issue
Block a user