This commit is contained in:
wangliwen 2022-04-26 17:52:18 +08:00
parent e0c38aca8e
commit d533df53c0
11 changed files with 402 additions and 391 deletions

View File

@ -47,7 +47,8 @@ public class TDemandDataController {
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"), @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "creator", value = "创建者id", paramType = "query", dataType = "Long"), @ApiImplicitParam(name = "creator", value = "创建者id", paramType = "query", dataType = "Long"),
@ApiImplicitParam(name = "flag", value = "状态", paramType = "query", dataType = "Int") @ApiImplicitParam(name = "flag", value = "状态", paramType = "query", dataType = "Int"),
@ApiImplicitParam(name = "detailsType", value = "需求类型", paramType = "query", dataType = "String")
}) })
// @RequiresPermissions("demanData:tdemanddata:page") // @RequiresPermissions("demanData:tdemanddata:page")
public Result<PageData<TDemandDataDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) { public Result<PageData<TDemandDataDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {

View File

@ -63,7 +63,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
@Override @Override
public void notify(DelegateTask delegateTask) { public void notify(DelegateTask delegateTask) {
logger.error("----------------------进入能力需求受理者1节点---------------------------"); logger.error("----------------------进入能力需求受理者1节点---------------------------");
logger.info("事件类型:" + delegateTask.getEventName()); logger.error("事件类型:" + delegateTask.getEventName());
SysRoleDTO roleDTO = sysRoleService.getByName(roleName); SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
logger.error("roleDTOId:" + roleDTO.getId()); logger.error("roleDTOId:" + roleDTO.getId());
final String eventName = delegateTask.getEventName(); final String eventName = delegateTask.getEventName();
@ -75,7 +75,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
complete(delegateTask); complete(delegateTask);
break; break;
default: default:
logger.info("未处理该事件:" + eventName); logger.error("未处理该事件:" + eventName);
} }
logger.error("----------------------结束能力需求受理者1节点---------------------------"); logger.error("----------------------结束能力需求受理者1节点---------------------------");
} }
@ -114,7 +114,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class); TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class);
if (demandDataDTO != null) { if (demandDataDTO != null) {
logger.info(JSONObject.toJSONString(demandDataDTO)); logger.error(JSONObject.toJSONString(demandDataDTO));
SysDeptDTO deptDTO = SysDeptDTO deptDTO =
sysDeptService.get(Long.valueOf(demandDataDTO.getApplyUserDeptId())); sysDeptService.get(Long.valueOf(demandDataDTO.getApplyUserDeptId()));
SysUserDTO userDTO = null; SysUserDTO userDTO = null;
@ -129,25 +129,24 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
taskService.setAssignee(delegateTask.getId(), "1513432847327199233"); taskService.setAssignee(delegateTask.getId(), "1513432847327199233");
} }
} else { // 填入大数据审批人 } else { // 填入大数据审批人
logger.info("大数据局名称:" + bigDateDeptName); logger.error("大数据局名称:" + bigDateDeptName);
SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName); SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName);
logger.info("roleDTOId:" + roleDTO.getId()); logger.error("roleDTOId:" + roleDTO.getId());
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId()); SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId());
if (userDTO != null) { if (userDTO != null) {
logger.info("大数据审批人id:" + userDTO.getId()); logger.error("大数据审批人id:" + userDTO.getId());
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString()); taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
} else { } else {
taskService.setAssignee(delegateTask.getId(), "1513432847327199233"); taskService.setAssignee(delegateTask.getId(), "1513432847327199233");
logger.info("未查到大数据部门对应 " + roleName); logger.error("未查到大数据部门对应 " + roleName);
} }
} }
} }
private void complete(DelegateTask delegateTask) { private void complete(DelegateTask delegateTask) {
logger.info("---------------------------流程节点完成---------------------------------"); logger.error("---------------------------流程节点完成---------------------------------");
Map<String, Object> kv = delegateTask.getVariables(); Map<String, Object> kv = delegateTask.getVariables();
GsonBuilder builder = new GsonBuilder(); GsonBuilder builder = new GsonBuilder();
builder.registerTypeAdapter(Date.class, new JsonDeserializer<Date>() { builder.registerTypeAdapter(Date.class, new JsonDeserializer<Date>() {
@ -161,9 +160,17 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class); TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class);
if (demandDataDTO != null) { if (demandDataDTO != null) {
logger.info(JSONObject.toJSONString(demandDataDTO)); logger.error(JSONObject.toJSONString(demandDataDTO));
tDemandDataService.updateFlag(3, demandDataDTO.getId());// 更新状态为已审批通过 SysUserDTO userDTO = sysUserService.get(Long.valueOf(delegateTask.getAssignee()));
logger.info("---------------------------更新状态为已审批通过---------------------------------"); taskService.getTaskComments(delegateTask.getId());
// tDemandDataService.updateFlag(3, demandDataDTO.getId());// 更新状态为已审批通过
demandDataDTO.setFlag(3);
demandDataDTO.setApprovalUserDeptName(userDTO != null ? userDTO.getDeptName() : null);
demandDataDTO.setApprovalUserName(userDTO != null ? userDTO.getRealName() : null);
demandDataDTO.setApprovalOpinions(taskService.getTaskComments(delegateTask.getId()).stream().findFirst().get().getFullMessage());
logger.error("---------------------------更新状态为已审批通过---------------------------------");
logger.error("demandDataDTO:" + demandDataDTO);
tDemandDataService.update(demandDataDTO);
} }
} }
} }

