|
|
@@ -5,9 +5,7 @@ import java.math.RoundingMode;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.YearMonth;
|
|
|
import java.time.ZoneId;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
+import java.util.*;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
|
import com.ygtx.common.core.domain.entity.SysDept;
|
|
|
@@ -15,7 +13,10 @@ import com.ygtx.common.core.domain.entity.SysUser;
|
|
|
import com.ygtx.common.utils.SecurityUtils;
|
|
|
import com.ygtx.gxt.domain.*;
|
|
|
import com.ygtx.gxt.mapper.*;
|
|
|
+import com.ygtx.system.domain.SysPostHomePage;
|
|
|
import com.ygtx.system.mapper.SysDeptMapper;
|
|
|
+import com.ygtx.system.mapper.SysPostHomePageMapper;
|
|
|
+import com.ygtx.system.mapper.SysRoleMapper;
|
|
|
import com.ygtx.system.mapper.SysUserMapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -75,6 +76,9 @@ public class GxtMonthScoreServiceImpl implements IGxtMonthScoreService
|
|
|
@Autowired
|
|
|
private GxtRepairOrderPersonMapper gxtRepairOrderPersonMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SysPostHomePageMapper sysPostHomePageMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 查询月度统计表
|
|
|
*
|
|
|
@@ -540,6 +544,8 @@ public class GxtMonthScoreServiceImpl implements IGxtMonthScoreService
|
|
|
userScore.setMonthScoreId(monthScore.getId());
|
|
|
if (rtType==0) {
|
|
|
userScore.setUserName(userName);
|
|
|
+ }else {
|
|
|
+ userScore.setRankPermission(getJXY());
|
|
|
}
|
|
|
List<GxtUserScore> userScores = gxtUserScoreMapper.selectGxtUserScoreList(userScore);
|
|
|
|
|
|
@@ -578,6 +584,30 @@ public class GxtMonthScoreServiceImpl implements IGxtMonthScoreService
|
|
|
return monthScore;
|
|
|
}
|
|
|
|
|
|
+ private String getJXY() {
|
|
|
+ SysPostHomePage postHomePage = new SysPostHomePage();
|
|
|
+ postHomePage.setStatus("0");
|
|
|
+ postHomePage.setHomePageType("5");
|
|
|
+ List<SysPostHomePage> list = sysPostHomePageMapper.selectSysPostHomePageList(postHomePage);
|
|
|
+ if (!list.isEmpty()) {
|
|
|
+ postHomePage = list.get(0);
|
|
|
+ String permission = "";
|
|
|
+ SysUser user = new SysUser();
|
|
|
+ user.setStatus("0");
|
|
|
+ user.setDelFlag("0");
|
|
|
+ user.setRankPermission(postHomePage.getPostIds());
|
|
|
+ List<SysUser> users = sysUserMapper.selectUserListByDeptId(user);
|
|
|
+ if (!users.isEmpty()) {
|
|
|
+ for (SysUser sysUser : users) {
|
|
|
+ permission += "," + sysUser.getUserId();
|
|
|
+ }
|
|
|
+ permission = permission.substring(1);
|
|
|
+ }
|
|
|
+ return permission;
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public GxtMonthScore getGxtMonthScoreByParams(Integer rtType,String permission,Long id) {
|