|
@@ -16,12 +16,14 @@ import org.springblade.manager.mapper.TextdictInfoMapper;
|
|
|
import org.springblade.manager.mapper.WbsTreeContractMapper;
|
|
|
import org.springblade.manager.mapper.WbsTreePrivateMapper;
|
|
|
import org.springblade.manager.mapper.WbsTreeSynchronousRecordMapper;
|
|
|
+import org.springblade.manager.service.WbsTreeContractExtendService;
|
|
|
import org.springblade.manager.service.WbsTreeContractOldHtmlService;
|
|
|
import org.springblade.manager.utils.FileUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.nio.file.Files;
|
|
|
import java.nio.file.Path;
|
|
|
import java.nio.file.StandardCopyOption;
|
|
@@ -57,6 +59,9 @@ public class WbsSynchronousEViSaServiceImpl {
|
|
|
@Autowired
|
|
|
private ExcelTabClient excelTabClient;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private WbsTreeContractExtendService wbsTreeContractExtendService;
|
|
|
+
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void updateTextDictInfo(Long projectId, List<Long> editPrivateIds, List<TextdictInfo> addData) {
|
|
|
//删除 需要新增的节点的电签和默认值
|
|
@@ -196,14 +201,24 @@ public class WbsSynchronousEViSaServiceImpl {
|
|
|
wbsTreeContractMapper.updateSortByPId(pId, wbsTreePrivate.getSort());
|
|
|
}
|
|
|
}
|
|
|
+ //添加合同段同步记录
|
|
|
+ List<WbsTreeContractExtend> wbsTreeContractExtends = new ArrayList<>();
|
|
|
|
|
|
for (WbsTreeContract treeContract : list) {
|
|
|
treeContract.setUpdateTime(DateTime.now());
|
|
|
treeContract.setUpdateUser(createUserId);
|
|
|
-// wbsTreeContractMapper.updateById(treeContract);
|
|
|
+
|
|
|
+ WbsTreeContractExtend wbsTreeContractExtend = new WbsTreeContractExtend();
|
|
|
+ wbsTreeContractExtend.setPKeyId(treeContract.getPKeyId());
|
|
|
+ wbsTreeContractExtend.setIsSync(1);
|
|
|
+ wbsTreeContractExtend.setSyncTime(DateTime.now());
|
|
|
+ wbsTreeContractExtends.add(wbsTreeContractExtend);
|
|
|
}
|
|
|
wbsTreeContractService.updateBatchById(list);
|
|
|
|
|
|
+ //添加合同段同步记录
|
|
|
+ wbsTreeContractExtendService.saveOrUpdateBatch(wbsTreeContractExtends);
|
|
|
+
|
|
|
//排序调整
|
|
|
if (type.contains("7")) {
|
|
|
//获取节点下的当前表单
|
|
@@ -315,6 +330,19 @@ public class WbsSynchronousEViSaServiceImpl {
|
|
|
wbsTreeContractMapper.updateSortByPId(pId, wbsTreePrivate.getSort());
|
|
|
}
|
|
|
}
|
|
|
+ //添加合同段同步记录
|
|
|
+ List<Long> collect1 = list.stream().map(WbsTreeContract::getPKeyId).collect(Collectors.toList());
|
|
|
+ List<WbsTreeContractExtend> wbsTreeContractExtends = new ArrayList<>();
|
|
|
+ for (Long pKeyId : collect1) {
|
|
|
+ WbsTreeContractExtend wbsTreeContractExtend = new WbsTreeContractExtend();
|
|
|
+ wbsTreeContractExtend.setPKeyId(pKeyId);
|
|
|
+ wbsTreeContractExtend.setIsSync(1);
|
|
|
+ wbsTreeContractExtend.setSyncTime(DateTime.now());
|
|
|
+ wbsTreeContractExtends.add(wbsTreeContractExtend);
|
|
|
+ }
|
|
|
+ wbsTreeContractExtendService.saveOrUpdateBatch(wbsTreeContractExtends);
|
|
|
+
|
|
|
+
|
|
|
|
|
|
//单个批次一个事务,只会回滚当前批次数据
|
|
|
Integer i = wbsTreeContractMapper.insertBatchSomeColumn(list);
|