fix: 通用编辑接口报错
This commit is contained in:
+39
-91
@@ -3,18 +3,22 @@
|
|||||||
<mapper namespace="com.jero.modules.laws.common.mapper.LawsCommonMapper">
|
<mapper namespace="com.jero.modules.laws.common.mapper.LawsCommonMapper">
|
||||||
|
|
||||||
<select id="getFieldList" resultType="com.jero.modules.tag.entity.LawsTag">
|
<select id="getFieldList" resultType="com.jero.modules.tag.entity.LawsTag">
|
||||||
SELECT * FROM laws_tag tag
|
SELECT *
|
||||||
LEFT JOIN laws_area area ON tag.show_area = area.id
|
FROM laws_tag tag
|
||||||
WHERE tag.table_name = #{tableName} AND tag.del_flag = 0
|
LEFT JOIN laws_area area ON tag.show_area = area.id
|
||||||
|
WHERE tag.table_name = #{tableName}
|
||||||
|
AND tag.del_flag = 0
|
||||||
ORDER BY area.sort ASC, tag.order_num ASC, tag.create_time ASC
|
ORDER BY area.sort ASC, tag.order_num ASC, tag.create_time ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCommonPage" resultType="java.util.Map">
|
<select id="getCommonPage" resultType="java.util.Map">
|
||||||
SELECT ${field} FROM ${table} ${condition}
|
SELECT ${field}
|
||||||
|
FROM ${table} ${condition}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="commonAdd">
|
<insert id="commonAdd">
|
||||||
INSERT INTO ${tableName} (${fields}) VALUES (${values})
|
INSERT INTO ${tableName} (${fields})
|
||||||
|
VALUES (${values})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="getByIdAndModule" resultType="java.util.Map">
|
<select id="getByIdAndModule" resultType="java.util.Map">
|
||||||
@@ -50,7 +54,8 @@
|
|||||||
<select id="getManyStandardSelectionBox"
|
<select id="getManyStandardSelectionBox"
|
||||||
resultType="com.jero.modules.laws.common.vo.ManyStandardSelectionBox">
|
resultType="com.jero.modules.laws.common.vo.ManyStandardSelectionBox">
|
||||||
select * from (
|
select * from (
|
||||||
SELECT standard.id, standard.standard_number, standard.standard_name, standard.implementation_date, standard.standard_state, standard.source, standard.create_time
|
SELECT standard.id, standard.standard_number, standard.standard_name, standard.implementation_date,
|
||||||
|
standard.standard_state, standard.source, standard.create_time
|
||||||
FROM
|
FROM
|
||||||
(SELECT id, standard_number, standard_name, implementation_date, standard_state, '1' AS source, create_time
|
(SELECT id, standard_number, standard_name, implementation_date, standard_state, '1' AS source, create_time
|
||||||
FROM laws_domestic_standard
|
FROM laws_domestic_standard
|
||||||
@@ -65,31 +70,32 @@
|
|||||||
RIGHT JOIN sar_file_split_info split ON split.standard_id = standard.id
|
RIGHT JOIN sar_file_split_info split ON split.standard_id = standard.id
|
||||||
</if>
|
</if>
|
||||||
<where>
|
<where>
|
||||||
<if test="vo.releaseSplitFlag != null and vo.releaseSplitFlag != ''">
|
<if test="vo.releaseSplitFlag != null and vo.releaseSplitFlag != ''">
|
||||||
AND standard.id IS NOT NULL
|
AND standard.id IS NOT NULL
|
||||||
AND split.del_flag = 0
|
AND split.del_flag = 0
|
||||||
AND split.publish_before_id IS NULL
|
AND split.publish_before_id IS NULL
|
||||||
AND split.split_status = '2'
|
AND split.split_status = '2'
|
||||||
</if>
|
</if>
|
||||||
<if test="vo.source != null and vo.source != ''">
|
<if test="vo.source != null and vo.source != ''">
|
||||||
AND standard.source LIKE CONCAT('%', #{vo.source}, '%')
|
AND standard.source LIKE CONCAT('%', #{vo.source}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="vo.standardState != null and vo.standardState != ''">
|
<if test="vo.standardState != null and vo.standardState != ''">
|
||||||
AND #{vo.standardState} LIKE CONCAT('%', standard.standard_state, '%')
|
AND #{vo.standardState} LIKE CONCAT('%', standard.standard_state, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="vo.standardNumberOrName != null and vo.standardNumberOrName != ''">
|
<if test="vo.standardNumberOrName != null and vo.standardNumberOrName != ''">
|
||||||
AND (standard_number LIKE CONCAT('%', #{vo.standardNumberOrName}, '%') OR
|
AND (standard_number LIKE CONCAT('%', #{vo.standardNumberOrName}, '%') OR
|
||||||
standard_name LIKE CONCAT('%', #{vo.standardNumberOrName}, '%'))
|
standard_name LIKE CONCAT('%', #{vo.standardNumberOrName}, '%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="vo.nodeCode != null and vo.nodeCode != ''">
|
<if test="vo.nodeCode != null and vo.nodeCode != ''">
|
||||||
AND id not in (select unique_relation_flag from laws_node_relation where node_code = #{vo.nodeCode})
|
AND id not in (select unique_relation_flag from laws_node_relation where node_code = #{vo.nodeCode})
|
||||||
</if>
|
</if>
|
||||||
<if test="vo.excludeStandardNumbers != null and vo.excludeStandardNumbers != ''">
|
<if test="vo.excludeStandardNumbers != null and vo.excludeStandardNumbers != ''">
|
||||||
AND
|
AND
|
||||||
<foreach collection="vo.excludeStandardNumbers.split(',')" item="item" separator="and" open="(" close=")">
|
<foreach collection="vo.excludeStandardNumbers.split(',')" item="item" separator="and" open="("
|
||||||
standard_number <> #{item}
|
close=")">
|
||||||
</foreach>
|
standard_number <> #{item}
|
||||||
</if>
|
</foreach>
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
<if test="vo.releaseSplitFlag != null and vo.releaseSplitFlag != ''">
|
<if test="vo.releaseSplitFlag != null and vo.releaseSplitFlag != ''">
|
||||||
GROUP BY id
|
GROUP BY id
|
||||||
@@ -98,7 +104,7 @@
|
|||||||
ORDER BY create_time DESC
|
ORDER BY create_time DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="getSingleStandard" resultType="com.jero.modules.laws.common.vo.ManyStandardSelectionBox">
|
<select id="getSingleStandard" resultType="com.jero.modules.laws.common.vo.ManyStandardSelectionBox">
|
||||||
SELECT id, standard_number, standard_name, release_date, standard_state
|
SELECT id, standard_number, standard_name, null as release_date, implementation_date, standard_state
|
||||||
FROM laws_domestic_standard
|
FROM laws_domestic_standard
|
||||||
WHERE del_flag = 0
|
WHERE del_flag = 0
|
||||||
<if test="standardNumber != null and standardNumber != ''">
|
<if test="standardNumber != null and standardNumber != ''">
|
||||||
@@ -110,19 +116,7 @@
|
|||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
||||||
SELECT id, standard_number, standard_name, release_date, standard_state
|
SELECT id, standard_number, standard_name, release_date, implementation_date, standard_state
|
||||||
FROM laws_overseas_standard
|
|
||||||
WHERE del_flag = 0
|
|
||||||
<if test="standardNumber != null and standardNumber != ''">
|
|
||||||
AND standard_number = #{standardNumber}
|
|
||||||
</if>
|
|
||||||
<if test="id != null and id != ''">
|
|
||||||
AND id = #{id}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
|
|
||||||
SELECT id, standard_number, standard_name, release_date, standard_state
|
|
||||||
FROM laws_enterprise_standard
|
FROM laws_enterprise_standard
|
||||||
WHERE del_flag = 0
|
WHERE del_flag = 0
|
||||||
<if test="standardNumber != null and standardNumber != ''">
|
<if test="standardNumber != null and standardNumber != ''">
|
||||||
@@ -133,50 +127,4 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- <select id="getStandardSelectionVO"-->
|
|
||||||
<!-- resultType="com.jero.modules.activiti.process.projectstandard.vo.StandardSelectionVO">-->
|
|
||||||
<!-- SELECT *-->
|
|
||||||
<!-- FROM-->
|
|
||||||
<!-- (SELECT id, standard_number, standard_name, release_date, standard_state, on_the_production_date, new_model_implementation_date, '1' AS source, create_time-->
|
|
||||||
<!-- FROM laws_domestic_standard-->
|
|
||||||
<!-- WHERE del_flag = 0-->
|
|
||||||
|
|
||||||
<!-- UNION ALL-->
|
|
||||||
|
|
||||||
<!-- SELECT id, standard_number, standard_name, release_date, standard_state, on_the_production_date, new_model_implementation_date, '2' AS source, create_time-->
|
|
||||||
<!-- FROM laws_overseas_standard-->
|
|
||||||
<!-- WHERE del_flag = 0-->
|
|
||||||
<!-- ) standard-->
|
|
||||||
<!-- <if test="vo.releaseSplitFlag != null and vo.releaseSplitFlag != ''">-->
|
|
||||||
<!-- RIGHT JOIN sar_file_split_info split ON split.standard_id = standard.id-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- <where>-->
|
|
||||||
<!-- <if test="vo.releaseSplitFlag != null and vo.releaseSplitFlag != ''">-->
|
|
||||||
<!-- AND standard.id IS NOT NULL-->
|
|
||||||
<!-- AND split.del_flag = 0-->
|
|
||||||
<!-- AND split.publish_before_id IS NOT NULL AND split.publish_before_id != ''-->
|
|
||||||
<!-- AND split.file_type IS NOT NULL AND split.file_type != ''-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- <if test="vo.source != null and vo.source != ''">-->
|
|
||||||
<!-- AND standard.source LIKE CONCAT('%', #{vo.source}, '%')-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- <if test="vo.standardState != null and vo.standardState != ''">-->
|
|
||||||
<!-- AND #{vo.standardState} LIKE CONCAT('%', standard.standard_state, '%')-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- <if test="vo.standardNumberOrName != null and vo.standardNumberOrName != ''">-->
|
|
||||||
<!-- AND (standard_number LIKE CONCAT('%', #{vo.standardNumberOrName}, '%') OR-->
|
|
||||||
<!-- standard_name LIKE CONCAT('%', #{vo.standardNumberOrName}, '%'))-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- <if test="vo.nodeCode != null and vo.nodeCode != ''">-->
|
|
||||||
<!-- AND id not in (select unique_relation_flag from laws_node_relation where node_code = #{vo.nodeCode})-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- <if test="vo.excludeStandardNumbers != null and vo.excludeStandardNumbers != ''">-->
|
|
||||||
<!-- AND-->
|
|
||||||
<!-- <foreach collection="vo.excludeStandardNumbers.split(',')" item="item" separator="and" open="(" close=")">-->
|
|
||||||
<!-- standard_number <> #{item}-->
|
|
||||||
<!-- </foreach>-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- </where>-->
|
|
||||||
<!-- ORDER BY standard.create_time DESC-->
|
|
||||||
<!-- </select>-->
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
-14
@@ -1363,20 +1363,6 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
throw new JeroBootException(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
|
throw new JeroBootException(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 企标独有的授权部门
|
|
||||||
LambdaQueryWrapper<EnterpriseStandardAuthDept> authDeptWrapper = new LambdaQueryWrapper<>();
|
|
||||||
authDeptWrapper.eq(EnterpriseStandardAuthDept::getStandardId, id);
|
|
||||||
authDeptWrapper.isNull((EnterpriseStandardAuthDept::getAuthExpireDate));
|
|
||||||
List<EnterpriseStandardAuthDept> authDeptList = enterpriseAuthDeptService.list(authDeptWrapper);
|
|
||||||
|
|
||||||
// 将authDeptList的所有auth_dept取出来转换成逗号拼接的字符串
|
|
||||||
if (module.equals(TableNameEnum.ENTERPRISE_STANDARDS.getValue()) ||
|
|
||||||
module.equals(TableNameEnum.FOREIGN_REGULATIONS.getValue())) {
|
|
||||||
String authDept = authDeptList.stream().map(EnterpriseStandardAuthDept::getAuthDept)
|
|
||||||
.collect(Collectors.joining(","));
|
|
||||||
initMap.put(FieldCommon.AUTH_DEPT, authDept);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, Object> stringObjectMap = processResultMap(initMap, fieldList);
|
Map<String, Object> stringObjectMap = processResultMap(initMap, fieldList);
|
||||||
|
|
||||||
if (module.equals(TableNameEnum.ENTERPRISE_STANDARDS.getValue())) {
|
if (module.equals(TableNameEnum.ENTERPRISE_STANDARDS.getValue())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user