release
gaorl 2 years ago
commit 0eaa4b2f94
  1. 3
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/thirdservice/user/service/UserInfoService.java
  2. 24
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/thirdservice/user/service/impl/UserInfoServiceImpl.java
  3. 29
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/commodity/controller/GroupCommodityCodeController.java
  4. 3
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/GenerateReadyOpenOrderServiceImpl.java
  5. 3
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/api/InvoiceRestApiV6.java
  6. 29
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java

@ -104,4 +104,7 @@ public interface UserInfoService {
*/
DeptEntity querySysDeptEntityFromUrl(String taxpayerCode, String taxpayerName, String entId);
DeptEntity querySysDeptEntity(DeptEntity deptEntity);
}

@ -23,6 +23,7 @@ import com.dxhy.order.constant.OrderManagementConstant;
import com.dxhy.order.model.R;
import com.dxhy.order.utils.HttpUtils;
import com.dxhy.order.utils.JsonUtils;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
@ -437,6 +438,29 @@ public class UserInfoServiceImpl implements UserInfoService {
return null;
}
@Override
public DeptEntity querySysDeptEntity(DeptEntity deptEntity) {
List<String> groupIdList = Lists.newArrayList();
groupIdList.add(deptEntity.getDeptId());
List<GroupManagementEntity> entityList = groupManagementService.queryByGroupIdList(groupIdList);
if (entityList != null && entityList.size() > 0) {
//选出默认项
Optional<GroupManagementEntity> groupManagementEntityOptional = entityList.stream()
.filter(groupManagementEntity -> OrderInfoEnum.ORDER_KPZZGL_SFMRX_0.getKey().equals(groupManagementEntity.getDefaultItem()))
.findFirst();
GroupManagementEntity groupManagementEntity = groupManagementEntityOptional.orElseGet(() -> entityList.get(0));
deptEntity.setTaxpayerCode(groupManagementEntity.getXhfNsrsbh());
//todo 虚拟组织:组织名称和销方名称公用此字段会有问题,后期优化
deptEntity.setName(groupManagementEntity.getGroupName());
deptEntity.setTaxpayerName(groupManagementEntity.getXhfMc());
deptEntity.setTaxpayerAddress(groupManagementEntity.getXhfDz());
deptEntity.setTaxpayerPhone(groupManagementEntity.getXhfDh());
deptEntity.setTaxpayerBank(groupManagementEntity.getXhfYh());
deptEntity.setTaxpayerAccount(groupManagementEntity.getXhfZh());
}
return deptEntity;
}
public UserEntity ssoUserTransUserEntity(SsoUser ssoUser) {
UserEntity userEntity = new UserEntity();

@ -31,7 +31,6 @@ import javax.annotation.Resource;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.stream.Collectors;
@ -164,20 +163,20 @@ public class GroupCommodityCodeController {
reqBO.setUUID(baseService.getGenerateShotKey());
reqBOList.add(reqBO);
}
int index = 0;
List<List<MdmGmfxxtbReqBO>> partition = Lists.partition(reqBOList, 200);
for (List<MdmGmfxxtbReqBO> mdmGmfxxtbReqBOS : partition) {
List<CompletableFuture<String>> completableFutureList = Lists.newArrayList();
for (MdmGmfxxtbReqBO reqBO : mdmGmfxxtbReqBOS) {
CompletableFuture<String> voidCompletableFuture = CompletableFuture.supplyAsync(()->{
String str = buyerMessageService(reqBO);
return str;
}, voucherTaskExecutor);
completableFutureList.add(voidCompletableFuture);
}
CompletableFuture.allOf(completableFutureList.toArray(new CompletableFuture[0])).join();
}
String service = sdEnregyService.syncBuyerMessageService(reqBOList);
// int index = 0;
// List<List<MdmGmfxxtbReqBO>> partition = Lists.partition(reqBOList, 200);
// for (List<MdmGmfxxtbReqBO> mdmGmfxxtbReqBOS : partition) {
// List<CompletableFuture<String>> completableFutureList = Lists.newArrayList();
// for (MdmGmfxxtbReqBO reqBO : mdmGmfxxtbReqBOS) {
// CompletableFuture<String> voidCompletableFuture = CompletableFuture.supplyAsync(()->{
// String str = buyerMessageService(reqBO);
// return str;
// }, voucherTaskExecutor);
// completableFutureList.add(voidCompletableFuture);
// }
// CompletableFuture.allOf(completableFutureList.toArray(new CompletableFuture[0])).join();
// }
return R.ok().put("data","");
} catch (IOException e) {
throw new RuntimeException(e);

@ -462,13 +462,14 @@ public class GenerateReadyOpenOrderServiceImpl implements GenerateReadyOpenOrder
if (StringUtils.isBlank(customLimit)) {
limit = taxDiskLimit;
} else {
//不含稅
if (StringUtils.equals("0", hsbz)) {
if (new BigDecimal(customLimit).compareTo(new BigDecimal(taxDiskLimit)) > 0) {
throw new OrderSplitException(ConfigureConstant.STRING_9999, "自定义限额必须小于等于票种的单张开票限额");
}
limit = customLimit;
} else {
//计算含税金额,将明细行所有金额和税额相加
//计算含税金额,将明细行所有金额和税额相加
OrderInfo orderInfo = common.getOrderInfo();
String hjbhsje = orderInfo.getHjbhsje();
if (new BigDecimal(hjbhsje).compareTo(new BigDecimal(taxDiskLimit)) > 0) {

@ -232,6 +232,9 @@ public class InvoiceRestApiV6 {
poCommonResponseParam.setES_OUTPUT(esOutput);
return JsonUtils.getInstance().toJsonString(poCommonResponseParam);
}else {
if(StringUtils.isBlank(deptEntity.getInvoiceNsrsbh()) && StringUtils.isNotBlank(deptEntity.getDeptId())){
deptEntity = userInfoService.querySysDeptEntity(deptEntity);
}
DdpcxxReqBO ddpcxxReq = BeanTransitionUtils.transitionPoKpReq(poCommonRequestParam,deptEntity);
DdpcxxRspV5 ddpcxxRspV5 = interfaceServiceV6.generateQdInvoiceV6(ddpcxxReq, secretId, null);
PoCommonResponseParam poCommonResponseParam = BeanTransitionUtils.transitionPoKpResp(ddpcxxRspV5);

@ -321,7 +321,13 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract {
commodityCodeEntity.setDataSource("4");
//matchCommodityCode(commodityCodeEntity);
List<String> ids = commodityCodeEntities.stream().map(t -> t.getId()).collect(Collectors.toList());
commodityMapper.batchUpdateCommodity(commodityCodeEntity,ids);
int updateCommodity = commodityMapper.batchUpdateCommodity(commodityCodeEntity, ids);
if (updateCommodity > 0) {
commodityCodeEntity.setSuccess(true);
} else {
commodityCodeEntity.setSuccess(false);
}
list.add(commodityCodeEntity);
}else{
// 2.如果未匹配到,再去根据物料编码匹配
commodityCodeEntity.setXmmc(reqBO.getDESC1()); // 商品名称
@ -559,7 +565,12 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract {
@Override
public String syncMdmGroupTaxService(List<MdmSyncGroupTaxCodeReqBO> taxxtbReqBOS){
AjaxResult syncResult = this.syncMdmGroupTax(taxxtbReqBOS,null);
AjaxResult syncResult = null;
try {
syncResult = this.syncMdmGroupTax(taxxtbReqBOS,null);
} catch (Exception e) {
throw new RuntimeException(e);
}
if (syncResult.isSuccess()) {
return "";
} else {
@ -570,7 +581,12 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract {
@Override
public String syncBuyerMessageService(List<MdmGmfxxtbReqBO> mdmGmfxxtbReqBOS){
AjaxResult syncResult = this.syncBuyerMessage(mdmGmfxxtbReqBOS,null);
AjaxResult syncResult = null;
try {
syncResult = this.syncBuyerMessage(mdmGmfxxtbReqBOS,null);
} catch (Exception e) {
throw new RuntimeException(e);
}
if (syncResult.isSuccess()) {
return "";
} else {
@ -715,7 +731,12 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract {
@Override
public String syncMdmUserService(List<MdmSyncUserReqBO> mdmSyncUserReqBO){
AjaxResult syncResult = this.syncMdmUser(mdmSyncUserReqBO,null);
AjaxResult syncResult = null;
try {
syncResult = this.syncMdmUser(mdmSyncUserReqBO,null);
} catch (Exception e) {
throw new RuntimeException(e);
}
if (syncResult.isSuccess()) {
return "";
} else {

Loading…
Cancel
Save