Commit 336216ca by 闫恒

Merge branch 'feature/dataSourceQueryBug' into 'develop'

Feature/data source query bug

See merge request kunlun/xyst_dinas/xyst_dinas_backend!95
parents b72093a5 d566b203
package com.beecode.inz.authmgr.web;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.beecode.amino.core.Amino;
import com.beecode.bap.staff.BapContext;
import com.beecode.bap.staff.service.StaffService;
......@@ -52,6 +28,17 @@ import com.beecode.inz.authmgr.vo.AccessorPrivilegePara;
import com.beecode.inz.common.service.ByIdService;
import com.beecode.inz.common.service.FollowerPrivilegeService;
import com.beecode.inz.common.service.FollowerPrivilegeType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.MessageFormat;
import java.util.*;
import java.util.stream.Collectors;
@RequestMapping(value = "basis/auth")
@RestController
......@@ -85,7 +72,9 @@ public class AuthMgrController {
private final static String CLUEPOOL = "CluePool";
// 锚点顺序
private final static String[] ANCHOR_ORDER = { "项目", "合同", "监控", "生产", "销售", "资金" , "运输", "安健环", "价格", "OA办公", "报表", "综合BI", "业务管理", "其他" };
//modify by 去除OA办公模块 from yanHeng
// private final static String[] ANCHOR_ORDER = { "项目", "合同", "监控", "生产", "销售", "资金" , "运输", "安健环", "价格", "OA办公", "报表", "综合BI", "业务管理", "其他" };
private final static String[] ANCHOR_ORDER = { "项目", "合同", "监控", "生产", "销售", "资金" , "运输", "安健环", "价格", "报表", "综合BI", "业务管理", "其他" };
protected final static Logger logger = LoggerFactory.getLogger(AuthMgrController.class);
......
package com.xyst.dinas.sales.task;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.UUID;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import com.beecode.amino.core.Amino;
import com.beecode.bap.scheduler.core.Task;
import com.beecode.bap.scheduler.core.TaskContext;
......@@ -25,6 +14,11 @@ import com.xyst.dinas.contract.internal.dao.ContractDao;
import com.xyst.dinas.sales.constant.SalesPlanConstant;
import com.xyst.dinas.sales.dao.SalesPlanDao;
import com.xyst.dinas.sales.service.SalesPlanService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import java.util.*;
/**
* 销售计划自动创建任务
*
......@@ -68,7 +62,7 @@ public class SalesPlanAutoCreateTask implements Task{
weekDate = getWeekOfDate(new Date());
}
if (oldWeek.equals(weekDate) || planningCycle.equalsIgnoreCase(PlanningCycleEnum.DAY.name())) {
if (weekDate.equals(oldWeek) || planningCycle.equalsIgnoreCase(PlanningCycleEnum.DAY.name())) {
PlanningCycleEnum planningCycleType = PlanningCycleEnum.DAY.name().equalsIgnoreCase(planningCycle)?PlanningCycleEnum.DAY:PlanningCycleEnum.WEEK;
KObject planningCycleObj = planningCycleService.getPlanningCycleObj(planningCycleType, new Date());
......
package com.xyst.dinas.sales.task;
import java.util.Optional;
import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.beecode.amino.metadata.context.ApplicationMetadataContext;
import com.beecode.amino.metadata.runtime.ServiceInitializer;
import com.beecode.bap.scheduler.entity.ScheduleDetail;
import com.beecode.bap.scheduler.entity.TaskDetail;
import com.beecode.bap.scheduler.service.ScheduleService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.PostConstruct;
import java.util.Optional;
public class SalesPlanAutoCreateTaskRegister implements ServiceInitializer{
......@@ -38,8 +36,8 @@ public class SalesPlanAutoCreateTaskRegister implements ServiceInitializer{
TaskDetail TaskDetail = new TaskDetail(TASK_NAME, SalesPlanAutoCreateTask.class.getName());
// 每天凌晨12点执行调度,如测试可修改为每十五秒:*/15 * * * * ?(表达式由至少6个由空格分隔的时间元素,从左至右可分为秒,分,时,日,月,星期)
scheduleService.scheduleTask(TaskDetail, "0 0 0 * * ?");
// 测试调度时进行调用
// scheduleService.scheduleTask(TaskDetail, "0 */5 * * * ?");
// 测试调度时进行调用 测试时每3分钟一次
// scheduleService.scheduleTask(TaskDetail, "0 */3 * * * ?");
logger.info("销售计划自动创建任务初始化成功!");
}
......
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