|
@@ -3,6 +3,7 @@ package com.dayou.dyoa;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
+import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
@@ -1671,6 +1672,12 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
String pgBusinessType = hisCommissionDeclare.getPgBusinessType();
|
|
|
Long pgBusinessType1 = findPgBusinessType(pgBusinessType);
|
|
|
Long pgcdId = null;
|
|
|
+ Date created = null;
|
|
|
+ //查询在老系统里面的申报日期
|
|
|
+ String pgFlowInstanceId = hisCommissionDeclare.getPgFlowInstanceId();
|
|
|
+ if (StrUtil.isNotBlank(pgFlowInstanceId)){
|
|
|
+ created = dyoaHistoryMapper.findCommissionDeclareDate(pgFlowInstanceId);
|
|
|
+ }
|
|
|
CommissionDeclare pgCd = commissionDeclareService.getOne(new LambdaQueryWrapper<CommissionDeclare>()
|
|
|
.eq(CommissionDeclare::getBusinessType, "COMMISSION_DECLARE_MAJOR_EVALUATE")
|
|
|
.eq(CommissionDeclare::getBusinessId, majorId)
|
|
@@ -1686,10 +1693,13 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
commissionDeclare.setDeclareUserId(pgUserId);
|
|
|
commissionDeclare.setCommissionRateId(pgBusinessType1);
|
|
|
commissionDeclare.setProductionId(mpId);
|
|
|
+ commissionDeclare.setCreated(created==null?hisCommissionDeclare.getCreatedDatetime():created);
|
|
|
commissionDeclareService.save(commissionDeclare);
|
|
|
pgcdId = commissionDeclare.getId();
|
|
|
}else{
|
|
|
pgcdId = pgCd.getId();
|
|
|
+ commissionDeclareService.update(new LambdaUpdateWrapper<CommissionDeclare>()
|
|
|
+ .set(BaseEntity::getCreated,created==null?hisCommissionDeclare.getCreatedDatetime():created).eq(BaseEntity::getId,pgcdId));
|
|
|
}
|
|
|
//查询评估人员绩效比例
|
|
|
List<CommissionRate> rates = dyoaHistoryMapper.findPgRate(hisCommissionDeclare.getId());
|
|
@@ -1716,6 +1726,11 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
String scBusinessType = hisCommissionDeclare.getMasterBusinessType();
|
|
|
Long scBusinessType1 = findSCBusinessType(scBusinessType);
|
|
|
Long sccdId = null;
|
|
|
+ Date created = null;
|
|
|
+ String masterFlowInstanceId = hisCommissionDeclare.getMasterFlowInstanceId();
|
|
|
+ if (StrUtil.isNotBlank(masterFlowInstanceId)){
|
|
|
+ created = dyoaHistoryMapper.findCommissionDeclareDate(masterFlowInstanceId);
|
|
|
+ }
|
|
|
CommissionDeclare pgCd = commissionDeclareService.getOne(new LambdaQueryWrapper<CommissionDeclare>()
|
|
|
.eq(CommissionDeclare::getBusinessType, "COMMISSION_DECLARE_MAJOR_MARKET")
|
|
|
.eq(CommissionDeclare::getBusinessId, majorId)
|
|
@@ -1731,10 +1746,13 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
commissionDeclare.setDeclareUserId(scUserId);
|
|
|
commissionDeclare.setCommissionRateId(scBusinessType1);
|
|
|
commissionDeclare.setProductionId(mpId);
|
|
|
+ commissionDeclare.setCreated(created==null?hisCommissionDeclare.getCreatedDatetime():created);
|
|
|
commissionDeclareService.save(commissionDeclare);
|
|
|
sccdId = commissionDeclare.getId();
|
|
|
}else {
|
|
|
sccdId = pgCd.getId();
|
|
|
+ commissionDeclareService.update(new LambdaUpdateWrapper<CommissionDeclare>()
|
|
|
+ .set(BaseEntity::getCreated,created==null?hisCommissionDeclare.getCreatedDatetime():created).eq(BaseEntity::getId,sccdId));
|
|
|
}
|
|
|
//查询市场人员绩效比例
|
|
|
List<CommissionRate> rates = dyoaHistoryMapper.findScRate(hisCommissionDeclare.getId());
|