Merge branch 'develop_master' into FOTON
This commit is contained in:
+21
-4
@@ -5,6 +5,7 @@ import com.adc.da.common.SarTypeEnum;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetailsDto;
|
||||
import com.adc.da.slrs.sarStandAttrDetails.page.SarStandAttrDetailsEOPage;
|
||||
import com.adc.da.slrs.sarStandAttrDetails.service.ISarStandAttrDetailsService;
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
@@ -15,16 +16,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -172,6 +171,24 @@ public class SarStandAttrDetailsController extends BaseController<SarStandAttrDe
|
||||
return Result.success(sarStandAttrDetails);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarStandAttrDetailsEO|查询标准中所有文件类型")
|
||||
@GetMapping("/getListData1")
|
||||
// @RequiresPermissions("lawss:sarStandAttrDetails:get")
|
||||
public ResponseMessage<List<SarStandAttrDetailsDto>> getListData1(){
|
||||
QueryWrapper<SarStandAttrDetails> queryWrapper=new QueryWrapper<>();
|
||||
queryWrapper.eq("ATTR_TYPE","file");
|
||||
List<SarStandAttrDetails> sarStandAttrDetails=sarStandAttrDetailsEOService.list(queryWrapper);
|
||||
List<SarStandAttrDetailsDto> sarStandAttrDetailsDtos = new ArrayList<>();
|
||||
for (SarStandAttrDetails sarStand:sarStandAttrDetails){
|
||||
SarStandAttrDetailsDto sarStandAttrDetailsDto = new SarStandAttrDetailsDto();
|
||||
BeanUtils.copyProperties(sarStand,sarStandAttrDetailsDto);
|
||||
sarStandAttrDetailsDto.setLabel(sarStandAttrDetailsDto.getAttrName());
|
||||
sarStandAttrDetailsDto.setValue(sarStandAttrDetailsDto.getAttrField());
|
||||
sarStandAttrDetailsDtos.add(sarStandAttrDetailsDto);
|
||||
}
|
||||
return Result.success(sarStandAttrDetailsDtos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
package com.adc.da.slrs.sarStandAttrDetails.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
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 java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
*/
|
||||
@Data
|
||||
public class SarStandAttrDetailsDto {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
// @TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "属性字段")
|
||||
// @TableField("ATTR_FIELD")
|
||||
private String attrField;
|
||||
|
||||
private String value;
|
||||
|
||||
@ApiModelProperty(value = "属性名称")
|
||||
// @TableField("ATTR_NAME")
|
||||
private String attrName;
|
||||
|
||||
private String label;
|
||||
|
||||
@ApiModelProperty(value = "类型(INPUT_STR字符串输入框,INPUT_NUM数字输入框,SELECT_OPTION下拉框,DATE_PICKER日期选择,FILE文件,TEXTAREA文本框)")
|
||||
// @TableField("ATTR_TYPE")
|
||||
private String attrType;
|
||||
|
||||
@ApiModelProperty(value = "属性字段长度")
|
||||
// @TableField("ATTR_LEN")
|
||||
private Long attrLen;
|
||||
|
||||
@ApiModelProperty(value = "展示顺序")
|
||||
// @TableField("ORDER_NUM")
|
||||
private Long orderNum;
|
||||
|
||||
@ApiModelProperty(value = "是否可编辑(0是,1否)")
|
||||
// @TableField("IS_EDIT")
|
||||
private String isEdit;
|
||||
|
||||
// @TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
// @TableField("VALID_FLAG")
|
||||
private String validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
// @TableField("CREATION_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
// @TableField("MODIFY_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "是否必填")
|
||||
// @TableField("IS_MUST")
|
||||
private String isMust;
|
||||
|
||||
@ApiModelProperty(value = "是否展示")
|
||||
// @TableField("IS_SHOW_IMP")
|
||||
private String isShowImp;
|
||||
|
||||
@ApiModelProperty(value = "展示区域")
|
||||
// @TableField("SHOW_REGION_ID")
|
||||
private String showRegionId;
|
||||
|
||||
@ApiModelProperty(value = "下拉选项所用的值")
|
||||
// @TableField("SEL_VAL")
|
||||
private String selVal;
|
||||
|
||||
@ApiModelProperty(value = "模块类型(STAND标准,LAWS政策)")
|
||||
// @TableField("SAR_TYPE")
|
||||
private String sarType;
|
||||
|
||||
@ApiModelProperty(value = "是否作为检索条件")
|
||||
// @TableField("IS_SEARCH")
|
||||
private String isSearch;
|
||||
|
||||
@ApiModelProperty(value = "是否预警")
|
||||
// @TableField("IS_WARN")
|
||||
private String isWarn;
|
||||
|
||||
@ApiModelProperty(value = "是否检索字段")
|
||||
// @TableField("IS_JANSUO")
|
||||
private String isJansuo;
|
||||
|
||||
// @TableField(exist = false)
|
||||
private String attrValue;
|
||||
|
||||
// @TableField(exist = false)
|
||||
private String areaName;
|
||||
|
||||
}
|
||||
+3
@@ -31,8 +31,11 @@ public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLib
|
||||
List<String> getAllStand();
|
||||
void updateByProjectId(@Param("id")String id, @Param("version")String version);
|
||||
List<SarStandProjectLibrary> updateByProjectIdBath(@Param("id")List<String> id, @Param("version")String version);
|
||||
|
||||
void deleteByProjectId(@Param("projectId")String projectId);
|
||||
|
||||
void deleteByProjectIdAndStandId(@Param("projectId")String projectId,@Param("standId")String standId);
|
||||
|
||||
List<String> selectListByids(@Param("ids") List<String> ids);
|
||||
List<SarStandProjectLibrary> queryProjectGroup(@Param("current")int current,@Param("size")int size,@Param("sarStandProjectLibrary") SarStandProjectLibrary sarStandProjectLibrary);
|
||||
Integer queryProjectGroupCount(@Param("sarStandProjectLibrary") SarStandProjectLibrary sarStandProjectLibrary);
|
||||
|
||||
+45
-19
@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.mysql.cj.x.protobuf.MysqlxDatatypes;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -138,6 +139,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
|
||||
@Override
|
||||
public IPage<SarStandProjectLibrary> queryProjectGroup(int current,int size,SarStandProjectLibrary sarStandProjectLibrary) {
|
||||
size = 10000;
|
||||
List<SarStandProjectLibrary> sarStandProjectLibraries=sarStandProjectLibraryDao.queryProjectGroup(current,size,sarStandProjectLibrary);
|
||||
Integer total=sarStandProjectLibraryDao.queryProjectGroupCount(sarStandProjectLibrary);
|
||||
Page<SarStandProjectLibrary> page=new Page<>();
|
||||
@@ -460,9 +462,22 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
//cars传回值为1时判断是从车型项目库中调取
|
||||
|
||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME","TEXT_STATUS","STAND_TYPE","ISSUE_TIME","(select count(*) from sar_stand_unqualified " +
|
||||
" where STAND_ID = r.stand_id and CLOSE_STATE = '1' ) as unCount ","(select count(*) from sar_stand_unqualified" +
|
||||
" where STAND_ID = r.stand_id and CLOSE_STATE = '2' ) as counts ",
|
||||
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME","TEXT_STATUS","STAND_TYPE","ISSUE_TIME",
|
||||
"(select count(*) from sar_stand_unqualified ssu " +
|
||||
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '1' and pn.id = '" + standId + "') as unCount ",
|
||||
|
||||
"(select count(*) from sar_standard_compliance_product_assess ssu " +
|
||||
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||
" where ssu.STAND_ID = r.stand_id and ssu.no_involve is not null and pn.id = '" + standId + "') as isOverCount ",
|
||||
|
||||
"(select count(*) from sar_standard_compliance_product_assess ssu " +
|
||||
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||
" where ssu.STAND_ID = r.stand_id and ssu.no_involve is null and pn.id = '" + standId + "') as isCount ",
|
||||
|
||||
"(select count(*) from sar_stand_unqualified ssu " +
|
||||
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '2' and pn.id = '" + standId + "') as counts ",
|
||||
"(select GROUP_CONCAT( DISTINCT DATE_FORMAT( PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY PLAN_CLOSE_TIME ) from sar_stand_unqualified where " +
|
||||
" STAND_ID = r.stand_id and CLOSE_STATE = '1' AND PLAN_CLOSE_TIME is NOT NULL ) as endTimes ");
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'" +
|
||||
@@ -477,8 +492,19 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
"TEXT_STATUS_BUSS as TEXT_STATUS," +
|
||||
"'BUSINESS_STAND' as STAND_TYPE," +
|
||||
"ISSUE_TIME,"+
|
||||
"( SELECT count( * ) FROM sar_stand_unqualified WHERE STAND_ID = r.stand_id AND CLOSE_STATE = '1' ) AS unCount," +
|
||||
"( SELECT count( * ) FROM sar_stand_unqualified WHERE STAND_ID = r.stand_id AND CLOSE_STATE = '2' ) AS counts," +
|
||||
"(select count(*) from sar_stand_unqualified ssu " +
|
||||
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '1' and pn.id = '" + standId + "') as unCount, "+
|
||||
"(select count(*) from sar_standard_compliance_product_assess ssu " +
|
||||
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||
" where ssu.STAND_ID = r.stand_id and ssu.no_involve is not null and pn.id = '" + standId + "') as isOverCount, "+
|
||||
|
||||
"(select count(*) from sar_standard_compliance_product_assess ssu " +
|
||||
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||
" where ssu.STAND_ID = r.stand_id and ssu.no_involve is null and pn.id = '" + standId + "') as isCount, "+
|
||||
"(select count(*) from sar_stand_unqualified ssu " +
|
||||
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '2' and pn.id = '" + standId + "') as counts, "+
|
||||
"(" +
|
||||
"SELECT " +
|
||||
"GROUP_CONCAT( DISTINCT DATE_FORMAT( PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY PLAN_CLOSE_TIME ) " +
|
||||
@@ -547,6 +573,14 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
if(StringUtils.equals(s.getStandType(),"BUSINESS_STAND")){
|
||||
p.setSSRQ(s.getIssueTime());
|
||||
}
|
||||
if (0L == s.getUnCount()) {
|
||||
if (s.getIsCount() != 0L) {
|
||||
p.setUnCount(0L);
|
||||
}
|
||||
if (s.getIsOverCount() != 0L) {
|
||||
p.setUnCount(-1L);
|
||||
}
|
||||
}
|
||||
list.add(p);
|
||||
}
|
||||
IPage<StandAttrInfoDto> userIPage = new Page<>();
|
||||
@@ -564,22 +598,14 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
@Override
|
||||
public void batchInsert(List<StandProjectRelationDto> list) {
|
||||
if(list!=null && !list.isEmpty()){
|
||||
for (StandProjectRelationDto relationDto : list){
|
||||
SarStandProjectLibrary sarStandProjectLibrary = sarStandProjectLibraryDao.selectById(relationDto.getProjectId());
|
||||
if ("G9".equals(sarStandProjectLibrary.getCurrentNode())){
|
||||
sarStandProjectLibraryDao.updateFlag(relationDto.getProjectId());
|
||||
}else if ("G8".equals(sarStandProjectLibrary.getCurrentNode())){
|
||||
sarStandProjectLibraryDao.updateFlag(relationDto.getProjectId());
|
||||
}else if ("G7".equals(sarStandProjectLibrary.getCurrentNode())){
|
||||
sarStandProjectLibraryDao.updateFlag(relationDto.getProjectId());
|
||||
}else if ("G4".equals(sarStandProjectLibrary.getCurrentNode())){
|
||||
sarStandProjectLibraryDao.updateFlag(relationDto.getProjectId());
|
||||
}
|
||||
}
|
||||
StandProjectRelationDto standProjectRelationDto = list.get(0);
|
||||
if(standProjectRelationDto!=null && StringUtils.isNotBlank(standProjectRelationDto.getProjectId())){
|
||||
// sarStandProjectLibraryDao.updateFlag(standProjectRelationDto.getProjectId());
|
||||
sarStandProjectLibraryDao.deleteByProjectId(standProjectRelationDto.getProjectId());
|
||||
sarStandProjectLibraryDao.updateFlag(standProjectRelationDto.getProjectId());
|
||||
}
|
||||
for (StandProjectRelationDto relationDto : list){
|
||||
if (StringUtils.isNotBlank(relationDto.getStandId())) {
|
||||
sarStandProjectLibraryDao.deleteByProjectIdAndStandId(relationDto.getProjectId(), relationDto.getStandId());
|
||||
}
|
||||
}
|
||||
sarStandProjectLibraryDao.batchInsert(list);
|
||||
if(standProjectRelationDto!=null && StringUtils.isNotBlank(standProjectRelationDto.getProjectId())){
|
||||
|
||||
+8
@@ -158,6 +158,14 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private String endTimes;
|
||||
|
||||
@ApiModelProperty(value = "符合数量")
|
||||
@TableField(exist = false)
|
||||
private Long isCount;
|
||||
|
||||
@ApiModelProperty(value = "不涉及数量")
|
||||
@TableField(exist = false)
|
||||
private Long isOverCount;
|
||||
|
||||
|
||||
// 以下为非表中字段
|
||||
@TableField(exist = false)
|
||||
|
||||
+8
-2
@@ -32,6 +32,12 @@
|
||||
project_id= #{projectId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByProjectIdAndStandId">
|
||||
delete from sar_stand_project_relation where
|
||||
project_id= #{projectId}
|
||||
and stand_id = #{standId}
|
||||
</delete>
|
||||
|
||||
<update id="updateByProjectId">
|
||||
update sar_stand_project_library
|
||||
<if test="id != null">
|
||||
@@ -420,8 +426,8 @@
|
||||
</select>
|
||||
<select id="queryProjectGroup"
|
||||
resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">
|
||||
select distinct sar_stand_project_library.project_group,ANY_VALUE(sar_stand_project_library.management_host_name),
|
||||
ANY_VALUE(sar_stand_project_library.category_name),ANY_VALUE(sar_stand_project_library.development_host_name)
|
||||
select distinct sar_stand_project_library.project_group,ANY_VALUE(sar_stand_project_library.management_host_name) as management_host_name,
|
||||
ANY_VALUE(sar_stand_project_library.category_name) as category_name,ANY_VALUE(sar_stand_project_library.development_host_name) as development_host_name
|
||||
from sar_stand_project_library
|
||||
where 1=1
|
||||
<if test="sarStandProjectLibrary.managementHostName != null and sarStandProjectLibrary.managementHostName != ''">
|
||||
|
||||
Reference in New Issue
Block a user