From 2eaf9ce83268eddbed2dca6ccfe7a2b2c2a05c6e Mon Sep 17 00:00:00 2001 From: MrZhai Date: Sun, 6 Mar 2022 16:10:28 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=AE=BE=E7=BD=AE=E8=A1=A5=E5=8D=95=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=97=B6=E6=9B=B4=E6=96=B0=E5=AF=B9=E5=BA=94=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E8=A1=A5=E5=8D=95=E7=B1=BB=E5=9E=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/glxp/sale/admin/dao/basic/BussinessTypeDao.java | 8 ++++++++ .../service/basic/impl/BussinessTypeServiceImpl.java | 5 +++++ .../java/com/glxp/sale/admin/thread/IoErpCheckTask.java | 7 ++----- .../resources/mybatis/mapper/basic/BussinessTypeDao.xml | 6 +++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/sale/admin/dao/basic/BussinessTypeDao.java b/api-admin/src/main/java/com/glxp/sale/admin/dao/basic/BussinessTypeDao.java index 19a292e..8ff7fb8 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/dao/basic/BussinessTypeDao.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/dao/basic/BussinessTypeDao.java @@ -41,4 +41,12 @@ public interface BussinessTypeDao { * @return */ List selectCandidateBussinsessTypes(String mainAction); + + /** + * 更新对应单据类型的补单数据 + * + * @param supplementOrderType + * @param action + */ + void updateSupplementOrderType(@Param("supplementOrderType") String supplementOrderType, @Param("action") String action); } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/service/basic/impl/BussinessTypeServiceImpl.java b/api-admin/src/main/java/com/glxp/sale/admin/service/basic/impl/BussinessTypeServiceImpl.java index c1ac8cc..aa31299 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/service/basic/impl/BussinessTypeServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/service/basic/impl/BussinessTypeServiceImpl.java @@ -112,6 +112,11 @@ public class BussinessTypeServiceImpl implements BussinessTypeService { @Override public boolean updateBussinessType(BussinessTypeEntity bussinessTypeEntity) { + //更新对应单据类型补单类型 + BussinessTypeEntity correspondType = bussinessTypeDao.selectByAction(bussinessTypeEntity.getSupplementOrderType()); + if (correspondType.getCorpType() == 1) { + bussinessTypeDao.updateSupplementOrderType(bussinessTypeEntity.getSupplementOrderType(), bussinessTypeEntity.getAction()); + } return bussinessTypeDao.updateBussinessType(bussinessTypeEntity); } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/thread/IoErpCheckTask.java b/api-admin/src/main/java/com/glxp/sale/admin/thread/IoErpCheckTask.java index f7b06b9..b367c36 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/thread/IoErpCheckTask.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/thread/IoErpCheckTask.java @@ -1,14 +1,11 @@ package com.glxp.sale.admin.thread; import com.glxp.sale.admin.dao.info.ScheduledDao; -import com.glxp.sale.admin.entity.info.ScheduledEntity; -import com.glxp.sale.admin.req.udid.ScheduledRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.SchedulingConfigurer; import org.springframework.scheduling.config.ScheduledTaskRegistrar; -import org.springframework.scheduling.support.CronTrigger; import org.springframework.stereotype.Component; import javax.annotation.Resource; @@ -25,7 +22,7 @@ public class IoErpCheckTask implements SchedulingConfigurer { @Override public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) { - scheduledTaskRegistrar.addTriggerTask(() -> process(), + /* scheduledTaskRegistrar.addTriggerTask(() -> process(), triggerContext -> { ScheduledRequest scheduledRequest = new ScheduledRequest(); scheduledRequest.setCronName("erpCheck"); @@ -35,7 +32,7 @@ public class IoErpCheckTask implements SchedulingConfigurer { logger.error("cron is null"); } return new CronTrigger(cron).nextExecutionTime(triggerContext); - }); + });*/ } private void process() { diff --git a/api-admin/src/main/resources/mybatis/mapper/basic/BussinessTypeDao.xml b/api-admin/src/main/resources/mybatis/mapper/basic/BussinessTypeDao.xml index b0b8ccf..da1ab2b 100644 --- a/api-admin/src/main/resources/mybatis/mapper/basic/BussinessTypeDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/basic/BussinessTypeDao.xml @@ -190,6 +190,9 @@ WHERE id = #{id} + + update basic_bussiness_type set supplementOrderType = #{action} where action = #{supplementOrderType} + DELETE @@ -216,6 +219,7 @@ select name, action from basic_bussiness_type where mainAction = #{mainAction} - and supplementOrderType is null; + and supplementOrderType is null or supplementOrderType = '' + and corpType = 1