Merge branch 'develop_master' into develop_migration

This commit is contained in:
super_liu
2021-08-19 10:52:59 +08:00
47 changed files with 831 additions and 114 deletions
@@ -13,8 +13,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
@FeignClient(value = "bat-wkflow-zhaokaiyao")
//@FeignClient(value = "shan")
@FeignClient(value = "bat-wkflow")
//@FeignClient(value = "shan6")
public interface workFlowFeignClient {
@RequestMapping(value = "/bat-wkflow/activiti_define_start_user",method = RequestMethod.GET)
@@ -3,8 +3,8 @@
# 数据库配置
#=============================================
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
spring.datasource.url = jdbc:mysql://39.100.23.127:3306/foton_slrs_test2?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false
#spring.datasource.url = jdbc:mysql://10.96.10.171/foton_slrs_test?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false
#spring.datasource.url = jdbc:mysql://39.100.23.127:3306/foton_slrs_test2?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false
spring.datasource.url = jdbc:mysql://10.96.10.171/foton_slrs_test?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false
spring.datasource.username = root
spring.datasource.password = root
@@ -57,13 +57,13 @@ file.path=/usr/laws/file/
#OCR请求识别URL地址
OCR.handleFileUrl = http://61.136.1.103:8091/WebService.asmx/FileConversion
# OCR回调接口地址 配置客户本地的IP及端口号
OCR.callBackUrl = http://39.98.140.126:10001/api/ocr/OCRRestful/OcrHandleResult
OCR.callBackUrl = http://62.234.136.153:8033/api/ocr/OCRRestful/OcrHandleResult
OCR.userId =dayuzhou1234
OCR.authCode =123456
OCR.publicKey =EC4KKA6ZDTCPAOCRBC5M
# OCR文件存储路径
OCR.ocrPath=D:/APPSOFT/LAWSOCRDEMO/OCRFILE/
OCR.ocrPath=/opt/foton-slrs/front/dist/file/
# OCR文件请求下载或在线预览时URL
OCR.ocrDownPath=http://106.2.13.189:8089/downfile/
OCR.ocrDownPath=http://62.234.136.153:8038/file/
OCR.times=20
OCR.convertType=BOTH
@@ -40,6 +40,7 @@ eureka.client.fetch-registry=true
#eureka.client.service-url.defaultZone=http://10.5.116.172:8672/eureka/
eureka.client.service-url.defaultZone=http://62.234.136.153:8761/eureka/
#eureka.client.service-url.defaultZone=http://10.96.10.171:8761/eureka/
# 请求连接的超时时间 默认的时间为 1 秒
ribbon.ConnectTimeout=500000
@@ -110,7 +110,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
.should(QueryBuilders.wildcardQuery("textStatusName.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
.should(QueryBuilders.wildcardQuery("isRelateAccessName.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
.should(QueryBuilders.wildcardQuery("numbershow.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
.should(QueryBuilders.wildcardQuery("content.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
.should(QueryBuilders.matchPhraseQuery("content", "*"+searchInfoEO.getSelectValue()+"*"))
.should(QueryBuilders.wildcardQuery("standSystem.keyword", "*"+searchInfoEO.getSelectValue()+"*"));
break;
case "laws":
@@ -199,6 +199,9 @@ public class SearchCenterServiceImpl implements SearchCenterService {
if(boolQueryShould!=null){
boolQueryBuilder.must(QueryBuilders.matchQuery("validFlag", 0));
if(StringUtils.isNotEmpty(searchInfoEO.getSelectValue())){
if (StringUtils.isNotBlank(searchInfoEO.getStandType())) {
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standType.keyword", "*"+searchInfoEO.getStandType()+"*"));
}
boolQueryBuilder.must(boolQueryShould);
}else {
boolQueryBuilder.must(boolQueryShould);
@@ -97,7 +97,7 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
result = elasticsearchService.updateDataByIdForMap(fullTextSearchEO,"fulltextserch","fulltextserch",id);
}
} else {
result = elasticsearchService.updateDataByIdForMap(fullTextSearchEO,"fulltextserch","fulltextserch",id);
result = elasticsearchService.addDataForMap(fullTextSearchEO,"fulltextserch","fulltextserch",id);
}
}
return result;
@@ -226,9 +226,7 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
StringBuilder itemBuilder = new StringBuilder();
mapItems.forEach((s, s2) -> {
itemBuilder.append(s+" ").append("(模拟数据)-本标准规定了机动车的整车及主要总成、安全防护装置等有关运行安全的基本技术要求,以及消防车、救护车、" +
"工程救险车和警车及残疾人专用汽车的附加要求。本标准适用于在我国道路上行驶的所有机动车,但不适用于有轨电车及并非为在道路上行驶和使用而设计和制造、" +
"主要用于封闭道路和场所作业施工的轮式专用机械车。 注:有轨电车是指以电机驱动,架线供电,有轨道承载的道路车辆。").append("</br>");
itemBuilder.append(s+" ").append(s2).append("</br>");
});
StringBuilder textItemContent = replaceAll(itemBuilder, "null", "--");
fullTextSearchEO.put("textItems",textItemContent.toString());
@@ -222,8 +222,8 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
//产品线
List<Map<String, String>> sycpx = (List<Map<String, String>>)map.get("SYCPXCLASS");
for (LawsDto list1:data){
if (list1.getPutTime()!=null){
list1.setPutTime(list1.getPutTime().substring(0,10));
if (list1.getSSRQ()!=null){
list1.setSSRQ(list1.getSSRQ().substring(0,10));
}
if (list1.getZCCSSRQGJ()!=null){
list1.setZCCSSRQGJ(list1.getZCCSSRQGJ().substring(0,10));
@@ -63,7 +63,7 @@ public class LawsDto {
@ExcelProperty(value = "标准实施日期", index = 8)
@ApiModelProperty(value = "标准实施日期")
@DateTimeFormat("yyyy年MM月dd日")
private String putTime;
private String SSRQ;
@ColumnWidth(16)
@ExcelProperty(value = "新车型实施日期", index = 9)
@@ -115,4 +115,7 @@ public class LawsDto {
@ApiModelProperty(value = "文本状态")
private String textStatus;
@ApiModelProperty(value = "适用车型")
private String applyArctic;
}
@@ -44,8 +44,8 @@ public class SarLawsAttrDetailedList extends BaseEntity {
private String number;
@ApiModelProperty(value = "标准实施日期")
@TableField(value = "putTime")
private String putTime;
@TableField(value = "ssrq")
private String ssrq;
@ApiModelProperty(value = "新车型实施日期")
@TableField(value = "xcxssrq")
@@ -51,12 +51,15 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
}
List<LawsDto> list = sarLawsAttrDetailedListDao.selectLawsById(lawsIds,sarFindDto);
for (LawsDto lawsDto:list){
if (StringUtils.isNoneEmpty(lawsDto.getApplyArctic())){
lawsDto.setApplyArctic(lawsDto.getApplyArctic());
}
QueryWrapper<SarLawsAttrDetailedList> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("stand_id",lawsDto.getId())
.eq("detailed_list_id",sarFindDto.getId());
List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists = sarLawsAttrDetailedListDao.selectList(queryWrapper);
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getPutTime())){
lawsDto.setPutTime(sarLawsAttrDetailedLists.get(0).getPutTime());
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getSsrq())){
lawsDto.setSSRQ(sarLawsAttrDetailedLists.get(0).getSsrq());
}
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getXcxssrq())){
lawsDto.setXCXSSRQGJ(sarLawsAttrDetailedLists.get(0).getXcxssrq());
@@ -199,7 +202,7 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
.standId(timeDto1.getStandId())
.detailedListId(standId)
.number(String.valueOf(a))
.putTime(timeDto1.getPutTime())
.ssrq(timeDto1.getSsrq())
.xcxssrq(timeDto1.getXcxssrqgj())
.zccssrq(timeDto1.getZccssrqgj())
.build();
@@ -94,10 +94,10 @@ public class SarLawsDetailedListController extends BaseController<SarLawsDetaile
public ResponseMessage getAllStand(Integer page,Integer pageSize, String sortKey,
String countryArea, String projectName,
String detailedList,
String detailedListName) {
String detailedListName,String carType) {
if (StringUtils.isNotEmpty(sortKey)) {
IPage<SarLawsDetailedList> publicList1 = sarLawsDetailedListService.AllSelectD(page, pageSize, sortKey,
countryArea, projectName, detailedList, detailedListName);
countryArea, projectName, detailedList, detailedListName,carType);
List<SarLawsDetailedList> list= publicList1.getRecords();//从封装中取出数据
List<FindFileNameDto> list1;//继承类集合实现
list1 = BeanConverUtil.converList(list,FindFileNameDto.class);//将原来类的数据赋给继承类
@@ -40,5 +40,6 @@ public class AddDetailedDto {
private String inforlist2;
@ApiModelProperty(value = "新车型实施时间")
private String inforlist3;
@ApiModelProperty(value = "车辆类别")
private String carType;
}
@@ -81,5 +81,8 @@ public class SarLawsDetailedList extends BaseEntity {
@TableField("file_id")
private String fileIds;
@ApiModelProperty(value = "附件id")
@TableField("car_type")
private String carType;
}
@@ -15,7 +15,7 @@ public class TimeDto {
private String standId;
@ApiModelProperty(value = "实施日期")
private String putTime;
private String ssrq;
@ApiModelProperty(value = "在产车实施日期")
private String zccssrqgj;
@@ -23,7 +23,7 @@ public interface ISarLawsDetailedListService extends IService<SarLawsDetailedLis
String add(AddDetailedDto addDetailedDto);
IPage<SarLawsDetailedList> AllSelectD(Integer pages, Integer size, String sortKey,
String countryArea,String projectName,
String detailedList, String detailedListName);
String detailedList, String detailedListName,String carType);
// IPage<SarLawsDetailedList> selectAllP(Integer pages,Integer size,String sortKey);
String updateList(DetailedUpDto detailedUpDto);
@@ -66,13 +66,13 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
.sortKey(addDetailedDto.getSortKey())
.detailedListName(addDetailedDto.getDetailedListName())
.detailedListState("0")
.detailedListVision("v0")
.applicationScope(addDetailedDto.getApplicationScope())
.updateTime(new Date())
.updatePeople(addDetailedDto.getUpdatePeople())
.remark(addDetailedDto.getRemark())
.updatePeople(getUserName())
.fileIds(addDetailedDto.getFileIds())
.carType(addDetailedDto.getCarType())
.build();
List<TimeDto> timeDto = new ArrayList<>();
switch (addDetailedDto.getSortKey()) {
@@ -98,23 +98,23 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
if (addDetailedDto.getInforlist()!=null){
if (addDetailedDto.getInforlist().contains(",")){
String[] id = addDetailedDto.getInforlist().split(",");
String[] putTime = addDetailedDto.getInforlist1().split(",");
String[] ssrq = addDetailedDto.getInforlist1().split(",");
String[] zcc = addDetailedDto.getInforlist2().split(",");
String[] xcx = addDetailedDto.getInforlist3().split(",");
for (int a =0;a< id.length;a++){
TimeDto dto = new TimeDto();
dto.setStandId(id[a]);
if ("-".equals(putTime[a]) || null==putTime[a] ){
dto.setPutTime(null);
if ("-".equals(ssrq[a]) || null==ssrq[a] ){
dto.setSsrq(null);
}else {
dto.setPutTime(putTime[a]);
dto.setSsrq(ssrq[a]);
}
if ("-".equals(putTime[a]) || null == xcx[a]){
if ("-".equals(ssrq[a]) || null == xcx[a]){
dto.setXcxssrqgj(null);
}else {
dto.setXcxssrqgj(xcx[a]);
}
if ("-".equals(putTime[a]) || null == zcc[a]){
if ("-".equals(ssrq[a]) || null == zcc[a]){
dto.setZccssrqgj(null);
}else {
dto.setZccssrqgj(zcc[a]);
@@ -124,7 +124,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
}else {
TimeDto dto = new TimeDto();
dto.setStandId(addDetailedDto.getInforlist());
dto.setPutTime(addDetailedDto.getInforlist1());
dto.setSsrq(addDetailedDto.getInforlist1());
dto.setXcxssrqgj(addDetailedDto.getInforlist2());
dto.setZccssrqgj(addDetailedDto.getInforlist3());
timeDto.add(dto);
@@ -144,14 +144,15 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
@Override
public IPage<SarLawsDetailedList> AllSelectD(Integer page, Integer pageSize, String sortKey,
String countryArea, String projectName,
String detailedList, String detailedListName) {
String detailedList, String detailedListName,String carType) {
QueryWrapper<SarLawsDetailedList> wrapper = new QueryWrapper<>();
if ("1".equals(sortKey)) {
wrapper.like(StringUtils.isNotEmpty(countryArea), "country_area", countryArea).
like(StringUtils.isNotEmpty(detailedListName), "detailed_list_name", detailedListName);
} else if ("2".equals(sortKey)) {
wrapper.like(StringUtils.isNotEmpty(projectName), "project_name", projectName).
like(StringUtils.isNotEmpty(detailedListName), "detailed_list_name", detailedListName);
like(StringUtils.isNotEmpty(detailedListName), "detailed_list_name", detailedListName).
like(StringUtils.isNotEmpty(carType), "car_type", carType);
} else if ("3".equals(sortKey)) {
wrapper.like(StringUtils.isNotEmpty(detailedList), "detailed_list", detailedList).
@@ -249,23 +250,23 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
List<TimeDto> timeDto = new ArrayList<>();
if ( detailedUpDto.getInforlist().contains(",")) {
String[] id = detailedUpDto.getInforlist().split(",");
String[] putTime = detailedUpDto.getInforlist1().split(",");
String[] ssrq = detailedUpDto.getInforlist1().split(",");
String[] zcc = detailedUpDto.getInforlist2().split(",");
String[] xcx = detailedUpDto.getInforlist3().split(",");
for (int a = 0; a < id.length; a++) {
TimeDto dto = new TimeDto();
dto.setStandId(id[a]);
if (putTime.length<=a) {
dto.setPutTime(null);
if (ssrq.length<=a) {
dto.setSsrq(null);
} else {
dto.setPutTime(putTime[a]);
dto.setSsrq(ssrq[a]);
}
if (putTime.length<=a) {
if (ssrq.length<=a) {
dto.setXcxssrqgj(null);
} else {
dto.setXcxssrqgj(xcx[a]);
}
if (putTime.length<=a) {
if (ssrq.length<=a) {
dto.setZccssrqgj(null);
} else {
dto.setZccssrqgj(zcc[a]);
@@ -275,7 +276,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
} else {
TimeDto dto = new TimeDto();
dto.setStandId(detailedUpDto.getInforlist());
dto.setPutTime(detailedUpDto.getInforlist1());
dto.setSsrq(detailedUpDto.getInforlist1());
dto.setXcxssrqgj(detailedUpDto.getInforlist2());
dto.setZccssrqgj(detailedUpDto.getInforlist3());
timeDto.add(dto);
@@ -53,6 +53,13 @@ public class TsResourceController extends BaseController<TsResource> {
return Result.success(tsResources);
}
@ApiOperation("查询有权限资源")
@GetMapping("/getList")
public ResponseMessage<List<TsResource>> getList(TsResource tsResource){
List<TsResource> tsResources=tsResourceService.getList(tsResource);
return Result.success(tsResources);
}
// @ApiOperation("查询所有资源")
// @GetMapping("/getDefault")
// public ResponseMessage<List<TsResource>> getDefault(){
@@ -97,4 +97,7 @@ public class TsResource extends BaseEntity {
@TableField(exist=false)
private List<String> childMenuIds;
@TableField(exist=false)
private String userId;
}
@@ -34,6 +34,8 @@ public interface ITsResourceService extends IService<TsResource> {
List<TsResource> getAll(TsResource tsResource);
List<TsResource> getList(TsResource tsResource);
List<String> getDefaultByName();
ResponseMessage<Object> addResource(TsResource tsResource);
@@ -7,6 +7,7 @@ import com.adc.da.login.util.UserUtils;
import com.adc.da.slrs.sarResource.dao.TsResourceDao;
import com.adc.da.slrs.sarResource.entity.TsResource;
import com.adc.da.slrs.sarResource.service.ITsResourceService;
import com.adc.da.slrs.sarUser.service.ITsUserService;
import com.adc.da.util.UUIDUtils;
import com.adc.da.utils.treetool.Tree;
import com.adc.da.utils.treetool.TreeNode;
@@ -34,6 +35,9 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
@Autowired
private TsResourceDao dao;
@Autowired
private ITsUserService tsUserService;
public List<TsResource> selectMenuByRole(TsResource sarMenu) {
List<TsResource> list = dao.selectMenuByRole(sarMenu);
if (list == null) {
@@ -155,6 +159,36 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
return TsResources;
}
/**
* 查询有权限菜单
* @param tsResource
*/
@Override
public List<TsResource> getList(TsResource tsResource) {
List<TsResource> TsResources = new ArrayList<>();
if(tsResource.getUserId() != null){
List<String> getMenuIdList = tsUserService.getResourceUserId(tsResource.getUserId());
if(!getMenuIdList.isEmpty()){
QueryWrapper<TsResource> tsResourceQueryWrapper=new QueryWrapper<>();
if(tsResource.getSorDivide()!=null){
tsResourceQueryWrapper.eq("sor_divide",tsResource.getSorDivide());
}
tsResourceQueryWrapper.isNull("PARENT_ID");
tsResourceQueryWrapper.in("ID",getMenuIdList);
tsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
TsResources=dao.selectList(tsResourceQueryWrapper);
for(TsResource TsResource:TsResources){
TsResource.setChildren(recursionGetListChildren((TsResource),(getMenuIdList)));
}
}
}
return TsResources;
}
@Override
public List<String> getDefaultByName() {
List<String> menusNames=new ArrayList<>();
@@ -248,6 +282,22 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
return new ArrayList<>();
}
/**
* 递归调用获取子节点
* @param parent:父节点
* @return List<TsResource>
*/
private List<TsResource> recursionGetListChildren(TsResource parent,List<String> getMenuIdList){
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
TsResourceQueryWrapper.eq("PARENT_ID",parent.getId());
TsResourceQueryWrapper.in("ID",getMenuIdList);
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
for(TsResource TsResource:children){
TsResource.setChildren(recursionGetListChildren((TsResource),(getMenuIdList)));
}
return children;
}
/**
* 递归调用获取子节点
* @param parent:父节点
@@ -8,6 +8,6 @@ public class DetAllStandDto {
Integer size;
String cid;
String userId;
String endTime;
String startTime;
String Account;
}
@@ -40,11 +40,11 @@ public class SarPublicIdeaAllServiceImpl extends ServiceImpl<SarPublicIdeaAllDao
@Override
public IPage<SarPublicIdeaAllSUD> selectAll(DetAllStandDto detAllStandDto) {
if (detAllStandDto.getEndTime() != null) {
if (detAllStandDto.getStartTime() != null) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date Time = null;
try {
Time = sdf.parse(detAllStandDto.getEndTime());
Time = sdf.parse(detAllStandDto.getStartTime());
} catch (ParseException e) {
e.printStackTrace();
}
@@ -110,7 +110,7 @@ public class SarPublicIdeaAllServiceImpl extends ServiceImpl<SarPublicIdeaAllDao
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date Time = null;
try {
Time = sdf.parse(detAllStandDto.getEndTime());
Time = sdf.parse(detAllStandDto.getStartTime());
} catch (ParseException e) {
e.printStackTrace();
}
@@ -33,4 +33,7 @@ public class FindSarItemsPageReqDTO extends BasePage {
@ApiModelProperty(value = "文件类型")
private String fileType;
@ApiModelProperty(value = "解读内容")
private String readContent;
}
@@ -189,6 +189,9 @@ public class SarStandItems extends BaseEntity {
@TableField("compliance_state")
private String complianceState;
@ApiModelProperty(value = "解读内容")
@TableField("read_content")
private String readContent;
}
@@ -0,0 +1,109 @@
package com.adc.da.slrs.sarStandPartCodeApply.controller;
import com.adc.da.base.web.BaseController;
import com.adc.da.http.ResponseMessage;
import com.adc.da.http.Result;
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApply;
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApplyPage;
import com.adc.da.slrs.sarStandPartCodeApply.entity.StandPartCodeExcelVO;
import com.adc.da.slrs.sarStandPartCodeApply.service.ISarStandPartCodeApplyService;
import com.adc.da.slrs.sarStandardsInfo.controller.SarStandardsInfoController;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@RestController
@Api(tags = "零部件编号申请", value = "SarStandPartCodeApplyController", description = "零部件编号申请控制类")
@RequestMapping("/api/sarStandPartCodeApply")//前端和后端对的接口
public class SarStandPartCodeApplyController extends BaseController<SarStandPartCodeApply> {
//创建日志实例
private static final Logger logger = LoggerFactory.getLogger(SarStandardsInfoController.class);
@Autowired
private ISarStandPartCodeApplyService sarStandPartCodeApplyService;
@ApiOperation("零部件编号申请新增")
@PostMapping("/add")
public ResponseMessage<Object> add(@RequestBody List<SarStandPartCodeApply> sarStandPartCodeApply) {
sarStandPartCodeApply.forEach(sarStandPartCodeApply1 -> sarStandPartCodeApply1.setCreateTime(new Date()));
if (sarStandPartCodeApplyService.saveBatch(sarStandPartCodeApply)) {
return Result.success("新增成功");
} else {
return Result.error("新增失败");
}
}
/**
* 分页查询零部件
*
* @param sarStandPartCodeApplyPage: 筛选、分页信息
* @return IPage<SarStandPartCodeApply>
*/
@ApiOperation("分页查询零部件")
@GetMapping
public ResponseMessage<IPage<SarStandPartCodeApply>> getSarStandPartCodeApplyPage(SarStandPartCodeApplyPage sarStandPartCodeApplyPage) {
IPage<SarStandPartCodeApply> sarStandPartCodeApplyIPage = sarStandPartCodeApplyService.getSarStandPartCodeApplyPage(sarStandPartCodeApplyPage);
return Result.success(sarStandPartCodeApplyIPage);
}
/**
* 批量删除零部件
*
* @param idList
* @return
*/
@ApiOperation(value = "批量删除零部件")
@PostMapping("/deleteListAll")
public ResponseMessage deleteListAll(String[] idList) {
if (idList == null || idList.length == 0) {
return Result.success("200", "要删除的数据为空");
} else {
List<String> list = new ArrayList<>(Arrays.asList(idList));
String src = sarStandPartCodeApplyService.del(list);
return Result.success("200", src);
}
}
@ApiOperation("导出Excel表")
@GetMapping(value = "exportPartInfoExcel")
public void exportPartInfoExcel(StandPartCodeExcelVO standPartCodeExcelVO, HttpServletResponse response) throws Exception {
// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
try {
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
if (standPartCodeExcelVO.getExportName() == null) {
standPartCodeExcelVO.setExportName("零部件申请信息");
}
String fileName = URLEncoder.encode(standPartCodeExcelVO.getExportName(), "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
List<SarStandPartCodeApply> data = sarStandPartCodeApplyService.getPartInfoExcelData(standPartCodeExcelVO);
//这里需要设置不关闭流
EasyExcel.write(response.getOutputStream(), SarStandPartCodeApply.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()));
}
}
}
@@ -0,0 +1,15 @@
package com.adc.da.slrs.sarStandPartCodeApply.dao;
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApply;
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApplyPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SarStandPartCodeApplyDao extends BaseMapper<SarStandPartCodeApply> {
IPage<SarStandPartCodeApply> getAllDatasByPage(Page page, @Param("sar")SarStandPartCodeApplyPage sarStandPartCodeApply);
}
@@ -0,0 +1,84 @@
package com.adc.da.slrs.sarStandPartCodeApply.entity;
import com.adc.da.base.entity.BaseEntity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "SarStandPartCodeApply对象",description = "SarStandPartCodeApply基础表里的所有属性")
public class SarStandPartCodeApply extends BaseEntity {
//版本号
private static final long serialVersionUID = 1L;
@ExcelIgnore//这个字段在导出Excel的时候不显示在Excel表头里
@ApiModelProperty(value = "主键")//接口标志
@TableId(type = IdType.UUID)//数据库表里的主键
private String id;
@ExcelProperty("子组号")//Excel里的表头显示的是什么
@ApiModelProperty(value = "子组号")//接口标志
@TableField("SUBGROUP_NUMBER")//数据库表里的字段
private String subgroupNumber;
@ExcelProperty("子组结构号")//Excel里的表头显示的是什么
@ApiModelProperty(value = "子组结构号")//接口标志
@TableField("SUBGROUP_STRUCTURE_NUMBER")//数据库表里的字段
private String subgroupStructureNumber;
@ExcelProperty("子组结构名称")//Excel里的表头显示的是什么
@ApiModelProperty(value = "子组结构名称")//接口标志
@TableField("SUBGROUP_STRUCTURE_NAME")//数据库表里的字段
private String subgroupStructureName;
@ExcelProperty("分组代号")//Excel里的表头显示的是什么
@ApiModelProperty(value = "分组代号")//接口标志
@TableField("GROUP_CODE")//数据库表里的字段
private String groupCode;
@ExcelProperty("零部件分类名称")//Excel里的表头显示的是什么
@ApiModelProperty(value = "零部件分类名称")//接口标志
@TableField("PART_CATEGORY_NAME")//数据库表里的字段
private String partCategoryName;
@ExcelProperty("零部件分类代号")//Excel里的表头显示的是什么
@ApiModelProperty(value = "零部件分类代号")//接口标志
@TableField("PART_CATEGORY_CODE")//数据库表里的字段
private String partCategoryCode;
@ExcelProperty("备注")//Excel里的表头显示的是什么
@ApiModelProperty(value = "备注")//接口标志
@TableField("REMARKS")//数据库表里的字段
private String remarks;
@ExcelIgnore//这个字段在导出Excel的时候不显示在Excel表头里
@ApiModelProperty(value = "创建部门")//接口标志
@TableField("CREATE_DEPT_ID")//数据库表里的字段
private String createDeptId;
@ExcelIgnore//这个字段在导出Excel的时候不显示在Excel表头里
@ApiModelProperty(value = "创建人")//接口标志
@TableField("CREATE_BY_ID")//数据库表里的字段
private String createById;
@ExcelIgnore//这个字段在导出Excel的时候不显示在Excel表头里
@ApiModelProperty(value = "创建时间")//接口标志
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//时间格式化
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//时间格式化
@TableField("CREATE_TIME")//数据库表里的字段
private Date createTime;
}
@@ -0,0 +1,51 @@
package com.adc.da.slrs.sarStandPartCodeApply.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.sql.Timestamp;
@Data
@ApiModel(value = "SarStandPartCodeApply分页",description = "SarStandPartCodeApply对象分页信息")
public class SarStandPartCodeApplyPage {
@ApiModelProperty(value = "主键")
private String id;
@ApiModelProperty(value = "子组号")
private String subgroupNumber;
@ApiModelProperty(value = "子组结构号")
private String subgroupStructureNumber;
@ApiModelProperty(value = "子组结构名称")
private String subgroupStructureName;
@ApiModelProperty(value = "分组代号")
private String groupCode;
@ApiModelProperty(value = "零部件分类名称")
private String partCategoryName;
@ApiModelProperty(value = "零部件分类代号")
private String partCategoryCode;
@ApiModelProperty(value = "备注")
private String remarks;
@ApiModelProperty(value = "创建部门")
private String createDeptId;
@ApiModelProperty(value = "创建人")
private String createById;
@ApiModelProperty(value = "创建时间")
private Timestamp createTime;
@ApiModelProperty("当前页")
private Integer current;
@ApiModelProperty("每页条数")
private Integer size;
}
@@ -0,0 +1,16 @@
package com.adc.da.slrs.sarStandPartCodeApply.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(description = "零部件申请ExcelVO类")
public class StandPartCodeExcelVO {
@ApiModelProperty("文件名")
String exportName;
@ApiModelProperty("导出的零部件ID列表")
List<String> ids;
}
@@ -0,0 +1,33 @@
package com.adc.da.slrs.sarStandPartCodeApply.service;
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApply;
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApplyPage;
import com.adc.da.slrs.sarStandPartCodeApply.entity.StandPartCodeExcelVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
public interface ISarStandPartCodeApplyService extends IService<SarStandPartCodeApply> {
/**
* 分页查询零部件
* @param sarStandPartCodeApplyPage: 筛选、分页信息
* @return: IPage<SarStandPartCodeApply>
*/
IPage<SarStandPartCodeApply> getSarStandPartCodeApplyPage(SarStandPartCodeApplyPage sarStandPartCodeApplyPage);
/**
* 批量删除零件申请信息
* @param idList
* @return
*/
String del(List<String> idList);
/**
* 获取导出Excel的数据
* @param standPartCodeExcelVO: ids
* @return List<SarStandPartCodeApply>
*/
List<SarStandPartCodeApply> getPartInfoExcelData(StandPartCodeExcelVO standPartCodeExcelVO);
}
@@ -0,0 +1,91 @@
package com.adc.da.slrs.sarStandPartCodeApply.service.impl;
import com.adc.da.slrs.sarStandPartCodeApply.dao.SarStandPartCodeApplyDao;
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApply;
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApplyPage;
import com.adc.da.slrs.sarStandPartCodeApply.entity.StandPartCodeExcelVO;
import com.adc.da.slrs.sarStandPartCodeApply.service.ISarStandPartCodeApplyService;
import com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified;
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.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class SarStandPartCodeApplyServiceImpl extends ServiceImpl<SarStandPartCodeApplyDao, SarStandPartCodeApply> implements ISarStandPartCodeApplyService {
@Autowired
private SarStandPartCodeApplyDao sarStandPartCodeApplyDao;
@Resource
private SarStandardsInfoDao sarStandardsInfoDao;
/**
* 分页查询零部件信息
* @param sarStandPartCodeApplyPage: 筛选、分页信息
* @return :IPage<SarStandPartCodeApply>
*/
@Override
public IPage<SarStandPartCodeApply> getSarStandPartCodeApplyPage(SarStandPartCodeApplyPage sarStandPartCodeApplyPage){
QueryWrapper<SarStandPartCodeApply> sarStandPartCodeApplyQueryWrapper = new QueryWrapper<>();
//根据子组号查询
if (sarStandPartCodeApplyPage.getSubgroupNumber() != null){
sarStandPartCodeApplyQueryWrapper.like("SUBGROUP_NUMBER",sarStandPartCodeApplyPage.getSubgroupNumber());
}
//根据分组代号查询
if (sarStandPartCodeApplyPage.getGroupCode() != null){
sarStandPartCodeApplyQueryWrapper.like("GROUP_CODE",sarStandPartCodeApplyPage.getGroupCode());
}
//根据零件分类代号查询
if (sarStandPartCodeApplyPage.getPartCategoryCode() != null){
sarStandPartCodeApplyQueryWrapper.like("PART_CATEGORY_CODE",sarStandPartCodeApplyPage.getPartCategoryCode());
}
Page<SarStandPartCodeApply> standPartCodeApplyPage=new Page<>();
//判断前端是否提供页码和每页条数
if (sarStandPartCodeApplyPage.getCurrent()!=null && sarStandPartCodeApplyPage.getSize()!=null){
standPartCodeApplyPage = new Page<>(sarStandPartCodeApplyPage.getCurrent(),sarStandPartCodeApplyPage.getSize());
}
return sarStandPartCodeApplyDao.selectPage(standPartCodeApplyPage,sarStandPartCodeApplyQueryWrapper);
}
/**
* 批量删除零部件信息
* @param idList: 批量删除的id数组
* @return
*/
@Override
public String del(List<String> idList){
QueryWrapper<SarStandPartCodeApply> wrapper = new QueryWrapper<>();
for (String id: idList) {
wrapper.eq("ID",id);
sarStandPartCodeApplyDao.delete(wrapper);
}
sarStandPartCodeApplyDao.deleteBatchIds(idList);
return "删除成功";
}
/**
* 获取导出excel的数据
* @param standPartCodeExcelVO: ids
* @return List<SarStandPartCodeApply>
*/
@Override
public List<SarStandPartCodeApply> getPartInfoExcelData(StandPartCodeExcelVO standPartCodeExcelVO){
QueryWrapper<SarStandPartCodeApply> sarStandPartCodeApplyQueryWrapper = new QueryWrapper<>();
if (standPartCodeExcelVO.getIds()!=null && standPartCodeExcelVO.getIds().size()>0){
sarStandPartCodeApplyQueryWrapper.in("id",standPartCodeExcelVO.getIds());
}
List<SarStandPartCodeApply> stand = sarStandPartCodeApplyDao.selectList(sarStandPartCodeApplyQueryWrapper);
List<SarStandPartCodeApply> a = stand;
return a;
}
}
@@ -49,6 +49,15 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
map.put("notMaintenance",notMaintenanceList);
return Result.success("200",map);
}
@GetMapping("/queryProjectWorkFlow")
@ApiOperation("车型/项目库-!!!")
public ResponseMessage queryMaintenanceProjectWorkFlow(@RequestParam(defaultValue = "1", value = "Page")int Page, @RequestParam(defaultValue = "10", value = "PageSize") int PageSize,SarStandProjectLibraryDto sarDto) {
IPage<SarStandProjectLibrary> MaintenanceList = sarStandProjectLibraryService.queryMaintenanceProjectWorkFlow(Page,PageSize,sarDto);
Map<String, Object> map = new HashMap<String, Object>();
map.put("Maintenance",MaintenanceList);
return Result.success("200",map);
}
/**
*
* @param id
@@ -22,4 +22,7 @@ public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLib
void batchInsert(@Param("list") List<StandProjectRelationDto> list);
List<SarStandProjectLibrary> selectPages(@Param("page")Integer page, @Param("size")Integer size,@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
Integer selectCount(@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
List<SarStandProjectLibrary> selectPagesWorkFlow(@Param("page")Integer page, @Param("size")Integer size,@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
Integer selectCountWorkFlow(@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
List<String> getAllStands();
}
@@ -8,6 +8,7 @@ import java.util.List;
public interface SarStandProjectLibraryService {
IPage<SarStandProjectLibrary> queryMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto);
IPage<SarStandProjectLibrary> queryMaintenanceProjectWorkFlow(int current, int pageSize, SarStandProjectLibraryDto sarDto);
IPage<SarStandProjectLibrary> queryNotMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto);
List<SarStandProjectLibrary> queryById(String id);
IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize);
@@ -68,6 +68,35 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
return getSarStandProjectLibraryIPage(current, pageSize, sar,flag);
}
@Override
public IPage<SarStandProjectLibrary> queryMaintenanceProjectWorkFlow(int current, int pageSize,
SarStandProjectLibraryDto sarDto) {
SarStandProjectLibrary sar = new SarStandProjectLibrary();
sar.setProjectPlatfor(sarDto.getProjectPlatfor());
sar.setProjectNumber(sarDto.getProjectNumber());
sar.setProjectName(sarDto.getProjectName());
sar.setProjectClassification(sarDto.getProjectClassification());
sar.setProjectStatus(sarDto.getProjectStatus());
sar.setProjectGroup(sarDto.getProjectGroup());
sar.setCurrentNode(sarDto.getCurrentNode());
sar.setProjectLevel(sarDto.getProjectLevel());
sar.setProjectManager(sarDto.getProjectManager());
sar.setProductLine(sarDto.getProductLine());
SimpleDateFormat formater = new SimpleDateFormat();
formater.applyPattern("yyyy-MM-dd");
try {
if (sarDto.getProjectStartDate()!=null){
sar.setProjectStartDate(formater.parse(sarDto.getProjectStartDate()));
}
if (sarDto.getProjectEndDate()!=null){
sar.setProjectEndDate(formater.parse(sarDto.getProjectEndDate()));
}
} catch (ParseException e) {
e.printStackTrace();
}
int flag=3;
return getSarStandProjectLibraryIPage(current, pageSize, sar,flag);
}
@Override
public IPage<SarStandProjectLibrary> queryNotMaintenanceProject(int current, int pageSize,
SarStandProjectLibraryDto sarDto) {
SarStandProjectLibrary sar = new SarStandProjectLibrary();
@@ -106,8 +135,8 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
@Override
public IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize) {
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
wrapper.select("distinct product_line","project_manager as projectManager","uName");
wrapper.last("inner join ts_user t on sar_stand_project_library.project_manager=t.usid");
wrapper.select("distinct product_line","sar_stand_project_library.project_manager as projectManager","s.uName");
wrapper.last("inner join ts_user s on s.USID = sar_stand_project_library.project_manager");
Page<SarStandProjectLibrary> page = new Page<>(current, pageSize);
IPage<SarStandProjectLibrary> userIPage = sarStandProjectLibraryDao.selectPage(page, wrapper);
System.out.println("总条数"+userIPage.getTotal());
@@ -131,16 +160,31 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
}
@Override
public IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId) {
List<String> ids=sarStandProjectLibraryDao.getAllStands();
String id="";
for (String s:ids) {
id="'"+s+"',"+id;
}
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME","STAND_TYPE");
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='"+ standId+"'");
if (ids.isEmpty()) {
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'");
}else {
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'" +
"and r.STAND_ID in (" + id.substring(0, id.length() - 1) + ")");
}
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","XCXSSRQ","ZCCSSRQ","ZRBM","KCCVPPSBM","KCCVPPSCN","CYCVPPSBM","CYCVPPSCN");
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.project_id ='"+ standId+"'");
if (ids.isEmpty()){
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.project_id ='"+ standId+"'");
}else {
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.project_id ='" + standId + "' " +
"and r.STAND_ID in (" + id.substring(0,id.length()-1) + ")");
}
Page<SarStandAttrInfo> page2 = new Page<>(current, pageSize);
IPage<SarStandAttrInfo> userIPage2 = sarStandAttrInfoDao.selectPage(page2, wrapper2);
System.out.println("总条数"+userIPage2.getTotal());
@@ -260,12 +304,23 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
private IPage<SarStandProjectLibrary> getSarStandProjectLibraryIPage(int current, int pageSize,SarStandProjectLibrary wrapper,int flag) {
Page<SarStandProjectLibrary> page = new Page<>(current, pageSize);
IPage<SarStandProjectLibrary> userIPage = new Page<>();
List<SarStandProjectLibrary> sarStandProjectLibraries=sarStandProjectLibraryDao.selectPages(current,pageSize,wrapper,flag);
Integer count = sarStandProjectLibraryDao.selectCount(wrapper,flag);
userIPage.setCurrent(current);
userIPage.setSize(pageSize);
userIPage.setRecords(sarStandProjectLibraries);
userIPage.setTotal(count);
return userIPage;
if (3!=flag) {
List<SarStandProjectLibrary> sarStandProjectLibraries = sarStandProjectLibraryDao.selectPages(current, pageSize, wrapper, flag);
Integer count = sarStandProjectLibraryDao.selectCount(wrapper, flag);
userIPage.setCurrent(current);
userIPage.setSize(pageSize);
userIPage.setRecords(sarStandProjectLibraries);
userIPage.setTotal(count);
return userIPage;
}else {
flag=2;
List<SarStandProjectLibrary> sarStandProjectLibraries = sarStandProjectLibraryDao.selectPagesWorkFlow(current, pageSize, wrapper, flag);
Integer count = sarStandProjectLibraryDao.selectCountWorkFlow(wrapper, flag);
userIPage.setCurrent(current);
userIPage.setSize(pageSize);
userIPage.setRecords(sarStandProjectLibraries);
userIPage.setTotal(count);
return userIPage;
}
}
}
@@ -72,12 +72,15 @@ public class SarStandUnqualifiedServiceImpl extends ServiceImpl<SarStandUnqualif
}
//仅查询未关闭的
sarStandUnqualifiedQueryWrapper.eq("close_state",1);
//根据 项目名称 进行查询
if(sarStandUnqualifiedPage.getProductName()!=null){
sarStandUnqualifiedQueryWrapper.like("product_name",sarStandUnqualifiedPage.getProductName());
}
//根据 责任部门 进行查询
if(sarStandUnqualifiedPage.getResponsibleUnit()!=null){
sarStandUnqualifiedQueryWrapper.eq("responsible_unit",sarStandUnqualifiedPage.getResponsibleUnit());
}
//根据 标准号/标准名称 进行查询
if(sarStandUnqualifiedPage.getStandSerialNumber()!=null){
// sarStandUnqualifiedQueryWrapper.like("stand_serial_number",sarStandUnqualifiedPage.getStandSerialNumber()).or().like("stand_name",sarStandUnqualifiedPage.getStandName());
sarStandUnqualifiedQueryWrapper.last(" and (stand_serial_number LIKE '%"+sarStandUnqualifiedPage.getStandSerialNumber()+"%'\n" +
@@ -59,58 +59,66 @@ public class SarStandardComplianceAssessResultController {
if (eo.getStandApplicationType() == 1) {
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME");
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME,type");
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
queryWrapper.like("STAND_NAME",eo.getStandName().trim());
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
}
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
queryWrapper.like("STAND_NUMBER",eo.getStandNumber().trim());
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
}
if (eo.getType() != null && !eo.getType().trim().equals("")) {
queryWrapper.like("type", eo.getType().trim());
}
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
while(page.getRecords().remove(null));
while (page.getRecords().remove(null)) ;
return Result.success(page);
}else {
if(eo.getPosition()==1){
} else {
if (eo.getPosition() == 1) {
QueryWrapper<SarInterpretationNationalStandard> queryWrapper = new QueryWrapper<>();
IPage<SarInterpretationNationalStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME");
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
queryWrapper.like("STAND_NAME",eo.getStandName().trim());
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
}
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
queryWrapper.like("STAND_NUMBER",eo.getStandNumber().trim());
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
}
// if (eo.getType() != null && !eo.getType().trim().equals("")) {
// queryWrapper.like("type",eo.getType().trim());
// }
IPage<SarInterpretationNationalStandard> page = iSarInterpretationNationalStandardService.page(iPage, queryWrapper);
while(page.getRecords().remove(null));
while (page.getRecords().remove(null)) ;
return Result.success(page);
}else{
} else {
QueryWrapper<SarInterpretationForeignStandard> queryWrapper = new QueryWrapper<>();
IPage<SarInterpretationForeignStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME");
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
queryWrapper.like("STAND_NAME",eo.getStandName().trim());
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
}
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
queryWrapper.like("STAND_NUMBER",eo.getStandNumber().trim());
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
}
// if (eo.getType() != null && !eo.getType().trim().equals("")) {
// queryWrapper.like("type",eo.getType().trim());
// }
IPage<SarInterpretationForeignStandard> page = iSarInterpretationForeignStandardService.page(iPage, queryWrapper);
while(page.getRecords().remove(null));
while (page.getRecords().remove(null)) ;
return Result.success(page);
}
}
}
private static class InsertEntity<T>{
private static class InsertEntity<T> {
List<Map> entityList;
T eo;
}
@ApiOperation(value="(插入/更新)标准清单")
@ApiOperation(value = "(插入/更新)标准清单")
@PostMapping("/standard")
public ResponseMessage insertStandard(@RequestBody InsertEntity<SarStandardsInfoEO> insertEntity) throws InvocationTargetException, IllegalAccessException {
@@ -120,27 +128,27 @@ public class SarStandardComplianceAssessResultController {
List<SarStandardComplianceProductAssess> entityList = new ArrayList<>();
for (int i = 0; i < insertEntity.entityList.size(); i++) {
SarStandardComplianceProductAssess obj=new SarStandardComplianceProductAssess();
SarStandardComplianceProductAssess obj = new SarStandardComplianceProductAssess();
BeanUtils.populate(obj, insertEntity.entityList.get(i));
entityList.add(obj);
}
iSarStandardComplianceProductAssessService.saveOrUpdateBatch(entityList);
}else {
if(eo.getPosition()==1){
} else {
if (eo.getPosition() == 1) {
List<SarInterpretationNationalStandard> entityList = new ArrayList<>();
for (int i = 0; i < insertEntity.entityList.size(); i++) {
SarInterpretationNationalStandard obj=new SarInterpretationNationalStandard();
SarInterpretationNationalStandard obj = new SarInterpretationNationalStandard();
BeanUtils.populate(obj, insertEntity.entityList.get(i));
entityList.add(obj);
}
iSarInterpretationNationalStandardService.saveOrUpdateBatch(entityList);
}else{
} else {
List<SarInterpretationForeignStandard> entityList = new ArrayList<>();
for (int i = 0; i < insertEntity.entityList.size(); i++) {
SarInterpretationForeignStandard obj=new SarInterpretationForeignStandard();
SarInterpretationForeignStandard obj = new SarInterpretationForeignStandard();
BeanUtils.populate(obj, insertEntity.entityList.get(i));
entityList.add(obj);
}
@@ -158,14 +166,11 @@ public class SarStandardComplianceAssessResultController {
public ResponseMessage<IPage<SarStandardComplianceProductAssess>> selectProduct(SarStandardComplianceProductAssessEO eo) throws Exception {
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
if (eo.getType() != null) queryWrapper.eq("type", eo.getType());
if (eo.getProductName() != null) queryWrapper.like("product_name", eo.getProductName());
if (eo.getStandId() != null) queryWrapper.like("STAND_ID", eo.getStandId());
if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
// while(page.getRecords().remove(null));
return Result.success(page);
}
@@ -187,22 +192,22 @@ public class SarStandardComplianceAssessResultController {
@ApiOperation(value = "条件查询技术审核符合性清单")
@GetMapping("/interpretation")
public ResponseMessage<Object> selectNationalStandard(InterpretationEO eo) throws Exception {
if (eo.getPosition()==1) {
if (eo.getPosition() == 1) {
IPage<SarInterpretationNationalStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
QueryWrapper<SarInterpretationNationalStandard> queryWrapper = new QueryWrapper<>();
if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
if(eo.getStandId()!=null)queryWrapper.eq("STAND_ID",eo.getStandId());
if (eo.getStandId() != null) queryWrapper.eq("STAND_ID", eo.getStandId());
IPage<SarInterpretationNationalStandard> page = iSarInterpretationNationalStandardService.page(iPage, queryWrapper);
while(page.getRecords().remove(null));
while (page.getRecords().remove(null)) ;
return Result.success(page);
} else {
IPage<SarInterpretationForeignStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
QueryWrapper<SarInterpretationForeignStandard> queryWrapper = new QueryWrapper<>();
if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
if(eo.getStandId()!=null)queryWrapper.eq("STAND_ID",eo.getStandId());
if (eo.getStandId() != null) queryWrapper.eq("STAND_ID", eo.getStandId());
IPage<SarInterpretationForeignStandard> page = iSarInterpretationForeignStandardService.page(iPage, queryWrapper);
while(page.getRecords().remove(null));
while (page.getRecords().remove(null)) ;
return Result.success(page);
}
@@ -215,11 +220,11 @@ public class SarStandardComplianceAssessResultController {
InterpretationEO eo = insertEntity.eo;
if (eo.getPosition()==1) {
if (eo.getPosition() == 1) {
List<SarInterpretationNationalStandard> entityList = new ArrayList<>();
for (int i = 0; i < insertEntity.entityList.size(); i++) {
SarInterpretationNationalStandard obj=new SarInterpretationNationalStandard();
SarInterpretationNationalStandard obj = new SarInterpretationNationalStandard();
BeanUtils.populate(obj, insertEntity.entityList.get(i));
entityList.add(obj);
}
@@ -227,10 +232,9 @@ public class SarStandardComplianceAssessResultController {
} else {
List<SarInterpretationForeignStandard> entityList = new ArrayList<>();
for (int i = 0; i < insertEntity.entityList.size(); i++) {
SarInterpretationForeignStandard obj=new SarInterpretationForeignStandard();
SarInterpretationForeignStandard obj = new SarInterpretationForeignStandard();
BeanUtils.populate(obj, insertEntity.entityList.get(i));
entityList.add(obj);
}
@@ -109,6 +109,10 @@ public class SarStandardComplianceProductAssess extends BaseEntity {
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date interpretationTime;
@ApiModelProperty(value = "条款名称")
@TableField("clause_name")
private String clauseName;
private String id;
@@ -18,6 +18,10 @@ public class SarStandardComplianceProductAssessEO{
@TableField("STAND_ID")
private String standId;
@ApiModelProperty(value = "流程UUID")
@TableField("type")
private String type;
@ApiModelProperty(value = "'项目名称'")
private String productName;
@@ -25,6 +25,9 @@ public class SarStandardsInfoEO {
@ApiModelProperty(value = "国内1,国外2")
private Integer position=1;
@ApiModelProperty(value = "流程UUID")
@TableField("type")
private String type;
@ApiModelProperty("页数")
private Integer current=1;
@@ -49,7 +49,7 @@ import java.util.*;
/**
* <p>
* 前端控制器
* 前端控制器 There is no way the
* </p>
*
* @author super_liu
@@ -13,5 +13,6 @@ public class StandardsInfoExcelVO {
String standSort;
String standNumber;
String collectMenuId;
String userId;
}
@@ -267,13 +267,13 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
*/
public List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception {
//查询当前登录人角色拥有权限的菜单
if(page.getMenuId() != null ){
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
QueryWrapper<TsResource> qw = new QueryWrapper<>();
qw.eq("ID",page.getMenuId());
qw.isNull("PARENT_ID");
List<TsResource> children = iTsResourceService.list(qw);
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
List<String> getMenuIdList = tsUserService.getResourceId(new TsResource());
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList);
} else {
@@ -609,7 +609,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
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(SarStandItems::getItemsNum, SarStandItems::getItemsName));
.collect(Collectors.toMap(SarStandItems::getItemsNum, SarStandItems::getTermsConditions));
sarStandardsInfoEO.setMapItems(collectMap);
}
createStandMQService.sendStandMQ(sarStandardsInfoEO,"add");
@@ -1195,7 +1195,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
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(SarStandItems::getItemsNum, SarStandItems::getItemsName));
.collect(Collectors.toMap(SarStandItems::getItemsNum, SarStandItems::getTermsConditions));
sarStandardsInfoEO.setMapItems(collectMap);
}
createStandMQService.sendStandMQ(sarStandardsInfoEO,"update");
@@ -1362,8 +1362,11 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
page = (SarStandardsInfoEOPage) JSONObject.toBean(jsonObject, SarStandardsInfoEOPage.class);
page.setStandType(standardsInfoExcelVO.getStandType());
//查询当前登录人角色拥有权限的菜单
List<String> getMenuIdList=tsUserService.getResourceId(new TsResource());
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
List<String> getMenuIdList = new ArrayList<>();
if(standardsInfoExcelVO.getUserId() != null){
getMenuIdList= tsUserService.getResourceUserId(standardsInfoExcelVO.getUserId());
}
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList);
} else {
@@ -65,6 +65,8 @@ public interface ITsUserService extends IService<TsUser> {
List<String> getResourceId(TsResource tsResource);
List<String> getResourceUserId(String userId);
/**
* 导入人员数据
*/
@@ -195,6 +195,18 @@ public class TsUserServiceImpl extends ServiceImpl<TsUserDao, TsUser> implements
}
/**
* 查询当前登录的用户资源
* @return List<SarMenu>
*/
@Override
public List<String> getResourceUserId(String userId) {
List<String> positionIds=tsUserDao.selectPositionIds(userId);
List<String> roleIds=tsPositionService.getRoleIdsByPositionIds(positionIds);
return tsRoleService.getResourceIdsByRoleIds(roleIds);
}
/**
* 导入人员数据
*/
@@ -210,6 +210,7 @@ public class SarFileSplitInfoEOController extends BaseController<SarFileSplitInf
if(null!=sarFileSplitInfoEO){
sarFileSplitInfoEO.setModifyTime(new Date());
if (null==sarFileSplitInfoEO.getSplitStatus())
sarFileSplitInfoEO.setSplitStatus("0");
sarFileSplitInfoEOService.updateByPrimaryKeySelective(sarFileSplitInfoEO);
return Result.success("0","编辑成功",null);
@@ -3,7 +3,7 @@
<mapper namespace="com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao">
<select id="selectLawsById" parameterType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarFindDto" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,dicstandSort.DIC_TYPE_NAME as standSortShow,
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
FROM sar_standards_info a
@@ -47,7 +47,7 @@
</select>
<select id="selectLawsByIdE" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
SELECT a.ID, CONCAT(dicstandSort.DIC_TYPE_NAME," ", a.STAND_NUMBER, "-", a.STAND_YEAR) AS standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
SELECT a.ID, CONCAT(dicstandSort.DIC_TYPE_NAME," ", a.STAND_NUMBER, "-", a.STAND_YEAR) AS standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,dicstandSort.DIC_TYPE_NAME as standSortShow,
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
@@ -65,10 +65,24 @@
<select id="selectLawsId" resultType="string">
select stand_id from sar_laws_attr_detailed_list
LEFT JOIN sar_standards_info si ON sar_laws_attr_detailed_list.stand_id = si.ID
<where>
<if test="standId != null">
and detailed_list_id = #{standId,jdbcType=VARCHAR}
and detailed_list_id = #{standId}
</if>
<if test="sar.standSort != null">
and si.STAND_SORT = #{sar.standSort}
</if>
<if test="sar.standType != null">
and si.STAND_TYPE = #{sar.standType}
</if>
<if test="sar.standNumber != null">
and concat(concat(concat(concat(si.STAND_SORT,' '),si.STAND_NUMBER),'-'),si.STAND_YEAR) like concat(concat('%', #{sar.standNumber}),'%')
</if>
<if test="sar.standName != null">
and si.STAND_NAME like concat(concat('%', #{sar.standName}),'%')
</if>
</where>
order by number
LIMIT #{param3} , #{param2};
@@ -84,7 +98,7 @@
order by number
</select>
<select id="selectLawsByIdC" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
@@ -112,7 +126,7 @@
</select>
<select id="selectLawsByIdCount" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
@@ -141,7 +155,7 @@
<select id="selectTimes" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandRegionalTimeDto">
SELECT
b.country_area AS country,
a.putTime AS putTime,
a.ssrq AS ssrq,
a.xcxssrq AS xcxssrq,
a.zccssrq AS zccssrq
FROM
@@ -150,12 +164,12 @@
WHERE
b.sort_key = 1
AND a.stand_id = #{standId}
AND (a.putTime is not NULL
AND (a.ssrq is not NULL
AND a.xcxssrq is not NULL
AND a.zccssrq is not NULL)
</select>
<select id="selectLawsByIdList" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.TEXT_STATUS as textStatus,
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
@@ -200,9 +214,9 @@
</select>
<insert id="insertList">
INSERT INTO sar_laws_attr_detailed_list ( id, number, detailed_list_id, stand_id ,putTime,xcxssrq,zccssrq) VALUES
INSERT INTO sar_laws_attr_detailed_list ( id, number, detailed_list_id, stand_id ,ssrq,xcxssrq,zccssrq) VALUES
<foreach collection ="sarLawsAttrDetailedLists" item="list" separator =",">
(#{list.id,jdbcType=VARCHAR}, #{list.number}, #{list.detailedListId,jdbcType=VARCHAR}, #{list.standId,jdbcType=VARCHAR},#{list.putTime,jdbcType=VARCHAR},#{list.xcxssrq,jdbcType=VARCHAR},#{list.zccssrq,jdbcType=VARCHAR})
(#{list.id,jdbcType=VARCHAR}, #{list.number}, #{list.detailedListId,jdbcType=VARCHAR}, #{list.standId,jdbcType=VARCHAR},#{list.ssrq,jdbcType=VARCHAR},#{list.xcxssrq,jdbcType=VARCHAR},#{list.zccssrq,jdbcType=VARCHAR})
</foreach >
</insert>
@@ -27,7 +27,7 @@
</delete>
<select id="selectCount" resultType="java.lang.Integer" >
<select id="selectCount" resultType="java.lang.Integer">
SELECT
count(sar_stand_project_library.id ) as total
FROM
@@ -35,7 +35,12 @@
LEFT JOIN ts_user tu ON project_manager = tu.USID
WHERE
(
id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
<if test="flag == 1">
id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
</if>
<if test="flag == 2">
id IN ( SELECT project_id FROM sar_stand_project_relation )
</if>
<if test="qu != null">
<if test="qu.projectNumber != null">
AND project_number LIKE concat(concat('%',#{qu.projectNumber}),'%')
@@ -77,7 +82,7 @@
)
</select>
<select id="selectPages" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary" >
<select id="selectPages" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">
SELECT
sar_stand_project_library.*,
tu.UNAME as uName
@@ -87,10 +92,10 @@
WHERE
(
<if test="flag == 1">
id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
</if>
<if test="flag == 2">
id IN ( SELECT project_id FROM sar_stand_project_relation )
id IN ( SELECT project_id FROM sar_stand_project_relation )
</if>
<if test="qu != null">
<if test="qu.projectNumber != null">
@@ -133,4 +138,117 @@
)
limit ${(page-1)*size},${page*size}
</select>
<select id="selectPagesWorkFlow"
resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">
SELECT
sar_stand_project_library.*,
tu.UNAME as uName
FROM
sar_stand_project_library
LEFT JOIN ts_user tu ON project_manager = tu.USID
WHERE
(
id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id NOT in ( SELECT DISTINCT
STAND_ID FROM
sar_stand_items
)
)
<if test="qu != null">
<if test="qu.projectNumber != null">
AND project_number LIKE concat(concat('%',#{qu.projectNumber}),'%')
</if>
<if test="qu.projectName != null">
AND project_name LIKE concat(concat('%',#{qu.projectName}),'%')
</if>
<if test="qu.projectClassification != null">
AND project_classification LIKE concat(concat('%',#{qu.projectClassification}),'%')
</if>
<if test="qu.projectPlatfor != null">
AND project_platfor LIKE concat(concat('%',#{qu.projectPlatfor}),'%')
</if>
<if test="qu.projectGroup != null">
AND project_group LIKE concat(concat('%',#{qu.projectGroup}),'%')
</if>
<if test="qu.projectStatus != null">
AND project_status LIKE concat(concat('%',#{qu.projectStatus}),'%')
</if>
<if test="qu.currentNode != null">
AND current_node LIKE concat(concat('%',#{qu.currentNode}),'%')
</if>
<if test="qu.projectLevel != null">
AND project_level LIKE concat(concat('%',#{qu.projectLevel}),'%')
</if>
<if test="qu.projectManager != null">
AND project_manager LIKE concat(concat('%',#{qu.projectManager}),'%')
</if>
<if test="qu.productLine != null">
AND product_line LIKE concat(concat('%',#{qu.productLine}),'%')
</if>
<if test="qu.projectStartDate != null">
AND project_start_date &gt;= #{qu.projectStartDate}
</if>
<if test="qu.projectEndDate != null">
AND project_end_date &lt;= #{qu.projectEndDate}
</if>
</if>
)
limit ${(page-1)*size},${page*size}
</select>
<select id="selectCountWorkFlow" resultType="java.lang.Integer">
SELECT
count(sar_stand_project_library.id ) as total
FROM
sar_stand_project_library
LEFT JOIN ts_user tu ON project_manager = tu.USID
WHERE
(
id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id NOT in ( SELECT DISTINCT
STAND_ID FROM
sar_stand_items
))
<if test="qu != null">
<if test="qu.projectNumber != null">
AND project_number LIKE concat(concat('%',#{qu.projectNumber}),'%')
</if>
<if test="qu.projectName != null">
AND project_name LIKE concat(concat('%',#{qu.projectName}),'%')
</if>
<if test="qu.projectClassification != null">
AND project_classification LIKE concat(concat('%',#{qu.projectClassification}),'%')
</if>
<if test="qu.projectPlatfor != null">
AND project_platfor LIKE concat(concat('%',#{qu.projectPlatfor}),'%')
</if>
<if test="qu.projectGroup != null">
AND project_group LIKE concat(concat('%',#{qu.projectGroup}),'%')
</if>
<if test="qu.projectStatus != null">
AND project_status LIKE concat(concat('%',#{qu.projectStatus}),'%')
</if>
<if test="qu.currentNode != null">
AND current_node LIKE concat(concat('%',#{qu.currentNode}),'%')
</if>
<if test="qu.projectLevel != null">
AND project_level LIKE concat(concat('%',#{qu.projectLevel}),'%')
</if>
<if test="qu.projectManager != null">
AND project_manager LIKE concat(concat('%',#{qu.projectManager}),'%')
</if>
<if test="qu.productLine != null">
AND product_line LIKE concat(concat('%',#{qu.productLine}),'%')
</if>
<if test="qu.projectStartDate != null">
AND project_start_date &gt;= #{qu.projectStartDate}
</if>
<if test="qu.projectEndDate != null">
AND project_end_date &lt;= #{qu.projectEndDate}
</if>
</if>
)
</select>
<select id="getAllStands" resultType="java.lang.String">
SELECT DISTINCT STAND_ID FROM sar_stand_items
</select>
</mapper>