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
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,
SAR_STAND_ITEMS.claim_type,SAR_STAND_ITEMS.bus_stand_cover,SAR_STAND_ITEMS.file_type,SAR_STAND_ITEMS.fo
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
and tsdutyEngineer.DISABLE_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
and SAR_STAND_ITEMS.file_type = #{fileType}
and SAR_STAND_ITEMS.modify_time ${modifyTimeOperator} #{modifyTime}
and SAR_STAND_ITEMS.modify_time >= #{modifyTime1}
and SAR_STAND_ITEMS.modify_time <= #{modifyTime2}
and SAR_STAND_ITEMS.creation_time ${creationTimeOperator} #{creationTime}
and SAR_STAND_ITEMS.creation_time >= #{creationTime1}
and SAR_STAND_ITEMS.creation_time <= #{creationTime2}
and SAR_STAND_ITEMS.creation_user ${creationUserOperator} #{creationUser}
and SAR_STAND_ITEMS.valid_flag ${validFlagOperator} #{validFlag}
and SAR_STAND_ITEMS.remarks ${remarksOperator} #{remarks}
and SAR_STAND_ITEMS.responsible_unit = #{responsibleUnit}
and SAR_STAND_ITEMS.energy_kind ${energyKindOperator} #{energyKind}
and SAR_STAND_ITEMS.apply_arctic ${applyArcticOperator} #{applyArctic}
and SAR_STAND_ITEMS.tack_time ${tackTimeOperator} #{tackTime}
and SAR_STAND_ITEMS.tack_time >= #{tackTime1}
and SAR_STAND_ITEMS.tack_time <= #{tackTime2}
and SAR_STAND_ITEMS.parts like concat(concat('%', #{parts}),'%')
and (SAR_STAND_ITEMS.items_name like concat(concat('%', #{nameOrRequest}),'%') or
SAR_STAND_ITEMS.TERMS_CONDITIONS like concat(concat('%', #{nameOrRequest}),'%'))
and SAR_STAND_ITEMS.items_name ${itemsNameOperator} #{itemsName}
and SAR_STAND_ITEMS.items_num ${itemsNumOperator} #{itemsNum}
and SAR_STAND_ITEMS.stand_id ${standIdOperator} #{standId}
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}),'%')
and SAR_STANDARDS_INFO.STAND_YEAR is null))
and SAR_STAND_ITEMS.id ${idOperator} #{id}
and SAR_STAND_ITEMS.id != #{noId}
and SAR_PRODUCT_SAR_STATE.product_id = #{productId}
and SAR_STAND_ITEMS.id in
#{item}
and (SAR_STAND_ITEMS.claim_type='L7N7EEDAPR' or SAR_STAND_ITEMS.claim_type='RENVECPFGT')
insert into SAR_STAND_ITEMS
modify_time,
creation_time,
creation_user,
valid_flag,
remarks,
responsible_unit,
energy_kind,
apply_arctic,
tack_time,
parts,
items_name,
items_num,
stand_id,
id,
MAINPOINTS_IMPEMENTATION,
TERMS_CONDITIONS,
fo,
duty_engineer,
svpps,
claim_type,
bus_stand_cover,
file_type
#{modifyTime, jdbcType=TIMESTAMP},
#{creationTime, jdbcType=TIMESTAMP},
#{creationUser, jdbcType=VARCHAR},
#{validFlag, jdbcType=INTEGER},
#{remarks, jdbcType=VARCHAR},
#{responsibleUnit, jdbcType=VARCHAR},
#{energyKind, jdbcType=VARCHAR},
#{applyArctic, jdbcType=VARCHAR},
#{tackTime, jdbcType=TIMESTAMP},
#{parts, jdbcType=VARCHAR},
#{itemsName, jdbcType=VARCHAR},
#{itemsNum, jdbcType=VARCHAR},
#{standId, jdbcType=VARCHAR},
#{id, jdbcType=VARCHAR},
#{mainPointImplementation,jdbcType=VARCHAR},
#{termsConditions,jdbcType=CLOB},
#{fo, jdbcType=VARCHAR},
#{dutyEngineer, jdbcType=VARCHAR},
#{svpps, jdbcType=VARCHAR},
#{claimType, jdbcType=VARCHAR},
#{busStandCover, jdbcType=VARCHAR},
#{fileType, jdbcType=VARCHAR}
update SAR_STAND_ITEMS
set modify_time = #{modifyTime},
creation_time = #{creationTime},
creation_user = #{creationUser},
valid_flag = #{validFlag},
remarks = #{remarks},
responsible_unit = #{responsibleUnit},
energy_kind = #{energyKind},
apply_arctic = #{applyArctic},
tack_time = #{tackTime},
parts = #{parts},
items_name = #{itemsName},
items_num = #{itemsNum},
stand_id = #{standId}
where id = #{id}
update SAR_STAND_ITEMS
modify_time = #{modifyTime},
creation_time = #{creationTime},
creation_user = #{creationUser},
valid_flag = #{validFlag},
remarks = #{remarks},
responsible_unit = #{responsibleUnit},
energy_kind = #{energyKind},
apply_arctic = #{applyArctic},
tack_time = #{tackTime},
tack_time = null,
parts = #{parts},
items_name = #{itemsName},
items_num = #{itemsNum},
stand_id = #{standId},
MAINPOINTS_IMPEMENTATION = #{mainPointImplementation},
TERMS_CONDITIONS = #{termsConditions,jdbcType=CLOB},
fo = #{fo},
duty_engineer = #{dutyEngineer},
svpps = #{svpps},
claim_type = #{claimType},
bus_stand_cover = #{busStandCover},
where id = #{id}
delete from SAR_STAND_ITEMS
where id = #{value}
and stand_id=#{standId}
and file_type=#{fileType}
and ITEMS_NAME like CONCAT('%', #{itemsName},'%')
and XCXSSRQ=#{XCXSSRQ}
and ZCCSSRQ=#{ZCCSSRQ}
insert into SAR_STAND_ITEMS(svpps,fo,file_type,modify_time,creation_time,creation_user,valid_flag,apply_arctic,
items_name,items_num,stand_id,id,terms_conditions,responsible_unit,duty_engineer)
values
(#{item.svpps, jdbcType=VARCHAR},
#{item.fo, jdbcType=VARCHAR},
#{item.fileType, jdbcType=VARCHAR},
#{item.modifyTime, jdbcType=DATE},
#{item.creationTime, jdbcType=DATE},
#{item.creationUser, jdbcType=VARCHAR},
#{item.validFlag, jdbcType=INTEGER},
#{item.applyArctic, jdbcType=VARCHAR},
#{item.itemsName, jdbcType=VARCHAR},
#{item.itemsNum, jdbcType=VARCHAR},
#{item.standId, jdbcType=VARCHAR},
#{item.id, jdbcType=VARCHAR},
#{item.termsConditions,jdbcType=VARCHAR},
#{item.responsibleUnit,jdbcType=VARCHAR},
#{item.dutyEngineer,jdbcType=VARCHAR}
)
update SAR_STAND_ITEMS
svpps = #{item.svpps},
fo = #{item.fo},
file_type = #{item.fileType},
modify_time = #{item.modifyTime},
remarks = #{item.remarks},
apply_arctic = #{item.applyArctic},
items_name = #{item.itemsName},
items_num = #{item.itemsNum},
stand_id = #{item.standId},
TERMS_CONDITIONS = #{item.termsConditions,jdbcType=CLOB},
where id = #{item.id, jdbcType=VARCHAR}
;
delete from SAR_STAND_ITEMS
where stand_id = #{standId}
and file_type = #{fileType}
delete from SAR_STAND_ITEMS
where id in
#{item}