|
|
@@ -20,6 +20,7 @@ import org.springblade.business.feign.ContractLogClient;
|
|
|
import org.springblade.business.feign.EntrustInfoServiceClient;
|
|
|
import org.springblade.business.feign.InformationQueryClient;
|
|
|
import org.springblade.common.utils.CommonUtil;
|
|
|
+import org.springblade.core.log.exception.ServiceException;
|
|
|
import org.springblade.manager.util.DataStructureFormatUtils;
|
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
|
import org.springblade.core.oss.model.BladeFile;
|
|
|
@@ -470,18 +471,37 @@ public class ExcelTabClientImpl implements ExcelTabClient {
|
|
|
@Override
|
|
|
public R saveReEntrustTabData(ReSigningEntrustDto dto, String header) {
|
|
|
WbsTreePrivate wbsTreePrivate = jdbcTemplate.queryForObject("select * from m_wbs_tree_private where p_key_id=" + dto.getNodeId(), new BeanPropertyRowMapper<>(WbsTreePrivate.class));
|
|
|
+ if (wbsTreePrivate == null) {
|
|
|
+ throw new ServiceException("找不到节点信息");
|
|
|
+ }
|
|
|
+ // 合同段信息
|
|
|
+ ContractInfo contractInfo = contractInfoService.getById(dto.getContractId());
|
|
|
+ if (contractInfo == null) {
|
|
|
+ throw new ServiceException("合同段信息为null");
|
|
|
+ }
|
|
|
+ Long pkeyId = 0L;
|
|
|
+ if (contractInfo.getContractType() == 2) { //3 监理
|
|
|
+ pkeyId = wbsTreePrivate.getJlerTreeId() ;
|
|
|
+ } else if (contractInfo.getContractType() == 3 || contractInfo.getContractType() == 8) { //业主
|
|
|
+ pkeyId = wbsTreePrivate.getYzerTreeId();
|
|
|
+ } else {
|
|
|
+ return R.fail("该合同段没有委托单权限业务");
|
|
|
+ }
|
|
|
Boolean isRemove=true;
|
|
|
- List<Map<String, Object>> list = excelTabService.getBussDataInfoTrialentrust(Long.parseLong(dto.getEntrustId()), wbsTreePrivate.getJlerTreeId(), Long.parseLong(dto.getContractId()), null, null,isRemove);
|
|
|
+ List<Map<String, Object>> list = excelTabService.getBussDataInfoTrialentrust(Long.parseLong(dto.getEntrustId()), pkeyId, Long.parseLong(dto.getContractId()), null, null,isRemove);
|
|
|
Map<String, Object> map = list.get(0);
|
|
|
if(!map.containsKey("contractId")){
|
|
|
map.put("contractId",dto.getContractId());
|
|
|
}
|
|
|
if(!map.containsKey("nodeErTreeId")){
|
|
|
- map.put("nodeErTreeId",wbsTreePrivate.getJlerTreeId());
|
|
|
+ map.put("nodeErTreeId",pkeyId);
|
|
|
}
|
|
|
if(!map.containsKey("nodeId")){
|
|
|
map.put("nodeId",dto.getNodeId());
|
|
|
}
|
|
|
+ if(!map.containsKey("id")){
|
|
|
+ map.put("id",dto.getEntrustId());
|
|
|
+ }
|
|
|
JSONObject jsonObject = new JSONObject(map);
|
|
|
return entrustInfoServiceClient.saventrustData(jsonObject);
|
|
|
}
|