拆分条款修改
This commit is contained in:
+6
-5
@@ -4,6 +4,7 @@ import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
@@ -102,7 +103,7 @@ public class SarFileSplitItemsEOController extends JeroController<SarFileSplitIt
|
||||
}
|
||||
|
||||
}
|
||||
IPage<SarFileSplitItemsEO> pageList = null;
|
||||
IPage<SarFileSplitItemsEO> pageList = new Page<>();
|
||||
pageList.setRecords(rows);
|
||||
pageList.setCurrent(page.getPage());
|
||||
pageList.setSize(page.getPageSize());
|
||||
@@ -423,13 +424,13 @@ public class SarFileSplitItemsEOController extends JeroController<SarFileSplitIt
|
||||
// row1.createCell(4).setCellValue(time);
|
||||
// row1.getCell(4).setCellStyle(cellStyle);
|
||||
// }
|
||||
// row1.createCell(5).setCellValue(exportDto.getSvpps());
|
||||
// row1.createCell(5).setCellValue(exportDto.getFunctionTerritory());
|
||||
// row1.getCell(5).setCellStyle(cellStyle);
|
||||
// row1.createCell(6).setCellValue(exportDto.getApplyArctic());
|
||||
// row1.getCell(6).setCellStyle(cellStyle);
|
||||
// row1.createCell(7).setCellValue(exportDto.getReferenceStand());
|
||||
// row1.getCell(7).setCellStyle(cellStyle);
|
||||
// row1.createCell(8).setCellValue(exportDto.getRemarks());
|
||||
// row1.createCell(8).setCellValue(exportDto.getTechnologyTerritory());
|
||||
// row1.getCell(8).setCellStyle(cellStyle);
|
||||
// if (StringUtils.isNotEmpty(exportDto.getRelevanceFile())) {
|
||||
// List<AttFileEO> fileList = attFileEOService.getMultiFileInfos(exportDto.getRelevanceFile());
|
||||
@@ -489,13 +490,13 @@ public class SarFileSplitItemsEOController extends JeroController<SarFileSplitIt
|
||||
// row1.createCell(4).setCellValue(time);
|
||||
// row1.getCell(4).setCellStyle(cellStyle);
|
||||
// }
|
||||
// row1.createCell(5).setCellValue(exportDto.getSvpps());
|
||||
// row1.createCell(5).setCellValue(exportDto.getFunctionTerritory());
|
||||
// row1.getCell(5).setCellStyle(cellStyle);
|
||||
// row1.createCell(6).setCellValue(exportDto.getApplyArctic());
|
||||
// row1.getCell(6).setCellStyle(cellStyle);
|
||||
// row1.createCell(7).setCellValue(exportDto.getReferenceStand());
|
||||
// row1.getCell(7).setCellStyle(cellStyle);
|
||||
// row1.createCell(8).setCellValue(exportDto.getRemarks());
|
||||
// row1.createCell(8).setCellValue(exportDto.getTechnologyTerritory());
|
||||
// row1.getCell(8).setCellStyle(cellStyle);
|
||||
// if (StringUtils.isNotEmpty(exportDto.getRelevanceFile())) {
|
||||
// List<AttFileEO> fileList = attFileEOService.getMultiFileInfos(exportDto.getRelevanceFile());
|
||||
|
||||
+10
-12
@@ -1,9 +1,7 @@
|
||||
package com.jero.modules.split.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -22,15 +20,15 @@ public class FileSplitItemsExportDto {
|
||||
private String itermsConditions;
|
||||
|
||||
private String type;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date newcarPutTime;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date productPutTime;
|
||||
private String svpps;
|
||||
private String applyArctic;
|
||||
private String referenceStand;
|
||||
private String remarks;
|
||||
private String relevanceFile;
|
||||
|
||||
// @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
// private Date newcarPutTime;
|
||||
// @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
// private Date productPutTime;
|
||||
private String functionTerritory;
|
||||
// private String applyArctic;
|
||||
// private String referenceStand;
|
||||
private String technologyTerritory;
|
||||
// private String relevanceFile;
|
||||
private String informationCategory;
|
||||
private List<FileSplitValExportDto> itemValContent;
|
||||
}
|
||||
|
||||
+20
-19
@@ -3,8 +3,6 @@ package com.jero.modules.split.dto;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: yangxuenan
|
||||
@@ -21,26 +19,29 @@ public class SarFileSplitItemsImportDto {
|
||||
@Excel(name = "条款内容", orderNum = "1")
|
||||
private String itermsConditions;
|
||||
|
||||
@Excel(name = "新车型实施日期", orderNum = "1")
|
||||
private Date newcarPutTime;
|
||||
// @Excel(name = "新车型实施日期", orderNum = "1")
|
||||
// private Date newcarPutTime;
|
||||
//
|
||||
// @Excel(name = "在产车实施日期", orderNum = "1")
|
||||
// private Date productPutTime;
|
||||
|
||||
@Excel(name = "在产车实施日期", orderNum = "1")
|
||||
private Date productPutTime;
|
||||
@Excel(name = "功能领域", orderNum = "1")
|
||||
private String functionTerritory;
|
||||
|
||||
@Excel(name = "关联零部件", orderNum = "1")
|
||||
private String svpps;
|
||||
// @Excel(name = "适用车型", orderNum = "1")
|
||||
// private String applyArctic;
|
||||
//
|
||||
// @Excel(name = "引用标准", orderNum = "1")
|
||||
// private String referenceStand;
|
||||
|
||||
@Excel(name = "适用车型", orderNum = "1")
|
||||
private String applyArctic;
|
||||
@Excel(name = "技术领域", orderNum = "1")
|
||||
private String technologyTerritory;
|
||||
|
||||
@Excel(name = "引用标准", orderNum = "1")
|
||||
private String referenceStand;
|
||||
@Excel(name = "信息类别", orderNum = "1")
|
||||
private String informationCategory;
|
||||
|
||||
@Excel(name = "备注", orderNum = "1")
|
||||
private String remarks;
|
||||
|
||||
@Excel(name = "关联文件", orderNum = "1")
|
||||
private String relevanceFile;
|
||||
|
||||
private String relevanceFileName;
|
||||
// @Excel(name = "关联文件", orderNum = "1")
|
||||
// private String relevanceFile;
|
||||
//
|
||||
// private String relevanceFileName;
|
||||
}
|
||||
|
||||
+12
-12
@@ -22,17 +22,17 @@ public class SarFileSplitItemsEO implements Serializable {
|
||||
private String itemsNum;
|
||||
private String itemsName;
|
||||
private String itermsConditions;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date newcarPutTime;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productPutTime;
|
||||
// @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// private Date newcarPutTime;
|
||||
// @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// private Date productPutTime;
|
||||
private String menuId;
|
||||
private String svpps;
|
||||
private String applyArctic;
|
||||
private String referenceStand;
|
||||
private String specialRequest;
|
||||
private String relevanceFile;
|
||||
private String remarks;
|
||||
private String functionTerritory;
|
||||
// private String applyArctic;
|
||||
// private String referenceStand;
|
||||
private String informationCategory;
|
||||
// private String relevanceFile;
|
||||
private String technologyTerritory;
|
||||
private Integer validFlag;
|
||||
private String creationUser;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@@ -48,8 +48,8 @@ public class SarFileSplitItemsEO implements Serializable {
|
||||
private String sMenuId;
|
||||
//特殊参数要求
|
||||
private List<SarFileSplitItemsParamsEO> paramsList;
|
||||
private String relevanceFileAttid;
|
||||
private String issForce;
|
||||
// private String relevanceFileAttid;
|
||||
// private String issForce;
|
||||
|
||||
List<String> itemsCondi;
|
||||
|
||||
|
||||
+91
-75
@@ -8,40 +8,40 @@
|
||||
<result column="items_num" property="itemsNum" />
|
||||
<result column="items_name" property="itemsName" />
|
||||
<result column="iterms_conditions" property="itermsConditions" />
|
||||
<result column="newcar_put_time" property="newcarPutTime" />
|
||||
<result column="product_put_time" property="productPutTime" />
|
||||
<!-- <result column="newcar_put_time" property="newcarPutTime" />-->
|
||||
<!-- <result column="product_put_time" property="productPutTime" />-->
|
||||
<result column="menu_id" property="menuId" />
|
||||
<result column="svpps" property="svpps" />
|
||||
<result column="apply_arctic" property="applyArctic" />
|
||||
<result column="reference_stand" property="referenceStand" />
|
||||
<result column="special_request" property="specialRequest" />
|
||||
<result column="relevance_file" property="relevanceFile" />
|
||||
<result column="remarks" property="remarks" />
|
||||
<result column="function_territory" property="functionTerritory" />
|
||||
<!-- <result column="apply_arctic" property="applyArctic" />-->
|
||||
<!-- <result column="reference_stand" property="referenceStand" />-->
|
||||
<result column="information_category" property="informationCategory" />
|
||||
<!-- <result column="relevance_file" property="relevanceFile" />-->
|
||||
<result column="technology_territory" property="technologyTerritory" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="creation_user" property="creationUser" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="modify_user" property="modifyUser" />
|
||||
<result column="iss_force" property="issForce" />
|
||||
<!-- <result column="iss_force" property="issForce" />-->
|
||||
</resultMap>
|
||||
<resultMap id="BaseResultMapExport" type="com.jero.modules.split.dto.FileSplitItemsExportDto" >
|
||||
<result column="id" property="id" />
|
||||
<result column="items_num" property="itemsNum" />
|
||||
<result column="items_name" property="itemsName" />
|
||||
<result column="iterms_conditions" property="itermsConditions" />
|
||||
<result column="newcar_put_time" property="newcarPutTime" />
|
||||
<result column="product_put_time" property="productPutTime" />
|
||||
<result column="svpps" property="svpps" />
|
||||
<result column="apply_arctic" property="applyArctic" />
|
||||
<result column="reference_stand" property="referenceStand" />
|
||||
<result column="remarks" property="remarks" />
|
||||
<result column="relevance_file" property="relevanceFile" />
|
||||
<!-- <result column="newcar_put_time" property="newcarPutTime" />-->
|
||||
<!-- <result column="product_put_time" property="productPutTime" />-->
|
||||
<result column="function_territory" property="functionTerritory" />
|
||||
<!-- <result column="apply_arctic" property="applyArctic" />-->
|
||||
<!-- <result column="reference_stand" property="referenceStand" />-->
|
||||
<result column="technology_territory" property="technologyTerritory" />
|
||||
<!-- <result column="relevance_file" property="relevanceFile" />-->
|
||||
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_FILE_SPLIT_ITEMS table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
SAR_FILE_SPLIT_ITEMS.id, SAR_FILE_SPLIT_ITEMS.info_id, SAR_FILE_SPLIT_ITEMS.items_num, items_name, iterms_conditions, newcar_put_time, product_put_time, menu_id, svpps, apply_arctic, reference_stand, special_request, relevance_file, SAR_FILE_SPLIT_ITEMS.remarks, SAR_FILE_SPLIT_ITEMS.valid_flag, SAR_FILE_SPLIT_ITEMS.creation_user, SAR_FILE_SPLIT_ITEMS.creation_time, SAR_FILE_SPLIT_ITEMS.modify_time, SAR_FILE_SPLIT_ITEMS.modify_user,SAR_FILE_SPLIT_ITEMS.iss_force
|
||||
SAR_FILE_SPLIT_ITEMS.id, SAR_FILE_SPLIT_ITEMS.info_id, SAR_FILE_SPLIT_ITEMS.items_num, items_name, iterms_conditions, newcar_put_time, product_put_time, menu_id, function_territory, apply_arctic, reference_stand, information_category, relevance_file, SAR_FILE_SPLIT_ITEMS.technology_territory, SAR_FILE_SPLIT_ITEMS.valid_flag, SAR_FILE_SPLIT_ITEMS.creation_user, SAR_FILE_SPLIT_ITEMS.creation_time, SAR_FILE_SPLIT_ITEMS.modify_time, SAR_FILE_SPLIT_ITEMS.modify_user,SAR_FILE_SPLIT_ITEMS.iss_force
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
@@ -84,8 +84,8 @@
|
||||
<if test="sMenuId != null" >
|
||||
and menu_id = #{sMenuId}
|
||||
</if>
|
||||
<if test="svpps != null" >
|
||||
and svpps ${svppsOperator} #{svpps}
|
||||
<if test="functionTerritory != null" >
|
||||
and function_territory ${functionTerritoryOperator} #{functionTerritory}
|
||||
</if>
|
||||
<if test="applyArctic != null" >
|
||||
and apply_arctic ${applyArcticOperator} #{applyArctic}
|
||||
@@ -93,14 +93,14 @@
|
||||
<if test="referenceStand != null" >
|
||||
and reference_stand ${referenceStandOperator} #{referenceStand}
|
||||
</if>
|
||||
<if test="specialRequest != null" >
|
||||
and special_request ${specialRequestOperator} #{specialRequest}
|
||||
<if test="informationCategory != null" >
|
||||
and information_category ${informationCategoryOperator} #{informationCategory}
|
||||
</if>
|
||||
<if test="relevanceFile != null" >
|
||||
and relevance_file ${relevanceFileOperator} #{relevanceFile}
|
||||
</if>
|
||||
<if test="remarks != null" >
|
||||
and SAR_FILE_SPLIT_ITEMS.remarks ${remarksOperator} #{remarks}
|
||||
<if test="technologyTerritory != null" >
|
||||
and SAR_FILE_SPLIT_ITEMS.technology_territory ${technologyTerritoryOperator} #{technologyTerritory}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and SAR_FILE_SPLIT_ITEMS.valid_flag ${validFlagOperator} #{validFlag}
|
||||
@@ -138,7 +138,7 @@
|
||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_FILE_SPLIT_ITEMS(<include refid="Base_Column_List" />)
|
||||
values (#{id, jdbcType=VARCHAR}, #{infoId, jdbcType=VARCHAR}, #{itemsNum, jdbcType=VARCHAR}, #{itemsName, jdbcType=VARCHAR}, #{itermsConditions, jdbcType=CLOB}, #{newcarPutTime, jdbcType=TIMESTAMP}, #{productPutTime, jdbcType=TIMESTAMP}, #{menuId, jdbcType=VARCHAR}, #{svpps, jdbcType=VARCHAR}, #{applyArctic, jdbcType=VARCHAR}, #{referenceStand, jdbcType=VARCHAR}, #{specialRequest, jdbcType=VARCHAR}, #{relevanceFile, jdbcType=VARCHAR}, #{remarks, jdbcType=VARCHAR}, #{validFlag, jdbcType=INTEGER}, #{creationUser, jdbcType=VARCHAR}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP}, #{modifyUser, jdbcType=VARCHAR})
|
||||
values (#{id, jdbcType=VARCHAR}, #{infoId, jdbcType=VARCHAR}, #{itemsNum, jdbcType=VARCHAR}, #{itemsName, jdbcType=VARCHAR}, #{itermsConditions, jdbcType=CLOB}, #{newcarPutTime, jdbcType=TIMESTAMP}, #{productPutTime, jdbcType=TIMESTAMP}, #{menuId, jdbcType=VARCHAR}, #{functionTerritory, jdbcType=VARCHAR}, #{applyArctic, jdbcType=VARCHAR}, #{referenceStand, jdbcType=VARCHAR}, #{informationCategory, jdbcType=VARCHAR}, #{relevanceFile, jdbcType=VARCHAR}, #{technologyTerritory, jdbcType=VARCHAR}, #{validFlag, jdbcType=INTEGER}, #{creationUser, jdbcType=VARCHAR}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP}, #{modifyUser, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
@@ -156,12 +156,12 @@
|
||||
<if test="newcarPutTime != null" >newcar_put_time,</if>
|
||||
<if test="productPutTime != null" >product_put_time,</if>
|
||||
<if test="menuId != null" >menu_id,</if>
|
||||
<if test="svpps != null" >svpps,</if>
|
||||
<if test="functionTerritory != null" >function_territory,</if>
|
||||
<if test="applyArctic != null" >apply_arctic,</if>
|
||||
<if test="referenceStand != null" >reference_stand,</if>
|
||||
<if test="specialRequest != null" >special_request,</if>
|
||||
<if test="informationCategory != null" >information_category,</if>
|
||||
<if test="relevanceFile != null" >relevance_file,</if>
|
||||
<if test="remarks != null" >remarks,</if>
|
||||
<if test="technologyTerritory != null" >technology_territory,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="creationUser != null" >creation_user,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
@@ -178,12 +178,12 @@
|
||||
<if test="newcarPutTime != null" >#{newcarPutTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="productPutTime != null" >#{productPutTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="menuId != null" >#{menuId, jdbcType=VARCHAR},</if>
|
||||
<if test="svpps != null" >#{svpps, jdbcType=VARCHAR},</if>
|
||||
<if test="functionTerritory != null" >#{functionTerritory, jdbcType=VARCHAR},</if>
|
||||
<if test="applyArctic != null" >#{applyArctic, jdbcType=VARCHAR},</if>
|
||||
<if test="referenceStand != null" >#{referenceStand, jdbcType=VARCHAR},</if>
|
||||
<if test="specialRequest != null" >#{specialRequest, jdbcType=VARCHAR},</if>
|
||||
<if test="informationCategory != null" >#{informationCategory, jdbcType=VARCHAR},</if>
|
||||
<if test="relevanceFile != null" >#{relevanceFile, jdbcType=VARCHAR},</if>
|
||||
<if test="remarks != null" >#{remarks, jdbcType=VARCHAR},</if>
|
||||
<if test="technologyTerritory != null" >#{technologyTerritory, jdbcType=VARCHAR},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
||||
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
@@ -203,12 +203,12 @@
|
||||
newcar_put_time = #{newcarPutTime},
|
||||
product_put_time = #{productPutTime},
|
||||
menu_id = #{menuId},
|
||||
svpps = #{svpps},
|
||||
function_territory = #{functionTerritory},
|
||||
apply_arctic = #{applyArctic},
|
||||
reference_stand = #{referenceStand},
|
||||
special_request = #{specialRequest},
|
||||
information_category = #{informationCategory},
|
||||
relevance_file = #{relevanceFile},
|
||||
remarks = #{remarks},
|
||||
technology_territory = #{technologyTerritory},
|
||||
valid_flag = #{validFlag},
|
||||
creation_user = #{creationUser},
|
||||
creation_time = #{creationTime},
|
||||
@@ -248,8 +248,8 @@
|
||||
<if test="menuId != null" >
|
||||
menu_id = #{menuId},
|
||||
</if>
|
||||
<if test="svpps != null" >
|
||||
svpps = #{svpps},
|
||||
<if test="functionTerritory != null" >
|
||||
function_territory = #{functionTerritory},
|
||||
</if>
|
||||
<if test="applyArctic != null" >
|
||||
apply_arctic = #{applyArctic},
|
||||
@@ -257,14 +257,14 @@
|
||||
<if test="referenceStand != null" >
|
||||
reference_stand = #{referenceStand},
|
||||
</if>
|
||||
<if test="specialRequest != null" >
|
||||
special_request = #{specialRequest},
|
||||
<if test="informationCategory != null" >
|
||||
information_category = #{informationCategory},
|
||||
</if>
|
||||
<if test="relevanceFile != null" >
|
||||
relevance_file = #{relevanceFile},
|
||||
</if>
|
||||
<if test="remarks != null" >
|
||||
remarks = #{remarks},
|
||||
<if test="technologyTerritory != null" >
|
||||
technology_territory = #{technologyTerritory},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
@@ -309,41 +309,51 @@
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="menuId != null">
|
||||
and SAR_FILE_SPLIT_ITEMS.MENU_ID in (
|
||||
select SAR_FILE_SPLIT_MENU.id from SAR_FILE_SPLIT_MENU start with id=#{menuId} connect by prior id= p_id
|
||||
SELECT m.id
|
||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querysSplitMenuChildren (#{menuId})) AS pids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( m.id, t.pids )
|
||||
AND valid_flag = '0'
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_FILE_SPLIT_ITEMS列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.jero.modules.split.page.SarFileSplitItemsEOPage">
|
||||
select * from
|
||||
(select tmp_tb.* , rownum rn from
|
||||
(select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_ITEMS left join SAR_FILE_SPLIT_MENU on SAR_FILE_SPLIT_ITEMS.MENU_ID = SAR_FILE_SPLIT_MENU.id
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="menuId != null">
|
||||
and SAR_FILE_SPLIT_ITEMS.MENU_ID in (
|
||||
select SAR_FILE_SPLIT_MENU.id from SAR_FILE_SPLIT_MENU start with id=#{menuId} connect by prior id= p_id
|
||||
)
|
||||
</if>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb where rownum <= ${pager.endIndex})
|
||||
where rn >= ${pager.startIndex}
|
||||
select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_ITEMS left join SAR_FILE_SPLIT_MENU on SAR_FILE_SPLIT_ITEMS.MENU_ID = SAR_FILE_SPLIT_MENU.id
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="menuId != null">
|
||||
and SAR_FILE_SPLIT_ITEMS.MENU_ID in (
|
||||
SELECT m.id
|
||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querysSplitMenuChildren (#{menuId})) AS pids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( m.id, t.pids )
|
||||
AND valid_flag = '0'
|
||||
)
|
||||
</if>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1}, ${pager.endIndex}
|
||||
</select>
|
||||
|
||||
<select id="queryByList2" resultMap="BaseResultMap" parameterType="com.jero.modules.split.page.SarFileSplitItemsEOPage">
|
||||
select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_ITEMS left join SAR_FILE_SPLIT_MENU on SAR_FILE_SPLIT_ITEMS.MENU_ID = SAR_FILE_SPLIT_MENU.id
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="menuId != null">
|
||||
and SAR_FILE_SPLIT_ITEMS.MENU_ID in (
|
||||
select SAR_FILE_SPLIT_MENU.id from SAR_FILE_SPLIT_MENU start with id=#{menuId} connect by prior id= p_id
|
||||
)
|
||||
</if>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
<select id="queryByList2" resultMap="BaseResultMap" parameterType="com.jero.modules.split.page.SarFileSplitItemsEOPage">
|
||||
select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_ITEMS left join SAR_FILE_SPLIT_MENU on SAR_FILE_SPLIT_ITEMS.MENU_ID = SAR_FILE_SPLIT_MENU.id
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="menuId != null">
|
||||
and SAR_FILE_SPLIT_ITEMS.MENU_ID in (
|
||||
SELECT m.id
|
||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querysSplitMenuChildren (#{menuId})) AS pids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( m.id, t.pids )
|
||||
AND valid_flag = '0'
|
||||
)
|
||||
</if>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.jero.modules.split.common.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS
|
||||
@@ -359,15 +369,15 @@
|
||||
begin
|
||||
<foreach collection="list" item="item" index="index" separator=";">
|
||||
insert into SAR_FILE_SPLIT_ITEMS
|
||||
(id, info_id, items_num, items_name, newcar_put_time, product_put_time, menu_id, svpps, apply_arctic, reference_stand, special_request, relevance_file, remarks, valid_flag, creation_user, creation_time, modify_time,
|
||||
(id, info_id, items_num, items_name, newcar_put_time, product_put_time, menu_id, function_territory, apply_arctic, reference_stand, information_category, relevance_file, technology_territory, valid_flag, creation_user, creation_time, modify_time,
|
||||
modify_user, iterms_conditions)
|
||||
values (
|
||||
#{item.id, jdbcType=VARCHAR}, #{item.infoId, jdbcType=VARCHAR}, #{item.itemsNum, jdbcType=VARCHAR},
|
||||
#{item.itemsName, jdbcType=VARCHAR},
|
||||
#{item.newcarPutTime, jdbcType=TIMESTAMP}, #{item.productPutTime, jdbcType=TIMESTAMP},
|
||||
#{item.menuId, jdbcType=VARCHAR}, #{item.svpps, jdbcType=VARCHAR}, #{item.applyArctic, jdbcType=VARCHAR},
|
||||
#{item.referenceStand, jdbcType=VARCHAR}, #{item.specialRequest, jdbcType=VARCHAR},
|
||||
#{item.relevanceFile, jdbcType=VARCHAR}, #{item.remarks, jdbcType=VARCHAR},
|
||||
#{item.menuId, jdbcType=VARCHAR}, #{item.functionTerritory, jdbcType=VARCHAR}, #{item.applyArctic, jdbcType=VARCHAR},
|
||||
#{item.referenceStand, jdbcType=VARCHAR}, #{item.informationCategory, jdbcType=VARCHAR},
|
||||
#{item.relevanceFile, jdbcType=VARCHAR}, #{item.technologyTerritory, jdbcType=VARCHAR},
|
||||
#{item.validFlag, jdbcType=INTEGER}, #{item.creationUser, jdbcType=VARCHAR},
|
||||
#{item.creationTime, jdbcType=TIMESTAMP}, #{item.modifyTime, jdbcType=TIMESTAMP},
|
||||
#{item.modifyUser, jdbcType=VARCHAR}, #{item.itermsConditions, jdbcType=CLOB}
|
||||
@@ -405,9 +415,11 @@
|
||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS
|
||||
left join SAR_FILE_SPLIT_MENU on SAR_FILE_SPLIT_ITEMS.MENU_ID = SAR_FILE_SPLIT_MENU.id
|
||||
where SAR_FILE_SPLIT_ITEMS.valid_flag = '0' and menu_id in (
|
||||
select SAR_FILE_SPLIT_MENU.id from SAR_FILE_SPLIT_MENU
|
||||
where valid_flag=0
|
||||
start with id=#{menuId} connect by prior id= p_id
|
||||
SELECT m.id
|
||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querysSplitMenuChildren (#{menuId})) AS pids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( m.id, t.pids )
|
||||
AND valid_flag = '0'
|
||||
)
|
||||
order by SAR_FILE_SPLIT_MENU.display_seq asc
|
||||
</select>
|
||||
@@ -431,14 +443,18 @@
|
||||
|
||||
<select id="queryByOrdersForExport" resultMap="BaseResultMapExport" parameterType="com.jero.modules.split.page.SarFileSplitItemsEOPage">
|
||||
select SAR_FILE_SPLIT_ITEMS.id,SAR_FILE_SPLIT_ITEMS.items_num,SAR_FILE_SPLIT_ITEMS.items_name,
|
||||
newcar_put_time,product_put_time,svpps,apply_arctic,reference_stand,SAR_FILE_SPLIT_ITEMS.remarks,
|
||||
newcar_put_time,product_put_time,function_territory,apply_arctic,reference_stand,SAR_FILE_SPLIT_ITEMS.technology_territory,
|
||||
relevance_file
|
||||
from SAR_FILE_SPLIT_ITEMS
|
||||
left join SAR_FILE_SPLIT_MENU on SAR_FILE_SPLIT_ITEMS.MENU_ID = SAR_FILE_SPLIT_MENU.id
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="menuId != null">
|
||||
and SAR_FILE_SPLIT_ITEMS.MENU_ID in (
|
||||
select SAR_FILE_SPLIT_MENU.id from SAR_FILE_SPLIT_MENU start with id=#{menuId} connect by prior id= p_id
|
||||
SELECT m.id
|
||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querysSplitMenuChildren (#{menuId})) AS pids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( m.id, t.pids )
|
||||
AND valid_flag = '0'
|
||||
)
|
||||
</if>
|
||||
<if test="idList != null">
|
||||
|
||||
+47
-24
@@ -199,15 +199,13 @@
|
||||
|
||||
<!-- 查询SAR_FILE_SPLIT_MENU列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.jero.modules.split.common.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* , rownum rn from
|
||||
(select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_MENU
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb where rownum <= ${pager.endIndex})
|
||||
where rn >= ${pager.startIndex}
|
||||
select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_MENU
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1}, ${pager.endIndex}
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.jero.modules.split.common.BasePage">
|
||||
@@ -263,21 +261,31 @@
|
||||
</update>
|
||||
|
||||
<select id="queryByPidExcpetSelf" resultMap="BaseResultMap" parameterType="com.jero.modules.split.entity.SarFileSplitMenuEO">
|
||||
select SAR_FILE_SPLIT_MENU.* from SAR_FILE_SPLIT_MENU
|
||||
where valid_flag=0 and id != #{id}
|
||||
start with id=#{id} connect by prior id= parent_id
|
||||
select m.*
|
||||
from SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querysSplitMenuChildren (#{id})) AS pids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( m.id, t.pids )
|
||||
AND valid_flag = '0'
|
||||
AND id != #{id}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPId" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_MENU where id in (
|
||||
select id from SAR_FILE_SPLIT_MENU start with id=#{id} connect by prior id= parent_id
|
||||
SELECT m.id
|
||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querysSplitMenuChildren (#{id})) AS pids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( m.id, t.pids )
|
||||
AND valid_flag = '0'
|
||||
)
|
||||
|
||||
</delete>
|
||||
|
||||
<select id="getMaxDisplayByid" resultType="java.lang.Integer" parameterType="com.jero.modules.split.common.BasePage">
|
||||
SELECT max(SAR_FILE_SPLIT_MENU.DISPLAY_SEQ) FROM
|
||||
SAR_FILE_SPLIT_MENU START WITH id = #{id} CONNECT BY PRIOR id = parent_id
|
||||
SELECT max(m.DISPLAY_SEQ)
|
||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querysSplitMenuChildren (#{id})) AS pids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( m.id, t.pids )
|
||||
AND valid_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="getMaxDisplayByidNextLevel" resultType="java.lang.Integer" parameterType="java.lang.String">
|
||||
@@ -286,8 +294,11 @@
|
||||
</select>
|
||||
|
||||
<select id="getChildrenCountByParentId" resultType="java.lang.Integer" parameterType="com.jero.modules.split.common.BasePage">
|
||||
SELECT count(*) FROM
|
||||
SAR_FILE_SPLIT_MENU START WITH id = #{id} CONNECT BY PRIOR id = parent_id
|
||||
SELECT count(*)
|
||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querysSplitMenuChildren (#{id})) AS pids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( m.id, t.pids )
|
||||
AND valid_flag = '0'
|
||||
</select>
|
||||
|
||||
<update id="updateChildrenDisplaySeqByIDAdd" parameterType="com.jero.modules.split.entity.SarFileSplitMenuEO" >
|
||||
@@ -295,8 +306,13 @@
|
||||
set display_seq = display_seq + #{childrenCount},
|
||||
modify_time = #{modifyTime},
|
||||
modify_user = #{modifyUser}
|
||||
where id in ( SELECT id FROM
|
||||
SAR_FILE_SPLIT_MENU START WITH id = #{id} CONNECT BY PRIOR id = parent_id)
|
||||
where id in (
|
||||
SELECT m.id
|
||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querysSplitMenuChildren (#{id})) AS pids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( m.id, t.pids )
|
||||
AND valid_flag = '0'
|
||||
)
|
||||
</update>
|
||||
|
||||
<update id="updateChildrenDisplaySeqByIDCut" parameterType="com.jero.modules.split.entity.SarFileSplitMenuEO" >
|
||||
@@ -304,14 +320,21 @@
|
||||
set display_seq = display_seq - #{childrenCount},
|
||||
modify_time = #{modifyTime},
|
||||
modify_user = #{modifyUser}
|
||||
where id in ( SELECT id FROM
|
||||
SAR_FILE_SPLIT_MENU START WITH id = #{id} CONNECT BY PRIOR id = parent_id)
|
||||
where id in (
|
||||
SELECT m.id
|
||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querysSplitMenuChildren (#{id})) AS pids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( m.id, t.pids )
|
||||
AND valid_flag = '0'
|
||||
)
|
||||
</update>
|
||||
|
||||
<select id="queryAllChildrenByid" resultMap="BaseResultMap" parameterType="com.jero.modules.split.entity.SarFileSplitMenuEO">
|
||||
select SAR_FILE_SPLIT_MENU.* from SAR_FILE_SPLIT_MENU
|
||||
where valid_flag=0
|
||||
start with id=#{id} connect by prior id= parent_id
|
||||
select m.*
|
||||
from SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querysSplitMenuChildren (#{id})) AS pids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( m.id, t.pids )
|
||||
AND valid_flag = '0'
|
||||
</select>
|
||||
|
||||
<delete id="deleteByIdList" parameterType="java.util.List">
|
||||
|
||||
+6
-6
@@ -35,18 +35,18 @@ public class SarFileSplitItemsEOPage extends BasePage {
|
||||
private String productPutTimeOperator = "=";
|
||||
private String menuId;
|
||||
private String menuIdOperator = "=";
|
||||
private String svpps;
|
||||
private String svppsOperator = "=";
|
||||
private String functionTerritory;
|
||||
private String functionTerritoryOperator = "=";
|
||||
private String applyArctic;
|
||||
private String applyArcticOperator = "=";
|
||||
private String referenceStand;
|
||||
private String referenceStandOperator = "=";
|
||||
private String specialRequest;
|
||||
private String specialRequestOperator = "=";
|
||||
private String informationCategory;
|
||||
private String informationCategoryOperator = "=";
|
||||
private String relevanceFile;
|
||||
private String relevanceFileOperator = "=";
|
||||
private String remarks;
|
||||
private String remarksOperator = "=";
|
||||
private String technologyTerritory;
|
||||
private String technologyTerritoryOperator = "=";
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "=";
|
||||
private String creationUser;
|
||||
|
||||
+4
-4
@@ -36,7 +36,7 @@ public interface ISarFileSplitItemsEOService extends IService<SarFileSplitItemsE
|
||||
|
||||
Map<String,String> moveSplitItemsVal(SarFileSplitItemsEOPage page) throws Exception ;
|
||||
|
||||
void saveFileInfo (SarFileSplitItemsEO sarFileSplitItemsEO) throws Exception;
|
||||
// void saveFileInfo (SarFileSplitItemsEO sarFileSplitItemsEO) throws Exception;
|
||||
|
||||
|
||||
int insert(SarFileSplitItemsEO SarFileSplitItemsEO);
|
||||
@@ -57,11 +57,11 @@ public interface ISarFileSplitItemsEOService extends IService<SarFileSplitItemsE
|
||||
|
||||
List<SarFileSplitItemsEO> queryByPage(SarFileSplitItemsEOPage page);
|
||||
|
||||
public String insertSarStandFile(String standId, List<OSSFile> list, String standFileClassify,String newFiles) throws Exception ;
|
||||
// public String insertSarStandFile(String standId, List<OSSFile> list, String standFileClassify,String newFiles) throws Exception ;
|
||||
|
||||
public Map<String,List<String>> getNotDeleteMsgFile(SarFileSplitItemsEO sarFileSplitItemsEO);
|
||||
// public Map<String,List<String>> getNotDeleteMsgFile(SarFileSplitItemsEO sarFileSplitItemsEO);
|
||||
|
||||
public String getNotDelFile(String fileAttIds,List<String> getNotDeleteResId,List<String> getNotDeleteFileId);
|
||||
// public String getNotDelFile(String fileAttIds,List<String> getNotDeleteResId,List<String> getNotDeleteFileId);
|
||||
|
||||
public String insertItemTable(List<SarFileSplitItemsValEO> getValList,String itemId);
|
||||
|
||||
|
||||
+222
-226
@@ -8,9 +8,6 @@ import com.jero.modules.split.common.FileUnZip;
|
||||
import com.jero.modules.split.common.SplitTableInfo;
|
||||
import com.jero.modules.split.dto.*;
|
||||
import com.jero.modules.split.entity.*;
|
||||
import com.jero.modules.split.enums.StandFileClassifyEnum;
|
||||
import com.jero.modules.split.enums.UseModuleEnum;
|
||||
import com.jero.modules.split.enums.ValueStateEnum;
|
||||
import com.jero.modules.split.mapper.*;
|
||||
import com.jero.modules.split.page.SarFileSplitItemsEOPage;
|
||||
import com.jero.modules.split.page.SarFileSplitItemsTableEOPage;
|
||||
@@ -19,7 +16,6 @@ import com.jero.modules.split.page.SarFileSplitMenuEOPage;
|
||||
import com.jero.modules.split.service.ISarFileSplitItemsEOService;
|
||||
import com.jero.modules.split.service.ISarFileSplitItemsValEOService;
|
||||
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
||||
import com.jero.modules.split.util.ExcelUtil;
|
||||
import com.jero.modules.system.mapper.SysDictMapper;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import com.jero.modules.system.util.UserUtils;
|
||||
@@ -437,53 +433,53 @@ public class SarFileSplitItemsEOServiceImpl extends ServiceImpl<SarFileSplitItem
|
||||
}
|
||||
|
||||
|
||||
public void saveFileInfo (SarFileSplitItemsEO sarFileSplitItemsEO) throws Exception {
|
||||
//判断文件是否是新添加的
|
||||
Map<String,List<String>> resultMap = getNotDeleteMsgFile(sarFileSplitItemsEO);
|
||||
List<String> getNotDeleteResId = resultMap.get("notDelResIds");
|
||||
List<String> getNotDeleteFileId = resultMap.get("notDelFileIds");
|
||||
//删除文件资源表数据
|
||||
SarFileSplitItemsResEO sarLawsResEO = new SarFileSplitItemsResEO();
|
||||
sarLawsResEO.setStandId(sarFileSplitItemsEO.getId());
|
||||
if(getNotDeleteResId != null && !getNotDeleteResId.isEmpty()){
|
||||
sarLawsResEO.setIdlist(getNotDeleteResId);
|
||||
} else {
|
||||
sarLawsResEO.setIdlist(null);
|
||||
}
|
||||
List<SarFileSplitItemsResEO> listRes = sarFileSplitItemsResEOMapper.selectByItemsIdAndId(sarLawsResEO);
|
||||
if (listRes != null) {
|
||||
if (!listRes.isEmpty()) {
|
||||
for (int r = 0; r < listRes.size(); r++) {
|
||||
sarFileSplitItemsResEOMapper.deleteByPrimaryKey(listRes.get(r).getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
//删除文件详情表数据
|
||||
SarFileSplitItemsFileEO sarLawsFileEO = new SarFileSplitItemsFileEO();
|
||||
sarLawsFileEO.setStandId(sarFileSplitItemsEO.getId());
|
||||
if(getNotDeleteFileId != null && !getNotDeleteFileId.isEmpty()){
|
||||
sarLawsFileEO.setIdlist(getNotDeleteFileId);
|
||||
}else {
|
||||
sarLawsFileEO.setIdlist(null);
|
||||
}
|
||||
List<SarFileSplitItemsFileEO> listFile = sarFileSplitItemsFileEOMapper.selectFileByItemsIdAndId(sarLawsFileEO);
|
||||
if (listFile != null) {
|
||||
if (!listFile.isEmpty()) {
|
||||
for (int f = 0; f < listFile.size(); f++) {
|
||||
sarFileSplitItemsFileEOMapper.deleteByPrimaryKey(listFile.get(f).getId());
|
||||
//删除文件信息表数据
|
||||
// sarFileInfoEODao.deleteByfileId(listFile.get(f).getId());
|
||||
//删除转换表ot_convert数据
|
||||
// otConvertEODao.deleteByAttId(listFile.get(f).getAttId());
|
||||
}
|
||||
}
|
||||
}
|
||||
//添加新的文件表信息
|
||||
if (StringUtils.isNotEmpty(sarFileSplitItemsEO.getRelevanceFile())) {
|
||||
List<OSSFile> fileList = ossFileService.getFileInfos(sarFileSplitItemsEO.getRelevanceFile());
|
||||
String reslist = insertSarStandFile(sarFileSplitItemsEO.getId(), fileList, StandFileClassifyEnum.RELEVANCE_FILE.getValue(),sarFileSplitItemsEO.getRelevanceFileAttid());
|
||||
}
|
||||
}
|
||||
// public void saveFileInfo (SarFileSplitItemsEO sarFileSplitItemsEO) throws Exception {
|
||||
// //判断文件是否是新添加的
|
||||
// Map<String,List<String>> resultMap = getNotDeleteMsgFile(sarFileSplitItemsEO);
|
||||
// List<String> getNotDeleteResId = resultMap.get("notDelResIds");
|
||||
// List<String> getNotDeleteFileId = resultMap.get("notDelFileIds");
|
||||
// //删除文件资源表数据
|
||||
// SarFileSplitItemsResEO sarLawsResEO = new SarFileSplitItemsResEO();
|
||||
// sarLawsResEO.setStandId(sarFileSplitItemsEO.getId());
|
||||
// if(getNotDeleteResId != null && !getNotDeleteResId.isEmpty()){
|
||||
// sarLawsResEO.setIdlist(getNotDeleteResId);
|
||||
// } else {
|
||||
// sarLawsResEO.setIdlist(null);
|
||||
// }
|
||||
// List<SarFileSplitItemsResEO> listRes = sarFileSplitItemsResEOMapper.selectByItemsIdAndId(sarLawsResEO);
|
||||
// if (listRes != null) {
|
||||
// if (!listRes.isEmpty()) {
|
||||
// for (int r = 0; r < listRes.size(); r++) {
|
||||
// sarFileSplitItemsResEOMapper.deleteByPrimaryKey(listRes.get(r).getId());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// //删除文件详情表数据
|
||||
// SarFileSplitItemsFileEO sarLawsFileEO = new SarFileSplitItemsFileEO();
|
||||
// sarLawsFileEO.setStandId(sarFileSplitItemsEO.getId());
|
||||
// if(getNotDeleteFileId != null && !getNotDeleteFileId.isEmpty()){
|
||||
// sarLawsFileEO.setIdlist(getNotDeleteFileId);
|
||||
// }else {
|
||||
// sarLawsFileEO.setIdlist(null);
|
||||
// }
|
||||
// List<SarFileSplitItemsFileEO> listFile = sarFileSplitItemsFileEOMapper.selectFileByItemsIdAndId(sarLawsFileEO);
|
||||
// if (listFile != null) {
|
||||
// if (!listFile.isEmpty()) {
|
||||
// for (int f = 0; f < listFile.size(); f++) {
|
||||
// sarFileSplitItemsFileEOMapper.deleteByPrimaryKey(listFile.get(f).getId());
|
||||
// //删除文件信息表数据
|
||||
//// sarFileInfoEODao.deleteByfileId(listFile.get(f).getId());
|
||||
// //删除转换表ot_convert数据
|
||||
//// otConvertEODao.deleteByAttId(listFile.get(f).getAttId());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// //添加新的文件表信息
|
||||
// if (StringUtils.isNotEmpty(sarFileSplitItemsEO.getRelevanceFile())) {
|
||||
// List<OSSFile> fileList = ossFileService.getFileInfos(sarFileSplitItemsEO.getRelevanceFile());
|
||||
// String reslist = insertSarStandFile(sarFileSplitItemsEO.getId(), fileList, StandFileClassifyEnum.RELEVANCE_FILE.getValue(),sarFileSplitItemsEO.getRelevanceFileAttid());
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
public int insert(SarFileSplitItemsEO sarFileSplitItemsEO) {
|
||||
@@ -530,105 +526,105 @@ public class SarFileSplitItemsEOServiceImpl extends ServiceImpl<SarFileSplitItem
|
||||
return dao.queryByPage(page);
|
||||
}
|
||||
|
||||
public String insertSarStandFile(String standId, List<OSSFile> list, String standFileClassify, String newFiles) throws Exception {
|
||||
String residlist = "";
|
||||
String newFileArr[] = newFiles.split(",");
|
||||
List<String> newAttList = Arrays.asList(newFileArr);
|
||||
if (list != null) {
|
||||
SarFileSplitItemsResEO sarStandResEO = new SarFileSplitItemsResEO();
|
||||
SarFileSplitItemsFileEO sarStandFileEO = new SarFileSplitItemsFileEO();
|
||||
for (OSSFile fileInfo : list) {
|
||||
if(newAttList != null && newAttList.contains(fileInfo.getId())){
|
||||
//标准文件资源表存数据库
|
||||
sarStandResEO.setStandId(standId); //标准ID
|
||||
sarStandResEO.setStandFileClassify(standFileClassify); //文件分类
|
||||
sarStandResEO.setFileName(fileInfo.getFileName()); //文件名称@@@@@@@需要确定取name 还是 oldname
|
||||
// public String insertSarStandFile(String standId, List<OSSFile> list, String standFileClassify, String newFiles) throws Exception {
|
||||
// String residlist = "";
|
||||
// String newFileArr[] = newFiles.split(",");
|
||||
// List<String> newAttList = Arrays.asList(newFileArr);
|
||||
// if (list != null) {
|
||||
// SarFileSplitItemsResEO sarStandResEO = new SarFileSplitItemsResEO();
|
||||
// SarFileSplitItemsFileEO sarStandFileEO = new SarFileSplitItemsFileEO();
|
||||
// for (OSSFile fileInfo : list) {
|
||||
// if(newAttList != null && newAttList.contains(fileInfo.getId())){
|
||||
// //标准文件资源表存数据库
|
||||
// sarStandResEO.setStandId(standId); //标准ID
|
||||
// sarStandResEO.setStandFileClassify(standFileClassify); //文件分类
|
||||
// sarStandResEO.setFileName(fileInfo.getFileName()); //文件名称@@@@@@@需要确定取name 还是 oldname
|
||||
//
|
||||
// String fileSuffix = fileInfo.getFileName().substring(fileInfo.getFileName().lastIndexOf(".")+1);
|
||||
// sarStandResEO.setFileSuffix(fileSuffix); //文件类型
|
||||
// sarStandResEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
// sarStandResEO.setCreationTime(new Date());
|
||||
// sarStandResEO.setModifyTime(new Date());
|
||||
// sarStandResEO.setValidFlag(ValueStateEnum.VALUE_TRUE.getValue());
|
||||
// int i = sarFileSplitItemsResEOMapper.insertSelective(sarStandResEO);
|
||||
// residlist += sarStandResEO.getId() + ",";
|
||||
// //标准文件详情表存数据库
|
||||
// sarStandFileEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
// sarStandFileEO.setCreationTime(new Date());
|
||||
// sarStandFileEO.setModifyTime(new Date());
|
||||
// sarStandFileEO.setValidFlag(ValueStateEnum.VALUE_TRUE.getValue());
|
||||
// sarStandFileEO.setStandId(standId); //标准ID
|
||||
// sarStandFileEO.setResId(sarStandResEO.getId()); //资源ID
|
||||
// sarStandFileEO.setAttId(fileInfo.getId()); //文件ID
|
||||
// sarStandFileEO.setUseModel(UseModuleEnum.SOURCE_FILE.getValue()); //文件使用模式 //文件名称@@@@@@@需要修改
|
||||
// sarFileSplitItemsFileEOMapper.insertSelective(sarStandFileEO);
|
||||
//
|
||||
// //文档转换
|
||||
// if ("pdf".equals(fileSuffix) || "PDF".equals(fileSuffix)) {
|
||||
// sarStandFileEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
// sarStandFileEO.setUseModel(UseModuleEnum.WEB_FILE.getValue()); //文件使用模式 //文件名称@@@@@@@需要修改
|
||||
// sarFileSplitItemsFileEOMapper.insertSelective(sarStandFileEO);
|
||||
// } else {
|
||||
// String filePath = fileInfo.getUrl();
|
||||
//// ConvertMqEO convert = new ConvertMqEO();
|
||||
//// convert.setLawsId(standId);
|
||||
//// convert.setResId(sarStandResEO.getId());
|
||||
//// convert.setAttId(fileInfo.getId());
|
||||
//// convert.setFilePath(filePath);
|
||||
//// convert.setAddOrUp("0");
|
||||
//// convert.setFileSuffix(fileInfo.getFileSuffix());
|
||||
//// convert.setConvertType(SarTypeEnum.SPLIT.getValue());
|
||||
//// convertMq.sendMQ(convert);
|
||||
// }
|
||||
// } else {
|
||||
// List<SarFileSplitItemsFileEO> getFile = sarFileSplitItemsFileEOMapper.selectFileMsgByAttId(fileInfo.getId());
|
||||
// if(getFile != null && !getFile.isEmpty()){
|
||||
// residlist += getFile.get(0).getResId() + ",";
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// return residlist;
|
||||
// }
|
||||
|
||||
String fileSuffix = fileInfo.getFileName().substring(fileInfo.getFileName().lastIndexOf(".")+1);
|
||||
sarStandResEO.setFileSuffix(fileSuffix); //文件类型
|
||||
sarStandResEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
sarStandResEO.setCreationTime(new Date());
|
||||
sarStandResEO.setModifyTime(new Date());
|
||||
sarStandResEO.setValidFlag(ValueStateEnum.VALUE_TRUE.getValue());
|
||||
int i = sarFileSplitItemsResEOMapper.insertSelective(sarStandResEO);
|
||||
residlist += sarStandResEO.getId() + ",";
|
||||
//标准文件详情表存数据库
|
||||
sarStandFileEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
sarStandFileEO.setCreationTime(new Date());
|
||||
sarStandFileEO.setModifyTime(new Date());
|
||||
sarStandFileEO.setValidFlag(ValueStateEnum.VALUE_TRUE.getValue());
|
||||
sarStandFileEO.setStandId(standId); //标准ID
|
||||
sarStandFileEO.setResId(sarStandResEO.getId()); //资源ID
|
||||
sarStandFileEO.setAttId(fileInfo.getId()); //文件ID
|
||||
sarStandFileEO.setUseModel(UseModuleEnum.SOURCE_FILE.getValue()); //文件使用模式 //文件名称@@@@@@@需要修改
|
||||
sarFileSplitItemsFileEOMapper.insertSelective(sarStandFileEO);
|
||||
|
||||
//文档转换
|
||||
if ("pdf".equals(fileSuffix) || "PDF".equals(fileSuffix)) {
|
||||
sarStandFileEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
sarStandFileEO.setUseModel(UseModuleEnum.WEB_FILE.getValue()); //文件使用模式 //文件名称@@@@@@@需要修改
|
||||
sarFileSplitItemsFileEOMapper.insertSelective(sarStandFileEO);
|
||||
} else {
|
||||
String filePath = fileInfo.getUrl();
|
||||
// ConvertMqEO convert = new ConvertMqEO();
|
||||
// convert.setLawsId(standId);
|
||||
// convert.setResId(sarStandResEO.getId());
|
||||
// convert.setAttId(fileInfo.getId());
|
||||
// convert.setFilePath(filePath);
|
||||
// convert.setAddOrUp("0");
|
||||
// convert.setFileSuffix(fileInfo.getFileSuffix());
|
||||
// convert.setConvertType(SarTypeEnum.SPLIT.getValue());
|
||||
// convertMq.sendMQ(convert);
|
||||
}
|
||||
} else {
|
||||
List<SarFileSplitItemsFileEO> getFile = sarFileSplitItemsFileEOMapper.selectFileMsgByAttId(fileInfo.getId());
|
||||
if(getFile != null && !getFile.isEmpty()){
|
||||
residlist += getFile.get(0).getResId() + ",";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return residlist;
|
||||
}
|
||||
|
||||
public Map<String,List<String>> getNotDeleteMsgFile(SarFileSplitItemsEO sarFileSplitItemsEO){
|
||||
Map<String,List<String>> resultMap = new HashMap<>();
|
||||
List<String> getNotDeleteResId = new ArrayList<>();
|
||||
List<String> getNotDeleteFileId = new ArrayList<>();
|
||||
String newStandFile = "";
|
||||
//向文件表添加关联文件数据
|
||||
String newrelevanceFile = "";
|
||||
if (StringUtils.isNotEmpty(sarFileSplitItemsEO.getRelevanceFile())) {
|
||||
newrelevanceFile = getNotDelFile(sarFileSplitItemsEO.getRelevanceFile(),getNotDeleteResId,getNotDeleteFileId);
|
||||
}
|
||||
sarFileSplitItemsEO.setRelevanceFileAttid(newrelevanceFile);
|
||||
resultMap.put("notDelResIds",getNotDeleteResId);
|
||||
resultMap.put("notDelFileIds",getNotDeleteFileId);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
public String getNotDelFile(String fileAttIds,List<String> getNotDeleteResId,List<String> getNotDeleteFileId){
|
||||
String splitFile[] = fileAttIds.split(",");
|
||||
String newFiles = "";
|
||||
for(int i=0;i<splitFile.length;i++){
|
||||
List<SarFileSplitItemsFileEO> getFile = sarFileSplitItemsFileEOMapper.selectFileMsgByAttId(splitFile[i]);
|
||||
if(getFile != null && !getFile.isEmpty()){
|
||||
for(SarFileSplitItemsFileEO sarStandFileEO : getFile){
|
||||
getNotDeleteResId.add(sarStandFileEO.getResId());
|
||||
getNotDeleteFileId.add(sarStandFileEO.getId());
|
||||
}
|
||||
List<SarFileSplitItemsFileEO> getWebFile = sarFileSplitItemsFileEOMapper.selectFileByAttId(splitFile[i]);
|
||||
if(getWebFile != null && !getWebFile.isEmpty()){
|
||||
getNotDeleteFileId.add(getWebFile.get(0).getId());
|
||||
}
|
||||
|
||||
} else {
|
||||
newFiles += splitFile[i] + ",";
|
||||
}
|
||||
}
|
||||
return newFiles;
|
||||
}
|
||||
// public Map<String,List<String>> getNotDeleteMsgFile(SarFileSplitItemsEO sarFileSplitItemsEO){
|
||||
// Map<String,List<String>> resultMap = new HashMap<>();
|
||||
// List<String> getNotDeleteResId = new ArrayList<>();
|
||||
// List<String> getNotDeleteFileId = new ArrayList<>();
|
||||
// String newStandFile = "";
|
||||
// //向文件表添加关联文件数据
|
||||
// String newrelevanceFile = "";
|
||||
// if (StringUtils.isNotEmpty(sarFileSplitItemsEO.getRelevanceFile())) {
|
||||
// newrelevanceFile = getNotDelFile(sarFileSplitItemsEO.getRelevanceFile(),getNotDeleteResId,getNotDeleteFileId);
|
||||
// }
|
||||
// sarFileSplitItemsEO.setRelevanceFileAttid(newrelevanceFile);
|
||||
// resultMap.put("notDelResIds",getNotDeleteResId);
|
||||
// resultMap.put("notDelFileIds",getNotDeleteFileId);
|
||||
// return resultMap;
|
||||
// }
|
||||
//
|
||||
// public String getNotDelFile(String fileAttIds,List<String> getNotDeleteResId,List<String> getNotDeleteFileId){
|
||||
// String splitFile[] = fileAttIds.split(",");
|
||||
// String newFiles = "";
|
||||
// for(int i=0;i<splitFile.length;i++){
|
||||
// List<SarFileSplitItemsFileEO> getFile = sarFileSplitItemsFileEOMapper.selectFileMsgByAttId(splitFile[i]);
|
||||
// if(getFile != null && !getFile.isEmpty()){
|
||||
// for(SarFileSplitItemsFileEO sarStandFileEO : getFile){
|
||||
// getNotDeleteResId.add(sarStandFileEO.getResId());
|
||||
// getNotDeleteFileId.add(sarStandFileEO.getId());
|
||||
// }
|
||||
// List<SarFileSplitItemsFileEO> getWebFile = sarFileSplitItemsFileEOMapper.selectFileByAttId(splitFile[i]);
|
||||
// if(getWebFile != null && !getWebFile.isEmpty()){
|
||||
// getNotDeleteFileId.add(getWebFile.get(0).getId());
|
||||
// }
|
||||
//
|
||||
// } else {
|
||||
// newFiles += splitFile[i] + ",";
|
||||
// }
|
||||
// }
|
||||
// return newFiles;
|
||||
// }
|
||||
|
||||
public String insertItemTable(List<SarFileSplitItemsValEO> getValList,String itemId){
|
||||
String itemContent = "<table class=\'wordTable\'>";
|
||||
@@ -1287,12 +1283,12 @@ public class SarFileSplitItemsEOServiceImpl extends ServiceImpl<SarFileSplitItem
|
||||
i++;
|
||||
int countError = 0; //记录失败数据数量
|
||||
String errorMsg = "第" + i + "行:";
|
||||
dto.setRelevanceFileName(dto.getRelevanceFile());
|
||||
// dto.setRelevanceFileName(dto.getRelevanceFile());
|
||||
if (num > 0 && StringUtils.isEmpty(dto.getItemsNum()) && StringUtils.isEmpty(dto.getItemsName())) {
|
||||
String nowItemContent = dto.getItermsConditions();
|
||||
BeanUtils.copyProperties(datas.get(num-1), dto);
|
||||
dto.setItermsConditions(nowItemContent);
|
||||
dto.setRelevanceFile(dto.getRelevanceFileName());
|
||||
// dto.setRelevanceFile(dto.getRelevanceFileName());
|
||||
}
|
||||
if (StringUtils.isEmpty(dto.getItemsNum())) {
|
||||
errorMsg += "条款号不能为空;";
|
||||
@@ -1312,82 +1308,82 @@ public class SarFileSplitItemsEOServiceImpl extends ServiceImpl<SarFileSplitItem
|
||||
countError++;
|
||||
}
|
||||
}
|
||||
String saveApplyCode = "";
|
||||
if (StringUtils.isNotEmpty(dto.getApplyArctic())) {
|
||||
dto.setApplyArctic(dto.getApplyArctic().replace(",", ","));
|
||||
String applys[] = dto.getApplyArctic().split(",");
|
||||
if(applys.length>20){
|
||||
errorMsg += "适用车型选项不能超过20个;";
|
||||
countError++;
|
||||
} else if (dto.getApplyArctic().length() > 500) {
|
||||
errorMsg += "适用车型不能超过500个字符;";
|
||||
countError++;
|
||||
} else {
|
||||
Set set = new HashSet();
|
||||
for (int a = 0; a < applys.length; a++) {
|
||||
String getDic = sysDictMapper.queryDictKeyByText("PRODUCTTYPE", applys[a]);;
|
||||
if (getDic != null) {
|
||||
saveApplyCode += getDic + ",";
|
||||
} else {
|
||||
errorMsg += "适用车型" + applys[a] + "不存在;";
|
||||
countError++;
|
||||
break;
|
||||
}
|
||||
set.add(applys[a]);
|
||||
if (a==applys.length-1 && applys.length != set.size()){
|
||||
errorMsg += "适用车型存在重复数据;";
|
||||
countError++;
|
||||
}
|
||||
}
|
||||
if (!saveApplyCode.equals("")){
|
||||
dto.setApplyArctic(saveApplyCode.substring(0,saveApplyCode.length()-1));
|
||||
}
|
||||
}
|
||||
}
|
||||
// String saveApplyCode = "";
|
||||
// if (StringUtils.isNotEmpty(dto.getApplyArctic())) {
|
||||
// dto.setApplyArctic(dto.getApplyArctic().replace(",", ","));
|
||||
// String applys[] = dto.getApplyArctic().split(",");
|
||||
// if(applys.length>20){
|
||||
// errorMsg += "适用车型选项不能超过20个;";
|
||||
// countError++;
|
||||
// } else if (dto.getApplyArctic().length() > 500) {
|
||||
// errorMsg += "适用车型不能超过500个字符;";
|
||||
// countError++;
|
||||
// } else {
|
||||
// Set set = new HashSet();
|
||||
// for (int a = 0; a < applys.length; a++) {
|
||||
// String getDic = sysDictMapper.queryDictKeyByText("PRODUCTTYPE", applys[a]);;
|
||||
// if (getDic != null) {
|
||||
// saveApplyCode += getDic + ",";
|
||||
// } else {
|
||||
// errorMsg += "适用车型" + applys[a] + "不存在;";
|
||||
// countError++;
|
||||
// break;
|
||||
// }
|
||||
// set.add(applys[a]);
|
||||
// if (a==applys.length-1 && applys.length != set.size()){
|
||||
// errorMsg += "适用车型存在重复数据;";
|
||||
// countError++;
|
||||
// }
|
||||
// }
|
||||
// if (!saveApplyCode.equals("")){
|
||||
// dto.setApplyArctic(saveApplyCode.substring(0,saveApplyCode.length()-1));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//关联文件 支持PDF、doc、docx文件,
|
||||
if (StringUtils.isNotEmpty(dto.getRelevanceFile())) {
|
||||
dto.setRelevanceFile(dto.getRelevanceFile().replace(",", ","));
|
||||
String[] filelist = dto.getRelevanceFile().split(",");
|
||||
String fileidlist = "";
|
||||
if (filelist != null && filelist.length > 8) {
|
||||
errorMsg += "关联文件不能超过8个";
|
||||
countError++;
|
||||
} else {
|
||||
for (int ind = 0; ind < filelist.length; ind++) {
|
||||
String filename = filelist[ind];
|
||||
String resultMes = ExcelUtil.validatePattern(filename);
|
||||
if (StringUtils.isNotEmpty(resultMes)) {
|
||||
errorMsg += "关联文件" + resultMes;
|
||||
countError++;
|
||||
continue;
|
||||
}
|
||||
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, filename);
|
||||
if (nowfilelist.size() <= 0) {
|
||||
errorMsg += "压缩包中没有关联文件" + filename + "文件;";
|
||||
countError++;
|
||||
} else {
|
||||
// 判断文件大小是否超过200M
|
||||
if (nowfilelist.get(0).length() > 200 * 1024 * 1024) {
|
||||
errorMsg += filename + "文件大小超过200M;";
|
||||
countError++;
|
||||
continue;
|
||||
}
|
||||
OSSFile ossFile = new OSSFile();
|
||||
String id = UUID.randomUUID().toString().replace("-", "");
|
||||
ossFile.setId(id);
|
||||
ossFile.setFileName(nowfilelist.get(0).getName());
|
||||
ossFile.setUrl(nowfilelist.get(0).getPath());
|
||||
boolean insertResult = ossFileService.save(ossFile);
|
||||
if(insertResult){
|
||||
fileidlist += id + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fileidlist != "") {
|
||||
dto.setRelevanceFile(fileidlist.substring(0, fileidlist.length() - 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (StringUtils.isNotEmpty(dto.getRelevanceFile())) {
|
||||
// dto.setRelevanceFile(dto.getRelevanceFile().replace(",", ","));
|
||||
// String[] filelist = dto.getRelevanceFile().split(",");
|
||||
// String fileidlist = "";
|
||||
// if (filelist != null && filelist.length > 8) {
|
||||
// errorMsg += "关联文件不能超过8个";
|
||||
// countError++;
|
||||
// } else {
|
||||
// for (int ind = 0; ind < filelist.length; ind++) {
|
||||
// String filename = filelist[ind];
|
||||
// String resultMes = ExcelUtil.validatePattern(filename);
|
||||
// if (StringUtils.isNotEmpty(resultMes)) {
|
||||
// errorMsg += "关联文件" + resultMes;
|
||||
// countError++;
|
||||
// continue;
|
||||
// }
|
||||
// List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, filename);
|
||||
// if (nowfilelist.size() <= 0) {
|
||||
// errorMsg += "压缩包中没有关联文件" + filename + "文件;";
|
||||
// countError++;
|
||||
// } else {
|
||||
// // 判断文件大小是否超过200M
|
||||
// if (nowfilelist.get(0).length() > 200 * 1024 * 1024) {
|
||||
// errorMsg += filename + "文件大小超过200M;";
|
||||
// countError++;
|
||||
// continue;
|
||||
// }
|
||||
// OSSFile ossFile = new OSSFile();
|
||||
// String id = UUID.randomUUID().toString().replace("-", "");
|
||||
// ossFile.setId(id);
|
||||
// ossFile.setFileName(nowfilelist.get(0).getName());
|
||||
// ossFile.setUrl(nowfilelist.get(0).getPath());
|
||||
// boolean insertResult = ossFileService.save(ossFile);
|
||||
// if(insertResult){
|
||||
// fileidlist += id + ",";
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (fileidlist != "") {
|
||||
// dto.setRelevanceFile(fileidlist.substring(0, fileidlist.length() - 1));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (countError > 0) {
|
||||
stringMessage.add(errorMsg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user