Merge branch '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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,4 +54,6 @@ public interface PowerApplyActDao extends BaseMapper<PowerApplyAct> {
|
|||||||
List<PowerApplyAct> selectActListBydataId(@Param("dataId")String dataId);
|
List<PowerApplyAct> selectActListBydataId(@Param("dataId")String dataId);
|
||||||
|
|
||||||
int batchDel(@Param("ids") List<String> ids);
|
int batchDel(@Param("ids") List<String> ids);
|
||||||
|
|
||||||
|
boolean deleteByDataId(String dataId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,4 +47,7 @@ public interface TtReportManageActDao extends BaseMapper<TtReportManageAct> {
|
|||||||
List<TtReportManageAct> selectByDataId(String dataId);
|
List<TtReportManageAct> selectByDataId(String dataId);
|
||||||
|
|
||||||
TtReportManageAct selectByPrcId(String prcId);
|
TtReportManageAct selectByPrcId(String prcId);
|
||||||
|
|
||||||
|
boolean deleteByDataId(String dataId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//设置标签列表
|
//设置标签列表
|
||||||
|
|||||||
@@ -67,6 +67,10 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<update id="deleteByDataId">
|
||||||
|
UPDATE power_apply_act set del_flag = 1
|
||||||
|
where data_id = #{dataId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<!-- 根据查询VO进行分页查询 -->
|
<!-- 根据查询VO进行分页查询 -->
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|||||||
@@ -90,6 +90,10 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
|
<update id="deleteByDataId">
|
||||||
|
UPDATE <include refid="TableName"/> set del_flag = 1
|
||||||
|
where data_id = #{dataId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<!-- 根据查询VO进行分页查询 -->
|
<!-- 根据查询VO进行分页查询 -->
|
||||||
<select id="selectPage" resultMap="BaseResultMap">
|
<select id="selectPage" resultMap="BaseResultMap">
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -67,6 +67,10 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<update id="deleteByDataId">
|
||||||
|
UPDATE power_apply_act set del_flag = 1
|
||||||
|
where data_id = #{dataId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<!-- 根据查询VO进行分页查询 -->
|
<!-- 根据查询VO进行分页查询 -->
|
||||||
|
|||||||
@@ -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">
|
||||||
@@ -286,7 +286,8 @@
|
|||||||
rm.fileId AS fileId,
|
rm.fileId AS fileId,
|
||||||
f.file_name as fileName,
|
f.file_name as fileName,
|
||||||
rm.confidentialLevel AS confidentialLevel,
|
rm.confidentialLevel AS confidentialLevel,
|
||||||
rm.privacyLevel AS privacyLevel
|
rm.privacyLevel AS privacyLevel,
|
||||||
|
rm.secrecy_last AS secrecyLast
|
||||||
FROM `tt_report_manage` AS rm
|
FROM `tt_report_manage` AS rm
|
||||||
LEFT JOIN ts_user AS u ON u.USID = rm.createUserId
|
LEFT JOIN ts_user AS u ON u.USID = rm.createUserId
|
||||||
LEFT JOIN ts_org as org on org.id = rm.department
|
LEFT JOIN ts_org as org on org.id = rm.department
|
||||||
|
|||||||
@@ -90,6 +90,10 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
|
<update id="deleteByDataId">
|
||||||
|
UPDATE <include refid="TableName"/> set del_flag = 1
|
||||||
|
where data_id = #{dataId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<!-- 根据查询VO进行分页查询 -->
|
<!-- 根据查询VO进行分页查询 -->
|
||||||
<select id="selectPage" resultMap="BaseResultMap">
|
<select id="selectPage" resultMap="BaseResultMap">
|
||||||
|
|||||||
@@ -160,20 +160,21 @@ public class MenuEOController extends BaseController<MenuEO> {
|
|||||||
RoleEO roleEO = roleEOService.selectByPrimaryKey(roleId);
|
RoleEO roleEO = roleEOService.selectByPrimaryKey(roleId);
|
||||||
if ("管理员".equals(roleEO.getName())) {
|
if ("管理员".equals(roleEO.getName())) {
|
||||||
menuVOs.forEach(menuVO -> {
|
menuVOs.forEach(menuVO -> {
|
||||||
menuVO.setBelong(IsBelongEnum.BELONG.getValue());
|
if (!"1".equals(menuVO.getIsButton())) {
|
||||||
|
menuVO.setBelong(IsBelongEnum.BELONG.getValue());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
List<RoleMenuEO> roleMenuEOList =roleMenuEOService.queryByList(roleMenuEOPage);
|
List<RoleMenuEO> roleMenuEOList =roleMenuEOService.queryByList(roleMenuEOPage);
|
||||||
for (MenuVO menuVO : menuVOs) {
|
for (MenuVO menuVO : menuVOs) {
|
||||||
for (RoleMenuEO roleMenuEO : roleMenuEOList){
|
for (RoleMenuEO roleMenuEO : roleMenuEOList){
|
||||||
if (StringUtils.equals(menuVO.getId(),roleMenuEO.getMenuId())){
|
if (StringUtils.equals(menuVO.getId(),roleMenuEO.getMenuId()) && !"1".equals(menuVO.getIsButton())){
|
||||||
menuVO.setBelong(IsBelongEnum.BELONG.getValue());
|
menuVO.setBelong(IsBelongEnum.BELONG.getValue());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//List<MenuVO> levelMenus = menuEOService.changeMenu(menuVOs);
|
//List<MenuVO> levelMenus = menuEOService.changeMenu(menuVOs);
|
||||||
|
|||||||
@@ -112,10 +112,7 @@ public class UserEOController extends BaseController<UserEO> {
|
|||||||
if (userEOService.getUserByLoginName(eo.getAccount(), eo.getUsid()) != null) {
|
if (userEOService.getUserByLoginName(eo.getAccount(), eo.getUsid()) != null) {
|
||||||
return Result.error("用户名已存在!");
|
return Result.error("用户名已存在!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
userEOService.save(eo);
|
userEOService.save(eo);
|
||||||
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,19 @@ public class MenuEO extends TreeEntity implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String isUrl;
|
private String isUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1代表是按钮
|
||||||
|
*/
|
||||||
|
private String isButton;
|
||||||
|
|
||||||
|
public String getIsButton() {
|
||||||
|
return isButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsButton(String isButton) {
|
||||||
|
this.isButton = isButton;
|
||||||
|
}
|
||||||
|
|
||||||
public String getIsUrl() {
|
public String getIsUrl() {
|
||||||
return isUrl;
|
return isUrl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -71,6 +70,7 @@ public class OrgEOService extends ServiceImpl<OrgEODao, OrgEO> implements IOrgEo
|
|||||||
orgEO.setId(orgEO.getOrgCode());
|
orgEO.setId(orgEO.getOrgCode());
|
||||||
baseMapper.insert(orgEO);
|
baseMapper.insert(orgEO);
|
||||||
}else{
|
}else{
|
||||||
|
orgEO.setId(orgEO.getOrgCode());
|
||||||
baseMapper.updateById(orgEO);
|
baseMapper.updateById(orgEO);
|
||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ public class UserEOServiceImpl implements IUserEoService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void save(UserEO eo) {
|
public void save(UserEO eo) {
|
||||||
// TODO 组织机构和角色
|
|
||||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
if (StringUtils.isEmpty(eo.getUsid())) {
|
if (StringUtils.isEmpty(eo.getUsid())) {
|
||||||
eo.setDelFlag(0);
|
eo.setDelFlag(0);
|
||||||
@@ -116,14 +115,14 @@ public class UserEOServiceImpl implements IUserEoService {
|
|||||||
userRoleEODao.insert(userRoleEO);
|
userRoleEODao.insert(userRoleEO);
|
||||||
});
|
});
|
||||||
|
|
||||||
// // 插入组织关联表 暂时用不上,页面不维护组织机构
|
String[] split = eo.getOrgId().split(",");
|
||||||
// eo.getOrgList().forEach(c -> {
|
// 插入组织关联表 暂时用不上,页面不维护组织机构
|
||||||
// UserOrgEO userOrgEO = new UserOrgEO();
|
for (String s : split) {
|
||||||
// userOrgEO.setUserId(eo.getUsid());
|
UserOrgEO userOrgEO = new UserOrgEO();
|
||||||
// userOrgEO.setOrgId(c.getOrgCode());
|
userOrgEO.setUserId(eo.getUsid());
|
||||||
// userOrgEODao.insert(userOrgEO);
|
userOrgEO.setOrgId(s);
|
||||||
// });
|
userOrgEODao.insert(userOrgEO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -65,6 +65,20 @@ public class MenuVO extends TreeVO<MenuVO> {
|
|||||||
*/
|
*/
|
||||||
private String isUrl;
|
private String isUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String isButton;
|
||||||
|
|
||||||
|
public String getIsButton() {
|
||||||
|
return isButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsButton(String isButton) {
|
||||||
|
this.isButton = isButton;
|
||||||
|
}
|
||||||
|
|
||||||
public String getIsUrl() {
|
public String getIsUrl() {
|
||||||
return isUrl;
|
return isUrl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 -->
|
||||||
|
|||||||
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 -->
|
||||||
|
|||||||
+1
@@ -120,6 +120,7 @@ public class TaskController {
|
|||||||
if(userById.getOrgEOList().size()>0){
|
if(userById.getOrgEOList().size()>0){
|
||||||
map.put("orgName",userById.getOrgEOList().get(0).getOrgName());
|
map.put("orgName",userById.getOrgEOList().get(0).getOrgName());
|
||||||
}
|
}
|
||||||
|
map.put("name",historicTaskInstance.get("name"));
|
||||||
map.put("assignee", enUserName+"(" + consigner + " 委托)");
|
map.put("assignee", enUserName+"(" + consigner + " 委托)");
|
||||||
map.put("assigneeId", busProcessEntrust.getEnUserId());
|
map.put("assigneeId", busProcessEntrust.getEnUserId());
|
||||||
map.put("prcType",one.getPrcType());
|
map.put("prcType",one.getPrcType());
|
||||||
|
|||||||
+5
-1
@@ -894,16 +894,20 @@ public class TodoTaskController {
|
|||||||
|
|
||||||
@ApiOperation(value = "删除草稿", notes = "删除草稿")
|
@ApiOperation(value = "删除草稿", notes = "删除草稿")
|
||||||
@GetMapping("/deleteDraft")
|
@GetMapping("/deleteDraft")
|
||||||
public Wrapper<String> deleteDraft(String id) {
|
public Wrapper<String> deleteDraft(String id,String prcType,String dataId) {
|
||||||
//iBusProcessNameService.removeById(id);
|
//iBusProcessNameService.removeById(id);
|
||||||
//2022-10-11修改为逻辑删除 如果物理删除,会影响发号器计算的编号数量。导致编号重复。
|
//2022-10-11修改为逻辑删除 如果物理删除,会影响发号器计算的编号数量。导致编号重复。
|
||||||
BusProcessName busProcessName = new BusProcessName();
|
BusProcessName busProcessName = new BusProcessName();
|
||||||
busProcessName.setId(id);
|
busProcessName.setId(id);
|
||||||
busProcessName.setSubmitStatus(SubmitStatusEnum.DELETE.getValue());
|
busProcessName.setSubmitStatus(SubmitStatusEnum.DELETE.getValue());
|
||||||
this.iBusProcessNameService.updateById(busProcessName);
|
this.iBusProcessNameService.updateById(busProcessName);
|
||||||
|
//删除业务数据
|
||||||
|
iBusProcessNewService.deleteData(prcType,dataId);
|
||||||
return WrapMapper.ok("删除成功");
|
return WrapMapper.ok("删除成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "已发流程", notes = "已发流程")
|
@ApiOperation(value = "已发流程", notes = "已发流程")
|
||||||
@PostMapping("/issuedProcess")
|
@PostMapping("/issuedProcess")
|
||||||
public Page IssuedProcess(@RequestBody TaskCommonQuery taskCommonQuery) {
|
public Page IssuedProcess(@RequestBody TaskCommonQuery taskCommonQuery) {
|
||||||
|
|||||||
+6
@@ -31,4 +31,10 @@ public interface IBusProcessNewService extends IService<BusProcessNew> {
|
|||||||
|
|
||||||
List<BusProcessNew> selectEOByTaskId(String prcId);
|
List<BusProcessNew> selectEOByTaskId(String prcId);
|
||||||
BusProcessNew selectEOByDataId(String prcId);
|
BusProcessNew selectEOByDataId(String prcId);
|
||||||
|
/**
|
||||||
|
* 删除业务数据
|
||||||
|
* @param prcType
|
||||||
|
* @param dataId
|
||||||
|
*/
|
||||||
|
void deleteData(String prcType, String dataId);
|
||||||
}
|
}
|
||||||
|
|||||||
+45
-2
@@ -1,13 +1,18 @@
|
|||||||
package com.adc.da.wkflow.business_main.service.impl;
|
package com.adc.da.wkflow.business_main.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.adc.da.report.dao.mysql.PowerApplyActDao;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
||||||
|
import com.adc.da.util.exception.AdcDaBaseException;
|
||||||
import com.adc.da.wkflow.business_main.entity.BusProcessNew;
|
import com.adc.da.wkflow.business_main.entity.BusProcessNew;
|
||||||
import com.adc.da.wkflow.business_main.mapper.BusProcessNewMapper;
|
import com.adc.da.wkflow.business_main.mapper.BusProcessNewMapper;
|
||||||
import com.adc.da.wkflow.business_main.service.IBusProcessNewService;
|
import com.adc.da.wkflow.business_main.service.IBusProcessNewService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.activiti.engine.TaskService;
|
import org.activiti.engine.TaskService;
|
||||||
import org.activiti.engine.task.Task;
|
import org.activiti.engine.task.Task;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
@@ -26,8 +31,14 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
public class BusProcessNewServiceImpl extends ServiceImpl<BusProcessNewMapper, BusProcessNew> implements IBusProcessNewService {
|
public class BusProcessNewServiceImpl extends ServiceImpl<BusProcessNewMapper, BusProcessNew> implements IBusProcessNewService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
private TaskService taskService;
|
private TaskService taskService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PowerApplyActDao powerApplyActDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TtReportManageActDao ttReportManageActDao;
|
||||||
/*
|
/*
|
||||||
* @Author yuzhong
|
* @Author yuzhong
|
||||||
* @Description
|
* @Description
|
||||||
@@ -78,4 +89,36 @@ public class BusProcessNewServiceImpl extends ServiceImpl<BusProcessNewMapper, B
|
|||||||
public BusProcessNew selectEOByDataId(String dataId) {
|
public BusProcessNew selectEOByDataId(String dataId) {
|
||||||
return baseMapper.selectEOByDataId(dataId);
|
return baseMapper.selectEOByDataId(dataId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除业务数据
|
||||||
|
* @param prcType
|
||||||
|
* @param dataId
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void deleteData(String prcType, String dataId) {
|
||||||
|
if ("".equals(prcType)){
|
||||||
|
//预览
|
||||||
|
powerApplyActDao.deleteByDataId(dataId);
|
||||||
|
}else if ("1".equals(prcType)){
|
||||||
|
//预览
|
||||||
|
powerApplyActDao.deleteByDataId(dataId);
|
||||||
|
} else if ("2".equals(prcType)){
|
||||||
|
//预览 + 下载
|
||||||
|
powerApplyActDao.deleteByDataId(dataId);
|
||||||
|
}else if ("3".equals(prcType)){
|
||||||
|
//下载
|
||||||
|
powerApplyActDao.deleteByDataId(dataId);
|
||||||
|
} else if("4".equals(prcType)){
|
||||||
|
//上传
|
||||||
|
ttReportManageActDao.deleteByDataId(dataId);
|
||||||
|
|
||||||
|
}else if("5".equals(prcType)){
|
||||||
|
//编辑
|
||||||
|
ttReportManageActDao.deleteByDataId(dataId);
|
||||||
|
}else {
|
||||||
|
throw new AdcDaBaseException("没有流程类型"+prcType);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user