|
|
|
@ -8,7 +8,10 @@ import com.dxhy.order.baseservice.module.thirdservice.simsback.service.SimsBackS |
|
|
|
|
import com.dxhy.order.constant.*; |
|
|
|
|
import com.dxhy.order.consumer.constant.InterfaceNameEnum; |
|
|
|
|
import com.dxhy.order.consumer.dao.InterfaceRequestDataMapper; |
|
|
|
|
import com.dxhy.order.consumer.dao.OrderProcessInfoMapper; |
|
|
|
|
import com.dxhy.order.consumer.modules.order.service.OrderProcessService; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.EsOutput; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.IsInput; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.PoCommonRequestParam; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.PoCommonResponseParam; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.v4.order.DdpcxxReqBO; |
|
|
|
@ -24,6 +27,7 @@ import com.dxhy.order.consumer.openapi.service.InterfaceServiceV6; |
|
|
|
|
import com.dxhy.order.invoice.config.InvoiceConfig; |
|
|
|
|
import com.dxhy.order.invoice.utils.HttpInvoiceRequestUtilQd; |
|
|
|
|
import com.dxhy.order.model.InterfaceRequestData; |
|
|
|
|
import com.dxhy.order.model.OrderProcessInfo; |
|
|
|
|
import com.dxhy.order.model.newsk.InvoiceRequestParam; |
|
|
|
|
import com.dxhy.order.utils.DecimalCalculateUtil; |
|
|
|
|
import com.dxhy.order.utils.DistributedKeyMaker; |
|
|
|
@ -34,9 +38,7 @@ import org.springframework.beans.BeanUtils; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Objects; |
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -65,6 +67,8 @@ public class InterfaceServiceImplV6 implements InterfaceServiceV6 { |
|
|
|
|
private InvoiceConfig invoiceConfig; |
|
|
|
|
@Resource |
|
|
|
|
private InterfaceRequestDataMapper interfaceRequestDataMapper; |
|
|
|
|
@Resource |
|
|
|
|
private OrderProcessInfoMapper orderProcessInfoMapper; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public DdpcxxRspV5 generateQdInvoiceV6(DdpcxxReqBO ddpcxxReq, String secretId, String kpjh) { |
|
|
|
@ -122,10 +126,31 @@ public class InterfaceServiceImplV6 implements InterfaceServiceV6 { |
|
|
|
|
public PoCommonResponseParam updateOrderStatus(PoCommonRequestParam requestParam, String secretId) { |
|
|
|
|
PoCommonResponseParam poCommonResponseParam = new PoCommonResponseParam(); |
|
|
|
|
EsOutput esOutput = new EsOutput(); |
|
|
|
|
esOutput.setBSKEY(""); |
|
|
|
|
esOutput.setSAPKEY(""); |
|
|
|
|
esOutput.setZTYPE(OrderInfoContentEnum.INVOICE_ERROR_CODE_OP_S.getKey()); |
|
|
|
|
esOutput.setZMESSAGE(""); |
|
|
|
|
IsInput is_input = requestParam.getIS_INPUT(); |
|
|
|
|
esOutput.setBSKEY(is_input.getBSKEY()); |
|
|
|
|
esOutput.setSAPKEY(is_input.getSAPKEY()); |
|
|
|
|
String zdata = is_input.getZDATA(); |
|
|
|
|
Map map = JsonUtils.getInstance().parseObject(zdata, Map.class); |
|
|
|
|
String ddh = (String)map.get("ZJSDH"); |
|
|
|
|
String bzdh = (String)map.get("ZBZDH"); |
|
|
|
|
Map<String,String> queryMap = new HashMap<>(); |
|
|
|
|
queryMap.put("bzdh",bzdh); |
|
|
|
|
List<OrderProcessInfo> orderProcessInfos = orderProcessInfoMapper.queryOrderInfo(queryMap, null, null); |
|
|
|
|
if(orderProcessInfos.size()!=1){ |
|
|
|
|
esOutput.setZTYPE(OrderInfoContentEnum.INVOICE_ERROR_CODE_OP_E.getKey()); |
|
|
|
|
esOutput.setZMESSAGE("根据报账单号未查询到唯一结算单"); |
|
|
|
|
}else { |
|
|
|
|
OrderProcessInfo orderProcessInfo = orderProcessInfos.get(0); |
|
|
|
|
orderProcessInfo.setBhzt(ConfigureConstant.STRING_1); |
|
|
|
|
int i = orderProcessInfoMapper.updateOrderProcessInfoByFpqqlsh(orderProcessInfo, null); |
|
|
|
|
if(i == 1){ |
|
|
|
|
esOutput.setZTYPE(OrderInfoContentEnum.INVOICE_ERROR_CODE_OP_S.getKey()); |
|
|
|
|
esOutput.setZMESSAGE("驳回状态更新成功"); |
|
|
|
|
}else { |
|
|
|
|
esOutput.setZTYPE(OrderInfoContentEnum.INVOICE_ERROR_CODE_OP_E.getKey()); |
|
|
|
|
esOutput.setZMESSAGE("驳回状态更新失败"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
poCommonResponseParam.setES_OUTPUT(esOutput); |
|
|
|
|
return poCommonResponseParam; |
|
|
|
|
} |
|
|
|
|