This commit is contained in:
parent
ec30d25fe1
commit
7ecdfaf63a
|
@ -15,4 +15,7 @@ public class WorkFlowCountDto {
|
||||||
@ApiModelProperty(value = "待填写的流程数量")
|
@ApiModelProperty(value = "待填写的流程数量")
|
||||||
private Integer writeFlowCount;
|
private Integer writeFlowCount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "人事审批的流程数量")
|
||||||
|
private Integer personnelCount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ import com.ydool.oa.workFlow.enums.WorkFlowStepStatusEnum;
|
||||||
import com.ydool.oa.workFlow.enums.WorkFlowStepTypeEnum;
|
import com.ydool.oa.workFlow.enums.WorkFlowStepTypeEnum;
|
||||||
import com.ydool.oa.workFlow.enums.WorkFlowTypeEnum;
|
import com.ydool.oa.workFlow.enums.WorkFlowTypeEnum;
|
||||||
import com.ydool.oa.workFlow.mapper.WorkFlowMapper;
|
import com.ydool.oa.workFlow.mapper.WorkFlowMapper;
|
||||||
|
import com.ydool.staff.service.IAuditService;
|
||||||
import com.ydool.system.entity.User;
|
import com.ydool.system.entity.User;
|
||||||
import com.ydool.system.service.impl.UserServiceImpl;
|
import com.ydool.system.service.impl.UserServiceImpl;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -56,6 +57,8 @@ public class WorkFlowService extends BaseService<WorkFlowMapper, WorkFlow> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserServiceImpl userService;
|
private UserServiceImpl userService;
|
||||||
|
@Autowired
|
||||||
|
private IAuditService auditService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起流程
|
* 发起流程
|
||||||
|
@ -289,6 +292,7 @@ public class WorkFlowService extends BaseService<WorkFlowMapper, WorkFlow> {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
workFlowCountDto.setWriteFlowCount(writeFlowCount);
|
workFlowCountDto.setWriteFlowCount(writeFlowCount);
|
||||||
|
workFlowCountDto.setPersonnelCount(auditService.counts());
|
||||||
return AjaxResult.ok().data(workFlowCountDto);
|
return AjaxResult.ok().data(workFlowCountDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,10 +93,4 @@ public class AuditController extends BaseController {
|
||||||
}
|
}
|
||||||
return AjaxResult.fail().msg("审批状态错误");
|
return AjaxResult.fail().msg("审批状态错误");
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping()
|
|
||||||
public AjaxResult count(){
|
|
||||||
return auditService.counts();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,14 +54,14 @@ public class RecruitmentController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// @GetMapping(value = "/submit")
|
@GetMapping(value = "/submit")
|
||||||
// @ApiOperation(value = "已提交审批")
|
@ApiOperation(value = "已提交审批")
|
||||||
// public AjaxResult submit() {
|
public AjaxResult submit() {
|
||||||
// return auditService.submitAudit(getPage());
|
return auditService.submitAudit(getPage());
|
||||||
// }
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/waiting")
|
@GetMapping(value = "/waiting")
|
||||||
@ApiOperation(value = "待我审批")
|
@ApiOperation(value = "人事审批")
|
||||||
public AjaxResult waiting() {
|
public AjaxResult waiting() {
|
||||||
return auditService.waitingAudit(getPage());
|
return auditService.waitingAudit(getPage());
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,6 @@ public interface IAuditService {
|
||||||
|
|
||||||
AjaxResult waitingAudit(Page page);
|
AjaxResult waitingAudit(Page page);
|
||||||
|
|
||||||
AjaxResult counts();
|
Integer counts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -539,7 +539,7 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult submitAudit(Page page) {
|
public AjaxResult submitAudit(Page page) {
|
||||||
Page selectPage = auditMapper.selectPage(page, Wrappers.lambdaQuery(Audit.class)
|
Page selectPage = auditMapper.selectPage(page, Wrappers.lambdaQuery(Audit.class)
|
||||||
.eq(Audit::getAuditState, "submit").eq(Audit::getApprover, StpUtil.getLoginIdAsString()));
|
.eq(Audit::getAuditState, ArgsConst.SUBMIT).eq(Audit::getApprover, StpUtil.getLoginIdAsString()));
|
||||||
return AjaxResult.ok().data(selectPage);
|
return AjaxResult.ok().data(selectPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,15 +553,15 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult waitingAudit(Page page) {
|
public AjaxResult waitingAudit(Page page) {
|
||||||
Page selectPage = auditMapper.selectPage(page, Wrappers.lambdaQuery(Audit.class)
|
Page selectPage = auditMapper.selectPage(page, Wrappers.lambdaQuery(Audit.class)
|
||||||
.eq(Audit::getAuditOrder, "waiting").eq(Audit::getApprover, StpUtil.getLoginIdAsString()));
|
.eq(Audit::getAuditOrder, ArgsConst.WAITING).eq(Audit::getApprover, StpUtil.getLoginIdAsString()));
|
||||||
return AjaxResult.ok().data(selectPage);
|
return AjaxResult.ok().data(selectPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult counts() {
|
public Integer counts() {
|
||||||
Integer count = auditMapper.selectCount(Wrappers.lambdaQuery(Audit.class).eq(Audit::getAuditOrder, "waiting").eq(Audit::getApprover, StpUtil.getLoginIdAsString()));
|
return auditMapper.selectCount(Wrappers.lambdaQuery(Audit.class)
|
||||||
return AjaxResult.ok().data(count);
|
.eq(Audit::getAuditOrder, ArgsConst.WAITING).eq(Audit::getApprover, StpUtil.getLoginIdAsString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,9 @@ public class PersonnelIndicatorsServiceImpl extends BaseService<PersonnelIndicat
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult savePersonnelIndicators(PersonnelIndicatorsRequest personnelIndicatorsRequest) {
|
public AjaxResult savePersonnelIndicators(PersonnelIndicatorsRequest personnelIndicatorsRequest) {
|
||||||
Integer count = organizationMapper.selectCount(Wrappers.lambdaQuery(Organization.class).in(Organization::getAuditState, 0, 2).eq(Organization::getType, ArgsConst.PERSONNEL_INDICATORS));
|
Integer count = organizationMapper.selectCount(Wrappers.lambdaQuery(Organization.class)
|
||||||
|
.in(Organization::getAuditState, 2).eq(Organization::getType, ArgsConst.PERSONNEL_INDICATORS)
|
||||||
|
);
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return AjaxResult.fail("当前有未审批的指标申请!");
|
return AjaxResult.fail("当前有未审批的指标申请!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue