|
|
@ -29,6 +29,7 @@ import com.dxhy.order.consumer.modules.bespoke.config.FildConfig; |
|
|
|
import com.dxhy.order.consumer.modules.bespoke.config.datasource.config.DynamicContextHolder; |
|
|
|
import com.dxhy.order.consumer.modules.bespoke.config.datasource.config.DynamicContextHolder; |
|
|
|
import com.dxhy.order.consumer.modules.bespoke.model.req.FileModel; |
|
|
|
import com.dxhy.order.consumer.modules.bespoke.model.req.FileModel; |
|
|
|
import com.dxhy.order.consumer.modules.bespoke.model.req.ReqParam; |
|
|
|
import com.dxhy.order.consumer.modules.bespoke.model.req.ReqParam; |
|
|
|
|
|
|
|
import com.dxhy.order.consumer.modules.bespoke.model.sk.SkOrderItemInfo; |
|
|
|
import com.dxhy.order.consumer.modules.bespoke.model.yy.InvoiceBpmmap; |
|
|
|
import com.dxhy.order.consumer.modules.bespoke.model.yy.InvoiceBpmmap; |
|
|
|
import com.dxhy.order.consumer.modules.bespoke.model.yy.NewTable; |
|
|
|
import com.dxhy.order.consumer.modules.bespoke.model.yy.NewTable; |
|
|
|
import com.dxhy.order.consumer.modules.bespoke.model.yy.YyOrderInfo; |
|
|
|
import com.dxhy.order.consumer.modules.bespoke.model.yy.YyOrderInfo; |
|
|
@ -184,8 +185,14 @@ public class YyOrderServiceImpl implements OrderService { |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (locked){ |
|
|
|
if (locked){ |
|
|
|
List<YyOrderItemInfo> yyOrderItemInfoList = yyOrderItemInfoMapper.queryOrderItemInfo(yyOrderInfo.getId()); |
|
|
|
List<YyOrderItemInfo> yyOrderItemInfoList = yyOrderItemInfoMapper.queryOrderItemInfo(yyOrderInfo.getId()); |
|
|
|
|
|
|
|
boolean fpresent = yyOrderItemInfoList.stream().filter(item -> DecimalCalculateUtil.stringLessZero(item.getIsum())).findFirst().isPresent(); |
|
|
|
|
|
|
|
boolean zpresent = yyOrderItemInfoList.stream().filter(item -> DecimalCalculateUtil.stringMoreZero(item.getIsum())).findFirst().isPresent(); |
|
|
|
|
|
|
|
if (fpresent && zpresent && yyOrderItemInfoList.size() > ConfigureConstant.INT_2){ |
|
|
|
|
|
|
|
backMessage.add(String.format(message, yyOrderInfo.getCdlcode(), "负数行订单明细不能超过两行")); |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
if (CollectionUtils.isNotEmpty(yyOrderItemInfoList)) { |
|
|
|
if (CollectionUtils.isNotEmpty(yyOrderItemInfoList)) { |
|
|
|
DdpcxxReqBO ddpcxxReqBO = transitionReadData(yyOrderInfo, yyOrderItemInfoList, deptEntity); |
|
|
|
DdpcxxReqBO ddpcxxReqBO = transitionReadData(fpresent && zpresent,yyOrderInfo, yyOrderItemInfoList, deptEntity); |
|
|
|
DdpcxxRspBO ddpcxxRspBO = allocateInvoiceInterfaceServiceImplV3.allocateInvoicesV3(ddpcxxReqBO, "", null, ConfigurerInfo.INTERFACE_VERSION_V6); |
|
|
|
DdpcxxRspBO ddpcxxRspBO = allocateInvoiceInterfaceServiceImplV3.allocateInvoicesV3(ddpcxxReqBO, "", null, ConfigurerInfo.INTERFACE_VERSION_V6); |
|
|
|
log.debug("V3生成预制返回信息:{}", JSON.toJSONString(ddpcxxRspBO)); |
|
|
|
log.debug("V3生成预制返回信息:{}", JSON.toJSONString(ddpcxxRspBO)); |
|
|
|
String format = String.format(message, yyOrderInfo.getCdlcode(), ddpcxxRspBO.getZTXX()); |
|
|
|
String format = String.format(message, yyOrderInfo.getCdlcode(), ddpcxxRspBO.getZTXX()); |
|
|
@ -375,7 +382,7 @@ public class YyOrderServiceImpl implements OrderService { |
|
|
|
return ConfigureConstant.INT_1; |
|
|
|
return ConfigureConstant.INT_1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public DdpcxxReqBO transitionReadData(YyOrderInfo yyOrderInfo, List<YyOrderItemInfo> yyOrderItemInfoList, DeptEntity deptEntity) { |
|
|
|
public DdpcxxReqBO transitionReadData(boolean isZk,YyOrderInfo yyOrderInfo, List<YyOrderItemInfo> yyOrderItemInfoList, DeptEntity deptEntity) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TaxEquipmentInfo taxEquipmentInfo = simsBackService.queryTaxEquipment(deptEntity.getTaxpayerCode(), deptEntity.getDeptId()); |
|
|
|
TaxEquipmentInfo taxEquipmentInfo = simsBackService.queryTaxEquipment(deptEntity.getTaxpayerCode(), deptEntity.getDeptId()); |
|
|
@ -425,7 +432,6 @@ public class YyOrderServiceImpl implements OrderService { |
|
|
|
String invoiceAmount = ConfigureConstant.STRING_0; |
|
|
|
String invoiceAmount = ConfigureConstant.STRING_0; |
|
|
|
String taxAmount = ConfigureConstant.STRING_0; |
|
|
|
String taxAmount = ConfigureConstant.STRING_0; |
|
|
|
|
|
|
|
|
|
|
|
boolean isZk = yyOrderItemInfoList.size()>ConfigureConstant.INT_1; |
|
|
|
|
|
|
|
String xmmc = yyOrderItemInfoList.get(ConfigureConstant.INT_0).getCinvname(); |
|
|
|
String xmmc = yyOrderItemInfoList.get(ConfigureConstant.INT_0).getCinvname(); |
|
|
|
if (isZk){ |
|
|
|
if (isZk){ |
|
|
|
List<YyOrderItemInfo> collect = yyOrderItemInfoList.stream().filter(item -> DecimalCalculateUtil.stringCompare(item.getIsum(), ConfigureConstant.STRING_0) > ConfigureConstant.INT_0).collect(Collectors.toList()); |
|
|
|
List<YyOrderItemInfo> collect = yyOrderItemInfoList.stream().filter(item -> DecimalCalculateUtil.stringCompare(item.getIsum(), ConfigureConstant.STRING_0) > ConfigureConstant.INT_0).collect(Collectors.toList()); |
|
|
|