提交分解单列表,增加筛选条件-根据国内外标准筛选 修改一个bug,拆分解单提交功能,报错后不让入库操作
This commit is contained in:
+33
-1
@@ -88,8 +88,40 @@ public class ActSarItemsEOService {
|
|||||||
@Value("${elas.flag}")
|
@Value("${elas.flag}")
|
||||||
private boolean elasflag;
|
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
|
* @Author: yangxuenan
|
||||||
* @Date: 2020/12/7 13:48
|
* @Date: 2020/12/7 13:48
|
||||||
* @Param: [standJson]
|
* @Param: [standJson]
|
||||||
|
|||||||
+4
@@ -3,6 +3,7 @@ package com.adc.da.slrs.standardSplit.controller;
|
|||||||
import com.adc.da.att.service.IAttFileEOService;
|
import com.adc.da.att.service.IAttFileEOService;
|
||||||
import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
import com.adc.da.http.PageInfo;
|
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.SarStandFileEO;
|
||||||
import com.adc.da.slrs.standardSplit.entity.SarStandFileEOPage;
|
import com.adc.da.slrs.standardSplit.entity.SarStandFileEOPage;
|
||||||
import com.adc.da.slrs.standardSplit.service.SarStandAttrDetailsEOService;
|
import com.adc.da.slrs.standardSplit.service.SarStandAttrDetailsEOService;
|
||||||
@@ -118,6 +119,9 @@ public class SarStandFileEOController extends BaseController<SarStandFileEO> {
|
|||||||
page.setFileSuffixList(suffix.split(","));
|
page.setFileSuffixList(suffix.split(","));
|
||||||
}
|
}
|
||||||
List<SarStandFileEO> rows = sarStandFileEOService.getStandFileListByPage(page);
|
List<SarStandFileEO> rows = sarStandFileEOService.getStandFileListByPage(page);
|
||||||
|
for (SarStandFileEO one:rows) {
|
||||||
|
one.setAttId(one.getAttId1());
|
||||||
|
}
|
||||||
if (rows != null && !rows.isEmpty()) {
|
if (rows != null && !rows.isEmpty()) {
|
||||||
for (SarStandFileEO sarStandFileEO : rows) {
|
for (SarStandFileEO sarStandFileEO : rows) {
|
||||||
List<SelectionResult> getField = sarStandAttrDetailsEOService.selectFileFieldForSel(sarStandFileEO.getStandFileClassify());
|
List<SelectionResult> getField = sarStandAttrDetailsEOService.selectFileFieldForSel(sarStandFileEO.getStandFileClassify());
|
||||||
|
|||||||
@@ -21,6 +21,16 @@ public class SarStandFileEO extends BaseEntity {
|
|||||||
private String validFlag;
|
private String validFlag;
|
||||||
private String useModel;
|
private String useModel;
|
||||||
private String attId;
|
private String attId;
|
||||||
|
|
||||||
|
public String getAttId1() {
|
||||||
|
return attId1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttId1(String attId1) {
|
||||||
|
this.attId1 = attId1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String attId1;
|
||||||
private String resId;
|
private String resId;
|
||||||
private String standId;
|
private String standId;
|
||||||
private String id;
|
private String id;
|
||||||
|
|||||||
+5
-2
@@ -37,9 +37,9 @@ import java.util.regex.Matcher;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import com.adc.da.person.dao.PersonShareEODao;
|
import com.adc.da.person.dao.PersonShareEODao;
|
||||||
import com.adc.da.person.dao.PersonCollectEODao;
|
import com.adc.da.person.dao.PersonCollectEODao;
|
||||||
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
|
||||||
public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService {
|
public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitInfoEOServiceImpl.class);
|
private static final Logger logger = LoggerFactory.getLogger(SarFileSplitInfoEOServiceImpl.class);
|
||||||
|
|
||||||
@@ -104,6 +104,7 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public int fileAplit(SarFileSplitInfoEO sarFileSplitInfoEO){
|
public int fileAplit(SarFileSplitInfoEO sarFileSplitInfoEO){
|
||||||
// 拆分文件主表中插入数据
|
// 拆分文件主表中插入数据
|
||||||
sarFileSplitInfoEO.setId(UUIDUtils.randomUUID20());
|
sarFileSplitInfoEO.setId(UUIDUtils.randomUUID20());
|
||||||
@@ -135,7 +136,8 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
AttFileEO attFileEO = attFileEOService.getFileInfo(sarFileSplitInfoEO.getAttId());
|
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文档所在路径。
|
InputStream is = new FileInputStream(readFilePath); //需要将文件路更改为word文档所在路径。
|
||||||
XWPFDocument doc = new XWPFDocument(is);
|
XWPFDocument doc = new XWPFDocument(is);
|
||||||
@@ -317,6 +319,7 @@ public class SarFileSplitInfoEOServiceImpl implements SarFileSplitInfoEOService
|
|||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(treeList.size()>0 && messageList.size() > 0){
|
if(treeList.size()>0 && messageList.size() > 0){
|
||||||
|
|||||||
+3
@@ -263,6 +263,9 @@
|
|||||||
<if test="standId != null and standId != ''">
|
<if test="standId != null and standId != ''">
|
||||||
and SAR_FILE_SPLIT_INFO.stand_id = #{standId}
|
and SAR_FILE_SPLIT_INFO.stand_id = #{standId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="sarType != null and sarType != ''">
|
||||||
|
and SAR_TYPE = #{sarType}
|
||||||
|
</if>
|
||||||
<if test="id != null and id != ''">
|
<if test="id != null and id != ''">
|
||||||
and SAR_FILE_SPLIT_INFO.id = #{id}
|
and SAR_FILE_SPLIT_INFO.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
+2
-1
@@ -20,6 +20,7 @@
|
|||||||
<result column="standNumber" property="standNumber" />
|
<result column="standNumber" property="standNumber" />
|
||||||
<result column="standName" property="standName" />
|
<result column="standName" property="standName" />
|
||||||
<result column="sarType" property="sarType" />
|
<result column="sarType" property="sarType" />
|
||||||
|
<result column="attId1" property="attId1" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- SAR_STAND_FILE table all fields -->
|
<!-- 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)
|
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||||
) ) AS standNumber,
|
) ) AS standNumber,
|
||||||
SAR_STANDARDS_INFO.stand_name as standName,
|
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
|
SAR_STANDARDS_INFO.STAND_TYPE as sarType
|
||||||
FROM
|
FROM
|
||||||
SAR_STAND_FILE
|
SAR_STAND_FILE
|
||||||
|
|||||||
Reference in New Issue
Block a user