|
@@ -31,15 +31,17 @@ import org.springblade.manager.mapper.FormulaMapper;
|
|
import org.springblade.manager.service.*;
|
|
import org.springblade.manager.service.*;
|
|
import org.springblade.manager.vo.AppWbsTreeContractVO;
|
|
import org.springblade.manager.vo.AppWbsTreeContractVO;
|
|
import org.springblade.manager.vo.CurrentNode;
|
|
import org.springblade.manager.vo.CurrentNode;
|
|
|
|
+import org.springframework.context.annotation.Scope;
|
|
|
|
+import org.springframework.context.annotation.ScopedProxyMode;
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.web.context.WebApplicationContext;
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
import java.io.FileInputStream;
|
|
import java.io.FileInputStream;
|
|
import java.io.FileNotFoundException;
|
|
import java.io.FileNotFoundException;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
-import java.util.concurrent.atomic.AtomicReference;
|
|
|
|
import java.util.regex.Matcher;
|
|
import java.util.regex.Matcher;
|
|
import java.util.regex.Pattern;
|
|
import java.util.regex.Pattern;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@@ -53,6 +55,7 @@ import java.util.stream.Stream;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
|
|
+@Scope(value = WebApplicationContext.SCOPE_REQUEST, proxyMode = ScopedProxyMode.TARGET_CLASS)
|
|
public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula> implements IFormulaService {
|
|
public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula> implements IFormulaService {
|
|
|
|
|
|
private final IWbsParamService wpService;
|
|
private final IWbsParamService wpService;
|
|
@@ -759,7 +762,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
if(this.summary.size()>0){
|
|
if(this.summary.size()>0){
|
|
/**/
|
|
/**/
|
|
this.constantMap.put(CHECK_ITEMS,this.checkItems.stream().filter(fdTmp->fdTmp.getValues().stream().map(ElementData::getValue).anyMatch(e->StringUtils.isNotEmpty(e)&&StringUtils.isNotEquals("/",e))).map(FormData::getEName).map(FormulaUtils::parseItemName).distinct().collect(Collectors.joining(",")));
|
|
this.constantMap.put(CHECK_ITEMS,this.checkItems.stream().filter(fdTmp->fdTmp.getValues().stream().map(ElementData::getValue).anyMatch(e->StringUtils.isNotEmpty(e)&&StringUtils.isNotEquals("/",e))).map(FormData::getEName).map(FormulaUtils::parseItemName).distinct().collect(Collectors.joining(",")));
|
|
- this.constantMap.put("CKD",this.checkDate.stream().flatMap(k->k.getValues().stream()).map(ElementData::stringValue).map(DateTime::new).reduce((a, b) -> Comparator.<DateTime>reverseOrder().compare(a, b) <= 0 ? a : b).orElse(null));
|
|
|
|
|
|
+ this.constantMap.put("CKD",this.checkDate.stream().flatMap(k->k.getValues().stream()).map(ElementData::stringValue).reduce((a, b) -> Comparator.<DateTime>reverseOrder().compare(new DateTime(a), new DateTime(b)) <= 0 ? a : b).orElse(null));
|
|
this.summary.forEach(e->{
|
|
this.summary.forEach(e->{
|
|
/*处理脚本*/
|
|
/*处理脚本*/
|
|
e.getFormula().setFormula(e.getFormula().getNumber());
|
|
e.getFormula().setFormula(e.getFormula().getNumber());
|