Merge remote-tracking branch 'origin/lixuetao' into lixuetao
This commit is contained in:
@@ -51,4 +51,9 @@ public class PowerApplyConstants {
|
|||||||
* 有预览和下载全部报告权限的levelId
|
* 有预览和下载全部报告权限的levelId
|
||||||
*/
|
*/
|
||||||
public static final Double SPECIAL_LEVEL_FOUL = 4.0;
|
public static final Double SPECIAL_LEVEL_FOUL = 4.0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有预览和下载全部报告权限的Employee_TYPE_ID
|
||||||
|
*/
|
||||||
|
public static final Double EMPLOYEE_TYPE_ID_ONE = 1.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -458,11 +458,14 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
|||||||
//设置权限
|
//设置权限
|
||||||
UserEO userEo = userEODao.selectById(UserUtils.getUserId());
|
UserEO userEo = userEODao.selectById(UserUtils.getUserId());
|
||||||
String levelId = userEo.getLevelId() == null ? "0.8" : userEo.getLevelId();
|
String levelId = userEo.getLevelId() == null ? "0.8" : userEo.getLevelId();
|
||||||
|
String employeeTypeId = userEo.getEmployeeTypeId() == null ? "0.8" : userEo.getEmployeeTypeId();
|
||||||
//用户级别
|
//用户级别
|
||||||
double level = Double.parseDouble(levelId);
|
double level = Double.parseDouble(levelId);
|
||||||
|
double employeeType = Double.parseDouble(employeeTypeId);
|
||||||
//总监拥有全部报告的预览和下载权力
|
//总监拥有全部报告的预览和下载权力
|
||||||
if (level == SPECIAL_LEVEL_ONE || level == SPECIAL_LEVEL_TWO ||
|
if (level == SPECIAL_LEVEL_ONE || level == SPECIAL_LEVEL_TWO ||
|
||||||
level == SPECIAL_LEVEL_THREE || level == SPECIAL_LEVEL_FOUL) {
|
level == SPECIAL_LEVEL_THREE || level == SPECIAL_LEVEL_FOUL ||
|
||||||
|
employeeType == EMPLOYEE_TYPE_ID_ONE) {
|
||||||
list.getRecords().forEach(reportVo -> {
|
list.getRecords().forEach(reportVo -> {
|
||||||
reportVo.setPower(PREVIEW_DOWNLOAD);
|
reportVo.setPower(PREVIEW_DOWNLOAD);
|
||||||
});
|
});
|
||||||
@@ -632,9 +635,15 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
|||||||
//校验权限
|
//校验权限
|
||||||
//总监(levelId)
|
//总监(levelId)
|
||||||
UserEO userEo = userEODao.selectById(userId);
|
UserEO userEo = userEODao.selectById(userId);
|
||||||
Double levelId = Double.parseDouble(userEo.getLevelId() == null ? "1.0" : userEo.getLevelId());
|
String levelId = userEo.getLevelId() == null ? "0.8" : userEo.getLevelId();
|
||||||
if (levelId.equals(SPECIAL_LEVEL_ONE) || levelId.equals(SPECIAL_LEVEL_TWO) ||
|
String employeeTypeId = userEo.getEmployeeTypeId() == null ? "0.8" : userEo.getEmployeeTypeId();
|
||||||
levelId.equals(SPECIAL_LEVEL_THREE) || levelId.equals(SPECIAL_LEVEL_FOUL)) {
|
//用户级别
|
||||||
|
double level = Double.parseDouble(levelId);
|
||||||
|
double employeeType = Double.parseDouble(employeeTypeId);
|
||||||
|
//总监拥有全部报告的预览和下载权力
|
||||||
|
if (level == SPECIAL_LEVEL_ONE || level == SPECIAL_LEVEL_TWO ||
|
||||||
|
level == SPECIAL_LEVEL_THREE || level == SPECIAL_LEVEL_FOUL ||
|
||||||
|
employeeType == EMPLOYEE_TYPE_ID_ONE) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//本人
|
//本人
|
||||||
@@ -680,11 +689,13 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
|||||||
ReportDetailVo reportDetailVo = reportDao.reportDetail(reportId);
|
ReportDetailVo reportDetailVo = reportDao.reportDetail(reportId);
|
||||||
//设置部门名称
|
//设置部门名称
|
||||||
String department = reportDetailVo.getDepartment();
|
String department = reportDetailVo.getDepartment();
|
||||||
String[] idArray = department.split(",");
|
if (StrUtil.isNotBlank(department)) {
|
||||||
List<OrgEO> orgEOList = orgEOService.query().in("ID", idArray).list();
|
String[] idArray = department.split(",");
|
||||||
if (CollectionUtils.isNotEmpty(orgEOList)) {
|
List<OrgEO> orgEOList = orgEOService.query().in("ID", idArray).list();
|
||||||
String departmentName = orgEOList.stream().map(OrgEO::getOrgName).collect(Collectors.joining(","));
|
if (CollectionUtils.isNotEmpty(orgEOList)) {
|
||||||
reportDetailVo.setDepartmentName(departmentName);
|
String departmentName = orgEOList.stream().map(OrgEO::getOrgName).collect(Collectors.joining(","));
|
||||||
|
reportDetailVo.setDepartmentName(departmentName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//设置标签列表
|
//设置标签列表
|
||||||
|
|||||||
@@ -38,6 +38,11 @@ public class ReportCommentVo {
|
|||||||
*/
|
*/
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名
|
||||||
|
*/
|
||||||
|
private String account;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评论
|
* 评论
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -228,7 +228,7 @@
|
|||||||
ORDER BY updateDate desc
|
ORDER BY updateDate desc
|
||||||
</select>
|
</select>
|
||||||
<select id="isAct" resultType="java.lang.String">
|
<select id="isAct" resultType="java.lang.String">
|
||||||
SELECT rep.name FROM
|
SELECT pro.prc_name FROM
|
||||||
bus_process_name pro
|
bus_process_name pro
|
||||||
WHERE pro.CREAT_USER = #{Vo.usid}
|
WHERE pro.CREAT_USER = #{Vo.usid}
|
||||||
and pro.SUBMIT_STATUS = 1
|
and pro.SUBMIT_STATUS = 1
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
<foreach collection="Vo.ids" item="id" open="(" separator="," close=")">
|
<foreach collection="Vo.ids" item="id" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
GROUP BY rep.id;
|
GROUP BY pro.id;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectByidAndName" resultType="java.lang.Long">
|
<select id="selectByidAndName" resultType="java.lang.Long">
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
ruc.id AS id,
|
ruc.id AS id,
|
||||||
ruc.user_id AS userId,
|
ruc.user_id AS userId,
|
||||||
u.USNAME AS userName,
|
u.USNAME AS userName,
|
||||||
|
u.ACCOUNT AS account,
|
||||||
ruc.comment AS comment,
|
ruc.comment AS comment,
|
||||||
ruc.create_time AS createTime
|
ruc.create_time AS createTime
|
||||||
FROM
|
FROM
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -228,7 +228,7 @@
|
|||||||
ORDER BY updateDate desc
|
ORDER BY updateDate desc
|
||||||
</select>
|
</select>
|
||||||
<select id="isAct" resultType="java.lang.String">
|
<select id="isAct" resultType="java.lang.String">
|
||||||
SELECT rep.name FROM
|
SELECT pro.prc_name FROM
|
||||||
bus_process_name pro
|
bus_process_name pro
|
||||||
WHERE pro.CREAT_USER = #{Vo.usid}
|
WHERE pro.CREAT_USER = #{Vo.usid}
|
||||||
and pro.SUBMIT_STATUS = 1
|
and pro.SUBMIT_STATUS = 1
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
<foreach collection="Vo.ids" item="id" open="(" separator="," close=")">
|
<foreach collection="Vo.ids" item="id" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
GROUP BY rep.id;
|
GROUP BY pro.id;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectByidAndName" resultType="java.lang.Long">
|
<select id="selectByidAndName" resultType="java.lang.Long">
|
||||||
|
|||||||
@@ -157,21 +157,12 @@ public class MenuEOController extends BaseController<MenuEO> {
|
|||||||
|
|
||||||
if (roleId != null && !"".equals(roleId)) {
|
if (roleId != null && !"".equals(roleId)) {
|
||||||
roleMenuEOPage.setRoleId(roleId);
|
roleMenuEOPage.setRoleId(roleId);
|
||||||
RoleEO roleEO = roleEOService.selectByPrimaryKey(roleId);
|
List<RoleMenuEO> roleMenuEOList =roleMenuEOService.queryByList(roleMenuEOPage);
|
||||||
if ("管理员".equals(roleEO.getName())) {
|
for (MenuVO menuVO : menuVOs) {
|
||||||
menuVOs.forEach(menuVO -> {
|
for (RoleMenuEO roleMenuEO : roleMenuEOList){
|
||||||
if (!"1".equals(menuVO.getIsButton())) {
|
if (StringUtils.equals(menuVO.getId(),roleMenuEO.getMenuId())){
|
||||||
menuVO.setBelong(IsBelongEnum.BELONG.getValue());
|
menuVO.setBelong(IsBelongEnum.BELONG.getValue());
|
||||||
}
|
break;
|
||||||
});
|
|
||||||
}else{
|
|
||||||
List<RoleMenuEO> roleMenuEOList =roleMenuEOService.queryByList(roleMenuEOPage);
|
|
||||||
for (MenuVO menuVO : menuVOs) {
|
|
||||||
for (RoleMenuEO roleMenuEO : roleMenuEOList){
|
|
||||||
if (StringUtils.equals(menuVO.getId(),roleMenuEO.getMenuId()) && !"1".equals(menuVO.getIsButton())){
|
|
||||||
menuVO.setBelong(IsBelongEnum.BELONG.getValue());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
@Service("orgEOService")
|
@Service("orgEOService")
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -73,6 +72,7 @@ public class OrgEOService extends ServiceImpl<OrgEODao, OrgEO> implements IOrgEo
|
|||||||
orgEO.setId(orgEO.getDepartmentCode());
|
orgEO.setId(orgEO.getDepartmentCode());
|
||||||
baseMapper.insert(orgEO);
|
baseMapper.insert(orgEO);
|
||||||
}else{
|
}else{
|
||||||
|
orgEO.setId(orgEO.getOrgCode());
|
||||||
baseMapper.updateById(orgEO);
|
baseMapper.updateById(orgEO);
|
||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -18,11 +18,12 @@
|
|||||||
<result column="remarks" property="remarks"/>
|
<result column="remarks" property="remarks"/>
|
||||||
<result column="sort" property="sort"/>
|
<result column="sort" property="sort"/>
|
||||||
<result column="ext_info" property="extInfo" />
|
<result column="ext_info" property="extInfo" />
|
||||||
|
<result column="is_button" property="isButton" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- TS_MENU table all fields -->
|
<!-- TS_MENU table all fields -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, del_flag, name, parent_id, parent_ids, href, icon,iconHref,iconClick,iconClickHref, is_show, permission, remarks, sort, ext_info,is_url
|
id, del_flag, name, parent_id, parent_ids, href, icon,iconHref,iconClick,iconClickHref, is_show, permission, remarks, sort, ext_info,is_url,is_button
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 用于按名称查询记录时的sql,添加前缀TS_MENU -->
|
<!-- 用于按名称查询记录时的sql,添加前缀TS_MENU -->
|
||||||
|
|||||||
+14
-2
@@ -138,7 +138,7 @@ public class TaskController {
|
|||||||
String endTime = en.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
String endTime = en.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||||
map.put("endTime",endTime);
|
map.put("endTime",endTime);
|
||||||
LocalDateTime startDateTime =
|
LocalDateTime startDateTime =
|
||||||
LocalDateTime.ofInstant(busProcessEntrust1.getCreateTime().toInstant(),
|
LocalDateTime.ofInstant(busProcessEntrust.getCreateTime().toInstant(),
|
||||||
ZoneId.systemDefault());
|
ZoneId.systemDefault());
|
||||||
LocalDateTime endDateTime = LocalDateTime.ofInstant(busProcessEntrust1.getCreateTime().toInstant(), ZoneId.systemDefault());
|
LocalDateTime endDateTime = LocalDateTime.ofInstant(busProcessEntrust1.getCreateTime().toInstant(), ZoneId.systemDefault());
|
||||||
long days = Duration.between(startDateTime.toLocalDate().atStartOfDay(), endDateTime.toLocalDate().atStartOfDay()).toDays() + 1;
|
long days = Duration.between(startDateTime.toLocalDate().atStartOfDay(), endDateTime.toLocalDate().atStartOfDay()).toDays() + 1;
|
||||||
@@ -155,12 +155,24 @@ public class TaskController {
|
|||||||
String endTimestr = en.format(DateTimeFormatter.ofPattern("yyyy-MM-dd " +
|
String endTimestr = en.format(DateTimeFormatter.ofPattern("yyyy-MM-dd " +
|
||||||
"HH:mm:ss"));
|
"HH:mm:ss"));
|
||||||
map.put("endTime",endTimestr);
|
map.put("endTime",endTimestr);
|
||||||
LocalDateTime startDateTime = LocalDateTime.ofInstant(createTime1.toInstant()
|
LocalDateTime startDateTime = LocalDateTime.ofInstant(busProcessEntrust.getCreateTime().toInstant()
|
||||||
, ZoneId.systemDefault());
|
, ZoneId.systemDefault());
|
||||||
LocalDateTime endDateTime = LocalDateTime.ofInstant(endTime.toInstant(), ZoneId.systemDefault());
|
LocalDateTime endDateTime = LocalDateTime.ofInstant(endTime.toInstant(), ZoneId.systemDefault());
|
||||||
long days = Duration.between(startDateTime.toLocalDate().atStartOfDay(), endDateTime.toLocalDate().atStartOfDay()).toDays() + 1;
|
long days = Duration.between(startDateTime.toLocalDate().atStartOfDay(), endDateTime.toLocalDate().atStartOfDay()).toDays() + 1;
|
||||||
map.put("approvalTime",days + "天");
|
map.put("approvalTime",days + "天");
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
Object endTime = historicTaskInstance.get("endTime");
|
||||||
|
map.put("endTime",historicTaskInstance.get("endTime"));
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
Date endTimed = sdf.parse((String)endTime);
|
||||||
|
LocalDateTime en =
|
||||||
|
LocalDateTime.ofInstant(endTimed.toInstant(), ZoneId.systemDefault());
|
||||||
|
LocalDateTime startDateTime = LocalDateTime.ofInstant(busProcessEntrust.getCreateTime().toInstant()
|
||||||
|
, ZoneId.systemDefault());
|
||||||
|
LocalDateTime endDateTime = LocalDateTime.ofInstant(endTimed.toInstant(), ZoneId.systemDefault());
|
||||||
|
long days = Duration.between(startDateTime.toLocalDate().atStartOfDay(), endDateTime.toLocalDate().atStartOfDay()).toDays() + 1;
|
||||||
|
map.put("approvalTime",days + "天");
|
||||||
}
|
}
|
||||||
QueryWrapper<BusProcessApprove> datasQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<BusProcessApprove> datasQueryWrapper = new QueryWrapper<>();
|
||||||
datasQueryWrapper.lambda().eq(BusProcessApprove::getTaskId,historicTaskInstance.get("id"));
|
datasQueryWrapper.lambda().eq(BusProcessApprove::getTaskId,historicTaskInstance.get("id"));
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user