Commit c4f717ee authored by lanbaoming's avatar lanbaoming

2024-07-04-5提交

parent b5acb1a9
...@@ -76,4 +76,8 @@ public class TargetLogDO extends BaseDO { ...@@ -76,4 +76,8 @@ public class TargetLogDO extends BaseDO {
归属方,发货还是收货方 归属方,发货还是收货方
*/ */
private String gsf; private String gsf;
/*
归属类型
*/
private int gstype;
} }
...@@ -335,7 +335,7 @@ public class TargetLogServiceImpl extends ...@@ -335,7 +335,7 @@ public class TargetLogServiceImpl extends
public void dealTargetLogTask(Long orderId, public void dealTargetLogTask(Long orderId,
Date achievementTime, Date achievementTime,
long targetId) { long targetId) {
try {
long selectCount = long selectCount =
targetLogMapper.selectCount(TargetLogDO::getOrderId, targetLogMapper.selectCount(TargetLogDO::getOrderId,
orderId); orderId);
...@@ -354,11 +354,14 @@ public class TargetLogServiceImpl extends ...@@ -354,11 +354,14 @@ public class TargetLogServiceImpl extends
return; return;
} }
try {
//客户经理 //客户经理
Long customerId = 0L; Long customerId = 0L;
Long saleManid = info.getSalesmanId(); Long saleManid = info.getSalesmanId();
int loglev = 0; int loglev = 0;
String s_gsf = "n"; String s_gsf = "n";
int n_gstype = 0;
CustomerDO consignorDO = CustomerDO consignorDO =
customerService.getCustomer(info.getConsignorVO().getCustomerId()); customerService.getCustomer(info.getConsignorVO().getCustomerId());
...@@ -374,18 +377,37 @@ public class TargetLogServiceImpl extends ...@@ -374,18 +377,37 @@ public class TargetLogServiceImpl extends
//二期需求修改 //二期需求修改
customerId = consignorDO.getId(); customerId = consignorDO.getId();
loglev = 1; loglev = 1;
s_gsf = "f"; s_gsf = "归发货客户";
n_gstype = 1;
//客户的客户经理为空,就把业绩归属设为0 //客户的客户经理为空,就把业绩归属设为0
if (consignorDO.getCustomerService() == null || if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 || consignorDO.getCustomerService() == 0) {
consignorDO.getIsInOpenSea() == true) {
saleManid = 0L; saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(), orderService.updateOrderSalesmanId(info.getOrderId(),
0L); 0L);
loglev = 11; loglev = 11;
s_gsf += ",客户经理为空,不算奖金。";
}
if (consignorDO.getIsInOpenSea() == true) {
saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(),
0L);
loglev = 11;
s_gsf += ",客户在公海池,不算奖金。";
}
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
} }
} else {
OrderConsigneeDO orderConsigneeDO = OrderConsigneeDO orderConsigneeDO =
orderConsigneeService.getOne( orderConsigneeService.getOne(
new LambdaQueryWrapper<OrderConsigneeDO>(). new LambdaQueryWrapper<OrderConsigneeDO>().
...@@ -403,70 +425,150 @@ public class TargetLogServiceImpl extends ...@@ -403,70 +425,150 @@ public class TargetLogServiceImpl extends
if (consignorDO != null && !consignorDO.getNoConsignee() if (consignorDO != null && !consignorDO.getNoConsignee()
&& !info.getHasConsignee()) { && !info.getHasConsignee()) {
//getHasConsignee 是否有收货人 //getHasConsignee 是否有收货人
//控货无收货人,1-是,0-否
//发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2 //发货人档案设置控货无收货人且订单无收获人,归属发货人业绩 -- 层级2
if (consignorDO != null) {
customerId = consignorDO.getId(); customerId = consignorDO.getId();
loglev = 2; loglev = 2;
s_gsf = "f"; n_gstype = 1;
s_gsf = "归发货客户";
//校验客户的客户经理 //校验客户的客户经理
if (consignorDO.getCustomerService() == null || if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 || consignorDO.getCustomerService() == 0) {
consignorDO.getIsInOpenSea() == true) { saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(),
0L);
loglev = 21;
s_gsf += ",客户经理为空,不算奖金。";
}
if (consignorDO.getIsInOpenSea() == true) {
saleManid = 0L; saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(), orderService.updateOrderSalesmanId(info.getOrderId(),
0L); 0L);
loglev = 21; loglev = 21;
s_gsf += ",客户在公海池,不算奖金。";
} }
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
} }
} else {
List<TargetOfferBackVO> offerBackVOList = List<TargetOfferBackVO> offerBackVOList =
targetLogMapper.getTargetOfferBackByOrerId(orderId); targetLogMapper.getTargetOfferBackByOrerId(orderId);
if (info.getDrawee() == 1) { if (info.getDrawee() == 1) {
if (CollectionUtil.isNotEmpty(offerBackVOList)) { if (CollectionUtil.isNotEmpty(offerBackVOList)) {
//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个 //如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
customerId = consignorDO.getId(); customerId = consignorDO.getId();
loglev = 3; loglev = 3;
s_gsf = "f"; n_gstype = 1;
s_gsf = "发货人付运费,有报价单,归发货客户";
//校验客户的客户经理 //校验客户的客户经理
if (consignorDO.getCustomerService() == null || if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 || consignorDO.getCustomerService() == 0) {
consignorDO.getIsInOpenSea() == true) {
saleManid = 0L; saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(), orderService.updateOrderSalesmanId(info.getOrderId(),
0L); 0L);
loglev = 31; loglev = 31;
s_gsf += ",客户经理为空,不算奖金。";
} }
if (consignorDO.getIsInOpenSea() == true) {
saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(),
0L);
loglev = 31;
s_gsf += ",客户在公海池,不算奖金。";
}
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
} else { } else {
if (consignorDO.getDefaultPay()) { if (consignorDO.getDefaultPay()) {
//如果是发货人付款且档案设置默认付运费 --层级4 第一个 //如果是发货人付款且档案设置默认付运费 --层级4 第一个
customerId = consignorDO.getId(); customerId = consignorDO.getId();
loglev = 4; loglev = 4;
s_gsf = "f"; n_gstype = 1;
s_gsf = "发货人付运费,无报价单,默认付运费,归发货客户";
//校验客户的客户经理 //校验客户的客户经理
if (consignorDO.getCustomerService() == null || if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 || consignorDO.getCustomerService() == 0) {
consignorDO.getIsInOpenSea() == true) {
saleManid = 0L; saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(), orderService.updateOrderSalesmanId(info.getOrderId(),
0L); 0L);
loglev = 41; loglev = 41;
s_gsf += ",客户经理为空,不算奖金。";
} }
if (consignorDO.getIsInOpenSea() == true) {
saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(),
0L);
loglev = 41;
s_gsf += ",客户在公海池,不算奖金。";
}
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
} else { } else {
//业绩归属方是收货人 //业绩归属方是收货人
loglev = 5; loglev = 5;
customerId = orderConsigneeDO.getCustomerId(); customerId = orderConsigneeDO.getCustomerId();
s_gsf = "s"; n_gstype = 2;
s_gsf = "发货人付运费,无报价单,不默认付运费,归收货客户";
//校验客户的客户经理 //校验客户的客户经理
if (consigneeDO.getCustomerService() == null || if (consigneeDO.getCustomerService() == null ||
consigneeDO.getCustomerService() == 0 || consigneeDO.getCustomerService() == 0) {
consigneeDO.getIsInOpenSea() == true) {
saleManid = 0L; saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(), orderService.updateOrderSalesmanId(info.getOrderId(),
0L); 0L);
loglev = 51; loglev = 51;
s_gsf += ",客户经理为空,不算奖金。";
} }
if (consigneeDO.getIsInOpenSea() == true) {
saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(),
0L);
loglev = 51;
s_gsf += ",客户在公海池,不算奖金。";
}
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
} }
} }
...@@ -475,20 +577,60 @@ public class TargetLogServiceImpl extends ...@@ -475,20 +577,60 @@ public class TargetLogServiceImpl extends
customerId = orderConsigneeDO.getCustomerId() != null ? customerId = orderConsigneeDO.getCustomerId() != null ?
orderConsigneeDO.getCustomerId() : consigneeDO.getId(); orderConsigneeDO.getCustomerId() : consigneeDO.getId();
loglev = 5; loglev = 5;
s_gsf = "s"; n_gstype = 2;
if (consigneeDO != null && s_gsf = "收货人付运费,归收货客户";
(consigneeDO.getCustomerService() == null || if (consigneeDO == null) {
consigneeDO.getCustomerService() == 0)) { s_gsf += ",收货客户为空。";
customerId = 0L;
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
}
if (consigneeDO.getCustomerService() == null ||
consigneeDO.getCustomerService() == 0) {
//收货人客户经理为空时不算业绩 //收货人客户经理为空时不算业绩
//客户来源是发货人推荐,不保留业绩记录 customer_source //客户来源是发货人推荐,不保留业绩记录 customer_source
//2024-06-03 添加的逻辑 //2024-06-03 添加的逻辑
if (consigneeDO.getSource() == 12) { s_gsf += ",收货人客户经理为空,不算奖金。";
customerId = 0L;
//删除业绩记录 //删除业绩记录
targetLogMapper.deleteById(targetId);
orderService.updateOrderSalesmanId(info.getOrderId(), orderService.updateOrderSalesmanId(info.getOrderId(),
0L); 0L);
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return; return;
} }
if (consigneeDO.getSource() == 12) {
s_gsf += ",发货人带来的收货人,归收货人客户经理。";
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
} }
} else if (info.getDrawee() == 3) { } else if (info.getDrawee() == 3) {
...@@ -497,7 +639,7 @@ public class TargetLogServiceImpl extends ...@@ -497,7 +639,7 @@ public class TargetLogServiceImpl extends
JSONObject.parseArray(info.getCustomDrawee(), JSONObject.parseArray(info.getCustomDrawee(),
CustomDraweeVO.class); CustomDraweeVO.class);
if (CollectionUtil.isNotEmpty(list)) { if (CollectionUtil.isNotEmpty(list)) {
s_gsf = "自定义付款,付款人不为空";
List<CustomDraweeVO> freightList = List<CustomDraweeVO> freightList =
list.stream().filter(s -> s.getName().equals("freight")).collect(Collectors.toList()); list.stream().filter(s -> s.getName().equals("freight")).collect(Collectors.toList());
List<CustomDraweeVO> clearanceFeeList = List<CustomDraweeVO> clearanceFeeList =
...@@ -511,24 +653,47 @@ public class TargetLogServiceImpl extends ...@@ -511,24 +653,47 @@ public class TargetLogServiceImpl extends
//层级3 第二个 订单关联报价单 && 自定义付款 且发货人付运费 //层级3 第二个 订单关联报价单 && 自定义付款 且发货人付运费
customerId = orderConsignorDO.getCustomerId(); customerId = orderConsignorDO.getCustomerId();
loglev = 3; loglev = 3;
s_gsf = "f"; s_gsf += "有报价单,发货人付运费,归发货客户";
n_gstype = 1;
//校验客户的客户经理 //校验客户的客户经理
if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0) {
saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(),
0L);
loglev = 31;
s_gsf += ",客户经理为空,不算奖金。";
}
if (consignorDO.getCustomerService() == null || if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 || consignorDO.getCustomerService() == 0 ||
consignorDO.getIsInOpenSea() == true) { consignorDO.getIsInOpenSea() == true) {
saleManid = 0L; saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(), orderService.updateOrderSalesmanId(info.getOrderId(),
0L); 0L);
loglev = 31; loglev = 31;
s_gsf += ",客户在公海池,不算奖金。";
} }
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
} else if (CollectionUtil.isNotEmpty(offerBackVOList) } else if (CollectionUtil.isNotEmpty(offerBackVOList)
&& (info.getDrawee() == 3 && clearanceFee == 1)) { && (info.getDrawee() == 3 && clearanceFee == 1)) {
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费 //层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
customerId = orderConsignorDO.getCustomerId(); customerId = orderConsignorDO.getCustomerId();
loglev = 3; loglev = 3;
s_gsf = "f"; s_gsf += "有报价单,发货人付清关费,归发货客户";
n_gstype = 1;
//校验客户的客户经理 //校验客户的客户经理
if (consignorDO.getCustomerService() == null || if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 || consignorDO.getCustomerService() == 0 ||
...@@ -537,14 +702,27 @@ public class TargetLogServiceImpl extends ...@@ -537,14 +702,27 @@ public class TargetLogServiceImpl extends
orderService.updateOrderSalesmanId(info.getOrderId(), orderService.updateOrderSalesmanId(info.getOrderId(),
0L); 0L);
loglev = 32; loglev = 32;
s_gsf += ",客户经理为空,客户在公海池,不算奖金。";
} }
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
} else if (consignorDO.getDefaultPay() && } else if (consignorDO.getDefaultPay() &&
(info.getDrawee() == 3 && freight == 1)) { (info.getDrawee() == 3 && freight == 1)) {
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人 //层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
customerId = orderConsignorDO.getCustomerId(); customerId = orderConsignorDO.getCustomerId();
loglev = 3; loglev = 3;
s_gsf = "f"; n_gstype = 1;
s_gsf += "无报价单,发货人档案设置默认付运费 且发货人付运费,归发货客户";
//校验客户的客户经理 //校验客户的客户经理
if (consignorDO.getCustomerService() == null || if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 || consignorDO.getCustomerService() == 0 ||
...@@ -553,15 +731,29 @@ public class TargetLogServiceImpl extends ...@@ -553,15 +731,29 @@ public class TargetLogServiceImpl extends
orderService.updateOrderSalesmanId(info.getOrderId(), orderService.updateOrderSalesmanId(info.getOrderId(),
0L); 0L);
loglev = 33; loglev = 33;
s_gsf += ",客户经理为空,客户在公海池,不算奖金。";
} }
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
} else if (consignorDO.getDefaultPay() && } else if (consignorDO.getDefaultPay() &&
(info.getDrawee() == 3 (info.getDrawee() == 3
&& clearanceFee == 1)) { && clearanceFee == 1)) {
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人 // 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
loglev = 4; loglev = 4;
customerId = orderConsignorDO.getCustomerId(); customerId = orderConsignorDO.getCustomerId();
s_gsf = "f"; s_gsf += "无报价单,发货人档案设置默认付运费 且发货人付清关费,归发货客户";
n_gstype = 1;
//校验客户的客户经理 //校验客户的客户经理
if (consignorDO.getCustomerService() == null || if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 || consignorDO.getCustomerService() == 0 ||
...@@ -570,12 +762,27 @@ public class TargetLogServiceImpl extends ...@@ -570,12 +762,27 @@ public class TargetLogServiceImpl extends
orderService.updateOrderSalesmanId(info.getOrderId(), orderService.updateOrderSalesmanId(info.getOrderId(),
0L); 0L);
loglev = 1; loglev = 1;
s_gsf += ",客户经理为空,客户在公海池,不算奖金。";
} }
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
} else { } else {
customerId = orderConsigneeDO.getCustomerId(); customerId = orderConsigneeDO.getCustomerId();
loglev = 5; loglev = 5;
s_gsf = "s"; s_gsf += ",不满足自定义付款人前面的条件,归收货人";
n_gstype = 2;
//校验客户的客户经理 //校验客户的客户经理
if (consigneeDO.getCustomerService() == null || if (consigneeDO.getCustomerService() == null ||
consigneeDO.getCustomerService() == 0 || consigneeDO.getCustomerService() == 0 ||
...@@ -584,50 +791,93 @@ public class TargetLogServiceImpl extends ...@@ -584,50 +791,93 @@ public class TargetLogServiceImpl extends
orderService.updateOrderSalesmanId(info.getOrderId(), orderService.updateOrderSalesmanId(info.getOrderId(),
0L); 0L);
loglev = 51; loglev = 51;
s_gsf += ",客户经理为空,客户在公海池,不算奖金。";
}
TargetLogDO targetLogDO =
targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
} }
} }
} }
} else {
//业绩归属收货人 //业绩归属收货人
if (orderConsigneeDO != null) { if (orderConsigneeDO == null) {
customerId = s_gsf = "前4级都不满足,归收货人,收货人为空,不算奖金";
orderConsigneeDO.getCustomerId() != null ? customerId = 0L;
orderConsigneeDO.getCustomerId() : 0; n_gstype = 2;
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
}
customerId = orderConsigneeDO.getCustomerId() != null ?
orderConsigneeDO.getCustomerId() : 0;
loglev = 5; loglev = 5;
s_gsf = "s"; s_gsf = "前4级都不满足,归收货人";
n_gstype = 2;
//校验客户的客户经理 //校验客户的客户经理
if (consigneeDO != null) {
if (consigneeDO.getCustomerService() == null || if (consigneeDO.getCustomerService() == null ||
consigneeDO.getCustomerService() == 0 || consigneeDO.getCustomerService() == 0) {
consigneeDO.getIsInOpenSea() == true) {
saleManid = 0L; saleManid = 0L;
s_gsf += ",收货人客户经理为空,不算奖金。";
orderService.updateOrderSalesmanId(info.getOrderId(), orderService.updateOrderSalesmanId(info.getOrderId(),
0L); 0L);
loglev = 52; loglev = 52;
} TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
} //客户ID
targetLogDO.setCustomerId(customerId);
//客户经理ID
targetLogDO.setUserId(saleManid);
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
return;
} }
} if (consigneeDO.getIsInOpenSea() == true) {
} saleManid = 0L;
} s_gsf += ",收货人客户在公海池,不算奖金。";
saleManid = 0L;
orderService.updateOrderSalesmanId(info.getOrderId(),
0L);
loglev = 52;
TargetLogDO targetLogDO = targetLogMapper.selectById(targetId); TargetLogDO targetLogDO = targetLogMapper.selectById(targetId);
//客户ID //客户ID
targetLogDO.setCustomerId(customerId); targetLogDO.setCustomerId(customerId);
//客户经理ID //客户经理ID
targetLogDO.setUserId(saleManid); targetLogDO.setUserId(saleManid);
if (loglev == 0) {
loglev = -1;
}
targetLogDO.setLoglev(loglev); targetLogDO.setLoglev(loglev);
targetLogDO.setGsf(s_gsf); targetLogDO.setGsf(s_gsf);
targetLogDO.setGstype(n_gstype);
targetLogDO.setUpdateTime(new Date()); targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO); targetLogMapper.updateById(targetLogDO);
return;
}
} catch (Exception e) { } catch (Exception e) {
zTest m2 = new zTest(); zTest m2 = new zTest();
m2.setTestname(e.getMessage()); m2.setTestname(e.getMessage() + "发生异常," + info.getOrderNo());
m2.setCreatedate(new Date()); m2.setCreatedate(new Date());
zTestMapper2.insert(m2); zTestMapper2.insert(m2);
} }
......
...@@ -57,7 +57,6 @@ public class TargetLogJob implements JobHandler { ...@@ -57,7 +57,6 @@ public class TargetLogJob implements JobHandler {
//System.out.println("定时任务参数:" + param); //System.out.println("定时任务参数:" + param);
List<TargetLogDO> list = targetLogService.selectList2(sDate); List<TargetLogDO> list = targetLogService.selectList2(sDate);
if (CollectionUtil.isEmpty(list)) { if (CollectionUtil.isEmpty(list)) {
m.setTestname(sDate+"获取业绩归属数据为空"); m.setTestname(sDate+"获取业绩归属数据为空");
m.setCreatedate(new Date()); m.setCreatedate(new Date());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment