|
@@ -49,6 +49,7 @@ import org.springblade.manager.mapper.ArchiveTreeContractMapper;
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
+import org.springframework.jdbc.core.SingleColumnRowMapper;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -820,7 +821,7 @@ public class ArchiveTreeContractServiceImpl extends BaseServiceImpl<ArchiveTreeC
|
|
|
* @param trees
|
|
|
* @param projectId
|
|
|
*/
|
|
|
- public void fillDefaultArchiveAutoInfo(List<ArchiveTreeContractVO2> trees,Long projectId){
|
|
|
+ public void fillDefaultArchiveAutoInfo(List<ArchiveTreeContractVO2> trees,Long projectId,Long contractId){
|
|
|
|
|
|
List<ContractInfo> contractInfos = contractInfoService.selectContractInfoPageByPid(projectId.toString());
|
|
|
if (contractInfos == null || contractInfos.size() == 0) {
|
|
@@ -835,7 +836,6 @@ public class ArchiveTreeContractServiceImpl extends BaseServiceImpl<ArchiveTreeC
|
|
|
}
|
|
|
|
|
|
for (ArchiveTreeContractVO2 child: trees) {
|
|
|
- Long contractId = 0L;
|
|
|
if (child.getContractId() != null ) {
|
|
|
contractId = child.getContractId();
|
|
|
}
|
|
@@ -857,9 +857,14 @@ public class ArchiveTreeContractServiceImpl extends BaseServiceImpl<ArchiveTreeC
|
|
|
if (StringUtils.isEmpty(node.getFileNumberPrefix())) {
|
|
|
node.setFileNumberPrefix(contractInfo.getPrefix());
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(node.getStorageTime()) && contractInfo.getStoragePeriod() != null) {
|
|
|
- node.setStorageTime(contractInfo.getStoragePeriod().toString());
|
|
|
- }
|
|
|
+// if (StringUtils.isEmpty(node.getStorageTime()) && contractInfo.getStoragePeriod() != null) {
|
|
|
+// node.setStorageTime(contractInfo.getStoragePeriod().toString());
|
|
|
+// }
|
|
|
+ String sql="select storage_time from m_archive_tree where id="+node.getFromId();
|
|
|
+ List<String> list = jdbcTemplate.query(sql, new SingleColumnRowMapper<>(String.class));
|
|
|
+ if (StringUtils.isEmpty(node.getStorageTime()) && !list.isEmpty()) {
|
|
|
+ node.setStorageTime(list.get(0));
|
|
|
+ }
|
|
|
if (StringUtils.isEmpty(node.getRollor())) {
|
|
|
node.setRollor(contractInfo.getFiler());
|
|
|
}
|