|
|
@@ -1,5 +1,6 @@
|
|
|
package com.jzg.organization.service.impl;
|
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.jzg.commons.core.base.BaseController;
|
|
|
@@ -22,6 +23,8 @@ import com.jzg.organization.mapper.PtlAgreementDispatchAfterActionMapper;
|
|
|
import com.jzg.organization.mapper.PtlAgreementDispatchMapper;
|
|
|
import com.jzg.organization.mapper.PtlAgreementDispatchRulesAttrLinkMapper;
|
|
|
import com.jzg.organization.service.*;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -35,12 +38,14 @@ import java.util.stream.Collectors;
|
|
|
/**
|
|
|
* @author dongxin
|
|
|
* @description 针对表【ptl_agreement_dept(协议授权部门表)】的数据库操作Service实现
|
|
|
-* @createDate 2025-02-18 17:58:58
|
|
|
+* @date 2025-02-18 17:58:58
|
|
|
*/
|
|
|
@Service
|
|
|
public class PtlAgreementDispatchServiceImpl extends ServiceImpl<PtlAgreementDispatchMapper, PtlAgreementDispatch>
|
|
|
implements PtlAgreementDispatchService {
|
|
|
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(PtlAgreementDispatchServiceImpl.class);
|
|
|
+
|
|
|
@Autowired
|
|
|
PtlAgreementDispatchRulesAttrLinkMapper rulesAttrLinkMapper;
|
|
|
|
|
|
@@ -118,11 +123,12 @@ public class PtlAgreementDispatchServiceImpl extends ServiceImpl<PtlAgreementDis
|
|
|
|
|
|
@Override
|
|
|
public PtlAgreementDispatchVo getAgreementDispatch(PtlAgreementDispatchQuery ptlAgreementDispatchQuery) {
|
|
|
+ log.info("获取协议调度. ptlAgreementDispatchQuery=[{}]", JSONUtil.toJsonStr(ptlAgreementDispatchQuery));
|
|
|
List<PtlAgreementDispatch> ptlAgreementDispatches = baseMapper.selectList(new LambdaQueryWrapper<PtlAgreementDispatch>()
|
|
|
.eq(PtlAgreementDispatch::getCompanyId, ptlAgreementDispatchQuery.getCompanyId()));
|
|
|
PtlAgreementDispatchVo dispatchVos = new PtlAgreementDispatchVo();
|
|
|
- List<String> dispatchIds = ptlAgreementDispatches.stream().map(x -> x.getId()).collect(Collectors.toList());
|
|
|
- if (dispatchIds.size() > 0) {
|
|
|
+ List<String> dispatchIds = ptlAgreementDispatches.stream().map(PtlAgreementDispatch::getId).collect(Collectors.toList());
|
|
|
+ if (!dispatchIds.isEmpty()) {
|
|
|
List<SysDict> dispatchBeforeActionDict = sysDictService.getByTypeCode("dispatch_before_action");
|
|
|
List<SysDict> dispatchAfterActionDict = sysDictService.getByTypeCode("dispatch_after_action");
|
|
|
|
|
|
@@ -137,7 +143,7 @@ public class PtlAgreementDispatchServiceImpl extends ServiceImpl<PtlAgreementDis
|
|
|
List<PtlAgreementDispatchAfterAction> ptlAgreementDispatchAfterActions = afterActionMapper.getAfterActions(ptlAgreementDispatchQuery.getCompanyId());
|
|
|
int index = 1;
|
|
|
for(PtlAgreementDispatch dispatch : ptlAgreementDispatches){
|
|
|
- if(dispatch.getDispatchName().equals("")){
|
|
|
+ if(dispatch.getDispatchName().isEmpty()){
|
|
|
dispatch.setDispatchName("规则" + index);
|
|
|
index++;
|
|
|
}
|