Merge remote-tracking branch 'origin/develop_master' into develop_master

This commit is contained in:
yuezhihang
2021-07-19 14:14:17 +08:00
10 changed files with 87 additions and 9 deletions
@@ -88,8 +88,40 @@ public class ActSarItemsEOService {
@Value("${elas.flag}")
private boolean elasflag;
/**
* 标准解读流程入库"
* @param standJson
* @throws Exception
*/
public void createStandardRead(String standJson) throws Exception{
JSONObject object = JSONObject.parseObject(standJson);
String fileName = object.getString("fileName");
String fileType = object.getString("fileType");
String creationTime = object.getString("creationTime");
String creationUser = object.getString("creationUser");
String standId = object.getString("standId");
//数组去重
JSONArray responUserList1 = object.getJSONArray("itemList");
for (Object obj:responUserList1) {
JSONObject object1 = (JSONObject) obj;
JSONArray preResponUserList = object1.getJSONArray("zxUserId");
String oldNumber = object1.getString("oldNumber");
String itemsNum = object1.getString("itemsNum");
String itemsName = object1.getString("itemsName");
String itemsTitle = object1.getString("itemsTitle");
String applyArcticId = object1.getString("applyArcticId");
String applyArctic = object1.getString("applyArctic");
String changePoint = object1.getString("changePoint");
String technicalRequir = object1.getString("technicalRequir");
String onlineData = object1.getString("onlineData");
String newData = object1.getString("newData");
String complianceRequir = object1.getString("complianceRequir");
String complianceState = object1.getString("complianceState");
}
}
/***
* @Description: 标准入库流程数据保存
* @Description: 标准解读流程入库"
* @Author: yangxuenan
* @Date: 2020/12/7 13:48
* @Param: [standJson]
@@ -18,7 +18,7 @@ application.center=1
#Eruept
eureka.client.allow-redirects=true
eureka.client.register-with-eureka=true
eureka.client.service-url.defaultZone=http://192.168.10.47:8761/eureka/
eureka.client.service-url.defaultZone=http://101.36.227.25:8761/eureka/
#==============================================
# 邮箱配置1
@@ -39,7 +39,7 @@ eureka.client.fetch-registry=true
#eureka.client.service-url.defaultZone=http://127.0.0.1:8671/eureka/
#eureka.client.service-url.defaultZone=http://10.5.116.172:8672/eureka/
eureka.client.service-url.defaultZone=http://192.168.10.47:8761/eureka/
eureka.client.service-url.defaultZone=http://101.36.227.25:8761/eureka/
# 请求连接的超时时间 默认的时间为 1 秒
ribbon.ConnectTimeout=500000
@@ -187,8 +187,8 @@ public class SarStandAttrInfo extends BaseEntity {
private String sycpx;
@ApiModelProperty(value = "适用认证")
@TableField("SYZD")
private String syzd;
@TableField("SYRZ")
private String syrz;
@ApiModelProperty(value = "责任工程师")
@TableField("ZRGCS")
@@ -316,6 +316,31 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
return resultMap;
}
public void attrInfoShowDetails(List<SarStandardsInfo> sarlist) throws Exception {
for (SarStandardsInfo row : sarlist) {
attrInfoDetails(row);
Map<String, Object> getAttrMap = row.getAttrInfoMap();
if (getAttrMap != null && getAttrMap.size() > 0) {
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
String name = entry.getKey();
String value = "";
if (entry.getValue() != null && InitStandAttrUtil.fileFieldList != null && InitStandAttrUtil.fileFieldList.size() > 0 && InitStandAttrUtil.fileFieldList.contains(name)) {
value = entry.getValue().toString();
if (StringUtils.isNotBlank(value)) {
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
entry.setValue(fileObj);
}
}else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
value = entry.getValue().toString();
List<String> valArr = Arrays.asList(value.split(","));
value = dicTypeEODao.getDicNamesByCodes(valArr);
entry.setValue(value);
}
}
}
}
}
public void attrInfoShow(List<SarStandardsInfo> sarlist) throws Exception {
for (SarStandardsInfo row : sarlist) {
attrInfoDetails(row);
@@ -1826,7 +1851,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
if (resultlist.size() > 0) {
List<SarStandardsInfo> sarStandardsInfoEOList = new ArrayList<>();
sarStandardsInfoEOList.add(resultlist.get(0));
attrInfoShow(sarStandardsInfoEOList);
attrInfoShowDetails(sarStandardsInfoEOList);
sarStandardsInfoEO = sarStandardsInfoEOList.get(0);
}
// 查询纳入清单的国家地区
@@ -3,6 +3,7 @@ package com.adc.da.slrs.standardSplit.controller;
import com.adc.da.att.service.IAttFileEOService;
import com.adc.da.base.web.BaseController;
import com.adc.da.http.PageInfo;
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO;
import com.adc.da.slrs.standardSplit.entity.SarStandFileEO;
import com.adc.da.slrs.standardSplit.entity.SarStandFileEOPage;
import com.adc.da.slrs.standardSplit.service.SarStandAttrDetailsEOService;
@@ -118,6 +119,9 @@ public class SarStandFileEOController extends BaseController<SarStandFileEO> {
page.setFileSuffixList(suffix.split(","));
}
List<SarStandFileEO> rows = sarStandFileEOService.getStandFileListByPage(page);
for (SarStandFileEO one:rows) {
one.setAttId(one.getAttId1());
}
if (rows != null && !rows.isEmpty()) {
for (SarStandFileEO sarStandFileEO : rows) {
List<SelectionResult> getField = sarStandAttrDetailsEOService.selectFileFieldForSel(sarStandFileEO.getStandFileClassify());
@@ -21,6 +21,16 @@ public class SarStandFileEO extends BaseEntity {
private String validFlag;
private String useModel;
private String attId;
public String getAttId1() {
return attId1;
}
public void setAttId1(String attId1) {
this.attId1 = attId1;
}
private String attId1;
private String resId;
private String standId;
private String id;
@@ -37,9 +37,9 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.adc.da.person.dao.PersonShareEODao;
import com.adc.da.person.dao.PersonCollectEODao;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
@Service
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService {
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitInfoEOServiceImpl.class);
@@ -104,6 +104,7 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
}
@Override
@Transactional
public int fileAplit(SarFileSplitInfoEO sarFileSplitInfoEO){
// 拆分文件主表中插入数据
sarFileSplitInfoEO.setId(UUIDUtils.randomUUID20());
@@ -135,7 +136,8 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
}
try {
AttFileEO attFileEO = attFileEOService.getFileInfo(sarFileSplitInfoEO.getAttId());
String readFilePath = filePath + "/" + attFileEO.getFilePath() + attFileEO.getFileName();
//String readFilePath = filePath + "/" + attFileEO.getFilePath() + attFileEO.getFileName();
String readFilePath = filePath + attFileEO.getFilePath() + attFileEO.getFileName();
InputStream is = new FileInputStream(readFilePath); //需要将文件路更改为word文档所在路径。
XWPFDocument doc = new XWPFDocument(is);
@@ -317,6 +319,7 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
} catch (Exception e) {
e.printStackTrace();
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return -1;
}
if(treeList.size()>0 && messageList.size() > 0){
@@ -263,6 +263,9 @@
<if test="standId != null and standId != ''">
and SAR_FILE_SPLIT_INFO.stand_id = #{standId}
</if>
<if test="sarType != null and sarType != ''">
and SAR_TYPE = #{sarType}
</if>
<if test="id != null and id != ''">
and SAR_FILE_SPLIT_INFO.id = #{id}
</if>
@@ -20,6 +20,7 @@
<result column="standNumber" property="standNumber" />
<result column="standName" property="standName" />
<result column="sarType" property="sarType" />
<result column="attId1" property="attId1" />
</resultMap>
<!-- SAR_STAND_FILE table all fields -->
@@ -278,7 +279,7 @@
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
) ) AS standNumber,
SAR_STANDARDS_INFO.stand_name as standName,
SAR_STAND_FILE.att_id AS attId,
SAR_STAND_FILE.att_id AS attId1,
SAR_STANDARDS_INFO.STAND_TYPE as sarType
FROM
SAR_STAND_FILE