提交分解单列表,增加筛选条件-根据国内外标准筛选 修改一个bug,拆分解单提交功能,报错后不让入库操作

This commit is contained in:
duanwenbin
2021-07-19 09:32:23 +08:00
parent e80e585f9e
commit a2be968da5
6 changed files with 57 additions and 4 deletions
@@ -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