文档拆分-删除无用代码
This commit is contained in:
+1
@@ -76,6 +76,7 @@ public class FileSplitItemsEOController extends JeroController<SarFileSplitItems
|
|||||||
@AutoLog(value = "根据id查询")
|
@AutoLog(value = "根据id查询")
|
||||||
@ApiOperation(value = "根据id查询")
|
@ApiOperation(value = "根据id查询")
|
||||||
@GetMapping("/getSplitItemsById")
|
@GetMapping("/getSplitItemsById")
|
||||||
|
@RequiresPermissions("split:sarFileSplitItems:update")
|
||||||
public Result<?> getSplitItemsById(String id){
|
public Result<?> getSplitItemsById(String id){
|
||||||
Map<String, Object> item = fileSplitItemsEOService.getInfoById(id);
|
Map<String, Object> item = fileSplitItemsEOService.getInfoById(id);
|
||||||
return Result.OK(item);
|
return Result.OK(item);
|
||||||
|
|||||||
-704
@@ -1,704 +0,0 @@
|
|||||||
package com.jero.modules.split.controller;
|
|
||||||
|
|
||||||
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;
|
|
||||||
import com.jero.modules.oss.entity.OSSFile;
|
|
||||||
import com.jero.modules.oss.service.IOSSFileService;
|
|
||||||
import com.jero.modules.split.common.ConvertHtml2Excel;
|
|
||||||
import com.jero.modules.split.common.FileUnZip;
|
|
||||||
import com.jero.modules.split.common.ReadExcel;
|
|
||||||
import com.jero.modules.split.common.SplitTableInfo;
|
|
||||||
import com.jero.modules.split.dto.*;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsEO;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsParamsEO;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsEOPage;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsParamsEOPage;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsValEOPage;
|
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsEOService;
|
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsParamsEOService;
|
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsTableEOService;
|
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsValEOService;
|
|
||||||
import com.jero.modules.split.util.POIReadExcelToHtml;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
|
||||||
import org.apache.commons.io.FileUtils;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.commons.lang3.StringEscapeUtils;
|
|
||||||
import org.apache.poi.common.usermodel.HyperlinkType;
|
|
||||||
import org.apache.poi.hssf.usermodel.*;
|
|
||||||
import org.apache.poi.hssf.util.HSSFColor;
|
|
||||||
import org.apache.poi.ss.usermodel.CreationHelper;
|
|
||||||
import org.apache.poi.ss.usermodel.Hyperlink;
|
|
||||||
import org.apache.poi.ss.util.CellRangeAddress;
|
|
||||||
import org.apache.poi.util.IOUtils;
|
|
||||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import static com.jero.modules.split.util.ExcelUtil.checkObjAllFieldsIsNull;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/split/fileSplitItems")
|
|
||||||
@Api(tags = "条款信息-备用")
|
|
||||||
public class SarFileSplitItemsEOController extends JeroController<SarFileSplitItemsEO, ISarFileSplitItemsEOService> {
|
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitItemsEOController.class);
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ISarFileSplitItemsEOService sarFileSplitItemsEOService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ISarFileSplitItemsValEOService sarFileSplitItemsValEOService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ISarFileSplitItemsTableEOService sarFileSplitItemsTableEOService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ISarFileSplitItemsParamsEOService sarFileSplitItemsParamsEOService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IOSSFileService ossFileService;
|
|
||||||
|
|
||||||
@Value("${jero.path.upload}")
|
|
||||||
private String filePath;
|
|
||||||
|
|
||||||
@Value("${jero.path.upload}")
|
|
||||||
private String uploadFilePath;
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款信息-分页查询Y")
|
|
||||||
@GetMapping("/getSplitItemsByPage")
|
|
||||||
// @RequiresPermissions("lawss:sarFileSplitItems:page")
|
|
||||||
public Result<IPage<SarFileSplitItemsEO>> page(SarFileSplitItemsEOPage page) throws Exception {
|
|
||||||
page.setValidFlag("0");
|
|
||||||
//page.setOrderBy("regexp_replace(replace('.'||ITEMS_NUM, '.', '.00000000'), '0+([^\\.]{8})', '\\1')");
|
|
||||||
page.setOrderBy("SAR_FILE_SPLIT_MENU.display_seq asc");
|
|
||||||
List<SarFileSplitItemsEO> rows = sarFileSplitItemsEOService.queryByPage(page);
|
|
||||||
if (rows != null && !rows.isEmpty()) {
|
|
||||||
for (SarFileSplitItemsEO sarFileSplitItemsEO : rows) {
|
|
||||||
SarFileSplitItemsParamsEOPage paramPage = new SarFileSplitItemsParamsEOPage();
|
|
||||||
paramPage.setItemId(sarFileSplitItemsEO.getId());
|
|
||||||
List<SarFileSplitItemsParamsEO> paramList = sarFileSplitItemsParamsEOService.queryByList(paramPage);
|
|
||||||
sarFileSplitItemsEO.setParamsList(paramList);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
IPage<SarFileSplitItemsEO> pageList = new Page<>();
|
|
||||||
pageList.setRecords(rows);
|
|
||||||
pageList.setCurrent(page.getPage());
|
|
||||||
pageList.setSize(page.getPageSize());
|
|
||||||
pageList.setTotal(sarFileSplitItemsEOService.queryByCount(page));
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款信息-查看所有条款详情")
|
|
||||||
@GetMapping("/getAllSplitItems")
|
|
||||||
public Result<List<SarFileSplitItemsEO>> getAllSplitItems(SarFileSplitItemsEOPage page){
|
|
||||||
page.setValidFlag("0");
|
|
||||||
page.setOrderBy("SAR_FILE_SPLIT_MENU.display_seq asc");
|
|
||||||
List<SarFileSplitItemsEO> rows = sarFileSplitItemsEOService.queryByList2(page);
|
|
||||||
return Result.OK(rows);
|
|
||||||
}
|
|
||||||
|
|
||||||
// @ApiOperation(value = "文档拆分条款信息-查询")
|
|
||||||
// @GetMapping("")
|
|
||||||
//// @RequiresPermissions("lawss:sarFileSplitItems:list")
|
|
||||||
// public Result<List<SarFileSplitItemsEO>> list(SarFileSplitItemsEOPage page) throws Exception {
|
|
||||||
// return Result.OK(sarFileSplitItemsEOService.queryByList(page));
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @ApiOperation(value = "文档拆分条款信息-详情")
|
|
||||||
// @GetMapping("/{id}")
|
|
||||||
// @RequiresPermissions("lawss:sarFileSplitItems:get")
|
|
||||||
// public Result<SarFileSplitItemsEO> find(@PathVariable String id) throws Exception {
|
|
||||||
// return Result.OK(sarFileSplitItemsEOService.selectByPrimaryKey(id));
|
|
||||||
// }
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款信息-新增Y")
|
|
||||||
@PostMapping("/addSplitItems")
|
|
||||||
public Result<?> create(@RequestBody SarFileSplitItemsEO sarFileSplitItemsEO) throws Exception {
|
|
||||||
if(CollectionUtils.isNotEmpty(sarFileSplitItemsEO.getItemValEOList())) {
|
|
||||||
List<SarFileSplitItemsValEO> itemValEOListNew = new ArrayList<>();
|
|
||||||
for (SarFileSplitItemsValEO itemsValEO : sarFileSplitItemsEO.getItemValEOList()) {
|
|
||||||
itemsValEO.setItemContent(StringEscapeUtils.unescapeHtml4(itemsValEO.getItemContent()));
|
|
||||||
itemValEOListNew.add(itemsValEO);
|
|
||||||
}
|
|
||||||
sarFileSplitItemsEO.setItemValEOList(itemValEOListNew);
|
|
||||||
}
|
|
||||||
|
|
||||||
int resultCount = 0;
|
|
||||||
if(StringUtils.isBlank(sarFileSplitItemsEO.getId())){
|
|
||||||
resultCount = sarFileSplitItemsEOService.addItemContent(sarFileSplitItemsEO);
|
|
||||||
}else{
|
|
||||||
resultCount = sarFileSplitItemsEOService.updateItemContent(sarFileSplitItemsEO);
|
|
||||||
}
|
|
||||||
if (resultCount > 0) {
|
|
||||||
return Result.OK("新增成功",sarFileSplitItemsEO);
|
|
||||||
} else {
|
|
||||||
return Result.error("新增失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款信息-修改")
|
|
||||||
@PutMapping("/updateSplitItems")
|
|
||||||
public Result<?> update(@RequestBody SarFileSplitItemsEO sarFileSplitItemsEO) throws Exception {
|
|
||||||
if(CollectionUtils.isNotEmpty(sarFileSplitItemsEO.getItemValEOList())) {
|
|
||||||
List<SarFileSplitItemsValEO> itemValEOListNew = new ArrayList<>();
|
|
||||||
for (SarFileSplitItemsValEO itemsValEO : sarFileSplitItemsEO.getItemValEOList()) {
|
|
||||||
itemsValEO.setItemContent(StringEscapeUtils.unescapeHtml4(itemsValEO.getItemContent()));
|
|
||||||
itemValEOListNew.add(itemsValEO);
|
|
||||||
}
|
|
||||||
sarFileSplitItemsEO.setItemValEOList(itemValEOListNew);
|
|
||||||
}
|
|
||||||
|
|
||||||
int resultCount = sarFileSplitItemsEOService.updateItemContent(sarFileSplitItemsEO);
|
|
||||||
if (resultCount > 0) {
|
|
||||||
return Result.OK("修改成功",sarFileSplitItemsEO);
|
|
||||||
} else {
|
|
||||||
return Result.error("修改失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款信息-暂存")
|
|
||||||
@PutMapping("/saveSplitItems")
|
|
||||||
public Result<?> save(@RequestBody SarFileSplitItemsEO sarFileSplitItemsEO) throws Exception {
|
|
||||||
if(CollectionUtils.isNotEmpty(sarFileSplitItemsEO.getItemValEOList())) {
|
|
||||||
List<SarFileSplitItemsValEO> itemValEOListNew = new ArrayList<>();
|
|
||||||
for (SarFileSplitItemsValEO itemsValEO : sarFileSplitItemsEO.getItemValEOList()) {
|
|
||||||
itemsValEO.setItemContent(StringEscapeUtils.unescapeHtml4(itemsValEO.getItemContent()));
|
|
||||||
itemValEOListNew.add(itemsValEO);
|
|
||||||
}
|
|
||||||
sarFileSplitItemsEO.setItemValEOList(itemValEOListNew);
|
|
||||||
}
|
|
||||||
|
|
||||||
int resultCount = 0;
|
|
||||||
if(StringUtils.isBlank(sarFileSplitItemsEO.getId())){
|
|
||||||
resultCount = sarFileSplitItemsEOService.addItemContent(sarFileSplitItemsEO);
|
|
||||||
}else{
|
|
||||||
resultCount = sarFileSplitItemsEOService.updateItemContent(sarFileSplitItemsEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (resultCount > 0) {
|
|
||||||
return Result.OK("暂存成功",sarFileSplitItemsEO);
|
|
||||||
} else {
|
|
||||||
return Result.error("暂存失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// @ApiOperation(value = "文档拆分条款信息-删除")
|
|
||||||
// @GetMapping("/{id}")
|
|
||||||
// @RequiresPermissions("lawss:sarFileSplitItems:delete")
|
|
||||||
// public Result delete(@PathVariable String id) throws Exception {
|
|
||||||
// sarFileSplitItemsEOService.deleteByPrimaryKey(id);
|
|
||||||
// logger.info("delete from SAR_FILE_SPLIT_ITEMS where id = {}", id);
|
|
||||||
// return Result.OK();
|
|
||||||
// }
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款信息-批量删除Y")
|
|
||||||
@PostMapping("/batchDeleteItems")
|
|
||||||
public Result batchDeleteItems(String ids) throws Exception {
|
|
||||||
if (StringUtils.isNotEmpty(ids)) {
|
|
||||||
int result = sarFileSplitItemsEOService.batchDeleteItems(ids);
|
|
||||||
if (result > 0) {
|
|
||||||
return Result.OK("删除成功",null);
|
|
||||||
} else {
|
|
||||||
return Result.error("删除失败");
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
return Result.error("请选择要删除的数据");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款信息-批量删除条款要求")
|
|
||||||
@PostMapping("/batchDeleteItemsVal")
|
|
||||||
public Result batchDeleteItemsVal(@RequestBody SarFileSplitItemsEO sarFileSplitItemsEO) throws Exception {
|
|
||||||
if(CollectionUtils.isNotEmpty(sarFileSplitItemsEO.getItemValEOList())) {
|
|
||||||
List<SarFileSplitItemsValEO> itemValEOListNew = new ArrayList<>();
|
|
||||||
for (SarFileSplitItemsValEO itemsValEO : sarFileSplitItemsEO.getItemValEOList()) {
|
|
||||||
itemsValEO.setItemContent(StringEscapeUtils.unescapeHtml4(itemsValEO.getItemContent()));
|
|
||||||
itemValEOListNew.add(itemsValEO);
|
|
||||||
}
|
|
||||||
sarFileSplitItemsEO.setItemValEOList(itemValEOListNew);
|
|
||||||
}
|
|
||||||
|
|
||||||
int resultCount = sarFileSplitItemsEOService.updateItemContentAfterBathDel(sarFileSplitItemsEO);
|
|
||||||
if (resultCount > 0) {
|
|
||||||
return Result.OK("批量删除成功",sarFileSplitItemsEO);
|
|
||||||
} else {
|
|
||||||
return Result.error("批量删除失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款信息-移动条款要求到指定目录")
|
|
||||||
@PostMapping("/moveSplitItemsVal")
|
|
||||||
public Result moveSplitItemsVal(@RequestBody SarFileSplitItemsEOPage page) throws Exception {
|
|
||||||
if(CollectionUtils.isNotEmpty(page.getTargetItemValEOList())) {
|
|
||||||
List<SarFileSplitItemsValEO> itemValEOListNew = new ArrayList<>();
|
|
||||||
for (SarFileSplitItemsValEO itemsValEO : page.getTargetItemValEOList()) {
|
|
||||||
itemsValEO.setItemContent(StringEscapeUtils.unescapeHtml4(itemsValEO.getItemContent()));
|
|
||||||
itemValEOListNew.add(itemsValEO);
|
|
||||||
}
|
|
||||||
page.setTargetItemValEOList(itemValEOListNew);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String,String> resultMsgMap = sarFileSplitItemsEOService.moveSplitItemsVal(page);
|
|
||||||
if ("0".equals(resultMsgMap.get("code"))) {
|
|
||||||
return Result.OK("移动成功");
|
|
||||||
} else {
|
|
||||||
return Result.error(resultMsgMap.get("msg"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款信息-根据id查询")
|
|
||||||
@GetMapping("/getInfoById")
|
|
||||||
// @RequiresPermissions("lawss:sarFileSplitItems:get")
|
|
||||||
public Result<SarFileSplitItemsEO> getInfoById(String id) throws Exception {
|
|
||||||
SarFileSplitItemsEO sarFileSplitItemsEO = sarFileSplitItemsEOService.selectByPrimaryKey(id);
|
|
||||||
if (sarFileSplitItemsEO != null) {
|
|
||||||
SarFileSplitItemsParamsEOPage paramPage = new SarFileSplitItemsParamsEOPage();
|
|
||||||
paramPage.setItemId(id);
|
|
||||||
List<SarFileSplitItemsParamsEO> paramList = sarFileSplitItemsParamsEOService.queryByList(paramPage);
|
|
||||||
sarFileSplitItemsEO.setParamsList(paramList);
|
|
||||||
}
|
|
||||||
// 查询特殊参数要求信息
|
|
||||||
return Result.OK(sarFileSplitItemsEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款信息-判断包含子节点Y")
|
|
||||||
@GetMapping("/judgeContaintChilds")
|
|
||||||
/*@RequiresPermissions("lawss:sarMenu:judgequeryMenuByPid")*/
|
|
||||||
public Result<Map<String, Object>> judgeContaintChilds(String ids) throws Exception {
|
|
||||||
Map<String, Object> result = sarFileSplitItemsEOService.judgeContaintChilds(ids);
|
|
||||||
return Result.OK(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款信息-导出zipY")
|
|
||||||
@GetMapping(value = "/exportSplitInfoZip")
|
|
||||||
public void exportSplitInfoZip(String idList, String infoId,String exportName, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
|
||||||
OutputStream os = null;
|
|
||||||
OutputStream excelOS = null;
|
|
||||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
|
||||||
String fileOriName = "拆分条款信息";
|
|
||||||
if (StringUtils.isNotEmpty(exportName)) {
|
|
||||||
fileOriName = exportName;
|
|
||||||
}
|
|
||||||
try{
|
|
||||||
//创建临时文件夹
|
|
||||||
String fileNowPath = uploadFilePath + "/tempZip/" + UUID.randomUUID().toString().replace("-","") + "/" + fileOriName;
|
|
||||||
File nowFile = new File(fileNowPath);
|
|
||||||
if (nowFile.exists()){
|
|
||||||
nowFile.delete();
|
|
||||||
}
|
|
||||||
nowFile.mkdirs();
|
|
||||||
String fileName = fileOriName + ".xls";
|
|
||||||
HSSFSheet sheetItems = workbook.createSheet("条款内容");
|
|
||||||
String[] headers = {"条款号","条款名称","条款内容"};
|
|
||||||
HSSFCellStyle cellStyle =workbook.createCellStyle();
|
|
||||||
cellStyle.setWrapText(true);
|
|
||||||
// cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
|
||||||
cellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
|
||||||
HSSFCellStyle cellStyle1 =workbook.createCellStyle();
|
|
||||||
cellStyle1.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
|
||||||
HSSFCellStyle cellStyleLink =workbook.createCellStyle();
|
|
||||||
HSSFFont font = workbook.createFont();
|
|
||||||
font.setColor(HSSFColor.LIGHT_BLUE.index);
|
|
||||||
cellStyleLink.setFont(font);
|
|
||||||
cellStyleLink.setWrapText(true);
|
|
||||||
List<String> itemIdList = new ArrayList<>();
|
|
||||||
SarFileSplitItemsEOPage page = new SarFileSplitItemsEOPage();
|
|
||||||
if (StringUtils.isNotEmpty(idList)) {
|
|
||||||
String[] idArr = idList.split(",");
|
|
||||||
itemIdList = Arrays.asList(idArr);
|
|
||||||
page.setIdList(itemIdList);
|
|
||||||
}
|
|
||||||
//查询全部条款
|
|
||||||
page.setInfoId(infoId);
|
|
||||||
page.setOrderBy("SAR_FILE_SPLIT_MENU.display_seq asc");
|
|
||||||
List<FileSplitItemsExportDto> allItemsList = sarFileSplitItemsEOService.queryByOrdersForExport(page);
|
|
||||||
List<FileSpiltValTableExportDto> allTableList = new ArrayList<>();
|
|
||||||
List<FileSplitValImgExportDto> allImgList = new ArrayList<>();
|
|
||||||
List<OSSFile> allRelevFileList = new ArrayList<>();
|
|
||||||
int countMaxFile = 1;
|
|
||||||
if (allItemsList != null && !allItemsList.isEmpty()) {
|
|
||||||
for (FileSplitItemsExportDto itemsExportDto : allItemsList) {
|
|
||||||
SarFileSplitItemsValEOPage valEOPage = new SarFileSplitItemsValEOPage();
|
|
||||||
valEOPage.setItemId(itemsExportDto.getId());
|
|
||||||
valEOPage.setOrderBy("DISPLAY_SEQ,ID");
|
|
||||||
List<SarFileSplitItemsValEO> getValList = sarFileSplitItemsValEOService.queryByList(valEOPage);
|
|
||||||
List<FileSplitValExportDto> valContentList = sarFileSplitItemsEOService.combineItemValInfo(getValList,allTableList,allImgList,page);
|
|
||||||
itemsExportDto.setItemValContent(valContentList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 在excel表中添加表头
|
|
||||||
HSSFRow row = sheetItems.createRow(0);
|
|
||||||
sheetItems.setColumnWidth(0,10*256);
|
|
||||||
sheetItems.setColumnWidth(1,20*256);
|
|
||||||
sheetItems.setColumnWidth(2,100*256);
|
|
||||||
//导出目前只需要条款号、条款名称、条款内容
|
|
||||||
|
|
||||||
// sheetItems.setColumnWidth(3,20*256);
|
|
||||||
// sheetItems.setColumnWidth(4,20*256);
|
|
||||||
// sheetItems.setColumnWidth(5,20*256);
|
|
||||||
// sheetItems.setColumnWidth(6,20*256);
|
|
||||||
// sheetItems.setColumnWidth(7,20*256);
|
|
||||||
// sheetItems.setColumnWidth(8,20*256);
|
|
||||||
// sheetItems.setColumnWidth(9,40*256);
|
|
||||||
for (int i = 0; i < headers.length; i++) {
|
|
||||||
HSSFCell cell = row.createCell(i);
|
|
||||||
HSSFRichTextString text = new HSSFRichTextString(headers[i]);
|
|
||||||
cell.setCellValue(text);
|
|
||||||
cell.setCellStyle(cellStyle1);
|
|
||||||
}
|
|
||||||
//放文字内容
|
|
||||||
int allRow = 0;
|
|
||||||
for(int rowNum = 0;rowNum < allItemsList.size(); rowNum++){
|
|
||||||
FileSplitItemsExportDto exportDto = allItemsList.get(rowNum);
|
|
||||||
List<FileSplitValExportDto> valList = exportDto.getItemValContent();
|
|
||||||
int countFile = 0;
|
|
||||||
if(valList != null && !valList.isEmpty()){
|
|
||||||
int startRow = allRow + 1;
|
|
||||||
for (int valRow=0;valRow<valList.size();valRow++) {
|
|
||||||
allRow++;
|
|
||||||
HSSFRow row1 = sheetItems.createRow(allRow);
|
|
||||||
row1.createCell(0).setCellValue(exportDto.getItemsNum());
|
|
||||||
row1.getCell(0).setCellStyle(cellStyle);
|
|
||||||
row1.createCell(1).setCellValue(exportDto.getItemsName());
|
|
||||||
row1.getCell(1).setCellStyle(cellStyle);
|
|
||||||
HSSFCell cell2 = row1.createCell(2);
|
|
||||||
row1.getCell(2).setCellStyle(cellStyle);
|
|
||||||
String content = valList.get(valRow).getValContent();
|
|
||||||
if (StringUtils.isNotEmpty(content)) {
|
|
||||||
content = content.replaceAll("null","");
|
|
||||||
if (content.lastIndexOf("\n") > -1) {
|
|
||||||
content = content.substring(0,content.lastIndexOf("\n"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if("TABLE".equals(valList.get(valRow).getValType())){
|
|
||||||
/* 连接跳转*/
|
|
||||||
CreationHelper createHelper = workbook.getCreationHelper();
|
|
||||||
Hyperlink hyperlink1 = createHelper.createHyperlink(HyperlinkType.DOCUMENT);
|
|
||||||
String tableName = "#\'"+ content + "\'!A1";
|
|
||||||
hyperlink1.setAddress(tableName);
|
|
||||||
cell2.setHyperlink(hyperlink1);// 链接
|
|
||||||
row1.getCell(2).setCellStyle(cellStyleLink);
|
|
||||||
} else if ("IMG".equals(valList.get(valRow).getValType())) {
|
|
||||||
/* 连接跳转*/
|
|
||||||
CreationHelper createHelper = workbook.getCreationHelper();
|
|
||||||
Hyperlink hyperlink1 = createHelper.createHyperlink(HyperlinkType.FILE);
|
|
||||||
String imgName = content;
|
|
||||||
hyperlink1.setAddress(imgName);
|
|
||||||
cell2.setHyperlink(hyperlink1);// 链接
|
|
||||||
row1.getCell(2).setCellStyle(cellStyleLink);
|
|
||||||
}
|
|
||||||
cell2.setCellValue(content);
|
|
||||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
// if (exportDto.getNewcarPutTime() != null) {
|
|
||||||
// String time= sdf.format(exportDto.getNewcarPutTime());
|
|
||||||
// row1.createCell(3).setCellValue(time);
|
|
||||||
// row1.getCell(3).setCellStyle(cellStyle);
|
|
||||||
// }
|
|
||||||
// if (exportDto.getProductPutTime() != null) {
|
|
||||||
// String time= sdf.format(exportDto.getProductPutTime());
|
|
||||||
// row1.createCell(4).setCellValue(time);
|
|
||||||
// row1.getCell(4).setCellStyle(cellStyle);
|
|
||||||
// }
|
|
||||||
// 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.getTechnologyTerritory());
|
|
||||||
// row1.getCell(8).setCellStyle(cellStyle);
|
|
||||||
// if (StringUtils.isNotEmpty(exportDto.getRelevanceFile())) {
|
|
||||||
// List<AttFileEO> fileList = attFileEOService.getMultiFileInfos(exportDto.getRelevanceFile());
|
|
||||||
// if (fileList != null && !fileList.isEmpty()) {
|
|
||||||
// if (countMaxFile < fileList.size()) {
|
|
||||||
// countMaxFile = fileList.size();
|
|
||||||
// }
|
|
||||||
// countFile = 0;
|
|
||||||
// for (AttFileEO attFileEO : fileList) {
|
|
||||||
// /* 连接跳转*/
|
|
||||||
// String releFileName = attFileEO.getOldFileName();
|
|
||||||
// CreationHelper createHelper = workbook.getCreationHelper();
|
|
||||||
// Hyperlink hyperlink1 = createHelper.createHyperlink(HyperlinkType.URL);
|
|
||||||
//// String addr = new String(releFileName.getBytes(),"UTF-8");
|
|
||||||
// hyperlink1.setAddress(releFileName);
|
|
||||||
// row1.createCell(9+countFile).setHyperlink(hyperlink1);
|
|
||||||
// row1.createCell(9+countFile).setCellValue(releFileName);
|
|
||||||
// row1.getCell(9+countFile).setCellStyle(cellStyleLink);
|
|
||||||
// countFile++;
|
|
||||||
// }
|
|
||||||
// allRelevFileList.addAll(fileList);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
if (allRow > startRow) {
|
|
||||||
sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,0,0));
|
|
||||||
sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,1,1));
|
|
||||||
// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,3,3));
|
|
||||||
// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,4,4));
|
|
||||||
// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,5,5));
|
|
||||||
// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,6,6));
|
|
||||||
// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,7,7));
|
|
||||||
// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,8,8));
|
|
||||||
// if (countFile > 0) {
|
|
||||||
// for (int i=0;i<=countFile;i++) {
|
|
||||||
// sheetItems.addMergedRegion(new CellRangeAddress(startRow,allRow,9+i,9+i));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
allRow++;
|
|
||||||
HSSFRow row1 = sheetItems.createRow(allRow);
|
|
||||||
row1.createCell(0).setCellValue(exportDto.getItemsNum());
|
|
||||||
row1.getCell(0).setCellStyle(cellStyle);
|
|
||||||
row1.createCell(1).setCellValue(exportDto.getItemsName());
|
|
||||||
row1.getCell(1).setCellStyle(cellStyle);
|
|
||||||
row1.createCell(2).setCellValue("");
|
|
||||||
row1.getCell(2).setCellStyle(cellStyle);
|
|
||||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
// if (exportDto.getNewcarPutTime() != null) {
|
|
||||||
// String time= sdf.format(exportDto.getNewcarPutTime());
|
|
||||||
// row1.createCell(3).setCellValue(time);
|
|
||||||
// row1.getCell(3).setCellStyle(cellStyle);
|
|
||||||
// }
|
|
||||||
// if (exportDto.getProductPutTime() != null) {
|
|
||||||
// String time= sdf.format(exportDto.getProductPutTime());
|
|
||||||
// row1.createCell(4).setCellValue(time);
|
|
||||||
// row1.getCell(4).setCellStyle(cellStyle);
|
|
||||||
// }
|
|
||||||
// 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.getTechnologyTerritory());
|
|
||||||
// row1.getCell(8).setCellStyle(cellStyle);
|
|
||||||
// if (StringUtils.isNotEmpty(exportDto.getRelevanceFile())) {
|
|
||||||
// List<AttFileEO> fileList = attFileEOService.getMultiFileInfos(exportDto.getRelevanceFile());
|
|
||||||
// if (fileList != null && !fileList.isEmpty()) {
|
|
||||||
// countFile = 0;
|
|
||||||
// for (AttFileEO attFileEO : fileList) {
|
|
||||||
// /* 连接跳转*/
|
|
||||||
// String releFileName = attFileEO.getOldFileName();
|
|
||||||
// CreationHelper createHelper = workbook.getCreationHelper();
|
|
||||||
// Hyperlink hyperlink1 = createHelper.createHyperlink(HyperlinkType.URL);
|
|
||||||
//// String addr = new String(releFileName.getBytes(),"UTF-8");
|
|
||||||
// hyperlink1.setAddress(releFileName);
|
|
||||||
// row1.createCell(9+countFile).setHyperlink(hyperlink1);
|
|
||||||
// row1.createCell(9+countFile).setCellValue(releFileName);
|
|
||||||
// row1.getCell(9+countFile).setCellStyle(cellStyleLink);
|
|
||||||
// countFile++;
|
|
||||||
// }
|
|
||||||
// allRelevFileList.addAll(fileList);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (countMaxFile > 1) {
|
|
||||||
for (int i=1;i<countMaxFile;i++) {
|
|
||||||
sheetItems.setColumnWidth(9+i,40*256);
|
|
||||||
}
|
|
||||||
sheetItems.addMergedRegion(new CellRangeAddress(0,0,9,9+countMaxFile-1));
|
|
||||||
}
|
|
||||||
// 放表格内容
|
|
||||||
if(allTableList!= null && !allTableList.isEmpty()){
|
|
||||||
for(FileSpiltValTableExportDto tableExportDto : allTableList){
|
|
||||||
// List<List<SarFileSplitItemsTableEO>> rowtableList = tableExportDto.getTableEOList();
|
|
||||||
// HSSFSheet sheetTable = workbook.createSheet(tableExportDto.getTableName());
|
|
||||||
String tableName = tableExportDto.getTableName();
|
|
||||||
String tableHtml = tableExportDto.getTableHtCon();
|
|
||||||
if (StringUtils.isNotEmpty(tableHtml) && tableHtml.indexOf("<tbody>") < 0) {
|
|
||||||
if (tableHtml.indexOf("<thead>") < 0) {
|
|
||||||
tableHtml = tableHtml.replaceFirst("<tr>","<tbody><tr>");
|
|
||||||
tableHtml = tableHtml.replaceFirst("</table>","</tbody></table>");
|
|
||||||
} else {
|
|
||||||
tableHtml = tableHtml.replaceFirst("</thead>","</thead><tbody>");
|
|
||||||
tableHtml = tableHtml.replaceFirst("</table>","</tbody></table>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
String cnt = "\n";
|
|
||||||
tableHtml = tableHtml.replaceAll("<[\\s]*?br[^>]*?>|<[\\s]*?\\/[\\s]*?br[\\s]*?>", cnt);
|
|
||||||
workbook = ConvertHtml2Excel.table2Excel(tableHtml,workbook,tableName);
|
|
||||||
// for (int r=0;r<rowtableList.size();r++) {
|
|
||||||
// List<SarFileSplitItemsTableEO> colTableList = rowtableList.get(r);
|
|
||||||
// HSSFRow tRow = sheetTable.createRow(colTableList.get(0).getRowNum()-1);
|
|
||||||
// for(int c=0;c<colTableList.size();c++){
|
|
||||||
// SarFileSplitItemsTableEO tableEO = colTableList.get(c);
|
|
||||||
// tRow.createCell(tableEO.getColNum()-1).setCellValue(tableEO.getContent());
|
|
||||||
// tRow.getCell(tableEO.getColNum()-1).setCellStyle(cellStyle);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//下载图片内容
|
|
||||||
if (allImgList != null && !allImgList.isEmpty()) {
|
|
||||||
sarFileSplitItemsEOService.downLoadImgList(allImgList,fileNowPath);
|
|
||||||
}
|
|
||||||
//下载关联文件内容
|
|
||||||
if (allRelevFileList != null && !allRelevFileList.isEmpty()) {
|
|
||||||
sarFileSplitItemsEOService.downLoadFileList(allRelevFileList,fileNowPath);
|
|
||||||
}
|
|
||||||
String repFileName = fileName.replaceAll("/","_");
|
|
||||||
excelOS = new FileOutputStream(fileNowPath + "/" + repFileName);
|
|
||||||
response.setHeader("Content-Disposition",
|
|
||||||
"attachment; filename=\""+ ReadExcel.encodeFileName(fileOriName+".zip", request) +"\"");
|
|
||||||
response.setContentType("application/force-download");
|
|
||||||
response.flushBuffer();
|
|
||||||
os = response.getOutputStream();
|
|
||||||
workbook.write(excelOS);
|
|
||||||
excelOS.flush();
|
|
||||||
excelOS.close();
|
|
||||||
ZipUtil.zip(fileNowPath,fileNowPath+".zip");
|
|
||||||
FileInputStream fis = new FileInputStream(fileNowPath+".zip");
|
|
||||||
int len = 0;
|
|
||||||
while ((len = fis.read()) != -1) {
|
|
||||||
os.write(len);
|
|
||||||
}
|
|
||||||
os.flush();
|
|
||||||
os.close(); // 后开先关
|
|
||||||
fis.close(); // 先开后关
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(e.getMessage(), e);
|
|
||||||
throw new JeroBootException("下载文件失败,请重试");
|
|
||||||
} finally {
|
|
||||||
IOUtils.closeQuietly(os);
|
|
||||||
IOUtils.closeQuietly(excelOS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款信息-导入Y")
|
|
||||||
@PostMapping(value = "/importSplitItemsZip")
|
|
||||||
public Result<?> importSplitItemsZip(@RequestParam(value = "file", required = false) MultipartFile file,
|
|
||||||
@RequestParam(value = "menuId", required = false) String menuId,
|
|
||||||
@RequestParam(value = "infoId", required = false) String infoId) throws Exception {
|
|
||||||
//验证文件名是否合格
|
|
||||||
/* 截取后缀名 */
|
|
||||||
int pos = file.getOriginalFilename().lastIndexOf(".");
|
|
||||||
String str = file.getOriginalFilename().substring(pos+1).toLowerCase();
|
|
||||||
String filenameorg = file.getOriginalFilename().substring(0,pos);
|
|
||||||
//判断上传文件必须是zip
|
|
||||||
if (!str.equals("zip")) {
|
|
||||||
return Result.error("请上传zip文件");
|
|
||||||
}
|
|
||||||
String path = filePath + "/modal/"+filenameorg;
|
|
||||||
File saveDirectory = new File(path);
|
|
||||||
if(!saveDirectory.isDirectory()){
|
|
||||||
saveDirectory.mkdir();
|
|
||||||
}
|
|
||||||
FileUtils.copyInputStreamToFile(file.getInputStream(), new File(path +"/"+ file.getOriginalFilename()));
|
|
||||||
try{
|
|
||||||
//解压缩
|
|
||||||
String zipEntryName = FileUnZip.unZipFiles(path +"/"+ file.getOriginalFilename(),path);
|
|
||||||
// 数据相关处理,
|
|
||||||
// 1.获取其中的Excel,
|
|
||||||
List<File> excelfilelist = FileUnZip.readExcelFile(zipEntryName);
|
|
||||||
if(excelfilelist.size()<1){
|
|
||||||
//删除原上传文件
|
|
||||||
FileUnZip.deleteDir(saveDirectory);
|
|
||||||
return Result.error("压缩包内没有上传Excel数据");
|
|
||||||
} else if (excelfilelist.size()>1) {
|
|
||||||
//删除原上传文件
|
|
||||||
FileUnZip.deleteDir(saveDirectory);
|
|
||||||
return Result.error("压缩包内有多个Excel数据源");
|
|
||||||
}
|
|
||||||
File excelfile = excelfilelist.get(0);
|
|
||||||
// 导入参数设置,默认即可
|
|
||||||
ImportParams params = new ImportParams();
|
|
||||||
try {
|
|
||||||
String fields[] = {"条款号", "条款名称","条款内容","新车型实施日期",
|
|
||||||
"在产车实施日期","关联零部件","适用车型","引用标准","备注","关联文件"};
|
|
||||||
params.setImportFields(fields);
|
|
||||||
List<SarFileSplitItemsImportDto> result = new ArrayList<>();
|
|
||||||
// 解析excel,并返回校验信息
|
|
||||||
result = ExcelImportUtil.importExcel(excelfile, SarFileSplitItemsImportDto.class, params);
|
|
||||||
Long getExcelInfo = System.currentTimeMillis();
|
|
||||||
//excel读取到的数据
|
|
||||||
List<SarFileSplitItemsImportDto> datas = result;
|
|
||||||
if(datas!=null &&!datas.isEmpty()){
|
|
||||||
try {
|
|
||||||
//获取全部sheet页中表格
|
|
||||||
XSSFWorkbook workbook=new XSSFWorkbook(new FileInputStream(excelfile));
|
|
||||||
XSSFSheet sheet=null;
|
|
||||||
List<SplitTableInfo> getSheetTableList = new ArrayList();
|
|
||||||
for (int i = 1; i < workbook.getNumberOfSheets(); i++) {//获取每个Sheet表
|
|
||||||
sheet = workbook.getSheetAt(i);
|
|
||||||
SplitTableInfo splitTableInfo = new SplitTableInfo();
|
|
||||||
splitTableInfo.setTableName(sheet.getSheetName());
|
|
||||||
String tableHtml = POIReadExcelToHtml.readExcelToHtml(workbook,i,false);
|
|
||||||
splitTableInfo.setTableHtml(tableHtml);
|
|
||||||
getSheetTableList.add(splitTableInfo);
|
|
||||||
}
|
|
||||||
int i = 0 ;
|
|
||||||
List<SarFileSplitItemsImportDto> datasUpdate = new ArrayList<>();
|
|
||||||
//2019.05.14 当读取exceL出现空行过多时,空行数为20以上时中断读取,将数据清洗为新的list
|
|
||||||
for(SarFileSplitItemsImportDto sarStandImportDto :datas){
|
|
||||||
if(i>20){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
//判断此行数据是否全部为空
|
|
||||||
if(checkObjAllFieldsIsNull(sarStandImportDto)){
|
|
||||||
i++;
|
|
||||||
//是则不读取
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
i = 0;
|
|
||||||
datasUpdate.add(sarStandImportDto);
|
|
||||||
}
|
|
||||||
String unzipfilepath = zipEntryName;
|
|
||||||
Result<?> message = sarFileSplitItemsEOService.importSplitItems(datasUpdate,menuId,unzipfilepath,infoId,getSheetTableList);
|
|
||||||
//删除原上传文件
|
|
||||||
FileUnZip.deleteDir(saveDirectory);
|
|
||||||
return message;
|
|
||||||
} catch (Exception e) {
|
|
||||||
//删除原上传文件
|
|
||||||
FileUnZip.deleteDir(saveDirectory);
|
|
||||||
return Result.error(e.getMessage());
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
//删除原上传文件
|
|
||||||
FileUnZip.deleteDir(saveDirectory);
|
|
||||||
return Result.error("没有可导入的数据,请检查!");
|
|
||||||
}
|
|
||||||
} catch (NoSuchElementException e){
|
|
||||||
FileUnZip.deleteDir(saveDirectory);
|
|
||||||
return Result.error("没有可导入的数据,请检查!");
|
|
||||||
} catch (Exception e) {
|
|
||||||
//删除原上传文件
|
|
||||||
FileUnZip.deleteDir(saveDirectory);
|
|
||||||
return Result.error( "读取失败,请严格按照模板文件导入数据");
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
//删除原上传文件
|
|
||||||
FileUnZip.deleteDir(saveDirectory);
|
|
||||||
return Result.error("读取失败,请严格按照模板文件导入数据");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
-83
@@ -1,83 +0,0 @@
|
|||||||
package com.jero.modules.split.controller;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.jero.common.api.vo.Result;
|
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsParamsEO;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsParamsEOPage;
|
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsParamsEOService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/split/sarFileSplitItemsParams")
|
|
||||||
@Api(tags = "文档拆分")
|
|
||||||
public class SarFileSplitItemsParamsEOController extends JeroController<SarFileSplitItemsParamsEO, ISarFileSplitItemsParamsEOService> {
|
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitItemsParamsEOController.class);
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ISarFileSplitItemsParamsEOService sarFileSplitItemsParamsEOService;
|
|
||||||
|
|
||||||
@ApiOperation(value = "|SarFileSplitItemsParamsEO|分页查询")
|
|
||||||
@GetMapping("/page")
|
|
||||||
@RequiresPermissions("lawss:sarFileSplitItemsParams:page")
|
|
||||||
public Result<IPage<SarFileSplitItemsParamsEO>> page(SarFileSplitItemsParamsEOPage page) throws Exception {
|
|
||||||
List<SarFileSplitItemsParamsEO> rows = sarFileSplitItemsParamsEOService.queryByPage(page);
|
|
||||||
IPage<SarFileSplitItemsParamsEO> pageList = null;
|
|
||||||
pageList.setRecords(rows);
|
|
||||||
pageList.setCurrent(page.getPage());
|
|
||||||
pageList.setSize(page.getPageSize());
|
|
||||||
pageList.setTotal(sarFileSplitItemsParamsEOService.queryByCount(page));
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "|SarFileSplitItemsParamsEO|查询")
|
|
||||||
@GetMapping("")
|
|
||||||
@RequiresPermissions("lawss:sarFileSplitItemsParams:list")
|
|
||||||
public Result<List<SarFileSplitItemsParamsEO>> list(SarFileSplitItemsParamsEOPage page) throws Exception {
|
|
||||||
return Result.OK(sarFileSplitItemsParamsEOService.queryByList(page));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "|SarFileSplitItemsParamsEO|详情")
|
|
||||||
@GetMapping("/{id}")
|
|
||||||
@RequiresPermissions("lawss:sarFileSplitItemsParams:get")
|
|
||||||
public Result<SarFileSplitItemsParamsEO> find(@PathVariable String id) throws Exception {
|
|
||||||
return Result.OK(sarFileSplitItemsParamsEOService.selectByPrimaryKey(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "|SarFileSplitItemsParamsEO|新增")
|
|
||||||
@PostMapping(consumes = APPLICATION_JSON_UTF8_VALUE)
|
|
||||||
@RequiresPermissions("lawss:sarFileSplitItemsParams:save")
|
|
||||||
public Result<SarFileSplitItemsParamsEO> create(@RequestBody SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO) throws Exception {
|
|
||||||
sarFileSplitItemsParamsEOService.insertSelective(sarFileSplitItemsParamsEO);
|
|
||||||
return Result.OK(sarFileSplitItemsParamsEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "|SarFileSplitItemsParamsEO|修改")
|
|
||||||
@PutMapping(consumes = APPLICATION_JSON_UTF8_VALUE)
|
|
||||||
@RequiresPermissions("lawss:sarFileSplitItemsParams:update")
|
|
||||||
public Result<SarFileSplitItemsParamsEO> update(@RequestBody SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO) throws Exception {
|
|
||||||
sarFileSplitItemsParamsEOService.updateByPrimaryKeySelective(sarFileSplitItemsParamsEO);
|
|
||||||
return Result.OK(sarFileSplitItemsParamsEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "|SarFileSplitItemsParamsEO|删除")
|
|
||||||
@DeleteMapping("/{id}")
|
|
||||||
@RequiresPermissions("lawss:sarFileSplitItemsParams:delete")
|
|
||||||
public Result delete(@PathVariable String id) throws Exception {
|
|
||||||
sarFileSplitItemsParamsEOService.deleteByPrimaryKey(id);
|
|
||||||
logger.info("delete from SAR_FILE_SPLIT_ITEMS_PARAMS where id = {}", id);
|
|
||||||
return Result.OK();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
+9
-16
@@ -4,12 +4,11 @@ import com.jero.common.api.vo.Result;
|
|||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsValEOPage;
|
import com.jero.modules.split.page.SarFileSplitItemsValEOPage;
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsEOService;
|
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsTableEOService;
|
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsValEOService;
|
import com.jero.modules.split.service.ISarFileSplitItemsValEOService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -29,12 +28,6 @@ public class SarFileSplitItemsValEOController extends JeroController<SarFileSpli
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISarFileSplitItemsValEOService sarFileSplitItemsValEOService;
|
private ISarFileSplitItemsValEOService sarFileSplitItemsValEOService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ISarFileSplitItemsTableEOService sarFileSplitItemsTableEOService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ISarFileSplitItemsEOService sarFileSplitItemsEOService;
|
|
||||||
|
|
||||||
// @ApiOperation(value = "|SarFileSplitItemsValEO|分页查询")
|
// @ApiOperation(value = "|SarFileSplitItemsValEO|分页查询")
|
||||||
// @GetMapping("/page")
|
// @GetMapping("/page")
|
||||||
// @RequiresPermissions("lawss:sarFileSplitItemsVal:page")
|
// @RequiresPermissions("lawss:sarFileSplitItemsVal:page")
|
||||||
@@ -50,7 +43,7 @@ public class SarFileSplitItemsValEOController extends JeroController<SarFileSpli
|
|||||||
|
|
||||||
@ApiOperation(value = "文档拆分条目信息-查询Y")
|
@ApiOperation(value = "文档拆分条目信息-查询Y")
|
||||||
@GetMapping("/getItemsValList")
|
@GetMapping("/getItemsValList")
|
||||||
// @RequiresPermissions("lawss:sarFileSplitItemsVal:list")
|
@RequiresPermissions("split:sarFileSplitItems:update")
|
||||||
public Result<List<SarFileSplitItemsValEO>> list(SarFileSplitItemsValEOPage page) throws Exception {
|
public Result<List<SarFileSplitItemsValEO>> list(SarFileSplitItemsValEOPage page) throws Exception {
|
||||||
page.setOrderBy("DISPLAY_SEQ,ID");
|
page.setOrderBy("DISPLAY_SEQ,ID");
|
||||||
List<SarFileSplitItemsValEO> getList = sarFileSplitItemsValEOService.queryByList(page);
|
List<SarFileSplitItemsValEO> getList = sarFileSplitItemsValEOService.queryByList(page);
|
||||||
@@ -119,12 +112,12 @@ public class SarFileSplitItemsValEOController extends JeroController<SarFileSpli
|
|||||||
// return Result.OK();
|
// return Result.OK();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条目信息-根据目录查询")
|
// @ApiOperation(value = "文档拆分条目信息-根据目录查询")
|
||||||
@GetMapping("/getSplitItemsByMenu")
|
// @GetMapping("/getSplitItemsByMenu")
|
||||||
// @RequiresPermissions("lawss:sarFileSplitItems:page")
|
//// @RequiresPermissions("lawss:sarFileSplitItems:page")
|
||||||
public Result<List<SarFileSplitItemsValEO>> getSplitItemsByMenu(String menuId, String infoId) throws Exception {
|
// public Result<List<SarFileSplitItemsValEO>> getSplitItemsByMenu(String menuId, String infoId) throws Exception {
|
||||||
List<SarFileSplitItemsValEO> getList = sarFileSplitItemsValEOService.getSplitItemsByMenu(menuId,infoId);
|
// List<SarFileSplitItemsValEO> getList = sarFileSplitItemsValEOService.getSplitItemsByMenu(menuId,infoId);
|
||||||
return Result.OK(getList);
|
// return Result.OK(getList);
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-73
@@ -2,9 +2,7 @@ package com.jero.modules.split.controller;
|
|||||||
|
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import com.jero.modules.split.entity.DrageMenuEO;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitMenuEO;
|
import com.jero.modules.split.entity.SarFileSplitMenuEO;
|
||||||
import com.jero.modules.split.mapper.SarFileSplitItemsEOMapper;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitMenuEOPage;
|
import com.jero.modules.split.page.SarFileSplitMenuEOPage;
|
||||||
import com.jero.modules.split.service.IFileSplitItemsEOService;
|
import com.jero.modules.split.service.IFileSplitItemsEOService;
|
||||||
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
||||||
@@ -16,7 +14,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/split/sarFileSplitMenu")
|
@RequestMapping("/split/sarFileSplitMenu")
|
||||||
@@ -28,9 +26,6 @@ public class SarFileSplitMenuEOController extends JeroController<SarFileSplitMen
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISarFileSplitMenuEOService sarFileSplitMenuEOService;
|
private ISarFileSplitMenuEOService sarFileSplitMenuEOService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SarFileSplitItemsEOMapper sarFileSplitItemsEOMapper;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IFileSplitItemsEOService fileSplitItemsEOService;
|
private IFileSplitItemsEOService fileSplitItemsEOService;
|
||||||
|
|
||||||
@@ -58,12 +53,6 @@ public class SarFileSplitMenuEOController extends JeroController<SarFileSplitMen
|
|||||||
return Result.OK(getList);
|
return Result.OK(getList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款目录-详情")
|
|
||||||
@GetMapping("/{id}")
|
|
||||||
public Result<SarFileSplitMenuEO> find(@PathVariable String id) throws Exception {
|
|
||||||
return Result.OK(sarFileSplitMenuEOService.selectByPrimaryKey(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款目录-新增Y")
|
@ApiOperation(value = "文档拆分条款目录-新增Y")
|
||||||
@PostMapping("/addMenu")
|
@PostMapping("/addMenu")
|
||||||
@RequiresPermissions("split:sarFileSplitMenu:add")
|
@RequiresPermissions("split:sarFileSplitMenu:add")
|
||||||
@@ -87,65 +76,4 @@ public class SarFileSplitMenuEOController extends JeroController<SarFileSplitMen
|
|||||||
sarFileSplitMenuEOService.deleteMenu(id);
|
sarFileSplitMenuEOService.deleteMenu(id);
|
||||||
return Result.OK("删除成功",null);
|
return Result.OK("删除成功",null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款目录-拖拽节点")
|
|
||||||
@PostMapping("/dragMenu")
|
|
||||||
public Result dragMenu(@RequestBody DrageMenuEO drageMenuEO) throws Exception {
|
|
||||||
sarFileSplitMenuEOService.dragMenu(drageMenuEO);
|
|
||||||
return Result.OK("修改成功",drageMenuEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款目录-查询子节点")
|
|
||||||
@PostMapping("/judgequeryMenuByPid")
|
|
||||||
/*@RequiresPermissions("lawss:sarMenu:judgequeryMenuByPid")*/
|
|
||||||
public Result<Boolean> judgequeryMenuByPid(SarFileSplitMenuEO sarMenuEO) throws Exception {
|
|
||||||
return Result.OK(sarFileSplitMenuEOService.judgequeryMenuByPid(sarMenuEO));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款目录-复制节点包括子节点")
|
|
||||||
@PostMapping("/copyMenu")
|
|
||||||
public Result copyMenu(@RequestBody SarFileSplitMenuEO sarMenuEO) throws Exception {
|
|
||||||
int result = sarFileSplitMenuEOService.copyMenu(sarMenuEO);
|
|
||||||
return Result.OK("复制成功",sarMenuEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款目录-复制节点不包括子节点")
|
|
||||||
@PostMapping("/copyMenuNotChildren")
|
|
||||||
public Result copyMenuNotChildren(@RequestBody Map<String, Object> itemsMap) throws Exception {
|
|
||||||
int result = sarFileSplitMenuEOService.copyMenuNotChildren(itemsMap);
|
|
||||||
return Result.OK("复制成功",itemsMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "文档拆分条款目录-批量复制节点不包括子节点Y")
|
|
||||||
@GetMapping("/copyMenuNotChildrenall")
|
|
||||||
public Result<List<Map<String, Object>>> copyMenuNotChildrenall(@RequestParam(value = "ids",required = false) String ids,
|
|
||||||
@RequestParam(value = "menuids",required = false) String menuids,
|
|
||||||
@RequestParam(value = "infoIds",required = false) String infoIds) throws Exception {
|
|
||||||
/*int result = sarFileSplitMenuEOService.copyMenuNotChildren(sarFileSplitItemsEO);
|
|
||||||
return Result.OK("0","复制成功",sarFileSplitItemsEO);*/
|
|
||||||
String idsl[] = ids.split(",");
|
|
||||||
List<String> idlist =new ArrayList<>();
|
|
||||||
idlist = Arrays.asList(idsl);
|
|
||||||
|
|
||||||
String menuidss[] = menuids.split(",");
|
|
||||||
List<String> menuidslist =new ArrayList<>();
|
|
||||||
menuidslist = Arrays.asList(menuidss);
|
|
||||||
|
|
||||||
String infoIdss[] = infoIds.split(",");
|
|
||||||
List<String> infoIdslist =new ArrayList<>();
|
|
||||||
infoIdslist = Arrays.asList(infoIdss);
|
|
||||||
List<Map<String, Object>> itemsMapList = new ArrayList<>();
|
|
||||||
for(int i=0;i<idlist.size();i++){
|
|
||||||
Map<String, Object> itemsMap = new HashMap<>();
|
|
||||||
itemsMap.put("id", idlist.get(i));
|
|
||||||
itemsMap.put("menu_id", menuidslist.get(i));
|
|
||||||
itemsMap.put("info_id", infoIdslist.get(i));
|
|
||||||
int result = sarFileSplitMenuEOService.copyMenuNotChildren(itemsMap);
|
|
||||||
// 同时复制目录下的条款
|
|
||||||
itemsMap = fileSplitItemsEOService.selectByPrimaryKey(idlist.get(i));
|
|
||||||
itemsMapList.add(itemsMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Result.OK("复制成功",itemsMapList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
-85
@@ -1,85 +0,0 @@
|
|||||||
package com.jero.modules.split.entity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <b>功能:</b>MSG_BROWSE_INFO MsgBrowseInfoEOEntity<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2018-09-03 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
public class DrageMenuEO{
|
|
||||||
|
|
||||||
private String menuId;
|
|
||||||
private String menuParentId;
|
|
||||||
private Long menuDisplay;
|
|
||||||
private String targetMenuId;
|
|
||||||
private String targetParentId;
|
|
||||||
private Long targetMenuDisplay;
|
|
||||||
private String infoId;
|
|
||||||
private String moveType;
|
|
||||||
|
|
||||||
public String getMenuId() {
|
|
||||||
return menuId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMenuId(String menuId) {
|
|
||||||
this.menuId = menuId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMenuParentId() {
|
|
||||||
return menuParentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMenuParentId(String menuParentId) {
|
|
||||||
this.menuParentId = menuParentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getTargetMenuId() {
|
|
||||||
return targetMenuId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTargetMenuId(String targetMenuId) {
|
|
||||||
this.targetMenuId = targetMenuId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTargetParentId() {
|
|
||||||
return targetParentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTargetParentId(String targetParentId) {
|
|
||||||
this.targetParentId = targetParentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getMenuDisplay() {
|
|
||||||
return menuDisplay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMenuDisplay(Long menuDisplay) {
|
|
||||||
this.menuDisplay = menuDisplay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getTargetMenuDisplay() {
|
|
||||||
return targetMenuDisplay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTargetMenuDisplay(Long targetMenuDisplay) {
|
|
||||||
this.targetMenuDisplay = targetMenuDisplay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfoId() {
|
|
||||||
return infoId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInfoId(String infoId) {
|
|
||||||
this.infoId = infoId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMoveType() {
|
|
||||||
return moveType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMoveType(String moveType) {
|
|
||||||
this.moveType = moveType;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+2
-14
@@ -22,17 +22,9 @@ public class SarFileSplitItemsEO implements Serializable {
|
|||||||
private String itemsNum;
|
private String itemsNum;
|
||||||
private String itemsName;
|
private String itemsName;
|
||||||
private String itermsConditions;
|
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;
|
|
||||||
private String menuId;
|
private String menuId;
|
||||||
private String functionTerritory;
|
private String informationCategory; // 信息类别
|
||||||
// private String applyArctic;
|
private String technologyTerritory; // 技术领域
|
||||||
// private String referenceStand;
|
|
||||||
private String informationCategory;
|
|
||||||
// private String relevanceFile;
|
|
||||||
private String technologyTerritory;
|
|
||||||
private Integer validFlag;
|
private Integer validFlag;
|
||||||
private String creationUser;
|
private String creationUser;
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@@ -46,10 +38,6 @@ public class SarFileSplitItemsEO implements Serializable {
|
|||||||
// 前台删除的VAL表条目内容ID
|
// 前台删除的VAL表条目内容ID
|
||||||
private String delItemIds;
|
private String delItemIds;
|
||||||
private String sMenuId;
|
private String sMenuId;
|
||||||
//特殊参数要求
|
|
||||||
private List<SarFileSplitItemsParamsEO> paramsList;
|
|
||||||
// private String relevanceFileAttid;
|
|
||||||
// private String issForce;
|
|
||||||
|
|
||||||
List<String> itemsCondi;
|
List<String> itemsCondi;
|
||||||
|
|
||||||
|
|||||||
-33
@@ -1,33 +0,0 @@
|
|||||||
package com.jero.modules.split.entity;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_FILE SarFileSplitItemsFileEOEntity<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-03-30 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class SarFileSplitItemsFileEO implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
private String id;
|
|
||||||
private String standId;
|
|
||||||
private String resId;
|
|
||||||
private String attId;
|
|
||||||
private String useModel;
|
|
||||||
private Integer validFlag;
|
|
||||||
@org.springframework.format.annotation.DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date creationTime;
|
|
||||||
@org.springframework.format.annotation.DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date modifyTime;
|
|
||||||
private Long pageCount;
|
|
||||||
private List<String> idlist = new ArrayList<>();
|
|
||||||
private String fileOldName;
|
|
||||||
}
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
package com.jero.modules.split.entity;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_PARAMS SarFileSplitItemsParamsEOEntity<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-02-04 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class SarFileSplitItemsParamsEO implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
private String id;
|
|
||||||
private String itemId;
|
|
||||||
private String description;
|
|
||||||
private String figure;
|
|
||||||
private Integer validFlag;
|
|
||||||
@org.springframework.format.annotation.DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date creationTime;
|
|
||||||
@org.springframework.format.annotation.DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date modifyTime;
|
|
||||||
private String infoId;
|
|
||||||
}
|
|
||||||
-32
@@ -1,32 +0,0 @@
|
|||||||
package com.jero.modules.split.entity;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_RES SarFileSplitItemsResEOEntity<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-03-30 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class SarFileSplitItemsResEO implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
private String id;
|
|
||||||
private String standId;
|
|
||||||
private String standFileClassify;
|
|
||||||
private String fileName;
|
|
||||||
private String fileSuffix;
|
|
||||||
private Integer validFlag;
|
|
||||||
@org.springframework.format.annotation.DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date creationTime;
|
|
||||||
@org.springframework.format.annotation.DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date modifyTime;
|
|
||||||
|
|
||||||
private List<String> idlist = new ArrayList<>();
|
|
||||||
}
|
|
||||||
+1
@@ -64,4 +64,5 @@ public interface FileSplitItemsEOMapper extends BaseMapper<SarFileSplitItemsEO>
|
|||||||
|
|
||||||
int deleteByMenuIds(@Param("idList") List<String> idList);
|
int deleteByMenuIds(@Param("idList") List<String> idList);
|
||||||
|
|
||||||
|
int insertForeach(List<SarFileSplitItemsEO> list);
|
||||||
}
|
}
|
||||||
|
|||||||
-57
@@ -1,57 +0,0 @@
|
|||||||
package com.jero.modules.split.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.jero.modules.split.dto.FileSplitItemsExportDto;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsEO;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsEOPage;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS SarFileSplitItemsEODao<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-01-03 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
public interface SarFileSplitItemsEOMapper extends BaseMapper<SarFileSplitItemsEO> {
|
|
||||||
|
|
||||||
int insertForeach(List<SarFileSplitItemsEO> list);
|
|
||||||
|
|
||||||
int deleteByIds(SarFileSplitItemsEO sarFileSplitItemsEO);
|
|
||||||
|
|
||||||
int deleteByItemsIds(SarFileSplitItemsEO sarFileSplitItemsEO);
|
|
||||||
|
|
||||||
int deleteByMenuIds(@Param("idList") List<String> idList);
|
|
||||||
|
|
||||||
int deleteByItemsIdList(@Param("idList") List<String> idList);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsEO> queryItemsByMenuId(@Param("menuId") String menuId);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsEO> queryByItemsIds(@Param("idList") List<String> idList);
|
|
||||||
|
|
||||||
List<FileSplitItemsExportDto> queryByOrdersForExport(SarFileSplitItemsEOPage page);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsEO> queryByList2(SarFileSplitItemsEOPage page);
|
|
||||||
|
|
||||||
|
|
||||||
int insert(SarFileSplitItemsEO SarFileSplitItemsEO);
|
|
||||||
|
|
||||||
int insertSelective(SarFileSplitItemsEO SarFileSplitItemsEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(SarFileSplitItemsEO SarFileSplitItemsEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarFileSplitItemsEO SarFileSplitItemsEO);
|
|
||||||
|
|
||||||
SarFileSplitItemsEO selectByPrimaryKey(String value);
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(String value);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsEO> queryByList(SarFileSplitItemsEOPage page);
|
|
||||||
|
|
||||||
int queryByCount(SarFileSplitItemsEOPage page);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsEO> queryByPage(SarFileSplitItemsEOPage page);
|
|
||||||
}
|
|
||||||
-46
@@ -1,46 +0,0 @@
|
|||||||
package com.jero.modules.split.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsFileEO;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsFileEOPage;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_FILE SarFileSplitItemsFileEODao<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-03-30 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
public interface SarFileSplitItemsFileEOMapper extends BaseMapper<SarFileSplitItemsFileEO> {
|
|
||||||
|
|
||||||
List<SarFileSplitItemsFileEO> selectFileByItemsIdAndId(SarFileSplitItemsFileEO sarStandFileEO);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsFileEO> selectFileMsgByAttId(String attId);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsFileEO> selectFileByAttId(String attId);
|
|
||||||
|
|
||||||
int deleteByItemIds(@Param("idList") List<String> idList);
|
|
||||||
|
|
||||||
|
|
||||||
int insert(SarFileSplitItemsFileEO sarFileSplitItemsFileEO);
|
|
||||||
|
|
||||||
int insertSelective(SarFileSplitItemsFileEO sarFileSplitItemsFileEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(SarFileSplitItemsFileEO sarFileSplitItemsFileEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarFileSplitItemsFileEO sarFileSplitItemsFileEO);
|
|
||||||
|
|
||||||
SarFileSplitItemsFileEO selectByPrimaryKey(String value);
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(String value);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsFileEO> queryByList(SarFileSplitItemsFileEOPage page);
|
|
||||||
|
|
||||||
int queryByCount(SarFileSplitItemsFileEOPage page);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsFileEO> queryByPage(SarFileSplitItemsFileEOPage page);
|
|
||||||
}
|
|
||||||
-47
@@ -1,47 +0,0 @@
|
|||||||
package com.jero.modules.split.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsParamsEO;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsParamsEOPage;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_PARAMS SarFileSplitItemsParamsEODao<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-02-04 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
public interface SarFileSplitItemsParamsMapper extends BaseMapper<SarFileSplitItemsParamsEO> {
|
|
||||||
|
|
||||||
int deleteByItemIds(@Param("idList") List<String> idList);
|
|
||||||
|
|
||||||
int deleteByInfoIds(@Param("idList") List<String> idList);
|
|
||||||
|
|
||||||
int insertForeach(List<SarFileSplitItemsParamsEO> list);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsParamsEO> queryItemsParamsByMenuId(@Param("idList") List<String> idList);
|
|
||||||
|
|
||||||
|
|
||||||
int insert(SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO);
|
|
||||||
|
|
||||||
int insertSelective(SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO);
|
|
||||||
|
|
||||||
SarFileSplitItemsParamsEO selectByPrimaryKey(String value);
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(String value);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsParamsEO> queryByList(SarFileSplitItemsParamsEOPage page);
|
|
||||||
|
|
||||||
int queryByCount(SarFileSplitItemsParamsEOPage page);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsParamsEO> queryByPage(SarFileSplitItemsParamsEOPage page);
|
|
||||||
|
|
||||||
}
|
|
||||||
-42
@@ -1,42 +0,0 @@
|
|||||||
package com.jero.modules.split.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsResEO;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsResEOPage;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_RES SarFileSplitItemsResEODao<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-03-30 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
public interface SarFileSplitItemsResEOMapper extends BaseMapper<SarFileSplitItemsResEO> {
|
|
||||||
|
|
||||||
List<SarFileSplitItemsResEO> selectByItemsIdAndId(SarFileSplitItemsResEO stand);
|
|
||||||
|
|
||||||
int deleteByItemIds(@Param("idList") List<String> idList);
|
|
||||||
|
|
||||||
int insert(SarFileSplitItemsResEO sarFileSplitItemsResEO);
|
|
||||||
|
|
||||||
int insertSelective(SarFileSplitItemsResEO sarFileSplitItemsResEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(SarFileSplitItemsResEO sarFileSplitItemsResEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarFileSplitItemsResEO sarFileSplitItemsResEO);
|
|
||||||
|
|
||||||
SarFileSplitItemsResEO selectByPrimaryKey(String value);
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(String value);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsResEO> queryByList(SarFileSplitItemsResEOPage page);
|
|
||||||
|
|
||||||
int queryByCount(SarFileSplitItemsResEOPage page);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsResEO> queryByPage(SarFileSplitItemsResEOPage page);
|
|
||||||
|
|
||||||
}
|
|
||||||
-50
@@ -1,50 +0,0 @@
|
|||||||
package com.jero.modules.split.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsTableEO;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsTableEOPage;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_TABLE SarFileSplitItemsTableEODao<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-01-17 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
public interface SarFileSplitItemsTableEOMapper extends BaseMapper<SarFileSplitItemsTableEO> {
|
|
||||||
|
|
||||||
int insertForeach(List<SarFileSplitItemsTableEO> list);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsTableEO> queryByRowNum(SarFileSplitItemsTableEOPage page);
|
|
||||||
|
|
||||||
int deleteByitemValIds(@Param("idList") List<String> idList);
|
|
||||||
|
|
||||||
int deleteTableByMenuIds(@Param("idList") List<String> idList);
|
|
||||||
|
|
||||||
int deleteByitemIds(@Param("idList") List<String> idList);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsTableEO> queryItemsTableByMenuId(@Param("idList") List<String> idList);
|
|
||||||
|
|
||||||
|
|
||||||
int insert(SarFileSplitItemsTableEO sarFileSplitItemsTableEO);
|
|
||||||
|
|
||||||
int insertSelective(SarFileSplitItemsTableEO sarFileSplitItemsTableEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(SarFileSplitItemsTableEO sarFileSplitItemsTableEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarFileSplitItemsTableEO sarFileSplitItemsTableEO);
|
|
||||||
|
|
||||||
SarFileSplitItemsTableEO selectByPrimaryKey(String value);
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(String value);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsTableEO> queryByList(SarFileSplitItemsTableEOPage page);
|
|
||||||
|
|
||||||
int queryByCount(SarFileSplitItemsTableEOPage page);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsTableEO> queryByPage(SarFileSplitItemsTableEOPage page);
|
|
||||||
}
|
|
||||||
+19
@@ -99,4 +99,23 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<!-- 批量插入接口 -->
|
||||||
|
<insert id="insertForeach" parameterType="java.util.List">
|
||||||
|
|
||||||
|
insert into sar_file_split_items
|
||||||
|
(id, info_id, items_num, items_name, menu_id,
|
||||||
|
creation_user, creation_time, modify_time,
|
||||||
|
modify_user, iterms_conditions)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" index="index" separator=",">(
|
||||||
|
#{item.id, jdbcType=VARCHAR}, #{item.infoId, jdbcType=VARCHAR}, #{item.itemsNum, jdbcType=VARCHAR},
|
||||||
|
#{item.itemsName, jdbcType=VARCHAR},
|
||||||
|
#{item.menuId, jdbcType=VARCHAR},
|
||||||
|
#{item.creationUser, jdbcType=VARCHAR},
|
||||||
|
#{item.creationTime, jdbcType=TIMESTAMP}, #{item.modifyTime, jdbcType=TIMESTAMP},
|
||||||
|
#{item.modifyUser, jdbcType=VARCHAR}, #{item.itermsConditions, jdbcType=CLOB}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
-471
@@ -1,471 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.jero.modules.split.mapper.SarFileSplitItemsEOMapper" >
|
|
||||||
<!-- Result Map-->
|
|
||||||
<resultMap id="BaseResultMap" type="com.jero.modules.split.entity.SarFileSplitItemsEO" >
|
|
||||||
<id column="id" property="id" />
|
|
||||||
<result column="info_id" property="infoId" />
|
|
||||||
<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="menu_id" property="menuId" />
|
|
||||||
<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" />-->
|
|
||||||
</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="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_0329 table all fields -->
|
|
||||||
<sql id="Base_Column_List" >
|
|
||||||
sar_file_split_items_0329.id, sar_file_split_items_0329.info_id, sar_file_split_items_0329.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_0329.technology_territory, sar_file_split_items_0329.valid_flag, sar_file_split_items_0329.creation_user, sar_file_split_items_0329.creation_time, sar_file_split_items_0329.modify_time, sar_file_split_items_0329.modify_user,sar_file_split_items_0329.iss_force
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 查询条件 -->
|
|
||||||
<sql id="Base_Where_Clause">
|
|
||||||
where 1=1
|
|
||||||
<trim suffixOverrides="," >
|
|
||||||
<if test="id != null" >
|
|
||||||
and sar_file_split_items_0329.id ${idOperator} #{id}
|
|
||||||
</if>
|
|
||||||
<if test="infoId != null" >
|
|
||||||
and sar_file_split_items_0329.info_id ${infoIdOperator} #{infoId}
|
|
||||||
</if>
|
|
||||||
<if test="itemsNum != null" >
|
|
||||||
and sar_file_split_items_0329.items_num ${itemsNumOperator} #{itemsNum}
|
|
||||||
</if>
|
|
||||||
<if test="itemsName != null" >
|
|
||||||
and sar_file_split_items_0329.items_name ${itemsNameOperator} #{itemsName}
|
|
||||||
</if>
|
|
||||||
<if test="itermsConditions != null" >
|
|
||||||
and sar_file_split_items_0329.iterms_conditions ${itermsConditionsOperator} #{itermsConditions}
|
|
||||||
</if>
|
|
||||||
<if test="newcarPutTime != null" >
|
|
||||||
and sar_file_split_items_0329.newcar_put_time ${newcarPutTimeOperator} #{newcarPutTime}
|
|
||||||
</if>
|
|
||||||
<if test="newcarPutTime1 != null" >
|
|
||||||
and sar_file_split_items_0329.newcar_put_time >= #{newcarPutTime1}
|
|
||||||
</if>
|
|
||||||
<if test="newcarPutTime2 != null" >
|
|
||||||
and sar_file_split_items_0329.newcar_put_time <= #{newcarPutTime2}
|
|
||||||
</if>
|
|
||||||
<if test="productPutTime != null" >
|
|
||||||
and sar_file_split_items_0329.product_put_time ${productPutTimeOperator} #{productPutTime}
|
|
||||||
</if>
|
|
||||||
<if test="productPutTime1 != null" >
|
|
||||||
and sar_file_split_items_0329.product_put_time >= #{productPutTime1}
|
|
||||||
</if>
|
|
||||||
<if test="productPutTime2 != null" >
|
|
||||||
and sar_file_split_items_0329.product_put_time <= #{productPutTime2}
|
|
||||||
</if>
|
|
||||||
<if test="sMenuId != null" >
|
|
||||||
and menu_id = #{sMenuId}
|
|
||||||
</if>
|
|
||||||
<if test="functionTerritory != null" >
|
|
||||||
and function_territory ${functionTerritoryOperator} #{functionTerritory}
|
|
||||||
</if>
|
|
||||||
<if test="applyArctic != null" >
|
|
||||||
and apply_arctic ${applyArcticOperator} #{applyArctic}
|
|
||||||
</if>
|
|
||||||
<if test="referenceStand != null" >
|
|
||||||
and reference_stand ${referenceStandOperator} #{referenceStand}
|
|
||||||
</if>
|
|
||||||
<if test="informationCategory != null" >
|
|
||||||
and information_category ${informationCategoryOperator} #{informationCategory}
|
|
||||||
</if>
|
|
||||||
<if test="relevanceFile != null" >
|
|
||||||
and relevance_file ${relevanceFileOperator} #{relevanceFile}
|
|
||||||
</if>
|
|
||||||
<if test="technologyTerritory != null" >
|
|
||||||
and sar_file_split_items_0329.technology_territory ${technologyTerritoryOperator} #{technologyTerritory}
|
|
||||||
</if>
|
|
||||||
<if test="validFlag != null" >
|
|
||||||
and sar_file_split_items_0329.valid_flag ${validFlagOperator} #{validFlag}
|
|
||||||
</if>
|
|
||||||
<if test="creationUser != null" >
|
|
||||||
and sar_file_split_items_0329.creation_user ${creationUserOperator} #{creationUser}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime != null" >
|
|
||||||
and sar_file_split_items_0329.creation_time ${creationTimeOperator} #{creationTime}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime1 != null" >
|
|
||||||
and sar_file_split_items_0329.creation_time >= #{creationTime1}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime2 != null" >
|
|
||||||
and sar_file_split_items_0329.creation_time <= #{creationTime2}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime != null" >
|
|
||||||
and sar_file_split_items_0329.modify_time ${modifyTimeOperator} #{modifyTime}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime1 != null" >
|
|
||||||
and sar_file_split_items_0329.modify_time >= #{modifyTime1}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime2 != null" >
|
|
||||||
and sar_file_split_items_0329.modify_time <= #{modifyTime2}
|
|
||||||
</if>
|
|
||||||
<if test="modifyUser != null" >
|
|
||||||
and sar_file_split_items_0329.modify_user ${modifyUserOperator} #{modifyUser}
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 插入记录 -->
|
|
||||||
<insert id="insert" parameterType="com.jero.modules.split.entity.SarFileSplitItemsEO" >
|
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
||||||
SELECT SEQ_sar_file_split_items_0329.NEXTVAL FROM DUAL
|
|
||||||
</selectKey> -->
|
|
||||||
insert into sar_file_split_items_0329(<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}, #{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>
|
|
||||||
|
|
||||||
<!-- 动态插入记录 主键是序列 -->
|
|
||||||
<insert id="insertSelective" parameterType="com.jero.modules.split.entity.SarFileSplitItemsEO" >
|
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
||||||
SELECT SEQ_sar_file_split_items_0329.NEXTVAL FROM DUAL
|
|
||||||
</selectKey> -->
|
|
||||||
insert into sar_file_split_items_0329
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="id != null" >id,</if>
|
|
||||||
<if test="infoId != null" >info_id,</if>
|
|
||||||
<if test="itemsNum != null" >items_num,</if>
|
|
||||||
<if test="itemsName != null" >items_name,</if>
|
|
||||||
<if test="itermsConditions != null" >iterms_conditions,</if>
|
|
||||||
<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="functionTerritory != null" >function_territory,</if>
|
|
||||||
<if test="applyArctic != null" >apply_arctic,</if>
|
|
||||||
<if test="referenceStand != null" >reference_stand,</if>
|
|
||||||
<if test="informationCategory != null" >information_category,</if>
|
|
||||||
<if test="relevanceFile != null" >relevance_file,</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>
|
|
||||||
<if test="modifyTime != null" >modify_time,</if>
|
|
||||||
<if test="modifyUser != null" >modify_user,</if>
|
|
||||||
<if test="issForce != null" >iss_force,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="infoId != null" >#{infoId, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="itemsNum != null" >#{itemsNum, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="itemsName != null" >#{itemsName, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="itermsConditions != null" >#{itermsConditions, jdbcType=CLOB},</if>
|
|
||||||
<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="functionTerritory != null" >#{functionTerritory, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="applyArctic != null" >#{applyArctic, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="referenceStand != null" >#{referenceStand, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="informationCategory != null" >#{informationCategory, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="relevanceFile != null" >#{relevanceFile, 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>
|
|
||||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
|
||||||
<if test="modifyUser != null" >#{modifyUser, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="issForce != null" >#{issForce, jdbcType=INTEGER},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<!-- 根据pk,修改记录-->
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.jero.modules.split.entity.SarFileSplitItemsEO" >
|
|
||||||
update sar_file_split_items_0329
|
|
||||||
set info_id = #{infoId},
|
|
||||||
items_num = #{itemsNum},
|
|
||||||
items_name = #{itemsName},
|
|
||||||
iterms_conditions = #{itermsConditions},
|
|
||||||
newcar_put_time = #{newcarPutTime},
|
|
||||||
product_put_time = #{productPutTime},
|
|
||||||
menu_id = #{menuId},
|
|
||||||
function_territory = #{functionTerritory},
|
|
||||||
apply_arctic = #{applyArctic},
|
|
||||||
reference_stand = #{referenceStand},
|
|
||||||
information_category = #{informationCategory},
|
|
||||||
relevance_file = #{relevanceFile},
|
|
||||||
technology_territory = #{technologyTerritory},
|
|
||||||
valid_flag = #{validFlag},
|
|
||||||
creation_user = #{creationUser},
|
|
||||||
creation_time = #{creationTime},
|
|
||||||
modify_time = #{modifyTime},
|
|
||||||
modify_user = #{modifyUser}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 修改记录,只修改只不为空的字段 -->
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.jero.modules.split.entity.SarFileSplitItemsEO" >
|
|
||||||
update sar_file_split_items_0329
|
|
||||||
<set >
|
|
||||||
<if test="infoId != null" >
|
|
||||||
info_id = #{infoId},
|
|
||||||
</if>
|
|
||||||
<if test="itemsNum != null" >
|
|
||||||
items_num = #{itemsNum},
|
|
||||||
</if>
|
|
||||||
<if test="itemsName != null" >
|
|
||||||
items_name = #{itemsName},
|
|
||||||
</if>
|
|
||||||
<if test="itermsConditions != null" >
|
|
||||||
iterms_conditions = #{itermsConditions},
|
|
||||||
</if>
|
|
||||||
<if test="newcarPutTime != null" >
|
|
||||||
newcar_put_time = #{newcarPutTime},
|
|
||||||
</if>
|
|
||||||
<if test="newcarPutTime == null" >
|
|
||||||
newcar_put_time = null,
|
|
||||||
</if>
|
|
||||||
<if test="productPutTime != null" >
|
|
||||||
product_put_time = #{productPutTime},
|
|
||||||
</if>
|
|
||||||
<if test="productPutTime == null" >
|
|
||||||
product_put_time = null,
|
|
||||||
</if>
|
|
||||||
<if test="menuId != null" >
|
|
||||||
menu_id = #{menuId},
|
|
||||||
</if>
|
|
||||||
<if test="functionTerritory != null" >
|
|
||||||
function_territory = #{functionTerritory},
|
|
||||||
</if>
|
|
||||||
<if test="applyArctic != null" >
|
|
||||||
apply_arctic = #{applyArctic},
|
|
||||||
</if>
|
|
||||||
<if test="referenceStand != null" >
|
|
||||||
reference_stand = #{referenceStand},
|
|
||||||
</if>
|
|
||||||
<if test="informationCategory != null" >
|
|
||||||
information_category = #{informationCategory},
|
|
||||||
</if>
|
|
||||||
<if test="relevanceFile != null" >
|
|
||||||
relevance_file = #{relevanceFile},
|
|
||||||
</if>
|
|
||||||
<if test="technologyTerritory != null" >
|
|
||||||
technology_territory = #{technologyTerritory},
|
|
||||||
</if>
|
|
||||||
<if test="validFlag != null" >
|
|
||||||
valid_flag = #{validFlag},
|
|
||||||
</if>
|
|
||||||
<if test="creationUser != null" >
|
|
||||||
creation_user = #{creationUser},
|
|
||||||
</if>
|
|
||||||
<if test="creationTime != null" >
|
|
||||||
creation_time = #{creationTime},
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime != null" >
|
|
||||||
modify_time = #{modifyTime},
|
|
||||||
</if>
|
|
||||||
<if test="modifyUser != null" >
|
|
||||||
modify_user = #{modifyUser},
|
|
||||||
</if>
|
|
||||||
<if test="issForce != null" >
|
|
||||||
iss_force = #{issForce},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 根据id查询 sar_file_split_items_0329 -->
|
|
||||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
||||||
select <include refid="Base_Column_List" />
|
|
||||||
from sar_file_split_items_0329
|
|
||||||
where id = #{value}
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 删除记录 -->
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
||||||
delete from sar_file_split_items_0329
|
|
||||||
where id = #{value}
|
|
||||||
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<!-- sar_file_split_items_0329 列表总数-->
|
|
||||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.jero.modules.split.common.BasePage">
|
|
||||||
select count(1) from sar_file_split_items_0329
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
<if test="menuId != null">
|
|
||||||
and sar_file_split_items_0329.MENU_ID in (
|
|
||||||
SELECT m.id
|
|
||||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querySplitMenuChildren (#{menuId})) AS pids ) t
|
|
||||||
WHERE
|
|
||||||
FIND_IN_SET( m.id, t.pids )
|
|
||||||
AND valid_flag = '0'
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询sar_file_split_items_0329列表 -->
|
|
||||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.jero.modules.split.page.SarFileSplitItemsEOPage">
|
|
||||||
select tmp_tb.* from
|
|
||||||
(select <include refid="Base_Column_List" /> from sar_file_split_items_0329
|
|
||||||
left join SAR_FILE_SPLIT_MENU on sar_file_split_items_0329.MENU_ID = SAR_FILE_SPLIT_MENU.id
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
<if test="menuId != null">
|
|
||||||
and sar_file_split_items_0329.MENU_ID in (
|
|
||||||
SELECT m.id
|
|
||||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querySplitMenuChildren (#{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_0329 left join SAR_FILE_SPLIT_MENU on sar_file_split_items_0329.MENU_ID = SAR_FILE_SPLIT_MENU.id
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
<if test="menuId != null">
|
|
||||||
and sar_file_split_items_0329.MENU_ID in (
|
|
||||||
SELECT m.id
|
|
||||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querySplitMenuChildren (#{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_0329
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
|
||||||
${pager.orderCondition}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 批量插入接口 -->
|
|
||||||
<insert id="insertForeach" parameterType="java.util.List">
|
|
||||||
|
|
||||||
insert into sar_file_split_items
|
|
||||||
(id, info_id, items_num, items_name, menu_id, function_territory,
|
|
||||||
information_category, technology_territory,
|
|
||||||
creation_user, creation_time, modify_time,
|
|
||||||
modify_user, iterms_conditions)
|
|
||||||
values
|
|
||||||
<foreach collection="list" item="item" index="index" separator=",">(
|
|
||||||
#{item.id, jdbcType=VARCHAR}, #{item.infoId, jdbcType=VARCHAR}, #{item.itemsNum, jdbcType=VARCHAR},
|
|
||||||
#{item.itemsName, jdbcType=VARCHAR},
|
|
||||||
#{item.menuId, jdbcType=VARCHAR}, #{item.functionTerritory, jdbcType=VARCHAR},
|
|
||||||
#{item.informationCategory, jdbcType=VARCHAR}, #{item.technologyTerritory, jdbcType=VARCHAR},
|
|
||||||
#{item.creationUser, jdbcType=VARCHAR},
|
|
||||||
#{item.creationTime, jdbcType=TIMESTAMP}, #{item.modifyTime, jdbcType=TIMESTAMP},
|
|
||||||
#{item.modifyUser, jdbcType=VARCHAR}, #{item.itermsConditions, jdbcType=CLOB}
|
|
||||||
)
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<delete id="deleteByIds" parameterType="com.jero.modules.split.entity.SarFileSplitItemsEO">
|
|
||||||
delete from sar_file_split_items_0329
|
|
||||||
where info_id in
|
|
||||||
<foreach collection="infoIdList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteByItemsIds" parameterType="com.jero.modules.split.entity.SarFileSplitItemsEO">
|
|
||||||
delete from sar_file_split_items_0329
|
|
||||||
where id in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteByMenuIds" parameterType="java.util.List">
|
|
||||||
delete from sar_file_split_items_0329
|
|
||||||
where menu_id in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<!-- 通过menuid 查询目录下所有的条目 -->
|
|
||||||
<select id="queryItemsByMenuId" resultMap="BaseResultMap" parameterType="com.jero.modules.split.common.BasePage">
|
|
||||||
select <include refid="Base_Column_List"/> from sar_file_split_items_0329
|
|
||||||
left join SAR_FILE_SPLIT_MENU on sar_file_split_items_0329.MENU_ID = SAR_FILE_SPLIT_MENU.id
|
|
||||||
where sar_file_split_items_0329.valid_flag = '0' and menu_id in (
|
|
||||||
SELECT m.id
|
|
||||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querySplitMenuChildren (#{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>
|
|
||||||
|
|
||||||
<select id="queryByItemsIds" resultMap="BaseResultMap" parameterType="com.jero.modules.split.entity.SarFileSplitItemsEO">
|
|
||||||
select menu_id from sar_file_split_items_0329
|
|
||||||
where id in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
group by menu_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteByItemsIdList" parameterType="java.util.List">
|
|
||||||
delete from sar_file_split_items_0329
|
|
||||||
where id in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<select id="queryByOrdersForExport" resultMap="BaseResultMapExport" parameterType="com.jero.modules.split.page.SarFileSplitItemsEOPage">
|
|
||||||
select sar_file_split_items_0329.id,sar_file_split_items_0329.items_num,sar_file_split_items_0329.items_name,
|
|
||||||
newcar_put_time,product_put_time,function_territory,apply_arctic,reference_stand,sar_file_split_items_0329.technology_territory,
|
|
||||||
relevance_file
|
|
||||||
from sar_file_split_items_0329
|
|
||||||
left join SAR_FILE_SPLIT_MENU on sar_file_split_items_0329.MENU_ID = SAR_FILE_SPLIT_MENU.id
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
<if test="menuId != null">
|
|
||||||
and sar_file_split_items_0329.MENU_ID in (
|
|
||||||
SELECT m.id
|
|
||||||
FROM SAR_FILE_SPLIT_MENU m,( SELECT ( @nodes := querySplitMenuChildren (#{menuId})) AS pids ) t
|
|
||||||
WHERE
|
|
||||||
FIND_IN_SET( m.id, t.pids )
|
|
||||||
AND valid_flag = '0'
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
<if test="idList != null">
|
|
||||||
and sar_file_split_items_0329.id in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
|
||||||
${pager.orderCondition}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
-243
@@ -1,243 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.jero.modules.split.mapper.SarFileSplitItemsFileEOMapper" >
|
|
||||||
<!-- Result Map-->
|
|
||||||
<resultMap id="BaseResultMap" type="com.jero.modules.split.entity.SarFileSplitItemsFileEO" >
|
|
||||||
<id column="id" property="id" />
|
|
||||||
<result column="stand_id" property="standId" />
|
|
||||||
<result column="res_id" property="resId" />
|
|
||||||
<result column="att_id" property="attId" />
|
|
||||||
<result column="use_model" property="useModel" />
|
|
||||||
<result column="valid_flag" property="validFlag" />
|
|
||||||
<result column="creation_time" property="creationTime" />
|
|
||||||
<result column="modify_time" property="modifyTime" />
|
|
||||||
<result column="page_count" property="pageCount" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<!-- SAR_FILE_SPLIT_ITEMS_FILE table all fields -->
|
|
||||||
<sql id="Base_Column_List" >
|
|
||||||
id, stand_id, res_id, att_id, use_model, valid_flag, creation_time, modify_time, page_count
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 查询条件 -->
|
|
||||||
<sql id="Base_Where_Clause">
|
|
||||||
where 1=1
|
|
||||||
<trim suffixOverrides="," >
|
|
||||||
<if test="id != null" >
|
|
||||||
and id ${idOperator} #{id}
|
|
||||||
</if>
|
|
||||||
<if test="standId != null" >
|
|
||||||
and stand_id ${standIdOperator} #{standId}
|
|
||||||
</if>
|
|
||||||
<if test="resId != null" >
|
|
||||||
and res_id ${resIdOperator} #{resId}
|
|
||||||
</if>
|
|
||||||
<if test="attId != null" >
|
|
||||||
and att_id ${attIdOperator} #{attId}
|
|
||||||
</if>
|
|
||||||
<if test="useModel != null" >
|
|
||||||
and use_model ${useModelOperator} #{useModel}
|
|
||||||
</if>
|
|
||||||
<if test="validFlag != null" >
|
|
||||||
and valid_flag ${validFlagOperator} #{validFlag}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime != null" >
|
|
||||||
and creation_time ${creationTimeOperator} #{creationTime}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime1 != null" >
|
|
||||||
and creation_time >= #{creationTime1}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime2 != null" >
|
|
||||||
and creation_time <= #{creationTime2}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime != null" >
|
|
||||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime1 != null" >
|
|
||||||
and modify_time >= #{modifyTime1}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime2 != null" >
|
|
||||||
and modify_time <= #{modifyTime2}
|
|
||||||
</if>
|
|
||||||
<if test="pageCount != null" >
|
|
||||||
and page_count ${pageCountOperator} #{pageCount}
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 插入记录 -->
|
|
||||||
<insert id="insert" parameterType="com.jero.modules.split.entity.SarFileSplitItemsFileEO" >
|
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
||||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_FILE.NEXTVAL FROM DUAL
|
|
||||||
</selectKey> -->
|
|
||||||
insert into SAR_FILE_SPLIT_ITEMS_FILE(<include refid="Base_Column_List" />)
|
|
||||||
values (#{id, jdbcType=VARCHAR}, #{standId, jdbcType=VARCHAR}, #{resId, jdbcType=VARCHAR}, #{attId, jdbcType=VARCHAR}, #{useModel, jdbcType=VARCHAR}, #{validFlag, jdbcType=INTEGER}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP}, #{pageCount, jdbcType=VARCHAR})
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<!-- 动态插入记录 主键是序列 -->
|
|
||||||
<insert id="insertSelective" parameterType="com.jero.modules.split.entity.SarFileSplitItemsFileEO" >
|
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
||||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_FILE.NEXTVAL FROM DUAL
|
|
||||||
</selectKey> -->
|
|
||||||
insert into SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="id != null" >id,</if>
|
|
||||||
<if test="standId != null" >stand_id,</if>
|
|
||||||
<if test="resId != null" >res_id,</if>
|
|
||||||
<if test="attId != null" >att_id,</if>
|
|
||||||
<if test="useModel != null" >use_model,</if>
|
|
||||||
<if test="validFlag != null" >valid_flag,</if>
|
|
||||||
<if test="creationTime != null" >creation_time,</if>
|
|
||||||
<if test="modifyTime != null" >modify_time,</if>
|
|
||||||
<if test="pageCount != null" >page_count,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="standId != null" >#{standId, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="resId != null" >#{resId, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="attId != null" >#{attId, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="useModel != null" >#{useModel, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
|
||||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
|
||||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
|
||||||
<if test="pageCount != null" >#{pageCount, jdbcType=VARCHAR},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<!-- 根据pk,修改记录-->
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.jero.modules.split.entity.SarFileSplitItemsFileEO" >
|
|
||||||
update SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
set stand_id = #{standId},
|
|
||||||
res_id = #{resId},
|
|
||||||
att_id = #{attId},
|
|
||||||
use_model = #{useModel},
|
|
||||||
valid_flag = #{validFlag},
|
|
||||||
creation_time = #{creationTime},
|
|
||||||
modify_time = #{modifyTime},
|
|
||||||
page_count = #{pageCount}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 修改记录,只修改只不为空的字段 -->
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.jero.modules.split.entity.SarFileSplitItemsFileEO" >
|
|
||||||
update SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
<set >
|
|
||||||
<if test="standId != null" >
|
|
||||||
stand_id = #{standId},
|
|
||||||
</if>
|
|
||||||
<if test="resId != null" >
|
|
||||||
res_id = #{resId},
|
|
||||||
</if>
|
|
||||||
<if test="attId != null" >
|
|
||||||
att_id = #{attId},
|
|
||||||
</if>
|
|
||||||
<if test="useModel != null" >
|
|
||||||
use_model = #{useModel},
|
|
||||||
</if>
|
|
||||||
<if test="validFlag != null" >
|
|
||||||
valid_flag = #{validFlag},
|
|
||||||
</if>
|
|
||||||
<if test="creationTime != null" >
|
|
||||||
creation_time = #{creationTime},
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime != null" >
|
|
||||||
modify_time = #{modifyTime},
|
|
||||||
</if>
|
|
||||||
<if test="pageCount != null" >
|
|
||||||
page_count = #{pageCount},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 根据id查询 SAR_FILE_SPLIT_ITEMS_FILE -->
|
|
||||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
||||||
select <include refid="Base_Column_List" />
|
|
||||||
from SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
where id = #{value}
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 删除记录 -->
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
||||||
delete from SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
where id = #{value}
|
|
||||||
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<!-- SAR_FILE_SPLIT_ITEMS_FILE 列表总数-->
|
|
||||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.jero.modules.split.common.BasePage">
|
|
||||||
select count(1) from SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询SAR_FILE_SPLIT_ITEMS_FILE列表 -->
|
|
||||||
<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_ITEMS_FILE
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.jero.modules.split.common.BasePage">
|
|
||||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
|
||||||
${pager.orderCondition}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectFileMsgByAttId" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
||||||
select <include refid="Base_Column_List" />
|
|
||||||
from SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
where valid_flag = 0
|
|
||||||
and att_id = #{value}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectFileByItemsIdAndId" resultMap="BaseResultMap" parameterType="com.jero.modules.split.entity.SarFileSplitItemsFileEO">
|
|
||||||
select <include refid="Base_Column_List" />
|
|
||||||
from SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
where valid_flag = 0
|
|
||||||
<if test="standId != null" >
|
|
||||||
and stand_id = #{standId}
|
|
||||||
</if>
|
|
||||||
<if test="idlist != null">
|
|
||||||
and id not in
|
|
||||||
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectFileByAttId" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
||||||
select <include refid="Base_Column_List" />
|
|
||||||
from SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
where valid_flag = 0
|
|
||||||
and stand_id = (
|
|
||||||
select stand_id
|
|
||||||
from SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
where att_id = #{value} and valid_flag = 0 and use_model = 'SOURCE_FILE'
|
|
||||||
)
|
|
||||||
and res_id = (
|
|
||||||
select res_id
|
|
||||||
from SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
where att_id = #{value} and valid_flag = 0 and use_model = 'SOURCE_FILE'
|
|
||||||
)
|
|
||||||
and use_model = 'WEB_FILE'
|
|
||||||
order by modify_time desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteByItemIds" parameterType="java.lang.String">
|
|
||||||
delete from SAR_FILE_SPLIT_ITEMS_FILE
|
|
||||||
where stand_id in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
-219
@@ -1,219 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.jero.modules.split.mapper.SarFileSplitItemsParamsMapper" >
|
|
||||||
<!-- Result Map-->
|
|
||||||
<resultMap id="BaseResultMap" type="com.jero.modules.split.entity.SarFileSplitItemsParamsEO" >
|
|
||||||
<id column="id" property="id" />
|
|
||||||
<result column="item_id" property="itemId" />
|
|
||||||
<result column="description" property="description" />
|
|
||||||
<result column="figure" property="figure" />
|
|
||||||
<result column="valid_flag" property="validFlag" />
|
|
||||||
<result column="creation_time" property="creationTime" />
|
|
||||||
<result column="modify_time" property="modifyTime" />
|
|
||||||
<result column="info_id" property="infoId" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<!-- SAR_FILE_SPLIT_ITEMS_PARAMS table all fields -->
|
|
||||||
<sql id="Base_Column_List" >
|
|
||||||
id, item_id, description, figure, valid_flag, creation_time, modify_time, info_id
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 查询条件 -->
|
|
||||||
<sql id="Base_Where_Clause">
|
|
||||||
where 1=1
|
|
||||||
<trim suffixOverrides="," >
|
|
||||||
<if test="id != null" >
|
|
||||||
and id ${idOperator} #{id}
|
|
||||||
</if>
|
|
||||||
<if test="itemId != null" >
|
|
||||||
and item_id ${itemIdOperator} #{itemId}
|
|
||||||
</if>
|
|
||||||
<if test="description != null" >
|
|
||||||
and description ${descriptionOperator} #{description}
|
|
||||||
</if>
|
|
||||||
<if test="figure != null" >
|
|
||||||
and figure ${figureOperator} #{figure}
|
|
||||||
</if>
|
|
||||||
<if test="validFlag != null" >
|
|
||||||
and valid_flag ${validFlagOperator} #{validFlag}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime != null" >
|
|
||||||
and creation_time ${creationTimeOperator} #{creationTime}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime1 != null" >
|
|
||||||
and creation_time >= #{creationTime1}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime2 != null" >
|
|
||||||
and creation_time <= #{creationTime2}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime != null" >
|
|
||||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime1 != null" >
|
|
||||||
and modify_time >= #{modifyTime1}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime2 != null" >
|
|
||||||
and modify_time <= #{modifyTime2}
|
|
||||||
</if>
|
|
||||||
<if test="infoId != null" >
|
|
||||||
and info_id ${infoIdOperator} #{infoId}
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 插入记录 -->
|
|
||||||
<insert id="insert" parameterType="com.jero.modules.split.entity.SarFileSplitItemsParamsEO" >
|
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
||||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_PARAMS.NEXTVAL FROM DUAL
|
|
||||||
</selectKey> -->
|
|
||||||
insert into SAR_FILE_SPLIT_ITEMS_PARAMS(<include refid="Base_Column_List" />)
|
|
||||||
values (#{id, jdbcType=VARCHAR}, #{itemId, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{figure, jdbcType=VARCHAR}, #{validFlag, jdbcType=INTEGER}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP}, #{infoId, jdbcType=VARCHAR})
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<!-- 动态插入记录 主键是序列 -->
|
|
||||||
<insert id="insertSelective" parameterType="com.jero.modules.split.entity.SarFileSplitItemsParamsEO" >
|
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
||||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_PARAMS.NEXTVAL FROM DUAL
|
|
||||||
</selectKey> -->
|
|
||||||
insert into SAR_FILE_SPLIT_ITEMS_PARAMS
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="id != null" >id,</if>
|
|
||||||
<if test="itemId != null" >item_id,</if>
|
|
||||||
<if test="description != null" >description,</if>
|
|
||||||
<if test="figure != null" >figure,</if>
|
|
||||||
<if test="validFlag != null" >valid_flag,</if>
|
|
||||||
<if test="creationTime != null" >creation_time,</if>
|
|
||||||
<if test="modifyTime != null" >modify_time,</if>
|
|
||||||
<if test="infoId != null" >info_id,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="itemId != null" >#{itemId, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="description != null" >#{description, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="figure != null" >#{figure, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
|
||||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
|
||||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
|
||||||
<if test="infoId != null" >#{infoId, jdbcType=VARCHAR},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<!-- 根据pk,修改记录-->
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.jero.modules.split.entity.SarFileSplitItemsParamsEO" >
|
|
||||||
update SAR_FILE_SPLIT_ITEMS_PARAMS
|
|
||||||
set item_id = #{itemId},
|
|
||||||
description = #{description},
|
|
||||||
figure = #{figure},
|
|
||||||
valid_flag = #{validFlag},
|
|
||||||
creation_time = #{creationTime},
|
|
||||||
modify_time = #{modifyTime},
|
|
||||||
info_id = #{infoId}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 修改记录,只修改只不为空的字段 -->
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.jero.modules.split.entity.SarFileSplitItemsParamsEO" >
|
|
||||||
update SAR_FILE_SPLIT_ITEMS_PARAMS
|
|
||||||
<set >
|
|
||||||
<if test="itemId != null" >
|
|
||||||
item_id = #{itemId},
|
|
||||||
</if>
|
|
||||||
<if test="description != null" >
|
|
||||||
description = #{description},
|
|
||||||
</if>
|
|
||||||
<if test="figure != null" >
|
|
||||||
figure = #{figure},
|
|
||||||
</if>
|
|
||||||
<if test="validFlag != null" >
|
|
||||||
valid_flag = #{validFlag},
|
|
||||||
</if>
|
|
||||||
<if test="creationTime != null" >
|
|
||||||
creation_time = #{creationTime},
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime != null" >
|
|
||||||
modify_time = #{modifyTime},
|
|
||||||
</if>
|
|
||||||
<if test="infoId != null" >
|
|
||||||
info_id = #{infoId},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 根据id查询 SAR_FILE_SPLIT_ITEMS_PARAMS -->
|
|
||||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
||||||
select <include refid="Base_Column_List" />
|
|
||||||
from SAR_FILE_SPLIT_ITEMS_PARAMS
|
|
||||||
where id = #{value}
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 删除记录 -->
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
||||||
delete from SAR_FILE_SPLIT_ITEMS_PARAMS
|
|
||||||
where id = #{value}
|
|
||||||
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<!-- SAR_FILE_SPLIT_ITEMS_PARAMS 列表总数-->
|
|
||||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.jero.modules.split.common.BasePage">
|
|
||||||
select count(1) from SAR_FILE_SPLIT_ITEMS_PARAMS
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询SAR_FILE_SPLIT_ITEMS_PARAMS列表 -->
|
|
||||||
<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_ITEMS_PARAMS
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.jero.modules.split.common.BasePage">
|
|
||||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS_PARAMS
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
|
||||||
${pager.orderCondition}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteByItemIds" parameterType="java.lang.String">
|
|
||||||
delete from SAR_FILE_SPLIT_ITEMS_PARAMS
|
|
||||||
where item_id in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<insert id="insertForeach" parameterType="java.util.List">
|
|
||||||
begin
|
|
||||||
<foreach collection="list" item="item" index="index" separator=";">
|
|
||||||
insert into SAR_FILE_SPLIT_ITEMS_PARAMS(<include refid="Base_Column_List" />)
|
|
||||||
values (#{item.id, jdbcType=VARCHAR}, #{item.itemId, jdbcType=VARCHAR}, #{item.description, jdbcType=VARCHAR}, #{item.figure, jdbcType=VARCHAR}, #{item.validFlag, jdbcType=INTEGER}, #{item.creationTime, jdbcType=TIMESTAMP}, #{item.modifyTime, jdbcType=TIMESTAMP}, #{item.infoId, jdbcType=VARCHAR})
|
|
||||||
</foreach>
|
|
||||||
;end;
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<delete id="deleteByInfoIds" parameterType="java.lang.String">
|
|
||||||
delete from SAR_FILE_SPLIT_ITEMS_PARAMS
|
|
||||||
where info_id in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<!-- 通过menuid 查询目录下所有的条目 -->
|
|
||||||
<select id="queryItemsParamsByMenuId" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
||||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS_PARAMS
|
|
||||||
where valid_flag = '0' and ITEM_ID in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
-209
@@ -1,209 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.jero.modules.split.mapper.SarFileSplitItemsResEOMapper" >
|
|
||||||
<!-- Result Map-->
|
|
||||||
<resultMap id="BaseResultMap" type="com.jero.modules.split.entity.SarFileSplitItemsResEO" >
|
|
||||||
<id column="id" property="id" />
|
|
||||||
<result column="stand_id" property="standId" />
|
|
||||||
<result column="stand_file_classify" property="standFileClassify" />
|
|
||||||
<result column="file_name" property="fileName" />
|
|
||||||
<result column="file_suffix" property="fileSuffix" />
|
|
||||||
<result column="valid_flag" property="validFlag" />
|
|
||||||
<result column="creation_time" property="creationTime" />
|
|
||||||
<result column="modify_time" property="modifyTime" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<!-- SAR_FILE_SPLIT_ITEMS_RES table all fields -->
|
|
||||||
<sql id="Base_Column_List" >
|
|
||||||
id, stand_id, stand_file_classify, file_name, file_suffix, valid_flag, creation_time, modify_time
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 查询条件 -->
|
|
||||||
<sql id="Base_Where_Clause">
|
|
||||||
where 1=1
|
|
||||||
<trim suffixOverrides="," >
|
|
||||||
<if test="id != null" >
|
|
||||||
and id ${idOperator} #{id}
|
|
||||||
</if>
|
|
||||||
<if test="standId != null" >
|
|
||||||
and stand_id ${standIdOperator} #{standId}
|
|
||||||
</if>
|
|
||||||
<if test="standFileClassify != null" >
|
|
||||||
and stand_file_classify ${standFileClassifyOperator} #{standFileClassify}
|
|
||||||
</if>
|
|
||||||
<if test="fileName != null" >
|
|
||||||
and file_name ${fileNameOperator} #{fileName}
|
|
||||||
</if>
|
|
||||||
<if test="fileSuffix != null" >
|
|
||||||
and file_suffix ${fileSuffixOperator} #{fileSuffix}
|
|
||||||
</if>
|
|
||||||
<if test="validFlag != null" >
|
|
||||||
and valid_flag ${validFlagOperator} #{validFlag}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime != null" >
|
|
||||||
and creation_time ${creationTimeOperator} #{creationTime}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime1 != null" >
|
|
||||||
and creation_time >= #{creationTime1}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime2 != null" >
|
|
||||||
and creation_time <= #{creationTime2}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime != null" >
|
|
||||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime1 != null" >
|
|
||||||
and modify_time >= #{modifyTime1}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime2 != null" >
|
|
||||||
and modify_time <= #{modifyTime2}
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 插入记录 -->
|
|
||||||
<insert id="insert" parameterType="com.jero.modules.split.entity.SarFileSplitItemsResEO" >
|
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
||||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_RES.NEXTVAL FROM DUAL
|
|
||||||
</selectKey> -->
|
|
||||||
insert into SAR_FILE_SPLIT_ITEMS_RES(<include refid="Base_Column_List" />)
|
|
||||||
values (#{id, jdbcType=VARCHAR}, #{standId, jdbcType=VARCHAR}, #{standFileClassify, jdbcType=VARCHAR}, #{fileName, jdbcType=VARCHAR}, #{fileSuffix, jdbcType=VARCHAR}, #{validFlag, jdbcType=INTEGER}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP})
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<!-- 动态插入记录 主键是序列 -->
|
|
||||||
<insert id="insertSelective" parameterType="com.jero.modules.split.entity.SarFileSplitItemsResEO" >
|
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
||||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_RES.NEXTVAL FROM DUAL
|
|
||||||
</selectKey> -->
|
|
||||||
insert into SAR_FILE_SPLIT_ITEMS_RES
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="id != null" >id,</if>
|
|
||||||
<if test="standId != null" >stand_id,</if>
|
|
||||||
<if test="standFileClassify != null" >stand_file_classify,</if>
|
|
||||||
<if test="fileName != null" >file_name,</if>
|
|
||||||
<if test="fileSuffix != null" >file_suffix,</if>
|
|
||||||
<if test="validFlag != null" >valid_flag,</if>
|
|
||||||
<if test="creationTime != null" >creation_time,</if>
|
|
||||||
<if test="modifyTime != null" >modify_time,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="standId != null" >#{standId, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="standFileClassify != null" >#{standFileClassify, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="fileName != null" >#{fileName, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="fileSuffix != null" >#{fileSuffix, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
|
||||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
|
||||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<!-- 根据pk,修改记录-->
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.jero.modules.split.entity.SarFileSplitItemsResEO" >
|
|
||||||
update SAR_FILE_SPLIT_ITEMS_RES
|
|
||||||
set stand_id = #{standId},
|
|
||||||
stand_file_classify = #{standFileClassify},
|
|
||||||
file_name = #{fileName},
|
|
||||||
file_suffix = #{fileSuffix},
|
|
||||||
valid_flag = #{validFlag},
|
|
||||||
creation_time = #{creationTime},
|
|
||||||
modify_time = #{modifyTime}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 修改记录,只修改只不为空的字段 -->
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.jero.modules.split.entity.SarFileSplitItemsResEO" >
|
|
||||||
update SAR_FILE_SPLIT_ITEMS_RES
|
|
||||||
<set >
|
|
||||||
<if test="standId != null" >
|
|
||||||
stand_id = #{standId},
|
|
||||||
</if>
|
|
||||||
<if test="standFileClassify != null" >
|
|
||||||
stand_file_classify = #{standFileClassify},
|
|
||||||
</if>
|
|
||||||
<if test="fileName != null" >
|
|
||||||
file_name = #{fileName},
|
|
||||||
</if>
|
|
||||||
<if test="fileSuffix != null" >
|
|
||||||
file_suffix = #{fileSuffix},
|
|
||||||
</if>
|
|
||||||
<if test="validFlag != null" >
|
|
||||||
valid_flag = #{validFlag},
|
|
||||||
</if>
|
|
||||||
<if test="creationTime != null" >
|
|
||||||
creation_time = #{creationTime},
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime != null" >
|
|
||||||
modify_time = #{modifyTime},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 根据id查询 SAR_FILE_SPLIT_ITEMS_RES -->
|
|
||||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
||||||
select <include refid="Base_Column_List" />
|
|
||||||
from SAR_FILE_SPLIT_ITEMS_RES
|
|
||||||
where id = #{value}
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 删除记录 -->
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
||||||
delete from SAR_FILE_SPLIT_ITEMS_RES
|
|
||||||
where id = #{value}
|
|
||||||
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<!-- SAR_FILE_SPLIT_ITEMS_RES 列表总数-->
|
|
||||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.jero.modules.split.common.BasePage">
|
|
||||||
select count(1) from SAR_FILE_SPLIT_ITEMS_RES
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询SAR_FILE_SPLIT_ITEMS_RES列表 -->
|
|
||||||
<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_ITEMS_RES
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.jero.modules.split.common.BasePage">
|
|
||||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS_RES
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
|
||||||
${pager.orderCondition}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectByItemsIdAndId" resultMap="BaseResultMap" parameterType="com.jero.modules.split.entity.SarFileSplitItemsResEO">
|
|
||||||
select <include refid="Base_Column_List" />
|
|
||||||
from SAR_FILE_SPLIT_ITEMS_RES
|
|
||||||
where valid_flag = 0
|
|
||||||
<if test="standId != null" >
|
|
||||||
and stand_id = #{standId}
|
|
||||||
</if>
|
|
||||||
<if test="idlist != null">
|
|
||||||
and id not in
|
|
||||||
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteByItemIds" parameterType="java.lang.String">
|
|
||||||
delete from SAR_FILE_SPLIT_ITEMS_RES
|
|
||||||
where stand_id in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
-260
@@ -1,260 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.jero.modules.split.mapper.SarFileSplitItemsTableEOMapper" >
|
|
||||||
<!-- Result Map-->
|
|
||||||
<resultMap id="BaseResultMap" type="com.jero.modules.split.entity.SarFileSplitItemsTableEO" >
|
|
||||||
<id column="id" property="id" />
|
|
||||||
<result column="items_val_id" property="itemsValId" />
|
|
||||||
<result column="items_id" property="itemsId" />
|
|
||||||
<result column="row_num" property="rowNum" />
|
|
||||||
<result column="col_num" property="colNum" />
|
|
||||||
<result column="content" property="content" />
|
|
||||||
<result column="valid_flag" property="validFlag" />
|
|
||||||
<result column="creation_time" property="creationTime" />
|
|
||||||
<result column="modify_time" property="modifyTime" />
|
|
||||||
<result column="modify_user" property="modifyUser" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<!-- SAR_FILE_SPLIT_ITEMS_TABLE table all fields -->
|
|
||||||
<sql id="Base_Column_List" >
|
|
||||||
id, items_val_id, items_id, row_num, col_num, content, valid_flag, creation_time, modify_time, modify_user
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 查询条件 -->
|
|
||||||
<sql id="Base_Where_Clause">
|
|
||||||
where 1=1
|
|
||||||
<trim suffixOverrides="," >
|
|
||||||
<if test="id != null" >
|
|
||||||
and id ${idOperator} #{id}
|
|
||||||
</if>
|
|
||||||
<if test="itemsValId != null" >
|
|
||||||
and items_val_id ${itemsValIdOperator} #{itemsValId}
|
|
||||||
</if>
|
|
||||||
<if test="itemsId != null" >
|
|
||||||
and items_id ${itemsIdOperator} #{itemsId}
|
|
||||||
</if>
|
|
||||||
<if test="rowNum != null" >
|
|
||||||
and row_num ${rowNumOperator} #{rowNum}
|
|
||||||
</if>
|
|
||||||
<if test="colNum != null" >
|
|
||||||
and col_num ${colNumOperator} #{colNum}
|
|
||||||
</if>
|
|
||||||
<if test="content != null" >
|
|
||||||
and content ${contentOperator} #{content}
|
|
||||||
</if>
|
|
||||||
<if test="validFlag != null" >
|
|
||||||
and valid_flag ${validFlagOperator} #{validFlag}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime != null" >
|
|
||||||
and creation_time ${creationTimeOperator} #{creationTime}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime1 != null" >
|
|
||||||
and creation_time >= #{creationTime1}
|
|
||||||
</if>
|
|
||||||
<if test="creationTime2 != null" >
|
|
||||||
and creation_time <= #{creationTime2}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime != null" >
|
|
||||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime1 != null" >
|
|
||||||
and modify_time >= #{modifyTime1}
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime2 != null" >
|
|
||||||
and modify_time <= #{modifyTime2}
|
|
||||||
</if>
|
|
||||||
<if test="modifyUser != null" >
|
|
||||||
and modify_user ${modifyUserOperator} #{modifyUser}
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<!-- 插入记录 -->
|
|
||||||
<insert id="insert" parameterType="com.jero.modules.split.entity.SarFileSplitItemsTableEO" >
|
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
||||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_TABLE.NEXTVAL FROM DUAL
|
|
||||||
</selectKey> -->
|
|
||||||
insert into SAR_FILE_SPLIT_ITEMS_TABLE(<include refid="Base_Column_List" />)
|
|
||||||
values (#{id, jdbcType=VARCHAR}, #{itemsValId, jdbcType=VARCHAR}, #{itemsId, jdbcType=VARCHAR}, #{rowNum, jdbcType=INTEGER}, #{colNum, jdbcType=INTEGER}, #{content, jdbcType=VARCHAR}, #{validFlag, jdbcType=INTEGER}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP}, #{modifyUser, jdbcType=VARCHAR})
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<!-- 动态插入记录 主键是序列 -->
|
|
||||||
<insert id="insertSelective" parameterType="com.jero.modules.split.entity.SarFileSplitItemsTableEO" >
|
|
||||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
||||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_TABLE.NEXTVAL FROM DUAL
|
|
||||||
</selectKey> -->
|
|
||||||
insert into SAR_FILE_SPLIT_ITEMS_TABLE
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="id != null" >id,</if>
|
|
||||||
<if test="itemsValId != null" >items_val_id,</if>
|
|
||||||
<if test="itemsId != null" >items_id,</if>
|
|
||||||
<if test="rowNum != null" >row_num,</if>
|
|
||||||
<if test="colNum != null" >col_num,</if>
|
|
||||||
<if test="content != null" >content,</if>
|
|
||||||
<if test="validFlag != null" >valid_flag,</if>
|
|
||||||
<if test="creationTime != null" >creation_time,</if>
|
|
||||||
<if test="modifyTime != null" >modify_time,</if>
|
|
||||||
<if test="modifyUser != null" >modify_user,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
||||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="itemsValId != null" >#{itemsValId, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="itemsId != null" >#{itemsId, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="rowNum != null" >#{rowNum, jdbcType=INTEGER},</if>
|
|
||||||
<if test="colNum != null" >#{colNum, jdbcType=INTEGER},</if>
|
|
||||||
<if test="content != null" >#{content, jdbcType=VARCHAR},</if>
|
|
||||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
|
||||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
|
||||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
|
||||||
<if test="modifyUser != null" >#{modifyUser, jdbcType=VARCHAR},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<!-- 根据pk,修改记录-->
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.jero.modules.split.entity.SarFileSplitItemsTableEO" >
|
|
||||||
update SAR_FILE_SPLIT_ITEMS_TABLE
|
|
||||||
set items_val_id = #{itemsValId},
|
|
||||||
items_id = #{itemsId},
|
|
||||||
row_num = #{rowNum},
|
|
||||||
col_num = #{colNum},
|
|
||||||
content = #{content},
|
|
||||||
valid_flag = #{validFlag},
|
|
||||||
creation_time = #{creationTime},
|
|
||||||
modify_time = #{modifyTime},
|
|
||||||
modify_user = #{modifyUser}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 修改记录,只修改只不为空的字段 -->
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.jero.modules.split.entity.SarFileSplitItemsTableEO" >
|
|
||||||
update SAR_FILE_SPLIT_ITEMS_TABLE
|
|
||||||
<set >
|
|
||||||
<if test="itemsValId != null" >
|
|
||||||
items_val_id = #{itemsValId},
|
|
||||||
</if>
|
|
||||||
<if test="itemsId != null" >
|
|
||||||
items_id = #{itemsId},
|
|
||||||
</if>
|
|
||||||
<if test="rowNum != null" >
|
|
||||||
row_num = #{rowNum},
|
|
||||||
</if>
|
|
||||||
<if test="colNum != null" >
|
|
||||||
col_num = #{colNum},
|
|
||||||
</if>
|
|
||||||
<if test="content != null" >
|
|
||||||
content = #{content},
|
|
||||||
</if>
|
|
||||||
<if test="validFlag != null" >
|
|
||||||
valid_flag = #{validFlag},
|
|
||||||
</if>
|
|
||||||
<if test="creationTime != null" >
|
|
||||||
creation_time = #{creationTime},
|
|
||||||
</if>
|
|
||||||
<if test="modifyTime != null" >
|
|
||||||
modify_time = #{modifyTime},
|
|
||||||
</if>
|
|
||||||
<if test="modifyUser != null" >
|
|
||||||
modify_user = #{modifyUser},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 根据id查询 SAR_FILE_SPLIT_ITEMS_TABLE -->
|
|
||||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
||||||
select <include refid="Base_Column_List" />
|
|
||||||
from SAR_FILE_SPLIT_ITEMS_TABLE
|
|
||||||
where id = #{value}
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 删除记录 -->
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
||||||
delete from SAR_FILE_SPLIT_ITEMS_TABLE
|
|
||||||
where id = #{value}
|
|
||||||
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<!-- SAR_FILE_SPLIT_ITEMS_TABLE 列表总数-->
|
|
||||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.jero.modules.split.common.BasePage">
|
|
||||||
select count(1) from SAR_FILE_SPLIT_ITEMS_TABLE
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询SAR_FILE_SPLIT_ITEMS_TABLE列表 -->
|
|
||||||
<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_ITEMS_TABLE
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.jero.modules.split.common.BasePage">
|
|
||||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS_TABLE
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
|
||||||
${pager.orderCondition}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertForeach" parameterType="java.util.List">
|
|
||||||
begin
|
|
||||||
<foreach collection="list" item="item" index="index" separator=";">
|
|
||||||
insert into SAR_FILE_SPLIT_ITEMS_TABLE(<include refid="Base_Column_List" />)
|
|
||||||
values (#{item.id, jdbcType=VARCHAR}, #{item.itemsValId, jdbcType=VARCHAR},
|
|
||||||
#{item.itemsId, jdbcType=VARCHAR}, #{item.rowNum, jdbcType=INTEGER}, #{item.colNum, jdbcType=INTEGER},
|
|
||||||
#{item.content, jdbcType=VARCHAR}, #{item.validFlag, jdbcType=INTEGER}, #{item.creationTime, jdbcType=TIMESTAMP}, #{item.modifyTime, jdbcType=TIMESTAMP}, #{item.modifyUser, jdbcType=VARCHAR})
|
|
||||||
</foreach>
|
|
||||||
;end;
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<select id="queryByRowNum" resultMap="BaseResultMap" parameterType="com.jero.modules.split.common.BasePage">
|
|
||||||
select row_num from SAR_FILE_SPLIT_ITEMS_TABLE
|
|
||||||
<include refid="Base_Where_Clause"/>
|
|
||||||
group by row_num
|
|
||||||
order by row_num
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteByitemValIds" parameterType="java.lang.String">
|
|
||||||
delete from SAR_FILE_SPLIT_ITEMS_TABLE
|
|
||||||
where ITEMS_VAL_ID in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteTableByMenuIds" parameterType="java.lang.String">
|
|
||||||
delete from SAR_FILE_SPLIT_ITEMS_TABLE
|
|
||||||
where EXISTS (
|
|
||||||
select 1 from SAR_FILE_SPLIT_ITEMS
|
|
||||||
where SAR_FILE_SPLIT_ITEMS_TABLE.ITEMS_ID=SAR_FILE_SPLIT_ITEMS.id
|
|
||||||
and SAR_FILE_SPLIT_ITEMS.MENU_ID in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
)
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteByitemIds" parameterType="java.lang.String">
|
|
||||||
delete from SAR_FILE_SPLIT_ITEMS_TABLE
|
|
||||||
where ITEMS_ID in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<!-- 通过menuid 查询目录下所有的条目 -->
|
|
||||||
<select id="queryItemsTableByMenuId" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
||||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS_TABLE
|
|
||||||
where valid_flag = '0' and ITEMS_ID in
|
|
||||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
-37
@@ -1,37 +0,0 @@
|
|||||||
package com.jero.modules.split.page;
|
|
||||||
|
|
||||||
import com.jero.modules.split.common.BasePage;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_FILE SarFileSplitItemsFileEOPage<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-03-30 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class SarFileSplitItemsFileEOPage extends BasePage {
|
|
||||||
|
|
||||||
private String id;
|
|
||||||
private String idOperator = "=";
|
|
||||||
private String standId;
|
|
||||||
private String standIdOperator = "=";
|
|
||||||
private String resId;
|
|
||||||
private String resIdOperator = "=";
|
|
||||||
private String attId;
|
|
||||||
private String attIdOperator = "=";
|
|
||||||
private String useModel;
|
|
||||||
private String useModelOperator = "=";
|
|
||||||
private String validFlag;
|
|
||||||
private String validFlagOperator = "=";
|
|
||||||
private String creationTime;
|
|
||||||
private String creationTime1;
|
|
||||||
private String creationTime2;
|
|
||||||
private String creationTimeOperator = "=";
|
|
||||||
private String modifyTime;
|
|
||||||
private String modifyTime1;
|
|
||||||
private String modifyTime2;
|
|
||||||
private String modifyTimeOperator = "=";
|
|
||||||
private String pageCount;
|
|
||||||
private String pageCountOperator = "=";
|
|
||||||
}
|
|
||||||
-35
@@ -1,35 +0,0 @@
|
|||||||
package com.jero.modules.split.page;
|
|
||||||
|
|
||||||
import com.jero.modules.split.common.BasePage;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_PARAMS SarFileSplitItemsParamsEOPage<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-02-04 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class SarFileSplitItemsParamsEOPage extends BasePage {
|
|
||||||
|
|
||||||
private String id;
|
|
||||||
private String idOperator = "=";
|
|
||||||
private String itemId;
|
|
||||||
private String itemIdOperator = "=";
|
|
||||||
private String description;
|
|
||||||
private String descriptionOperator = "=";
|
|
||||||
private String figure;
|
|
||||||
private String figureOperator = "=";
|
|
||||||
private String validFlag;
|
|
||||||
private String validFlagOperator = "=";
|
|
||||||
private String creationTime;
|
|
||||||
private String creationTime1;
|
|
||||||
private String creationTime2;
|
|
||||||
private String creationTimeOperator = "=";
|
|
||||||
private String modifyTime;
|
|
||||||
private String modifyTime1;
|
|
||||||
private String modifyTime2;
|
|
||||||
private String modifyTimeOperator = "=";
|
|
||||||
private String infoId;
|
|
||||||
private String infoIdOperator = "=";
|
|
||||||
}
|
|
||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
package com.jero.modules.split.page;
|
|
||||||
|
|
||||||
import com.jero.modules.split.common.BasePage;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_RES SarFileSplitItemsResEOPage<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-03-30 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class SarFileSplitItemsResEOPage extends BasePage {
|
|
||||||
|
|
||||||
private String id;
|
|
||||||
private String idOperator = "=";
|
|
||||||
private String standId;
|
|
||||||
private String standIdOperator = "=";
|
|
||||||
private String standFileClassify;
|
|
||||||
private String standFileClassifyOperator = "=";
|
|
||||||
private String fileName;
|
|
||||||
private String fileNameOperator = "=";
|
|
||||||
private String fileSuffix;
|
|
||||||
private String fileSuffixOperator = "=";
|
|
||||||
private String validFlag;
|
|
||||||
private String validFlagOperator = "=";
|
|
||||||
private String creationTime;
|
|
||||||
private String creationTime1;
|
|
||||||
private String creationTime2;
|
|
||||||
private String creationTimeOperator = "=";
|
|
||||||
private String modifyTime;
|
|
||||||
private String modifyTime1;
|
|
||||||
private String modifyTime2;
|
|
||||||
private String modifyTimeOperator = "=";
|
|
||||||
|
|
||||||
}
|
|
||||||
+2
@@ -79,4 +79,6 @@ public interface IFileSplitItemsEOService extends IService<SarFileSplitItemsEO>
|
|||||||
|
|
||||||
int deleteByMenuIds(List<String> idList);
|
int deleteByMenuIds(List<String> idList);
|
||||||
String getFieldForExport();
|
String getFieldForExport();
|
||||||
|
|
||||||
|
int insertForeach(List<SarFileSplitItemsEO> messageList); // 拆分已入库文件专用
|
||||||
}
|
}
|
||||||
|
|||||||
-116
@@ -1,116 +0,0 @@
|
|||||||
package com.jero.modules.split.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.jero.common.api.vo.Result;
|
|
||||||
import com.jero.modules.oss.entity.OSSFile;
|
|
||||||
import com.jero.modules.split.common.SplitTableInfo;
|
|
||||||
import com.jero.modules.split.dto.*;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsEO;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsTableEO;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitMenuTreeNode;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsEOPage;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS SarFileSplitItemsEOService<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-01-03 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
public interface ISarFileSplitItemsEOService extends IService<SarFileSplitItemsEO> {
|
|
||||||
|
|
||||||
int deleteByItemsIds(SarFileSplitItemsEO sarFileSplitItemsEO);
|
|
||||||
|
|
||||||
int addItemContent(SarFileSplitItemsEO sarFileSplitItemsEO) throws Exception;
|
|
||||||
|
|
||||||
int updateItemContent(SarFileSplitItemsEO sarFileSplitItemsEO) throws Exception;
|
|
||||||
|
|
||||||
int updateItemContentAfterBathDel(SarFileSplitItemsEO sarFileSplitItemsEO) throws Exception;
|
|
||||||
|
|
||||||
Map<String,String> moveSplitItemsVal(SarFileSplitItemsEOPage page) throws Exception ;
|
|
||||||
|
|
||||||
// void saveFileInfo (SarFileSplitItemsEO sarFileSplitItemsEO) throws Exception;
|
|
||||||
|
|
||||||
|
|
||||||
int insert(SarFileSplitItemsEO SarFileSplitItemsEO);
|
|
||||||
|
|
||||||
int insertSelective(SarFileSplitItemsEO SarFileSplitItemsEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(SarFileSplitItemsEO SarFileSplitItemsEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarFileSplitItemsEO SarFileSplitItemsEO);
|
|
||||||
|
|
||||||
SarFileSplitItemsEO selectByPrimaryKey(String value);
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(String value);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsEO> queryByList(SarFileSplitItemsEOPage page);
|
|
||||||
|
|
||||||
int queryByCount(SarFileSplitItemsEOPage page);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsEO> queryByPage(SarFileSplitItemsEOPage page);
|
|
||||||
|
|
||||||
// public String insertSarStandFile(String standId, List<OSSFile> list, String standFileClassify,String newFiles) throws Exception ;
|
|
||||||
|
|
||||||
// public Map<String,List<String>> getNotDeleteMsgFile(SarFileSplitItemsEO sarFileSplitItemsEO);
|
|
||||||
|
|
||||||
// public String getNotDelFile(String fileAttIds,List<String> getNotDeleteResId,List<String> getNotDeleteFileId);
|
|
||||||
|
|
||||||
public String insertItemTable(List<SarFileSplitItemsValEO> getValList,String itemId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author yangxuenan
|
|
||||||
* @Description 添加特殊参数要求内容
|
|
||||||
* Date 2020/2/4 15:56
|
|
||||||
* @Param [sarFileSplitItemsEO]
|
|
||||||
* @return void
|
|
||||||
**/
|
|
||||||
public void addParamsContent(SarFileSplitItemsEO sarFileSplitItemsEO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author yangxuenan
|
|
||||||
* @Description 修改特殊参数要求内容
|
|
||||||
* Date 2020/2/4 15:56
|
|
||||||
* @Param [sarFileSplitItemsEO]
|
|
||||||
* @return void
|
|
||||||
**/
|
|
||||||
public void updateParamsContent(SarFileSplitItemsEO sarFileSplitItemsEO);
|
|
||||||
|
|
||||||
public List<SarFileSplitItemsEO> queryByItemsIds(List<String> idList);
|
|
||||||
|
|
||||||
public int batchDeleteItems(String ids);
|
|
||||||
|
|
||||||
public Map<String,Object> judgeContaintChilds(String ids) throws Exception ;
|
|
||||||
|
|
||||||
public List<FileSplitItemsExportDto> queryByOrdersForExport(SarFileSplitItemsEOPage page);
|
|
||||||
|
|
||||||
public List<FileSplitValExportDto> combineItemValInfo(List<SarFileSplitItemsValEO> getValList, List<FileSpiltValTableExportDto> allTableList, List<FileSplitValImgExportDto> allImgList, SarFileSplitItemsEOPage page) throws Exception;
|
|
||||||
|
|
||||||
public List<List<SarFileSplitItemsTableEO>> combineTableList(SarFileSplitItemsValEO itemsValEO) throws Exception;
|
|
||||||
|
|
||||||
public void downLoadImgList(List<FileSplitValImgExportDto> allImgList,String fileNowPath) throws IOException ;
|
|
||||||
|
|
||||||
public void downLoadFileList(List<OSSFile> allRelevFileList, String fileNowPath) throws IOException ;
|
|
||||||
|
|
||||||
public void copyFile1(String srcPath, String destPath) throws IOException ;
|
|
||||||
|
|
||||||
public List<SarFileSplitItemsEO> queryByList2(SarFileSplitItemsEOPage page);
|
|
||||||
|
|
||||||
public Result<?> importSplitItems(List<SarFileSplitItemsImportDto> list, String menuId, String filepath, String infoId, List<SplitTableInfo> getSheetTableList);
|
|
||||||
|
|
||||||
public List<SarFileSplitMenuTreeNode> buildTree(List<SarFileSplitItemsEO> addItemsEOList, Long treeListDisplay, String menuId);
|
|
||||||
|
|
||||||
public Map validateImportDatas(List<SarFileSplitItemsImportDto> datas, String filepath) throws Exception ;
|
|
||||||
|
|
||||||
public void createItemsInfo(SarFileSplitItemsEO sarFileSplitItemsEO,String menuId,String infoId);
|
|
||||||
|
|
||||||
|
|
||||||
int insertForeach(List<SarFileSplitItemsEO> messageList);
|
|
||||||
}
|
|
||||||
-39
@@ -1,39 +0,0 @@
|
|||||||
package com.jero.modules.split.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsFileEO;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsFileEOPage;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_FILE SarFileSplitItemsFileEOService<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-03-30 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
public interface ISarFileSplitItemsFileEOService extends IService<SarFileSplitItemsFileEO> {
|
|
||||||
List<SarFileSplitItemsFileEO> selectFileByAttId(String attId);
|
|
||||||
|
|
||||||
int insert(SarFileSplitItemsFileEO sarFileSplitItemsFileEO);
|
|
||||||
|
|
||||||
int insertSelective(SarFileSplitItemsFileEO sarFileSplitItemsFileEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(SarFileSplitItemsFileEO sarFileSplitItemsFileEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarFileSplitItemsFileEO sarFileSplitItemsFileEO);
|
|
||||||
|
|
||||||
SarFileSplitItemsFileEO selectByPrimaryKey(String value);
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(String value);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsFileEO> queryByList(SarFileSplitItemsFileEOPage page);
|
|
||||||
|
|
||||||
int queryByCount(SarFileSplitItemsFileEOPage page);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsFileEO> queryByPage(SarFileSplitItemsFileEOPage page);
|
|
||||||
|
|
||||||
}
|
|
||||||
-38
@@ -1,38 +0,0 @@
|
|||||||
package com.jero.modules.split.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsParamsEO;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsParamsEOPage;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_PARAMS SarFileSplitItemsParamsEOService<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-02-04 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
public interface ISarFileSplitItemsParamsEOService extends IService<SarFileSplitItemsParamsEO> {
|
|
||||||
int deleteByItemIds(List<String> idList);
|
|
||||||
|
|
||||||
int insert(SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO);
|
|
||||||
|
|
||||||
int insertSelective(SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO);
|
|
||||||
|
|
||||||
SarFileSplitItemsParamsEO selectByPrimaryKey(String value);
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(String value);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsParamsEO> queryByList(SarFileSplitItemsParamsEOPage page);
|
|
||||||
|
|
||||||
int queryByCount(SarFileSplitItemsParamsEOPage page);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsParamsEO> queryByPage(SarFileSplitItemsParamsEOPage page);
|
|
||||||
}
|
|
||||||
-37
@@ -1,37 +0,0 @@
|
|||||||
package com.jero.modules.split.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsResEO;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsResEOPage;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_RES SarFileSplitItemsResEOService<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-03-30 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
public interface ISarFileSplitItemsResEOService extends IService<SarFileSplitItemsResEO> {
|
|
||||||
|
|
||||||
int insert(SarFileSplitItemsResEO sarFileSplitItemsResEO);
|
|
||||||
|
|
||||||
int insertSelective(SarFileSplitItemsResEO sarFileSplitItemsResEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(SarFileSplitItemsResEO sarFileSplitItemsResEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarFileSplitItemsResEO sarFileSplitItemsResEO);
|
|
||||||
|
|
||||||
SarFileSplitItemsResEO selectByPrimaryKey(String value);
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(String value);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsResEO> queryByList(SarFileSplitItemsResEOPage page);
|
|
||||||
|
|
||||||
int queryByCount(SarFileSplitItemsResEOPage page);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsResEO> queryByPage(SarFileSplitItemsResEOPage page);
|
|
||||||
}
|
|
||||||
-49
@@ -1,49 +0,0 @@
|
|||||||
package com.jero.modules.split.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsTableEO;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsTableEOPage;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_TABLE SarFileSplitItemsTableEOService<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-01-17 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
@Service("sarFileSplitItemsTableEOService")
|
|
||||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
|
||||||
public interface ISarFileSplitItemsTableEOService extends IService<SarFileSplitItemsTableEO> {
|
|
||||||
|
|
||||||
List<SarFileSplitItemsTableEO> queryByRowNum(SarFileSplitItemsTableEOPage page);
|
|
||||||
|
|
||||||
int deleteByitemIds(List<String> idList);
|
|
||||||
|
|
||||||
|
|
||||||
int insert(SarFileSplitItemsTableEO sarFileSplitItemsTableEO);
|
|
||||||
|
|
||||||
int insertSelective(SarFileSplitItemsTableEO sarFileSplitItemsTableEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(SarFileSplitItemsTableEO sarFileSplitItemsTableEO);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarFileSplitItemsTableEO sarFileSplitItemsTableEO);
|
|
||||||
|
|
||||||
SarFileSplitItemsTableEO selectByPrimaryKey(String value);
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(String value);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsTableEO> queryByList(SarFileSplitItemsTableEOPage page);
|
|
||||||
|
|
||||||
int queryByCount(SarFileSplitItemsTableEOPage page);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsTableEO> queryByPage(SarFileSplitItemsTableEOPage page);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
-5
@@ -17,11 +17,6 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface ISarFileSplitItemsValEOService extends IService<SarFileSplitItemsValEO> {
|
public interface ISarFileSplitItemsValEOService extends IService<SarFileSplitItemsValEO> {
|
||||||
|
|
||||||
int deleteValByitemIds(List<String> idList);
|
|
||||||
|
|
||||||
List<SarFileSplitItemsValEO> getSplitItemsByMenu(String menuId,String infoId);
|
|
||||||
|
|
||||||
|
|
||||||
int insert(SarFileSplitItemsValEO sarFileSplitItemsValEO);
|
int insert(SarFileSplitItemsValEO sarFileSplitItemsValEO);
|
||||||
|
|
||||||
int insertSelective(SarFileSplitItemsValEO sarFileSplitItemsValEO);
|
int insertSelective(SarFileSplitItemsValEO sarFileSplitItemsValEO);
|
||||||
|
|||||||
-14
@@ -1,13 +1,10 @@
|
|||||||
package com.jero.modules.split.service;
|
package com.jero.modules.split.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.jero.modules.split.entity.DrageMenuEO;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsEO;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitMenuEO;
|
import com.jero.modules.split.entity.SarFileSplitMenuEO;
|
||||||
import com.jero.modules.split.page.SarFileSplitMenuEOPage;
|
import com.jero.modules.split.page.SarFileSplitMenuEOPage;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -20,24 +17,13 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public interface ISarFileSplitMenuEOService extends IService<SarFileSplitMenuEO> {
|
public interface ISarFileSplitMenuEOService extends IService<SarFileSplitMenuEO> {
|
||||||
|
|
||||||
int dragMenu(DrageMenuEO drageMenuEO);
|
|
||||||
// 通过ID查询该结点及结点下所有的节点排序的最大值
|
// 通过ID查询该结点及结点下所有的节点排序的最大值
|
||||||
int getMaxDisplayByid(String menuID) ;
|
int getMaxDisplayByid(String menuID) ;
|
||||||
|
|
||||||
int addMenu(SarFileSplitMenuEO sarFileSplitMenuEO);
|
int addMenu(SarFileSplitMenuEO sarFileSplitMenuEO);
|
||||||
|
|
||||||
boolean judgequeryMenuByPid(SarFileSplitMenuEO sarMenuEO) throws Exception ;
|
|
||||||
|
|
||||||
void deleteMenu(String id);
|
void deleteMenu(String id);
|
||||||
|
|
||||||
int copyMenu (SarFileSplitMenuEO sarMenuEO) ;
|
|
||||||
|
|
||||||
int copyMenuNotChildren(Map<String, Object> sarFileSplitItemsEO) ;
|
|
||||||
|
|
||||||
String addMenuForImport(SarFileSplitMenuEO sarFileSplitMenuEO);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int insert(SarFileSplitMenuEO sarFileSplitMenuEO);
|
int insert(SarFileSplitMenuEO sarFileSplitMenuEO);
|
||||||
|
|
||||||
int insertSelective(SarFileSplitMenuEO sarFileSplitMenuEO);
|
int insertSelective(SarFileSplitMenuEO sarFileSplitMenuEO);
|
||||||
|
|||||||
+2
-2
@@ -10,7 +10,7 @@ import com.jero.modules.split.entity.*;
|
|||||||
import com.jero.modules.split.enums.SplitFilePragraTypeEnum;
|
import com.jero.modules.split.enums.SplitFilePragraTypeEnum;
|
||||||
import com.jero.modules.split.enums.SplitFileTypeTypeEnum;
|
import com.jero.modules.split.enums.SplitFileTypeTypeEnum;
|
||||||
import com.jero.modules.split.mapper.SarFileSplitMenuEOMapper;
|
import com.jero.modules.split.mapper.SarFileSplitMenuEOMapper;
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsEOService;
|
import com.jero.modules.split.service.IFileSplitItemsEOService;
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsValEOService;
|
import com.jero.modules.split.service.ISarFileSplitItemsValEOService;
|
||||||
import com.jero.modules.split.util.FileSplitUtils;
|
import com.jero.modules.split.util.FileSplitUtils;
|
||||||
import com.jero.modules.split.util.ReadWordTable;
|
import com.jero.modules.split.util.ReadWordTable;
|
||||||
@@ -53,7 +53,7 @@ public class FileSpiltService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SarFileSplitMenuEOMapper sarFileSplitMenuEOMapper;
|
private SarFileSplitMenuEOMapper sarFileSplitMenuEOMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISarFileSplitItemsEOService iSarFileSplitItemsEOService;
|
private IFileSplitItemsEOService iSarFileSplitItemsEOService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISarFileSplitItemsValEOService iSarFileSplitItemsValEOService;
|
private ISarFileSplitItemsValEOService iSarFileSplitItemsValEOService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|||||||
+37
-26
@@ -1728,29 +1728,25 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
}
|
}
|
||||||
String cellValue = null;
|
String cellValue = null;
|
||||||
|
|
||||||
if (HSSFCell.CELL_TYPE_NUMERIC == cell.getCellType() && HSSFDateUtil.isCellDateFormatted(cell)) {
|
if (!(HSSFCell.CELL_TYPE_NUMERIC == cell.getCellType() && HSSFDateUtil.isCellDateFormatted(cell))) {
|
||||||
// 获取日期类型的单元格的值
|
|
||||||
Date d = cell.getDateCellValue();
|
|
||||||
// 进行格式转换
|
|
||||||
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
cellValue = df.format(d);
|
|
||||||
map.put(dbfieldList.get(y), cellValue);
|
|
||||||
if (map.get(dbfieldList.get(y)) == null || "".equals(map.get(dbfieldList.get(y)))) {
|
|
||||||
a++;
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
//设置单元格类型
|
//设置单元格类型
|
||||||
cell.setCellType(CellType.STRING);
|
cell.setCellType(CellType.STRING);
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
boolean isMerge = isMergedRegion(sheet, row.getRowNum(), cell.getColumnIndex());
|
boolean isMerge = isMergedRegion(sheet, row.getRowNum(), cell.getColumnIndex());
|
||||||
//判断是否具有合并单元格
|
//判断是否具有合并单元格
|
||||||
if (isMerge) {
|
if (isMerge) {
|
||||||
cellValue = getMergedRegionValue(sheet, row.getRowNum(), cell.getColumnIndex());
|
cellValue = getMergedRegionValue(sheet, row.getRowNum(), cell.getColumnIndex());
|
||||||
} else {
|
} else {
|
||||||
cellValue = cell.getStringCellValue();
|
if (HSSFCell.CELL_TYPE_NUMERIC == cell.getCellType() && HSSFDateUtil.isCellDateFormatted(cell)) {
|
||||||
|
// 获取日期类型的单元格的值
|
||||||
|
Date d = cell.getDateCellValue();
|
||||||
|
// 进行格式转换
|
||||||
|
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
cellValue = df.format(d);
|
||||||
|
} else {
|
||||||
|
cellValue = cell.getStringCellValue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
map.put(dbfieldList.get(y), cellValue);
|
map.put(dbfieldList.get(y), cellValue);
|
||||||
@@ -1787,7 +1783,16 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
if (column >= firstColumn && column <= lastColumn) {
|
if (column >= firstColumn && column <= lastColumn) {
|
||||||
Row fRow = sheet.getRow(firstRow);
|
Row fRow = sheet.getRow(firstRow);
|
||||||
Cell fCell = fRow.getCell(firstColumn);
|
Cell fCell = fRow.getCell(firstColumn);
|
||||||
return getCellValue(fCell);
|
if (HSSFCell.CELL_TYPE_NUMERIC == fCell.getCellType() && HSSFDateUtil.isCellDateFormatted(fCell)) {
|
||||||
|
// 获取日期类型的单元格的值
|
||||||
|
Date d = fCell.getDateCellValue();
|
||||||
|
// 进行格式转换
|
||||||
|
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
String cellValue = df.format(d);
|
||||||
|
return cellValue;
|
||||||
|
} else {
|
||||||
|
return getCellValue(fCell);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2147,9 +2152,9 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
//判断格式是否正确
|
//判断格式是否正确
|
||||||
if (!DateUtils.isValidDate((String) value)) {
|
if (!DateUtils.isValidDate((String) value)) {
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
errorMsg += fieldName + "格式不正确,正确格式如:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日;";
|
errorMsg += fieldName + "格式不正确,正确格式如:yyyy/MM/dd、yyyy-MM-dd、yyyy年MM月dd日;";
|
||||||
}else{
|
}else{
|
||||||
errorMsg += fieldName + " Incorrect format correct format is:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日;";
|
errorMsg += fieldName + " Incorrect format correct format is:yyyy/MM/dd、yyyy-MM-dd、yyyy年MM月dd日;";
|
||||||
}
|
}
|
||||||
countError++;
|
countError++;
|
||||||
} else {
|
} else {
|
||||||
@@ -3073,20 +3078,21 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
if(CollectionUtil.isNotEmpty(sysUserList)){
|
if(CollectionUtil.isNotEmpty(sysUserList)){
|
||||||
StringBuilder stringBuilder = new StringBuilder();
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
for(SysUser user : sysUserList){
|
for(SysUser user : sysUserList){
|
||||||
stringBuilder.append(user.getRealname()).append("(").append(user.getUsername()).append("),");
|
// stringBuilder.append(user.getRealname()).append("(").append(user.getUsername()).append("),");
|
||||||
|
stringBuilder.append(user.getUsername()).append(",");
|
||||||
}
|
}
|
||||||
String value = stringBuilder.substring(0, stringBuilder.lastIndexOf(","));
|
String value = stringBuilder.substring(0, stringBuilder.lastIndexOf(","));
|
||||||
entry.setValue(value);
|
entry.setValue(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 标准选择
|
// 标准选择
|
||||||
if(fieldStanList.contains(entry.getKey()) && StringUtils.isNotBlank((String)entry.getValue())) {
|
// if(fieldStanList.contains(entry.getKey()) && StringUtils.isNotBlank((String)entry.getValue())) {
|
||||||
List<Map<String, Object>> documentLibraryEOList = documentLibraryEOService.queryListByIds(entry.getValue().toString());
|
// List<Map<String, Object>> documentLibraryEOList = documentLibraryEOService.queryListByIds(entry.getValue().toString());
|
||||||
if(CollectionUtil.isNotEmpty(documentLibraryEOList)){
|
// if(CollectionUtil.isNotEmpty(documentLibraryEOList)){
|
||||||
String value = StringUtils.join(documentLibraryEOList.stream().map(map->map.get("serial_number")).collect(Collectors.toList()),",");
|
// String value = StringUtils.join(documentLibraryEOList.stream().map(map->map.get("serial_number")).collect(Collectors.toList()),",");
|
||||||
entry.setValue(value);
|
// entry.setValue(value);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 拼接文件名
|
// 拼接文件名
|
||||||
@@ -3563,4 +3569,9 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
return StringUtils.join(fields, ",");
|
return StringUtils.join(fields, ",");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertForeach(List<SarFileSplitItemsEO> messageList) {
|
||||||
|
return dao.insertForeach(messageList);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
-1470
File diff suppressed because it is too large
Load Diff
-84
@@ -1,84 +0,0 @@
|
|||||||
package com.jero.modules.split.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsFileEO;
|
|
||||||
import com.jero.modules.split.mapper.SarFileSplitItemsFileEOMapper;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsFileEOPage;
|
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsFileEOService;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_FILE SarFileSplitItemsFileEOService<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-03-30 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
@Service("sarFileSplitItemsFileEOService")
|
|
||||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
|
||||||
public class SarFileSplitItemsFileEOServiceImpl extends ServiceImpl<SarFileSplitItemsFileEOMapper, SarFileSplitItemsFileEO> implements ISarFileSplitItemsFileEOService {
|
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitItemsFileEOServiceImpl.class);
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SarFileSplitItemsFileEOMapper dao;
|
|
||||||
|
|
||||||
public List<SarFileSplitItemsFileEO> selectFileByAttId(String attId){
|
|
||||||
return dao.selectFileByAttId(attId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int insert(SarFileSplitItemsFileEO sarFileSplitItemsFileEO) {
|
|
||||||
return dao.insert(sarFileSplitItemsFileEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int insertSelective(SarFileSplitItemsFileEO sarFileSplitItemsFileEO) {
|
|
||||||
return dao.insertSelective(sarFileSplitItemsFileEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateByPrimaryKey(SarFileSplitItemsFileEO sarFileSplitItemsFileEO) {
|
|
||||||
return dao.updateByPrimaryKey(sarFileSplitItemsFileEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateByPrimaryKeySelective(SarFileSplitItemsFileEO sarFileSplitItemsFileEO) {
|
|
||||||
return dao.updateByPrimaryKeySelective(sarFileSplitItemsFileEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SarFileSplitItemsFileEO selectByPrimaryKey(String value) {
|
|
||||||
return dao.selectByPrimaryKey(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int deleteByPrimaryKey(String value) {
|
|
||||||
return dao.deleteByPrimaryKey(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<SarFileSplitItemsFileEO> queryByList(SarFileSplitItemsFileEOPage page) {
|
|
||||||
return dao.queryByList(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int queryByCount(SarFileSplitItemsFileEOPage page) {
|
|
||||||
return dao.queryByCount(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<SarFileSplitItemsFileEO> queryByPage(SarFileSplitItemsFileEOPage page) {
|
|
||||||
return dao.queryByPage(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
-84
@@ -1,84 +0,0 @@
|
|||||||
package com.jero.modules.split.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsParamsEO;
|
|
||||||
import com.jero.modules.split.mapper.SarFileSplitItemsParamsMapper;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsParamsEOPage;
|
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsParamsEOService;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_PARAMS SarFileSplitItemsParamsEOService<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-02-04 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
@Service("sarFileSplitItemsParamsEOService")
|
|
||||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
|
||||||
public class SarFileSplitItemsParamsEOServiceImpl extends ServiceImpl<SarFileSplitItemsParamsMapper, SarFileSplitItemsParamsEO> implements ISarFileSplitItemsParamsEOService {
|
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitItemsParamsEOServiceImpl.class);
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SarFileSplitItemsParamsMapper dao;
|
|
||||||
|
|
||||||
public int deleteByItemIds(List<String> idList){
|
|
||||||
return dao.deleteByItemIds(idList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int insert(SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO) {
|
|
||||||
return dao.insert(sarFileSplitItemsParamsEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int insertSelective(SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO) {
|
|
||||||
return dao.insertSelective(sarFileSplitItemsParamsEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateByPrimaryKey(SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO) {
|
|
||||||
return dao.updateByPrimaryKey(sarFileSplitItemsParamsEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateByPrimaryKeySelective(SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO) {
|
|
||||||
return dao.updateByPrimaryKeySelective(sarFileSplitItemsParamsEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SarFileSplitItemsParamsEO selectByPrimaryKey(String value) {
|
|
||||||
return dao.selectByPrimaryKey(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int deleteByPrimaryKey(String value) {
|
|
||||||
return dao.deleteByPrimaryKey(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<SarFileSplitItemsParamsEO> queryByList(SarFileSplitItemsParamsEOPage page) {
|
|
||||||
return dao.queryByList(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int queryByCount(SarFileSplitItemsParamsEOPage page) {
|
|
||||||
return dao.queryByCount(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<SarFileSplitItemsParamsEO> queryByPage(SarFileSplitItemsParamsEOPage page) {
|
|
||||||
return dao.queryByPage(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
-80
@@ -1,80 +0,0 @@
|
|||||||
package com.jero.modules.split.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsResEO;
|
|
||||||
import com.jero.modules.split.mapper.SarFileSplitItemsResEOMapper;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsResEOPage;
|
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsResEOService;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_RES SarFileSplitItemsResEOService<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-03-30 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
@Service("sarFileSplitItemsResEOService")
|
|
||||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
|
||||||
public class SarFileSplitItemsResEOServiceImpl extends ServiceImpl<SarFileSplitItemsResEOMapper, SarFileSplitItemsResEO> implements ISarFileSplitItemsResEOService {
|
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitItemsResEOServiceImpl.class);
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SarFileSplitItemsResEOMapper dao;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int insert(SarFileSplitItemsResEO sarFileSplitItemsResEO) {
|
|
||||||
return dao.insert(sarFileSplitItemsResEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int insertSelective(SarFileSplitItemsResEO sarFileSplitItemsResEO) {
|
|
||||||
return dao.insertSelective(sarFileSplitItemsResEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateByPrimaryKey(SarFileSplitItemsResEO sarFileSplitItemsResEO) {
|
|
||||||
return dao.updateByPrimaryKey(sarFileSplitItemsResEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateByPrimaryKeySelective(SarFileSplitItemsResEO sarFileSplitItemsResEO) {
|
|
||||||
return dao.updateByPrimaryKeySelective(sarFileSplitItemsResEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SarFileSplitItemsResEO selectByPrimaryKey(String value) {
|
|
||||||
return dao.selectByPrimaryKey(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int deleteByPrimaryKey(String value) {
|
|
||||||
return dao.deleteByPrimaryKey(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<SarFileSplitItemsResEO> queryByList(SarFileSplitItemsResEOPage page) {
|
|
||||||
return dao.queryByList(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int queryByCount(SarFileSplitItemsResEOPage page) {
|
|
||||||
return dao.queryByCount(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<SarFileSplitItemsResEO> queryByPage(SarFileSplitItemsResEOPage page) {
|
|
||||||
return dao.queryByPage(page);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-87
@@ -1,87 +0,0 @@
|
|||||||
package com.jero.modules.split.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsTableEO;
|
|
||||||
import com.jero.modules.split.mapper.SarFileSplitItemsTableEOMapper;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsTableEOPage;
|
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsTableEOService;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* <br>
|
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_ITEMS_TABLE SarFileSplitItemsTableEOService<br>
|
|
||||||
* <b>作者:</b>code generator<br>
|
|
||||||
* <b>日期:</b> 2020-01-17 <br>
|
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
|
||||||
*/
|
|
||||||
@Service("sarFileSplitItemsTableEOService")
|
|
||||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
|
||||||
public class SarFileSplitItemsTableEOServiceImpl extends ServiceImpl<SarFileSplitItemsTableEOMapper, SarFileSplitItemsTableEO> implements ISarFileSplitItemsTableEOService {
|
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitItemsTableEOServiceImpl.class);
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SarFileSplitItemsTableEOMapper dao;
|
|
||||||
|
|
||||||
public List<SarFileSplitItemsTableEO> queryByRowNum(SarFileSplitItemsTableEOPage page){
|
|
||||||
return dao.queryByRowNum(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int deleteByitemIds(List<String> idList){
|
|
||||||
return dao.deleteByitemIds(idList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int insert(SarFileSplitItemsTableEO sarFileSplitItemsTableEO) {
|
|
||||||
return dao.insert(sarFileSplitItemsTableEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int insertSelective(SarFileSplitItemsTableEO sarFileSplitItemsTableEO) {
|
|
||||||
return dao.insertSelective(sarFileSplitItemsTableEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateByPrimaryKey(SarFileSplitItemsTableEO sarFileSplitItemsTableEO) {
|
|
||||||
return dao.updateByPrimaryKey(sarFileSplitItemsTableEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateByPrimaryKeySelective(SarFileSplitItemsTableEO sarFileSplitItemsTableEO) {
|
|
||||||
return dao.updateByPrimaryKeySelective(sarFileSplitItemsTableEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SarFileSplitItemsTableEO selectByPrimaryKey(String value) {
|
|
||||||
return dao.selectByPrimaryKey(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int deleteByPrimaryKey(String value) {
|
|
||||||
return dao.deleteByPrimaryKey(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<SarFileSplitItemsTableEO> queryByList(SarFileSplitItemsTableEOPage page) {
|
|
||||||
return dao.queryByList(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int queryByCount(SarFileSplitItemsTableEOPage page) {
|
|
||||||
return dao.queryByCount(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<SarFileSplitItemsTableEO> queryByPage(SarFileSplitItemsTableEOPage page) {
|
|
||||||
return dao.queryByPage(page);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-60
@@ -1,16 +1,10 @@
|
|||||||
package com.jero.modules.split.service.impl;
|
package com.jero.modules.split.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsEO;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsTableEO;
|
|
||||||
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
||||||
import com.jero.modules.split.mapper.SarFileSplitItemsEOMapper;
|
|
||||||
import com.jero.modules.split.mapper.SarFileSplitItemsTableEOMapper;
|
|
||||||
import com.jero.modules.split.mapper.SarFileSplitItemsValEOMapper;
|
import com.jero.modules.split.mapper.SarFileSplitItemsValEOMapper;
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsTableEOPage;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsValEOPage;
|
import com.jero.modules.split.page.SarFileSplitItemsValEOPage;
|
||||||
import com.jero.modules.split.service.ISarFileSplitItemsValEOService;
|
import com.jero.modules.split.service.ISarFileSplitItemsValEOService;
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -18,7 +12,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@@ -39,59 +32,6 @@ public class SarFileSplitItemsValEOServiceImpl extends ServiceImpl<SarFileSplitI
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SarFileSplitItemsValEOMapper dao;
|
private SarFileSplitItemsValEOMapper dao;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SarFileSplitItemsEOMapper sarFileSplitItemsEOMapper;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SarFileSplitItemsTableEOMapper sarFileSplitItemsTableEOMapper;
|
|
||||||
|
|
||||||
public int deleteValByitemIds(List<String> idList){
|
|
||||||
return dao.deleteValByitemIds(idList);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<SarFileSplitItemsValEO> getSplitItemsByMenu(String menuId,String infoId){
|
|
||||||
List<SarFileSplitItemsEO> rows = sarFileSplitItemsEOMapper.queryItemsByMenuId(menuId);;
|
|
||||||
List<SarFileSplitItemsValEO> getList = new ArrayList<>();
|
|
||||||
if (rows != null && !rows.isEmpty()) {
|
|
||||||
for (SarFileSplitItemsEO sarFileSplitItemsEO : rows) {
|
|
||||||
SarFileSplitItemsValEOPage valpage = new SarFileSplitItemsValEOPage();
|
|
||||||
valpage.setItemId(sarFileSplitItemsEO.getId());
|
|
||||||
valpage.setOrderBy("DISPLAY_SEQ,ID");
|
|
||||||
List<SarFileSplitItemsValEO> getListVal = dao.queryByList(valpage);
|
|
||||||
if (getList != null && !getList.isEmpty()) {
|
|
||||||
for (SarFileSplitItemsValEO sarFileSplitItemsValEO : getList) {
|
|
||||||
String imgPath = sarFileSplitItemsValEO.getItemContent();
|
|
||||||
if ("IMG".equals(sarFileSplitItemsValEO.getType()) && StringUtils.isNotEmpty(imgPath)) {
|
|
||||||
String imgName = imgPath.substring(imgPath.lastIndexOf("/")+1, imgPath.length());
|
|
||||||
sarFileSplitItemsValEO.setImgName(imgName);
|
|
||||||
} else if ("TABLE".equals(sarFileSplitItemsValEO.getType())) {
|
|
||||||
SarFileSplitItemsTableEOPage tablePage = new SarFileSplitItemsTableEOPage();
|
|
||||||
tablePage.setItemsValId(sarFileSplitItemsValEO.getId());
|
|
||||||
List<SarFileSplitItemsTableEO> tableList = sarFileSplitItemsTableEOMapper.queryByList(tablePage);
|
|
||||||
List<SarFileSplitItemsTableEO> tableListRow = sarFileSplitItemsTableEOMapper.queryByRowNum(tablePage);
|
|
||||||
sarFileSplitItemsValEO.setTableList(tableList);
|
|
||||||
if (tableListRow != null && !tableListRow.isEmpty()) {
|
|
||||||
List<List<SarFileSplitItemsTableEO>> getTableList = new ArrayList<>();
|
|
||||||
for (int i=1; i <= tableListRow.size();i++) {
|
|
||||||
List<SarFileSplitItemsTableEO> rowList = new ArrayList<>();
|
|
||||||
for (int j=0; j < tableList.size();j++) {
|
|
||||||
if (tableList.get(j).getRowNum() == i) {
|
|
||||||
rowList.add(tableList.get(j));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
getTableList.add(rowList);
|
|
||||||
}
|
|
||||||
sarFileSplitItemsValEO.setTableListShow(getTableList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
getList.addAll(getListVal);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return getList;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insert(SarFileSplitItemsValEO sarFileSplitItemsValEO) {
|
public int insert(SarFileSplitItemsValEO sarFileSplitItemsValEO) {
|
||||||
return dao.insert(sarFileSplitItemsValEO);
|
return dao.insert(sarFileSplitItemsValEO);
|
||||||
|
|||||||
+3
-395
@@ -1,15 +1,12 @@
|
|||||||
package com.jero.modules.split.service.impl;
|
package com.jero.modules.split.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.modules.split.entity.SarFileSplitMenuEO;
|
||||||
import com.jero.modules.split.entity.*;
|
import com.jero.modules.split.mapper.SarFileSplitItemsValEOMapper;
|
||||||
import com.jero.modules.split.mapper.*;
|
import com.jero.modules.split.mapper.SarFileSplitMenuEOMapper;
|
||||||
import com.jero.modules.split.page.SarFileSplitItemsEOPage;
|
|
||||||
import com.jero.modules.split.page.SarFileSplitMenuEOPage;
|
import com.jero.modules.split.page.SarFileSplitMenuEOPage;
|
||||||
import com.jero.modules.split.service.IFileSplitItemsEOService;
|
import com.jero.modules.split.service.IFileSplitItemsEOService;
|
||||||
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
||||||
import com.jero.modules.system.util.UserUtils;
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -37,172 +34,12 @@ public class SarFileSplitMenuEOServiceImpl extends ServiceImpl<SarFileSplitMenuE
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SarFileSplitMenuEOMapper dao;
|
private SarFileSplitMenuEOMapper dao;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SarFileSplitItemsEOMapper sarFileSplitItemsEOMapper;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SarFileSplitItemsValEOMapper sarFileSplitItemsValEOMapper;
|
private SarFileSplitItemsValEOMapper sarFileSplitItemsValEOMapper;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SarFileSplitItemsTableEOMapper sarFileSplitItemsTableEOMapper;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SarFileSplitItemsParamsMapper sarFileSplitItemsParamsMapper;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IFileSplitItemsEOService fileSplitItemsEOService;
|
private IFileSplitItemsEOService fileSplitItemsEOService;
|
||||||
|
|
||||||
public int dragMenu(DrageMenuEO drageMenuEO){
|
|
||||||
|
|
||||||
SarFileSplitMenuEO sarFileSplitMenuEO = new SarFileSplitMenuEO();
|
|
||||||
sarFileSplitMenuEO.setInfoId(drageMenuEO.getInfoId());
|
|
||||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
||||||
sarFileSplitMenuEO.setModifyUser(loginUser.getId());
|
|
||||||
sarFileSplitMenuEO.setModifyTime(new Date());
|
|
||||||
sarFileSplitMenuEO.setId(drageMenuEO.getMenuId());
|
|
||||||
int result = 0;
|
|
||||||
|
|
||||||
|
|
||||||
if (drageMenuEO.getMoveType().equals("inner")) {
|
|
||||||
sarFileSplitMenuEO.setPId(drageMenuEO.getTargetMenuId());
|
|
||||||
if (drageMenuEO.getMenuDisplay()>drageMenuEO.getTargetMenuDisplay()) {
|
|
||||||
// 修改被影响的其他节点的排序,修改时间,修改人
|
|
||||||
long childrenCount = dao.getChildrenCountByParentId(drageMenuEO.getMenuId());
|
|
||||||
sarFileSplitMenuEO.setChildrenCount(childrenCount);
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqStart(drageMenuEO.getTargetMenuDisplay()+1);
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqEnd(drageMenuEO.getMenuDisplay());
|
|
||||||
result += dao.updateDisplaySeqAdd(sarFileSplitMenuEO);
|
|
||||||
// 如果子节点个数多,都需修改
|
|
||||||
if (childrenCount>1) {
|
|
||||||
// 计算移动节点前后排序差
|
|
||||||
long betwttenNum = drageMenuEO.getMenuDisplay()-drageMenuEO.getTargetMenuDisplay()-1;
|
|
||||||
SarFileSplitMenuEO childrenUpdateEO = new SarFileSplitMenuEO();
|
|
||||||
childrenUpdateEO.setId(drageMenuEO.getMenuId());
|
|
||||||
childrenUpdateEO.setChildrenCount(betwttenNum);
|
|
||||||
childrenUpdateEO.setModifyTime(new Date());
|
|
||||||
childrenUpdateEO.setModifyUser(loginUser.getId());
|
|
||||||
result += dao.updateChildrenDisplaySeqByIDCut(childrenUpdateEO);
|
|
||||||
}
|
|
||||||
sarFileSplitMenuEO.setDisplaySeq(drageMenuEO.getTargetMenuDisplay()+1);
|
|
||||||
} else {
|
|
||||||
// 修改被影响的其他节点的排序,修改时间,修改人
|
|
||||||
long childrenCount = dao.getChildrenCountByParentId(drageMenuEO.getMenuId());
|
|
||||||
sarFileSplitMenuEO.setChildrenCount(childrenCount);
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqStart(drageMenuEO.getMenuDisplay()+childrenCount-1);
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqEnd(drageMenuEO.getTargetMenuDisplay());
|
|
||||||
result += dao.updateDisplaySeqCut(sarFileSplitMenuEO);
|
|
||||||
// 如果子节点个数多,都需修改
|
|
||||||
if (childrenCount>1) {
|
|
||||||
// 计算移动节点前后排序差
|
|
||||||
long betwttenNum = drageMenuEO.getTargetMenuDisplay()-childrenCount+1- drageMenuEO.getMenuDisplay();
|
|
||||||
SarFileSplitMenuEO childrenUpdateEO = new SarFileSplitMenuEO();
|
|
||||||
childrenUpdateEO.setId(drageMenuEO.getMenuId());
|
|
||||||
childrenUpdateEO.setChildrenCount(betwttenNum);
|
|
||||||
childrenUpdateEO.setModifyTime(new Date());
|
|
||||||
childrenUpdateEO.setModifyUser(loginUser.getId());
|
|
||||||
result += dao.updateChildrenDisplaySeqByIDAdd(childrenUpdateEO);
|
|
||||||
}
|
|
||||||
sarFileSplitMenuEO.setDisplaySeq(drageMenuEO.getTargetMenuDisplay()-childrenCount+1);
|
|
||||||
}
|
|
||||||
} else if (drageMenuEO.getMoveType().equals("prev")) {
|
|
||||||
sarFileSplitMenuEO.setPId(drageMenuEO.getTargetParentId());
|
|
||||||
if (drageMenuEO.getMenuDisplay()>drageMenuEO.getTargetMenuDisplay()) {
|
|
||||||
// 修改被影响的其他节点的排序,修改时间,修改人
|
|
||||||
long childrenCount = dao.getChildrenCountByParentId(drageMenuEO.getMenuId());
|
|
||||||
sarFileSplitMenuEO.setChildrenCount(childrenCount);
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqStart(drageMenuEO.getTargetMenuDisplay());
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqEnd(drageMenuEO.getMenuDisplay());
|
|
||||||
result += dao.updateDisplaySeqAdd(sarFileSplitMenuEO);
|
|
||||||
// 如果子节点个数多,都需修改
|
|
||||||
if (childrenCount>1) {
|
|
||||||
// 计算移动节点前后排序差
|
|
||||||
long betwttenNum = drageMenuEO.getMenuDisplay()-drageMenuEO.getTargetMenuDisplay();
|
|
||||||
SarFileSplitMenuEO childrenUpdateEO = new SarFileSplitMenuEO();
|
|
||||||
childrenUpdateEO.setId(drageMenuEO.getMenuId());
|
|
||||||
childrenUpdateEO.setChildrenCount(betwttenNum);
|
|
||||||
childrenUpdateEO.setModifyTime(new Date());
|
|
||||||
childrenUpdateEO.setModifyUser(loginUser.getId());
|
|
||||||
result += dao.updateChildrenDisplaySeqByIDCut(childrenUpdateEO);
|
|
||||||
}
|
|
||||||
sarFileSplitMenuEO.setDisplaySeq(drageMenuEO.getTargetMenuDisplay());
|
|
||||||
} else {
|
|
||||||
// 修改被影响的其他节点的排序,修改时间,修改人
|
|
||||||
long childrenCount = dao.getChildrenCountByParentId(drageMenuEO.getMenuId());
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqStart(drageMenuEO.getMenuDisplay()+childrenCount-1);
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqEnd(drageMenuEO.getTargetMenuDisplay()-1);
|
|
||||||
sarFileSplitMenuEO.setChildrenCount(childrenCount);
|
|
||||||
result += dao.updateDisplaySeqCut(sarFileSplitMenuEO);
|
|
||||||
// 如果子节点个数多,都需修改
|
|
||||||
if (childrenCount>1) {
|
|
||||||
// 计算移动节点前后排序差
|
|
||||||
long betwttenNum = drageMenuEO.getTargetMenuDisplay()- childrenCount - drageMenuEO.getMenuDisplay();
|
|
||||||
SarFileSplitMenuEO childrenUpdateEO = new SarFileSplitMenuEO();
|
|
||||||
childrenUpdateEO.setId(drageMenuEO.getMenuId());
|
|
||||||
childrenUpdateEO.setChildrenCount(betwttenNum);
|
|
||||||
childrenUpdateEO.setModifyTime(new Date());
|
|
||||||
childrenUpdateEO.setModifyUser(loginUser.getId());
|
|
||||||
result += dao.updateChildrenDisplaySeqByIDAdd(childrenUpdateEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
sarFileSplitMenuEO.setDisplaySeq(drageMenuEO.getTargetMenuDisplay()-childrenCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
sarFileSplitMenuEO.setPId(drageMenuEO.getTargetParentId());
|
|
||||||
if (drageMenuEO.getMenuDisplay()>drageMenuEO.getTargetMenuDisplay()) {
|
|
||||||
// 修改被影响的其他节点的排序,修改时间,修改人 往上移动
|
|
||||||
// 查询目标最大的排序
|
|
||||||
long targetDisplay = getMaxDisplayByid(drageMenuEO.getTargetMenuId());
|
|
||||||
// 查询移动节点包括子节点一共有多少个
|
|
||||||
long childrenCount = dao.getChildrenCountByParentId(drageMenuEO.getMenuId());
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqStart(targetDisplay+1);
|
|
||||||
sarFileSplitMenuEO.setChildrenCount(childrenCount);
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqEnd(drageMenuEO.getMenuDisplay());
|
|
||||||
result += dao.updateDisplaySeqAdd(sarFileSplitMenuEO);
|
|
||||||
// 如果子节点个数多,都需修改
|
|
||||||
if (childrenCount>1) {
|
|
||||||
// 计算移动节点前后排序差
|
|
||||||
long betwttenNum = drageMenuEO.getMenuDisplay()-targetDisplay-1;
|
|
||||||
SarFileSplitMenuEO childrenUpdateEO = new SarFileSplitMenuEO();
|
|
||||||
childrenUpdateEO.setId(drageMenuEO.getMenuId());
|
|
||||||
childrenUpdateEO.setChildrenCount(betwttenNum);
|
|
||||||
childrenUpdateEO.setModifyTime(new Date());
|
|
||||||
childrenUpdateEO.setModifyUser(loginUser.getId());
|
|
||||||
result += dao.updateChildrenDisplaySeqByIDCut(childrenUpdateEO);
|
|
||||||
}
|
|
||||||
sarFileSplitMenuEO.setDisplaySeq(targetDisplay+1);
|
|
||||||
} else {
|
|
||||||
// 修改被影响的其他节点的排序,修改时间,修改人 往下移动
|
|
||||||
// 如果该节点下有字节点,寻找该节点包括所有子节点的最大排序
|
|
||||||
// 查询目标最大的排序
|
|
||||||
long targetDisplay = getMaxDisplayByid(drageMenuEO.getTargetMenuId());
|
|
||||||
long menuMaxDisplay = getMaxDisplayByid(drageMenuEO.getMenuId());
|
|
||||||
// 查询移动节点包括子节点一共有多少个
|
|
||||||
long childrenCount = dao.getChildrenCountByParentId(drageMenuEO.getMenuId());
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqStart(menuMaxDisplay);
|
|
||||||
sarFileSplitMenuEO.setChildrenCount(childrenCount);
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqEnd(targetDisplay);
|
|
||||||
result += dao.updateDisplaySeqCut(sarFileSplitMenuEO);
|
|
||||||
// 如果子节点个数多,都需修改
|
|
||||||
if (childrenCount>1) {
|
|
||||||
// 计算移动节点前后排序差
|
|
||||||
long betwttenNum = targetDisplay-childrenCount+1 - drageMenuEO.getMenuDisplay();
|
|
||||||
SarFileSplitMenuEO childrenUpdateEO = new SarFileSplitMenuEO();
|
|
||||||
childrenUpdateEO.setId(drageMenuEO.getMenuId());
|
|
||||||
childrenUpdateEO.setChildrenCount(betwttenNum);
|
|
||||||
childrenUpdateEO.setModifyTime(new Date());
|
|
||||||
childrenUpdateEO.setModifyUser(loginUser.getId());
|
|
||||||
result += dao.updateChildrenDisplaySeqByIDAdd(childrenUpdateEO);
|
|
||||||
}
|
|
||||||
sarFileSplitMenuEO.setDisplaySeq(targetDisplay-childrenCount+1);
|
|
||||||
// 修改字节的的排序
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 修改当前节点,父亲Id,排序,修改时间,修改人
|
|
||||||
result += dao.updateByPrimaryKeySelective(sarFileSplitMenuEO);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 通过ID查询该结点及结点下所有的节点排序的最大值
|
// 通过ID查询该结点及结点下所有的节点排序的最大值
|
||||||
public int getMaxDisplayByid(String menuID) {
|
public int getMaxDisplayByid(String menuID) {
|
||||||
return dao.getMaxDisplayByid(menuID);
|
return dao.getMaxDisplayByid(menuID);
|
||||||
@@ -241,26 +78,6 @@ public class SarFileSplitMenuEOServiceImpl extends ServiceImpl<SarFileSplitMenuE
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean judgequeryMenuByPid(SarFileSplitMenuEO sarMenuEO) throws Exception {
|
|
||||||
boolean result = false; //true 表示有记录,false表示无记录
|
|
||||||
//先判断目录下是否有子节点
|
|
||||||
List<SarFileSplitMenuEO> list = dao.queryByPidExcpetSelf(sarMenuEO);
|
|
||||||
if(list.size()<=0){
|
|
||||||
//再查节点下是否有标准,法规,企业标准记录
|
|
||||||
SarFileSplitItemsEOPage itemEO = new SarFileSplitItemsEOPage();
|
|
||||||
itemEO.setMenuId(sarMenuEO.getId());
|
|
||||||
itemEO.setValidFlag("0");
|
|
||||||
List<SarFileSplitItemsEO> listresult = sarFileSplitItemsEOMapper.queryByList(itemEO);
|
|
||||||
if(listresult !=null && listresult.size()>0){
|
|
||||||
result=true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
result=true;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void deleteMenu(String id){
|
public void deleteMenu(String id){
|
||||||
List<String> menuIds = new ArrayList<>();
|
List<String> menuIds = new ArrayList<>();
|
||||||
SarFileSplitMenuEO sarMenuEO = new SarFileSplitMenuEO();
|
SarFileSplitMenuEO sarMenuEO = new SarFileSplitMenuEO();
|
||||||
@@ -276,218 +93,9 @@ public class SarFileSplitMenuEOServiceImpl extends ServiceImpl<SarFileSplitMenuE
|
|||||||
dao.deleteByPId(menuIds);
|
dao.deleteByPId(menuIds);
|
||||||
// 删除条款
|
// 删除条款
|
||||||
sarFileSplitItemsValEOMapper.deleteValByMenuIds(menuIds);
|
sarFileSplitItemsValEOMapper.deleteValByMenuIds(menuIds);
|
||||||
sarFileSplitItemsTableEOMapper.deleteTableByMenuIds(menuIds);
|
|
||||||
fileSplitItemsEOService.deleteByMenuIds(menuIds);
|
fileSplitItemsEOService.deleteByMenuIds(menuIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int copyMenu (SarFileSplitMenuEO sarMenuEO) {
|
|
||||||
int result = 0;
|
|
||||||
// 用来存放item的新旧ID,key:旧ID,value:新ID
|
|
||||||
Map itemIdMap = new HashMap<>();
|
|
||||||
List<String> oldItemIdList = new ArrayList<>();
|
|
||||||
Map itemValIdMap = new HashMap<>();
|
|
||||||
Map menuIdMap = new HashMap<>();
|
|
||||||
// 根据目录ID查询相关信息
|
|
||||||
sarMenuEO = dao.selectByPrimaryKey(sarMenuEO.getId());
|
|
||||||
// 查询该节点下所有的 子节点 并修改排序
|
|
||||||
List<SarFileSplitMenuEO> sarFileSplitMenuEOList = dao.queryAllChildrenByid(sarMenuEO);
|
|
||||||
int maxDisplay = dao.getMaxDisplayByid(sarMenuEO.getId());
|
|
||||||
SarFileSplitMenuEO sarFileSplitMenuEO = new SarFileSplitMenuEO();
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqStart(Long.valueOf(maxDisplay + 1));
|
|
||||||
sarFileSplitMenuEO.setDisplaySeqEnd(10000L);
|
|
||||||
sarFileSplitMenuEO.setChildrenCount(Long.valueOf(sarFileSplitMenuEOList.size()));
|
|
||||||
sarFileSplitMenuEO.setModifyUser(UserUtils.getUserId());
|
|
||||||
sarFileSplitMenuEO.setModifyTime(new Date());
|
|
||||||
sarFileSplitMenuEO.setInfoId(sarMenuEO.getInfoId());
|
|
||||||
dao.updateDisplaySeqAdd(sarFileSplitMenuEO);
|
|
||||||
for (SarFileSplitMenuEO sarFileSplitMenuEOfor : sarFileSplitMenuEOList) {
|
|
||||||
menuIdMap.put(sarFileSplitMenuEOfor.getId(),UUID.randomUUID().toString().replace("-", ""));
|
|
||||||
}
|
|
||||||
for (SarFileSplitMenuEO sarFileSplitMenuEOfor : sarFileSplitMenuEOList) {
|
|
||||||
sarFileSplitMenuEOfor.setId(menuIdMap.get(sarFileSplitMenuEOfor.getId()).toString());
|
|
||||||
if (menuIdMap.containsKey(sarFileSplitMenuEOfor.getPId())){
|
|
||||||
sarFileSplitMenuEOfor.setPId(menuIdMap.get(sarFileSplitMenuEOfor.getPId()).toString());
|
|
||||||
}
|
|
||||||
sarFileSplitMenuEOfor.setDisplaySeq(sarFileSplitMenuEOfor.getDisplaySeq() + sarFileSplitMenuEOList.size());
|
|
||||||
sarFileSplitMenuEOfor.setCreationTime(new Date());
|
|
||||||
sarFileSplitMenuEOfor.setModifyTime(new Date());
|
|
||||||
sarFileSplitMenuEOfor.setCreationUser(UserUtils.getUserId());
|
|
||||||
sarFileSplitMenuEOfor.setModifyUser(UserUtils.getUserId());
|
|
||||||
}
|
|
||||||
// SAR_FILE_ITEMS_MENU 添加数据,
|
|
||||||
result = dao.insertForeach(sarFileSplitMenuEOList);
|
|
||||||
// SAR_FILE_ITEMS 添加数据,
|
|
||||||
List<SarFileSplitItemsEO> sarFileSplitItemsEOList = sarFileSplitItemsEOMapper.queryItemsByMenuId(sarMenuEO.getId());
|
|
||||||
for (SarFileSplitItemsEO sarFileSplitItemsEO : sarFileSplitItemsEOList) {
|
|
||||||
String newItemId = UUID.randomUUID().toString().replace("-", "");
|
|
||||||
oldItemIdList.add(sarFileSplitItemsEO.getId());
|
|
||||||
itemIdMap.put(sarFileSplitItemsEO.getId(), newItemId);
|
|
||||||
sarFileSplitItemsEO.setId(newItemId);
|
|
||||||
sarFileSplitItemsEO.setMenuId(menuIdMap.get(sarFileSplitItemsEO.getMenuId()).toString());
|
|
||||||
sarFileSplitItemsEO.setCreationTime(new Date());
|
|
||||||
sarFileSplitItemsEO.setModifyTime(new Date());
|
|
||||||
sarFileSplitItemsEO.setCreationUser(UserUtils.getUserId());
|
|
||||||
sarFileSplitItemsEO.setModifyUser(UserUtils.getUserId());
|
|
||||||
}
|
|
||||||
if(sarFileSplitItemsEOList.size()>0){
|
|
||||||
result += sarFileSplitItemsEOMapper.insertForeach(sarFileSplitItemsEOList);
|
|
||||||
}
|
|
||||||
|
|
||||||
// SAR_FILE_ITEMS_VAL 添加数据,
|
|
||||||
if(oldItemIdList.size()>0){
|
|
||||||
List<SarFileSplitItemsValEO> sarFileSplitItemsValEOList = sarFileSplitItemsValEOMapper.queryItemsValByMenuId(oldItemIdList);
|
|
||||||
for (SarFileSplitItemsValEO sarFileSplitItemsValEO : sarFileSplitItemsValEOList) {
|
|
||||||
String newItemValId = UUID.randomUUID().toString().replace("-", "");
|
|
||||||
itemValIdMap.put(sarFileSplitItemsValEO.getId(), newItemValId);
|
|
||||||
sarFileSplitItemsValEO.setId(newItemValId);
|
|
||||||
sarFileSplitItemsValEO.setItemId(itemIdMap.get(sarFileSplitItemsValEO.getItemId()).toString());
|
|
||||||
sarFileSplitItemsValEO.setCreationTime(new Date());
|
|
||||||
sarFileSplitItemsValEO.setModifyTime(new Date());
|
|
||||||
sarFileSplitItemsValEO.setCreationUser(UserUtils.getUserId());
|
|
||||||
sarFileSplitItemsValEO.setModifyUser(UserUtils.getUserId());
|
|
||||||
}
|
|
||||||
if (sarFileSplitItemsValEOList.size()>0) {
|
|
||||||
result += sarFileSplitItemsValEOMapper.insertForeach(sarFileSplitItemsValEOList);
|
|
||||||
}
|
|
||||||
// SAR_FILE_ITEMS_PARAMS 添加数据,
|
|
||||||
List<SarFileSplitItemsParamsEO> sarFileSplitItemsParamsEOList = sarFileSplitItemsParamsMapper.queryItemsParamsByMenuId(oldItemIdList);
|
|
||||||
for (SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO : sarFileSplitItemsParamsEOList) {
|
|
||||||
sarFileSplitItemsParamsEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
||||||
sarFileSplitItemsParamsEO.setItemId(itemIdMap.get(sarFileSplitItemsParamsEO.getItemId()).toString());
|
|
||||||
sarFileSplitItemsParamsEO.setCreationTime(new Date());
|
|
||||||
sarFileSplitItemsParamsEO.setModifyTime(new Date());
|
|
||||||
}
|
|
||||||
if (sarFileSplitItemsParamsEOList.size()>0){
|
|
||||||
result += sarFileSplitItemsParamsMapper.insertForeach(sarFileSplitItemsParamsEOList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// SAR_FILE_ITEMS_TABLE 添加数据,
|
|
||||||
// List<SarFileSplitItemsTableEO> sarFileSplitItemsTableEOList = sarFileSplitItemsTableEODao.queryItemsTableByMenuId(oldItemIdList);
|
|
||||||
// for (SarFileSplitItemsTableEO sarFileSplitItemsTableEO : sarFileSplitItemsTableEOList) {
|
|
||||||
// sarFileSplitItemsTableEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
||||||
// sarFileSplitItemsTableEO.setItemsId(itemIdMap.get(sarFileSplitItemsTableEO.getItemsId()).toString());
|
|
||||||
// sarFileSplitItemsTableEO.setItemsValId(itemValIdMap.get(sarFileSplitItemsTableEO.getItemsValId()).toString());
|
|
||||||
// sarFileSplitItemsTableEO.setCreationTime(new Date());
|
|
||||||
// sarFileSplitItemsTableEO.setModifyTime(new Date());
|
|
||||||
// sarFileSplitItemsTableEO.setModifyUser(UserUtils.getUserId());
|
|
||||||
// }
|
|
||||||
// if (sarFileSplitItemsTableEOList.size()>0){
|
|
||||||
// result += sarFileSplitItemsTableEODao.insertForeach(sarFileSplitItemsTableEOList);
|
|
||||||
// }
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int copyMenuNotChildren(Map<String, Object> itemsMap) {
|
|
||||||
int result =0;
|
|
||||||
List<String> oldItemIdList = new ArrayList<>();
|
|
||||||
Map itemValIdMap = new HashMap<>();
|
|
||||||
String itemId = itemsMap.get("id").toString();
|
|
||||||
oldItemIdList.add(itemId);
|
|
||||||
|
|
||||||
itemsMap = fileSplitItemsEOService.selectByPrimaryKey(itemId);
|
|
||||||
|
|
||||||
// 查询该节点下所有的 子节点 并修改排序
|
|
||||||
SarFileSplitMenuEO sarMenuEO = new SarFileSplitMenuEO();
|
|
||||||
sarMenuEO.setId(itemsMap.get("menu_id").toString());
|
|
||||||
// List<SarFileSplitMenuEO> sarFileSplitMenuEOList = dao.queryAllChildrenByid(sarMenuEO);
|
|
||||||
// sarMenuEO = dao.selectByPrimaryKey(sarMenuEO.getId());
|
|
||||||
// int maxDisplay = dao.getMaxDisplayByid(sarMenuEO.getId());
|
|
||||||
// SarFileSplitMenuEO sarFileSplitMenuEO = new SarFileSplitMenuEO();
|
|
||||||
// sarFileSplitMenuEO.setDisplaySeqStart(Long.valueOf(maxDisplay + 1));
|
|
||||||
// sarFileSplitMenuEO.setDisplaySeqEnd(10000L);
|
|
||||||
// sarFileSplitMenuEO.setChildrenCount(1L);
|
|
||||||
// sarFileSplitMenuEO.setModifyUser(UserUtils.getUserId());
|
|
||||||
// sarFileSplitMenuEO.setModifyTime(new Date());
|
|
||||||
// sarFileSplitMenuEO.setInfoId(itemsMap.get("info_id").toString());
|
|
||||||
// dao.updateDisplaySeqAdd(sarFileSplitMenuEO);
|
|
||||||
|
|
||||||
// SAR_FILE_ITEMS_MENU 添加数据,
|
|
||||||
// sarMenuEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
||||||
// sarMenuEO.setDisplaySeq(Long.valueOf(maxDisplay + 1));
|
|
||||||
// sarMenuEO.setCreationTime(new Date());
|
|
||||||
// sarMenuEO.setModifyTime(new Date());
|
|
||||||
// sarMenuEO.setCreationUser(UserUtils.getUserId());
|
|
||||||
// sarMenuEO.setModifyUser(UserUtils.getUserId());
|
|
||||||
// result = dao.insertSelective(sarMenuEO);
|
|
||||||
|
|
||||||
// SAR_FILE_ITEMS 添加数据,
|
|
||||||
String newItemId = UUID.randomUUID().toString().replace("-", "");
|
|
||||||
itemsMap.put("menu_id", sarMenuEO.getId());
|
|
||||||
itemsMap.remove("id");
|
|
||||||
itemsMap.remove("creation_user");
|
|
||||||
itemsMap.remove("creation_time");
|
|
||||||
itemsMap.remove("modify_user");
|
|
||||||
itemsMap.remove("modify_time");
|
|
||||||
itemsMap.remove("sys_org_code");
|
|
||||||
itemsMap = fileSplitItemsEOService.filterMap(itemsMap);
|
|
||||||
result += fileSplitItemsEOService.insertInfo(itemsMap, newItemId,"add");
|
|
||||||
|
|
||||||
// SAR_FILE_ITEMS_VAL 添加数据,
|
|
||||||
List<SarFileSplitItemsValEO> sarFileSplitItemsValEOList = sarFileSplitItemsValEOMapper.queryItemsValByMenuId(oldItemIdList);
|
|
||||||
for (SarFileSplitItemsValEO sarFileSplitItemsValEO : sarFileSplitItemsValEOList) {
|
|
||||||
String newItemValId = UUID.randomUUID().toString().replace("-", "");
|
|
||||||
itemValIdMap.put(sarFileSplitItemsValEO.getId(), newItemValId);
|
|
||||||
sarFileSplitItemsValEO.setId(newItemValId);
|
|
||||||
sarFileSplitItemsValEO.setItemId(newItemId);
|
|
||||||
sarFileSplitItemsValEO.setCreationTime(new Date());
|
|
||||||
sarFileSplitItemsValEO.setModifyTime(new Date());
|
|
||||||
sarFileSplitItemsValEO.setCreationUser(UserUtils.getUserId());
|
|
||||||
sarFileSplitItemsValEO.setModifyUser(UserUtils.getUserId());
|
|
||||||
}
|
|
||||||
if (sarFileSplitItemsValEOList.size()>0) {
|
|
||||||
result += sarFileSplitItemsValEOMapper.insertForeach(sarFileSplitItemsValEOList);
|
|
||||||
}
|
|
||||||
// SAR_FILE_ITEMS_PARAMS 添加数据,
|
|
||||||
// List<SarFileSplitItemsParamsEO> sarFileSplitItemsParamsEOList = sarFileSplitItemsParamsMapper.queryItemsParamsByMenuId(oldItemIdList);
|
|
||||||
// for (SarFileSplitItemsParamsEO sarFileSplitItemsParamsEO : sarFileSplitItemsParamsEOList) {
|
|
||||||
// sarFileSplitItemsParamsEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
||||||
// sarFileSplitItemsParamsEO.setItemId(newItemId);
|
|
||||||
// sarFileSplitItemsParamsEO.setCreationTime(new Date());
|
|
||||||
// sarFileSplitItemsParamsEO.setModifyTime(new Date());
|
|
||||||
// }
|
|
||||||
// if (sarFileSplitItemsParamsEOList.size()>0){
|
|
||||||
// result += sarFileSplitItemsParamsMapper.insertForeach(sarFileSplitItemsParamsEOList);
|
|
||||||
// }
|
|
||||||
// SAR_FILE_ITEMS_TABLE 添加数据,
|
|
||||||
// List<SarFileSplitItemsTableEO> sarFileSplitItemsTableEOList = sarFileSplitItemsTableEOMapper.queryItemsTableByMenuId(oldItemIdList);
|
|
||||||
// for (SarFileSplitItemsTableEO sarFileSplitItemsTableEO : sarFileSplitItemsTableEOList) {
|
|
||||||
// sarFileSplitItemsTableEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
||||||
// sarFileSplitItemsTableEO.setItemsId(newItemId);
|
|
||||||
// sarFileSplitItemsTableEO.setItemsValId(itemValIdMap.get(sarFileSplitItemsTableEO.getItemsValId()).toString());
|
|
||||||
// sarFileSplitItemsTableEO.setCreationTime(new Date());
|
|
||||||
// sarFileSplitItemsTableEO.setModifyTime(new Date());
|
|
||||||
// sarFileSplitItemsTableEO.setModifyUser(UserUtils.getUserId());
|
|
||||||
// }
|
|
||||||
// if (sarFileSplitItemsTableEOList.size()>0){
|
|
||||||
// result += sarFileSplitItemsTableEOMapper.insertForeach(sarFileSplitItemsTableEOList);
|
|
||||||
// }
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String addMenuForImport(SarFileSplitMenuEO sarFileSplitMenuEO){
|
|
||||||
sarFileSplitMenuEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
||||||
sarFileSplitMenuEO.setValidFlag(0);
|
|
||||||
sarFileSplitMenuEO.setCreationTime(new Date());
|
|
||||||
sarFileSplitMenuEO.setModifyTime(new Date());
|
|
||||||
int count = dao.insertSelective(sarFileSplitMenuEO);
|
|
||||||
// 之后的所有节点序号增加
|
|
||||||
SarFileSplitMenuEOPage page = new SarFileSplitMenuEOPage();
|
|
||||||
page.setPId(sarFileSplitMenuEO.getPId());
|
|
||||||
List<SarFileSplitMenuEO> getList = dao.queryByList(page);
|
|
||||||
if (getList != null && !getList.isEmpty()) {
|
|
||||||
for(SarFileSplitMenuEO menu : getList){
|
|
||||||
Long olgSeq = menu.getDisplaySeq();
|
|
||||||
if (olgSeq >= sarFileSplitMenuEO.getDisplaySeq()) {
|
|
||||||
menu.setDisplaySeq(olgSeq + 1);
|
|
||||||
dao.updateByPrimaryKeySelective(menu);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sarFileSplitMenuEO.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insert(SarFileSplitMenuEO sarFileSplitMenuEO) {
|
public int insert(SarFileSplitMenuEO sarFileSplitMenuEO) {
|
||||||
return dao.insert(sarFileSplitMenuEO);
|
return dao.insert(sarFileSplitMenuEO);
|
||||||
|
|||||||
Reference in New Issue
Block a user