Commit 61b49b93 authored by lanbaoming's avatar lanbaoming

2024-07-04-2提交

parent d098224f
......@@ -71,4 +71,9 @@ public class TargetLogDO extends BaseDO {
private Long deptId;
private int loglev;
/*
归属方,发货还是收货方
*/
private String gsf;
}
......@@ -357,6 +357,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
Long customerId = 0L;
Long saleManid = info.getSalesmanId();
int loglev = 0;
String s_gsf="n";
CustomerDO consignorDO =
customerService.getCustomer(info.getConsignorVO().getCustomerId());
......@@ -372,6 +373,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
//二期需求修改
customerId = consignorDO.getId();
loglev = 1;
s_gsf="f";
//客户的客户经理为空,就把业绩归属设为0
if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 ||
......@@ -404,6 +406,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
if (consignorDO != null) {
customerId = consignorDO.getId();
loglev = 2;
s_gsf="f";
//校验客户的客户经理
if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 ||
......@@ -424,6 +427,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
//如果是发货人付款且关联报价单,业绩归属发货人 --层级3 第一个
customerId = consignorDO.getId();
loglev = 3;
s_gsf="f";
//校验客户的客户经理
if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 ||
......@@ -438,6 +442,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
//如果是发货人付款且档案设置默认付运费 --层级4 第一个
customerId = consignorDO.getId();
loglev = 4;
s_gsf="f";
//校验客户的客户经理
if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 ||
......@@ -451,6 +456,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
//业绩归属方是收货人
loglev = 5;
customerId = orderConsigneeDO.getCustomerId();
s_gsf="s";
//校验客户的客户经理
if (consigneeDO.getCustomerService() == null ||
consigneeDO.getCustomerService() == 0 ||
......@@ -468,6 +474,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
customerId = orderConsigneeDO.getCustomerId() != null ?
orderConsigneeDO.getCustomerId() : consigneeDO.getId();
loglev = 5;
s_gsf="s";
if (consigneeDO != null &&
(consigneeDO.getCustomerService() == null ||
consigneeDO.getCustomerService() == 0)) {
......@@ -508,6 +515,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
consignorDO.getCustomerService() == 0 ||
consignorDO.getIsInOpenSea() == true) {
saleManid = 0L;
s_gsf="f";
orderService.updateOrderSalesmanId(info.getOrderId(),
0L);
loglev = 31;
......@@ -523,6 +531,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
consignorDO.getCustomerService() == 0 ||
consignorDO.getIsInOpenSea() == true) {
saleManid = 0L;
s_gsf="f";
orderService.updateOrderSalesmanId(info.getOrderId(),
0L);
loglev = 32;
......@@ -533,6 +542,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
customerId = orderConsignorDO.getCustomerId();
loglev = 3;
s_gsf="f";
//校验客户的客户经理
if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 ||
......@@ -549,6 +559,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
loglev = 4;
customerId = orderConsignorDO.getCustomerId();
s_gsf="f";
//校验客户的客户经理
if (consignorDO.getCustomerService() == null ||
consignorDO.getCustomerService() == 0 ||
......@@ -562,6 +573,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
} else {
customerId = orderConsigneeDO.getCustomerId();
loglev = 5;
s_gsf="s";
//校验客户的客户经理
if (consigneeDO.getCustomerService() == null ||
consigneeDO.getCustomerService() == 0 ||
......@@ -582,6 +594,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
orderConsigneeDO.getCustomerId() : 0;
loglev = 5;
s_gsf="s";
//校验客户的客户经理
if (consigneeDO != null) {
if (consigneeDO.getCustomerService() == null ||
......@@ -608,6 +621,7 @@ public class TargetLogServiceImpl extends AbstractService<TargetLogMapper, Targe
loglev=-1;
}
targetLogDO.setLoglev(loglev);
targetLogDO.setGsf( s_gsf);
targetLogDO.setUpdateTime(new Date());
targetLogMapper.updateById(targetLogDO);
}
......
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