View File

@ -31,6 +31,9 @@ public class TDemandDataServiceImpl extends CrudServiceImpl<TDemandDataDao, TDem
case "flag": case "flag":
wrapper.eq("flag", params.get("flag")); wrapper.eq("flag", params.get("flag"));
break; break;
case "detailsType":
wrapper.eq("detailsType", params.get("detailsType"));
break;
} }
}); });
if (!params.containsKey("creator")) { if (!params.containsKey("creator")) {
@ -47,6 +50,6 @@ public class TDemandDataServiceImpl extends CrudServiceImpl<TDemandDataDao, TDem
@Override @Override
public void updateFlag(Integer flag, Long id) { public void updateFlag(Integer flag, Long id) {
baseDao.updateFlag(flag, id);
} }
} }

View File

@ -1,126 +1,126 @@
package io.renren.modules.processForm.controller; package io.renren.modules.processForm.controller;
import io.renren.common.annotation.LogOperation; import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant; import io.renren.common.constant.Constant;
import io.renren.common.page.PageData; import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils; import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result; import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils; import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils; import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup; import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup; import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup; import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
import io.renren.modules.processForm.excel.TAbilityApplicationExcel; import io.renren.modules.processForm.excel.TAbilityApplicationExcel;
import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 能力申请表单 * 能力申请表单
* *
* @author Mark sunlightcs@gmail.com * @author Mark sunlightcs@gmail.com
* @since 3.0 2022-04-13 * @since 3.0 2022-04-13
*/ */
@RestController @RestController
@RequestMapping("processForm/tabilityapplication") @RequestMapping("processForm/tabilityapplication")
@Api(tags="能力申请表单") @Api(tags="能力申请表单")
public class TAbilityApplicationController { public class TAbilityApplicationController {
@Autowired @Autowired
private TAbilityApplicationService tAbilityApplicationService; private TAbilityApplicationService tAbilityApplicationService;
@GetMapping("page") @GetMapping("page")
@ApiOperation("分页") @ApiOperation("分页")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String") @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
}) })
public Result<PageData<TAbilityApplicationDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<TAbilityApplicationDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<TAbilityApplicationDTO> page = tAbilityApplicationService.page(params); PageData<TAbilityApplicationDTO> page = tAbilityApplicationService.page(params);
return new Result<PageData<TAbilityApplicationDTO>>().ok(page); return new Result<PageData<TAbilityApplicationDTO>>().ok(page);
} }
@GetMapping("{id}") @GetMapping("{id}")
@ApiOperation("信息") @ApiOperation("信息")
public Result<TAbilityApplicationDTO> get(@PathVariable("id") Long id){ public Result<TAbilityApplicationDTO> get(@PathVariable("id") Long id){
TAbilityApplicationDTO data = tAbilityApplicationService.get(id); TAbilityApplicationDTO data = tAbilityApplicationService.get(id);
return new Result<TAbilityApplicationDTO>().ok(data); return new Result<TAbilityApplicationDTO>().ok(data);
} }
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") @LogOperation("保存")
public Result save(@RequestBody TAbilityApplicationDTO dto){ public Result save(@RequestBody TAbilityApplicationDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
tAbilityApplicationService.save(dto); tAbilityApplicationService.save(dto);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("businessKey", dto.getId().toString()); map.put("businessKey", dto.getId().toString());
return new Result().ok(map); return new Result().ok(map);
} }
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") @LogOperation("修改")
public Result update(@RequestBody TAbilityApplicationDTO dto){ public Result update(@RequestBody TAbilityApplicationDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
tAbilityApplicationService.update(dto); tAbilityApplicationService.update(dto);
return new Result(); return new Result();
} }
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") @LogOperation("删除")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
AssertUtils.isArrayEmpty(ids, "id"); AssertUtils.isArrayEmpty(ids, "id");
tAbilityApplicationService.delete(ids); tAbilityApplicationService.delete(ids);
return new Result(); return new Result();
} }
@PostMapping("updateInstanceId") @PostMapping("updateInstanceId")
@ApiOperation("更新实例ID") @ApiOperation("更新实例ID")
@LogOperation("更新实例ID") @LogOperation("更新实例ID")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "businessKey", value = "业务KEY", paramType = "query", required = true, dataType="String"), @ApiImplicitParam(name = "businessKey", value = "业务KEY", paramType = "query", required = true, dataType="String"),
@ApiImplicitParam(name = "processInstanceId", value = "实例ID", paramType = "query",required = true, dataType="String") @ApiImplicitParam(name = "processInstanceId", value = "实例ID", paramType = "query",required = true, dataType="String")
}) })
public Result updateInstanceId(String businessKey, String processInstanceId){ public Result updateInstanceId(String businessKey, String processInstanceId){
Long id = Long.valueOf(businessKey); Long id = Long.valueOf(businessKey);
tAbilityApplicationService.updateInstanceId(processInstanceId, id); tAbilityApplicationService.updateInstanceId(processInstanceId, id);
return new Result(); return new Result();
} }
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") @LogOperation("导出")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<TAbilityApplicationDTO> list = tAbilityApplicationService.list(params); List<TAbilityApplicationDTO> list = tAbilityApplicationService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "能力申请表单", list, TAbilityApplicationExcel.class); ExcelUtils.exportExcelToTarget(response, null, "能力申请表单", list, TAbilityApplicationExcel.class);
} }
} }

