|
@@ -49,7 +49,6 @@ 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;
|
|
@@ -836,10 +835,13 @@ public class ArchiveTreeContractServiceImpl extends BaseServiceImpl<ArchiveTreeC
|
|
|
}
|
|
|
|
|
|
for (ArchiveTreeContractVO2 child: trees) {
|
|
|
+ Long contractId1 = 0L;
|
|
|
if (child.getContractId() != null ) {
|
|
|
- contractId = child.getContractId();
|
|
|
- }
|
|
|
- ContractInfo contractInfo = contractMap.get(contractId);
|
|
|
+ contractId1 = child.getContractId();
|
|
|
+ }else {
|
|
|
+ contractId1 = contractId;
|
|
|
+ }
|
|
|
+ ContractInfo contractInfo = contractMap.get(contractId1);
|
|
|
if (contractInfo != null) {
|
|
|
fillDefaultArchiveAutoInfo(child,contractInfo);
|
|
|
}
|
|
@@ -857,14 +859,9 @@ 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());
|
|
|
-// }
|
|
|
- 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.getStorageTime()) && contractInfo.getStoragePeriod() != null) {
|
|
|
+ node.setStorageTime(contractInfo.getStoragePeriod().toString());
|
|
|
+ }
|
|
|
if (StringUtils.isEmpty(node.getRollor())) {
|
|
|
node.setRollor(contractInfo.getFiler());
|
|
|
}
|