diff --git a/src/main/java/com/gaotao/config/AsyncConfig.java b/src/main/java/com/gaotao/config/AsyncConfig.java new file mode 100644 index 0000000..947a9db --- /dev/null +++ b/src/main/java/com/gaotao/config/AsyncConfig.java @@ -0,0 +1,11 @@ +package com.gaotao.config; + +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.EnableAsync; + +@Configuration +@EnableAsync +@ComponentScan("com.gaotao.modules") +public class AsyncConfig { +} diff --git a/src/main/java/com/gaotao/modules/auditManagement/dao/AuthStepMapper.java b/src/main/java/com/gaotao/modules/auditManagement/dao/AuthStepMapper.java index 423d88d..54f54f6 100644 --- a/src/main/java/com/gaotao/modules/auditManagement/dao/AuthStepMapper.java +++ b/src/main/java/com/gaotao/modules/auditManagement/dao/AuthStepMapper.java @@ -99,4 +99,13 @@ public interface AuthStepMapper { * @date 2021/8/13 */ List getAuthSteps(AuthStepQuery authStepQuery); + + /** + * @author: sxm + * @description: 获取适用于全工具类型的规则 + * @param [authStepQuery] + * @return: java.util.List + * @date: 2022/7/5 15:44 + */ + List getAuthStepsAllToolType(AuthStepQuery authStepQuery); } \ No newline at end of file diff --git a/src/main/java/com/gaotao/modules/print/service/impl/RollPrintServiceImpl.java b/src/main/java/com/gaotao/modules/print/service/impl/RollPrintServiceImpl.java index 9de2f1a..37d651d 100644 --- a/src/main/java/com/gaotao/modules/print/service/impl/RollPrintServiceImpl.java +++ b/src/main/java/com/gaotao/modules/print/service/impl/RollPrintServiceImpl.java @@ -21,6 +21,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import java.util.*; @@ -149,7 +150,6 @@ public class RollPrintServiceImpl implements RollPrintService { labelprinthistService.insertBatch(histsList); } - public void rollPrint(RollParamVo rollParamVo) { Date date = new Date(); List histsList = new ArrayList<>(); diff --git a/src/main/java/com/gaotao/modules/purchaseorder/service/impl/AuthRulePartServiceImpl.java b/src/main/java/com/gaotao/modules/purchaseorder/service/impl/AuthRulePartServiceImpl.java index a47834e..106bce0 100644 --- a/src/main/java/com/gaotao/modules/purchaseorder/service/impl/AuthRulePartServiceImpl.java +++ b/src/main/java/com/gaotao/modules/purchaseorder/service/impl/AuthRulePartServiceImpl.java @@ -38,7 +38,9 @@ public class AuthRulePartServiceImpl extends ServiceImpl i AuthStepQuery authStepQuery = new AuthStepQuery(); authStepQuery.setRecordTypeDb("87"); authStepQuery.setFamilyId(prDetailQuery.getOrderref1()); + // 获取规则 List authStepList = authStepMapper.getAuthSteps(authStepQuery); + // 没有规则,去获取适用于全类型的规则 + if (CollectionUtil.isEmpty(authStepList)){ + authStepList = authStepMapper.getAuthStepsAllToolType(authStepQuery); + } + // 获取对应的规则编号 for (int i = 0; i < authStepList.size(); i++) { AuthorizationHist authorizationHist = new AuthorizationHist(); authorizationHist.setRecordTypeDb(authStepQuery.getRecordTypeDb()); diff --git a/src/main/resources/mapper/auditManagement/AuthStepMapper.xml b/src/main/resources/mapper/auditManagement/AuthStepMapper.xml index 13fe48a..1d30b67 100644 --- a/src/main/resources/mapper/auditManagement/AuthStepMapper.xml +++ b/src/main/resources/mapper/auditManagement/AuthStepMapper.xml @@ -157,15 +157,26 @@ + \ No newline at end of file