19 files modified
1 files added
| | |
| | | package org.springblade.flow.business.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.flowable.engine.HistoryService; |
| | | import org.flowable.engine.TaskService; |
| | |
| | | import org.flowable.task.api.TaskQuery; |
| | | import org.flowable.task.api.history.HistoricTaskInstance; |
| | | import org.flowable.task.api.history.HistoricTaskInstanceQuery; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.Func; |
| | |
| | | import org.springblade.flow.engine.constant.FlowEngineConstant; |
| | | import org.springblade.flow.engine.entity.FlowProcess; |
| | | import org.springblade.flow.engine.utils.FlowCache; |
| | | import org.springblade.modules.property.entity.PropertyCapitalApplyEntity; |
| | | import org.springblade.modules.property.service.IPropertyCapitalApplyService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.LinkedList; |
| | |
| | | flow.setProcessIsFinished(FlowEngineConstant.STATUS_UNFINISHED); |
| | | } |
| | | } |
| | | IPropertyCapitalApplyService bean = SpringUtils.getBean(IPropertyCapitalApplyService.class); |
| | | PropertyCapitalApplyEntity capitalApplyEntity = bean.getOne(Wrappers.<PropertyCapitalApplyEntity>lambdaQuery().eq(PropertyCapitalApplyEntity::getProcessInstanceId, historicTaskInstance.getProcessInstanceId())); |
| | | if (capitalApplyEntity != null) { |
| | | flow.setName(capitalApplyEntity.getName()); |
| | | flow.setDistrictId(capitalApplyEntity.getDistrictId()); |
| | | flow.setLinkman(capitalApplyEntity.getLinkman()); |
| | | flow.setLinkPhone(capitalApplyEntity.getLinkPhone()); |
| | | } |
| | | flow.setStatus(FlowEngineConstant.STATUS_FINISH); |
| | | flowList.add(flow); |
| | | }); |
| | |
| | | flow.setBusinessTable(businessKey[0]); |
| | | flow.setBusinessId(businessKey[1]); |
| | | } |
| | | IPropertyCapitalApplyService bean = SpringUtils.getBean(IPropertyCapitalApplyService.class); |
| | | PropertyCapitalApplyEntity capitalApplyEntity = bean.getOne(Wrappers.<PropertyCapitalApplyEntity>lambdaQuery().eq(PropertyCapitalApplyEntity::getProcessInstanceId, task.getProcessInstanceId())); |
| | | if (capitalApplyEntity != null) { |
| | | flow.setName(capitalApplyEntity.getName()); |
| | | flow.setDistrictId(capitalApplyEntity.getDistrictId()); |
| | | flow.setLinkman(capitalApplyEntity.getLinkman()); |
| | | flow.setLinkPhone(capitalApplyEntity.getLinkPhone()); |
| | | } |
| | | |
| | | FlowProcess processDefinition = FlowCache.getProcessDefinition(task.getProcessDefinitionId()); |
| | | flow.setCategory(processDefinition.getCategory()); |
| | |
| | | */ |
| | | package org.springblade.flow.core.entity; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springblade.flow.core.constant.ProcessConstant; |
| | | |
| | |
| | | public class BladeFlow implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | // 小区id |
| | | private String districtId; |
| | | |
| | | // 时间名称 |
| | | private String name; |
| | | |
| | | /** |
| | | * 联系人姓名 |
| | | */ |
| | | @ApiModelProperty(value = "联系人姓名") |
| | | private String linkman; |
| | | /** |
| | | * 联系人电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系人电话") |
| | | private String linkPhone; |
| | | |
| | | /** |
| | | * 任务编号 |
| | | */ |
| | |
| | | User user = UserCache.getUser(TaskUtil.getUserId(taskUser)); |
| | | if (user != null) { |
| | | flow.setAssignee(historicActivityInstance.getAssignee()); |
| | | flow.setAssigneeName(user.getName()); |
| | | flow.setAssigneeName(user.getRealName()); |
| | | } |
| | | } |
| | | } |
| | |
| | | User user = UserCache.getUser(TaskUtil.getUserId(historicActivityInstance.getAssignee())); |
| | | if (user != null) { |
| | | flow.setAssignee(historicActivityInstance.getAssignee()); |
| | | flow.setAssigneeName(user.getName()); |
| | | flow.setAssigneeName(user.getRealName()); |
| | | } |
| | | } |
| | | // 获取意见评论内容 |
| New file |
| | |
| | | package org.springblade.flow.listener; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import org.flowable.engine.delegate.TaskListener; |
| | | import org.flowable.task.service.delegate.DelegateTask; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.modules.property.entity.PropertyCapitalApplyEntity; |
| | | import org.springblade.modules.property.service.IPropertyCapitalApplyService; |
| | | |
| | | public class MyTaskListener implements TaskListener { |
| | | /** |
| | | * 监听器触发的回调方法 |
| | | * |
| | | * @param delegateTask |
| | | */ |
| | | @Override |
| | | public void notify(DelegateTask delegateTask) { |
| | | System.out.println("---->自定义的监听器执行了"); |
| | | if (EVENTNAME_CREATE.equals(delegateTask.getEventName())) { |
| | | // 表示是Task的创建事件被触发了 |
| | | // 指定当前Task节点的处理人 |
| | | System.out.println("***************************delegateTask"); |
| | | IPropertyCapitalApplyService propertyCapitalApplyService = SpringUtils.getBean(IPropertyCapitalApplyService.class); |
| | | PropertyCapitalApplyEntity applyEntity = propertyCapitalApplyService.getOne(Wrappers.<PropertyCapitalApplyEntity>lambdaQuery() |
| | | .eq(PropertyCapitalApplyEntity::getProcessInstanceId, delegateTask.getProcessInstanceId())); |
| | | applyEntity.setTaskId(delegateTask.getId()); |
| | | propertyCapitalApplyService.updateById(applyEntity); |
| | | // IUserService user = SpringUtils.getBean(IUserService.class); |
| | | // IDistrictService district = SpringUtils.getBean(IDistrictService.class); |
| | | // IRegionService region = SpringUtils.getBean(IRegionService.class); |
| | | // IDeptService dept = SpringUtils.getBean(IDeptService.class); |
| | | // DistrictEntity one1 = district.getOne(Wrappers.<DistrictEntity>lambdaQuery() |
| | | // .eq(DistrictEntity::getId, applyEntity.getDistrictId())); |
| | | // if (delegateTask.getName().equals("街道")) { |
| | | // Region one2 = region.getOne(Wrappers.<Region>lambdaQuery().eq(Region::getCode, one1.getCommunityCode().substring(0, 9))); |
| | | // Dept one3 = dept.getOne(Wrappers.<Dept>lambdaQuery().eq(Dept::getDeptName, one2.getName())); |
| | | // User one4 = user.getOne(Wrappers.<User>lambdaQuery().eq(User::getDeptId, one3.getId()).last("limit 1")); |
| | | // delegateTask.setAssignee(TaskUtil.getTaskUser(one4.getId().toString())); |
| | | // } else if (delegateTask.getName().equals("住建局")) { |
| | | // // 查询住建局负责人 |
| | | // Region region2 = region.getOne(Wrappers.<Region>lambdaQuery().eq(Region::getCode, one1.getCommunityCode().substring(0, 6))); |
| | | // Dept dept3 = dept.getOne(Wrappers.<Dept>lambdaQuery().eq(Dept::getDeptName, region2.getName() + "住建局").last("limit 1")); |
| | | // User user4 = user.getOne(Wrappers.<User>lambdaQuery().eq(User::getDeptId, dept3.getId()).last("limit 1")); |
| | | // delegateTask.setAssignee(TaskUtil.getTaskUser(user4.getId().toString())); |
| | | // } |
| | | System.out.println("---->自定义的监听器执行了EVENTNAME_CREATE"); |
| | | } |
| | | if (EVENTNAME_COMPLETE.equals(delegateTask.getEventName())) { |
| | | // 表示是Task的完成事件被触发了 |
| | | // 指定当前Task节点的处理人 |
| | | // delegateTask.setAssignee("boge666"); |
| | | System.out.println("---->自定义的监听器执行了EVENTNAME_COMPLETE"); |
| | | } |
| | | if (EVENTNAME_DELETE.equals(delegateTask.getEventName())) { |
| | | // 表示是Task的删除事件被触发了 |
| | | // 指定当前Task节点的处理人 |
| | | // delegateTask.setAssignee("boge666");} |
| | | System.out.println("---->自定义的监听器执行了EVENTNAME_DELETE"); |
| | | } |
| | | if (EVENTNAME_ASSIGNMENT.equals(delegateTask.getEventName())) { |
| | | // 表示是Task的分配事件被触发了 |
| | | System.out.println("---->自定义的监听器执行了EVENTNAME_ASSIGNMENT"); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | name |
| | | from jczz_district |
| | | where is_deleted = 0 |
| | | <if test="district.districtIdList!=null and district.districtIdList!=''"> |
| | | and id in |
| | | <foreach collection="district.districtIdList" item="item" separator ="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | ) |
| | | </select> |
| | | |
| | |
| | | import org.springblade.common.node.TreeIntegerNode; |
| | | import org.springblade.common.node.TreeStringNode; |
| | | import org.springblade.common.utils.NodeTreeUtil; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.district.entity.DistrictEntity; |
| | | import org.springblade.modules.district.vo.DistrictVO; |
| | | import org.springblade.modules.district.mapper.DistrictMapper; |
| | |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.grid.vo.GridVO; |
| | | import org.springblade.modules.property.service.IPropertyDistrictUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 小区表 服务实现类 |
| | |
| | | */ |
| | | @Override |
| | | public Object getDistrictTree(DistrictVO district) { |
| | | List<TreeStringNode> stringNodeTree = NodeTreeUtil.getStringNodeTree(baseMapper.getDistrictTree(district)); |
| | | String userRole = AuthUtil.getUserRole(); |
| | | // if (userRole.equals("wygly")) { |
| | | // IPropertyDistrictUserService bean = SpringUtils.getBean(IPropertyDistrictUserService.class); |
| | | // List<String> strings = bean.selectPropertyDistrictByUserId(AuthUtil.getUserId()); |
| | | // district.setDistrictIdList(strings); |
| | | // } |
| | | Map<String, TreeStringNode> districtTree = baseMapper.getDistrictTree(district); |
| | | List<TreeStringNode> stringNodeTree = NodeTreeUtil.getStringNodeTree(districtTree); |
| | | stringNodeTree.forEach(node -> recursion(node)); |
| | | return stringNodeTree; |
| | | } |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 小区表 视图实体类 |
| | | * |
| | |
| | | */ |
| | | private String gridName; |
| | | |
| | | private List<String> districtIdList; |
| | | |
| | | } |
| | |
| | | /** 身份证号码 */ |
| | | @ApiModelProperty(value = "身份证号码", example = "") |
| | | @TableField("identity_num") |
| | | private Integer identityNum; |
| | | private String identityNum; |
| | | |
| | | /** 身份证类型 */ |
| | | @ApiModelProperty(value = "身份证类型", example = "") |
| | |
| | | |
| | | /** 加入时间 */ |
| | | @ApiModelProperty(value = "加入时间", example = "") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @TableField("join_time") |
| | | private Date joinTime; |
| | | |
| | |
| | | @TableField("delete_flag") |
| | | @TableLogic |
| | | private Integer deleteFlag; |
| | | |
| | | @ApiModelProperty(value = "用户id", example = "") |
| | | @TableField("user_id") |
| | | private Long userId; |
| | | } |
| | |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="deleteFlag" column="delete_flag"/> |
| | | <result property="userId" column="user_id"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectOwnersCommitteeMember"> |
| | |
| | | update_id, |
| | | update_time, |
| | | create_time, |
| | | delete_flag |
| | | delete_flag, |
| | | user_id |
| | | from jczz_owners_committee_member |
| | | </sql> |
| | | |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入propertyCapitalApply") |
| | | public R save(@Valid @RequestBody PropertyCapitalApplyVO propertyCapitalApplyVO) { |
| | | return R.status(propertyCapitalApplyService.startProcess(propertyCapitalApplyVO)); |
| | | return R.status(propertyCapitalApplyService.save(propertyCapitalApplyVO)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty("申请状态 0:待审核 1:业委会审核 2:街道审核 3:住建局审核 4:调整申请 5:审核通过 6:审核不通过") |
| | | private Integer applyStatus; |
| | | |
| | | private String taskId; |
| | | |
| | | } |
| | |
| | | <if test="propertyCapitalApply.linkman!=null and propertyCapitalApply.linkman!=''"> |
| | | and linkman like concat('%',#{propertyCapitalApply.linkman},'%') |
| | | </if> |
| | | |
| | | <if test="propertyCapitalApply.districtIdList!=null and propertyCapitalApply.districtIdList!=''"> |
| | | and district_id in |
| | | <foreach collection="propertyCapitalApply.districtIdList" item="item" separator ="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.property.mapper; |
| | | |
| | | import org.springblade.modules.property.entity.PropertyDistrictUserEntity; |
| | | import org.springblade.modules.property.vo.PropertyDistrictUserVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.property.entity.PropertyDistrictUserEntity; |
| | | import org.springblade.modules.property.vo.PropertyDistrictUserVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | List<PropertyDistrictUserVO> selectPropertyDistrictUserPage(IPage page, PropertyDistrictUserVO propertyDistrictUser); |
| | | |
| | | |
| | | List<String> selectPropertyDistrictByUserId(Long userId); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | <select id="selectPropertyDistrictUserPage" resultMap="propertyDistrictUserResultMap"> |
| | | select * from jczz_property_district_user where is_deleted = 0 |
| | | select * |
| | | from jczz_property_district_user |
| | | where is_deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPropertyDistrictByUserId" resultType="java.lang.String"> |
| | | SELECT pcd.district_id |
| | | FROM jczz_property_company_district pcd |
| | | LEFT JOIN jczz_property_district_user pdu ON pcd.id = pdu.property_company_district_id |
| | | where pdu.user_id = #{userId} |
| | | </select> |
| | | |
| | | |
| | |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 物业公司人员派驻小区关联表 服务类 |
| | | * |
| | |
| | | */ |
| | | IPage<PropertyDistrictUserVO> selectPropertyDistrictUserPage(IPage<PropertyDistrictUserVO> page, PropertyDistrictUserVO propertyDistrictUser); |
| | | |
| | | List<String> selectPropertyDistrictByUserId(Long userId); |
| | | |
| | | |
| | | } |
| | |
| | | import org.springblade.modules.property.entity.PropertyCapitalApplyEntity; |
| | | import org.springblade.modules.property.mapper.PropertyCapitalApplyMapper; |
| | | import org.springblade.modules.property.service.IPropertyCapitalApplyService; |
| | | import org.springblade.modules.property.service.IPropertyDistrictUserService; |
| | | import org.springblade.modules.property.vo.PropertyCapitalApplyVO; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.entity.Region; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 物业维修资金申请表 服务实现类 |
| | |
| | | |
| | | @Override |
| | | public IPage<PropertyCapitalApplyVO> selectPropertyCapitalApplyPage(IPage<PropertyCapitalApplyVO> page, PropertyCapitalApplyVO propertyCapitalApply) { |
| | | // 判断角色,物业角色只能查询当前小区的 |
| | | |
| | | String userRole = AuthUtil.getUserRole(); |
| | | if (userRole.equals("wygly")) { |
| | | IPropertyDistrictUserService bean = SpringUtils.getBean(IPropertyDistrictUserService.class); |
| | | List<String> strings = bean.selectPropertyDistrictByUserId(AuthUtil.getUserId()); |
| | | propertyCapitalApply.setDistrictIdList(strings); |
| | | } |
| | | |
| | | |
| | | return page.setRecords(baseMapper.selectPropertyCapitalApplyPage(page, propertyCapitalApply)); |
| | | } |
| | | |
| | |
| | | Region one2 = region.getOne(Wrappers.<Region>lambdaQuery().eq(Region::getCode, one1.getCommunityCode().substring(0, 9))); |
| | | Dept one3 = dept.getOne(Wrappers.<Dept>lambdaQuery().eq(Dept::getDeptName, one2.getName())); |
| | | one4 = user.getOne(Wrappers.<User>lambdaQuery().eq(User::getDeptId, one3.getId()) |
| | | .eq(User::getRoleId,"1729814500990304258") |
| | | .eq(User::getIsDeleted,0) |
| | | .last("limit 1")); |
| | | } catch (Exception e) { |
| | |
| | | Region region2 = region.getOne(Wrappers.<Region>lambdaQuery().eq(Region::getCode, one1.getCommunityCode().substring(0, 6))); |
| | | Dept dept3 = dept.getOne(Wrappers.<Dept>lambdaQuery().eq(Dept::getDeptName, region2.getName() + "住建局").last("limit 1")); |
| | | user4 = user.getOne(Wrappers.<User>lambdaQuery().eq(User::getDeptId, dept3.getId()) |
| | | .eq(User::getRoleId,"1738072768615333890") |
| | | .eq(User::getIsDeleted,0) |
| | | .last("limit 1")); |
| | | } catch (Exception e) { |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 物业公司人员派驻小区关联表 服务实现类 |
| | | * |
| | |
| | | return page.setRecords(baseMapper.selectPropertyDistrictUserPage(page, propertyDistrictUser)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<String> selectPropertyDistrictByUserId(Long userId) { |
| | | return baseMapper.selectPropertyDistrictByUserId(userId); |
| | | } |
| | | } |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 物业维修资金申请表 视图实体类 |
| | | * |
| | |
| | | @ApiModelProperty("物业:0无 1有") |
| | | private Integer propertyFlag; |
| | | |
| | | @ApiModelProperty("批复意见") |
| | | private String comment; |
| | | |
| | | private List<String> districtIdList; |
| | | |
| | | } |
| | |
| | | return R.data(UserWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | @GetMapping("/searchUser") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "account", value = "账号名", paramType = "query", dataType = "string"), |
| | | @ApiImplicitParam(name = "realName", value = "姓名", paramType = "query", dataType = "string") |
| | | }) |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "搜索用户", notes = "传入account和realName") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R<List<UserVO>> searchUser(@ApiIgnore User user, Query query, Long deptId, BladeUser bladeUser) { |
| | | IPage<User> pages = userService.selectUserPage(Condition.getPage(query), user, deptId, (bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : bladeUser.getTenantId())); |
| | | return R.data(UserWrapper.build().listVO(pages.getRecords())); |
| | | } |
| | | |
| | | /** |
| | | * 自定义用户列表 |
| | | */ |
| | |
| | | <if test="user.realName!=null and user.realName != ''"> |
| | | and real_name like concat('%',#{user.realName},'%') |
| | | </if> |
| | | <if test="user.name!=null and user.name != ''"> |
| | | and name like concat('%',#{user.name},'%') |
| | | </if> |
| | | <if test="user.userType!=null and user.userType != ''"> |
| | | and user_type = #{user.userType} |
| | | </if> |