fix: 通用编辑接口报错
This commit is contained in:
+39
-91
@@ -3,18 +3,22 @@
|
||||
<mapper namespace="com.jero.modules.laws.common.mapper.LawsCommonMapper">
|
||||
|
||||
<select id="getFieldList" resultType="com.jero.modules.tag.entity.LawsTag">
|
||||
SELECT * FROM laws_tag tag
|
||||
LEFT JOIN laws_area area ON tag.show_area = area.id
|
||||
WHERE tag.table_name = #{tableName} AND tag.del_flag = 0
|
||||
SELECT *
|
||||
FROM laws_tag tag
|
||||
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
|
||||
</select>
|
||||
|
||||
<select id="getCommonPage" resultType="java.util.Map">
|
||||
SELECT ${field} FROM ${table} ${condition}
|
||||
SELECT ${field}
|
||||
FROM ${table} ${condition}
|
||||
</select>
|
||||
|
||||
<insert id="commonAdd">
|
||||
INSERT INTO ${tableName} (${fields}) VALUES (${values})
|
||||
INSERT INTO ${tableName} (${fields})
|
||||
VALUES (${values})
|
||||
</insert>
|
||||
|
||||
<select id="getByIdAndModule" resultType="java.util.Map">
|
||||
@@ -50,7 +54,8 @@
|
||||
<select id="getManyStandardSelectionBox"
|
||||
resultType="com.jero.modules.laws.common.vo.ManyStandardSelectionBox">
|
||||
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
|
||||
(SELECT id, standard_number, standard_name, implementation_date, standard_state, '1' AS source, create_time
|
||||
FROM laws_domestic_standard
|
||||
@@ -65,31 +70,32 @@
|
||||
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 NULL
|
||||
AND split.split_status = '2'
|
||||
</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>
|
||||
<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 NULL
|
||||
AND split.split_status = '2'
|
||||
</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>
|
||||
<if test="vo.releaseSplitFlag != null and vo.releaseSplitFlag != ''">
|
||||
GROUP BY id
|
||||
@@ -98,7 +104,7 @@
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
<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
|
||||
WHERE del_flag = 0
|
||||
<if test="standardNumber != null and standardNumber != ''">
|
||||
@@ -110,19 +116,7 @@
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT id, standard_number, standard_name, release_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
|
||||
SELECT id, standard_number, standard_name, release_date, implementation_date, standard_state
|
||||
FROM laws_enterprise_standard
|
||||
WHERE del_flag = 0
|
||||
<if test="standardNumber != null and standardNumber != ''">
|
||||
@@ -133,50 +127,4 @@
|
||||
</if>
|
||||
</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>
|
||||
|
||||
-14
@@ -1363,20 +1363,6 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
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);
|
||||
|
||||
if (module.equals(TableNameEnum.ENTERPRISE_STANDARDS.getValue())) {
|
||||
|
||||
Reference in New Issue
Block a user