Merge branch 'develop_master' into FOTON

This commit is contained in:
super_liu
2021-12-28 16:58:23 +08:00
3 changed files with 227 additions and 82 deletions
@@ -6,6 +6,7 @@ import java.util.List;
import com.adc.da.base.page.BasePage;
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -90,12 +91,25 @@ public class EsRevisePlan extends BasePage {
private String area;
@ApiModelProperty(value = "标准范围")
private String areaName;
//企标类别
private String standType;
@ApiModelProperty(value = "企标类别")
private String qblb;
private String esMatingRelations;
private String esStandRelations;
@ApiModelProperty(value = "是否引用标准")
@TableField("is_relate")
private String isRelate;
private List<EsMatingRelation> esMatingRelations;
@ApiModelProperty(value = "采用程度")
@TableField("use_level")
private String useLevel;
private List<EsStandRelation> esStandRelations;
private String useLevelName;
@ApiModelProperty(value = "简述技术指标依据")
@TableField("technologic")
private String technologic;
}
@@ -63,8 +63,6 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
return "企标名称不能重复,请更换新的企标名称。";
}else {
esRevisePlanDao.updateOne(esRevisePlan);
esMatingRelationService.updateBatchById(esRevisePlan.getEsMatingRelations());
esStandRelationService.updateBatchById(esRevisePlan.getEsStandRelations());
return "操作成功";
}
}
@@ -77,16 +75,6 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
return "企标名称不能重复,请更换新的企标名称";
}else {
esRevisePlanDao.insertOne(esRevisePlan);
esRevisePlan.getEsMatingRelations().forEach(esMatingRelation -> {
esMatingRelation.setEsId(UUIDUtils.randomUUID(32));
esMatingRelation.setEsId(esRevisePlan.getId());
});
esRevisePlan.getEsStandRelations().forEach(esStandRelation -> {
esStandRelation.setEsId(esRevisePlan.getId());
esStandRelation.setId(UUIDUtils.randomUUID(32));
});
esMatingRelationService.saveBatch(esRevisePlan.getEsMatingRelations());
esStandRelationService.saveBatch(esRevisePlan.getEsStandRelations());
return "操作成功";
}
}
@@ -26,32 +26,11 @@
(select sar_bussioness_stand.STAND_CODE from sar_bussioness_stand where sar_bussioness_stand.ID = rqb_json )as rqbCode,
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
(SELECT GROUP_CONCAT(DICTIONARY_NAME) from ts_dictionary WHERE find_in_set(ts_dictionary.DICTIONARY_CODE,tsJson) ) as tsJsonName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,res_person) ) as res_personName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,wg_leader) ) as wg_leaderName
</sql>
<sql id="BaseInfoList">
id,
es_name,
plan_status,
revise_status,
drafter,
res_person,
wg_leader,
draft_time,
release_time,
unit,
rqb_json as rqbJson,
ts_json as tsJson,
area,
qblb,
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,res_person) ) as res_personName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,wg_leader) ) as wg_leaderName
</sql>
<resultMap id="BaseInfoMap" type="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan">
<id property="id" column="id"></id>
<result property="esName" column="es_name"></result>
@@ -66,9 +45,12 @@
<result property="area" column="area"></result>
<result property="rqbJson" column="rqb_json"></result>
<result property="tsJson" column="ts_json"></result>
<result property="qblb" column="qblb"></result>
<association property="esMatingRelations" javaType="java.util.List" column="id" select="com.adc.da.slrs.esMatingRelation.dao.EsMatingRelationDao.getDatas"/>
<association property="esStandRelations" javaType="java.util.List" column="id" select="com.adc.da.slrs.esStandRelation.dao.EsStandRelationDao.getDatas"/>
<result property="esMatingRelations" column="es_mating_relations"/>
<result property="esStandRelations" column="es_stand_relations"/>
<result property="isRelate" column="is_relate"/>
<result property="isRelate" column="is_relate"/>
<result property="useLevel" column="use_level"/>
<result property="technologic" column="technologic"/>
</resultMap>
<resultMap id="BaseInfoMapList" type="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan">
@@ -85,10 +67,13 @@
<result property="area" column="area"></result>
<result property="rqbJson" column="rqb_json"></result>
<result property="tsJson" column="ts_json"></result>
<result property="qblb" column="qblb"></result>
<!--<association property="esMatingRelations" javaType="java.util.List" column="id" select="com.adc.da.slrs.esMatingRelation.dao.EsMatingRelationDao.getDatas"/>-->
<!--<association property="esStandRelations" javaType="java.util.List" column="id" select="com.adc.da.slrs.esStandRelation.dao.EsStandRelationDao.getDatas"/>-->
</resultMap>
<result property="esMatingRelations" column="es_mating_relations"/>
<result property="esStandRelations" column="es_stand_relations"/>
<result property="isRelate" column="is_relate"/>
<result property="isRelate" column="is_relate"/>
<result property="useLevel" column="use_level"/>
<result property="technologic" column="technologic"/>
</resultMap>
<!-- 查询条件-->
<sql id="Conditions">
<where>
@@ -98,9 +83,6 @@
<if test="area != null and area != ''">
and area = #{area}
</if>
<if test="qblb != null and qblb != ''">
and qblb = #{qblb}
</if>
<if test="planStatus != null and planStatus != ''">
and plan_status = #{planStatus}
</if>
@@ -136,33 +118,36 @@
</select>
<!-- 查询所有-->
<select id="selectAll" resultMap="BaseInfoMapList" >
select <include refid="BaseInfoList"></include> from es_revise_plan
<include refid="pages">
</include>
</select>
<!-- 多条件查询-->
<select id="queryAll" parameterType="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan" resultMap="BaseInfoMapList">
select
id,
es_name,
plan_status,
revise_status,
drafter,
res_person,
wg_leader,
draft_time,
release_time,
unit,
rqb_json as rqbJson,
ts_json as tsJson,
area,
qblb,
es_revise_plan.id,
es_revise_plan.es_name,
es_revise_plan.plan_status,
es_revise_plan.revise_status,
es_revise_plan.drafter,
es_revise_plan.res_person,
es_revise_plan.wg_leader,
es_revise_plan.draft_time,
es_revise_plan.release_time,
es_revise_plan.unit,
es_revise_plan.rqb_json ,
es_revise_plan.ts_json ,
es_revise_plan.area,
es_revise_plan.es_mating_relations,
es_revise_plan.es_stand_relations,
es_revise_plan.is_relate,
es_revise_plan.use_level,
es_revise_plan.technologic,
sar_bussioness_stand.STAND_CODE as rqbName,
sar_bussioness_stand.STAND_SORT as standType,
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,use_level) ) as useLevelName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,res_person) ) as res_personName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,wg_leader) ) as wg_leaderName
from es_revise_plan
left join sar_bussioness_stand on sar_bussioness_stand.ID = es_revise_plan.rqb_json
<where>
<if test="esName != null and esName != ''">
and es_name like concat('%',#{esName},'%')
@@ -170,8 +155,72 @@
<if test="area != null and area != ''">
and area = #{area}
</if>
<if test="qblb != null and qblb != ''">
and qblb = #{qblb}
<if test="planStatus != null and planStatus != ''">
and plan_status = #{planStatus}
</if>
<if test="reviseStatus != null and reviseStatus != ''">
and revise_status = #{reviseStatus}
</if>
<if test="drafter != null and drafter != ''">
and drafter = #{drafter}
</if>
<if test="resPerson != null and resPerson != ''">
and res_person = #{resPerson}
</if>
<if test="wgLeader != null and wgLeader != ''">
and wg_leader = #{wgLeader}
</if>
<if test="draftTime != null">
and DATE_FORMAT(draft_time,'%Y-%m-%d')=DATE_FORMAT(#{draftTime},'%Y-%m-%d')
</if>
<if test="releaseTime != null">
and DATE_FORMAT(release_time,'%Y-%m-%d')=DATE_FORMAT(#{releaseTime},'%Y-%m-%d')
</if>
<if test="unit != null and unit != ''">
and (select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) like concat('%',#{unit},'%')
</if>
</where>
<include refid="pages">
</include>
</select>
<!-- 多条件查询-->
<select id="queryAll" parameterType="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan" resultMap="BaseInfoMapList">
select
es_revise_plan.id,
es_revise_plan.es_name,
es_revise_plan.plan_status,
es_revise_plan.revise_status,
es_revise_plan.drafter,
es_revise_plan.res_person,
es_revise_plan.wg_leader,
es_revise_plan.draft_time,
es_revise_plan.release_time,
es_revise_plan.unit,
es_revise_plan.rqb_json ,
es_revise_plan.ts_json ,
es_revise_plan.area,
es_revise_plan.es_mating_relations,
es_revise_plan.es_stand_relations,
es_revise_plan.is_relate,
es_revise_plan.use_level,
es_revise_plan.technologic,
sar_bussioness_stand.STAND_CODE as rqbName,
sar_bussioness_stand.STAND_SORT as standType,
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,use_level) ) as useLevelName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,res_person) ) as res_personName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,wg_leader) ) as wg_leaderName
from es_revise_plan
left join sar_bussioness_stand on sar_bussioness_stand.ID = es_revise_plan.rqb_json
<where>
<if test="esName != null and esName != ''">
and es_name like concat('%',#{esName},'%')
</if>
<if test="area != null and area != ''">
and area = #{area}
</if>
<if test="planStatus != null and planStatus != ''">
and plan_status = #{planStatus}
@@ -203,8 +252,37 @@
</select>
<!-- 查询详情-->
<select id="selectOne" parameterType="java.lang.String" resultMap="BaseInfoMap">
select <include refid="BaseInfo"></include> from es_revise_plan
where id = #{id}
select
es_revise_plan.id,
es_revise_plan.es_name,
es_revise_plan.plan_status,
es_revise_plan.revise_status,
es_revise_plan.drafter,
es_revise_plan.res_person,
es_revise_plan.wg_leader,
es_revise_plan.draft_time,
es_revise_plan.release_time,
es_revise_plan.unit,
es_revise_plan.rqb_json ,
es_revise_plan.ts_json ,
es_revise_plan.area,
es_revise_plan.es_mating_relations,
es_revise_plan.es_stand_relations,
es_revise_plan.is_relate,
es_revise_plan.use_level,
es_revise_plan.technologic,
sar_bussioness_stand.STAND_CODE as rqbName,
sar_bussioness_stand.STAND_SORT as standType,
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,use_level) ) as useLevelName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,res_person) ) as res_personName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,wg_leader) ) as wg_leaderName
from es_revise_plan
left join sar_bussioness_stand on sar_bussioness_stand.ID = es_revise_plan.rqb_json
where es_revise_plan.id = #{id}
</select>
<!-- 修改-->
<update id="updateOne" parameterType="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan">
@@ -241,16 +319,28 @@
unit = #{unit},
</if>
<if test="rqbJson != null and rqbJson != ''">
rqb_json=#{rqbJson}
rqb_json=#{rqbJson},
</if>
<if test="tsJson != null and tsJson != ''">
ts_json=#{tsJson}
ts_json=#{tsJson},
</if>
<if test="area != null and area != ''">
area=#{area}
area=#{area},
</if>
<if test="qblb != null and qblb != ''">
qblb=#{qblb}
<if test="esMatingRelations != null and esMatingRelations != ''">
es_mating_relations=#{esMatingRelations},
</if>
<if test="esStandRelations != null and esStandRelations != ''">
es_stand_relations=#{esStandRelations},
</if>
<if test="isRelate != null and isRelate != ''">
is_relate=#{isRelate},
</if>
<if test="useLevel != null and useLevel != ''">
use_level=#{useLevel},
</if>
<if test="technologic != null and technologic != ''">
technologic=#{technologic},
</if>
</set>
where id = #{id}
@@ -298,8 +388,20 @@
<if test="area != null and area != ''">
area,
</if>
<if test="qblb != null and qblb != ''">
qblb,
<if test="esMatingRelations != null and esMatingRelations != ''">
es_mating_relations,
</if>
<if test="esStandRelations != null and esStandRelations != ''">
es_stand_relations,
</if>
<if test="isRelate != null and isRelate != ''">
is_relate,
</if>
<if test="useLevel != null and useLevel != ''">
use_level,
</if>
<if test="technologic != null and technologic != ''">
technologic,
</if>
</trim>
values
@@ -343,8 +445,20 @@
<if test="area != null and area != ''">
#{area},
</if>
<if test="qblb != null and qblb != ''">
#{qblb},
<if test="esMatingRelations != null and esMatingRelations != ''">
#{esMatingRelations},
</if>
<if test="esStandRelations != null and esStandRelations != ''">
#{esStandRelations},
</if>
<if test="isRelate != null and isRelate != ''">
#{isRelate},
</if>
<if test="useLevel != null and useLevel != ''">
#{useLevel},
</if>
<if test="technologic != null and technologic != ''">
#{technologic},
</if>
</trim>
</insert>
@@ -361,10 +475,39 @@
</delete>
<select id="selectPageByName" resultMap="BaseInfoMap">
select <include refid="BaseInfo"></include> from es_revise_plan
select
es_revise_plan.id,
es_revise_plan.es_name,
es_revise_plan.plan_status,
es_revise_plan.revise_status,
es_revise_plan.drafter,
es_revise_plan.res_person,
es_revise_plan.wg_leader,
es_revise_plan.draft_time,
es_revise_plan.release_time,
es_revise_plan.unit,
es_revise_plan.rqb_json ,
es_revise_plan.ts_json ,
es_revise_plan.area,
es_revise_plan.es_mating_relations,
es_revise_plan.es_stand_relations,
es_revise_plan.is_relate,
es_revise_plan.use_level,
es_revise_plan.technologic,
sar_bussioness_stand.STAND_CODE as rqbName,
sar_bussioness_stand.STAND_SORT as standType,
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,use_level) ) as useLevelName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,res_person) ) as res_personName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,wg_leader) ) as wg_leaderName
from es_revise_plan
left join sar_bussioness_stand on sar_bussioness_stand.ID = es_revise_plan.rqb_json
where es_name = #{esName}
<if test="id != null and id != '' ">
and id != #{id}
and es_revise_plan.id != #{id}
</if>
</select>
</mapper>