|
|
@ -5,8 +5,6 @@ import com.alibaba.fastjson.JSON; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.google.common.util.concurrent.ThreadFactoryBuilder; |
|
|
|
import com.yxt.anrui.base.api.basemodelmodprice.BaseModelModprice; |
|
|
|
import com.yxt.anrui.base.api.basemodelmodprice.flow.SubmitBaseModelModPriceDto; |
|
|
|
import com.yxt.anrui.base.api.commonappendix.CommonAppendix; |
|
|
|
import com.yxt.anrui.base.api.commoncontract.*; |
|
|
|
import com.yxt.anrui.base.api.commoncontract.flowable.AppSubmitContractInfoDto; |
|
|
@ -1028,9 +1026,8 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public AppCommonContractInitVo getContractInfo(String contractSid, String userSid) { |
|
|
|
AppCommonContractInitVo vo = baseMapper.getContractInfo(contractSid, userSid); |
|
|
|
AppCommonContractInitVo vo = baseMapper.getContractInfo(contractSid); |
|
|
|
String urlPrefix = fileUploadComponent.getUrlPrefix(); |
|
|
|
vo.setUserSid(userSid); |
|
|
|
if (StringUtils.isNotBlank(vo.getAppdixUrl())) { |
|
|
|
String[] split1 = vo.getAppdixUrl().split(","); |
|
|
|
List<String> contract = new ArrayList<>(); |
|
|
@ -1176,7 +1173,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
//若app移动端有此功能,则传递appMap参数
|
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
//需和移动端沟通业务sid保存的属性具体值:appMap中sid不是固定的。移动端提供具体字段。
|
|
|
|
appMap.put("sid", businessSid); |
|
|
|
appMap.put("contractSid", businessSid); |
|
|
|
variables.put("app", appMap); |
|
|
|
//流程定义id
|
|
|
|
bv.setModelId(ProcDefEnum.CONTRACTAPPLY.getProDefId()); |
|
|
@ -1330,6 +1327,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
//生成合同编号
|
|
|
|
String contractNo = getApplyCode(dto.getUserSid()); |
|
|
|
map.put("contractNo", contractNo); |
|
|
|
String url = ""; |
|
|
|
try { |
|
|
|
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
|
|
|
.setNameFormat("demo-pool-%d").build(); |
|
|
@ -1349,6 +1347,11 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
} |
|
|
|
printConfirmVo.setDownloadUrl(future1.get()); |
|
|
|
list.add(printConfirmVo); |
|
|
|
if (StringUtils.isNotBlank(future1.get())) { |
|
|
|
if (future1.get().contains(docPdfComponent.getPrefixTemplateUrl())) { |
|
|
|
url = future1.get().replace(docPdfComponent.getPrefixTemplateUrl(), ""); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Future<String> future2 = pool.submit(() -> { |
|
|
|
return genCarSaleContractBlank(dto, map, appOrderDetailsVo); |
|
|
@ -1362,8 +1365,14 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
} |
|
|
|
printConfirmVo.setDownloadUrl(future2.get()); |
|
|
|
list.add(printConfirmVo); |
|
|
|
if (StringUtils.isNotBlank(future2.get())) { |
|
|
|
if (future2.get().contains(docPdfComponent.getPrefixTemplateUrl())) { |
|
|
|
url = url + "," + future2.get().replace(docPdfComponent.getPrefixTemplateUrl(), ""); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//生成合同数据
|
|
|
|
String finalUrl = url; |
|
|
|
Future<String> future3 = pool.submit(() -> { |
|
|
|
//新增合同信息
|
|
|
|
CommonContract commonContract = new CommonContract(); |
|
|
@ -1400,6 +1409,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
commonContract.setPrice(new BigDecimal(transactionPrice)); |
|
|
|
//单台订金
|
|
|
|
commonContract.setOneDeposit(new BigDecimal(depositInfo.getDeposit())); |
|
|
|
commonContract.setCommonContractUrl(finalUrl); |
|
|
|
save(commonContract); |
|
|
|
return commonContract.getSid(); |
|
|
|
}); |
|
|
@ -1430,7 +1440,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
CommonContract commonContract = fetchBySid(businessSid); |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid", businessSid); |
|
|
|
appMap.put("contractSid", businessSid); |
|
|
|
variables.put("app", appMap); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
if (bv.getTaskId().equals(commonContract.getTaskId())) { |
|
|
@ -1514,7 +1524,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp |
|
|
|
BeanUtil.copyProperties(query, flowTaskVo); |
|
|
|
Map<String, Object> variables = new HashMap<>(); |
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
appMap.put("sid", businessSid); |
|
|
|
appMap.put("contractSid", businessSid); |
|
|
|
variables.put("app", appMap); |
|
|
|
flowTaskVo.setValues(variables); |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo); |
|
|
|