View File

@ -1,20 +1,20 @@
package io.renren.modules.processForm.dao; package io.renren.modules.processForm.dao;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import io.renren.modules.processForm.entity.TAbilityApplicationEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
/** /**
* 能力申请表单 * 能力申请表单
* *
* @author Mark sunlightcs@gmail.com * @author Mark sunlightcs@gmail.com
* @since 3.0 2022-04-13 * @since 3.0 2022-04-13
*/ */
@Mapper @Mapper
public interface TAbilityApplicationDao extends BaseDao<TAbilityApplicationEntity> { public interface TAbilityApplicationDao extends BaseDao<TAbilityApplicationEntity> {
void updateInstanceId(String instanceId, Long id); void updateInstanceId(String instanceId, Long id);
TAbilityApplicationEntity getByInstanceId(String instanceId); TAbilityApplicationEntity getByInstanceId(String instanceId);
TAbilityApplicationEntity getByBusinessKey(String businessKey); TAbilityApplicationEntity getByBusinessKey(String businessKey);
} }

View File

@ -1,45 +1,45 @@
package io.renren.modules.processForm.dto; package io.renren.modules.processForm.dto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
/** /**
* 能力申请表单 * 能力申请表单
* *
* @author Mark sunlightcs@gmail.com * @author Mark sunlightcs@gmail.com
* @since 3.0 2022-04-13 * @since 3.0 2022-04-13
*/ */
@Data @Data
@ApiModel(value = "能力申请表单") @ApiModel(value = "能力申请表单")
public class TAbilityApplicationDTO implements Serializable { public class TAbilityApplicationDTO implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Long id; private Long id;
@ApiModelProperty(value = "申请人") @ApiModelProperty(value = "申请人")
private String user; private String user;
@ApiModelProperty(value = "申请人电话") @ApiModelProperty(value = "申请人电话")
private String phone; private String phone;
@ApiModelProperty(value = "申请人单位") @ApiModelProperty(value = "申请人单位")
private String unit; private String unit;
@ApiModelProperty(value = "申请人所在地区") @ApiModelProperty(value = "申请人所在地区")
private String area; private String area;
@ApiModelProperty(value = "申请应用系统") @ApiModelProperty(value = "申请应用系统")
private String system; private String system;
@ApiModelProperty(value = "申请场景") @ApiModelProperty(value = "申请场景")
private String scene; private String scene;
@ApiModelProperty(value = "申请依据") @ApiModelProperty(value = "申请依据")
private String basis; private String basis;
@ApiModelProperty(value = "申请附件") @ApiModelProperty(value = "申请附件")
private String attachment; private String attachment;
@ApiModelProperty(value = "实例ID") @ApiModelProperty(value = "实例ID")
private String instanceId; private String instanceId;
@ApiModelProperty(value = "资源id") @ApiModelProperty(value = "资源id")
private String resourceId; private String resourceId;
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private String userId; private String userId;
} }

