Merge branch 'develop_master' into develop_3
# Conflicts: # adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandardsInfo/service/impl/SarStandardsInfoServiceImpl.java
This commit is contained in:
@@ -60,6 +60,7 @@ public class TsInstitution extends BaseEntity {
|
||||
private String hasChild;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("用户")
|
||||
private TsUserVO tsUserVO;
|
||||
|
||||
|
||||
+20
-9
@@ -11,6 +11,7 @@ import com.adc.da.slrs.sarLawsAttrDetailedList.service.ISarLawsAttrDetailedListS
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -21,6 +22,7 @@ import com.adc.da.base.web.BaseController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -59,7 +61,7 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
@ApiOperation(value = "查询标准信息")
|
||||
@GetMapping("/selectLawsById")
|
||||
public ResponseMessage selectLawsById(SarFindDto sarFindDto){
|
||||
List<LawsDto> laws = iSarLawsAttrDetailedList.selectLaws(sarFindDto);
|
||||
IPage<LawsDto> laws = iSarLawsAttrDetailedList.selectLaws(sarFindDto);
|
||||
return Result.success("200",laws);
|
||||
}
|
||||
|
||||
@@ -117,21 +119,26 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
@ApiOperation(value = "导出标准信息")
|
||||
@GetMapping("/ExportLawsById")
|
||||
public void ExportLawsById(HttpServletResponse response, StandExcelVo standExcelVo){
|
||||
try {
|
||||
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
if(standExcelVo.getExportName()==null){
|
||||
standExcelVo.setExportName("标准导出信息");
|
||||
}
|
||||
String fileName = URLEncoder.encode(standExcelVo.getExportName(), "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
String fileName = null;
|
||||
try {
|
||||
fileName = URLEncoder.encode(standExcelVo.getExportName(), "UTF-8").replaceAll("\\+", "%20");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
List<LawsDto> data = new ArrayList<>();
|
||||
if (CollectionUtils.isEmpty(standExcelVo.getIds())){
|
||||
List<String> list= sarLawsAttrDetailedListDao.selectLawsId2(standExcelVo.getId());
|
||||
if (CollectionUtils.isEmpty(list)) return;
|
||||
data=sarLawsAttrDetailedListDao.selectLawsById(list,null);
|
||||
data=sarLawsAttrDetailedListDao.selectLawsByIdE(list);
|
||||
}else {
|
||||
data=sarLawsAttrDetailedListDao.selectLawsById(standExcelVo.getIds(),null);
|
||||
data=sarLawsAttrDetailedListDao.selectLawsByIdE(standExcelVo.getIds());
|
||||
}
|
||||
//适用车型
|
||||
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
|
||||
@@ -248,10 +255,14 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
EasyExcel.write(response.getOutputStream(), LawsDto.class).useDefaultStyle(false).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(data);
|
||||
} catch (Exception e) {
|
||||
response.reset();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
response.reset();
|
||||
response.setContentType("application/json");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
try {
|
||||
@@ -261,6 +272,6 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -25,6 +25,10 @@ public interface SarLawsAttrDetailedListDao extends BaseMapper<SarLawsAttrDetail
|
||||
List<String> selectLawsId(@Param("standId") String standId,@Param("param3") Integer page,@Param("param2") Integer size);
|
||||
//根据标准id查出数据
|
||||
List<LawsDto> selectLawsById(@Param("param1") List<String> LawsIds, @Param("sarFindDto") SarFindDto sarFindDto);
|
||||
//根据标准id查出数据用于清单查询
|
||||
List<LawsDto> selectLawsByIdList(@Param("param1") List<String> LawsIds, @Param("sarFindDto") SarFindDto sarFindDto);
|
||||
//用于导出
|
||||
List<LawsDto> selectLawsByIdE(@Param("param1") List<String> LawsIds);
|
||||
//根据标准id查出数据
|
||||
List<LawsDto> selectLawsByIdC(@Param("param1") List<String> LawsIds, @Param("standName") String standName,@Param("standType")String standType);
|
||||
//查询时间
|
||||
|
||||
+38
-11
@@ -26,66 +26,93 @@ import lombok.NoArgsConstructor;
|
||||
public class LawsDto {
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
@ExcelProperty(value = "标准编号", index = 0)
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private String standNumber;
|
||||
|
||||
@ExcelProperty(value = "中文名称", index = 1)
|
||||
@ApiModelProperty(value = "中文名称")
|
||||
private String standName;
|
||||
|
||||
@ExcelProperty(value = "英文名称", index = 2)
|
||||
@ApiModelProperty(value = "英文名称")
|
||||
private String standEnName;
|
||||
|
||||
@ExcelProperty(value = "适用车型", index = 3)
|
||||
@ApiModelProperty(value = "适用车型")
|
||||
private String typeApplicable;
|
||||
|
||||
@ExcelProperty(value = "能源类型", index = 4)
|
||||
@ApiModelProperty(value = "能源类型")
|
||||
private String NYLX;
|
||||
|
||||
@ApiModelProperty(value = "标准年份")
|
||||
@ExcelProperty(value = "标准年份", index = 5)
|
||||
private String standYear;
|
||||
|
||||
@ApiModelProperty(value = "标准类别")
|
||||
@ExcelProperty(value = "标准类别", index = 6)
|
||||
private String standSortShow;
|
||||
@ExcelProperty(value = "标准类别", index = 6)
|
||||
|
||||
@ApiModelProperty(value = "标准发表日期")
|
||||
@ExcelProperty(value = "标准发表日期", index = 7)
|
||||
private String issueTime;
|
||||
|
||||
@ColumnWidth(16)
|
||||
@ExcelProperty(value = "标准实施日期", index = 7)
|
||||
@ExcelProperty(value = "标准实施日期", index = 8)
|
||||
@ApiModelProperty(value = "标准实施日期")
|
||||
@DateTimeFormat("yyyy年MM月dd日")
|
||||
private String putTime;
|
||||
|
||||
@ColumnWidth(16)
|
||||
@ExcelProperty(value = "新车型实施日期", index = 8)
|
||||
@ExcelProperty(value = "新车型实施日期", index = 9)
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
@DateTimeFormat("yyyy年MM月dd日")
|
||||
private String XCXSSRQGJ;
|
||||
|
||||
@ColumnWidth(16)
|
||||
@ExcelProperty(value = "在产车实施日期", index = 8)
|
||||
@ExcelProperty(value = "在产车实施日期", index = 10)
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
@DateTimeFormat("yyyy年MM月dd日")
|
||||
private String ZCCSSRQGJ;
|
||||
@ExcelProperty(value = "责任部门", index = 9)
|
||||
|
||||
@ExcelProperty(value = "责任部门", index = 11)
|
||||
@ApiModelProperty(value = "责任部门")
|
||||
private String ZRBM;
|
||||
|
||||
@ColumnWidth(14)
|
||||
@ExcelProperty(value = "适用产品线", index = 10)
|
||||
@ExcelProperty(value = "适用产品线", index = 12)
|
||||
@ApiModelProperty(value = "适用产品线")
|
||||
private String SYCPX;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(value = "乘用车VPPS编码", index = 11)
|
||||
@ExcelProperty(value = "乘用车VPPS编码", index = 13)
|
||||
@ApiModelProperty(value = "乘用车VPPS编码")
|
||||
private String CYCVPPSBM;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(value = "乘用车vpps中文名称", index = 12)
|
||||
@ExcelProperty(value = "乘用车vpps中文名称", index = 14)
|
||||
@ApiModelProperty(value = "乘用车vpps中文名称")
|
||||
private String CYCVPPSCN;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(value = "卡车VPPS编码", index = 13)
|
||||
@ExcelProperty(value = "卡车VPPS编码", index = 15)
|
||||
@ApiModelProperty(value = "卡车VPPS编码")
|
||||
private String KCCVPPSBM;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(value = "卡车vpps中文名称", index = 14)
|
||||
@ExcelProperty(value = "卡车vpps中文名称", index = 16)
|
||||
@ApiModelProperty(value = "卡车vpps中文名称")
|
||||
private String KCCVPPSCN;
|
||||
|
||||
@ApiModelProperty(value = "责任工程师")
|
||||
@ExcelProperty(value = "责任工程师", index = 15)
|
||||
@ExcelProperty(value = "责任工程师", index = 17)
|
||||
private String responsibleEngineer;
|
||||
|
||||
@ApiModelProperty(value = "1")
|
||||
private String standType;
|
||||
|
||||
@ApiModelProperty(value = "文本状态")
|
||||
private String textStatus;
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@@ -8,7 +7,7 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //导出类
|
||||
*用于导出标准数据信息
|
||||
* 需要后期修改
|
||||
* @author ZhangZhiYuan
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //接收所导出的文件名
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-06-24
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //新增清单进行时间的添加
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-21
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //标准时间
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-21
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@ package com.adc.da.slrs.sarLawsAttrDetailedList.service;
|
||||
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.*;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.TimeDto;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -18,7 +19,7 @@ import java.util.Map;
|
||||
*/
|
||||
public interface ISarLawsAttrDetailedListService extends IService<SarLawsAttrDetailedList> {
|
||||
|
||||
List<LawsDto> selectLaws(SarFindDto sarFindDto);
|
||||
IPage<LawsDto> selectLaws(SarFindDto sarFindDto);
|
||||
Boolean insertDetailedList(String id,List<TimeDto> timeDto);
|
||||
Boolean updateDetailedLaws(String id,List<TimeDto> timeDtos);
|
||||
void exportExcel(HttpServletResponse response, StandExcelVo standExcelVo);
|
||||
|
||||
+19
-3
@@ -3,11 +3,12 @@ package com.adc.da.slrs.sarLawsAttrDetailedList.service.impl;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.*;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.service.ISarLawsAttrDetailedListService;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.SarLawsDetailedList;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.TimeDto;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -37,7 +38,13 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
||||
|
||||
//从主表中查询信息
|
||||
@Override
|
||||
public List<LawsDto> selectLaws(SarFindDto sarFindDto) {
|
||||
public IPage<LawsDto> selectLaws(SarFindDto sarFindDto) {
|
||||
//获取封装信息
|
||||
IPage<SarLawsAttrDetailedList> pageRes = new Page<>(sarFindDto.getPage(), sarFindDto.getSize());
|
||||
QueryWrapper<SarLawsAttrDetailedList> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("detailed_list_id", sarFindDto.getId());
|
||||
IPage<SarLawsAttrDetailedList> selectPage = sarLawsAttrDetailedListDao.selectPage(pageRes,wrapper);
|
||||
//查询标准id
|
||||
List<String> lawsIds = sarLawsAttrDetailedListDao.selectLawsId(sarFindDto.getId(),(sarFindDto.getPage())-1,sarFindDto.getSize());
|
||||
if (CollectionUtils.isEmpty(lawsIds)){
|
||||
return null;
|
||||
@@ -57,6 +64,8 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
||||
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getZccssrq())){
|
||||
lawsDto.setZCCSSRQGJ(sarLawsAttrDetailedLists.get(0).getZccssrq());
|
||||
}
|
||||
if ("INLAND".equals(lawsDto.getStandType()))lawsDto.setStandType("INLAND_STAND");
|
||||
if ("FOREIGN".equals(lawsDto.getStandType()))lawsDto.setStandType("FOREIGN_STAND");
|
||||
}
|
||||
//适用车型
|
||||
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
|
||||
@@ -167,7 +176,14 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
IPage<LawsDto> list1 = new Page<>();
|
||||
list1.setRecords(list);
|
||||
list1.setCurrent(selectPage.getCurrent());
|
||||
list1.setTotal(selectPage.getTotal());
|
||||
list1.setSize(selectPage.getSize());
|
||||
list1.setPages(selectPage.getPages());
|
||||
return list1;
|
||||
}
|
||||
|
||||
//向清单表和主表中的关联表插入信息
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //继承类的数据转移
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-26
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //新增dto
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-06-24
|
||||
|
||||
+1
-4
@@ -1,15 +1,12 @@
|
||||
package com.adc.da.slrs.sarLawsDetailedList.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //修改dto
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-06-25
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.adc.da.slrs.sarLawsDetailedList.entity;
|
||||
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-29
|
||||
*/
|
||||
@Data
|
||||
public class ExcelDto extends SarStandUnqualified {
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private String createTime1;
|
||||
@ExcelProperty("计划关闭时间")
|
||||
private String planCloseTime1;
|
||||
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.adc.da.slrs.sarLawsDetailedList.entity;
|
||||
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //文件名回显
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-26
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //导出标准信息进行接收ids
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-06-22
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package com.adc.da.slrs.sarLawsDetailedList.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //用于新增清单的三个时间
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-21
|
||||
|
||||
+64
-100
@@ -60,10 +60,6 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
|
||||
@Override
|
||||
public String add(AddDetailedDto addDetailedDto) {
|
||||
addDetailedDto.setInforlist(addDetailedDto.getInforlist().substring(1, addDetailedDto.getInforlist().length() -1));
|
||||
addDetailedDto.setInforlist1(addDetailedDto.getInforlist1().substring(1, addDetailedDto.getInforlist1().length() -1));
|
||||
addDetailedDto.setInforlist2(addDetailedDto.getInforlist2().substring(1, addDetailedDto.getInforlist2().length() -1));
|
||||
addDetailedDto.setInforlist3(addDetailedDto.getInforlist3().substring(1, addDetailedDto.getInforlist3().length() -1));
|
||||
try {
|
||||
SarLawsDetailedList sarLawsDetailedList = SarLawsDetailedList.builder()
|
||||
.id(UUIDUtils.randomUUID20())
|
||||
@@ -82,89 +78,60 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
switch (addDetailedDto.getSortKey()) {
|
||||
case "1":
|
||||
sarLawsDetailedList.setCountryArea(addDetailedDto.getCountryArea());
|
||||
if (addDetailedDto.getInforlist()!=null){
|
||||
if (addDetailedDto.getInforlist().contains(",")){
|
||||
String[] id = addDetailedDto.getInforlist().split(",");
|
||||
String[] putTime = addDetailedDto.getInforlist1().split(",");
|
||||
String[] zcc = addDetailedDto.getInforlist2().split(",");
|
||||
String[] xcx = addDetailedDto.getInforlist3().split(",");
|
||||
for (int a =0;a< id.length;a++){
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(id[a]);
|
||||
if (null==putTime[a]){
|
||||
dto.setPutTime(null);
|
||||
}else {
|
||||
dto.setPutTime(putTime[a]);
|
||||
}
|
||||
if (null == xcx[a]){
|
||||
dto.setXcxssrqgj(null);
|
||||
}else {
|
||||
dto.setXcxssrqgj(xcx[a]);
|
||||
}
|
||||
if (null == zcc[a]){
|
||||
dto.setZccssrqgj(null);
|
||||
}else {
|
||||
dto.setZccssrqgj(zcc[a]);
|
||||
}
|
||||
timeDto.add(dto);
|
||||
}
|
||||
}else {
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(addDetailedDto.getInforlist());
|
||||
dto.setPutTime(addDetailedDto.getInforlist1());
|
||||
dto.setXcxssrqgj(addDetailedDto.getInforlist2());
|
||||
dto.setZccssrqgj(addDetailedDto.getInforlist3());
|
||||
timeDto.add(dto);
|
||||
}
|
||||
}else {
|
||||
timeDto=null;
|
||||
}
|
||||
|
||||
break;
|
||||
case "2":
|
||||
sarLawsDetailedList.setProjectName(addDetailedDto.getProjectName());
|
||||
if (addDetailedDto.getInforlist() != null){
|
||||
if (addDetailedDto.getInforlist().contains(",")){
|
||||
String[] id = addDetailedDto.getInforlist().split(",");
|
||||
for (String standId:id){
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(standId);
|
||||
timeDto.add(dto);
|
||||
}
|
||||
}else {
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(addDetailedDto.getInforlist());
|
||||
timeDto.add(dto);
|
||||
}
|
||||
}else {
|
||||
timeDto=null;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
case "3":
|
||||
sarLawsDetailedList.setDetailedList(addDetailedDto.getDetailedList());
|
||||
if (addDetailedDto.getInforlist() != null){
|
||||
if (addDetailedDto.getInforlist().contains(",")){
|
||||
String[] id = addDetailedDto.getInforlist().split(",");
|
||||
for (String standId:id){
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(standId);
|
||||
timeDto.add(dto);
|
||||
}
|
||||
}else {
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(addDetailedDto.getInforlist());
|
||||
timeDto.add(dto);
|
||||
}
|
||||
}else {
|
||||
timeDto=null;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if ("admin".equals(getUserName()))sarLawsDetailedList.setUpdatePeople("管理员");
|
||||
else {sarLawsDetailedList.setUpdatePeople(getUserName());}
|
||||
|
||||
if (addDetailedDto.getInforlist()!=null){
|
||||
if (addDetailedDto.getInforlist().contains(",")){
|
||||
String[] id = addDetailedDto.getInforlist().split(",");
|
||||
String[] putTime = addDetailedDto.getInforlist1().split(",");
|
||||
String[] zcc = addDetailedDto.getInforlist2().split(",");
|
||||
String[] xcx = addDetailedDto.getInforlist3().split(",");
|
||||
for (int a =0;a< id.length;a++){
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(id[a]);
|
||||
if (null==putTime[a]){
|
||||
dto.setPutTime(null);
|
||||
}else {
|
||||
dto.setPutTime(putTime[a]);
|
||||
}
|
||||
if (null == xcx[a]){
|
||||
dto.setXcxssrqgj(null);
|
||||
}else {
|
||||
dto.setXcxssrqgj(xcx[a]);
|
||||
}
|
||||
if (null == zcc[a]){
|
||||
dto.setZccssrqgj(null);
|
||||
}else {
|
||||
dto.setZccssrqgj(zcc[a]);
|
||||
}
|
||||
timeDto.add(dto);
|
||||
}
|
||||
}else {
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(addDetailedDto.getInforlist());
|
||||
dto.setPutTime(addDetailedDto.getInforlist1());
|
||||
dto.setXcxssrqgj(addDetailedDto.getInforlist2());
|
||||
dto.setZccssrqgj(addDetailedDto.getInforlist3());
|
||||
timeDto.add(dto);
|
||||
}
|
||||
}else {
|
||||
timeDto=null;
|
||||
}
|
||||
sarLawsDetailedListDao.insert(sarLawsDetailedList);
|
||||
service.insertDetailedList(sarLawsDetailedList.getId(),timeDto);
|
||||
|
||||
@@ -277,45 +244,42 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
else list.setFileIds(detailedUpDto.getFileIds());
|
||||
|
||||
sarLawsDetailedListDao.updateById(list);
|
||||
if (null != detailedUpDto.getInforlist()) {
|
||||
detailedUpDto.setInforlist(detailedUpDto.getInforlist().substring(1, detailedUpDto.getInforlist().length() - 1));
|
||||
String src = "\"\"";
|
||||
if (src.equals(detailedUpDto.getInforlist()) || null != detailedUpDto.getInforlist()) {
|
||||
|
||||
List<TimeDto> timeDto = new ArrayList<>();
|
||||
if ("1".equals(detailedUpDto.getSortKey()) && detailedUpDto.getInforlist().contains(",")) {
|
||||
if ( detailedUpDto.getInforlist().contains(",")) {
|
||||
String[] id = detailedUpDto.getInforlist().split(",");
|
||||
String[] putTime = detailedUpDto.getInforlist1().split(",");
|
||||
String[] zcc = detailedUpDto.getInforlist2().split(",");
|
||||
String[] xcx = detailedUpDto.getInforlist3().split(",");
|
||||
for (int a = 0; a < id.length; a++) {
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(id[a]);
|
||||
if ("\"".equals(putTime[a])) {
|
||||
dto.setPutTime(null);
|
||||
} else {
|
||||
dto.setPutTime(putTime[a]);
|
||||
for (int a = 0; a < id.length; a++) {
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(id[a]);
|
||||
if (putTime.length<=a) {
|
||||
dto.setPutTime(null);
|
||||
} else {
|
||||
dto.setPutTime(putTime[a]);
|
||||
}
|
||||
if (putTime.length<=a) {
|
||||
dto.setXcxssrqgj(null);
|
||||
} else {
|
||||
dto.setXcxssrqgj(xcx[a]);
|
||||
}
|
||||
if (putTime.length<=a) {
|
||||
dto.setZccssrqgj(null);
|
||||
} else {
|
||||
dto.setZccssrqgj(zcc[a]);
|
||||
}
|
||||
timeDto.add(dto);
|
||||
}
|
||||
if ("\"".equals(putTime[a])) {
|
||||
dto.setXcxssrqgj(null);
|
||||
} else {
|
||||
dto.setXcxssrqgj(xcx[a]);
|
||||
}
|
||||
if ("\"".equals(putTime[a])) {
|
||||
dto.setZccssrqgj(null);
|
||||
} else {
|
||||
dto.setZccssrqgj(zcc[a]);
|
||||
}
|
||||
timeDto.add(dto);
|
||||
}
|
||||
} else if ("1".equals(detailedUpDto.getSortKey())){
|
||||
} else {
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(detailedUpDto.getInforlist());
|
||||
dto.setPutTime(detailedUpDto.getInforlist1());
|
||||
dto.setXcxssrqgj(detailedUpDto.getInforlist2());
|
||||
dto.setZccssrqgj(detailedUpDto.getInforlist3());
|
||||
timeDto.add(dto);
|
||||
}else {
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(detailedUpDto.getInforlist());
|
||||
timeDto.add(dto);
|
||||
}
|
||||
service.updateDetailedLaws(detailedUpDto.getId(), timeDto);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarRole.controller;
|
||||
|
||||
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.login.util.UserUtils;
|
||||
@@ -9,6 +10,7 @@ import com.adc.da.slrs.sarRole.entity.TsRoleMenuVO;
|
||||
import com.adc.da.slrs.sarRole.entity.TsRoleResourceVO;
|
||||
import com.adc.da.slrs.sarRole.service.ITsRoleService;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -53,10 +55,17 @@ public class TsRoleController extends BaseController<TsRole> {
|
||||
@ApiOperation("新增角色")
|
||||
@PostMapping
|
||||
public ResponseMessage<Object> addRole(@Validated(TsRole.insert.class) @RequestBody TsRole tsRole){
|
||||
//设置操作人
|
||||
UserEO userEO=UserUtils.getUser();
|
||||
tsRole.setOperator(userEO.getUname());
|
||||
return tsRoleService.addRole(tsRole);
|
||||
QueryWrapper<TsRole> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("NAME",tsRole.getName());
|
||||
int count = tsRoleService.count(queryWrapper);
|
||||
if (count>0){
|
||||
throw new AdcDaBaseException("角色名称已存在,请更换角色名称。");
|
||||
}else {
|
||||
//设置操作人
|
||||
UserEO userEO = UserUtils.getUser();
|
||||
tsRole.setOperator(userEO.getUname());
|
||||
return tsRoleService.addRole(tsRole);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("编辑角色")
|
||||
|
||||
+2
-5
@@ -4,9 +4,7 @@ package com.adc.da.slrs.sarStandIdea.controller;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.GetExcelDto;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.*;
|
||||
import com.adc.da.slrs.sarStandIdea.service.Impl.SarPublicIdeaAllServiceImpl;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
@@ -18,7 +16,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
@@ -51,7 +48,7 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
||||
@ApiOperation(value = "查询全部意见")
|
||||
@GetMapping("/getAllStand")
|
||||
public ResponseMessage getAllStand(DetAllStandDto detAllStandDto){
|
||||
IPage<SarPublicIdeaAll> publicList =sarPublicIdeaAllImpl.selectAll(detAllStandDto);
|
||||
IPage<SarPublicIdeaAllSUD> publicList =sarPublicIdeaAllImpl.selectAll(detAllStandDto);
|
||||
return Result.success("200",publicList);
|
||||
}
|
||||
|
||||
|
||||
+11
@@ -64,5 +64,16 @@ public class SarPublicIdeaController extends BaseController<SarPublicIdea> {
|
||||
return Result.success(publicList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "发起标准征求意见流程后自动公开征求意见")
|
||||
@PostMapping("/addSarPublicIdea")
|
||||
public ResponseMessage addSarPublicIdea(@RequestBody SarPublicIdea sarPublicIdea){
|
||||
try{
|
||||
sarPublicIdeaService.save(sarPublicIdea);
|
||||
}catch(Exception e){
|
||||
return Result.error();
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,40 +1,12 @@
|
||||
package com.adc.da.slrs.sarStandIdea.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DetAllStandDto {
|
||||
Integer page;
|
||||
Integer size;
|
||||
String cid;
|
||||
String userId;
|
||||
|
||||
public Integer getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(Integer page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public Integer getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(Integer size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getCid() {
|
||||
return cid;
|
||||
}
|
||||
|
||||
public void setCid(String cid) {
|
||||
this.cid = cid;
|
||||
}
|
||||
String endTime;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class GetExcelDto {
|
||||
|
||||
@ExcelProperty("章节编号")
|
||||
private String partCode;
|
||||
@ExcelProperty("内容")
|
||||
@ExcelProperty("修改意见内容(包括理由或依据)")
|
||||
private String content;
|
||||
@ExcelProperty("提出人")
|
||||
private String userName;
|
||||
|
||||
@@ -57,5 +57,8 @@ public class SarPublicIdea extends BaseEntity {
|
||||
@TableField("category_flag")
|
||||
private String categoryFlag;
|
||||
|
||||
@TableField("stand_id")
|
||||
private String standId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.adc.da.slrs.sarStandIdea.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* //用于增删查改的判断
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-27
|
||||
*/
|
||||
@Data
|
||||
public class SarPublicIdeaAllSUD extends SarPublicIdeaAll{
|
||||
public Integer ideaKey;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.adc.da.slrs.sarStandIdea.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* //用于查询标准关联信息
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-27
|
||||
*/
|
||||
public class SarPublicIdeaDto {
|
||||
private String id;
|
||||
private String category;
|
||||
private String cid;
|
||||
private String cname;
|
||||
private Date startTime;
|
||||
private Date endTime;
|
||||
private String categoryFlag;
|
||||
private String standId;
|
||||
// private String ;
|
||||
}
|
||||
+2
-1
@@ -4,6 +4,7 @@ package com.adc.da.slrs.sarStandIdea.service;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAllSUD;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
@@ -20,7 +21,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
public interface ISarPublicIdeaAllService extends IService<SarPublicIdeaAll> {
|
||||
|
||||
|
||||
IPage<SarPublicIdeaAll> selectAll(DetAllStandDto detAllStandDto);
|
||||
IPage<SarPublicIdeaAllSUD> selectAll(DetAllStandDto detAllStandDto);
|
||||
String add(SarPublicIdeaAll sarPublicIdeaAll);
|
||||
String updateById(SarPublicIdeaAll sarPublicIdeaAll, String autUserid);
|
||||
String delete(DelStandDto delStandDto);
|
||||
|
||||
+58
-17
@@ -1,12 +1,12 @@
|
||||
package com.adc.da.slrs.sarStandIdea.service.Impl;
|
||||
|
||||
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.Util.BeanConverUtil;
|
||||
import com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAllSUD;
|
||||
import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaAllService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -14,17 +14,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -44,14 +40,59 @@ public class SarPublicIdeaAllServiceImpl extends ServiceImpl<SarPublicIdeaAllDao
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<SarPublicIdeaAll> selectAll(DetAllStandDto detAllStandDto){
|
||||
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("CID",detAllStandDto.getCid());
|
||||
Page<SarPublicIdeaAll> page = new Page<>(detAllStandDto.getPage(),detAllStandDto.getSize());
|
||||
IPage<SarPublicIdeaAll> userIPage = sarPublicIdeaAllDao.selectPage(page, wrapper);
|
||||
System.out.println("总条数"+userIPage.getTotal());
|
||||
System.out.println("总页数"+userIPage.getPages());
|
||||
return userIPage;
|
||||
public IPage<SarPublicIdeaAllSUD> selectAll(DetAllStandDto detAllStandDto){
|
||||
if (detAllStandDto.getEndTime()!=null){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date Time = null;
|
||||
try {
|
||||
Time = sdf.parse(detAllStandDto.getEndTime());
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("CID",detAllStandDto.getCid());
|
||||
Page<SarPublicIdeaAll> page = new Page<>(detAllStandDto.getPage(),detAllStandDto.getSize());
|
||||
IPage<SarPublicIdeaAll> userIPage = sarPublicIdeaAllDao.selectPage(page, wrapper);
|
||||
System.out.println("总条数"+userIPage.getTotal());
|
||||
System.out.println("总页数"+userIPage.getPages());
|
||||
List<SarPublicIdeaAll> list= userIPage.getRecords();
|
||||
List<SarPublicIdeaAllSUD> list1 = new ArrayList<>();
|
||||
list1 = BeanConverUtil.converList(list, SarPublicIdeaAllSUD.class);
|
||||
for (SarPublicIdeaAllSUD sud:list1){
|
||||
if (Time.compareTo(new Date())>=0)sud.setIdeaKey(0);
|
||||
else {sud.setIdeaKey(1);}
|
||||
}
|
||||
IPage<SarPublicIdeaAllSUD> userIPage1 = new Page<>();
|
||||
userIPage1.setPages(userIPage.getPages());
|
||||
userIPage1.setSize(userIPage.getSize());
|
||||
userIPage1.setTotal(userIPage.getTotal());
|
||||
userIPage1.setCurrent(userIPage.getCurrent());
|
||||
userIPage1.setRecords(list1);
|
||||
return userIPage1;
|
||||
}else {
|
||||
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("CID",detAllStandDto.getCid());
|
||||
Page<SarPublicIdeaAll> page = new Page<>(detAllStandDto.getPage(),detAllStandDto.getSize());
|
||||
IPage<SarPublicIdeaAll> userIPage = sarPublicIdeaAllDao.selectPage(page, wrapper);
|
||||
System.out.println("总条数"+userIPage.getTotal());
|
||||
System.out.println("总页数"+userIPage.getPages());
|
||||
List<SarPublicIdeaAll> list= userIPage.getRecords();
|
||||
List<SarPublicIdeaAllSUD> list1 = new ArrayList<>();
|
||||
list1 = BeanConverUtil.converList(list, SarPublicIdeaAllSUD.class);
|
||||
for (SarPublicIdeaAllSUD sud:list1){
|
||||
sud.setIdeaKey(0);
|
||||
}
|
||||
IPage<SarPublicIdeaAllSUD> userIPage1 = new Page<>();
|
||||
userIPage1.setPages(userIPage.getPages());
|
||||
userIPage1.setSize(userIPage.getSize());
|
||||
userIPage1.setTotal(userIPage.getTotal());
|
||||
userIPage1.setCurrent(userIPage.getCurrent());
|
||||
userIPage1.setRecords(list1);
|
||||
return userIPage1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-3
@@ -49,9 +49,8 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl<SarPublicIdeaDao, SarP
|
||||
QueryWrapper<SarPublicIdea> list = new QueryWrapper<>();
|
||||
list.like(StringUtils.isNotEmpty(category),"category",category)
|
||||
.like(StringUtils.isNotEmpty(cname),"cname",cname)
|
||||
.ge(start!=null,"start_time",start).
|
||||
le(end!=null,"end_time",end);
|
||||
|
||||
.ge(start!=null,"start_time",start)
|
||||
.le(end!=null,"end_time",end);
|
||||
Page<SarPublicIdea> page = new Page<>(p,size);
|
||||
IPage<SarPublicIdea> userIPage = sarPublicIdeaDao.selectPage(page, list);
|
||||
System.out.println("总条数"+userIPage.getTotal());
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.adc.da.slrs.sarStandItems.entity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //查询dto
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-19
|
||||
|
||||
@@ -8,7 +8,7 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //分解单dto
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-14
|
||||
|
||||
@@ -4,10 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-08
|
||||
@@ -31,11 +28,8 @@ public class SarStandItemsDto {
|
||||
@ApiModelProperty(value = "责任部门")
|
||||
private String responsibleUnit;
|
||||
|
||||
|
||||
private String responsibleEngineer;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "SVPPS")
|
||||
private String svpps;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* //TODO 添加类、接口描述
|
||||
* //时间查询
|
||||
*
|
||||
* @author ZhangZhiYuan
|
||||
* @date 2021-07-14
|
||||
|
||||
+22
-3
@@ -1,13 +1,15 @@
|
||||
package com.adc.da.slrs.sarStandItems.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto;
|
||||
import com.adc.da.slrs.sarStandItems.entity.*;
|
||||
import com.adc.da.slrs.sarStandItems.dao.SarStandItemsDao;
|
||||
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
|
||||
import com.adc.da.slrs.sarStandItems.service.ISarStandItemsService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.controller.SarStandardsInfoController;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.ActSarItemsEO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
|
||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -32,11 +34,12 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
|
||||
@Autowired
|
||||
private SarStandItemsDao dao;
|
||||
|
||||
@Autowired
|
||||
private SysInfoEOService sysInfoEOService;
|
||||
@Autowired
|
||||
private SarLawsAttrDetailedListDao sarLawsAttrDetailedListDao;
|
||||
@Autowired
|
||||
private SarStandardsInfoController sarStandardsInfoController;
|
||||
|
||||
public List<ActSarItemsEO> queryItemsByList(SarStandItemsEOPage page, String resType){
|
||||
List<SarStandItems> itemsEOList = dao.queryItemsByList(page);
|
||||
@@ -144,7 +147,23 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
|
||||
@Override
|
||||
public IPage<LawsDto> selectLawDto(FindStandDto findStandDto) {
|
||||
List<String> standId = dao.selectStandId((findStandDto.getPage())-1, findStandDto.getSize());
|
||||
SarStandardsInfoEOPage page = new SarStandardsInfoEOPage();
|
||||
page.setPage(findStandDto.getPage());
|
||||
page.setPageSize(findStandDto.getSize());
|
||||
page.setUserId(null);
|
||||
List<SarStandardsInfo> pageInfo = null;
|
||||
try {
|
||||
pageInfo = sarStandardsInfoController.getSarStandardsInfoPage(page).getData().getList();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
List<String> standId = new ArrayList<>();
|
||||
for (SarStandardsInfo standardsInfo : pageInfo){
|
||||
if (standardsInfo.getAttrInfoCaseMap().get("fbgbjbd")!=null){
|
||||
standId.add(standardsInfo.getId());
|
||||
}
|
||||
}
|
||||
|
||||
List<LawsDto> list=new ArrayList<>();
|
||||
if (standId==null || standId.size()==0){
|
||||
list = null;
|
||||
|
||||
+46
-51
@@ -1,5 +1,4 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.controller;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.*;
|
||||
@@ -12,12 +11,10 @@ import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
@@ -33,14 +30,14 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
@Resource
|
||||
private SarStandProjectLibraryServiceImpl sarStandProjectLibraryService;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param Page
|
||||
* @param PageSize
|
||||
* @param sarDto
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-06-22
|
||||
**/
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-06-22
|
||||
**/
|
||||
@GetMapping("/queryProject")
|
||||
@ApiOperation("车型/项目库")
|
||||
public ResponseMessage queryMaintenanceProject(@RequestParam(defaultValue = "1", value = "Page")int Page, @RequestParam(defaultValue = "10", value = "PageSize") int PageSize,
|
||||
@@ -53,12 +50,12 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
return Result.success("200",map);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-06-22
|
||||
**/
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-06-22
|
||||
**/
|
||||
@GetMapping("/queryById")
|
||||
@ApiOperation("点击项目id查询")
|
||||
public ResponseMessage queryByName(String id){
|
||||
@@ -66,13 +63,13 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
return Result.success("200",list);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param current
|
||||
* @param pageSize
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-13
|
||||
**/
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-13
|
||||
**/
|
||||
@GetMapping("/queryProjectManager")
|
||||
@ApiOperation("查询产品线项目经理")
|
||||
public ResponseMessage queryProjectManager(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize){
|
||||
@@ -97,34 +94,34 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
return Result.success("200",pageres);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param current
|
||||
* @param pageSize
|
||||
* @param id
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-15
|
||||
**/
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-15
|
||||
**/
|
||||
@GetMapping("/queryStandInfo")
|
||||
@ApiOperation("查询标准信息")
|
||||
public ResponseMessage queryStandInfo(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize,
|
||||
String id){
|
||||
List<SarStandProjectLibrary> list = sarStandProjectLibraryService.queryStandId(id);
|
||||
List<String> list1 = new ArrayList();
|
||||
for(SarStandProjectLibrary s:list){
|
||||
list1.add(s.getStandId());
|
||||
}
|
||||
System.out.println(list1);
|
||||
IPage<StandAttrInfoDto> list2 = sarStandProjectLibraryService.queryStandInfo(current,pageSize,id);
|
||||
return Result.success("200",list2);
|
||||
// List<SarStandProjectLibrary> list = sarStandProjectLibraryService.queryStandId(id);
|
||||
// List<String> list1 = new ArrayList();
|
||||
// for(SarStandProjectLibrary s:list){
|
||||
// list1.add(s.getStandId());
|
||||
// }
|
||||
// System.out.println(list1);
|
||||
IPage<StandAttrInfoDto> list = sarStandProjectLibraryService.queryStandInfo(current,pageSize,id);
|
||||
return Result.success("200",list);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-15
|
||||
**/
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-15
|
||||
**/
|
||||
@PostMapping("/deleteByIds")
|
||||
@ApiOperation("批量删除标准")
|
||||
public ResponseMessage deleteByIds(String id){
|
||||
@@ -134,12 +131,12 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
return Result.success("200","删除成功");
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param list
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-15
|
||||
**/
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-15
|
||||
**/
|
||||
@PostMapping("/batchInsert")
|
||||
@ApiOperation("调取标准")
|
||||
public ResponseMessage batchInsert(@RequestBody List<StandProjectRelationDto> list){
|
||||
@@ -147,16 +144,16 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
return Result.success("200","新增成功",list);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param standAttrInfoExcelDto
|
||||
* @param response
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-16
|
||||
**/
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-16
|
||||
**/
|
||||
@ApiOperation("导出Excel表")
|
||||
@GetMapping(value = "/exportStandAttrInfoExcel")
|
||||
public void exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto, HttpServletResponse response) throws Exception {
|
||||
public void exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto, HttpServletResponse response,String id) throws Exception {
|
||||
try {
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
@@ -166,9 +163,9 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
}
|
||||
String fileName = URLEncoder.encode(standAttrInfoExcelDto.getExportName(), "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
List<StandAttrInfoDto> data= sarStandProjectLibraryService.exportStandAttrInfoExcel(standAttrInfoExcelDto);
|
||||
List<StandAttrInfoDto> data= sarStandProjectLibraryService.exportStandAttrInfoExcel(standAttrInfoExcelDto,id);
|
||||
// 这里需要设置不关闭流
|
||||
EasyExcel.write(response.getOutputStream(), StandAttrInfoDto.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
EasyExcel.write(response.getOutputStream(), StandAttrInfoDto.class).useDefaultStyle(false).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(data);
|
||||
} catch (Exception e) {
|
||||
System.out.println(e);
|
||||
@@ -179,6 +176,4 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
response.getWriter().println(JSON.toJSONString(Result.error()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+12
-8
@@ -1,14 +1,12 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* //TODO 添加类/接口功能描述
|
||||
*
|
||||
@@ -18,11 +16,17 @@ import java.time.LocalDateTime;
|
||||
@Data
|
||||
@HeadRowHeight(35)
|
||||
@ColumnWidth(30)
|
||||
@ExcelIgnoreUnannotated
|
||||
public class StandAttrInfoDto {
|
||||
|
||||
//标准编号
|
||||
@ExcelProperty("标准编号")
|
||||
//主键
|
||||
private String standId;
|
||||
//标准编号
|
||||
@ExcelProperty("标准号")
|
||||
private String standNumber;
|
||||
//标准类别
|
||||
private String standSort;
|
||||
//标准年份
|
||||
private String standYear;
|
||||
//中文名称
|
||||
@ExcelProperty("中文名称")
|
||||
private String standName;
|
||||
@@ -32,7 +36,7 @@ public class StandAttrInfoDto {
|
||||
//标准实施日期
|
||||
@ExcelProperty("标准实施日期")
|
||||
private String SSRQ;
|
||||
//新车型实施日期
|
||||
//新车型实施日期 数据库中字段实际没有GJ 如需要修改 可修改此处
|
||||
@ExcelProperty("新车型实施日期")
|
||||
private String XCXSSRQGJ;
|
||||
//在产车实施日期
|
||||
@@ -53,4 +57,4 @@ public class StandAttrInfoDto {
|
||||
//关联模块--乘用车vpps中文名称
|
||||
@ExcelProperty("关联模块--乘用车vpps中文名称")
|
||||
private String CYCVPPSCN;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -16,6 +16,6 @@ public interface SarStandProjectLibraryService {
|
||||
IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId);
|
||||
void deleteByIds(List<String> ids);
|
||||
void batchInsert(@Param("ids") List<StandProjectRelationDto> list);
|
||||
List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto);
|
||||
List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto,String standId);
|
||||
|
||||
}
|
||||
|
||||
+46
-86
@@ -1,6 +1,4 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.service.impl;
|
||||
|
||||
|
||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.*;
|
||||
@@ -14,14 +12,12 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
@@ -32,15 +28,12 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProjectLibraryDao, SarStandProjectLibrary> implements SarStandProjectLibraryService {
|
||||
|
||||
@Resource
|
||||
private SarStandProjectLibraryDao sarStandProjectLibraryDao;
|
||||
@Resource
|
||||
private SarStandardsInfoDao SarStandardsInfoDao;
|
||||
@Resource
|
||||
private SarStandAttrInfoDao sarStandAttrInfoDao;
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<SarStandProjectLibrary> queryMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto) {
|
||||
SarStandProjectLibrary sar = new SarStandProjectLibrary();
|
||||
@@ -82,7 +75,6 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
.le(sar.getProjectEndDate()!=null,"project_end_date",sar.getProjectEndDate());
|
||||
return getSarStandProjectLibraryIPage(current, pageSize, wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<SarStandProjectLibrary> queryNotMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto) {
|
||||
SarStandProjectLibrary sar = new SarStandProjectLibrary();
|
||||
@@ -124,7 +116,6 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
.le(sar.getProjectEndDate()!=null,"project_end_date",sar.getProjectEndDate());
|
||||
return getSarStandProjectLibraryIPage(current, pageSize, wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandProjectLibrary> queryById(String id) {
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
@@ -132,7 +123,6 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
List<SarStandProjectLibrary> list = sarStandProjectLibraryDao.selectList(wrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize) {
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
@@ -144,7 +134,6 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
System.out.println("总页数"+userIPage.getPages());
|
||||
return userIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandProjectLibrary> queryByProductLine(String productLine) {
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
@@ -152,7 +141,6 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
List<SarStandProjectLibrary> list = sarStandProjectLibraryDao.selectList(wrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandProjectLibrary> queryStandId(String standId) {
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
@@ -161,47 +149,46 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
List<SarStandProjectLibrary> list = sarStandProjectLibraryDao.selectList(wrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId) {
|
||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.select("ID","STAND_NAME","STAND_EN_NAME");
|
||||
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME");
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='"+ standId+"'");
|
||||
Page<SarStandardsInfo> page1 = new Page<>(current, pageSize);
|
||||
IPage<SarStandardsInfo> userIPage1 = SarStandardsInfoDao.selectPage(page1, wrapper1);
|
||||
System.out.println("总条数"+userIPage1.getTotal());
|
||||
System.out.println("总页数"+userIPage1.getPages());
|
||||
|
||||
QueryWrapper<SarStandAttrInfo> wrapper2 = new QueryWrapper<>();
|
||||
wrapper2.select("r.STAND_ID","SSRQ","XCXSSRQGJ","ZCCSSRQGJ","ZRBM","KCCVPPSBM","KCCVPPSCN","CYCVPPSBM","CYCVPPSCN");
|
||||
wrapper2.select("r.STAND_ID","SSRQ","XCXSSRQ","ZCCSSRQ","ZRBM","KCCVPPSBM","KCCVPPSCN","CYCVPPSBM","CYCVPPSCN");
|
||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.project_id ='"+ standId+"'");
|
||||
Page<SarStandAttrInfo> page2 = new Page<>(current, pageSize);
|
||||
IPage<SarStandAttrInfo> userIPage2 = sarStandAttrInfoDao.selectPage(page2, wrapper2);
|
||||
System.out.println("总条数"+userIPage2.getTotal());
|
||||
System.out.println("总页数"+userIPage2.getPages());
|
||||
|
||||
List<StandAttrInfoDto> list = new ArrayList<>();
|
||||
List<SarStandardsInfo> list1 = userIPage1.getRecords();
|
||||
List<SarStandAttrInfo> list2 = userIPage2.getRecords();
|
||||
for(SarStandardsInfo s:list1){
|
||||
StandAttrInfoDto p =new StandAttrInfoDto();
|
||||
p.setStandId(s.getId());
|
||||
p.setStandNumber(s.getStandNumber());
|
||||
p.setStandSort(s.getStandSort());
|
||||
p.setStandYear(s.getStandYear());
|
||||
p.setStandName(s.getStandName());
|
||||
p.setStandEnName(s.getStandEnName());
|
||||
for (SarStandAttrInfo a:list2){
|
||||
if(s.getId().equals(a.getStandId())){
|
||||
p.setCYCVPPSBM(a.getCycvppsbm());
|
||||
p.setCYCVPPSCN(a.getCycvppscn());
|
||||
p.setSSRQ(a.getSsrq());
|
||||
p.setXCXSSRQGJ(a.getXcxssrqgj());
|
||||
p.setZCCSSRQGJ(a.getZccssrqgj());
|
||||
p.setKCCVPPSBM(a.getKccvppsbm());
|
||||
p.setKCCVPPSCN(a.getKccvppscn());
|
||||
p.setZRBM(a.getZrbm());
|
||||
}
|
||||
if(s.getId().equals(a.getStandId())){
|
||||
p.setCYCVPPSBM(a.getCycvppsbm());
|
||||
p.setCYCVPPSCN(a.getCycvppscn());
|
||||
p.setSSRQ(a.getSsrq());
|
||||
p.setXCXSSRQGJ(a.getXcxssrq());
|
||||
p.setZCCSSRQGJ(a.getZccssrq());
|
||||
p.setKCCVPPSBM(a.getKccvppsbm());
|
||||
p.setKCCVPPSCN(a.getKccvppscn());
|
||||
p.setZRBM(a.getZrbm());
|
||||
}
|
||||
}
|
||||
list.add(p);
|
||||
System.out.println(list);
|
||||
}
|
||||
IPage<StandAttrInfoDto> userIPage = new Page<>();
|
||||
userIPage.setRecords(list);
|
||||
@@ -210,79 +197,52 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
System.out.println("总页数"+userIPage.getPages());
|
||||
return userIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
sarStandProjectLibraryDao.deleteByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchInsert(List<StandProjectRelationDto> list) {
|
||||
sarStandProjectLibraryDao.batchInsert(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto) {
|
||||
public List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto ,String id) {
|
||||
List<String> ids = standAttrInfoExcelDto.getIds();
|
||||
List<StandAttrInfoDto> list = new ArrayList<>();
|
||||
if (ids==null||ids.size()==0){
|
||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.select("ID","STAND_NAME","STAND_EN_NAME");
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID");
|
||||
List<SarStandardsInfo> userList1 = SarStandardsInfoDao.selectList(wrapper1);
|
||||
QueryWrapper<SarStandAttrInfo> wrapper2 = new QueryWrapper<>();
|
||||
wrapper2.select("r.STAND_ID","SSRQ","XCXSSRQGJ","ZCCSSRQGJ","ZRBM","KCCVPPSBM","KCCVPPSCN","CYCVPPSBM","CYCVPPSCN");
|
||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID");
|
||||
List<SarStandAttrInfo> userList2 = sarStandAttrInfoDao.selectList(wrapper2);
|
||||
for(SarStandardsInfo s:userList1){
|
||||
StandAttrInfoDto p =new StandAttrInfoDto();
|
||||
p.setStandId(s.getId());
|
||||
p.setStandName(s.getStandName());
|
||||
p.setStandEnName(s.getStandEnName());
|
||||
for (SarStandAttrInfo a:userList2){
|
||||
if(s.getId().equals(a.getStandId())){
|
||||
p.setCYCVPPSBM(a.getCycvppsbm());
|
||||
p.setCYCVPPSCN(a.getCycvppscn());
|
||||
p.setSSRQ(a.getSsrq());
|
||||
p.setXCXSSRQGJ(a.getXcxssrqgj());
|
||||
p.setZCCSSRQGJ(a.getZccssrqgj());
|
||||
p.setKCCVPPSBM(a.getKccvppsbm());
|
||||
p.setKCCVPPSCN(a.getKccvppscn());
|
||||
p.setZRBM(a.getZrbm());
|
||||
String idmis=String.join(",",ids);
|
||||
System.out.println(idmis);
|
||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.select("ID","STAND_NUMBER","STAND_NAME","STAND_EN_NAME");
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.stand_id in ("+ idmis +") and r.project_id = '"+ id+"'");
|
||||
List<SarStandardsInfo> userList1 = SarStandardsInfoDao.selectList(wrapper1);
|
||||
QueryWrapper<SarStandAttrInfo> wrapper2 = new QueryWrapper<>();
|
||||
wrapper2.select("r.STAND_ID","SSRQ","XCXSSRQ","ZCCSSRQ","ZRBM","KCCVPPSBM","KCCVPPSCN","CYCVPPSBM","CYCVPPSCN");
|
||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.stand_id in ("+ idmis +") and r.project_id = '"+ id+"'");
|
||||
List<SarStandAttrInfo> userList2 = sarStandAttrInfoDao.selectList(wrapper2);
|
||||
for(SarStandardsInfo s:userList1){
|
||||
StandAttrInfoDto p =new StandAttrInfoDto();
|
||||
p.setStandNumber(s.getStandNumber());
|
||||
p.setStandName(s.getStandName());
|
||||
p.setStandEnName(s.getStandEnName());
|
||||
for (SarStandAttrInfo a:userList2){
|
||||
if(s.getId().equals(a.getStandId())){
|
||||
p.setCYCVPPSBM(a.getCycvppsbm());
|
||||
p.setCYCVPPSCN(a.getCycvppscn());
|
||||
if (a.getSsrq()!=null){
|
||||
p.setSSRQ(a.getSsrq().substring(0,10));
|
||||
}
|
||||
}
|
||||
list.add(p);
|
||||
}
|
||||
}else {
|
||||
String idmis=String.join(",",ids);
|
||||
System.out.println(idmis);
|
||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.select("ID","STAND_NAME","STAND_EN_NAME");
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.stand_id in ("+ idmis +")");
|
||||
List<SarStandardsInfo> userList1 = SarStandardsInfoDao.selectList(wrapper1);
|
||||
QueryWrapper<SarStandAttrInfo> wrapper2 = new QueryWrapper<>();
|
||||
wrapper2.select("r.STAND_ID","SSRQ","XCXSSRQGJ","ZCCSSRQGJ","ZRBM","KCCVPPSBM","KCCVPPSCN","CYCVPPSBM","CYCVPPSCN");
|
||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.stand_id in ("+ idmis +")");
|
||||
List<SarStandAttrInfo> userList2 = sarStandAttrInfoDao.selectList(wrapper2);
|
||||
for(SarStandardsInfo s:userList1){
|
||||
StandAttrInfoDto p =new StandAttrInfoDto();
|
||||
p.setStandId(s.getId());
|
||||
p.setStandName(s.getStandName());
|
||||
p.setStandEnName(s.getStandEnName());
|
||||
for (SarStandAttrInfo a:userList2){
|
||||
if(s.getId().equals(a.getStandId())){
|
||||
p.setCYCVPPSBM(a.getCycvppsbm());
|
||||
p.setCYCVPPSCN(a.getCycvppscn());
|
||||
p.setSSRQ(a.getSsrq());
|
||||
p.setXCXSSRQGJ(a.getXcxssrqgj());
|
||||
p.setZCCSSRQGJ(a.getZccssrqgj());
|
||||
p.setKCCVPPSBM(a.getKccvppsbm());
|
||||
p.setKCCVPPSCN(a.getKccvppscn());
|
||||
p.setZRBM(a.getZrbm());
|
||||
if (a.getXcxssrqgj()!=null){
|
||||
p.setXCXSSRQGJ(a.getXcxssrq().substring(0,10));
|
||||
}
|
||||
if (a.getZccssrqgj()!=null){
|
||||
p.setZCCSSRQGJ(a.getZccssrq().substring(0,10));
|
||||
}
|
||||
p.setKCCVPPSBM(a.getKccvppsbm());
|
||||
p.setKCCVPPSCN(a.getKccvppscn());
|
||||
p.setZRBM(a.getZrbm());
|
||||
}
|
||||
list.add(p);
|
||||
}
|
||||
list.add(p);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
+2
-5
@@ -81,7 +81,7 @@ public class SarStandUnqualified extends BaseEntity {
|
||||
@TableField("CREATE_BY_ID")
|
||||
private String createById;
|
||||
|
||||
@ExcelProperty(value = "创建时间",converter = TimestampConverter.class)
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@@ -100,7 +100,7 @@ public class SarStandUnqualified extends BaseEntity {
|
||||
@TableField("ACTUAL_CLOSE_TIME")
|
||||
private Date actualCloseTime;
|
||||
|
||||
@ExcelProperty(value = "计划关闭时间",converter = TimestampConverter.class)
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(value = "计划关闭时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@@ -126,8 +126,6 @@ public class SarStandUnqualified extends BaseEntity {
|
||||
@TableField("DUTY_ENGINEER")
|
||||
private String dutyEngineer;
|
||||
|
||||
|
||||
|
||||
@ExcelProperty(value = "产品类型",converter = ProductTypeConverter.class)
|
||||
@ApiModelProperty(value = "产品类型(research为在研产品,product为在产产品)")
|
||||
@TableField("PRODUCT_TYPE")
|
||||
@@ -138,7 +136,6 @@ public class SarStandUnqualified extends BaseEntity {
|
||||
@TableId(type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "质量工程师")
|
||||
@TableField(exist=false)
|
||||
private String qaEngineerName;
|
||||
|
||||
+43
-12
@@ -1,5 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarLawsDetailedList.Util.BeanConverUtil;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.ExcelDto;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified;
|
||||
import com.adc.da.slrs.sarStandUnqualified.dao.SarStandUnqualifiedDao;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualifiedPage;
|
||||
@@ -10,16 +12,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.sql.Timestamp;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -43,11 +42,12 @@ public class SarStandUnqualifiedServiceImpl extends ServiceImpl<SarStandUnqualif
|
||||
public IPage<SarStandUnqualified> getSarStandUnqualifiedPage(SarStandUnqualifiedPage sarStandUnqualifiedPage) {
|
||||
QueryWrapper<SarStandUnqualified> sarStandUnqualifiedQueryWrapper=new QueryWrapper<>();
|
||||
if(sarStandUnqualifiedPage.getStandId()!=null){
|
||||
sarStandUnqualifiedQueryWrapper
|
||||
.like("stand_id",sarStandUnqualifiedPage.getStandId())
|
||||
.like("stand_name",sarStandUnqualifiedPage.getStandId());
|
||||
sarStandUnqualifiedQueryWrapper.like("stand_id",sarStandUnqualifiedPage.getStandId());
|
||||
// sarStandUnqualifiedQueryWrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name","%"+sarStandUnqualifiedPage.getStandId()+"%");
|
||||
}
|
||||
if (sarStandUnqualifiedPage.getStandName()!=null){
|
||||
sarStandUnqualifiedQueryWrapper.like("stand_name",sarStandUnqualifiedPage.getStandName());
|
||||
}
|
||||
//仅查询未关闭的
|
||||
sarStandUnqualifiedQueryWrapper.eq("close_state",1);
|
||||
if(sarStandUnqualifiedPage.getProductName()!=null){
|
||||
@@ -74,9 +74,12 @@ public class SarStandUnqualifiedServiceImpl extends ServiceImpl<SarStandUnqualif
|
||||
public IPage<SarStandUnqualified> getSarStandUnqualifiedHistoryPage(SarStandUnqualifiedPage sarStandUnqualifiedPage) {
|
||||
QueryWrapper<SarStandUnqualified> sarStandUnqualifiedQueryWrapper=new QueryWrapper<>();
|
||||
if(sarStandUnqualifiedPage.getStandId()!=null){
|
||||
sarStandUnqualifiedQueryWrapper.and(wrapper->wrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name",sarStandUnqualifiedPage.getStandId()));
|
||||
sarStandUnqualifiedQueryWrapper.like("stand_id",sarStandUnqualifiedPage.getStandId());
|
||||
// sarStandUnqualifiedQueryWrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name","%"+sarStandUnqualifiedPage.getStandId()+"%");
|
||||
}
|
||||
if (sarStandUnqualifiedPage.getStandName()!=null){
|
||||
sarStandUnqualifiedQueryWrapper.like("stand_name",sarStandUnqualifiedPage.getStandName());
|
||||
}
|
||||
|
||||
//仅查询关闭的
|
||||
sarStandUnqualifiedQueryWrapper.eq("close_state",2);
|
||||
@@ -122,10 +125,38 @@ public class SarStandUnqualifiedServiceImpl extends ServiceImpl<SarStandUnqualif
|
||||
public List<SarStandUnqualified> getStandUnqualifiedExcelData(StandUnqualifiedExcelVO standUnqualifiedExcelVO) {
|
||||
QueryWrapper<SarStandUnqualified> sarStandUnqualifiedQueryWrapper=new QueryWrapper<>();
|
||||
sarStandUnqualifiedQueryWrapper.eq("close_state",1);
|
||||
if(standUnqualifiedExcelVO.getIds()!=null&&standUnqualifiedExcelVO.getIds().size()>0){
|
||||
if(standUnqualifiedExcelVO.getIds()!=null && standUnqualifiedExcelVO.getIds().size()>0){
|
||||
sarStandUnqualifiedQueryWrapper.in("id",standUnqualifiedExcelVO.getIds());
|
||||
}
|
||||
return sarStandUnqualifiedDao.selectList(sarStandUnqualifiedQueryWrapper);
|
||||
List<SarStandUnqualified> stand = sarStandUnqualifiedDao.selectList(sarStandUnqualifiedQueryWrapper);
|
||||
List<ExcelDto> list = new ArrayList<>();
|
||||
list = BeanConverUtil.converList(stand,ExcelDto.class);
|
||||
for (int a=0;a<stand.size();a++){
|
||||
Date date = null;
|
||||
String str;
|
||||
try {
|
||||
if (stand.get(a).getCreateTime() != null) {
|
||||
String dateStr = stand.get(a).getCreateTime().toString();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
|
||||
date = sdf.parse(dateStr);
|
||||
SimpleDateFormat sdf1=new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||
String sDate=sdf1.format(date);
|
||||
list.get(a).setCreateTime1(sDate);
|
||||
}
|
||||
if (stand.get(a).getActualCloseTime() != null) {
|
||||
String dateStr = stand.get(a).getActualCloseTime().toString();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
|
||||
date = sdf.parse(dateStr);
|
||||
SimpleDateFormat sdf1=new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||
String sDate=sdf1.format(date);
|
||||
date=sdf1.parse(sDate);
|
||||
list.get(a).setActualCloseTime(date);
|
||||
}
|
||||
} catch(ParseException e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return stand;
|
||||
}
|
||||
|
||||
private boolean closeSarStandUnqualified(String standUnqualifiedId){
|
||||
|
||||
+404
@@ -199,5 +199,409 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standSystemName;
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getStandType() {
|
||||
return standType;
|
||||
}
|
||||
|
||||
public void setStandType(String standType) {
|
||||
this.standType = standType;
|
||||
}
|
||||
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
public String getStandSort() {
|
||||
return standSort;
|
||||
}
|
||||
|
||||
public void setStandSort(String standSort) {
|
||||
this.standSort = standSort;
|
||||
}
|
||||
|
||||
public String getStandNumber() {
|
||||
return standNumber;
|
||||
}
|
||||
|
||||
public void setStandNumber(String standNumber) {
|
||||
this.standNumber = standNumber;
|
||||
}
|
||||
|
||||
public String getStandYear() {
|
||||
return standYear;
|
||||
}
|
||||
|
||||
public void setStandYear(String standYear) {
|
||||
this.standYear = standYear;
|
||||
}
|
||||
|
||||
public String getStandName() {
|
||||
return standName;
|
||||
}
|
||||
|
||||
public void setStandName(String standName) {
|
||||
this.standName = standName;
|
||||
}
|
||||
|
||||
public String getStandEnName() {
|
||||
return standEnName;
|
||||
}
|
||||
|
||||
public void setStandEnName(String standEnName) {
|
||||
this.standEnName = standEnName;
|
||||
}
|
||||
|
||||
public String getStandState() {
|
||||
return standState;
|
||||
}
|
||||
|
||||
public void setStandState(String standState) {
|
||||
this.standState = standState;
|
||||
}
|
||||
|
||||
public String getStandNature() {
|
||||
return standNature;
|
||||
}
|
||||
|
||||
public void setStandNature(String standNature) {
|
||||
this.standNature = standNature;
|
||||
}
|
||||
|
||||
public String getIssueTime() {
|
||||
return issueTime;
|
||||
}
|
||||
|
||||
public void setIssueTime(String issueTime) {
|
||||
this.issueTime = issueTime;
|
||||
}
|
||||
|
||||
public Date getPutTime() {
|
||||
return putTime;
|
||||
}
|
||||
|
||||
public void setPutTime(Date putTime) {
|
||||
this.putTime = putTime;
|
||||
}
|
||||
|
||||
public String getSynopsis() {
|
||||
return synopsis;
|
||||
}
|
||||
|
||||
public void setSynopsis(String synopsis) {
|
||||
this.synopsis = synopsis;
|
||||
}
|
||||
|
||||
public String getReplaceStandNum() {
|
||||
return replaceStandNum;
|
||||
}
|
||||
|
||||
public void setReplaceStandNum(String replaceStandNum) {
|
||||
this.replaceStandNum = replaceStandNum;
|
||||
}
|
||||
|
||||
public String getReplacedStandNum() {
|
||||
return replacedStandNum;
|
||||
}
|
||||
|
||||
public void setReplacedStandNum(String replacedStandNum) {
|
||||
this.replacedStandNum = replacedStandNum;
|
||||
}
|
||||
|
||||
public String getCreationUser() {
|
||||
return creationUser;
|
||||
}
|
||||
|
||||
public void setCreationUser(String creationUser) {
|
||||
this.creationUser = creationUser;
|
||||
}
|
||||
|
||||
public String getValidFlag() {
|
||||
return validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(String validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public Date getCreationTime() {
|
||||
return creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(Date creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public String getIsRelateAccess() {
|
||||
return isRelateAccess;
|
||||
}
|
||||
|
||||
public void setIsRelateAccess(String isRelateAccess) {
|
||||
this.isRelateAccess = isRelateAccess;
|
||||
}
|
||||
|
||||
public String getCiteStand() {
|
||||
return citeStand;
|
||||
}
|
||||
|
||||
public void setCiteStand(String citeStand) {
|
||||
this.citeStand = citeStand;
|
||||
}
|
||||
|
||||
public String getCitedStand() {
|
||||
return citedStand;
|
||||
}
|
||||
|
||||
public void setCitedStand(String citedStand) {
|
||||
this.citedStand = citedStand;
|
||||
}
|
||||
|
||||
public String getTextStatus() {
|
||||
return textStatus;
|
||||
}
|
||||
|
||||
public void setTextStatus(String textStatus) {
|
||||
this.textStatus = textStatus;
|
||||
}
|
||||
|
||||
public String getStandSystem() {
|
||||
return standSystem;
|
||||
}
|
||||
|
||||
public void setStandSystem(String standSystem) {
|
||||
this.standSystem = standSystem;
|
||||
}
|
||||
|
||||
public String getCollectId() {
|
||||
return collectId;
|
||||
}
|
||||
|
||||
public void setCollectId(String collectId) {
|
||||
this.collectId = collectId;
|
||||
}
|
||||
|
||||
public String getCountryShow() {
|
||||
return countryShow;
|
||||
}
|
||||
|
||||
public void setCountryShow(String countryShow) {
|
||||
this.countryShow = countryShow;
|
||||
}
|
||||
|
||||
public String getStandSortShow() {
|
||||
return standSortShow;
|
||||
}
|
||||
|
||||
public void setStandSortShow(String standSortShow) {
|
||||
this.standSortShow = standSortShow;
|
||||
}
|
||||
|
||||
public String getStandStateShow() {
|
||||
return standStateShow;
|
||||
}
|
||||
|
||||
public void setStandStateShow(String standStateShow) {
|
||||
this.standStateShow = standStateShow;
|
||||
}
|
||||
|
||||
public String getStandNatureShow() {
|
||||
return standNatureShow;
|
||||
}
|
||||
|
||||
public void setStandNatureShow(String standNatureShow) {
|
||||
this.standNatureShow = standNatureShow;
|
||||
}
|
||||
|
||||
public String getSychronId() {
|
||||
return sychronId;
|
||||
}
|
||||
|
||||
public void setSychronId(String sychronId) {
|
||||
this.sychronId = sychronId;
|
||||
}
|
||||
|
||||
public List<DicTypeEO> getDicTypeList() {
|
||||
return dicTypeList;
|
||||
}
|
||||
|
||||
public void setDicTypeList(List<DicTypeEO> dicTypeList) {
|
||||
this.dicTypeList = dicTypeList;
|
||||
}
|
||||
|
||||
public List<SarStandAttrDetails> getAttrInfoList() {
|
||||
return attrInfoList;
|
||||
}
|
||||
|
||||
public void setAttrInfoList(List<SarStandAttrDetails> attrInfoList) {
|
||||
this.attrInfoList = attrInfoList;
|
||||
}
|
||||
|
||||
public Map<String, Object> getAttrInfoMap() {
|
||||
return attrInfoMap;
|
||||
}
|
||||
|
||||
public void setAttrInfoMap(Map<String, Object> attrInfoMap) {
|
||||
this.attrInfoMap = attrInfoMap;
|
||||
}
|
||||
|
||||
public Map<String, Object> getAttrInfoCaseMap() {
|
||||
return attrInfoCaseMap;
|
||||
}
|
||||
|
||||
public void setAttrInfoCaseMap(Map<String, Object> attrInfoCaseMap) {
|
||||
this.attrInfoCaseMap = attrInfoCaseMap;
|
||||
}
|
||||
|
||||
public String getSarStandAttrEOStr() {
|
||||
return sarStandAttrEOStr;
|
||||
}
|
||||
|
||||
public void setSarStandAttrEOStr(String sarStandAttrEOStr) {
|
||||
this.sarStandAttrEOStr = sarStandAttrEOStr;
|
||||
}
|
||||
|
||||
public String getMenuId() {
|
||||
return menuId;
|
||||
}
|
||||
|
||||
public void setMenuId(String menuId) {
|
||||
this.menuId = menuId;
|
||||
}
|
||||
|
||||
public int getUpReplaceNumFlag() {
|
||||
return upReplaceNumFlag;
|
||||
}
|
||||
|
||||
public void setUpReplaceNumFlag(int upReplaceNumFlag) {
|
||||
this.upReplaceNumFlag = upReplaceNumFlag;
|
||||
}
|
||||
|
||||
public int getUpNumFlag() {
|
||||
return upNumFlag;
|
||||
}
|
||||
|
||||
public void setUpNumFlag(int upNumFlag) {
|
||||
this.upNumFlag = upNumFlag;
|
||||
}
|
||||
|
||||
public String getFileIds() {
|
||||
return fileIds;
|
||||
}
|
||||
|
||||
public void setFileIds(String fileIds) {
|
||||
this.fileIds = fileIds;
|
||||
}
|
||||
|
||||
public Date getNewCarPutTime() {
|
||||
return newCarPutTime;
|
||||
}
|
||||
|
||||
public void setNewCarPutTime(Date newCarPutTime) {
|
||||
this.newCarPutTime = newCarPutTime;
|
||||
}
|
||||
|
||||
public List<SarStandItems> getItemsList() {
|
||||
return itemsList;
|
||||
}
|
||||
|
||||
public void setItemsList(List<SarStandItems> itemsList) {
|
||||
this.itemsList = itemsList;
|
||||
}
|
||||
|
||||
public String getRelateStand() {
|
||||
return relateStand;
|
||||
}
|
||||
|
||||
public void setRelateStand(String relateStand) {
|
||||
this.relateStand = relateStand;
|
||||
}
|
||||
|
||||
public String getAccessCountry() {
|
||||
return accessCountry;
|
||||
}
|
||||
|
||||
public void setAccessCountry(String accessCountry) {
|
||||
this.accessCountry = accessCountry;
|
||||
}
|
||||
|
||||
public String getProcessNum() {
|
||||
return processNum;
|
||||
}
|
||||
|
||||
public void setProcessNum(String processNum) {
|
||||
this.processNum = processNum;
|
||||
}
|
||||
|
||||
public String getMenuType() {
|
||||
return menuType;
|
||||
}
|
||||
|
||||
public void setMenuType(String menuType) {
|
||||
this.menuType = menuType;
|
||||
}
|
||||
|
||||
public String getAllPutTime() {
|
||||
return allPutTime;
|
||||
}
|
||||
|
||||
public void setAllPutTime(String allPutTime) {
|
||||
this.allPutTime = allPutTime;
|
||||
}
|
||||
|
||||
public String getJspg() {
|
||||
return jspg;
|
||||
}
|
||||
|
||||
public void setJspg(String jspg) {
|
||||
this.jspg = jspg;
|
||||
}
|
||||
|
||||
public String getCHJL() {
|
||||
return CHJL;
|
||||
}
|
||||
|
||||
public void setCHJL(String CHJL) {
|
||||
this.CHJL = CHJL;
|
||||
}
|
||||
|
||||
public String getPutTime2() {
|
||||
return putTime2;
|
||||
}
|
||||
|
||||
public void setPutTime2(String putTime2) {
|
||||
this.putTime2 = putTime2;
|
||||
}
|
||||
|
||||
public String getStandSystemName() {
|
||||
return standSystemName;
|
||||
}
|
||||
|
||||
public void setStandSystemName(String standSystemName) {
|
||||
this.standSystemName = standSystemName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+128
-2
@@ -10,6 +10,7 @@ import com.adc.da.mq.service.CreateStandMQService;
|
||||
import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import com.adc.da.person.dao.PersonShareEODao;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.search.service.StandLawsSearchService;
|
||||
import com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo;
|
||||
import com.adc.da.slrs.sarLawsInfo.page.SarLawsInfoEOPage;
|
||||
import com.adc.da.slrs.sarLawsInfo.page.SarLawsItemsEOPage;
|
||||
@@ -58,6 +59,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.util.PDFTextStripper;
|
||||
import org.apache.pdfbox.util.PDFTextStripperByArea;
|
||||
import org.apache.poi.hwpf.extractor.WordExtractor;
|
||||
import org.apache.poi.openxml4j.opc.OPCPackage;
|
||||
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -73,6 +81,7 @@ import java.beans.IntrospectionException;
|
||||
import java.beans.Introspector;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Modifier;
|
||||
@@ -182,6 +191,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Autowired
|
||||
private CreateStandMQService createStandMQService;
|
||||
|
||||
@Autowired
|
||||
private StandLawsSearchService standLawsSearchService;
|
||||
|
||||
/**
|
||||
* 反向操作标准
|
||||
*/
|
||||
@@ -2034,12 +2046,126 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
|
||||
@Override
|
||||
public void insertIntoIndexForMap(Map<String, Object> attrInfoMap) {
|
||||
|
||||
Set<String> keys = attrInfoMap.keySet();
|
||||
for (String key:keys) {
|
||||
String value = String.valueOf(attrInfoMap.get(key));
|
||||
if (com.adc.da.util.utils.StringUtils.isNotBlank(value) && !"null".equals(value) && !"SVPPS".equals(key)){
|
||||
value = value.replace(" , ",",");
|
||||
value = value.replace(","," , ");
|
||||
attrInfoMap.put(key,value);
|
||||
}
|
||||
}
|
||||
// 根据文件attid 读取文件内容
|
||||
if (org.apache.commons.lang.StringUtils.isNotEmpty(String.valueOf(attrInfoMap.get("content")))) {
|
||||
String[] attidlist = String.valueOf(attrInfoMap.get("content")).split(" , ");
|
||||
StringBuilder content = new StringBuilder("");
|
||||
for (int i = 0; i < attidlist.length; i++) {
|
||||
if(org.apache.commons.lang.StringUtils.isNotEmpty(attidlist[i]) ){
|
||||
AttFileEO attFileEO = attFileEOService.getFileInfo(attidlist[i]);
|
||||
//String readFilePath = filePath + "/" + attFileEO.getFilePath() + attFileEO.getFileName();
|
||||
String readFilePath = "E:\\上汽企标流程总览.pdf";
|
||||
try {
|
||||
// 判断文件是docx还是PDF
|
||||
if (null != attFileEO.getFileSuffix() && (attFileEO.getFileSuffix().equals("docx") || attFileEO.getFileSuffix().equals("doc") || attFileEO.getFileSuffix().equals("ppt") || attFileEO.getFileSuffix().equals("pptx"))) {
|
||||
if(attFileEO.getFileSuffix().equals("doc")){
|
||||
FileInputStream fis = new FileInputStream(readFilePath);
|
||||
WordExtractor wordExtractor = new WordExtractor(fis);
|
||||
String txt = wordExtractor.getText();
|
||||
content.append(txt);
|
||||
}else {
|
||||
OPCPackage opcPackage = XWPFDocument.openPackage(readFilePath);
|
||||
XWPFWordExtractor extractor = new XWPFWordExtractor(opcPackage);
|
||||
String txt = extractor.getText();
|
||||
content.append(txt);
|
||||
}
|
||||
} else {
|
||||
PDDocument document = PDDocument.load(new File(readFilePath));
|
||||
document.getClass();
|
||||
if (!document.isEncrypted()) {
|
||||
PDFTextStripperByArea stripper = new PDFTextStripperByArea();
|
||||
stripper.setSortByPosition(true);
|
||||
PDFTextStripper tStripper = new PDFTextStripper();
|
||||
String pdfFileInText = tStripper.getText(document);
|
||||
// String[] lines = pdfFileInText.split("\\r?\\n");
|
||||
content.append(pdfFileInText);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("搜索中心新增数据读取文档内容时失败");
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
attrInfoMap.put("content",content.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
attrInfoMap.put("content","");
|
||||
}
|
||||
standLawsSearchService.addStandLawsSearchForMap(attrInfoMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateIntoIndexForMap(Map<String, Object> attrInfoMap) {
|
||||
|
||||
Set<String> keys = attrInfoMap.keySet();
|
||||
for (String key:keys) {
|
||||
String value = String.valueOf(attrInfoMap.get(key));
|
||||
if (com.adc.da.util.utils.StringUtils.isNotBlank(value) && !"null".equals(value) && !"SVPPS".equals(key) && !"content".equals(key)){
|
||||
value = value.replace(" , ",",");
|
||||
value = value.replace(","," , ");
|
||||
attrInfoMap.put(key,value);
|
||||
}
|
||||
}
|
||||
// 根据文件attid 读取文件内容
|
||||
if (org.apache.commons.lang.StringUtils.isNotEmpty(String.valueOf(attrInfoMap.get("content")))) {
|
||||
String[] attidlist = String.valueOf(attrInfoMap.get("content")).split(" , ");
|
||||
StringBuilder content = new StringBuilder("");
|
||||
for (int i = 0; i < attidlist.length; i++) {
|
||||
if(org.apache.commons.lang.StringUtils.isNotEmpty(attidlist[i]) && !"null".equals(attidlist[i])){
|
||||
AttFileEO attFileEO = attFileEOService.getFileInfo(attidlist[i]);
|
||||
//String readFilePath = filePath + "/" + attFileEO.getFilePath() + attFileEO.getFileName();
|
||||
try {
|
||||
// 判断文件是docx还是PDF
|
||||
/*if (attFileEO.getFileSuffix().equals("docx") || attFileEO.getFileSuffix().equals("doc")) {
|
||||
if(attFileEO.getFileSuffix().equals("doc")){
|
||||
FileInputStream fis = new FileInputStream(readFilePath);
|
||||
WordExtractor wordExtractor = new WordExtractor(fis);
|
||||
String txt = wordExtractor.getText();
|
||||
content.append(txt);
|
||||
}else {
|
||||
OPCPackage opcPackage = XWPFDocument.openPackage(readFilePath);
|
||||
XWPFWordExtractor extractor = new XWPFWordExtractor(opcPackage);
|
||||
String txt = extractor.getText();
|
||||
content.append(txt);
|
||||
}
|
||||
} else if (attFileEO.getFileSuffix().equals("pdf")){
|
||||
PDDocument document = PDDocument.load(new File(readFilePath));
|
||||
document.getClass();
|
||||
if (!document.isEncrypted()) {
|
||||
PDFTextStripperByArea stripper = new PDFTextStripperByArea();
|
||||
stripper.setSortByPosition(true);
|
||||
PDFTextStripper tStripper = new PDFTextStripper();
|
||||
String pdfFileInText = tStripper.getText(document);
|
||||
// String[] lines = pdfFileInText.split("\\r?\\n");
|
||||
content.append(pdfFileInText);
|
||||
}
|
||||
}*/
|
||||
String readFilePath = "E:\\上汽企标流程总览.pdf";
|
||||
FileInputStream fis = new FileInputStream(readFilePath);
|
||||
WordExtractor wordExtractor = new WordExtractor(fis);
|
||||
String txt = wordExtractor.getText();
|
||||
content.append(txt);
|
||||
} catch (Exception e) {
|
||||
logger.error("搜索中心修改数据读取文档内容时失败");
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
attrInfoMap.put("content",content.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
attrInfoMap.put("content","");
|
||||
}
|
||||
standLawsSearchService.updateStandLawsSearchForMap(attrInfoMap);
|
||||
}
|
||||
//
|
||||
// @Override
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.adc.da.slrs.search;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsSearchMenu;
|
||||
import com.adc.da.slrs.tsDictionaryType.service.ITsDicTypeService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/${restPath}/search")
|
||||
public class SearchController {
|
||||
|
||||
@Autowired
|
||||
private ITsDicTypeService iTsDictypeService;
|
||||
|
||||
@ApiOperation("获取筛选条件")
|
||||
@PostMapping("/getMenu")
|
||||
public ResponseMessage<List<TsSearchMenu>> getSearchMenu(){
|
||||
return Result.success(iTsDictypeService.getSearchMenu());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user