Merge remote-tracking branch 'origin/develop_1' into develop_1
This commit is contained in:
+33
-1
@@ -88,8 +88,40 @@ public class ActSarItemsEOService {
|
||||
@Value("${elas.flag}")
|
||||
private boolean elasflag;
|
||||
|
||||
/**
|
||||
* 标准解读流程入库"
|
||||
* @param standJson
|
||||
* @throws Exception
|
||||
*/
|
||||
public void createStandardRead(String standJson) throws Exception{
|
||||
JSONObject object = JSONObject.parseObject(standJson);
|
||||
String fileName = object.getString("fileName");
|
||||
String fileType = object.getString("fileType");
|
||||
String creationTime = object.getString("creationTime");
|
||||
String creationUser = object.getString("creationUser");
|
||||
String standId = object.getString("standId");
|
||||
//数组去重
|
||||
JSONArray responUserList1 = object.getJSONArray("itemList");
|
||||
for (Object obj:responUserList1) {
|
||||
JSONObject object1 = (JSONObject) obj;
|
||||
JSONArray preResponUserList = object1.getJSONArray("zxUserId");
|
||||
String oldNumber = object1.getString("oldNumber");
|
||||
String itemsNum = object1.getString("itemsNum");
|
||||
String itemsName = object1.getString("itemsName");
|
||||
String itemsTitle = object1.getString("itemsTitle");
|
||||
String applyArcticId = object1.getString("applyArcticId");
|
||||
String applyArctic = object1.getString("applyArctic");
|
||||
String changePoint = object1.getString("changePoint");
|
||||
String technicalRequir = object1.getString("technicalRequir");
|
||||
String onlineData = object1.getString("onlineData");
|
||||
String newData = object1.getString("newData");
|
||||
String complianceRequir = object1.getString("complianceRequir");
|
||||
String complianceState = object1.getString("complianceState");
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 标准入库流程数据保存
|
||||
* @Description: 标准解读流程入库"
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/12/7 13:48
|
||||
* @Param: [standJson]
|
||||
|
||||
@@ -39,7 +39,7 @@ eureka.client.fetch-registry=true
|
||||
#eureka.client.service-url.defaultZone=http://127.0.0.1:8671/eureka/
|
||||
#eureka.client.service-url.defaultZone=http://10.5.116.172:8672/eureka/
|
||||
|
||||
eureka.client.service-url.defaultZone=http://192.168.10.47:8761/eureka/
|
||||
eureka.client.service-url.defaultZone=http://101.36.227.25:8761/eureka/
|
||||
|
||||
# 请求连接的超时时间 默认的时间为 1 秒
|
||||
ribbon.ConnectTimeout=500000
|
||||
|
||||
+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));
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.adc.da.slrs.sarModelTree.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarModelTree.service.ISarModelTreeService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarModelTree.entity.SarModelTree;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-15
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "福田标准法规--标准法规库-模块树结构")
|
||||
@RequestMapping("/${restPath}/sarModelTree")
|
||||
public class SarModelTreeController extends BaseController<SarModelTree> {
|
||||
|
||||
@Autowired
|
||||
private ISarModelTreeService iSarModelTreeService;
|
||||
|
||||
@ApiOperation("查询所有资源")
|
||||
@GetMapping("/list")
|
||||
public ResponseMessage<List<SarModelTree>> getAll(SarModelTree sarVppsTree){
|
||||
List<SarModelTree> tsResources = iSarModelTreeService.getAll(sarVppsTree);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarModelTree.dao;
|
||||
|
||||
import com.adc.da.slrs.sarModelTree.entity.SarModelTree;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-15
|
||||
*/
|
||||
public interface SarModelTreeDao extends BaseMapper<SarModelTree> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.adc.da.slrs.sarModelTree.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarModelTree对象", description="")
|
||||
public class SarModelTree extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
|
||||
@TableField("PID")
|
||||
private String pid;
|
||||
|
||||
@TableField("MODEL")
|
||||
private String model;
|
||||
|
||||
@ApiModelProperty(value = "模块结构特性")
|
||||
@TableField("FEATURES")
|
||||
private String features;
|
||||
|
||||
@ApiModelProperty(value = "删除标识 1:未删除 2:已删除")
|
||||
@TableField("DEL_FLAG")
|
||||
private String delFlag;
|
||||
|
||||
@ApiModelProperty(value = "排序序号")
|
||||
@TableField("SORT")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "子菜单")
|
||||
@TableField(exist = false)
|
||||
private List<SarModelTree> children;
|
||||
|
||||
@ApiModelProperty(value = "上级菜单名称")
|
||||
@TableField(exist = false)
|
||||
private String parentIdsName;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> roleIds;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> childMenuIds;
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarModelTree.service;
|
||||
|
||||
import com.adc.da.slrs.sarModelTree.entity.SarModelTree;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-15
|
||||
*/
|
||||
public interface ISarModelTreeService extends IService<SarModelTree> {
|
||||
|
||||
List<SarModelTree> getAll(SarModelTree sarModelTree);
|
||||
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.adc.da.slrs.sarModelTree.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarModelTree.entity.SarModelTree;
|
||||
import com.adc.da.slrs.sarModelTree.dao.SarModelTreeDao;
|
||||
import com.adc.da.slrs.sarModelTree.service.ISarModelTreeService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-15
|
||||
*/
|
||||
@Service
|
||||
public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarModelTree> implements ISarModelTreeService {
|
||||
|
||||
/**
|
||||
* 查询所有菜单
|
||||
* @param sarModelTree
|
||||
*/
|
||||
@Override
|
||||
public List<SarModelTree> getAll(SarModelTree sarModelTree) {
|
||||
QueryWrapper<SarModelTree> tsResourceQueryWrapper=new QueryWrapper<>();
|
||||
tsResourceQueryWrapper.isNull("PID");
|
||||
List<SarModelTree> list = this.baseMapper.selectList(tsResourceQueryWrapper);
|
||||
for(SarModelTree tree:list){
|
||||
tree.setChildren(recursionGetChildren((tree)));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归调用获取子节点
|
||||
* @param parent:父节点
|
||||
* @return List<SarMenu>
|
||||
*/
|
||||
private List<SarModelTree> recursionGetChildren(SarModelTree parent){
|
||||
QueryWrapper<SarModelTree> sarMenuQueryWrapper=new QueryWrapper<>();
|
||||
sarMenuQueryWrapper.orderByAsc("SORT");
|
||||
sarMenuQueryWrapper.eq("PID",parent.getId());
|
||||
List<SarModelTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
|
||||
for(SarModelTree sarMenu:children){
|
||||
sarMenu.setChildren(recursionGetChildren((sarMenu)));
|
||||
}
|
||||
return children;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -187,8 +187,8 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
private String sycpx;
|
||||
|
||||
@ApiModelProperty(value = "适用认证")
|
||||
@TableField("SYZD")
|
||||
private String syzd;
|
||||
@TableField("SYRZ")
|
||||
private String syrz;
|
||||
|
||||
@ApiModelProperty(value = "责任工程师")
|
||||
@TableField("ZRGCS")
|
||||
|
||||
+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<>();
|
||||
|
||||
+96
-13
@@ -1,26 +1,20 @@
|
||||
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.SarStandProjectLibraryDto;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.productLineDto;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.*;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.service.impl.SarStandProjectLibraryServiceImpl;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
@@ -37,7 +31,6 @@ import java.util.*;
|
||||
public class SarStandProjectLibraryController extends BaseController<SarStandProjectLibrary> {
|
||||
@Resource
|
||||
private SarStandProjectLibraryServiceImpl sarStandProjectLibraryService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param Page
|
||||
@@ -71,7 +64,14 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
List<SarStandProjectLibrary> list = sarStandProjectLibraryService.queryById(id);
|
||||
return Result.success("200",list);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param current
|
||||
* @param pageSize
|
||||
* @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){
|
||||
@@ -89,6 +89,89 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
}
|
||||
return Result.success("200",listTemp);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param current
|
||||
* @param pageSize
|
||||
* @param id
|
||||
* @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);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-15
|
||||
**/
|
||||
@PostMapping("/deleteByIds")
|
||||
@ApiOperation("批量删除标准")
|
||||
public ResponseMessage deleteByIds(String id){
|
||||
String[] ids = id.split(",");
|
||||
List<String> list = Arrays.asList(ids);
|
||||
sarStandProjectLibraryService.deleteByIds(list);
|
||||
return Result.success("200","删除成功");
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param list
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-15
|
||||
**/
|
||||
@PostMapping("/batchInsert")
|
||||
@ApiOperation("调取标准")
|
||||
public ResponseMessage batchInsert(@RequestBody List<StandProjectRelationDto> list){
|
||||
sarStandProjectLibraryService.batchInsert(list);
|
||||
return Result.success("200","新增成功",list);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param standAttrInfoExcelDto
|
||||
* @param response
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-16
|
||||
**/
|
||||
@ApiOperation("导出Excel表")
|
||||
@GetMapping(value = "/exportStandAttrInfoExcel")
|
||||
public void exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto, HttpServletResponse response) throws Exception {
|
||||
try {
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
|
||||
if(standAttrInfoExcelDto.getExportName()==null){
|
||||
standAttrInfoExcelDto.setExportName("车型项目详情");
|
||||
}
|
||||
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);
|
||||
// 这里需要设置不关闭流
|
||||
EasyExcel.write(response.getOutputStream(), StandAttrInfoDto.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(data);
|
||||
} catch (Exception e) {
|
||||
System.out.println(e);
|
||||
// 重置response
|
||||
response.reset();
|
||||
response.setContentType("application/json");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.getWriter().println(JSON.toJSONString(Result.error()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.StandProjectRelationDto;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -17,5 +18,6 @@ import java.util.List;
|
||||
*/
|
||||
public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLibrary> {
|
||||
// List<SarStandProjectLibrary> queryProjectManagerPage(@Param("current") int current, @Param("pageSize") int pageSize);
|
||||
|
||||
void deleteByIds(@Param("ids") List<String> ids);
|
||||
void batchInsert(@Param("list") List<StandProjectRelationDto> list);
|
||||
}
|
||||
|
||||
+30
@@ -68,8 +68,38 @@ public class SarStandProjectLibrary extends BaseEntity {
|
||||
private String projectManager;
|
||||
|
||||
@ApiModelProperty(value = "项目经理名称")
|
||||
|
||||
@TableField(exist = false)
|
||||
private String uName;
|
||||
|
||||
|
||||
//标准编号
|
||||
@TableField(exist = false)
|
||||
private String standId;
|
||||
//中文名称
|
||||
@TableField(exist = false)
|
||||
private String standName;
|
||||
//英文名称
|
||||
@TableField(exist = false)
|
||||
private String standEnName;
|
||||
//标准实施日期
|
||||
@TableField(exist = false)
|
||||
private String ssrq;
|
||||
//新车型实施日期
|
||||
@TableField(exist = false)
|
||||
private String XCXSSRQGJ;
|
||||
//在产车实施日期
|
||||
@TableField(exist = false)
|
||||
private String ZCCSSRQGJ;
|
||||
//责任部门
|
||||
@TableField(exist = false)
|
||||
private String ZRBM;
|
||||
//关联模块-VPPS
|
||||
@TableField(exist = false)
|
||||
private String CYCVPPSBM;
|
||||
//关联模块-中文名称
|
||||
@TableField(exist = false)
|
||||
private String CYCVPPSCN;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.entity;
|
||||
|
||||
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 添加类/接口功能描述
|
||||
*
|
||||
* @author zhangjin
|
||||
* @date 2021-07-13
|
||||
*/
|
||||
@Data
|
||||
@HeadRowHeight(35)
|
||||
@ColumnWidth(30)
|
||||
public class StandAttrInfoDto {
|
||||
|
||||
//标准编号
|
||||
@ExcelProperty("标准编号")
|
||||
private String standId;
|
||||
//中文名称
|
||||
@ExcelProperty("中文名称")
|
||||
private String standName;
|
||||
//英文名称
|
||||
@ExcelProperty("英文名称")
|
||||
private String standEnName;
|
||||
//标准实施日期
|
||||
@ExcelProperty("标准实施日期")
|
||||
private String SSRQ;
|
||||
//新车型实施日期
|
||||
@ExcelProperty("新车型实施日期")
|
||||
private String XCXSSRQGJ;
|
||||
//在产车实施日期
|
||||
@ExcelProperty("在产车实施日期")
|
||||
private String ZCCSSRQGJ;
|
||||
//责任部门
|
||||
@ExcelProperty("责任部门")
|
||||
private String ZRBM;
|
||||
//关联模块--卡车VPPS编码
|
||||
@ExcelProperty("关联模块--卡车VPPS编码")
|
||||
private String KCCVPPSBM;
|
||||
//关联模块--卡车vpps中文名称
|
||||
@ExcelProperty("关联模块--卡车vpps中文名称")
|
||||
private String KCCVPPSCN;
|
||||
//关联模块--乘用车VPPS编码
|
||||
@ExcelProperty("关联模块--乘用车VPPS编码")
|
||||
private String CYCVPPSBM;
|
||||
//关联模块--乘用车vpps中文名称
|
||||
@ExcelProperty("关联模块--乘用车vpps中文名称")
|
||||
private String CYCVPPSCN;
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* //TODO 添加类/接口功能描述
|
||||
*
|
||||
* @author zhangjin
|
||||
* @date 2021-07-15
|
||||
*/
|
||||
@Data
|
||||
public class StandAttrInfoExcelDto {
|
||||
|
||||
String exportName;
|
||||
|
||||
List<String> ids;
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* //TODO 添加类/接口功能描述
|
||||
*
|
||||
* @author zhangjin
|
||||
* @date 2021-07-13
|
||||
*/
|
||||
@Data
|
||||
public class StandProjectRelationDto {
|
||||
|
||||
private String projectId;
|
||||
|
||||
private String standId;
|
||||
|
||||
}
|
||||
+8
-3
@@ -1,9 +1,8 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibraryDto;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.productLineDto;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -13,4 +12,10 @@ public interface SarStandProjectLibraryService {
|
||||
List<SarStandProjectLibrary> queryById(String id);
|
||||
IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize);
|
||||
List<SarStandProjectLibrary> queryByProductLine(String productLine);
|
||||
List<SarStandProjectLibrary> queryStandId(String standId);
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
+146
-3
@@ -1,10 +1,13 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandIssueControlProduct.entity.SarStandIssueControlProduct;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary;
|
||||
|
||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.*;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibraryDto;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.service.SarStandProjectLibraryService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
@@ -15,6 +18,8 @@ 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;
|
||||
|
||||
/**
|
||||
@@ -30,6 +35,10 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
|
||||
@Resource
|
||||
private SarStandProjectLibraryDao sarStandProjectLibraryDao;
|
||||
@Resource
|
||||
private SarStandardsInfoDao SarStandardsInfoDao;
|
||||
@Resource
|
||||
private SarStandAttrInfoDao sarStandAttrInfoDao;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -144,6 +153,140 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandProjectLibrary> queryStandId(String standId) {
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
wrapper.select("stand_id");
|
||||
wrapper.last("INNER JOIN sar_stand_project_relation r ON sar_stand_project_library.id = r.project_id");
|
||||
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.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.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.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());
|
||||
}
|
||||
}
|
||||
list.add(p);
|
||||
System.out.println(list);
|
||||
}
|
||||
IPage<StandAttrInfoDto> userIPage = new Page<>();
|
||||
userIPage.setRecords(list);
|
||||
userIPage.setTotal(userIPage1.getTotal());
|
||||
System.out.println("总条数"+userIPage.getTotal());
|
||||
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) {
|
||||
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());
|
||||
}
|
||||
}
|
||||
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());
|
||||
}
|
||||
}
|
||||
list.add(p);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private IPage<SarStandProjectLibrary> getSarStandProjectLibraryIPage(int current, int pageSize, QueryWrapper<SarStandProjectLibrary> wrapper) {
|
||||
Page<SarStandProjectLibrary> page = new Page<>(current, pageSize);
|
||||
IPage<SarStandProjectLibrary> userIPage = sarStandProjectLibraryDao.selectPage(page, wrapper);
|
||||
|
||||
+102
-3
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
@@ -16,12 +17,17 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import oracle.ucp.proxy.annotation.Post;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -98,6 +104,55 @@ public class SarStandardComplianceAssessResultController {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class InsertEntity<T>{
|
||||
List<Map> entityList;
|
||||
T eo;
|
||||
}
|
||||
|
||||
@ApiOperation(value="(插入/更新)标准清单")
|
||||
@PostMapping("/standard")
|
||||
public ResponseMessage insertStandard(@RequestBody InsertEntity<SarStandardsInfoEO> insertEntity) throws InvocationTargetException, IllegalAccessException {
|
||||
|
||||
SarStandardsInfoEO eo = insertEntity.eo;
|
||||
|
||||
if (eo.getStandApplicationType() == 1) {
|
||||
|
||||
List<SarStandardComplianceProductAssess> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarStandardComplianceProductAssess obj=new SarStandardComplianceProductAssess();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
|
||||
iSarStandardComplianceProductAssessService.saveOrUpdateBatch(entityList);
|
||||
|
||||
}else {
|
||||
if(eo.getPosition()==1){
|
||||
List<SarInterpretationNationalStandard> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarInterpretationNationalStandard obj=new SarInterpretationNationalStandard();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
iSarInterpretationNationalStandardService.saveOrUpdateBatch(entityList);
|
||||
|
||||
}else{
|
||||
List<SarInterpretationForeignStandard> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarInterpretationForeignStandard obj=new SarInterpretationForeignStandard();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
iSarInterpretationForeignStandardService.saveOrUpdateBatch(entityList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "条件查询标准涉及项目符合性清单")
|
||||
@GetMapping("/product")
|
||||
public ResponseMessage<IPage<SarStandardComplianceProductAssess>> selectProduct(SarStandardComplianceProductAssessEO eo) throws Exception {
|
||||
@@ -114,6 +169,17 @@ public class SarStandardComplianceAssessResultController {
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "插入标准涉及项目符合性清单")
|
||||
@PostMapping("/product")
|
||||
public ResponseMessage insertProduct(List<SarStandardComplianceProductAssess> eo) throws Exception {
|
||||
|
||||
iSarStandardComplianceProductAssessService.saveOrUpdateBatch(eo);
|
||||
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "条件查询技术审核符合性清单")
|
||||
@GetMapping("/interpretation")
|
||||
public ResponseMessage<Object> selectNationalStandard(InterpretationEO eo) throws Exception {
|
||||
@@ -137,4 +203,37 @@ public class SarStandardComplianceAssessResultController {
|
||||
return Result.success(page);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "插入技术审核符合性清单")
|
||||
@PostMapping("/interpretation")
|
||||
public ResponseMessage insertInterpretation(InsertEntity<InterpretationEO> insertEntity) throws Exception {
|
||||
|
||||
InterpretationEO eo = insertEntity.eo;
|
||||
|
||||
if (eo.getPosition()==1) {
|
||||
|
||||
List<SarInterpretationNationalStandard> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarInterpretationNationalStandard obj=new SarInterpretationNationalStandard();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
iSarInterpretationNationalStandardService.saveOrUpdateBatch(entityList);
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
List<SarInterpretationForeignStandard> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarInterpretationForeignStandard obj=new SarInterpretationForeignStandard();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
iSarInterpretationForeignStandardService.saveOrUpdateBatch(entityList);
|
||||
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -419,6 +419,15 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "标准发布查询")
|
||||
@GetMapping("/getStandInfoByList")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:get")
|
||||
public ResponseMessage<List<SarStandardsInfo>> getStandInfoByList(String limit) throws Exception {
|
||||
List<SarStandardsInfo> result = sarStandardsInfoEOService.getStandInfoByList(limit);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarStandardsInfoEO|详情")
|
||||
@GetMapping("/getStandInfoById")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:get")
|
||||
|
||||
+2
@@ -29,6 +29,8 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
|
||||
List<SarStandardsInfo> selectStandardsByStandnumber(SarStandardsInfo sarStandardsInfoEO);
|
||||
|
||||
List<SarStandardsInfo> queryStandInfoByList(@Param("limit") Integer limit);
|
||||
|
||||
Integer selectStandColumn(@Param("columnName") String columnName);
|
||||
|
||||
Integer selectCounterStandardsCount(SarStandardsInfo sarStandardsInfoEO);
|
||||
|
||||
+2
@@ -154,6 +154,8 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> attrInfoMap = new LinkedHashMap<>(); //属性表字段与值
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> attrInfoCaseMap = new LinkedHashMap<>(); //属性表字段与值小写前端带入渲染
|
||||
@TableField(exist = false)
|
||||
private String sarStandAttrEOStr; //新增修改时属性表信息
|
||||
@TableField(exist = false)
|
||||
private String menuId; //目录ID
|
||||
|
||||
+2
@@ -31,6 +31,8 @@ public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
|
||||
|
||||
List<SarStandardsInfo> selectStandardsByStandnumber(String replaceStandNum, String standType);
|
||||
|
||||
List<SarStandardsInfo> getStandInfoByList(String limit);
|
||||
|
||||
SarStandardsInfo selectStandardsInfoByKey(String id) throws Exception;
|
||||
|
||||
public void attrInfoDetails (SarStandardsInfo row) throws Exception;
|
||||
|
||||
+57
-1
@@ -286,10 +286,61 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
|
||||
if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private Map<String, Object> transformUpperCase(Map<String, Object> orgMap) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
for (Map.Entry<String, Object> entry : orgMap.entrySet()) {
|
||||
String newKey = entry.getKey().toLowerCase();
|
||||
resultMap.put(newKey, orgMap.get(entry.getKey()));
|
||||
if (entry.getValue() != null && InitStandAttrUtil.fileFieldList != null && !InitStandAttrUtil.fileFieldList.isEmpty() && InitStandAttrUtil.fileFieldList.contains(entry.getKey())) {
|
||||
String value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
if(!fileObj.isEmpty()){
|
||||
resultMap.put(newKey + "Name", fileObj.get(0).getOldFileName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
public void attrInfoShowDetails(List<SarStandardsInfo> sarlist) throws Exception {
|
||||
for (SarStandardsInfo row : sarlist) {
|
||||
attrInfoDetails(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
if (entry.getValue() != null && InitStandAttrUtil.fileFieldList != null && InitStandAttrUtil.fileFieldList.size() > 0 && InitStandAttrUtil.fileFieldList.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
}else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShow(List<SarStandardsInfo> sarlist) throws Exception {
|
||||
for (SarStandardsInfo row : sarlist) {
|
||||
attrInfoDetails(row);
|
||||
@@ -1778,6 +1829,11 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
return strhours;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandardsInfo> getStandInfoByList(String limit){
|
||||
return dao.queryStandInfoByList(Integer.valueOf(limit));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增过程中验证标准号
|
||||
*
|
||||
@@ -1800,7 +1856,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
if (resultlist.size() > 0) {
|
||||
List<SarStandardsInfo> sarStandardsInfoEOList = new ArrayList<>();
|
||||
sarStandardsInfoEOList.add(resultlist.get(0));
|
||||
attrInfoShow(sarStandardsInfoEOList);
|
||||
attrInfoShowDetails(sarStandardsInfoEOList);
|
||||
sarStandardsInfoEO = sarStandardsInfoEOList.get(0);
|
||||
}
|
||||
// 查询纳入清单的国家地区
|
||||
|
||||
@@ -8,8 +8,8 @@ import java.util.List;
|
||||
|
||||
public interface SarModelDao extends BaseMapper<SarModel> {
|
||||
|
||||
@Select("select id,pid,CONCAT(name,model) name,features from sar_model_tree where 1=1 and isnull(pid)")
|
||||
List<SarModel> findTreeAll();
|
||||
@Select("select id,pid,CONCAT(name,model) name,features from sar_model_tree where 1=1 and pid = #{pid}")
|
||||
List<SarModel> selectList(@Param("pid") String pid);
|
||||
// @Select("select id,pid,CONCAT(name,model) name,features from sar_model_tree where 1=1 and isnull(pid)")
|
||||
// List<SarModel> findTreeAll();
|
||||
// @Select("select id,pid,CONCAT(name,model) name,features from sar_model_tree where 1=1 and pid = #{pid}")
|
||||
// List<SarModel> selectList(@Param("pid") String pid);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarTree.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -12,6 +13,7 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarVPPS对象", description="")
|
||||
@TableName(value = "sar_vpps_tree")
|
||||
public class SarVPPS extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
+10
-6
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarTree.service.impl;
|
||||
import com.adc.da.slrs.sarTree.dao.SarModelDao;
|
||||
import com.adc.da.slrs.sarTree.entity.SarModel;
|
||||
import com.adc.da.slrs.sarTree.service.SarModelService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -23,8 +24,10 @@ public class SarModelServiceImpl implements SarModelService {
|
||||
@Override
|
||||
public List<SarModel> findTreeAll() {
|
||||
//查询父级都为null的数据
|
||||
List<SarModel> sarVppsList = sarModelDao.findTreeAll();
|
||||
for (SarModel sarVppsOne : sarVppsList) {
|
||||
QueryWrapper<SarModel> qw = new QueryWrapper<>();
|
||||
qw.isNull("pid");
|
||||
List<SarModel> sarVppsList = sarModelDao.selectList(qw);
|
||||
for (SarModel sarVppsOne:sarVppsList) {
|
||||
sarVppsOne.setChildren(getChildren(sarVppsOne));
|
||||
}
|
||||
return sarVppsList;
|
||||
@@ -32,14 +35,15 @@ public class SarModelServiceImpl implements SarModelService {
|
||||
|
||||
/**
|
||||
* 递归调用获取子节点
|
||||
*
|
||||
* @param parent:父节点
|
||||
* @return List<TsResource>
|
||||
*/
|
||||
private List<SarModel> getChildren(SarModel parent) {
|
||||
private List<SarModel> getChildren(SarModel parent){
|
||||
String pid = parent.getId();
|
||||
List<SarModel> children = sarModelDao.selectList(pid);
|
||||
for (SarModel sarVppsOne : children) {
|
||||
QueryWrapper<SarModel> qw = new QueryWrapper<>();
|
||||
qw.eq("pid",parent.getId());
|
||||
List<SarModel> children=sarModelDao.selectList(qw);
|
||||
for(SarModel sarVppsOne:children){
|
||||
sarVppsOne.setChildren(getChildren((sarVppsOne)));
|
||||
}
|
||||
return children;
|
||||
|
||||
+6
-2
@@ -24,7 +24,9 @@ public class SarVPPSServiceImpl implements SarVPPSService {
|
||||
@Override
|
||||
public List<SarVPPS> findTreeAll() {
|
||||
//查询父级都为null的数据
|
||||
List<SarVPPS> sarVppsList = sarVPPSDao.findTreeAll();
|
||||
QueryWrapper<SarVPPS> qw = new QueryWrapper<>();
|
||||
qw.isNull("pid");
|
||||
List<SarVPPS> sarVppsList = sarVPPSDao.selectList(qw);
|
||||
for (SarVPPS sarVppsOne:sarVppsList) {
|
||||
sarVppsOne.setChildren(getChildren(sarVppsOne));
|
||||
}
|
||||
@@ -38,7 +40,9 @@ public class SarVPPSServiceImpl implements SarVPPSService {
|
||||
*/
|
||||
private List<SarVPPS> getChildren(SarVPPS parent){
|
||||
String pid = parent.getId();
|
||||
List<SarVPPS> children = sarVPPSDao.selectList(pid);
|
||||
QueryWrapper<SarVPPS> qw = new QueryWrapper<>();
|
||||
qw.eq("pid",parent.getId());
|
||||
List<SarVPPS> children=sarVPPSDao.selectList(qw);
|
||||
for(SarVPPS sarVppsOne:children){
|
||||
sarVppsOne.setChildren(getChildren((sarVppsOne)));
|
||||
}
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.adc.da.slrs.sarVppsTree.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarVppsTree.service.ISarVppsTreeService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarVppsTree.entity.SarVppsTree;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-15
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "福田标准法规--标准法规库-Vpps树结构")
|
||||
@RequestMapping("/${restPath}/sarVppsTree")
|
||||
public class SarVppsTreeController extends BaseController<SarVppsTree> {
|
||||
|
||||
@Autowired
|
||||
private ISarVppsTreeService iSarVppsTreeService;
|
||||
|
||||
@ApiOperation("查询所有资源")
|
||||
@GetMapping("/list")
|
||||
public ResponseMessage<List<SarVppsTree>> getAll(SarVppsTree sarVppsTree){
|
||||
List<SarVppsTree> tsResources = iSarVppsTreeService.getAll(sarVppsTree);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarVppsTree.dao;
|
||||
|
||||
import com.adc.da.slrs.sarVppsTree.entity.SarVppsTree;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-15
|
||||
*/
|
||||
public interface SarVppsTreeDao extends BaseMapper<SarVppsTree> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.adc.da.slrs.sarVppsTree.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarVppsTree对象", description="")
|
||||
public class SarVppsTree extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "VPPS编码")
|
||||
@TableField("VPPS_CODE")
|
||||
private String vppsCode;
|
||||
|
||||
@ApiModelProperty(value = "父级id")
|
||||
@TableField("PID")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty(value = "编码")
|
||||
@TableField("CODE")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "中文名称")
|
||||
@TableField("CHINESE_NAME")
|
||||
private String chineseName;
|
||||
|
||||
@ApiModelProperty(value = "中文名称")
|
||||
@TableField("ENGLISH_NAME")
|
||||
private String englishName;
|
||||
|
||||
@ApiModelProperty(value = "删除标识 1:未删除 2:已删除")
|
||||
@TableField("DEL_FLAG")
|
||||
private String delFlag;
|
||||
|
||||
@ApiModelProperty(value = "排序序号")
|
||||
@TableField("SORT")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "子菜单")
|
||||
@TableField(exist = false)
|
||||
private List<SarVppsTree> children;
|
||||
|
||||
@ApiModelProperty(value = "上级菜单名称")
|
||||
@TableField(exist = false)
|
||||
private String parentIdsName;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> roleIds;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> childMenuIds;
|
||||
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.adc.da.slrs.sarVppsTree.service;
|
||||
|
||||
import com.adc.da.slrs.sarVppsTree.entity.SarVppsTree;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-15
|
||||
*/
|
||||
public interface ISarVppsTreeService extends IService<SarVppsTree> {
|
||||
|
||||
List<SarVppsTree> getAll(SarVppsTree sarVppsTree);
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.adc.da.slrs.sarVppsTree.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarVppsTree.entity.SarVppsTree;
|
||||
import com.adc.da.slrs.sarVppsTree.dao.SarVppsTreeDao;
|
||||
import com.adc.da.slrs.sarVppsTree.service.ISarVppsTreeService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-15
|
||||
*/
|
||||
@Service
|
||||
public class SarVppsTreeServiceImpl extends ServiceImpl<SarVppsTreeDao, SarVppsTree> implements ISarVppsTreeService {
|
||||
|
||||
/**
|
||||
* 查询所有菜单
|
||||
* @param sarVppsTree
|
||||
*/
|
||||
@Override
|
||||
public List<SarVppsTree> getAll(SarVppsTree sarVppsTree) {
|
||||
QueryWrapper<SarVppsTree> tsResourceQueryWrapper=new QueryWrapper<>();
|
||||
tsResourceQueryWrapper.isNull("PID");
|
||||
List<SarVppsTree> list = this.baseMapper.selectList(tsResourceQueryWrapper);
|
||||
for(SarVppsTree tree:list){
|
||||
tree.setChildren(recursionGetChildren((tree)));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归调用获取子节点
|
||||
* @param parent:父节点
|
||||
* @return List<SarMenu>
|
||||
*/
|
||||
private List<SarVppsTree> recursionGetChildren(SarVppsTree parent){
|
||||
QueryWrapper<SarVppsTree> sarMenuQueryWrapper=new QueryWrapper<>();
|
||||
sarMenuQueryWrapper.orderByAsc("SORT");
|
||||
sarMenuQueryWrapper.eq("PID",parent.getId());
|
||||
List<SarVppsTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
|
||||
for(SarVppsTree sarMenu:children){
|
||||
sarMenu.setChildren(recursionGetChildren((sarMenu)));
|
||||
}
|
||||
return children;
|
||||
}
|
||||
}
|
||||
+4
@@ -3,6 +3,7 @@ package com.adc.da.slrs.standardSplit.controller;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandFileEO;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandFileEOPage;
|
||||
import com.adc.da.slrs.standardSplit.service.SarStandAttrDetailsEOService;
|
||||
@@ -118,6 +119,9 @@ public class SarStandFileEOController extends BaseController<SarStandFileEO> {
|
||||
page.setFileSuffixList(suffix.split(","));
|
||||
}
|
||||
List<SarStandFileEO> rows = sarStandFileEOService.getStandFileListByPage(page);
|
||||
for (SarStandFileEO one:rows) {
|
||||
one.setAttId(one.getAttId1());
|
||||
}
|
||||
if (rows != null && !rows.isEmpty()) {
|
||||
for (SarStandFileEO sarStandFileEO : rows) {
|
||||
List<SelectionResult> getField = sarStandAttrDetailsEOService.selectFileFieldForSel(sarStandFileEO.getStandFileClassify());
|
||||
|
||||
@@ -21,6 +21,16 @@ public class SarStandFileEO extends BaseEntity {
|
||||
private String validFlag;
|
||||
private String useModel;
|
||||
private String attId;
|
||||
|
||||
public String getAttId1() {
|
||||
return attId1;
|
||||
}
|
||||
|
||||
public void setAttId1(String attId1) {
|
||||
this.attId1 = attId1;
|
||||
}
|
||||
|
||||
private String attId1;
|
||||
private String resId;
|
||||
private String standId;
|
||||
private String id;
|
||||
|
||||
+5
-2
@@ -37,9 +37,9 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import com.adc.da.person.dao.PersonShareEODao;
|
||||
import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService {
|
||||
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitInfoEOServiceImpl.class);
|
||||
|
||||
@@ -104,6 +104,7 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int fileAplit(SarFileSplitInfoEO sarFileSplitInfoEO){
|
||||
// 拆分文件主表中插入数据
|
||||
sarFileSplitInfoEO.setId(UUIDUtils.randomUUID20());
|
||||
@@ -135,7 +136,8 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
||||
}
|
||||
try {
|
||||
AttFileEO attFileEO = attFileEOService.getFileInfo(sarFileSplitInfoEO.getAttId());
|
||||
String readFilePath = filePath + "/" + attFileEO.getFilePath() + attFileEO.getFileName();
|
||||
//String readFilePath = filePath + "/" + attFileEO.getFilePath() + attFileEO.getFileName();
|
||||
String readFilePath = filePath + attFileEO.getFilePath() + attFileEO.getFileName();
|
||||
|
||||
InputStream is = new FileInputStream(readFilePath); //需要将文件路更改为word文档所在路径。
|
||||
XWPFDocument doc = new XWPFDocument(is);
|
||||
@@ -317,6 +319,7 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
return -1;
|
||||
}
|
||||
if(treeList.size()>0 && messageList.size() > 0){
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.sarModelTree.dao.SarModelTreeDao">
|
||||
|
||||
</mapper>
|
||||
+21
-8
@@ -1,14 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao">
|
||||
<insert id="batchInsert">
|
||||
insert into sar_stand_project_relation(project_id,stand_id) VALUES
|
||||
<foreach collection="list" item="list" separator=",">
|
||||
(#{list.projectId,jdbcType=VARCHAR},#{list.standId,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- <select id="queryProjectManagerPage" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">-->
|
||||
<!-- select s.product_line,t.UNAME as uName-->
|
||||
<!-- from sar_stand_project_library s-->
|
||||
<!-- INNER JOIN ts_user t-->
|
||||
<!-- ON s.project_manager=t.USID-->
|
||||
<!-- GROUP BY s.product_line-->
|
||||
<!-- limit #{current},#{pageSize}-->
|
||||
<!-- </select>-->
|
||||
<!-- <select id="queryProjectManagerPage" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">-->
|
||||
<!-- select s.product_line,t.UNAME as uName-->
|
||||
<!-- from sar_stand_project_library s-->
|
||||
<!-- INNER JOIN ts_user t-->
|
||||
<!-- ON s.project_manager=t.USID-->
|
||||
<!-- GROUP BY s.product_line-->
|
||||
<!-- limit #{current},#{pageSize}-->
|
||||
<!-- </select>-->
|
||||
<delete id="deleteByIds">
|
||||
delete from sar_stand_project_relation where stand_id in (
|
||||
<foreach collection="ids" item="list" separator=",">
|
||||
#{list}
|
||||
</foreach>
|
||||
)
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
+10
@@ -626,6 +626,16 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryStandInfoByList" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM sar_standards_info
|
||||
LEFT JOIN sar_stand_attr_info ssai ON ssai.STAND_ID = SAR_STANDARDS_INFO.ID
|
||||
WHERE DATE_FORMAT(ssai.SSRQ,'%Y-%m-%D') >= DATE_FORMAT(SAR_STANDARDS_INFO.ISSUE_TIME,'%Y-%m-%D')
|
||||
ORDER BY SAR_STANDARDS_INFO.ISSUE_TIME DESC
|
||||
LIMIT #{limit}
|
||||
</select>
|
||||
|
||||
<!-- 查询表中是否存在某字段-->
|
||||
<select id="selectStandColumn" resultType="java.lang.Integer" parameterType="java.lang.String">
|
||||
SELECT COUNT(*)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.sarVppsTree.dao.SarVppsTreeDao">
|
||||
|
||||
</mapper>
|
||||
+3
@@ -263,6 +263,9 @@
|
||||
<if test="standId != null and standId != ''">
|
||||
and SAR_FILE_SPLIT_INFO.stand_id = #{standId}
|
||||
</if>
|
||||
<if test="sarType != null and sarType != ''">
|
||||
and SAR_TYPE = #{sarType}
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
and SAR_FILE_SPLIT_INFO.id = #{id}
|
||||
</if>
|
||||
|
||||
+2
-1
@@ -20,6 +20,7 @@
|
||||
<result column="standNumber" property="standNumber" />
|
||||
<result column="standName" property="standName" />
|
||||
<result column="sarType" property="sarType" />
|
||||
<result column="attId1" property="attId1" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_STAND_FILE table all fields -->
|
||||
@@ -278,7 +279,7 @@
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) ) AS standNumber,
|
||||
SAR_STANDARDS_INFO.stand_name as standName,
|
||||
SAR_STAND_FILE.att_id AS attId,
|
||||
SAR_STAND_FILE.att_id AS attId1,
|
||||
SAR_STANDARDS_INFO.STAND_TYPE as sarType
|
||||
FROM
|
||||
SAR_STAND_FILE
|
||||
|
||||
Reference in New Issue
Block a user