View File

@ -1,69 +1,69 @@
package io.renren.modules.processForm.entity; package io.renren.modules.processForm.entity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
/** /**
* 能力申请表单 * 能力申请表单
* *
* @author Mark sunlightcs@gmail.com * @author Mark sunlightcs@gmail.com
* @since 3.0 2022-04-13 * @since 3.0 2022-04-13
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@TableName("t_ability_application") @TableName("t_ability_application")
public class TAbilityApplicationEntity { public class TAbilityApplicationEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId @TableId
private Long id; private Long id;
/** /**
* 申请人 * 申请人
*/ */
private String user; private String user;
/** /**
* 申请人电话 * 申请人电话
*/ */
private String phone; private String phone;
/** /**
* 申请人单位 * 申请人单位
*/ */
private String unit; private String unit;
/** /**
* 申请人所在地区 * 申请人所在地区
*/ */
private String area; private String area;
/** /**
* 申请应用系统 * 申请应用系统
*/ */
private String system; private String system;
/** /**
* 申请场景 * 申请场景
*/ */
private String scene; private String scene;
/** /**
* 申请依据 * 申请依据
*/ */
private String basis; private String basis;
/** /**
* 申请附件 * 申请附件
*/ */
private String attachment; private String attachment;
/** /**
* 实例ID * 实例ID
*/ */
private String instanceId; private String instanceId;
/** /**
* 资源id * 资源id
*/ */
private String resourceId; private String resourceId;
/** /**
* 用户id * 用户id
*/ */
private String userId; private String userId;
} }

View File

