From 59959b9ef74e2096c5dbe776176a96769605d919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Thu, 2 Feb 2023 14:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9F=BA=E7=A1=80=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BE=80=E6=9D=A5=E5=8D=95=E4=BD=8D=E7=B1=BB=E5=90=8D?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ntroller.java => BasicCorpController.java} | 8 ++--- .../basic/BasicCorpExportLogController.java | 4 +-- .../basic/BasicGenExcelService.java | 8 ++--- .../controller/basic/BasicGenJsonService.java | 8 ++--- .../controller/basic/UdiRlSupController.java | 4 +-- .../inout/IoCodeTempController.java | 4 +-- ...UnitMaintainDao.java => BasicCorpDao.java} | 2 +- ...tainService.java => BasicCorpService.java} | 2 +- .../impl/BasicCorpImportLogServiceImpl.java | 9 ++--- ...iceImpl.java => BasicCorpServiceImpl.java} | 34 +++++++++---------- ...icUnitMaintainDao.xml => BasicCorpDao.xml} | 2 +- 11 files changed, 34 insertions(+), 51 deletions(-) rename src/main/java/com/glxp/api/controller/basic/{BasicUnitMaintainController.java => BasicCorpController.java} (99%) rename src/main/java/com/glxp/api/dao/basic/{BasicUnitMaintainDao.java => BasicCorpDao.java} (97%) rename src/main/java/com/glxp/api/service/basic/{BasicUnitMaintainService.java => BasicCorpService.java} (96%) rename src/main/java/com/glxp/api/service/basic/impl/{BasicUnitMaintainServiceImpl.java => BasicCorpServiceImpl.java} (74%) rename src/main/resources/mybatis/mapper/basic/{BasicUnitMaintainDao.xml => BasicCorpDao.xml} (99%) diff --git a/src/main/java/com/glxp/api/controller/basic/BasicUnitMaintainController.java b/src/main/java/com/glxp/api/controller/basic/BasicCorpController.java similarity index 99% rename from src/main/java/com/glxp/api/controller/basic/BasicUnitMaintainController.java rename to src/main/java/com/glxp/api/controller/basic/BasicCorpController.java index 0374925c..4670435b 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicUnitMaintainController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicCorpController.java @@ -8,7 +8,6 @@ import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.constant.ConstantStatus; import com.glxp.api.entity.basic.BasicCorpEntity; import com.glxp.api.entity.system.SystemParamConfigEntity; -import com.glxp.api.entity.thrsys.ThrCorpEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; import com.glxp.api.http.ErpBasicClient; @@ -16,12 +15,11 @@ import com.glxp.api.req.basic.BasicUnitMaintainFilterRequest; import com.glxp.api.req.basic.CombineUnitRequest; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterBasicThirdSysRequest; -import com.glxp.api.req.thrsys.FilterThrCorpRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.basic.BasicErpUnitsResponse; import com.glxp.api.res.basic.BasicProductThirdSysResponse; import com.glxp.api.res.basic.BasicUnitMaintainResponse; -import com.glxp.api.service.basic.BasicUnitMaintainService; +import com.glxp.api.service.basic.BasicCorpService; import com.glxp.api.service.system.CompanyService; import com.glxp.api.service.system.SystemParamConfigService; import com.glxp.api.service.thrsys.ThrCorpService; @@ -45,10 +43,10 @@ import java.util.stream.Collectors; * 往来单位信息维护 */ @RestController -public class BasicUnitMaintainController { +public class BasicCorpController { @Resource - private BasicUnitMaintainService basicUnitMaintainService; + private BasicCorpService basicUnitMaintainService; @Resource ThrSystemDetailService thrSystemDetailService; @Resource diff --git a/src/main/java/com/glxp/api/controller/basic/BasicCorpExportLogController.java b/src/main/java/com/glxp/api/controller/basic/BasicCorpExportLogController.java index b76d10ef..1601761f 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicCorpExportLogController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicCorpExportLogController.java @@ -14,7 +14,7 @@ import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.basic.BasicCorpExportLogResponse; import com.glxp.api.service.basic.BasicCorpExportLogService; -import com.glxp.api.service.basic.BasicUnitMaintainService; +import com.glxp.api.service.basic.BasicCorpService; import com.glxp.api.util.CustomUtil; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; @@ -37,7 +37,7 @@ public class BasicCorpExportLogController { @Resource BasicCorpExportLogService basicCorpExportLogService; @Resource - private BasicUnitMaintainService basicUnitMaintainService; + private BasicCorpService basicUnitMaintainService; @Resource private BasicGenJsonService basicGenJsonService;; diff --git a/src/main/java/com/glxp/api/controller/basic/BasicGenExcelService.java b/src/main/java/com/glxp/api/controller/basic/BasicGenExcelService.java index 19f0449d..0dba1bac 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicGenExcelService.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicGenExcelService.java @@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.constant.BasicProcessStatus; -import com.glxp.api.constant.ConstantStatus; import com.glxp.api.entity.basic.BasicCorpEntity; import com.glxp.api.entity.basic.BasicCorpsExportLogEntity; import com.glxp.api.entity.system.SyncDataSetEntity; @@ -12,12 +11,9 @@ import com.glxp.api.http.HttpOkClient; import com.glxp.api.req.basic.BasicCorpsExportRequest; import com.glxp.api.req.basic.BasicUnitMaintainFilterRequest; import com.glxp.api.res.basic.BasicCorpExportLogResponse; -import com.glxp.api.res.basic.UdiRelevanceResponse; import com.glxp.api.service.basic.BasicCorpExportLogService; -import com.glxp.api.service.basic.BasicUnitMaintainService; -import com.glxp.api.service.basic.UdiRelevanceService; +import com.glxp.api.service.basic.BasicCorpService; import com.glxp.api.service.system.SyncDataSetService; -import com.glxp.api.service.system.SystemParamConfigService; import com.glxp.api.util.ExcelUtil; import org.springframework.beans.BeanUtils; import org.springframework.scheduling.annotation.Async; @@ -45,7 +41,7 @@ public class BasicGenExcelService { @Resource BasicCorpExportLogService basicCorpExportLogService; @Resource - BasicUnitMaintainService basicUnitMaintainService; + BasicCorpService basicUnitMaintainService; // @Resource // UdiInfoExportLogService udiInfoExportLogService; // @Resource diff --git a/src/main/java/com/glxp/api/controller/basic/BasicGenJsonService.java b/src/main/java/com/glxp/api/controller/basic/BasicGenJsonService.java index 155f07ab..e75c9969 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicGenJsonService.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicGenJsonService.java @@ -1,6 +1,5 @@ package com.glxp.api.controller.basic; -import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.io.file.FileWriter; import cn.hutool.core.util.ReflectUtil; @@ -11,21 +10,18 @@ import com.glxp.api.constant.BasicProcessStatus; import com.glxp.api.dao.thrsys.ThrCorpDao; import com.glxp.api.entity.basic.BasicCorpEntity; import com.glxp.api.entity.basic.BasicCorpsExportLogEntity; -import com.glxp.api.entity.thrsys.ThrCorpEntity; import com.glxp.api.req.basic.BasicCorpsExportRequest; import com.glxp.api.req.basic.BasicUnitMaintainFilterRequest; import com.glxp.api.req.thrsys.FilterThrCorpRequest; import com.glxp.api.res.basic.BasicCorpExportLogResponse; import com.glxp.api.res.thrsys.ThrCorpsResponse; import com.glxp.api.service.basic.BasicCorpExportLogService; -import com.glxp.api.service.basic.BasicUnitMaintainService; +import com.glxp.api.service.basic.BasicCorpService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; -import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import javax.annotation.Resource; -import java.io.File; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; @@ -37,7 +33,7 @@ public class BasicGenJsonService { @Resource BasicCorpExportLogService corpExportLogService; @Resource - BasicUnitMaintainService basicUnitMaintainService; + BasicCorpService basicUnitMaintainService; // @Resource // UdiInfoExportLogService udiInfoExportLogService; // @Resource diff --git a/src/main/java/com/glxp/api/controller/basic/UdiRlSupController.java b/src/main/java/com/glxp/api/controller/basic/UdiRlSupController.java index 2ee49113..e1df80e2 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiRlSupController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiRlSupController.java @@ -20,7 +20,7 @@ import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.basic.UdiRlSupResponse; import com.glxp.api.res.basic.UdiRelevanceResponse; import com.glxp.api.service.auth.AuthAdminService; -import com.glxp.api.service.basic.BasicUnitMaintainService; +import com.glxp.api.service.basic.BasicCorpService; import com.glxp.api.service.basic.UdiRlSupService; import com.glxp.api.service.basic.CompanyProductsRelService; import com.glxp.api.service.basic.UdiRelevanceService; @@ -50,7 +50,7 @@ public class UdiRlSupController { @Resource private CompanyProductsRelService companyProductsRelService; @Resource - private BasicUnitMaintainService basicUnitMaintainService; + private BasicCorpService basicUnitMaintainService; @Resource private UdiRelevanceService udiRelevanceService; diff --git a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java index c36bd256..0d259c52 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java @@ -17,7 +17,6 @@ import com.glxp.api.entity.basic.UdiEntity; import com.glxp.api.entity.basic.UdiProductEntity; import com.glxp.api.entity.inout.IoCodeEnttity; import com.glxp.api.entity.inout.IoCodeTempEntity; -import com.glxp.api.entity.inout.IoCodeTempEntity; import com.glxp.api.entity.inout.IoOrderEntity; import com.glxp.api.entity.system.SystemParamConfigEntity; import com.glxp.api.http.SpsDirectClient; @@ -32,7 +31,6 @@ import com.glxp.api.res.basic.UdiRlSupResponse; import com.glxp.api.res.inout.AddCodeResult; import com.glxp.api.service.auth.InvWarehouseService; import com.glxp.api.service.basic.*; -import com.glxp.api.service.inout.IoCodeService; import com.glxp.api.service.inout.IoCodeTempService; import com.glxp.api.service.inout.IoOrderService; import com.glxp.api.service.inout.IoTransInoutService; @@ -78,7 +76,7 @@ public class IoCodeTempController extends BaseController { @Resource UdiProductService udiProductService; @Resource - BasicUnitMaintainService basicUnitMaintainService; + BasicCorpService basicUnitMaintainService; @Resource GennerOrderUtils gennerOrderUtils; @Resource diff --git a/src/main/java/com/glxp/api/dao/basic/BasicUnitMaintainDao.java b/src/main/java/com/glxp/api/dao/basic/BasicCorpDao.java similarity index 97% rename from src/main/java/com/glxp/api/dao/basic/BasicUnitMaintainDao.java rename to src/main/java/com/glxp/api/dao/basic/BasicCorpDao.java index 64b441ab..b0a874e5 100644 --- a/src/main/java/com/glxp/api/dao/basic/BasicUnitMaintainDao.java +++ b/src/main/java/com/glxp/api/dao/basic/BasicCorpDao.java @@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; @Mapper -public interface BasicUnitMaintainDao { +public interface BasicCorpDao { List filterList(BasicUnitMaintainFilterRequest basicUnitMaintainFilterRequest); boolean insertBasicUnitMaintain(BasicCorpEntity basicUnitMaintainEntity); diff --git a/src/main/java/com/glxp/api/service/basic/BasicUnitMaintainService.java b/src/main/java/com/glxp/api/service/basic/BasicCorpService.java similarity index 96% rename from src/main/java/com/glxp/api/service/basic/BasicUnitMaintainService.java rename to src/main/java/com/glxp/api/service/basic/BasicCorpService.java index 6d6c434b..35d0657b 100644 --- a/src/main/java/com/glxp/api/service/basic/BasicUnitMaintainService.java +++ b/src/main/java/com/glxp/api/service/basic/BasicCorpService.java @@ -8,7 +8,7 @@ import com.glxp.api.req.basic.BasicUnitMaintainFilterRequest; import java.util.List; -public interface BasicUnitMaintainService { +public interface BasicCorpService { List filterList(BasicUnitMaintainFilterRequest basicUnitMaintainFilterRequest); diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicCorpImportLogServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicCorpImportLogServiceImpl.java index 9bf64498..16ee8c45 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicCorpImportLogServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/BasicCorpImportLogServiceImpl.java @@ -2,21 +2,16 @@ package com.glxp.api.service.basic.impl; import cn.hutool.core.collection.CollUtil; import com.github.pagehelper.PageHelper; -import com.glxp.api.constant.BasicProcessStatus; import com.glxp.api.dao.basic.BasicCorpImportLogDao; -import com.glxp.api.dao.basic.BasicUnitMaintainDao; +import com.glxp.api.dao.basic.BasicCorpDao; import com.glxp.api.dao.thrsys.ThrCorpDao; import com.glxp.api.entity.basic.BasicCorpEntity; -import com.glxp.api.entity.basic.BasicCorpsImportDetailEntity; import com.glxp.api.entity.basic.BasicCorpsImportLogEntity; import com.glxp.api.entity.thrsys.ThrCorpEntity; -import com.glxp.api.req.basic.BasicUnitMaintainFilterRequest; import com.glxp.api.req.basic.FilterCorpImportLogRequest; import com.glxp.api.res.basic.BasicCorpExportLogResponse; import com.glxp.api.res.thrsys.ThrCorpsResponse; import com.glxp.api.service.basic.BasicCorpImportLogService; -import com.glxp.api.service.basic.BasicUnitMaintainService; -import com.glxp.api.util.IpUtils; import lombok.extern.slf4j.Slf4j; import org.apache.ibatis.session.ExecutorType; import org.apache.ibatis.session.SqlSession; @@ -95,7 +90,7 @@ public class BasicCorpImportLogServiceImpl implements BasicCorpImportLogService if (CollUtil.isNotEmpty(importData.getCorpList())) { try { List corpList = importData.getCorpList(); - BasicUnitMaintainDao mapper = batchSession.getMapper(BasicUnitMaintainDao.class); + BasicCorpDao mapper = batchSession.getMapper(BasicCorpDao.class); for (BasicCorpEntity basicUnitMaintainEntity : corpList) { mapper.importBasicUnitMaintain(basicUnitMaintainEntity); } diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicUnitMaintainServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicCorpServiceImpl.java similarity index 74% rename from src/main/java/com/glxp/api/service/basic/impl/BasicUnitMaintainServiceImpl.java rename to src/main/java/com/glxp/api/service/basic/impl/BasicCorpServiceImpl.java index f30c5ddc..d72df189 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicUnitMaintainServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/BasicCorpServiceImpl.java @@ -1,10 +1,10 @@ package com.glxp.api.service.basic.impl; import com.github.pagehelper.PageHelper; -import com.glxp.api.dao.basic.BasicUnitMaintainDao; +import com.glxp.api.dao.basic.BasicCorpDao; import com.glxp.api.entity.basic.BasicCorpEntity; import com.glxp.api.req.basic.BasicUnitMaintainFilterRequest; -import com.glxp.api.service.basic.BasicUnitMaintainService; +import com.glxp.api.service.basic.BasicCorpService; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -13,10 +13,10 @@ import java.util.Date; import java.util.List; @Service -public class BasicUnitMaintainServiceImpl implements BasicUnitMaintainService { +public class BasicCorpServiceImpl implements BasicCorpService { @Resource - BasicUnitMaintainDao basicUnitMaintainDao; + BasicCorpDao basicCorpDao; @Override public List filterList(BasicUnitMaintainFilterRequest basicUnitMaintainFilterRequest) { @@ -28,34 +28,34 @@ public class BasicUnitMaintainServiceImpl implements BasicUnitMaintainService { PageHelper.offsetPage(offset, basicUnitMaintainFilterRequest.getLimit()); } - List data = basicUnitMaintainDao.filterList(basicUnitMaintainFilterRequest); + List data = basicCorpDao.filterList(basicUnitMaintainFilterRequest); return data; } @Override public boolean insertBasicUnitMaintainignore(BasicCorpEntity basicUnitMaintainEntity) { - return basicUnitMaintainDao.insertBasicUnitMaintainignore(basicUnitMaintainEntity); + return basicCorpDao.insertBasicUnitMaintainignore(basicUnitMaintainEntity); } @Override public boolean insertBasicUnitMaintain(BasicCorpEntity basicUnitMaintainEntity) { - return basicUnitMaintainDao.insertBasicUnitMaintain(basicUnitMaintainEntity); + return basicCorpDao.insertBasicUnitMaintain(basicUnitMaintainEntity); } @Override public boolean insert(BasicCorpEntity basicUnitMaintainEntity) { - return basicUnitMaintainDao.insert(basicUnitMaintainEntity); + return basicCorpDao.insert(basicUnitMaintainEntity); } @Override public boolean updateById(BasicCorpEntity basicUnitMaintainSaveRequest) { basicUnitMaintainSaveRequest.setUpdateTime(new Date()); - return basicUnitMaintainDao.updateById(basicUnitMaintainSaveRequest); + return basicCorpDao.updateById(basicUnitMaintainSaveRequest); } @Override public boolean deleteById(String id) { - return basicUnitMaintainDao.deleteById(id); + return basicCorpDao.deleteById(id); } @Override @@ -74,27 +74,27 @@ public class BasicUnitMaintainServiceImpl implements BasicUnitMaintainService { } else if ("thirdId4".equals(thirdSys)) { filterUdiInfoRequest.setThirdId4(thirdId); } - return basicUnitMaintainDao.selectByThirdId(filterUdiInfoRequest); + return basicCorpDao.selectByThirdId(filterUdiInfoRequest); } @Override public List batchSelectByIds(List ids) { - return basicUnitMaintainDao.batchSelectByIds(ids); + return basicCorpDao.batchSelectByIds(ids); } @Override public List batchSelectByErpIds(List erpIds) { - return basicUnitMaintainDao.batchSelectByErpIds(erpIds); + return basicCorpDao.batchSelectByErpIds(erpIds); } @Override public List batchSelectByErpIdsAndName(List erpIds, String name) { - return basicUnitMaintainDao.batchSelectByErpIdsAndName(erpIds, name); + return basicCorpDao.batchSelectByErpIdsAndName(erpIds, name); } @Override public BasicCorpEntity selectById(String id) { - return basicUnitMaintainDao.selectById(id); + return basicCorpDao.selectById(id); } @Override @@ -104,7 +104,7 @@ public class BasicUnitMaintainServiceImpl implements BasicUnitMaintainService { } BasicUnitMaintainFilterRequest filterUdiInfoRequest = new BasicUnitMaintainFilterRequest(); filterUdiInfoRequest.setErpId(id); - List basicUnitMaintainEntities = basicUnitMaintainDao.filterList(filterUdiInfoRequest); + List basicUnitMaintainEntities = basicCorpDao.filterList(filterUdiInfoRequest); if (basicUnitMaintainEntities != null && basicUnitMaintainEntities.size() > 0) return basicUnitMaintainEntities.get(0); return null; @@ -112,7 +112,7 @@ public class BasicUnitMaintainServiceImpl implements BasicUnitMaintainService { @Override public BasicCorpEntity selectByName(String name) { - return basicUnitMaintainDao.selectByName(name); + return basicCorpDao.selectByName(name); } @Override diff --git a/src/main/resources/mybatis/mapper/basic/BasicUnitMaintainDao.xml b/src/main/resources/mybatis/mapper/basic/BasicCorpDao.xml similarity index 99% rename from src/main/resources/mybatis/mapper/basic/BasicUnitMaintainDao.xml rename to src/main/resources/mybatis/mapper/basic/BasicCorpDao.xml index 17bb0095..38aa741d 100644 --- a/src/main/resources/mybatis/mapper/basic/BasicUnitMaintainDao.xml +++ b/src/main/resources/mybatis/mapper/basic/BasicCorpDao.xml @@ -1,7 +1,7 @@ - +