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