Merge remote-tracking branch 'origin/develop_3' into develop_1
This commit is contained in:
@@ -3,7 +3,6 @@ package com.adc.da.slrs.sarResource.dao;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -20,6 +19,4 @@ public interface TsResourceDao extends BaseMapper<TsResource> {
|
||||
|
||||
List<TsResource> selectMenuByRole(TsResource sarMenuEO);
|
||||
|
||||
int insertTsRoleResource(HashMap<String,Object> map);
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -28,6 +28,8 @@ public interface SarStandAttrInfoDao extends BaseMapper<SarStandAttrInfo> {
|
||||
|
||||
Map<String, Object> selectStandFieldAndData(@Param("fieldInfo") String fieldInfo, @Param("standId") String standId);
|
||||
|
||||
List<Map<String, Object>> selectStandFieldAndDataListMap(@Param("fieldInfo") String fieldInfo, @Param("ids") List<String> ids);
|
||||
|
||||
int insertStandAttr(@Param("fieldInfo") String fieldInfo, @Param("fieldValue") String fieldValue);
|
||||
|
||||
int deleteStandAttrByStandId(@Param("standId") String standId);
|
||||
|
||||
+1
-3
@@ -151,9 +151,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
page.setAdvanceSearchStr(null);
|
||||
}
|
||||
}
|
||||
if(page.getUserId() == null || page.getUserId().equals("")){
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPage(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
+8
@@ -94,6 +94,14 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
@TableField("REPLACED_STAND_NUM")
|
||||
private String replacedStandNum;
|
||||
|
||||
@ApiModelProperty(value = "代替部分标准号")
|
||||
@TableField("REPLACE_PART_STAND_NUM")
|
||||
private String replacePartStandNum;
|
||||
|
||||
@ApiModelProperty(value = "被代替部分标准号")
|
||||
@TableField("REPLACED_PART_STAND_NUM")
|
||||
private String replacedPartStandNum;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
|
||||
+2
@@ -17,6 +17,8 @@ import java.util.Map;
|
||||
*/
|
||||
public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
|
||||
|
||||
void reverseQueryStand(List<String> ids, String standName,String type);
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception;
|
||||
|
||||
void createSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception;
|
||||
|
||||
+71
-6
@@ -9,7 +9,6 @@ import com.adc.da.http.Result;
|
||||
import com.adc.da.mq.service.CreateStandMQService;
|
||||
import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import com.adc.da.person.dao.PersonShareEODao;
|
||||
import com.adc.da.person.entity.PersonMsgEO;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.search.service.StandLawsSearchService;
|
||||
import com.adc.da.slrs.sarLawsInfo.entity.SarLawsInfo;
|
||||
@@ -40,7 +39,6 @@ import com.adc.da.slrs.sarStandPutTime.entity.SarStandPutTime;
|
||||
import com.adc.da.slrs.sarStandVal.dao.SarStandValDao;
|
||||
import com.adc.da.slrs.sarStandVal.entity.SarStandVal;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.*;
|
||||
import com.adc.da.slrs.sarMenu.service.ISarMenuService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
||||
@@ -73,15 +71,24 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.beans.BeanInfo;
|
||||
import java.beans.IntrospectionException;
|
||||
import java.beans.Introspector;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.sql.Clob;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -187,6 +194,60 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Autowired
|
||||
private StandLawsSearchService standLawsSearchService;
|
||||
|
||||
/**
|
||||
* 反向操作标准
|
||||
*/
|
||||
@Override
|
||||
@Async
|
||||
public void reverseQueryStand(List<String> ids, String standName,String type){
|
||||
String fieldInfo = InitStandAttrUtil.queryField;
|
||||
if (StringUtils.isNotBlank(fieldInfo) && StringUtils.isNotBlank(type)) {
|
||||
List<Map<String, Object>> getAttrListMap = sarStandAttrInfoEODao.selectStandFieldAndDataListMap(fieldInfo, ids);
|
||||
getAttrListMap.forEach(attrMap -> {
|
||||
List<String> list = Collections.singletonList(attrMap.get(type).toString());
|
||||
list.add(standName);
|
||||
String reverseStandName = list.stream().map(String::toString).collect(Collectors.joining(","));
|
||||
attrMap.put(type,reverseStandName);
|
||||
SarStandAttrInfo sarStandAttrInfo = map2Object(attrMap,SarStandAttrInfo.class);
|
||||
sarStandAttrInfoEODao.updateById(sarStandAttrInfo);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T map2Object(Map<String, Object> map, Class<T> clazz) {
|
||||
|
||||
T obj = null;
|
||||
try {
|
||||
BeanInfo bean = Introspector.getBeanInfo(clazz);
|
||||
PropertyDescriptor[] propertyDescriptorArr = bean.getPropertyDescriptors();
|
||||
for (int i = 0; i < propertyDescriptorArr.length; i++) {
|
||||
PropertyDescriptor propertyDescriptor = propertyDescriptorArr[i];
|
||||
String name = propertyDescriptor.getName();
|
||||
if(map.containsKey(name)) {
|
||||
Object value = map.get(name);
|
||||
if("null".equals(value)) {
|
||||
value = null;
|
||||
}
|
||||
Object[] objArr = new Object[0];
|
||||
objArr[0] = value;
|
||||
try {
|
||||
propertyDescriptor.getWriteMethod().invoke(obj, objArr);
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} catch (IntrospectionException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* @Description: 分页查询
|
||||
@@ -448,8 +509,8 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
//编写预警信息
|
||||
// writeWarnings(sarStandardsInfoEO);
|
||||
// updateCiteStand(sarStandardsInfoEO, null, "DTBJH", "BDTBZBH");
|
||||
// updateCiteStand(sarStandardsInfoEO, null, "YYBJ", "BYYBJ");
|
||||
updateCiteStand(sarStandardsInfoEO, null, "YYBJ", "BYYBJ");
|
||||
updateCiteStand(sarStandardsInfoEO, null, "BFDTBZ", "BBFDTBZ");
|
||||
// updateRelateStand(sarStandardsInfoEO, "CBBH");
|
||||
// 根据代替标准号修改被代替的标准的状态 修改为已修订状态
|
||||
replaseStandState(sarStandardsInfoEO);
|
||||
@@ -502,6 +563,8 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
sarStandardsInfoEO.setRelateStand(attrValue);
|
||||
} else if ("DTBJH".equals(attrKey)) {
|
||||
sarStandardsInfoEO.setReplaceStandNum(attrValue);
|
||||
}else if ("BFDTBZ".equals(attrKey)) {
|
||||
sarStandardsInfoEO.setReplacePartStandNum(attrValue);
|
||||
}
|
||||
// 多选项,文件类型需要单独处理 向子表添加数据
|
||||
if (InitStandAttrUtil.selectionFieldList.contains(attrKey)) {
|
||||
@@ -718,6 +781,8 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
newCiteStand = sarStandardsInfoEO.getRelateStand();
|
||||
} else if ("DTBJH".equals(upField)) {
|
||||
newCiteStand = sarStandardsInfoEO.getReplaceStandNum();
|
||||
}else if ("BFDTBZ".equals(upField)) {
|
||||
newCiteStand = sarStandardsInfoEO.getReplacePartStandNum();
|
||||
}
|
||||
if (StringUtils.isNotEmpty(newCiteStand) && newCiteStand.split(",").length > 0) {
|
||||
// 主要逻辑处理新增的
|
||||
@@ -1016,8 +1081,8 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
//修改标准过程中,重新修改代替标准号对应的标准的被代替标准号
|
||||
// updateReplacedNumber(sarStandardsInfoEO,beforeSarStandardsInfo);
|
||||
// 根据引用标准修改其他被引用标准
|
||||
// updateCiteStand(sarStandardsInfoEO, beforeSarStandardsInfo, "DTBJH", "BDTBZBH");
|
||||
// updateCiteStand(sarStandardsInfoEO, beforeSarStandardsInfo, "YYBJ", "BYYBJ");
|
||||
updateCiteStand(sarStandardsInfoEO, null, "YYBJ", "BYYBJ");
|
||||
updateCiteStand(sarStandardsInfoEO, null, "BFDTBZ", "BBFDTBZ");
|
||||
// 根据对应其他标准修改其他对应其他标准
|
||||
// updateRelateStand(sarStandardsInfoEO, "CBBH");
|
||||
// 根据代替标准号修改被代替的标准的状态 修改为已修订状态
|
||||
|
||||
+11
@@ -197,6 +197,17 @@
|
||||
WHERE valid_flag=0 and stand_id = #{standId, jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<!-- 查询字段及对应数据 List<Map>-->
|
||||
<select id="selectStandFieldAndDataListMap" resultType="Map">
|
||||
SELECT ${fieldInfo},ID
|
||||
FROM SAR_STAND_ATTR_INFO
|
||||
WHERE valid_flag=0
|
||||
and stand_id in
|
||||
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item, jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<insert id="insertStandAttr" parameterType="java.lang.String" >
|
||||
insert into SAR_STAND_ATTR_INFO(${fieldInfo})
|
||||
values (${fieldValue})
|
||||
|
||||
+1
-1
@@ -395,7 +395,7 @@
|
||||
<if test="country != null and country != ''">
|
||||
and country = #{country}
|
||||
</if>
|
||||
<!-- 标准编号 -->
|
||||
<!-- 标准编号111 -->
|
||||
<if test="standNumber != null and standNumber != ''">
|
||||
and (
|
||||
(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
|
||||
@@ -276,14 +276,13 @@ public class AttFileEOController {
|
||||
TsUser tsUser = userDao.selectById(userId);
|
||||
if (tsUser != null) {
|
||||
userMsg = tsUser.getUname() + ",";
|
||||
//2021/7/28水印内容取消工号
|
||||
// if (StringUtils.isNotEmpty(tsUser.getWorkNum())) {
|
||||
// userMsg += tsUser.getWorkNum() + ",";
|
||||
// }
|
||||
if (StringUtils.isNotEmpty(tsUser.getWorkNum())) {
|
||||
userMsg += tsUser.getWorkNum() + ",";
|
||||
}
|
||||
}
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm");//设置日期格式
|
||||
String date = df.format(new Date());
|
||||
String waterContent = userMsg+date ;
|
||||
String waterContent = userMsg + date;
|
||||
//2020年9月5日 去掉水印处理
|
||||
//2021年7月25日要求下载生成水印
|
||||
WaterMarkUtil.waterMark(oldFilePath,waterFilePath,waterContent);
|
||||
|
||||
@@ -26,7 +26,14 @@
|
||||
<!--分页显示A-->
|
||||
<sql id="Base_Column_ListPageA">
|
||||
TS_DICTYPE.id,TS_DICTYPE.parent_id, TS_DICTYPE.dic_type_code, TS_DICTYPE.dic_type_name, TS_DICTYPE.dic_id,
|
||||
TS_DICTYPE.valid_flag,TS_DICTYPE.creation_time,TS_DICTYPE.modify_time,TS_DICTYPE.describes,TS_DICTYPE.show_index,tree_pid
|
||||
TS_DICTYPE.valid_flag,TS_DICTYPE.creation_time,TS_DICTYPE.modify_time,TS_DICTYPE.describes,TS_DICTYPE.show_index,
|
||||
tree_pid
|
||||
</sql>
|
||||
|
||||
<!--分页显示A-->
|
||||
<sql id="Base_Column_ListPageNewA">
|
||||
TS_DICTYPE.id,TS_DICTYPE.parent_id, TS_DICTYPE.dic_type_code, TS_DICTYPE.dic_type_name, TS_DICTYPE.dic_id,
|
||||
TS_DICTYPE.valid_flag,TS_DICTYPE.creation_time,TS_DICTYPE.modify_time,TS_DICTYPE.describes,(@rownum :=@rownum + 1) AS rownum,TS_DICTYPE.show_index,tree_pid
|
||||
</sql>
|
||||
|
||||
<!--分页显示B-->
|
||||
@@ -34,6 +41,11 @@
|
||||
a.id,a.parent_id, a.dic_type_code, a.dic_type_name, a.dic_id,a.valid_flag,a.creation_time,a.modify_time,a.describes,a.show_index
|
||||
</sql>
|
||||
|
||||
<!--分页显示B-->
|
||||
<sql id="Base_Column_ListPageNewB">
|
||||
a.id,a.parent_id, a.dic_type_code, a.dic_type_name, a.dic_id,a.valid_flag,a.creation_time,a.modify_time,a.rownum,a.describes,a.show_index
|
||||
</sql>
|
||||
|
||||
<sql id="Dic_Type_List">
|
||||
u.*, ur.id as type_id,
|
||||
ur.dic_type_code as dic_type_code,
|
||||
@@ -294,19 +306,20 @@
|
||||
<!-- 查询TS_DICTYPE列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select
|
||||
<include refid="Base_Column_ListPageB"/>
|
||||
<include refid="Base_Column_ListPageNewB"/>
|
||||
from
|
||||
(select tmp_tb.* , rownum rn from
|
||||
(select tmp_tb.* from
|
||||
(select
|
||||
<include refid="Base_Column_ListPageA"/>
|
||||
<include refid="Base_Column_ListPageNewA"/>
|
||||
from TS_DICTYPE
|
||||
LEFT JOIN TS_DICTIONARY td ON td.id = TS_DICTYPE.dic_id
|
||||
,(SELECT @rownum := 0) b
|
||||
<include refid="Base_Where_ClausePage"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''">
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb where rownum <= ${pager.endIndex}) a
|
||||
where rn >= ${pager.startIndex}
|
||||
) tmp_tb where tmp_tb.rownum <= ${pager.endIndex}) a
|
||||
where a.rownum >= ${pager.startIndex}
|
||||
ORDER BY a.show_index
|
||||
</select>
|
||||
<!-- TS_DICTYPE 列表总数 -->
|
||||
|
||||
Reference in New Issue
Block a user