|
@@ -32,6 +32,7 @@ import com.qunzhixinxi.hnqz.common.security.service.HnqzUser;
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalTime;
|
|
import java.time.LocalTime;
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.Collections;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -92,22 +93,6 @@ public class TaskManager {
|
|
|
|
|
|
Page<TaskRespVO.ToDirectCheck> page = new Page<>(query.getCurrent(), query.getSize());
|
|
Page<TaskRespVO.ToDirectCheck> page = new Page<>(query.getCurrent(), query.getSize());
|
|
|
|
|
|
- Integer nodeId = query.getNodeId();
|
|
|
|
- List<Integer> nodeIds;
|
|
|
|
-
|
|
|
|
- // 商务组
|
|
|
|
- if (nodeId == 12) {
|
|
|
|
- nodeIds = ListUtil.of(3, 9);
|
|
|
|
- }
|
|
|
|
- // 市场组
|
|
|
|
- else if (nodeId == 11) {
|
|
|
|
- nodeIds = ListUtil.of(3, 8);
|
|
|
|
- }
|
|
|
|
- // 其他
|
|
|
|
- else {
|
|
|
|
- nodeIds = Collections.singletonList(nodeId);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
taskMapper.pageDirectCheck(
|
|
taskMapper.pageDirectCheck(
|
|
page,
|
|
page,
|
|
issueDate,
|
|
issueDate,
|
|
@@ -119,12 +104,51 @@ public class TaskManager {
|
|
skuIds,
|
|
skuIds,
|
|
query.getSalesId(),
|
|
query.getSalesId(),
|
|
query.getProvAbbr(),
|
|
query.getProvAbbr(),
|
|
- nodeIds,
|
|
|
|
|
|
+ calcNodeSum(query.getNodeId()),
|
|
query.getTaskStatus());
|
|
query.getTaskStatus());
|
|
|
|
|
|
return build(page);
|
|
return build(page);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private List<Integer> calcNodeSum(Integer nodeId) {
|
|
|
|
+
|
|
|
|
+ List<Integer> nodeSum = new ArrayList<>(2);
|
|
|
|
+
|
|
|
|
+ // 地市管理员
|
|
|
|
+ if (nodeId == 1) {
|
|
|
|
+ nodeSum.add(1);
|
|
|
|
+ }
|
|
|
|
+ // 区域
|
|
|
|
+ else if (nodeId == 2) {
|
|
|
|
+ nodeSum.add(3);
|
|
|
|
+ }
|
|
|
|
+ // 市场
|
|
|
|
+ else if (nodeId == 12) {
|
|
|
|
+ nodeSum.add(6);
|
|
|
|
+ nodeSum.add(15);
|
|
|
|
+ }
|
|
|
|
+ // 商务
|
|
|
|
+ else if (nodeId == 11) {
|
|
|
|
+ nodeSum.add(6);
|
|
|
|
+ nodeSum.add(14);
|
|
|
|
+ }
|
|
|
|
+ // 分管领导
|
|
|
|
+ else if (nodeId == 9) {
|
|
|
|
+ nodeSum.add(23);
|
|
|
|
+ }
|
|
|
|
+ // 总经理
|
|
|
|
+ else if (nodeId == 15) {
|
|
|
|
+ nodeSum.add(28);
|
|
|
|
+ }
|
|
|
|
+ // 其他
|
|
|
|
+ else{
|
|
|
|
+ throw new BizException("当前角色不存在绑定审批节点");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ return nodeSum;
|
|
|
|
+ }
|
|
|
|
+
|
|
// 获取关联产品
|
|
// 获取关联产品
|
|
private List<String> getSkuIds(String mahName, String skuId) {
|
|
private List<String> getSkuIds(String mahName, String skuId) {
|
|
|
|
|