diff --git a/code-util/pom.xml b/code-util/pom.xml index 3e5aa7a1..baff84a6 100644 --- a/code-util/pom.xml +++ b/code-util/pom.xml @@ -4,9 +4,9 @@ 4.0.0 - com.hzs + com.bd hzs - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT code-util diff --git a/hzs-api-lenjoy/hzs-api-lenjoy-member/pom.xml b/hzs-api-lenjoy/hzs-api-lenjoy-member/pom.xml index 149cd46c..cdb86f46 100644 --- a/hzs-api-lenjoy/hzs-api-lenjoy-member/pom.xml +++ b/hzs-api-lenjoy/hzs-api-lenjoy-member/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-api-lenjoy - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-api-lenjoy-member @@ -19,7 +19,7 @@ - com.hzs + com.bd hzs-api-system diff --git a/hzs-api-lenjoy/hzs-api-lenjoy-sale/pom.xml b/hzs-api-lenjoy/hzs-api-lenjoy-sale/pom.xml index 8934cd59..0ab206d8 100644 --- a/hzs-api-lenjoy/hzs-api-lenjoy-sale/pom.xml +++ b/hzs-api-lenjoy/hzs-api-lenjoy-sale/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-api-lenjoy - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-api-lenjoy-sale @@ -19,7 +19,7 @@ - com.hzs + com.bd hzs-api-system diff --git a/hzs-api-lenjoy/pom.xml b/hzs-api-lenjoy/pom.xml index 5989e404..6bf6a621 100644 --- a/hzs-api-lenjoy/pom.xml +++ b/hzs-api-lenjoy/pom.xml @@ -4,9 +4,9 @@ 4.0.0 - com.hzs + com.bd hzs - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-api-lenjoy @@ -21,7 +21,7 @@ - com.hzs + com.bd hzs-common-domain diff --git a/hzs-api/hzs-api-activity/pom.xml b/hzs-api/hzs-api-activity/pom.xml index 8d5ad3af..2400e30a 100644 --- a/hzs-api/hzs-api-activity/pom.xml +++ b/hzs-api/hzs-api-activity/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-api - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-api-activity @@ -19,7 +19,7 @@ - com.hzs + com.bd hzs-api-system diff --git a/hzs-api/hzs-api-bonus/pom.xml b/hzs-api/hzs-api-bonus/pom.xml index 188b6b56..91f86a44 100644 --- a/hzs-api/hzs-api-bonus/pom.xml +++ b/hzs-api/hzs-api-bonus/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-api - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-api-bonus @@ -19,7 +19,7 @@ - com.hzs + com.bd hzs-api-system diff --git a/hzs-api/hzs-api-member/pom.xml b/hzs-api/hzs-api-member/pom.xml index b125f17f..7e67de29 100644 --- a/hzs-api/hzs-api-member/pom.xml +++ b/hzs-api/hzs-api-member/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-api - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-api-member @@ -19,7 +19,7 @@ - com.hzs + com.bd hzs-api-system diff --git a/hzs-api/hzs-api-report/pom.xml b/hzs-api/hzs-api-report/pom.xml index 2b2998ef..421b280e 100644 --- a/hzs-api/hzs-api-report/pom.xml +++ b/hzs-api/hzs-api-report/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-api - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-api-report @@ -18,7 +18,7 @@ - com.hzs + com.bd hzs-api-system diff --git a/hzs-api/hzs-api-sale/pom.xml b/hzs-api/hzs-api-sale/pom.xml index 8f0126af..706d7bf1 100644 --- a/hzs-api/hzs-api-sale/pom.xml +++ b/hzs-api/hzs-api-sale/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-api - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-api-sale @@ -19,7 +19,7 @@ - com.hzs + com.bd hzs-api-system diff --git a/hzs-api/hzs-api-scm/pom.xml b/hzs-api/hzs-api-scm/pom.xml index 9c42d325..b03d66df 100644 --- a/hzs-api/hzs-api-scm/pom.xml +++ b/hzs-api/hzs-api-scm/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-api - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-api-scm @@ -19,11 +19,11 @@ - com.hzs + com.bd hzs-api-system - com.hzs + com.bd hzs-common-domain diff --git a/hzs-api/hzs-api-system/pom.xml b/hzs-api/hzs-api-system/pom.xml index 4012499c..a5565e19 100644 --- a/hzs-api/hzs-api-system/pom.xml +++ b/hzs-api/hzs-api-system/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-api - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-api-system diff --git a/hzs-api/hzs-api-third/pom.xml b/hzs-api/hzs-api-third/pom.xml index 87e7e020..ab799b09 100644 --- a/hzs-api/hzs-api-third/pom.xml +++ b/hzs-api/hzs-api-third/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-api - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-api-third @@ -19,7 +19,7 @@ - com.hzs + com.bd hzs-api-system diff --git a/hzs-api/pom.xml b/hzs-api/pom.xml index c48c8483..5625e1d9 100644 --- a/hzs-api/pom.xml +++ b/hzs-api/pom.xml @@ -4,9 +4,9 @@ 4.0.0 - com.hzs + com.bd hzs - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-api @@ -21,7 +21,7 @@ - com.hzs + com.bd hzs-common-domain diff --git a/hzs-business-lenjoy/hzs-business-lenjoy-member/pom.xml b/hzs-business-lenjoy/hzs-business-lenjoy-member/pom.xml index 1c87a45b..c9530865 100644 --- a/hzs-business-lenjoy/hzs-business-lenjoy-member/pom.xml +++ b/hzs-business-lenjoy/hzs-business-lenjoy-member/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-business-lenjoy - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-business-lenjoy-member @@ -20,36 +20,36 @@ - com.hzs + com.bd hzs-api-lenjoy-member - com.hzs + com.bd hzs-business-common - com.hzs + com.bd hzs-api-system - com.hzs + com.bd hzs-api-lenjoy-sale - com.hzs + com.bd hzs-api-third - com.hzs + com.bd hzs-common-aop diff --git a/hzs-business-lenjoy/hzs-business-lenjoy-sale/pom.xml b/hzs-business-lenjoy/hzs-business-lenjoy-sale/pom.xml index 82edb5b7..2c8b1c1b 100644 --- a/hzs-business-lenjoy/hzs-business-lenjoy-sale/pom.xml +++ b/hzs-business-lenjoy/hzs-business-lenjoy-sale/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-business-lenjoy - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-business-lenjoy-sale @@ -20,13 +20,13 @@ - com.hzs + com.bd hzs-api-lenjoy-sale - com.hzs + com.bd hzs-business-common @@ -38,25 +38,25 @@ - com.hzs + com.bd hzs-api-sale - com.hzs + com.bd hzs-api-scm - com.hzs + com.bd hzs-api-lenjoy-member - com.hzs + com.bd hzs-api-third diff --git a/hzs-business-lenjoy/pom.xml b/hzs-business-lenjoy/pom.xml index d3d506c8..a686f442 100644 --- a/hzs-business-lenjoy/pom.xml +++ b/hzs-business-lenjoy/pom.xml @@ -4,9 +4,9 @@ 4.0.0 - com.hzs + com.bd hzs - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-business-lenjoy @@ -57,7 +57,7 @@ - com.hzs + com.bd hzs-common-security @@ -69,7 +69,7 @@ - com.hzs + com.bd hzs-common-aop diff --git a/hzs-business/hzs-business-bonus/pom.xml b/hzs-business/hzs-business-bonus/pom.xml index 8412887d..be1e840d 100644 --- a/hzs-business/hzs-business-bonus/pom.xml +++ b/hzs-business/hzs-business-bonus/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-business - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-business-bonus @@ -19,35 +19,35 @@ - com.hzs + com.bd hzs-business-common - com.hzs + com.bd hzs-api-sale - com.hzs + com.bd hzs-api-third - com.hzs + com.bd hzs-common-aop - com.hzs + com.bd hzs-api-bonus diff --git a/hzs-business/hzs-business-common/pom.xml b/hzs-business/hzs-business-common/pom.xml index ef93f95f..f8ba28fd 100644 --- a/hzs-business/hzs-business-common/pom.xml +++ b/hzs-business/hzs-business-common/pom.xml @@ -4,8 +4,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> hzs-business - com.hzs - 3.0.0-SNAPSHOT + com.bd + 1.0.0-SNAPSHOT 4.0.0 @@ -18,7 +18,7 @@ - com.hzs + com.bd hzs-common-domain diff --git a/hzs-business/hzs-business-member/pom.xml b/hzs-business/hzs-business-member/pom.xml index 1f6a591c..d2e88236 100644 --- a/hzs-business/hzs-business-member/pom.xml +++ b/hzs-business/hzs-business-member/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-business - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-business-member @@ -19,41 +19,41 @@ - com.hzs + com.bd hzs-business-common - com.hzs + com.bd hzs-api-member - com.hzs + com.bd hzs-api-system - com.hzs + com.bd hzs-api-sale - com.hzs + com.bd hzs-common-aop - com.hzs + com.bd hzs-api-third diff --git a/hzs-business/hzs-business-member/src/main/java/com/hzs/member/base/controller/manage/CuMemberTeamController.java b/hzs-business/hzs-business-member/src/main/java/com/hzs/member/base/controller/manage/CuMemberTeamController.java index c96b224e..d31a4c08 100644 --- a/hzs-business/hzs-business-member/src/main/java/com/hzs/member/base/controller/manage/CuMemberTeamController.java +++ b/hzs-business/hzs-business-member/src/main/java/com/hzs/member/base/controller/manage/CuMemberTeamController.java @@ -22,6 +22,7 @@ import com.hzs.common.util.TransactionUtils; import com.hzs.member.base.IMemberServiceApi; import com.hzs.member.base.service.ICuMemberTeamService; import com.hzs.member.base.vo.CuMemberTeamVO; +import com.hzs.system.base.ITransactionServiceApi; import org.apache.dubbo.config.annotation.DubboReference; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -45,6 +46,8 @@ public class CuMemberTeamController extends BaseController { @DubboReference IMemberServiceApi iMemberServiceApi; + @DubboReference + ITransactionServiceApi iTransactionServiceApi; private RedisService redisService; @@ -144,6 +147,10 @@ public class CuMemberTeamController extends BaseController { return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.MEMBER_CODE_REPEAT)); } cuMemberTeam.setPkMember(member.getData().getPkId()); + //字段翻译保存到数据库 + R pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.MEMBER, + cuMemberTeam.getTeamName(), EYesNo.NO, EYesNo.NO); + cuMemberTeam.setPkTransaction(pkTransaction.getData()); cuMemberTeam.setPkCountry(SecurityUtils.getPkCountry()); cuMemberTeam.setPkCreator(SecurityUtils.getUserId()); cuMemberTeam.setCreationTime(new Date()); @@ -187,6 +194,15 @@ public class CuMemberTeamController extends BaseController { return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.MEMBER_CODE_REPEAT)); } cuMemberTeam.setPkMember(member.getData().getPkId()); + if (null != cuMemberTeam.getPkTransaction()) { + iTransactionServiceApi.updateTransaction(pkCountry, + cuMemberTeam.getTeamName(), cuMemberTeam.getPkTransaction(), true); + } else { + //字段翻译保存到数据库 + R pkTransaction = iTransactionServiceApi.createTransaction(pkCountry, ETransactionKey.MEMBER, + cuMemberTeam.getTeamName(), EYesNo.NO, EYesNo.NO); + cuMemberTeam.setPkTransaction(pkTransaction.getData()); + } cuMemberTeam.setPkModified(SecurityUtils.getUserId()); cuMemberTeam.setModifiedTime(new Date()); redisService.deleteObjectByKey(CacheConstants.CU_MEMBER_TEAM + pkCountry); @@ -227,6 +243,11 @@ public class CuMemberTeamController extends BaseController { updateWrapper.set("DEL_FLAG", EDelFlag.DELETE.getValue()); updateWrapper.set("PK_MODIFIED", SecurityUtils.getUserId()); updateWrapper.set("MODIFIED_TIME", new Date()); + //删除翻译 + CuMemberTeam memberTeam = cuMemberTeamService.getById(pkId); + List pkIdList = new ArrayList<>(); + pkIdList.add(memberTeam.getPkTransaction().longValue()); + iTransactionServiceApi.removeTransactionByPkId(pkIdList); redisService.deleteObjectByKey(CacheConstants.CU_MEMBER_TEAM + SecurityUtils.getPkCountry()); return toAjax(cuMemberTeamService.update(updateWrapper)); } diff --git a/hzs-business/hzs-business-report/pom.xml b/hzs-business/hzs-business-report/pom.xml index 772864a8..33fe017c 100644 --- a/hzs-business/hzs-business-report/pom.xml +++ b/hzs-business/hzs-business-report/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-business - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-business-report @@ -20,18 +20,18 @@ - com.hzs + com.bd hzs-api-report - com.hzs + com.bd hzs-api-sale - com.hzs + com.bd hzs-business-common diff --git a/hzs-business/hzs-business-sale/pom.xml b/hzs-business/hzs-business-sale/pom.xml index 06c36a0a..4198bed5 100644 --- a/hzs-business/hzs-business-sale/pom.xml +++ b/hzs-business/hzs-business-sale/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-business - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-business-sale @@ -20,19 +20,19 @@ - com.hzs + com.bd hzs-api-sale - com.hzs + com.bd hzs-api-third - com.hzs + com.bd hzs-business-common @@ -44,18 +44,18 @@ - com.hzs + com.bd hzs-api-bonus - com.hzs + com.bd hzs-api-scm diff --git a/hzs-business/hzs-business-sale/src/main/java/com/hzs/sale/product/service/impl/BdAreaClassifyServiceImpl.java b/hzs-business/hzs-business-sale/src/main/java/com/hzs/sale/product/service/impl/BdAreaClassifyServiceImpl.java index d7895281..0bd08c5c 100644 --- a/hzs-business/hzs-business-sale/src/main/java/com/hzs/sale/product/service/impl/BdAreaClassifyServiceImpl.java +++ b/hzs-business/hzs-business-sale/src/main/java/com/hzs/sale/product/service/impl/BdAreaClassifyServiceImpl.java @@ -4,7 +4,10 @@ import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.hzs.common.core.constant.CacheConstants; +import com.hzs.common.core.domain.R; import com.hzs.common.core.enums.EDelFlag; +import com.hzs.common.core.enums.ETransactionKey; +import com.hzs.common.core.enums.EYesNo; import com.hzs.common.core.service.RedisService; import com.hzs.common.domain.sale.product.BdAreaClassify; import com.hzs.common.domain.sale.product.BdAreaClassifySpecialArea; @@ -14,7 +17,9 @@ import com.hzs.sale.product.mapper.BdAreaClassifyMapper; import com.hzs.sale.product.service.IBdAreaClassifyService; import com.hzs.sale.product.service.IBdAreaClassifySpecialAreaService; import com.hzs.sale.product.vo.AreaClassifyVo; +import com.hzs.system.base.ITransactionServiceApi; import com.hzs.system.sys.dto.LoginUser; +import org.apache.dubbo.config.annotation.DubboReference; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -38,6 +43,8 @@ public class BdAreaClassifyServiceImpl extends ServiceImpl transaction = transactionServiceApi.createTransaction(loginUser.getDataCountry(), ETransactionKey.SPEC, areaClassify.getClassifyName(), EYesNo.NO, EYesNo.NO); + areaClassify.setPkTransactionKey(transaction.getData()); baseMapper.insert(areaClassify); List list = new ArrayList<>(); if (areaClassifyParam.getSpecialAreaList() != null) { @@ -84,6 +93,8 @@ public class BdAreaClassifyServiceImpl extends ServiceImpl transaction = transactionServiceApi.createTransaction(loginUser.getDataCountry(), ETransactionKey.SPEC, areaClassify.getClassifyName(), EYesNo.NO, EYesNo.NO); + areaClassify.setPkTransactionKey(transaction.getData()); baseMapper.updateById(areaClassify); // 清空 中间表数据重新添加 areaClassifySpecialAreaService.deleteByAreaClassifyPk(areaClassify.getPkId()); diff --git a/hzs-business/hzs-business-scm/pom.xml b/hzs-business/hzs-business-scm/pom.xml index 6f82c597..cb4611e3 100644 --- a/hzs-business/hzs-business-scm/pom.xml +++ b/hzs-business/hzs-business-scm/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-business - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-business-scm @@ -19,28 +19,28 @@ - com.hzs + com.bd hzs-business-common - com.hzs + com.bd hzs-api-sale - com.hzs + com.bd hzs-api-scm - com.hzs + com.bd hzs-common-aop - com.hzs + com.bd hzs-common-domain diff --git a/hzs-business/hzs-business-system/pom.xml b/hzs-business/hzs-business-system/pom.xml index 2124eee2..ff4a6022 100644 --- a/hzs-business/hzs-business-system/pom.xml +++ b/hzs-business/hzs-business-system/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-business - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-business-system @@ -20,50 +20,50 @@ - com.hzs + com.bd hzs-api-system - com.hzs + com.bd hzs-api-member - com.hzs + com.bd hzs-api-sale - com.hzs + com.bd hzs-api-third - com.hzs + com.bd hzs-api-report - com.hzs + com.bd hzs-api-scm - com.hzs + com.bd hzs-business-common diff --git a/hzs-business/hzs-business-system/src/main/java/com/hzs/system/config/controller/manage/BdBarCodeItemsController.java b/hzs-business/hzs-business-system/src/main/java/com/hzs/system/config/controller/manage/BdBarCodeItemsController.java index 1903adca..7172bf9d 100644 --- a/hzs-business/hzs-business-system/src/main/java/com/hzs/system/config/controller/manage/BdBarCodeItemsController.java +++ b/hzs-business/hzs-business-system/src/main/java/com/hzs/system/config/controller/manage/BdBarCodeItemsController.java @@ -10,7 +10,6 @@ import com.hzs.common.core.constant.EnumsPrefixConstants; import com.hzs.common.core.constant.msg.ConfigMsgConstants; import com.hzs.common.core.enums.*; import com.hzs.common.core.exception.ServiceException; -import com.hzs.common.core.utils.BarcodeToPdfUtil; import com.hzs.common.core.utils.DateUtils; import com.hzs.common.core.utils.StringUtils; import com.hzs.common.core.utils.poi.ExcelUtil; @@ -56,8 +55,6 @@ public class BdBarCodeItemsController extends BaseController { @Autowired private IBdBarCodeService barCodeService; @Autowired - private BarcodeToPdfUtil barcodeToPdfUtil; - @Autowired private ITransactionCommonService iTransactionCommonService; /** @@ -165,8 +162,8 @@ public class BdBarCodeItemsController extends BaseController { List list = barCodeItemsService.list(querywrapper); if(CollectionUtil.isNotEmpty(list)){ List barcodes = list.stream().map(BdBarCodeItems::getBarCode).collect(Collectors.toList()); - byte[] b =barcodeToPdfUtil.exportBarcodeToPdfBty(barcodes); - IoUtil.write(response.getOutputStream(),true,b); +// byte[] b =barcodeToPdfUtil.exportBarcodeToPdfBty(barcodes); +// IoUtil.write(response.getOutputStream(),true,b); //打印完成后更改条形码表中status状态 for(BdBarCodeItems bbc: list){ bbc.setCodeStatus(EBarcodeStatus.PRINT.getValue()); diff --git a/hzs-business/pom.xml b/hzs-business/pom.xml index a78e9a1f..03cdae16 100644 --- a/hzs-business/pom.xml +++ b/hzs-business/pom.xml @@ -4,9 +4,9 @@ 4.0.0 - com.hzs + com.bd hzs - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-business @@ -57,7 +57,7 @@ - com.hzs + com.bd hzs-common-security @@ -69,7 +69,7 @@ - com.hzs + com.bd hzs-common-aop diff --git a/hzs-common/hzs-common-aop/pom.xml b/hzs-common/hzs-common-aop/pom.xml index 7974fff8..e96a1f92 100644 --- a/hzs-common/hzs-common-aop/pom.xml +++ b/hzs-common/hzs-common-aop/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-common - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-common-aop @@ -20,13 +20,13 @@ - com.hzs + com.bd hzs-common-core - com.hzs + com.bd hzs-api-system diff --git a/hzs-common/hzs-common-core/pom.xml b/hzs-common/hzs-common-core/pom.xml index f97b817d..a9dcc144 100644 --- a/hzs-common/hzs-common-core/pom.xml +++ b/hzs-common/hzs-common-core/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-common - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-common-core @@ -170,11 +170,12 @@ hutool-all - + diff --git a/hzs-common/hzs-common-core/src/main/java/com/hzs/common/core/utils/BarcodeToPdfUtil.java b/hzs-common/hzs-common-core/src/main/java/com/hzs/common/core/utils/BarcodeToPdfUtil.java deleted file mode 100644 index 0c6c02f9..00000000 --- a/hzs-common/hzs-common-core/src/main/java/com/hzs/common/core/utils/BarcodeToPdfUtil.java +++ /dev/null @@ -1,172 +0,0 @@ -package com.hzs.common.core.utils; - -import com.itextpdf.barcodes.Barcode128; -import com.itextpdf.kernel.colors.ColorConstants; -import com.itextpdf.kernel.geom.PageSize; -import com.itextpdf.kernel.pdf.PdfDocument; -import com.itextpdf.kernel.pdf.PdfPage; -import com.itextpdf.kernel.pdf.PdfWriter; -import com.itextpdf.kernel.pdf.canvas.PdfCanvas; -import com.itextpdf.kernel.pdf.xobject.PdfFormXObject; -import com.itextpdf.layout.element.Image; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -/** - * @author: sui q - * @time: 2021/12/20 16:47 - * @description: - * @classname: TestIText - * @package_name: com.hzs.web.controller.manage - */ -@Component -public class BarcodeToPdfUtil { - @Value("${uploadfile.uploadFileUrl}") - private static String filePath; - -// public final static String DEST = "/barcode/barcode.pdf"; - - public PdfFormXObject createBarcode(String code, PdfDocument pdfDoc) { - Barcode128 code128 = new Barcode128(pdfDoc); - code128.setCode("Barcode128 barcode"); - code128.setSize(10f); - code128.setBarHeight(50f); - code128.setCode(code); - code128.setBaseline(10f); - code128.setCodeType(Barcode128.CODE128); - PdfFormXObject pdfFormXObject = code128.createFormXObject(ColorConstants.BLACK, - ColorConstants.BLACK, - pdfDoc); - - return pdfFormXObject; - } - - public Image createBarcodeImage(float mw, float mh, String code, PdfDocument pdfDoc) { - PdfFormXObject pdfFormXObject = createBarcode(code, pdfDoc); - Image image = new Image(pdfFormXObject).scale(mw, mh); - return image; - } - - public String exportBarcodeToPdf(String path, List barcodeList) { - try { - path = path + "/barcode.pdf"; - File file = new File(path); - if(!file.getParentFile().exists()){ - try { - file.getParentFile().mkdirs(); - file.createNewFile(); - } catch (Exception e) { - e.printStackTrace(); - } - } - PdfDocument pdfDoc = new PdfDocument(new PdfWriter(path)); - int n = barcodeList.size(); - int startIndex = 0; - int endINdex; - while (n > 0) { - List subList; - if (n > 100) { - endINdex = startIndex + 100; - subList = barcodeList.subList(startIndex, endINdex); - startIndex = endINdex; - } else { - endINdex = startIndex + n; - subList = barcodeList.subList(startIndex, endINdex); - } - PdfPage pdfPage = pdfDoc.addNewPage(new PageSize(530, 840)); - Integer x = 0; - Integer y = 790; - for (int i = 1; i <= subList.size(); i++) { - PdfCanvas canvas = new PdfCanvas(pdfPage); - PdfFormXObject pdfFormXObject = createBarcode(subList.get(i-1), pdfDoc); - canvas.addXObject(pdfFormXObject, x * 135 + 3, y, 0.85f); - x++; - if (i % 4 == 0) { - x = 0; - y -= 32; - } - } - n -= 100; - } - pdfDoc.close(); - } catch (Exception e) { - e.printStackTrace(); - } - return path; - } - /** - * @description: 输出字节流 - * @author: zhang jing - * @date: 2023/7/31 14:35 - * @param: [barcodeList] - * @return: byte[] - **/ - public byte[] exportBarcodeToPdfBty(List barcodeList) { - ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - - try (PdfDocument pdfDoc = new PdfDocument(new PdfWriter(outputStream))) { - int n = barcodeList.size(); - int startIndex = 0; - int endIndex; - while (n > 0) { - List subList; - if (n > 100) { - endIndex = startIndex + 100; - subList = barcodeList.subList(startIndex, endIndex); - startIndex = endIndex; - } else { - endIndex = startIndex + n; - subList = barcodeList.subList(startIndex, endIndex); - } - PdfPage pdfPage = pdfDoc.addNewPage(new PageSize(530, 840)); - Integer x = 0; - Integer y = 790; - for (int i = 1; i <= subList.size(); i++) { - PdfCanvas canvas = new PdfCanvas(pdfPage); - PdfFormXObject pdfFormXObject = createBarcode(subList.get(i - 1), pdfDoc); - canvas.addXObject(pdfFormXObject, x * 135 + 3, y, 0.85f); - x++; - if (i % 4 == 0) { - x = 0; - y -= 32; - } - } - n -= 100; - } - } catch (Exception e) { - e.printStackTrace(); - } - - return outputStream.toByteArray(); - } - - - public static void main(String[] args) { - BarcodeToPdfUtil barcodeToPdf = new BarcodeToPdfUtil(); - List barcodeList = new ArrayList<>(); - StringBuilder stringBuilder = new StringBuilder(); - String code = "YTSJ2112"; - Integer num = 600; - for (int i = 1; i <= num; i++) { - stringBuilder.setLength(0); - // 补零之后数字的总长度 - int len = 15; - stringBuilder.append(code); - stringBuilder.append(i); - int temp = len - stringBuilder.length(); - if (temp > 0) { - //若长度不足进行补零 - while (stringBuilder.length() < len) { - stringBuilder.insert(code.length(), "0"); - } - } - barcodeList.add(stringBuilder.toString()); - } - barcodeToPdf.exportBarcodeToPdf(code, barcodeList); - } -} diff --git a/hzs-common/hzs-common-domain/pom.xml b/hzs-common/hzs-common-domain/pom.xml index 690c2845..4c39e292 100644 --- a/hzs-common/hzs-common-domain/pom.xml +++ b/hzs-common/hzs-common-domain/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - com.hzs + com.bd hzs-common - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-common-domain @@ -21,7 +21,7 @@ - com.hzs + com.bd hzs-common-core diff --git a/hzs-common/hzs-common-security/pom.xml b/hzs-common/hzs-common-security/pom.xml index 9b683949..e37bc9ac 100644 --- a/hzs-common/hzs-common-security/pom.xml +++ b/hzs-common/hzs-common-security/pom.xml @@ -4,9 +4,9 @@ 4.0.0 - com.hzs + com.bd hzs-common - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-common-security @@ -25,13 +25,13 @@ - com.hzs + com.bd hzs-api-system - com.hzs + com.bd hzs-api-member diff --git a/hzs-common/pom.xml b/hzs-common/pom.xml index eaa2ed1b..ff0bdb7e 100644 --- a/hzs-common/pom.xml +++ b/hzs-common/pom.xml @@ -4,9 +4,9 @@ 4.0.0 - com.hzs + com.bd hzs - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT diff --git a/hzs-gateway/pom.xml b/hzs-gateway/pom.xml index 0a2c5f69..0b5c4538 100644 --- a/hzs-gateway/pom.xml +++ b/hzs-gateway/pom.xml @@ -4,9 +4,9 @@ 4.0.0 - com.hzs + com.bd hzs - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-gateway @@ -73,7 +73,7 @@ - com.hzs + com.bd hzs-common-core diff --git a/hzs-gateway/src/main/resources/bootstrap.yml b/hzs-gateway/src/main/resources/bootstrap.yml index b02ef363..e492c56a 100644 --- a/hzs-gateway/src/main/resources/bootstrap.yml +++ b/hzs-gateway/src/main/resources/bootstrap.yml @@ -29,6 +29,8 @@ spring: shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} ## 业务模块依赖的公用配置(缓存、数据库、事务、mybatis-plus) + - business-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + ## 业务模块依赖的公用配置(缓存、数据库、事务、mybatis-plus) - business-gateway-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} sentinel: # 取消控制台懒加载 diff --git a/hzs-shop/pom.xml b/hzs-shop/pom.xml index 679d5f1e..8c954c97 100644 --- a/hzs-shop/pom.xml +++ b/hzs-shop/pom.xml @@ -4,9 +4,9 @@ 4.0.0 - com.hzs + com.bd hzs - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-shop @@ -54,13 +54,13 @@ - com.hzs + com.bd hzs-common-security - com.hzs + com.bd hzs-common-core @@ -72,25 +72,25 @@ - com.hzs + com.bd hzs-common-aop - com.hzs + com.bd hzs-business-common - com.hzs + com.bd hzs-api-member - com.hzs + com.bd hzs-api-sale diff --git a/hzs-third/pom.xml b/hzs-third/pom.xml index 2b79e7bd..3093e9a7 100644 --- a/hzs-third/pom.xml +++ b/hzs-third/pom.xml @@ -4,9 +4,9 @@ 4.0.0 - com.hzs + com.bd hzs - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs-third @@ -54,37 +54,37 @@ - com.hzs + com.bd hzs-api-third - com.hzs + com.bd hzs-common-security - com.hzs + com.bd hzs-common-core - com.hzs + com.bd hzs-api-sale - com.hzs + com.bd hzs-api-bonus - com.hzs + com.bd hzs-api-report @@ -136,13 +136,13 @@ - com.hzs + com.bd hzs-common-aop - com.hzs + com.bd hzs-business-common @@ -166,7 +166,7 @@ - com.hzs + com.bd hzs-api-scm diff --git a/pom.xml b/pom.xml index b87fe395..99bd1750 100644 --- a/pom.xml +++ b/pom.xml @@ -4,9 +4,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.hzs + com.bd hzs - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT hzs 微服务系统 @@ -14,7 +14,7 @@ pom - 3.0.0-SNAPSHOT + 1.0.0-SNAPSHOT UTF-8 UTF-8 1.8 @@ -179,84 +179,84 @@ - com.hzs + com.bd hzs-common-core ${hzs.version} - com.hzs + com.bd hzs-common-security ${hzs.version} - com.hzs + com.bd hzs-common-domain ${hzs.version} - com.hzs + com.bd hzs-api-member ${hzs.version} - com.hzs + com.bd hzs-api-report ${hzs.version} - com.hzs + com.bd hzs-api-sale ${hzs.version} - com.hzs + com.bd hzs-api-system ${hzs.version} - com.hzs + com.bd hzs-api-third ${hzs.version} - com.hzs + com.bd hzs-api-bonus ${hzs.version} - com.hzs + com.bd hzs-api-scm ${hzs.version} - com.hzs + com.bd hzs-common-aop ${hzs.version} - com.hzs + com.bd hzs-business-common ${hzs.version} @@ -308,12 +308,13 @@ ${hutool.version} - + @@ -415,6 +416,7 @@ + - + public @@ -484,16 +488,16 @@ src/main/resources true - - - + + + src/main/resources true - - - + + + src/main/java @@ -537,7 +541,7 @@ test - + 172.26.201.166:8848 @@ -557,7 +561,7 @@ online - + 172.26.201.166:8848