update:修复清单bug
This commit is contained in:
+2
-2
@@ -96,7 +96,7 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
* date 2021-06-24
|
||||
**/
|
||||
@ApiOperation(value = "导出标准信息")
|
||||
@PostMapping("/ExportLawsById")
|
||||
@GetMapping("/ExportLawsById")
|
||||
public void ExportLawsById(HttpServletResponse response, StandExcelVo standExcelVo){
|
||||
try {
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
@@ -138,7 +138,7 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
.KCCVPPSCN(lawsDto.getKCCVPPSCN())
|
||||
.build();
|
||||
}
|
||||
EasyExcel.write(response.getOutputStream(), LawsDto.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
EasyExcel.write(response.getOutputStream(), LawsDto.class).useDefaultStyle(false).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(data);
|
||||
} catch (Exception e) {
|
||||
response.reset();
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
|
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@@ -21,32 +23,54 @@ 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;
|
||||
@ColumnWidth(16)
|
||||
@ExcelProperty(value = "标准实施日期", index = 5)
|
||||
@ApiModelProperty(value = "标准实施日期")
|
||||
private String putTime;
|
||||
@ColumnWidth(16)
|
||||
@ExcelProperty(value = "新车型实施日期", index = 6)
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
private String XCXSSRQGJ;
|
||||
@ColumnWidth(16)
|
||||
@ExcelProperty(value = "在产车实施日期", index = 7)
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
private String ZCCSSRQGJ;
|
||||
@ExcelProperty(value = "责任部门", index = 8)
|
||||
@ApiModelProperty(value = "责任部门")
|
||||
private String ZRBM;
|
||||
@ColumnWidth(14)
|
||||
@ExcelProperty(value = "适用产品线", index = 9)
|
||||
@ApiModelProperty(value = "适用产品线")
|
||||
private String SYCPX;
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(value = "乘用车VPPS编码", index = 10)
|
||||
@ApiModelProperty(value = "乘用车VPPS编码")
|
||||
private String CYCVPPSBM;
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(value = "乘用车vpps中文名称", index = 11)
|
||||
@ApiModelProperty(value = "乘用车vpps中文名称")
|
||||
private String CYCVPPSCN;
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(value = "卡车VPPS编码", index = 12)
|
||||
@ApiModelProperty(value = "卡车VPPS编码")
|
||||
private String KCCVPPSBM;
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(value = "卡车vpps中文名称", index = 13)
|
||||
@ApiModelProperty(value = "卡车vpps中文名称")
|
||||
private String KCCVPPSCN;
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarLawsDetailedList.controller;
|
||||
|
||||
|
||||
import com.adc.da.att.controller.AttFileEOController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
@@ -13,7 +14,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -37,6 +37,7 @@ public class SarLawsDetailedListController extends BaseController<SarLawsDetaile
|
||||
|
||||
@Autowired
|
||||
private SarLawsDetailedListServiceImpl sarLawsDetailedListService;
|
||||
private AttFileEOController attFileEOController;
|
||||
|
||||
/**
|
||||
* @param idList 要进行删除的清单id
|
||||
|
||||
+1
-8
@@ -26,10 +26,8 @@ public class AddDetailedDto {
|
||||
private String sortKey;
|
||||
@ApiModelProperty(value = "清单名称")
|
||||
private String detailedListName;
|
||||
|
||||
@ApiModelProperty(value = "清单详情")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "清单状态,1为未发布,2为发布")
|
||||
private String detailedListState;
|
||||
@ApiModelProperty(value = "适用领域")
|
||||
@@ -37,12 +35,7 @@ public class AddDetailedDto {
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updatePeople;
|
||||
@ApiModelProperty(value = "上传的附件")
|
||||
private MultipartFile[] files;
|
||||
private String fileIds;
|
||||
@ApiModelProperty(value = "要添加的清单id")
|
||||
private String inforlist;
|
||||
|
||||
|
||||
public MultipartFile getFiles(int i) {
|
||||
return files[i];
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -44,8 +44,7 @@ public class DetailedUpDto {
|
||||
private String applicationScope;
|
||||
|
||||
@ApiModelProperty(value = "附件id")
|
||||
private String fileId;
|
||||
|
||||
private String fileIds;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date reNewTime;
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ public class SarLawsDetailedList extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "附件id")
|
||||
@TableField("file_id")
|
||||
private String fileId;
|
||||
private String fileIds;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -70,6 +70,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
.updatePeople(addDetailedDto.getUpdatePeople())
|
||||
.remark(addDetailedDto.getRemark())
|
||||
.updatePeople(getUserName())
|
||||
.fileIds(addDetailedDto.getFileIds())
|
||||
.build();
|
||||
switch (addDetailedDto.getSortKey()) {
|
||||
case "1":
|
||||
@@ -194,6 +195,10 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
if (StringUtils.isBlank(detailedUpDto.getDetailedListState())) list.setDetailedListState(null);
|
||||
else if ("null".equals(detailedUpDto.getDetailedListState()));
|
||||
else list.setDetailedListState(detailedUpDto.getDetailedListState());
|
||||
//文件
|
||||
if (StringUtils.isBlank(detailedUpDto.getFileIds())) list.setFileIds(null);
|
||||
else if ("null".equals(detailedUpDto.getFileIds()));
|
||||
else list.setFileIds(detailedUpDto.getFileIds());
|
||||
|
||||
sarLawsDetailedListDao.updateById(list);
|
||||
detailedUpDto.setInforlist(detailedUpDto.getInforlist().substring(1,detailedUpDto.getInforlist().length()-1));
|
||||
|
||||
+5
-5
@@ -150,11 +150,11 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
list = null;
|
||||
}else {
|
||||
list = sarLawsAttrDetailedListDao.selectLawsByIdC(standId,findStandDto.getStandName(), findStandDto.getStandType());
|
||||
}
|
||||
for (LawsDto lawsDto:list){
|
||||
if (sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()).size()!=0){
|
||||
lawsDto.setTypeApplicable(StringUtils.join(sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()), ","));
|
||||
System.out.println(StringUtils.join(sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()), ","));
|
||||
for (LawsDto lawsDto:list){
|
||||
if (sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()).size()!=0){
|
||||
lawsDto.setTypeApplicable(StringUtils.join(sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()), ","));
|
||||
System.out.println(StringUtils.join(sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()), ","));
|
||||
}
|
||||
}
|
||||
}
|
||||
IPage<LawsDto> page1=new Page<>();
|
||||
|
||||
Reference in New Issue
Block a user