|
|
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.xunmei.common.core.constant.SecurityConstants;
|
|
|
+import com.xunmei.common.core.domain.R;
|
|
|
import com.xunmei.common.core.utils.DateUtils;
|
|
|
import com.xunmei.common.core.utils.StringUtils;
|
|
|
import com.xunmei.common.core.web.page.TableDataInfo;
|
|
|
@@ -31,6 +32,7 @@ import com.xunmei.system.api.domain.SysUser;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
@@ -160,7 +162,8 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
|
|
|
}
|
|
|
|
|
|
private boolean check(Long userId) {
|
|
|
- String s = remoteRoleService.selectRoleNameByUserId(userId, SecurityConstants.INNER);
|
|
|
+ R<String> r = remoteRoleService.selectRoleNameByUserId(userId, SecurityConstants.INNER);
|
|
|
+ String s = r.getData();
|
|
|
boolean admin = false;
|
|
|
if (StringUtils.isNotEmpty(s)) {
|
|
|
int i = s.indexOf(",");
|
|
|
@@ -307,13 +310,13 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
|
|
|
|
|
|
@Override
|
|
|
public void generate(String cycle) {
|
|
|
- if (cycle.equals("0")){
|
|
|
+ if (cycle.equals("0")) {
|
|
|
this.monthTask();
|
|
|
}
|
|
|
- if (cycle.equals("1")){
|
|
|
- this.seasonTask();
|
|
|
+ if (cycle.equals("1")) {
|
|
|
+ this.seasonTask();
|
|
|
}
|
|
|
- if (cycle.equals("2")){
|
|
|
+ if (cycle.equals("2")) {
|
|
|
this.yearTask();
|
|
|
}
|
|
|
// List<CoreEvaluatePlan> coreEvaluatePlans = baseMapper.selectPlanByCycle(cycle);
|
|
|
@@ -406,14 +409,14 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
|
|
|
@Override
|
|
|
public void monthTask() {
|
|
|
//查询月计划
|
|
|
- CoreEvaluatePlan coreEvaluatePlan=new CoreEvaluatePlan();
|
|
|
+ CoreEvaluatePlan coreEvaluatePlan = new CoreEvaluatePlan();
|
|
|
coreEvaluatePlan.setEvaluateCycle("0");
|
|
|
coreEvaluatePlan.setIsDeleted("0");
|
|
|
coreEvaluatePlan.setIsDistribute("1");
|
|
|
coreEvaluatePlan.setStatus("0");
|
|
|
List<CoreEvaluatePlan> coreEvaluatePlans = baseMapper.selectCoreEvaluatePlanList(coreEvaluatePlan);
|
|
|
- if (CollectionUtils.isNotEmpty(coreEvaluatePlans)){
|
|
|
- coreEvaluatePlans.forEach(c->{
|
|
|
+ if (CollectionUtils.isNotEmpty(coreEvaluatePlans)) {
|
|
|
+ coreEvaluatePlans.forEach(c -> {
|
|
|
SysOrg org = new SysOrg();
|
|
|
org.setType(Integer.valueOf(c.getOrgType()));
|
|
|
org.setPath(c.getOrgPath());
|
|
|
@@ -457,14 +460,14 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
|
|
|
@Override
|
|
|
public void seasonTask() {
|
|
|
//查询季度计划
|
|
|
- CoreEvaluatePlan coreEvaluatePlan=new CoreEvaluatePlan();
|
|
|
+ CoreEvaluatePlan coreEvaluatePlan = new CoreEvaluatePlan();
|
|
|
coreEvaluatePlan.setEvaluateCycle("1");
|
|
|
coreEvaluatePlan.setIsDeleted("0");
|
|
|
coreEvaluatePlan.setIsDistribute("1");
|
|
|
coreEvaluatePlan.setStatus("0");
|
|
|
List<CoreEvaluatePlan> coreEvaluatePlans = baseMapper.selectCoreEvaluatePlanList(coreEvaluatePlan);
|
|
|
- if (CollectionUtils.isNotEmpty(coreEvaluatePlans)){
|
|
|
- coreEvaluatePlans.forEach(c->{
|
|
|
+ if (CollectionUtils.isNotEmpty(coreEvaluatePlans)) {
|
|
|
+ coreEvaluatePlans.forEach(c -> {
|
|
|
SysOrg org = new SysOrg();
|
|
|
org.setType(Integer.valueOf(c.getOrgType()));
|
|
|
org.setPath(c.getOrgPath());
|
|
|
@@ -508,14 +511,14 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
|
|
|
@Override
|
|
|
public void yearTask() {
|
|
|
//查询季度计划
|
|
|
- CoreEvaluatePlan coreEvaluatePlan=new CoreEvaluatePlan();
|
|
|
+ CoreEvaluatePlan coreEvaluatePlan = new CoreEvaluatePlan();
|
|
|
coreEvaluatePlan.setEvaluateCycle("2");
|
|
|
coreEvaluatePlan.setIsDeleted("0");
|
|
|
coreEvaluatePlan.setIsDistribute("1");
|
|
|
coreEvaluatePlan.setStatus("0");
|
|
|
List<CoreEvaluatePlan> coreEvaluatePlans = baseMapper.selectCoreEvaluatePlanList(coreEvaluatePlan);
|
|
|
- if (CollectionUtils.isNotEmpty(coreEvaluatePlans)){
|
|
|
- coreEvaluatePlans.forEach(c->{
|
|
|
+ if (CollectionUtils.isNotEmpty(coreEvaluatePlans)) {
|
|
|
+ coreEvaluatePlans.forEach(c -> {
|
|
|
SysOrg org = new SysOrg();
|
|
|
org.setType(Integer.valueOf(c.getOrgType()));
|
|
|
org.setPath(c.getOrgPath());
|