Merge branch 'lixuetao'
This commit is contained in:
@@ -40,6 +40,12 @@ public class TtReportManageAct {
|
|||||||
@TableField("data_id")
|
@TableField("data_id")
|
||||||
private String dataId;
|
private String dataId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报告id
|
||||||
|
*/
|
||||||
|
@TableField("report_id")
|
||||||
|
private String reportId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报告名
|
* 报告名
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -463,9 +463,9 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
|||||||
double level = Double.parseDouble(levelId);
|
double level = Double.parseDouble(levelId);
|
||||||
double employeeType = Double.parseDouble(employeeTypeId);
|
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) {
|
(employeeType == EMPLOYEE_TYPE_ID_ONE)) {
|
||||||
list.getRecords().forEach(reportVo -> {
|
list.getRecords().forEach(reportVo -> {
|
||||||
reportVo.setPower(PREVIEW_DOWNLOAD);
|
reportVo.setPower(PREVIEW_DOWNLOAD);
|
||||||
});
|
});
|
||||||
@@ -641,9 +641,9 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
|||||||
double level = Double.parseDouble(levelId);
|
double level = Double.parseDouble(levelId);
|
||||||
double employeeType = Double.parseDouble(employeeTypeId);
|
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) {
|
(employeeType == EMPLOYEE_TYPE_ID_ONE)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//本人
|
//本人
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class TtReportManageActPageVO extends BasePageVO {
|
|||||||
*/
|
*/
|
||||||
private String dataId;
|
private String dataId;
|
||||||
|
|
||||||
|
private String reportId;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
<result column="task_id" property="taskId" />
|
<result column="task_id" property="taskId" />
|
||||||
<result column="prc_id" property="prcId" />
|
<result column="prc_id" property="prcId" />
|
||||||
<result column="data_id" property="dataId" />
|
<result column="data_id" property="dataId" />
|
||||||
|
<result column="report_id" property="reportId" />
|
||||||
<result column="name" property="name" />
|
<result column="name" property="name" />
|
||||||
<result column="keycontent" property="keyContent" />
|
<result column="keycontent" property="keyContent" />
|
||||||
<result column="maincontent" property="mainContent" />
|
<result column="maincontent" property="mainContent" />
|
||||||
@@ -33,7 +34,8 @@
|
|||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="BaseColumnList">
|
<sql id="BaseColumnList">
|
||||||
id,
|
id,
|
||||||
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
task_id, prc_id, data_id,report_id ,name, keycontent, maincontent, department, year, fileId, confidentialLevel,
|
||||||
|
privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
,secrecy_last,file_name
|
,secrecy_last,file_name
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@@ -51,6 +53,9 @@
|
|||||||
<if test="pageVO.dataId !=null and pageVO.dataId !=''">
|
<if test="pageVO.dataId !=null and pageVO.dataId !=''">
|
||||||
AND data_id LIKE CONCAT(CONCAT('%',#{pageVO.dataId}),'%')
|
AND data_id LIKE CONCAT(CONCAT('%',#{pageVO.dataId}),'%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="pageVO.reportId !=null and pageVO.reportId !=''">
|
||||||
|
AND report_id LIKE CONCAT(CONCAT('%',#{pageVO.reportId}),'%')
|
||||||
|
</if>
|
||||||
<if test="pageVO.name !=null and pageVO.name !=''">
|
<if test="pageVO.name !=null and pageVO.name !=''">
|
||||||
AND name LIKE CONCAT(CONCAT('%',#{pageVO.name}),'%')
|
AND name LIKE CONCAT(CONCAT('%',#{pageVO.name}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -128,7 +133,7 @@
|
|||||||
<select id="selectByDataId" resultMap="BaseResultMap">
|
<select id="selectByDataId" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
a.id,
|
a.id,
|
||||||
task_id, prc_id, data_id, name, keycontent, maincontent, department,
|
task_id, prc_id, data_id,report_id, name, keycontent, maincontent, department,
|
||||||
org.LONG_NAME as departmentName,
|
org.LONG_NAME as departmentName,
|
||||||
year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
,secrecy_last,file_name
|
,secrecy_last,file_name
|
||||||
@@ -141,7 +146,7 @@
|
|||||||
<select id="selectByPrcId" resultMap="BaseResultMap">
|
<select id="selectByPrcId" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
a.id,
|
a.id,
|
||||||
task_id, prc_id, data_id, name, keycontent, maincontent, department,
|
task_id, prc_id, data_id,report_id, name, keycontent, maincontent, department,
|
||||||
org.LONG_NAME as departmentName,
|
org.LONG_NAME as departmentName,
|
||||||
year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
,secrecy_last,file_name
|
,secrecy_last,file_name
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.adc.da.sys.entity.OrgEO;
|
|||||||
import com.adc.da.sys.entity.UserEO;
|
import com.adc.da.sys.entity.UserEO;
|
||||||
import com.adc.da.sys.vo.UserVO;
|
import com.adc.da.sys.vo.UserVO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -22,7 +21,9 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public interface UserEODao extends BaseMapper<UserEO> {
|
public interface UserEODao extends BaseMapper<UserEO> {
|
||||||
|
|
||||||
IPage<Map<String, Object>> list(IPage page, @Param("account") String account, @Param("roleName") String roleName);
|
List<Map<String, Object>> list(@Param("current")int current ,@Param("size") int size ,
|
||||||
|
@Param("account") String account,
|
||||||
|
@Param("roleName") String roleName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户及用户所对应的角色
|
* 查询用户及用户所对应的角色
|
||||||
@@ -47,4 +48,6 @@ public interface UserEODao extends BaseMapper<UserEO> {
|
|||||||
UserVO selectUserByIdNodel(String userId);
|
UserVO selectUserByIdNodel(String userId);
|
||||||
|
|
||||||
List<UserEO> getOwnLeader(@Param("Vo") List<OrgEO> orgEOList);
|
List<UserEO> getOwnLeader(@Param("Vo") List<OrgEO> orgEOList);
|
||||||
|
|
||||||
|
long listCount(@Param("account") String account, @Param("roleName") String roleName);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,14 +114,15 @@ public class UserEOServiceImpl implements IUserEoService {
|
|||||||
userRoleEO.setRoleId(c);
|
userRoleEO.setRoleId(c);
|
||||||
userRoleEODao.insert(userRoleEO);
|
userRoleEODao.insert(userRoleEO);
|
||||||
});
|
});
|
||||||
|
if (StringUtils.isNotEmpty(eo.getOrgId())){
|
||||||
String[] split = eo.getOrgId().split(",");
|
String[] split = eo.getOrgId().split(",");
|
||||||
// 插入组织关联表 暂时用不上,页面不维护组织机构
|
// 插入组织关联表 暂时用不上,页面不维护组织机构
|
||||||
for (String s : split) {
|
for (String s : split) {
|
||||||
UserOrgEO userOrgEO = new UserOrgEO();
|
UserOrgEO userOrgEO = new UserOrgEO();
|
||||||
userOrgEO.setUserId(eo.getUsid());
|
userOrgEO.setUserId(eo.getUsid());
|
||||||
userOrgEO.setOrgId(s);
|
userOrgEO.setOrgId(s);
|
||||||
userOrgEODao.insert(userOrgEO);
|
userOrgEODao.insert(userOrgEO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,10 +203,15 @@ public class UserEOServiceImpl implements IUserEoService {
|
|||||||
@Override
|
@Override
|
||||||
public IPage<Map<String, Object>> list(int pageNo, int pageSize, String account, String roleName) {
|
public IPage<Map<String, Object>> list(int pageNo, int pageSize, String account, String roleName) {
|
||||||
IPage page = new Page();
|
IPage page = new Page();
|
||||||
|
int i = pageNo - 1 ;
|
||||||
|
int current = i == 0 ? 0 : i * pageSize;
|
||||||
page.setCurrent(pageNo);
|
page.setCurrent(pageNo);
|
||||||
page.setSize(pageSize);
|
page.setSize(pageSize);
|
||||||
IPage<Map<String, Object>> list = dao.list(page, account, roleName);
|
List<Map<String, Object>> list = dao.list(current, pageSize, account, roleName);
|
||||||
return list;
|
long count = dao.listCount(account,roleName);
|
||||||
|
page.setTotal(count);
|
||||||
|
page.setRecords(list);
|
||||||
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -387,9 +393,9 @@ public class UserEOServiceImpl implements IUserEoService {
|
|||||||
if (StringUtils.isEmpty(userImportVO.getOperation())) {
|
if (StringUtils.isEmpty(userImportVO.getOperation())) {
|
||||||
throw new AdcDaBaseException("第"+(i+1)+"行"+"操作(add添加、full覆盖角色)不能为空");
|
throw new AdcDaBaseException("第"+(i+1)+"行"+"操作(add添加、full覆盖角色)不能为空");
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmpty(userImportVO.getIsUse())) {
|
// if (StringUtils.isEmpty(userImportVO.getIsUse())) {
|
||||||
throw new AdcDaBaseException("第"+(i+1)+"行"+"是否启用不能为空");
|
// throw new AdcDaBaseException("第"+(i+1)+"行"+"是否启用不能为空");
|
||||||
}
|
// }
|
||||||
if (!roleEOMap.keySet().contains(userImportVO.getRoleName())) {
|
if (!roleEOMap.keySet().contains(userImportVO.getRoleName())) {
|
||||||
throw new AdcDaBaseException("第"+(i+1)+"行"+"角色:" + userImportVO.getRoleName() + "不存在,请检查");
|
throw new AdcDaBaseException("第"+(i+1)+"行"+"角色:" + userImportVO.getRoleName() + "不存在,请检查");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ package com.adc.da.sys.vo;
|
|||||||
import com.adc.da.excel.annotation.Excel;
|
import com.adc.da.excel.annotation.Excel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class UserImportVO {
|
public class UserImportVO {
|
||||||
|
|
||||||
@@ -51,9 +48,8 @@ public class UserImportVO {
|
|||||||
|
|
||||||
private String updateTime;
|
private String updateTime;
|
||||||
|
|
||||||
|
// @Excel(name = "是否启用(0禁用、1启用)", width = 20)
|
||||||
@Excel(name = "是否启用(0禁用、1启用)", width = 20)
|
// private String isUse;
|
||||||
private String isUse;
|
|
||||||
|
|
||||||
@Excel(name = "姓名", width = 20)
|
@Excel(name = "姓名", width = 20)
|
||||||
private String usname;
|
private String usname;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<!-- 查询条件 -->
|
<!-- 查询条件 -->
|
||||||
<sql id="Base_Where_Clause">
|
<sql id="Base_Where_Clause">
|
||||||
<if test="pageVO.departmentCode != null and pageVO.DepartmentCode !=''">
|
<if test="pageVO.departmentCode != null and pageVO.DepartmentCode !=''">
|
||||||
and DEPARTMENT_CODE = #{pageVO.departmentCode}
|
and DEPARTMENT_CODE LIKE CONCAT(CONCAT('%',#{pageVO.departmentCode}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="pageVO.longName != null and pageVO.longName != ''">
|
<if test="pageVO.longName != null and pageVO.longName != ''">
|
||||||
and LONG_NAME LIKE CONCAT(CONCAT('%',#{pageVO.longName}) ,'%')
|
and LONG_NAME LIKE CONCAT(CONCAT('%',#{pageVO.longName}) ,'%')
|
||||||
|
|||||||
@@ -7,25 +7,40 @@
|
|||||||
date_format(t1.UPDATE_TIME,'%Y-%m-%d %H:%i:%S')CREATEDATE,
|
date_format(t1.UPDATE_TIME,'%Y-%m-%d %H:%i:%S')CREATEDATE,
|
||||||
GROUP_CONCAT( DISTINCT org.ID ) as ORGID,
|
GROUP_CONCAT( DISTINCT org.ID ) as ORGID,
|
||||||
GROUP_CONCAT( DISTINCT org.LONG_NAME )as ORGNAME
|
GROUP_CONCAT( DISTINCT org.LONG_NAME )as ORGNAME
|
||||||
from TS_USER t1
|
from
|
||||||
|
(
|
||||||
|
select * from TS_USER
|
||||||
|
where del_flag = 0
|
||||||
|
<if test="account !='' and account !=null">
|
||||||
|
and ACCOUNT like CONCAT('%',CONCAT(#{account},'%'))
|
||||||
|
</if>
|
||||||
|
<if test="roleName !='' and roleName !=null">
|
||||||
|
and NAME like CONCAT('%',CONCAT(#{roleName},'%'))
|
||||||
|
</if>
|
||||||
|
ORDER BY UPDATE_TIME DESC
|
||||||
|
LIMIT #{current},#{size}
|
||||||
|
) t1
|
||||||
left join TR_USER_ROLE t2 on t1.USID=t2.USER_ID
|
left join TR_USER_ROLE t2 on t1.USID=t2.USER_ID
|
||||||
left JOIN TS_ROLE t3 on t2.ROLE_ID=t3.ID
|
left JOIN TS_ROLE t3 on t2.ROLE_ID=t3.ID
|
||||||
left JOIN tr_user_org uo on t1.usid= uo.user_id
|
left JOIN tr_user_org uo on t1.usid= uo.user_id
|
||||||
left JOIN ts_org org on uo.org_id = org.id
|
left JOIN ts_org org on uo.org_id = org.id
|
||||||
where t1.del_flag='0'
|
|
||||||
<if test="account !='' and account !=null">
|
|
||||||
and t1.ACCOUNT like "%"#{account}"%"
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="roleName !='' and roleName !=null">
|
|
||||||
and t3.NAME like "%"#{roleName}"%"
|
|
||||||
</if>
|
|
||||||
GROUP BY t1.USID
|
GROUP BY t1.USID
|
||||||
ORDER BY t1.UPDATE_TIME DESC
|
ORDER BY t1.UPDATE_TIME DESC
|
||||||
)tt
|
)tt
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="listCount" resultType="java.lang.Long">
|
||||||
|
select count(1) from TS_USER
|
||||||
|
where del_flag = 0
|
||||||
|
<if test="account !='' and account !=null">
|
||||||
|
and ACCOUNT like CONCAT('%',CONCAT(#{account},'%'))
|
||||||
|
</if>
|
||||||
|
<if test="roleName !='' and roleName !=null">
|
||||||
|
and NAME like CONCAT('%',CONCAT(#{roleName},'%'))
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getUserCount" resultType="java.lang.Long">
|
<select id="getUserCount" resultType="java.lang.Long">
|
||||||
select count(*) from TS_USER t1
|
select count(*) from TS_USER t1
|
||||||
where t1.del_flag='0'
|
where t1.del_flag='0'
|
||||||
@@ -53,6 +68,7 @@
|
|||||||
<resultMap id="UserRoleMap" extends="BaseResultMap" type="com.adc.da.sys.entity.UserEO">
|
<resultMap id="UserRoleMap" extends="BaseResultMap" type="com.adc.da.sys.entity.UserEO">
|
||||||
<result column="usname" property="usname"/>
|
<result column="usname" property="usname"/>
|
||||||
<result column="LEVEL_ID" property="levelId"/>
|
<result column="LEVEL_ID" property="levelId"/>
|
||||||
|
<result column="EMPLOYEE_TYPE_ID" property="employeeTypeId"/>
|
||||||
<collection property = "roleIdList" ofType="string">
|
<collection property = "roleIdList" ofType="string">
|
||||||
<id column="id" />
|
<id column="id" />
|
||||||
</collection>
|
</collection>
|
||||||
@@ -266,6 +282,7 @@
|
|||||||
#{item.id}
|
#{item.id}
|
||||||
</foreach>
|
</foreach>
|
||||||
and (u.level_id=5 or u.level_id=9) and u.employee_type_id = 1
|
and (u.level_id=5 or u.level_id=9) and u.employee_type_id = 1
|
||||||
|
and u.del_flag = 0
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
+7
@@ -51,6 +51,13 @@ public class ActivitDefineService {
|
|||||||
if (StringUtils.isBlank(reportId)){
|
if (StringUtils.isBlank(reportId)){
|
||||||
reportId = UUID.randomUUID().toString().replace("-","");
|
reportId = UUID.randomUUID().toString().replace("-","");
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* prcId为空时,是指保存到草稿 ,dataJson是有reportId的,
|
||||||
|
* 此时 给reportId一个唯一值,是为了付给 dataId
|
||||||
|
*/
|
||||||
|
if (StringUtils.isBlank(prcId)){
|
||||||
|
reportId = UUID.randomUUID().toString().replace("-","");
|
||||||
|
}
|
||||||
if ("".equals(prcType)){
|
if ("".equals(prcType)){
|
||||||
// 保存到草稿 ,没有选择 要申请的权限
|
// 保存到草稿 ,没有选择 要申请的权限
|
||||||
PowerApplyAct powerApplyAct = JSONObject.parseObject(dataJson, PowerApplyAct.class);
|
PowerApplyAct powerApplyAct = JSONObject.parseObject(dataJson, PowerApplyAct.class);
|
||||||
|
|||||||
+12
-10
@@ -163,16 +163,18 @@ public class TaskController {
|
|||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
Object endTime = historicTaskInstance.get("endTime");
|
Object endTime = historicTaskInstance.get("endTime");
|
||||||
map.put("endTime",historicTaskInstance.get("endTime"));
|
if (endTime != null){
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
map.put("endTime",historicTaskInstance.get("endTime"));
|
||||||
Date endTimed = sdf.parse((String)endTime);
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
LocalDateTime en =
|
Date endTimed = sdf.parse((String)endTime);
|
||||||
LocalDateTime.ofInstant(endTimed.toInstant(), ZoneId.systemDefault());
|
LocalDateTime en =
|
||||||
LocalDateTime startDateTime = LocalDateTime.ofInstant(busProcessEntrust.getCreateTime().toInstant()
|
LocalDateTime.ofInstant(endTimed.toInstant(), ZoneId.systemDefault());
|
||||||
, ZoneId.systemDefault());
|
LocalDateTime startDateTime = LocalDateTime.ofInstant(busProcessEntrust.getCreateTime().toInstant()
|
||||||
LocalDateTime endDateTime = LocalDateTime.ofInstant(endTimed.toInstant(), ZoneId.systemDefault());
|
, ZoneId.systemDefault());
|
||||||
long days = Duration.between(startDateTime.toLocalDate().atStartOfDay(), endDateTime.toLocalDate().atStartOfDay()).toDays() + 1;
|
LocalDateTime endDateTime = LocalDateTime.ofInstant(endTimed.toInstant(), ZoneId.systemDefault());
|
||||||
map.put("approvalTime",days + "天");
|
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"));
|
||||||
|
|||||||
Reference in New Issue
Block a user