|
|
|
@ -34,8 +34,10 @@ import org.dromara.oa.erp.service.IErpProjectReportService;
|
|
|
|
import org.dromara.workflow.api.RemoteWorkflowService;
|
|
|
|
import org.dromara.workflow.api.RemoteWorkflowService;
|
|
|
|
import org.dromara.workflow.api.domain.RemoteStartProcess;
|
|
|
|
import org.dromara.workflow.api.domain.RemoteStartProcess;
|
|
|
|
import org.dromara.workflow.api.event.ProcessEvent;
|
|
|
|
import org.dromara.workflow.api.event.ProcessEvent;
|
|
|
|
|
|
|
|
import org.redisson.api.RedissonClient;
|
|
|
|
import org.springframework.context.event.EventListener;
|
|
|
|
import org.springframework.context.event.EventListener;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Collection;
|
|
|
|
import java.util.Collection;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
@ -55,12 +57,12 @@ public class ErpProjectReportDetailServiceImpl implements IErpProjectReportDetai
|
|
|
|
|
|
|
|
|
|
|
|
private final IErpProjectReportService erpProjectReportService;
|
|
|
|
private final IErpProjectReportService erpProjectReportService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final ErpProjectReportDetailMapper baseMapper;
|
|
|
|
private final ErpProjectReportDetailMapper baseMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@DubboReference(timeout = 30000)
|
|
|
|
@DubboReference(timeout = 30000)
|
|
|
|
private RemoteWorkflowService remoteWorkflowService;
|
|
|
|
private RemoteWorkflowService remoteWorkflowService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询项目周报明细
|
|
|
|
* 查询项目周报明细
|
|
|
|
*
|
|
|
|
*
|
|
|
|
@ -68,7 +70,7 @@ public class ErpProjectReportDetailServiceImpl implements IErpProjectReportDetai
|
|
|
|
* @return 项目周报明细
|
|
|
|
* @return 项目周报明细
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ErpProjectReportDetailVo queryById(Long reportDetailId){
|
|
|
|
public ErpProjectReportDetailVo queryById(Long reportDetailId) {
|
|
|
|
return baseMapper.selectVoById(reportDetailId);
|
|
|
|
return baseMapper.selectVoById(reportDetailId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -120,8 +122,7 @@ public class ErpProjectReportDetailServiceImpl implements IErpProjectReportDetai
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getProjectPhases()), ErpProjectReportDetail::getProjectPhases, bo.getProjectPhases())
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getProjectPhases()), ErpProjectReportDetail::getProjectPhases, bo.getProjectPhases())
|
|
|
|
.eq(bo.getContractId() != null, ErpProjectReportDetail::getContractId, bo.getContractId())
|
|
|
|
.eq(bo.getContractId() != null, ErpProjectReportDetail::getContractId, bo.getContractId())
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getOssId()), ErpProjectReportDetail::getOssId, bo.getOssId())
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getOssId()), ErpProjectReportDetail::getOssId, bo.getOssId())
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getActiveFlag()), ErpProjectReportDetail::getActiveFlag, bo.getActiveFlag())
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getActiveFlag()), ErpProjectReportDetail::getActiveFlag, bo.getActiveFlag());
|
|
|
|
;
|
|
|
|
|
|
|
|
return lqw;
|
|
|
|
return lqw;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -158,7 +159,7 @@ public class ErpProjectReportDetailServiceImpl implements IErpProjectReportDetai
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 保存前的数据校验
|
|
|
|
* 保存前的数据校验
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void validEntityBeforeSave(ErpProjectReportDetail entity){
|
|
|
|
private void validEntityBeforeSave(ErpProjectReportDetail entity) {
|
|
|
|
//TODO 做一些数据校验,如唯一约束
|
|
|
|
//TODO 做一些数据校验,如唯一约束
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -171,7 +172,7 @@ public class ErpProjectReportDetailServiceImpl implements IErpProjectReportDetai
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
|
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
|
|
|
if(isValid){
|
|
|
|
if (isValid) {
|
|
|
|
//TODO 做一些业务上的校验,判断是否需要校验
|
|
|
|
//TODO 做一些业务上的校验,判断是否需要校验
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return baseMapper.deleteByIds(ids) > 0;
|
|
|
|
return baseMapper.deleteByIds(ids) > 0;
|
|
|
|
@ -179,14 +180,15 @@ public class ErpProjectReportDetailServiceImpl implements IErpProjectReportDetai
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 提交项目周报信息并提交流程
|
|
|
|
* 提交项目周报信息并提交流程
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param projectReport
|
|
|
|
* @param projectReport
|
|
|
|
* @param projectDetailReport
|
|
|
|
* @param projectDetailReport
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@GlobalTransactional(rollbackFor = Exception.class)
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
public ErpProjectReportDetailVo projectReportSubmitAndFlowStart(ErpProjectReportBo projectReport, ErpProjectReportDetailBo projectDetailReport) {
|
|
|
|
public ErpProjectReportDetailVo projectReportSubmitAndFlowStart(ErpProjectReportBo projectReport, ErpProjectReportDetailBo projectDetailReport) {
|
|
|
|
if (projectReport.getReportId() != null) {
|
|
|
|
if (StringUtils.isNotNull(projectReport.getReportId())) {
|
|
|
|
ErpProjectReportVo existingReport = erpProjectReportService.queryById(projectReport.getReportId());
|
|
|
|
ErpProjectReportVo existingReport = erpProjectReportService.queryById(projectReport.getReportId());
|
|
|
|
if (existingReport != null) {
|
|
|
|
if (existingReport != null) {
|
|
|
|
erpProjectReportService.updateByBo(projectReport);
|
|
|
|
erpProjectReportService.updateByBo(projectReport);
|
|
|
|
|