@ -1,38 +1,38 @@
package io.renren.modules.processForm.excel; package io.renren.modules.processForm.excel;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight; import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight; import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data; import lombok.Data;
/** /**
* 能力申请表单 * 能力申请表单
* *
* @author Mark sunlightcs@gmail.com * @author Mark sunlightcs@gmail.com
* @since 3.0 2022-04-13 * @since 3.0 2022-04-13
*/ */
@Data @Data
@ContentRowHeight(20) @ContentRowHeight(20)
@HeadRowHeight(20) @HeadRowHeight(20)
@ColumnWidth(25) @ColumnWidth(25)
public class TAbilityApplicationExcel { public class TAbilityApplicationExcel {
@ExcelProperty(value = "Long", index = 0) @ExcelProperty(value = "Long", index = 0)
private Long id; private Long id;
@ExcelProperty(value = "申请人", index = 1) @ExcelProperty(value = "申请人", index = 1)
private String user; private String user;
@ExcelProperty(value = "申请人电话", index = 2) @ExcelProperty(value = "申请人电话", index = 2)
private String phone; private String phone;
@ExcelProperty(value = "申请人单位", index = 3) @ExcelProperty(value = "申请人单位", index = 3)
private String unit; private String unit;
@ExcelProperty(value = "申请人所在地区", index = 4) @ExcelProperty(value = "申请人所在地区", index = 4)
private String area; private String area;
@ExcelProperty(value = "申请应用系统", index = 5) @ExcelProperty(value = "申请应用系统", index = 5)
private String system; private String system;
@ExcelProperty(value = "申请场景", index = 6) @ExcelProperty(value = "申请场景", index = 6)
private String scene; private String scene;
@ExcelProperty(value = "申请依据", index = 7) @ExcelProperty(value = "申请依据", index = 7)
private String basis; private String basis;
@ExcelProperty(value = "申请附件", index = 8) @ExcelProperty(value = "申请附件", index = 8)
private String attachment; private String attachment;
} }

View File

@ -65,18 +65,18 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
@Override @Override
public void notify(DelegateExecution delegateExecution) throws Exception { public void notify(DelegateExecution delegateExecution) throws Exception {
// logger.info("事件:" + delegateExecution.getEventName()); // logger.error("事件:" + delegateExecution.getEventName());
// delegateExecution.getVariableNames().stream().forEach(index -> logger.info("variable:" + index)); // delegateExecution.getVariableNames().stream().forEach(index -> logger.error("variable:" + index));
// delegateExecution.getVariables().values().stream().filter(index -> index != null).forEach(value -> logger.info(value.toString())); // delegateExecution.getVariables().values().stream().filter(index -> index != null).forEach(value -> logger.error(value.toString()));
// // taskService.setAssignee(delegateExecution.getProcessInstanceId(), "1516307964617076737");// 可以设置 // // taskService.setAssignee(delegateExecution.getProcessInstanceId(), "1516307964617076737");// 可以设置
// //
// logger.info("修改审批人成功!" + delegateExecution.getCurrentActivityId() + " " + delegateExecution.getProcessInstanceId() + " " + delegateExecution.getProcessBusinessKey()); // logger.error("修改审批人成功!" + delegateExecution.getCurrentActivityId() + " " + delegateExecution.getProcessInstanceId() + " " + delegateExecution.getProcessBusinessKey());
} }
@Override @Override
public void onEvent(ActivitiEvent activitiEvent) { // 事件回调 public void onEvent(ActivitiEvent activitiEvent) { // 事件回调
logger.info("事件类型:" + activitiEvent.getType().toString()); logger.error("事件类型:" + activitiEvent.getType().toString());
logger.info("" + activitiEvent.getProcessDefinitionId()); logger.error("" + activitiEvent.getProcessDefinitionId());
} }
@Override @Override
@ -86,7 +86,7 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
@Override @Override
public void execute(DelegateExecution delegateExecution) throws Exception { public void execute(DelegateExecution delegateExecution) throws Exception {
logger.info("异常", delegateExecution); logger.error("异常", delegateExecution);
} }
/** /**

View File

@ -1,23 +1,23 @@
package io.renren.modules.processForm.service; package io.renren.modules.processForm.service;
import io.renren.common.service.CrudService; import io.renren.common.service.CrudService;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import io.renren.modules.processForm.entity.TAbilityApplicationEntity;
/** /**
* 能力申请表单 * 能力申请表单
* *
* @author Mark sunlightcs@gmail.com * @author Mark sunlightcs@gmail.com
* @since 3.0 2022-04-13 * @since 3.0 2022-04-13
*/ */
public interface TAbilityApplicationService extends CrudService<TAbilityApplicationEntity, TAbilityApplicationDTO> { public interface TAbilityApplicationService extends CrudService<TAbilityApplicationEntity, TAbilityApplicationDTO> {
void updateInstanceId(String instanceId, Long id); void updateInstanceId(String instanceId, Long id);
/** 根据instanceId 获取申请内容 /** 根据instanceId 获取申请内容
* @param instanceId * @param instanceId
* @return * @return
*/ */
TAbilityApplicationDTO getByInstanceId(String instanceId); TAbilityApplicationDTO getByInstanceId(String instanceId);
TAbilityApplicationDTO getByBusinessKey(String businessKey); TAbilityApplicationDTO getByBusinessKey(String businessKey);
} }

