Merge remote-tracking branch 'origin/develop_3' into develop_3

# Conflicts:
#	adc-da-slrs/src/main/resources/mybatis/mapper/SarStandItems/SarStandItemsMapper.xml
This commit is contained in:
2510220824
2021-08-09 17:10:30 +08:00
6 changed files with 406 additions and 215 deletions
@@ -5,9 +5,7 @@ import com.adc.da.http.ResponseMessage;
import com.adc.da.http.Result;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto;
import com.adc.da.slrs.sarStandItems.entity.FindStandDto;
import com.adc.da.slrs.sarStandItems.entity.SarItemsTime;
import com.adc.da.slrs.sarStandItems.entity.SarStandItemsDto;
import com.adc.da.slrs.sarStandItems.entity.*;
import com.adc.da.slrs.sarStandItems.service.impl.SarStandItemsServiceImpl;
import com.adc.da.util.UUIDUtils;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -15,7 +13,6 @@ import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
import io.swagger.annotations.Api;
import com.adc.da.base.web.BaseController;
@@ -55,6 +52,17 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
}
}
@ApiOperation(value = "分解单查询")
@GetMapping("/querySarItemAndInterpretation")
public ResponseMessage querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
List<SarItemVO> sarItemVOS = ServiceImpl.querySarItemAndInterpretation(page);
return Result.success("200",sarItemVOS);
}
@ApiOperation(value = "分解单查询(带时间)")
@GetMapping("/findAllItemsTimes")
public List<SarItemsTime> findAllItemsTimes(@RequestParam("type") String type,@RequestParam("ids") String ids){
@@ -1,8 +1,6 @@
package com.adc.da.slrs.sarStandItems.dao;
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
import com.adc.da.slrs.sarStandItems.entity.SarStandItemsDto;
import com.adc.da.slrs.sarStandItems.entity.StandsTimeDto;
import com.adc.da.slrs.sarStandItems.entity.*;
import com.adc.da.slrs.sarStandItems.page.SarStandItemsEOPage;
import com.adc.da.sys.common.SelectionResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -24,6 +22,8 @@ import java.util.Set;
@Mapper
public interface SarStandItemsDao extends BaseMapper<SarStandItems> {
List<SarItemVO> querySarItemAndInterpretation(FindSarItemsPageReqDTO page);
List<SarStandItems> querySarStandItemsList(SarStandItemsEOPage page);
int querySarStandItemsListCount(SarStandItemsEOPage page);
@@ -0,0 +1,36 @@
package com.adc.da.slrs.sarStandItems.entity;
import com.adc.da.base.page.BasePage;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
public class FindSarItemsPageReqDTO {
private static final long serialVersionUID = 1L;
private Integer page = 1;
private Integer pageSize = 20;
@ApiModelProperty(value = "标准id")
private String standId;
@ApiModelProperty(value = "条款名称")
private String itemsName;
@ApiModelProperty(value = "新车型实施日期")
@DateTimeFormat(pattern = "yyy-MM-dd")
private Date XCXSSRQ;
@ApiModelProperty(value = "在产车实施日期")
@DateTimeFormat(pattern = "yyy-MM-dd")
private Date ZCCSSRQ;
@ApiModelProperty(value = "文件类型")
private String fileType;
}
@@ -0,0 +1,67 @@
package com.adc.da.slrs.sarStandItems.entity;
import com.adc.da.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
@ApiModel(value="标准分解单显示对象", description="")
public class SarItemVO extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
private String id;
@ApiModelProperty(value = "标准ID")
private String standId;
@ApiModelProperty(value = "条款号")
private String itemsNum;
@ApiModelProperty(value = "条款名称")
private String itemsName;
@ApiModelProperty(value = "条款内容")
private String itemsTitle;
@ApiModelProperty(value = "解读内容--条款要求")
private String termsConditions;
@ApiModelProperty(value = "新车实施日期")
@DateTimeFormat
private Date XCXSSRQ;
@ApiModelProperty(value = "在产车实施日期")
@DateTimeFormat
private Date ZCCSSRQ;
@ApiModelProperty(value = "适用车型")
private String applyArctic;
@ApiModelProperty(value = "责任部门")
private String responsibleUnit;
@ApiModelProperty(value = "责任工程师")
private String dutyEngineer;
@ApiModelProperty(value = "相对于上一版本变化点")
private String comparedWithPrevious;
@ApiModelProperty(value = "合规性分析")
private String complianceState;
@ApiModelProperty(value = "符合性要求-符合性状态")
private String complianceRequire;
@ApiModelProperty(value = "文件类型")
private String fileType;
}
@@ -189,4 +189,9 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
public List<SarStandItemsDto> findAllItems(String type,String[] ids){
return dao.selectAllItemsByIds(type,ids);
}
public List<SarItemVO> querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
return dao.querySarItemAndInterpretation(page);
}
}
@@ -2,65 +2,82 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.sarStandItems.dao.SarStandItemsDao">
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarStandItems.entity.SarStandItems" >
<id column="id" property="id" />
<result column="modify_time" property="modifyTime" />
<result column="creation_time" property="creationTime" />
<result column="creation_user" property="creationUser" />
<result column="valid_flag" property="validFlag" />
<result column="remarks" property="remarks" />
<result column="responsible_unit" property="responsibleUnit" />
<result column="energy_kind" property="energyKind" />
<result column="apply_arctic" property="applyArctic" />
<result column="tack_time" property="tackTime" />
<result column="parts" property="parts" />
<result column="items_name" property="itemsName" />
<result column="items_num" property="itemsNum" />
<result column="stand_id" property="standId" />
<result column="MAINPOINTS_IMPEMENTATION" property="mainPointImplementation" />
<result column="TERMS_CONDITIONS" property="termsConditions" jdbcType="CLOB" javaType = "java.lang.String"/>
<result column="fo" property="fo" />
<result column="duty_engineer" property="dutyEngineer" />
<result column="svpps" property="svpps" />
<result column="claim_type" property="claimType" />
<result column="bus_stand_cover" property="busStandCover" />
<result column="file_type" property="fileType" />
<result column="claimTypeShow" property="claimTypeShow" />
<result column="fileTypeShow" property="fileTypeShow" />
<result column="applyArcticShow" property="applyArcticShow" />
<result column="responsibleUnitShow" property="responsibleUnitShow" />
<result column="itemState" property="itemState" />
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarStandItems.entity.SarStandItems">
<id column="id" property="id"/>
<result column="modify_time" property="modifyTime"/>
<result column="creation_time" property="creationTime"/>
<result column="creation_user" property="creationUser"/>
<result column="valid_flag" property="validFlag"/>
<result column="remarks" property="remarks"/>
<result column="responsible_unit" property="responsibleUnit"/>
<result column="energy_kind" property="energyKind"/>
<result column="apply_arctic" property="applyArctic"/>
<result column="tack_time" property="tackTime"/>
<result column="parts" property="parts"/>
<result column="items_name" property="itemsName"/>
<result column="items_num" property="itemsNum"/>
<result column="stand_id" property="standId"/>
<result column="MAINPOINTS_IMPEMENTATION" property="mainPointImplementation"/>
<result column="TERMS_CONDITIONS" property="termsConditions" jdbcType="CLOB" javaType="java.lang.String"/>
<result column="fo" property="fo"/>
<result column="duty_engineer" property="dutyEngineer"/>
<result column="svpps" property="svpps"/>
<result column="claim_type" property="claimType"/>
<result column="bus_stand_cover" property="busStandCover"/>
<result column="file_type" property="fileType"/>
<result column="claimTypeShow" property="claimTypeShow"/>
<result column="fileTypeShow" property="fileTypeShow"/>
<result column="applyArcticShow" property="applyArcticShow"/>
<result column="responsibleUnitShow" property="responsibleUnitShow"/>
<result column="itemState" property="itemState"/>
</resultMap>
<resultMap id="SecondResultMap" type="com.adc.da.slrs.sarStandItems.entity.SarStandItems" >
<id column="id" property="id" />
<result column="modify_time" property="modifyTime" />
<result column="creation_time" property="creationTime" />
<result column="creation_user" property="creationUser" />
<result column="valid_flag" property="validFlag" />
<result column="remarks" property="remarks" />
<result column="responsible_unit" property="responsibleUnit" />
<result column="energy_kind" property="energyKind" />
<result column="apply_arctic" property="applyArctic" />
<result column="tack_time" property="tackTime" />
<result column="parts" property="parts" />
<result column="items_name" property="itemsName" />
<result column="items_num" property="itemsNum" />
<result column="stand_id" property="standId" />
<result column="responsibleUnitShow" property="responsibleUnitShow" />
<resultMap id="SecondResultMap" type="com.adc.da.slrs.sarStandItems.entity.SarStandItems">
<id column="id" property="id"/>
<result column="modify_time" property="modifyTime"/>
<result column="creation_time" property="creationTime"/>
<result column="creation_user" property="creationUser"/>
<result column="valid_flag" property="validFlag"/>
<result column="remarks" property="remarks"/>
<result column="responsible_unit" property="responsibleUnit"/>
<result column="energy_kind" property="energyKind"/>
<result column="apply_arctic" property="applyArctic"/>
<result column="tack_time" property="tackTime"/>
<result column="parts" property="parts"/>
<result column="items_name" property="itemsName"/>
<result column="items_num" property="itemsNum"/>
<result column="stand_id" property="standId"/>
<result column="responsibleUnitShow" property="responsibleUnitShow"/>
<result column="foShow" property="foShow"/>
</resultMap>
<resultMap id="sarItemVOResultMap" type="com.adc.da.slrs.sarStandItems.entity.SarItemVO">
<id column="id" property="id"/>
<result column="STAND_ID" property="standId"/>
<result column="ITEMS_NUM" property="itemsNum"/>
<result column="ITEMS_NAME" property="itemsName"/>
<result column="ITEMS_TITLE" property="itemsTitle"/>
<result column="TERMS_CONDITIONS" property="termsConditions"/>
<result column="XCXSSRQ" property="XCXSSRQ"/>
<result column="ZCCSSRQ" property="ZCCSSRQ"/>
<result column="APPLY_ARCTIC" property="applyArctic"/>
<result column="RESPONSIBLE_UNIT" property="responsibleUnit"/>
<result column="DUTY_ENGINEER" property="dutyEngineer"/>
<result column="compared_with_previous" property="comparedWithPrevious"/>
<result column="compliance_state" property="complianceState"/>
<result column="COMPLIANCE_REQUIR" property="complianceRequire"/>
<result column="FILE_TYPE" property="fileType"/>
</resultMap>
<!-- SAR_STAND_ITEMS table all fields -->
<sql id="Base_Column_List" >
<sql id="Base_Column_List">
SAR_STAND_ITEMS.modify_time, SAR_STAND_ITEMS.creation_time, SAR_STAND_ITEMS.creation_user, SAR_STAND_ITEMS.valid_flag, SAR_STAND_ITEMS.remarks, SAR_STAND_ITEMS.responsible_unit, SAR_STAND_ITEMS.energy_kind, SAR_STAND_ITEMS.apply_arctic, tack_time, parts, SAR_STAND_ITEMS.items_name, SAR_STAND_ITEMS.items_num, SAR_STAND_ITEMS.stand_id, SAR_STAND_ITEMS.id
,TS_ORG.org_name as responsibleUnitShow,SAR_STAND_ITEMS.MAINPOINTS_IMPEMENTATION,SAR_STAND_ITEMS.TERMS_CONDITIONS,tsFo.UNAME as foShow,SAR_STAND_ITEMS.duty_engineer,SAR_STAND_ITEMS.svpps,
SAR_STAND_ITEMS.claim_type,SAR_STAND_ITEMS.bus_stand_cover,SAR_STAND_ITEMS.file_type,dicClaimType.DIC_TYPE_NAME as claimTypeShow,tsdutyEngineer.UNAME as dutyEngineerShow,SAR_STAND_ITEMS.fo
</sql>
<sql id="Base_Query_Column_List" >
<sql id="Base_Query_Column_List">
SAR_STAND_ITEMS.modify_time, SAR_STAND_ITEMS.creation_time, SAR_STAND_ITEMS.creation_user, SAR_STAND_ITEMS.valid_flag, SAR_STAND_ITEMS.remarks, SAR_STAND_ITEMS.responsible_unit,
SAR_STAND_ITEMS.energy_kind, SAR_STAND_ITEMS.apply_arctic, tack_time, parts, SAR_STAND_ITEMS.items_name, SAR_STAND_ITEMS.items_num, SAR_STAND_ITEMS.stand_id, SAR_STAND_ITEMS.id
,SAR_STAND_ITEMS.MAINPOINTS_IMPEMENTATION,SAR_STAND_ITEMS.TERMS_CONDITIONS,SAR_STAND_ITEMS.duty_engineer,SAR_STAND_ITEMS.svpps,
@@ -69,91 +86,97 @@
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
left join SAR_STANDARDS_INFO on (SAR_STANDARDS_INFO.id = SAR_STAND_ITEMS.stand_id and SAR_STANDARDS_INFO.valid_flag=0)
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_STAND_ITEMS.claim_type and dicClaimType.dic_id is
left join SAR_STANDARDS_INFO on (SAR_STANDARDS_INFO.id = SAR_STAND_ITEMS.stand_id and
SAR_STANDARDS_INFO.valid_flag=0)
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_STAND_ITEMS.claim_type and
dicClaimType.dic_id is
not null and dicClaimType.valid_flag = 0)
left join TS_USER tsdutyEngineer on (tsdutyEngineer.USID = SAR_STAND_ITEMS.duty_engineer and tsdutyEngineer.valid_flag=0
left join TS_USER tsdutyEngineer on (tsdutyEngineer.USID = SAR_STAND_ITEMS.duty_engineer and
tsdutyEngineer.valid_flag=0
and tsdutyEngineer.DISABLE_FLAG=0)
left join TS_USER tsFo on (tsFo.USID = SAR_STAND_ITEMS.fo and tsFo.valid_flag=0
left join TS_USER tsFo on (tsFo.USID = SAR_STAND_ITEMS.fo and tsFo.valid_flag=0
and tsFo.DISABLE_FLAG=0)
where 1=1
<trim suffixOverrides="," >
<if test="fileType != null" >
<trim suffixOverrides=",">
<if test="fileType != null">
and SAR_STAND_ITEMS.file_type = #{fileType}
</if>
<if test="modifyTime != null" >
<if test="modifyTime != null">
and SAR_STAND_ITEMS.modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null" >
<if test="modifyTime1 != null">
and SAR_STAND_ITEMS.modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null" >
<if test="modifyTime2 != null">
and SAR_STAND_ITEMS.modify_time &lt;= #{modifyTime2}
</if>
<if test="creationTime != null" >
<if test="creationTime != null">
and SAR_STAND_ITEMS.creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null" >
<if test="creationTime1 != null">
and SAR_STAND_ITEMS.creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null" >
<if test="creationTime2 != null">
and SAR_STAND_ITEMS.creation_time &lt;= #{creationTime2}
</if>
<if test="creationUser != null" >
<if test="creationUser != null">
and SAR_STAND_ITEMS.creation_user ${creationUserOperator} #{creationUser}
</if>
<if test="validFlag != null" >
<if test="validFlag != null">
and SAR_STAND_ITEMS.valid_flag ${validFlagOperator} #{validFlag}
</if>
<if test="remarks != null" >
<if test="remarks != null">
and SAR_STAND_ITEMS.remarks ${remarksOperator} #{remarks}
</if>
<if test="responsibleUnit != null" >
<if test="responsibleUnit != null">
and SAR_STAND_ITEMS.responsible_unit = #{responsibleUnit}
</if>
<if test="energyKind != null" >
<if test="energyKind != null">
and SAR_STAND_ITEMS.energy_kind ${energyKindOperator} #{energyKind}
</if>
<if test="applyArctic != null" >
<if test="applyArctic != null">
and SAR_STAND_ITEMS.apply_arctic ${applyArcticOperator} #{applyArctic}
</if>
<if test="tackTime != null" >
<if test="tackTime != null">
and SAR_STAND_ITEMS.tack_time ${tackTimeOperator} #{tackTime}
</if>
<if test="tackTime1 != null" >
<if test="tackTime1 != null">
and SAR_STAND_ITEMS.tack_time &gt;= #{tackTime1}
</if>
<if test="tackTime2 != null" >
<if test="tackTime2 != null">
and SAR_STAND_ITEMS.tack_time &lt;= #{tackTime2}
</if>
<if test="parts != null" >
<if test="parts != null">
and SAR_STAND_ITEMS.parts like concat(concat('%', #{parts}),'%')
</if>
<if test="nameOrRequest != null" >
and (SAR_STAND_ITEMS.items_name like concat(concat('%', #{nameOrRequest}),'%') or SAR_STAND_ITEMS.TERMS_CONDITIONS like concat(concat('%', #{nameOrRequest}),'%'))
<if test="nameOrRequest != null">
and (SAR_STAND_ITEMS.items_name like concat(concat('%', #{nameOrRequest}),'%') or
SAR_STAND_ITEMS.TERMS_CONDITIONS like concat(concat('%', #{nameOrRequest}),'%'))
</if>
<if test="itemsName != null" >
<if test="itemsName != null">
and SAR_STAND_ITEMS.items_name ${itemsNameOperator} #{itemsName}
</if>
<if test="itemsNum != null" >
<if test="itemsNum != null">
and SAR_STAND_ITEMS.items_num ${itemsNumOperator} #{itemsNum}
</if>
<if test="standId != null" >
<if test="standId != null">
and SAR_STAND_ITEMS.stand_id ${standIdOperator} #{standId}
</if>
<if test="standNum != null" >
<if test="standNum != null">
and ((SAR_STANDARDS_INFO.STAND_SORT || ' ' || SAR_STANDARDS_INFO.STAND_NUMBER || '-' ||
SAR_STANDARDS_INFO.STAND_YEAR like concat(concat('%',#{standNum}),'%') and SAR_STANDARDS_INFO.STAND_YEAR is not null)
or (SAR_STANDARDS_INFO.STAND_SORT || ' ' || SAR_STANDARDS_INFO.STAND_NUMBER like concat(concat('%',#{standNum}),'%')
SAR_STANDARDS_INFO.STAND_YEAR like concat(concat('%',#{standNum}),'%') and SAR_STANDARDS_INFO.STAND_YEAR
is not null)
or (SAR_STANDARDS_INFO.STAND_SORT || ' ' || SAR_STANDARDS_INFO.STAND_NUMBER like
concat(concat('%',#{standNum}),'%')
and SAR_STANDARDS_INFO.STAND_YEAR is null))
</if>
<if test="id != null" >
<if test="id != null">
and SAR_STAND_ITEMS.id ${idOperator} #{id}
</if>
<if test="noId != null" >
<if test="noId != null">
and SAR_STAND_ITEMS.id != #{noId}
</if>
<if test="productId != null" >
<if test="productId != null">
and SAR_PRODUCT_SAR_STATE.product_id = #{productId}
</if>
<if test="idlist != null">
@@ -162,7 +185,7 @@
#{item}
</foreach>
</if>
<if test='proType != null and proType == "process"' >
<if test='proType != null and proType == "process"'>
and (SAR_STAND_ITEMS.claim_type='L7N7EEDAPR' or SAR_STAND_ITEMS.claim_type='RENVECPFGT')
</if>
</trim>
@@ -178,66 +201,66 @@
<!--</insert>-->
<!-- 动态插入记录 主键是序列 -->
<insert id="insertSelective" parameterType="com.adc.da.slrs.sarStandItems.entity.SarStandItems" >
<insert id="insertSelective" parameterType="com.adc.da.slrs.sarStandItems.entity.SarStandItems">
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
SELECT SEQ_SAR_STAND_ITEMS.NEXTVAL FROM DUAL
</selectKey> -->
insert into SAR_STAND_ITEMS
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="modifyTime != null" >modify_time,</if>
<if test="creationTime != null" >creation_time,</if>
<if test="creationUser != null" >creation_user,</if>
<if test="validFlag != null" >valid_flag,</if>
<if test="remarks != null" >remarks,</if>
<if test="responsibleUnit != null" >responsible_unit,</if>
<if test="energyKind != null" >energy_kind,</if>
<if test="applyArctic != null" >apply_arctic,</if>
<if test="tackTime != null" >tack_time,</if>
<if test="parts != null" >parts,</if>
<if test="itemsName != null" >items_name,</if>
<if test="itemsNum != null" >items_num,</if>
<if test="standId != null" >stand_id,</if>
<if test="id != null" >id,</if>
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="modifyTime != null">modify_time,</if>
<if test="creationTime != null">creation_time,</if>
<if test="creationUser != null">creation_user,</if>
<if test="validFlag != null">valid_flag,</if>
<if test="remarks != null">remarks,</if>
<if test="responsibleUnit != null">responsible_unit,</if>
<if test="energyKind != null">energy_kind,</if>
<if test="applyArctic != null">apply_arctic,</if>
<if test="tackTime != null">tack_time,</if>
<if test="parts != null">parts,</if>
<if test="itemsName != null">items_name,</if>
<if test="itemsNum != null">items_num,</if>
<if test="standId != null">stand_id,</if>
<if test="id != null">id,</if>
<if test="mainPointImplementation != null">MAINPOINTS_IMPEMENTATION,</if>
<if test="termsConditions != null">TERMS_CONDITIONS,</if>
<if test="fo != null" >fo,</if>
<if test="dutyEngineer != null" >duty_engineer,</if>
<if test="svpps != null" >svpps,</if>
<if test="claimType != null" >claim_type,</if>
<if test="fo != null">fo,</if>
<if test="dutyEngineer != null">duty_engineer,</if>
<if test="svpps != null">svpps,</if>
<if test="claimType != null">claim_type,</if>
<if test="busStandCover != null">bus_stand_cover,</if>
<if test="fileType != null">file_type</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
<if test="remarks != null" >#{remarks, jdbcType=VARCHAR},</if>
<if test="responsibleUnit != null" >#{responsibleUnit, jdbcType=VARCHAR},</if>
<if test="energyKind != null" >#{energyKind, jdbcType=VARCHAR},</if>
<if test="applyArctic != null" >#{applyArctic, jdbcType=VARCHAR},</if>
<if test="tackTime != null" >#{tackTime, jdbcType=TIMESTAMP},</if>
<if test="parts != null" >#{parts, jdbcType=VARCHAR},</if>
<if test="itemsName != null" >#{itemsName, jdbcType=VARCHAR},</if>
<if test="itemsNum != null" >#{itemsNum, jdbcType=VARCHAR},</if>
<if test="standId != null" >#{standId, jdbcType=VARCHAR},</if>
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="modifyTime != null">#{modifyTime, jdbcType=TIMESTAMP},</if>
<if test="creationTime != null">#{creationTime, jdbcType=TIMESTAMP},</if>
<if test="creationUser != null">#{creationUser, jdbcType=VARCHAR},</if>
<if test="validFlag != null">#{validFlag, jdbcType=INTEGER},</if>
<if test="remarks != null">#{remarks, jdbcType=VARCHAR},</if>
<if test="responsibleUnit != null">#{responsibleUnit, jdbcType=VARCHAR},</if>
<if test="energyKind != null">#{energyKind, jdbcType=VARCHAR},</if>
<if test="applyArctic != null">#{applyArctic, jdbcType=VARCHAR},</if>
<if test="tackTime != null">#{tackTime, jdbcType=TIMESTAMP},</if>
<if test="parts != null">#{parts, jdbcType=VARCHAR},</if>
<if test="itemsName != null">#{itemsName, jdbcType=VARCHAR},</if>
<if test="itemsNum != null">#{itemsNum, jdbcType=VARCHAR},</if>
<if test="standId != null">#{standId, jdbcType=VARCHAR},</if>
<if test="id != null">#{id, jdbcType=VARCHAR},</if>
<if test="mainPointImplementation != null">#{mainPointImplementation,jdbcType=VARCHAR},</if>
<if test="termsConditions != null">#{termsConditions,jdbcType=CLOB},</if>
<if test="fo != null" >#{fo, jdbcType=VARCHAR},</if>
<if test="dutyEngineer != null" >#{dutyEngineer, jdbcType=VARCHAR},</if>
<if test="svpps != null" >#{svpps, jdbcType=VARCHAR},</if>
<if test="claimType != null" >#{claimType, jdbcType=VARCHAR},</if>
<if test="busStandCover != null" >#{busStandCover, jdbcType=VARCHAR},</if>
<if test="fileType != null" >#{fileType, jdbcType=VARCHAR}</if>
<if test="fo != null">#{fo, jdbcType=VARCHAR},</if>
<if test="dutyEngineer != null">#{dutyEngineer, jdbcType=VARCHAR},</if>
<if test="svpps != null">#{svpps, jdbcType=VARCHAR},</if>
<if test="claimType != null">#{claimType, jdbcType=VARCHAR},</if>
<if test="busStandCover != null">#{busStandCover, jdbcType=VARCHAR},</if>
<if test="fileType != null">#{fileType, jdbcType=VARCHAR}</if>
</trim>
</insert>
<!-- 根据pk,修改记录-->
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.sarStandItems.entity.SarStandItems" >
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.sarStandItems.entity.SarStandItems">
update SAR_STAND_ITEMS
set modify_time = #{modifyTime},
creation_time = #{creationTime},
@@ -258,69 +281,69 @@
<!-- 修改记录,只修改只不为空的字段 -->
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.sarStandItems.entity.SarStandItems">
update SAR_STAND_ITEMS
<set >
<if test="modifyTime != null" >
<set>
<if test="modifyTime != null">
modify_time = #{modifyTime},
</if>
<if test="creationTime != null" >
<if test="creationTime != null">
creation_time = #{creationTime},
</if>
<if test="creationUser != null" >
<if test="creationUser != null">
creation_user = #{creationUser},
</if>
<if test="validFlag != null" >
<if test="validFlag != null">
valid_flag = #{validFlag},
</if>
<if test="remarks != null" >
<if test="remarks != null">
remarks = #{remarks},
</if>
<if test="responsibleUnit != null" >
<if test="responsibleUnit != null">
responsible_unit = #{responsibleUnit},
</if>
<if test="energyKind != null" >
<if test="energyKind != null">
energy_kind = #{energyKind},
</if>
<if test="applyArctic != null" >
<if test="applyArctic != null">
apply_arctic = #{applyArctic},
</if>
<if test="tackTime != null" >
<if test="tackTime != null">
tack_time = #{tackTime},
</if>
<if test="tackTime == null">
tack_time = null,
</if>
<if test="parts != null" >
<if test="parts != null">
parts = #{parts},
</if>
<if test="itemsName != null" >
<if test="itemsName != null">
items_name = #{itemsName},
</if>
<if test="itemsNum != null" >
<if test="itemsNum != null">
items_num = #{itemsNum},
</if>
<if test="standId != null" >
<if test="standId != null">
stand_id = #{standId},
</if>
<if test="mainPointImplementation != null" >
<if test="mainPointImplementation != null">
MAINPOINTS_IMPEMENTATION = #{mainPointImplementation},
</if>
<if test="termsConditions != null" >
<if test="termsConditions != null">
TERMS_CONDITIONS = #{termsConditions,jdbcType=CLOB},
</if>
<if test="fo != null" >
<if test="fo != null">
fo = #{fo},
</if>
<if test="dutyEngineer != null" >
<if test="dutyEngineer != null">
duty_engineer = #{dutyEngineer},
</if>
<if test="svpps != null" >
<if test="svpps != null">
svpps = #{svpps},
</if>
<if test="claimType != null" >
<if test="claimType != null">
claim_type = #{claimType},
</if>
<if test="busStandCover != null" >
<if test="busStandCover != null">
bus_stand_cover = #{busStandCover},
</if>
</set>
@@ -329,7 +352,8 @@
<!-- 根据id查询 SAR_STAND_ITEMS -->
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
select <include refid="Base_Query_Column_List" />
select
<include refid="Base_Query_Column_List"/>
from SAR_STAND_ITEMS
where id = #{value}
@@ -348,35 +372,76 @@
<include refid="Base_Where_Clause"/>
</select>
<select id="querySarItemAndInterpretation" resultMap="sarItemVOResultMap"
parameterType="com.adc.da.slrs.sarStandItems.entity.FindSarItemsPageReqDTO">
SELECT
*
FROM
sar_stand_items AS a
LEFT JOIN sar_interpretation_national_standard AS b ON a.STAND_ID = b.STAND_ID
<where>
<if test="standId!=null and standId!=''">
and a.stand_id=#{standId}
</if>
<if test="fileType !=null and fileType!=''">
and a.file_type=#{fileType}
</if>
<if test="itemsName != null and itemsName!=''">
and a.ITEMS_NAME=#{itemsName}
</if>
<if test="XCXSSRQ !=null and XCXSSRQ!=''">
and a.XCXSSRQ=#{XCXSSRQ}
</if>
<if test="ZCCSSRQ !=null and ZCCSSRQ != ''">
and a.ZCCSSRQ=#{ZCCSSRQ}
</if>
</where>
LIMIT #{page},#{pageSize}
</select>
<!-- 查询SAR_STAND_ITEMS列表 -->
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
select <include refid="Base_Column_List" /> from
(select tmp_tb.* from
(select SAR_STAND_ITEMS.modify_time, SAR_STAND_ITEMS.creation_time, SAR_STAND_ITEMS.creation_user, SAR_STAND_ITEMS.valid_flag, SAR_STAND_ITEMS.remarks, SAR_STAND_ITEMS.responsible_unit, SAR_STAND_ITEMS.energy_kind, SAR_STAND_ITEMS.apply_arctic, tack_time, parts, SAR_STAND_ITEMS.items_name, SAR_STAND_ITEMS.items_num, SAR_STAND_ITEMS.stand_id, SAR_STAND_ITEMS.id
,TS_ORG.org_name as responsibleUnitShow,SAR_STAND_ITEMS.MAINPOINTS_IMPEMENTATION,SAR_STAND_ITEMS.TERMS_CONDITIONS
select
<include refid="Base_Column_List"/>
from
(select tmp_tb.* from
(select SAR_STAND_ITEMS.modify_time, SAR_STAND_ITEMS.creation_time, SAR_STAND_ITEMS.creation_user,
SAR_STAND_ITEMS.valid_flag, SAR_STAND_ITEMS.remarks, SAR_STAND_ITEMS.responsible_unit,
SAR_STAND_ITEMS.energy_kind, SAR_STAND_ITEMS.apply_arctic, tack_time, parts, SAR_STAND_ITEMS.items_name,
SAR_STAND_ITEMS.items_num, SAR_STAND_ITEMS.stand_id, SAR_STAND_ITEMS.id
,TS_ORG.org_name as
responsibleUnitShow,SAR_STAND_ITEMS.MAINPOINTS_IMPEMENTATION,SAR_STAND_ITEMS.TERMS_CONDITIONS
from SAR_STAND_ITEMS
<include refid="Base_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
<if test="pager.orderCondition != null and pager.orderCondition != ''">
${pager.orderCondition}
</if>
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
</select>
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
select <include refid="Base_Column_List"/> from SAR_STAND_ITEMS
select
<include refid="Base_Column_List"/>
from SAR_STAND_ITEMS
<include refid="Base_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
<if test="pager.orderCondition != null and pager.orderCondition != ''">
${pager.orderCondition}
</if>
</select>
<select id="queryItemsByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
select <include refid="Base_Column_List"/>,
select<include refid="Base_Column_List"/>,
(
SELECT
group_concat(TS_DICTYPE.DIC_TYPE_NAME ORDER BY SAR_STAND_ITEM_VAL.property_type separator ',')
FROM
SAR_STAND_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.dic_type_code = SAR_STAND_ITEM_VAL.property_val and TS_DICTYPE.dic_id is not null)
SAR_STAND_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.dic_type_code = SAR_STAND_ITEM_VAL.property_val and
TS_DICTYPE.dic_id is not null)
WHERE
SAR_STAND_ITEM_VAL.ITEM_ID = SAR_STAND_ITEMS.id
AND SAR_STAND_ITEM_VAL.property_type = 'APPLY_ARCTIC'
@@ -385,93 +450,100 @@
SELECT
group_concat(TS_DICTYPE.DIC_TYPE_NAME ORDER BY SAR_STAND_ITEM_VAL.property_type separator ',')
FROM
SAR_STAND_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.dic_type_code = SAR_STAND_ITEM_VAL.property_val and TS_DICTYPE.dic_id is not null)
SAR_STAND_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.dic_type_code = SAR_STAND_ITEM_VAL.property_val and
TS_DICTYPE.dic_id is not null)
WHERE
SAR_STAND_ITEM_VAL.ITEM_ID = SAR_STAND_ITEMS.id
AND SAR_STAND_ITEM_VAL.property_type = 'ENERGY_KIND'
) AS emergyKindShow
from SAR_STAND_ITEMS left join TS_ORG on (SAR_STAND_ITEMS.responsible_unit =TS_ORG.id)
left join SAR_STANDARDS_INFO on (SAR_STANDARDS_INFO.id = SAR_STAND_ITEMS.stand_id and SAR_STANDARDS_INFO.valid_flag=0)
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_STAND_ITEMS.claim_type and dicClaimType.dic_id is
left join SAR_STANDARDS_INFO on (SAR_STANDARDS_INFO.id = SAR_STAND_ITEMS.stand_id and
SAR_STANDARDS_INFO.valid_flag=0)
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_STAND_ITEMS.claim_type and
dicClaimType.dic_id is
not null and dicClaimType.valid_flag = 0)
left join TS_USER tsdutyEngineer on (tsdutyEngineer.USID = SAR_STAND_ITEMS.duty_engineer and tsdutyEngineer.valid_flag=0
left join TS_USER tsdutyEngineer on (tsdutyEngineer.USID = SAR_STAND_ITEMS.duty_engineer and
tsdutyEngineer.valid_flag=0
and tsdutyEngineer.DISABLE_FLAG=0)
left join TS_USER tsFo on (tsFo.USID = SAR_STAND_ITEMS.fo and tsFo.valid_flag=0
left join TS_USER tsFo on (tsFo.USID = SAR_STAND_ITEMS.fo and tsFo.valid_flag=0
and tsFo.DISABLE_FLAG=0)
where 1=1
<if test="fileType != null" >
<if test="fileType != null">
and SAR_STAND_ITEMS.file_type = #{fileType}
</if>
<if test="modifyTime != null" >
<if test="modifyTime != null">
and SAR_STAND_ITEMS.modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null" >
<if test="modifyTime1 != null">
and SAR_STAND_ITEMS.modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null" >
<if test="modifyTime2 != null">
and SAR_STAND_ITEMS.modify_time &lt;= #{modifyTime2}
</if>
<if test="creationTime != null" >
<if test="creationTime != null">
and SAR_STAND_ITEMS.creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null" >
<if test="creationTime1 != null">
and SAR_STAND_ITEMS.creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null" >
<if test="creationTime2 != null">
and SAR_STAND_ITEMS.creation_time &lt;= #{creationTime2}
</if>
<if test="creationUser != null" >
<if test="creationUser != null">
and SAR_STAND_ITEMS.creation_user ${creationUserOperator} #{creationUser}
</if>
<if test="validFlag != null" >
<if test="validFlag != null">
and SAR_STAND_ITEMS.valid_flag ${validFlagOperator} #{validFlag}
</if>
<if test="remarks != null" >
<if test="remarks != null">
and SAR_STAND_ITEMS.remarks ${remarksOperator} #{remarks}
</if>
<if test="responsibleUnit != null" >
<if test="responsibleUnit != null">
and SAR_STAND_ITEMS.responsible_unit = #{responsibleUnit}
</if>
<if test="energyKind != null" >
<if test="energyKind != null">
and SAR_STAND_ITEMS.energy_kind ${energyKindOperator} #{energyKind}
</if>
<if test="applyArctic != null" >
<if test="applyArctic != null">
and SAR_STAND_ITEMS.apply_arctic ${applyArcticOperator} #{applyArctic}
</if>
<if test="tackTime != null" >
<if test="tackTime != null">
and SAR_STAND_ITEMS.tack_time ${tackTimeOperator} #{tackTime}
</if>
<if test="tackTime1 != null" >
<if test="tackTime1 != null">
and SAR_STAND_ITEMS.tack_time &gt;= #{tackTime1}
</if>
<if test="tackTime2 != null" >
<if test="tackTime2 != null">
and SAR_STAND_ITEMS.tack_time &lt;= #{tackTime2}
</if>
<if test="parts != null" >
<if test="parts != null">
and SAR_STAND_ITEMS.parts like concat(concat('%', #{parts}),'%')
</if>
<if test="nameOrRequest != null" >
and (SAR_STAND_ITEMS.items_name like concat(concat('%', #{nameOrRequest}),'%') or SAR_STAND_ITEMS.TERMS_CONDITIONS like concat(concat('%', #{nameOrRequest}),'%'))
<if test="nameOrRequest != null">
and (SAR_STAND_ITEMS.items_name like concat(concat('%', #{nameOrRequest}),'%') or
SAR_STAND_ITEMS.TERMS_CONDITIONS like concat(concat('%', #{nameOrRequest}),'%'))
</if>
<if test="itemsName != null" >
<if test="itemsName != null">
and SAR_STAND_ITEMS.items_name ${itemsNameOperator} #{itemsName}
</if>
<if test="itemsNum != null" >
<if test="itemsNum != null">
and SAR_STAND_ITEMS.items_num ${itemsNumOperator} #{itemsNum}
</if>
<if test="standId != null" >
<if test="standId != null">
and SAR_STAND_ITEMS.stand_id ${standIdOperator} #{standId}
</if>
<if test="standNum != null" >
<if test="standNum != null">
and ((SAR_STANDARDS_INFO.STAND_SORT || ' ' || SAR_STANDARDS_INFO.STAND_NUMBER || '-' ||
SAR_STANDARDS_INFO.STAND_YEAR like concat(concat('%',#{standNum}),'%') and SAR_STANDARDS_INFO.STAND_YEAR is not null)
or (SAR_STANDARDS_INFO.STAND_SORT || ' ' || SAR_STANDARDS_INFO.STAND_NUMBER like concat(concat('%',#{standNum}),'%')
SAR_STANDARDS_INFO.STAND_YEAR like concat(concat('%',#{standNum}),'%') and SAR_STANDARDS_INFO.STAND_YEAR is
not null)
or (SAR_STANDARDS_INFO.STAND_SORT || ' ' || SAR_STANDARDS_INFO.STAND_NUMBER like
concat(concat('%',#{standNum}),'%')
and SAR_STANDARDS_INFO.STAND_YEAR is null))
</if>
<if test="id != null" >
<if test="id != null">
and SAR_STAND_ITEMS.id ${idOperator} #{id}
</if>
<if test="noId != null" >
<if test="noId != null">
and SAR_STAND_ITEMS.id != #{noId}
</if>
<if test="idlist != null">
@@ -480,10 +552,10 @@
#{item}
</foreach>
</if>
<if test='proType != null and proType == "process"' >
<if test='proType != null and proType == "process"'>
and (SAR_STAND_ITEMS.claim_type='L7N7EEDAPR' or SAR_STAND_ITEMS.claim_type='RENVECPFGT')
</if>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
<if test="pager.orderCondition != null and pager.orderCondition != ''">
${pager.orderCondition}
</if>
</select>
@@ -492,7 +564,7 @@
<select id="queryIdsByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
select SAR_STAND_ITEMS.id from SAR_STAND_ITEMS
<include refid="Base_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
<if test="pager.orderCondition != null and pager.orderCondition != ''">
${pager.orderCondition}
</if>
</select>
@@ -524,39 +596,39 @@
<update id="updateForeach" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" separator=";">
update SAR_STAND_ITEMS
<set >
<if test="item.svpps != null" >
<set>
<if test="item.svpps != null">
svpps = #{item.svpps},
</if>
<if test="item.fo != null" >
<if test="item.fo != null">
fo = #{item.fo},
</if>
<if test="item.fileType != null" >
<if test="item.fileType != null">
file_type = #{item.fileType},
</if>
<if test="item.modifyTime != null" >
<if test="item.modifyTime != null">
modify_time = #{item.modifyTime},
</if>
<if test="item.remarks != null" >
<if test="item.remarks != null">
remarks = #{item.remarks},
</if>
<if test="item.applyArctic != null" >
<if test="item.applyArctic != null">
apply_arctic = #{item.applyArctic},
</if>
<if test="item.itemsName != null" >
<if test="item.itemsName != null">
items_name = #{item.itemsName},
</if>
<if test="item.itemsNum != null" >
<if test="item.itemsNum != null">
items_num = #{item.itemsNum},
</if>
<if test="item.standId != null" >
<if test="item.standId != null">
stand_id = #{item.standId},
</if>
<if test="item.termsConditions != null" >
<if test="item.termsConditions != null">
TERMS_CONDITIONS = #{item.termsConditions,jdbcType=CLOB},
</if>
</set>
where id = #{item.id, jdbcType=VARCHAR}
where id = #{item.id, jdbcType=VARCHAR}
</foreach>
;
</update>
@@ -595,7 +667,6 @@
</select>
<select id="selectSvppsByStandId" parameterType="java.lang.String" resultType="java.lang.String">
select svpps from SAR_STAND_ITEMS
where valid_flag=0 and svpps != ''
@@ -613,7 +684,8 @@
</if>
</select>
<select id="selectAllItemsClaimType" resultType="com.adc.da.sys.common.SelectionResult" parameterType="com.adc.da.slrs.sarStandItems.entity.SarStandItems">
<select id="selectAllItemsClaimType" resultType="com.adc.da.sys.common.SelectionResult"
parameterType="com.adc.da.slrs.sarStandItems.entity.SarStandItems">
select stand_id as label,claim_type as value from SAR_STAND_ITEMS
where valid_flag = 0 and claim_type != ''
<if test="standId != null">
@@ -627,7 +699,8 @@
</if>
</select>
<select id="selectAllItemsSvpps" resultType="com.adc.da.sys.common.SelectionResult" parameterType="com.adc.da.slrs.sarStandItems.entity.SarStandItems">
<select id="selectAllItemsSvpps" resultType="com.adc.da.sys.common.SelectionResult"
parameterType="com.adc.da.slrs.sarStandItems.entity.SarStandItems">
select stand_id as label,svpps as value from SAR_STAND_ITEMS
where valid_flag = 0 and svpps != ''
<if test="standId != null">
@@ -643,14 +716,16 @@
<select id="selectAllItemsByIds" resultType="com.adc.da.slrs.sarStandItems.entity.SarStandItemsDto">
select ID,STAND_ID,ITEMS_NUM,ITEMS_NAME,RESPONSIBLE_UNIT,SVPPS,APPLY_ARCTIC,CLAIM_TYPE,BUS_STAND_COVER,DUTY_ENGINEER as responsibleEngineer
select
ID,STAND_ID,ITEMS_NUM,ITEMS_NAME,RESPONSIBLE_UNIT,SVPPS,APPLY_ARCTIC,CLAIM_TYPE,BUS_STAND_COVER,DUTY_ENGINEER as
responsibleEngineer
from SAR_STAND_ITEMS
where FILE_TYPE=#{type}
<if test="ids != null">
and STAND_ID in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and STAND_ID in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<select id="selectStandTime" resultType="com.adc.da.slrs.sarStandItems.entity.StandsTimeDto">