|
@@ -1,9 +1,10 @@
|
|
|
package org.springblade.manager.service.impl;
|
|
|
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
+import org.springblade.business.entity.ConstructionLedger;
|
|
|
+import org.springblade.business.feign.ConstructionLedgerFeign;
|
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
|
import org.springblade.core.log.logger.BladeLogger;
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
@@ -13,7 +14,6 @@ import org.springblade.manager.entity.WbsTreeContract;
|
|
|
import org.springblade.manager.entity.WbsTreePrivate;
|
|
|
import org.springblade.manager.mapper.WbsInfoMapper;
|
|
|
import org.springblade.manager.mapper.WbsTreeContractMapper;
|
|
|
-import org.springblade.manager.mapper.WbsTreeMapper;
|
|
|
import org.springblade.manager.mapper.WbsTreePrivateMapper;
|
|
|
import org.springblade.manager.service.IWbsTreeContractService;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -29,7 +29,7 @@ public class WbsTreeContractServiceImpl
|
|
|
|
|
|
private final BladeLogger logger;
|
|
|
private final WbsTreePrivateServiceImpl wbsTreePrivateService;
|
|
|
-// private final ConstructionLedgerMapper constructionLedgerMapper;
|
|
|
+ private final ConstructionLedgerFeign constructionLedgerFeign;
|
|
|
private final WbsTreePrivateMapper wbsTreePrivateMapper;
|
|
|
private final WbsInfoMapper wbsInfoMapper;
|
|
|
|
|
@@ -64,7 +64,6 @@ public class WbsTreeContractServiceImpl
|
|
|
} else {
|
|
|
//获取WbsTreePrivate对象
|
|
|
WbsTreePrivate wbsTreePrivate = wbsTreePrivateMapper.selectByCondition(id, pawDTO.getProjectId());
|
|
|
-
|
|
|
Integer wbsType = wbsInfo.getWbsType();
|
|
|
Long snowId = SnowFlakeUtil.getId();
|
|
|
Integer row = baseMapper.insertWbsTreeContract1(snowId, wbsType, pawDTO.getContractId(), wbsTreePrivate);
|
|
@@ -72,17 +71,13 @@ public class WbsTreeContractServiceImpl
|
|
|
logger.info(wbsTreePrivate.getId().toString(), "初始化合同段wbs树成功");
|
|
|
}
|
|
|
//初始化施工台账
|
|
|
- if (wbsTreePrivate.getDeptCategory() == 6
|
|
|
- && wbsTreePrivate.getDeptCategory() != null
|
|
|
- && !("").equals(wbsTreePrivate.getDeptCategory())) {
|
|
|
- /*ConstructionLedger constructionLedger = new ConstructionLedger();
|
|
|
+ System.out.println("wbsTreePrivate.getDeptCategory() : "+wbsTreePrivate.getDeptCategory());
|
|
|
+ if (wbsTreePrivate.getDeptCategory() == 6) {
|
|
|
+ ConstructionLedger constructionLedger = new ConstructionLedger();
|
|
|
constructionLedger.setIsBeton(0);
|
|
|
constructionLedger.setWbsId(Long.parseLong(pawDTO.getWbsId()));
|
|
|
- constructionLedger.setContractId(Long.parseLong(pawDTO.getContractId()));*/
|
|
|
- /*int b2 = constructionLedgerMapper.insert(constructionLedger);
|
|
|
- if (b2 > 0) {
|
|
|
- logger.info(constructionLedger.getId().toString(), "初始化施工台账成功");
|
|
|
- }*/
|
|
|
+ constructionLedger.setContractId(Long.parseLong(pawDTO.getContractId()));
|
|
|
+ constructionLedgerFeign.initConstructionLedger(constructionLedger);
|
|
|
}
|
|
|
}
|
|
|
}
|