Merge branch 'lixuetao'
This commit is contained in:
@@ -40,6 +40,12 @@ public class TtReportManageAct {
|
||||
@TableField("data_id")
|
||||
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 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) {
|
||||
if ((level == SPECIAL_LEVEL_ONE || level == SPECIAL_LEVEL_TWO ||
|
||||
level == SPECIAL_LEVEL_THREE || level == SPECIAL_LEVEL_FOUL) &&
|
||||
(employeeType == EMPLOYEE_TYPE_ID_ONE)) {
|
||||
list.getRecords().forEach(reportVo -> {
|
||||
reportVo.setPower(PREVIEW_DOWNLOAD);
|
||||
});
|
||||
@@ -641,9 +641,9 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
||||
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) {
|
||||
if ((level == SPECIAL_LEVEL_ONE || level == SPECIAL_LEVEL_TWO ||
|
||||
level == SPECIAL_LEVEL_THREE || level == SPECIAL_LEVEL_FOUL) &&
|
||||
(employeeType == EMPLOYEE_TYPE_ID_ONE)) {
|
||||
return true;
|
||||
}
|
||||
//本人
|
||||
|
||||
@@ -32,6 +32,7 @@ public class TtReportManageActPageVO extends BasePageVO {
|
||||
*/
|
||||
private String dataId;
|
||||
|
||||
private String reportId;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<result column="task_id" property="taskId" />
|
||||
<result column="prc_id" property="prcId" />
|
||||
<result column="data_id" property="dataId" />
|
||||
<result column="report_id" property="reportId" />
|
||||
<result column="name" property="name" />
|
||||
<result column="keycontent" property="keyContent" />
|
||||
<result column="maincontent" property="mainContent" />
|
||||
@@ -33,7 +34,8 @@
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="BaseColumnList">
|
||||
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
|
||||
</sql>
|
||||
|
||||
@@ -51,6 +53,9 @@
|
||||
<if test="pageVO.dataId !=null and pageVO.dataId !=''">
|
||||
AND data_id LIKE CONCAT(CONCAT('%',#{pageVO.dataId}),'%')
|
||||
</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 !=''">
|
||||
AND name LIKE CONCAT(CONCAT('%',#{pageVO.name}),'%')
|
||||
</if>
|
||||
@@ -128,7 +133,7 @@
|
||||
<select id="selectByDataId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
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,
|
||||
year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||
,secrecy_last,file_name
|
||||
@@ -141,7 +146,7 @@
|
||||
<select id="selectByPrcId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
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,
|
||||
year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||
,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.vo.UserVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -22,7 +21,9 @@ import java.util.Map;
|
||||
*/
|
||||
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);
|
||||
|
||||
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);
|
||||
userRoleEODao.insert(userRoleEO);
|
||||
});
|
||||
|
||||
String[] split = eo.getOrgId().split(",");
|
||||
// 插入组织关联表 暂时用不上,页面不维护组织机构
|
||||
for (String s : split) {
|
||||
UserOrgEO userOrgEO = new UserOrgEO();
|
||||
userOrgEO.setUserId(eo.getUsid());
|
||||
userOrgEO.setOrgId(s);
|
||||
userOrgEODao.insert(userOrgEO);
|
||||
if (StringUtils.isNotEmpty(eo.getOrgId())){
|
||||
String[] split = eo.getOrgId().split(",");
|
||||
// 插入组织关联表 暂时用不上,页面不维护组织机构
|
||||
for (String s : split) {
|
||||
UserOrgEO userOrgEO = new UserOrgEO();
|
||||
userOrgEO.setUserId(eo.getUsid());
|
||||
userOrgEO.setOrgId(s);
|
||||
userOrgEODao.insert(userOrgEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,10 +203,15 @@ public class UserEOServiceImpl implements IUserEoService {
|
||||
@Override
|
||||
public IPage<Map<String, Object>> list(int pageNo, int pageSize, String account, String roleName) {
|
||||
IPage page = new Page();
|
||||
int i = pageNo - 1 ;
|
||||
int current = i == 0 ? 0 : i * pageSize;
|
||||
page.setCurrent(pageNo);
|
||||
page.setSize(pageSize);
|
||||
IPage<Map<String, Object>> list = dao.list(page, account, roleName);
|
||||
return list;
|
||||
List<Map<String, Object>> list = dao.list(current, pageSize, account, roleName);
|
||||
long count = dao.listCount(account,roleName);
|
||||
page.setTotal(count);
|
||||
page.setRecords(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -387,9 +393,9 @@ public class UserEOServiceImpl implements IUserEoService {
|
||||
if (StringUtils.isEmpty(userImportVO.getOperation())) {
|
||||
throw new AdcDaBaseException("第"+(i+1)+"行"+"操作(add添加、full覆盖角色)不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(userImportVO.getIsUse())) {
|
||||
throw new AdcDaBaseException("第"+(i+1)+"行"+"是否启用不能为空");
|
||||
}
|
||||
// if (StringUtils.isEmpty(userImportVO.getIsUse())) {
|
||||
// throw new AdcDaBaseException("第"+(i+1)+"行"+"是否启用不能为空");
|
||||
// }
|
||||
if (!roleEOMap.keySet().contains(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 lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class UserImportVO {
|
||||
|
||||
@@ -51,9 +48,8 @@ public class UserImportVO {
|
||||
|
||||
private String updateTime;
|
||||
|
||||
|
||||
@Excel(name = "是否启用(0禁用、1启用)", width = 20)
|
||||
private String isUse;
|
||||
// @Excel(name = "是否启用(0禁用、1启用)", width = 20)
|
||||
// private String isUse;
|
||||
|
||||
@Excel(name = "姓名", width = 20)
|
||||
private String usname;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
<if test="pageVO.departmentCode != null and pageVO.DepartmentCode !=''">
|
||||
and DEPARTMENT_CODE = #{pageVO.departmentCode}
|
||||
and DEPARTMENT_CODE LIKE CONCAT(CONCAT('%',#{pageVO.departmentCode}),'%')
|
||||
</if>
|
||||
<if test="pageVO.longName != null and 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,
|
||||
GROUP_CONCAT( DISTINCT org.ID ) as ORGID,
|
||||
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 TS_ROLE t3 on t2.ROLE_ID=t3.ID
|
||||
left JOIN tr_user_org uo on t1.usid= uo.user_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
|
||||
ORDER BY t1.UPDATE_TIME DESC
|
||||
)tt
|
||||
|
||||
</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 count(*) from TS_USER t1
|
||||
where t1.del_flag='0'
|
||||
@@ -53,6 +68,7 @@
|
||||
<resultMap id="UserRoleMap" extends="BaseResultMap" type="com.adc.da.sys.entity.UserEO">
|
||||
<result column="usname" property="usname"/>
|
||||
<result column="LEVEL_ID" property="levelId"/>
|
||||
<result column="EMPLOYEE_TYPE_ID" property="employeeTypeId"/>
|
||||
<collection property = "roleIdList" ofType="string">
|
||||
<id column="id" />
|
||||
</collection>
|
||||
@@ -266,6 +282,7 @@
|
||||
#{item.id}
|
||||
</foreach>
|
||||
and (u.level_id=5 or u.level_id=9) and u.employee_type_id = 1
|
||||
and u.del_flag = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Binary file not shown.
+7
@@ -51,6 +51,13 @@ public class ActivitDefineService {
|
||||
if (StringUtils.isBlank(reportId)){
|
||||
reportId = UUID.randomUUID().toString().replace("-","");
|
||||
}
|
||||
/**
|
||||
* prcId为空时,是指保存到草稿 ,dataJson是有reportId的,
|
||||
* 此时 给reportId一个唯一值,是为了付给 dataId
|
||||
*/
|
||||
if (StringUtils.isBlank(prcId)){
|
||||
reportId = UUID.randomUUID().toString().replace("-","");
|
||||
}
|
||||
if ("".equals(prcType)){
|
||||
// 保存到草稿 ,没有选择 要申请的权限
|
||||
PowerApplyAct powerApplyAct = JSONObject.parseObject(dataJson, PowerApplyAct.class);
|
||||
|
||||
+12
-10
@@ -163,16 +163,18 @@ public class TaskController {
|
||||
}
|
||||
}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 + "天");
|
||||
if (endTime != null){
|
||||
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<>();
|
||||
datasQueryWrapper.lambda().eq(BusProcessApprove::getTaskId,historicTaskInstance.get("id"));
|
||||
|
||||
Reference in New Issue
Block a user