View File

@ -1,56 +1,56 @@
package io.renren.modules.processForm.service.impl; package io.renren.modules.processForm.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl; import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.ConvertUtils; import io.renren.common.utils.ConvertUtils;
import io.renren.modules.processForm.dao.TAbilityApplicationDao; import io.renren.modules.processForm.dao.TAbilityApplicationDao;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import io.renren.modules.processForm.entity.TAbilityApplicationEntity;
import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.processForm.service.TAbilityApplicationService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Map; import java.util.Map;
/** /**
* 能力申请表单 * 能力申请表单
* *
* @author Mark sunlightcs@gmail.com * @author Mark sunlightcs@gmail.com
* @since 3.0 2022-04-13 * @since 3.0 2022-04-13
*/ */
@Service @Service
public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityApplicationDao, TAbilityApplicationEntity, TAbilityApplicationDTO> implements TAbilityApplicationService { public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityApplicationDao, TAbilityApplicationEntity, TAbilityApplicationDTO> implements TAbilityApplicationService {
@Override @Override
public QueryWrapper<TAbilityApplicationEntity> getWrapper(Map<String, Object> params) { public QueryWrapper<TAbilityApplicationEntity> getWrapper(Map<String, Object> params) {
QueryWrapper<TAbilityApplicationEntity> wrapper = new QueryWrapper<>(); QueryWrapper<TAbilityApplicationEntity> wrapper = new QueryWrapper<>();
return wrapper; return wrapper;
} }
@Override @Override
public void updateInstanceId(String instanceId, Long id) { public void updateInstanceId(String instanceId, Long id) {
baseDao.updateInstanceId(instanceId, id); baseDao.updateInstanceId(instanceId, id);
} }
@Override @Override
public TAbilityApplicationDTO getByInstanceId(String instanceId) { public TAbilityApplicationDTO getByInstanceId(String instanceId) {
if (StringUtils.isEmpty(instanceId)) { if (StringUtils.isEmpty(instanceId)) {
return null; return null;
} }
TAbilityApplicationEntity entity = baseDao.getByInstanceId(instanceId); TAbilityApplicationEntity entity = baseDao.getByInstanceId(instanceId);
return ConvertUtils.sourceToTarget(entity, TAbilityApplicationDTO.class); return ConvertUtils.sourceToTarget(entity, TAbilityApplicationDTO.class);
} }
@Override @Override
public TAbilityApplicationDTO getByBusinessKey(String businessKey) { public TAbilityApplicationDTO getByBusinessKey(String businessKey) {
if (StringUtils.isEmpty(businessKey)) { if (StringUtils.isEmpty(businessKey)) {
return null; return null;
} }
TAbilityApplicationEntity entity = baseDao.getByBusinessKey(businessKey); TAbilityApplicationEntity entity = baseDao.getByBusinessKey(businessKey);
return ConvertUtils.sourceToTarget(entity, TAbilityApplicationDTO.class); return ConvertUtils.sourceToTarget(entity, TAbilityApplicationDTO.class);
} }
} }