标准分解单 分页

This commit is contained in:
zhaokaiyao@91isoft.com
2021-08-17 14:09:06 +08:00
parent 68d7a1ab66
commit e6908fb48c
9 changed files with 90 additions and 40 deletions
@@ -1,6 +1,7 @@
package com.adc.da.slrs.sarStandItems.controller;
import com.adc.da.http.PageInfo;
import com.adc.da.http.ResponseMessage;
import com.adc.da.http.Result;
@@ -55,9 +56,11 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
@ApiOperation(value = "分解单查询")
@GetMapping("/querySarItemAndInterpretation")
public ResponseMessage querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
List<SarItemVO> sarItemVOS = ServiceImpl.querySarItemAndInterpretation(page);
List<SarStandItems> rows = ServiceImpl.querySarItemAndInterpretation(page);
return Result.success("200",sarItemVOS);
PageInfo<SarStandItems> pageInfo = getPageInfo(page.getPager(), rows);
return Result.success(pageInfo);
}
@@ -24,7 +24,10 @@ import java.util.Set;
@Repository
public interface SarStandItemsDao extends BaseMapper<SarStandItems> {
List<SarItemVO> querySarItemAndInterpretation(FindSarItemsPageReqDTO page);
List<SarStandItems> querySarItemAndInterpretation(FindSarItemsPageReqDTO page);
Integer sarItemCount(FindSarItemsPageReqDTO page);
List<SarStandItems> querySarStandItemsList(SarStandItemsEOPage page);
@@ -10,7 +10,7 @@ import java.util.Date;
@Data
public class FindSarItemsPageReqDTO {
public class FindSarItemsPageReqDTO extends BasePage {
private static final long serialVersionUID = 1L;
private Integer page = 1;
@@ -27,8 +27,6 @@ public class SarItemVO extends BaseEntity {
@ApiModelProperty(value = "条款名称")
private String itemsName;
@ApiModelProperty(value = "条款内容(未使用)")
private String itemsTitle;
@ApiModelProperty(value = "条款内容--条款要求")
private String termsConditions;
@@ -66,4 +64,7 @@ public class SarItemVO extends BaseEntity {
@ApiModelProperty(value = "解读内容--核心技术要点")
private String interpretationContent;
}
@@ -17,7 +17,7 @@ import lombok.experimental.Accessors;
/**
* <p>
*
*
* </p>
*
* @author super_liu
@@ -132,6 +132,15 @@ public class SarStandItems extends BaseEntity {
@TableField("ZCCSSRQ")
private Date zccssrq;
@ApiModelProperty(value = "符合性要求-符合性状态")
@TableField("COMPLIANCE_REQUIR")
private String complianceRequire;
@ApiModelProperty(value = "解读内容--核心技术要点")
@TableField("core_technical_requirement")
private String interpretationContent;
@TableField(exist = false)
private String emergyKindShow;
@TableField(exist = false)
@@ -11,6 +11,7 @@ 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.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;
@@ -191,7 +192,15 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
}
public List<SarItemVO> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
return dao.querySarItemAndInterpretation(page);
public List<SarStandItems> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
Integer count=dao.sarItemCount(page);
page.getPager().setRowCount(count);
List<SarStandItems> sarStandItems = dao.querySarItemAndInterpretation(page);
return sarStandItems;
}
}
@@ -599,10 +599,17 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
FindSarItemsPageReqDTO pageInfo = new FindSarItemsPageReqDTO();
pageInfo.setStandId(sarStandardsInfoEO.getId());
pageInfo.setFileType("FBGBJBD");
List<SarItemVO> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
/**
* SarItemVO换为sarItemVOS
* List<SarItemVO> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
* .collect(Collectors.toMap(SarItemVO::getItemsNum, SarItemVO::getItemsName));
*/
List<SarStandItems> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
if(!sarItemVOS.isEmpty()){
Map<String,String> collectMap = sarItemVOS.stream().filter((e) -> e.getItemsNum() != null && e.getItemsName() != null)
.collect(Collectors.toMap(SarItemVO::getItemsNum, SarItemVO::getItemsName));
.collect(Collectors.toMap(SarStandItems::getItemsNum, SarStandItems::getItemsName));
sarStandardsInfoEO.setMapItems(collectMap);
}
createStandMQService.sendStandMQ(sarStandardsInfoEO,"add");
@@ -1179,10 +1186,16 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
FindSarItemsPageReqDTO pageInfo = new FindSarItemsPageReqDTO();
pageInfo.setStandId(sarStandardsInfoEO.getId());
pageInfo.setFileType("FBGBJBD");
List<SarItemVO> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
/**
* SarItemVO换为SarItemVOS
* List<SarItemVO> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
* .collect(Collectors.toMap(SarItemVO::getItemsNum, SarItemVO::getItemsName));
*/
List<SarStandItems> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
if(!sarItemVOS.isEmpty()){
Map<String,String> collectMap = sarItemVOS.stream().filter((e) -> e.getItemsNum() != null && e.getItemsName() != null)
.collect(Collectors.toMap(SarItemVO::getItemsNum, SarItemVO::getItemsName));
.collect(Collectors.toMap(SarStandItems::getItemsNum, SarStandItems::getItemsName));
sarStandardsInfoEO.setMapItems(collectMap);
}
createStandMQService.sendStandMQ(sarStandardsInfoEO,"update");