|
@@ -1887,8 +1887,9 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
|
|
|
@Override
|
|
|
public WbsTreePrivate getOriginWtp(Long pkeyId) {
|
|
|
- if(pkeyId!=-4) {
|
|
|
- WbsTreePrivate wtp = this.wbsTreePrivateMapper.selectOne(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getPKeyId, pkeyId).last(" limit 1"));
|
|
|
+ WbsTreePrivate wtp;
|
|
|
+ if(pkeyId!=-4) {
|
|
|
+ wtp = this.wbsTreePrivateMapper.selectOne(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getPKeyId, pkeyId).last(" limit 1"));
|
|
|
int i = 10;
|
|
|
WbsTreePrivate publicWtp = wtp;
|
|
|
while (i > 0) {
|
|
@@ -1901,13 +1902,13 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
}
|
|
|
/*私有引用项目的wbsId其实是被复制的项目的根节点p_key_id,只有溯源才能找到真正的wbsId*/
|
|
|
wtp.setWbsId(publicWtp.getWbsId());
|
|
|
- return wtp;
|
|
|
- }else{
|
|
|
- WbsTreePrivate wtp = new WbsTreePrivate();
|
|
|
+ }else{
|
|
|
+ wtp = new WbsTreePrivate();
|
|
|
wtp.setId(-4L);
|
|
|
wtp.setPKeyId(-4L);
|
|
|
- return wtp;
|
|
|
- }
|
|
|
+ wtp.setWbsId("-4");
|
|
|
+ }
|
|
|
+ return wtp;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -1945,7 +1946,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
@Override
|
|
|
public WbsTreePrivate wtpId(Long pkeyId){
|
|
|
WbsTreeContract wtc = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId,pkeyId));
|
|
|
- if(new Integer(1).equals(wtc.getIsCustom())) {
|
|
|
+ if(!new Integer(1).equals(wtc.getIsCustom())) {
|
|
|
int loop = 0;
|
|
|
while (wtc.getOldId() != null && loop < 10) {
|
|
|
loop++;
|
|
@@ -2290,11 +2291,13 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
outerLoop: for(int y=3;y<35;y++){
|
|
|
for(int x=0;x<35;x++){
|
|
|
Row row = sheet.getRow(y);
|
|
|
- Cell cell= row.getCell(x);
|
|
|
- String sv=StringUtils.handleNull(FormulaUtils.getValue(cell)).replaceAll("[^\u4e00-\u9fa5]+","");
|
|
|
- if(sv.contains("规定")&&sv.contains("偏差")){
|
|
|
- deCell=cell;
|
|
|
- break outerLoop;
|
|
|
+ if(row!=null) {
|
|
|
+ Cell cell = row.getCell(x, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK);
|
|
|
+ String sv = StringUtils.handleNull(FormulaUtils.getValue(cell)).replaceAll("[^\u4e00-\u9fa5]+", "");
|
|
|
+ if (sv.contains("规定") && sv.contains("偏差")) {
|
|
|
+ deCell = cell;
|
|
|
+ break outerLoop;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|