# Conflicts:
#	order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/controller/OrderInfoController.java
#	order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/OrderInfoService.java
#	order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/OrderInfoServiceImpl.java
release
gaorl 2 years ago
commit e31dfeb857
  1. 9
      order-management-base-service/src/main/resources/mybatis/mapper/CommodityMapper.xml
  2. 3
      order-management-consumer/src/main/java/com/dxhy/order/consumer/dao/OrderProcessInfoMapper.java
  3. 8
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/controller/OrderInfoController.java
  4. 27
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/controller/OrderInvoiceController.java
  5. 29
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/model/vo/OrderInfoTotalAmountVO.java
  6. 11
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/OrderInfoService.java
  7. 6
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/OrderProcessService.java
  8. 6
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/OrderInfoServiceImpl.java
  9. 29
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/OrderProcessServiceImpl.java
  10. 289
      order-management-consumer/src/main/resources/mybatis/mapper/OrderProcessInfoMapper.xml
  11. 2
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/dao/OrderInfoMapper.java
  12. 2
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/service/impl/OfdToPngSDEnergyServiceImpl.java
  13. 8
      order-management-invoice/src/main/resources/mybatis/mapper/OrderInfoMapper.xml

@ -97,7 +97,8 @@
cc.wlflmc,
cc.ent_id,
cc.tswl,
cc.invoice_name
cc.invoice_name,
cc.encoding
FROM
commodity_code cc LEFT JOIN group_commodity gc
ON gc.id = cc.group_id
@ -160,6 +161,12 @@
<if test="map.tswl != null and map.tswl != ''">
AND cc.tswl = #{map.tswl,jdbcType=VARCHAR}
</if>
<if test="map.encoding != null and map.encoding != ''">
AND cc.encoding like concat('%',#{map.encoding,jdbcType=VARCHAR},'%')
</if>
<if test="map.specificationModel != null and map.specificationModel != ''">
AND cc.specification_model like concat('%',#{map.specificationModel,jdbcType=VARCHAR},'%')
</if>
<if test="dataType == 0">
<choose>
<!--模糊查询的标识(0表示不进行模糊查询,1表示模糊查询)-->

@ -1,5 +1,6 @@
package com.dxhy.order.consumer.dao;
import com.dxhy.order.consumer.modules.order.model.vo.OrderInfoTotalAmountVO;
import com.dxhy.order.model.OrderProcessInfo;
import com.dxhy.order.consumer.modules.order.model.bo.YwlxCountBO;
import com.dxhy.order.consumer.modules.order.model.bo.YwlxCountTotalBO;
@ -78,6 +79,8 @@ public interface OrderProcessInfoMapper {
*/
List<OrderProcessInfo> queryOrderInfo(@Param("map") Map map, @Param("shList") List<String> shList, @Param("entList") List<String> entList);
OrderInfoTotalAmountVO queryOrderInfoTotalAmount(@Param("map") Map map, @Param("shList") List<String> shList, @Param("entList") List<String> entList);
/**
* 通过orderId查询处理表
*

@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
import com.dxhy.order.baseservice.module.commodity.model.CommodityCodeEntity;
import com.dxhy.order.constant.*;
import com.dxhy.order.consumer.modules.order.model.dto.RewriteBzdhDTO;
import com.dxhy.order.consumer.modules.order.model.vo.OrderInfoTotalAmountVO;
import com.dxhy.order.consumer.modules.order.model.vo.OrderInfoVo;
import com.dxhy.order.consumer.modules.order.service.OrderBzdhService;
import com.dxhy.order.exception.OrderReceiveException;
@ -150,8 +151,11 @@ public class OrderInfoController {
//查询数据库
PageUtils page = orderInfoService.selectOrderInfo(paramMap, null, entList);
return R.ok().put(OrderManagementConstant.DATA, page);
// 统计金额税额
OrderInfoTotalAmountVO totalAmountVO = orderInfoService.selectOrderSum(paramMap, null, entList);
return R.ok().put(OrderManagementConstant.DATA, page).put("total", totalAmountVO);
} catch (Exception e) {
log.error("{}列表查询异常:{}", LOGGER_MSG, e);
return R.error(OrderInfoContentEnum.INTERNAL_SERVER_ERROR);

@ -3,6 +3,7 @@ package com.dxhy.order.consumer.modules.order.controller;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONException;
import com.dxhy.order.baseservice.module.base.service.BaseService;
import com.dxhy.order.constant.ConfigureConstant;
import com.dxhy.order.constant.OrderInfoContentEnum;
import com.dxhy.order.constant.OrderInfoEnum;
@ -78,6 +79,9 @@ public class OrderInvoiceController {
@Resource
private OrderBzdhService bzdhService;
@Resource
private BaseService baseService;
/**
* 异常订单直接开票接口
@ -396,10 +400,11 @@ public class OrderInvoiceController {
errorMsgList.append(preStr).append(OrderInfoContentEnum.UPDATE_ORDER_STATUS_QUERY_NULL.getMessage()).append("\r\n");
continue;
}
if (OrderInfoEnum.SYS_SOURCE_SAP.getKey().equals(orderProcessInfo.getXtly()) && StringUtils.isEmpty(ly)) {
errorMsgList.append(preStr).append(OrderInfoContentEnum.UPDATE_ORDER_STATUS_YWXT.getMessage()).append("\r\n");
continue;
}
// 任务4516增加SAP推送的数据也能删除功能
// if (OrderInfoEnum.SYS_SOURCE_SAP.getKey().equals(orderProcessInfo.getXtly()) && StringUtils.isEmpty(ly)) {
// errorMsgList.append(preStr).append(OrderInfoContentEnum.UPDATE_ORDER_STATUS_YWXT.getMessage()).append("\r\n");
// continue;
// }
//判断订单来源是否为合并后或拆分后开票,如果为合并后拆分后开票数据不允许删除.产品提出规划,禅道bug45276
if (OrderInfoEnum.ORDER_TYPE_2.getKey().equals(orderProcessInfo.getDdlx()) || OrderInfoEnum.ORDER_TYPE_1.getKey().equals(orderProcessInfo.getDdlx())) {
errorMsgList.append(preStr).append(OrderInfoContentEnum.UPDATE_ORDER_STATUS_MERGE.getMessage()).append("\r\n");
@ -450,11 +455,17 @@ public class OrderInvoiceController {
orderProcessInfo1.setBhzt(ConfigureConstant.STRING_1);
orderProcessInfo1.setFpqqlsh(pageRequest.getFpqqlsh() + "-bh" );
}
int success = orderProcessService.updateOrderProcessInfoByProcessId(orderProcessInfo1, shList);
if (success < 0) {
errorMsgList.append(preStr).append("数据删除失败").append("\r\n");
continue;
if (OrderInfoEnum.SYS_SOURCE_SAP.getKey().equals(orderProcessInfo.getXtly()) && StringUtils.isEmpty(ly)) {
// 删除SAP推送数据时修改流水号
orderProcessInfo1.setFpqqlsh(baseService.getGenerateShotKey());
orderProcessInfo1.setXtly(orderProcessInfo.getXtly());
}
// int success = orderProcessService.updateOrderProcessInfoByProcessId(orderProcessInfo1, shList);
orderProcessService.deleteOrderProcessInfoAndOrderInfoByProcessId(orderProcessInfo1, shList);
// if (success < 0) {
// errorMsgList.append(preStr).append("数据删除失败").append("\r\n");
// continue;
// }
//如果是红票数据,并且是专票,需要更新红字信息表数据
// 红字专票 作废后修改申请单的状态为未开票
if (OrderInfoEnum.ORDER_INVOICE_TYPE_0.getKey().equals(orderProcessInfo.getFpzlDm()) || OrderInfoEnum.ORDER_INVOICE_TYPE_52.getKey().equals(orderProcessInfo.getFpzlDm())) {

@ -0,0 +1,29 @@
package com.dxhy.order.consumer.modules.order.model.vo;
import lombok.Data;
import java.math.BigDecimal;
/**
* 发票申请单管理 发票处理中心金额税额价税合计统计VO
*/
@Data
public class OrderInfoTotalAmountVO {
/**
* 开票合计金额
*/
private BigDecimal kphjje;
/**
* 合计不含税金额
*/
private BigDecimal hjbhsje;
/**
* 开票税额
*/
private BigDecimal kpse;
}

@ -3,6 +3,7 @@ package com.dxhy.order.consumer.modules.order.service;
import com.alibaba.fastjson.JSONObject;
import com.dxhy.order.consumer.model.page.PageRequestVO;
import com.dxhy.order.consumer.modules.order.model.vo.OrderInfoVo;
import com.dxhy.order.consumer.modules.order.model.vo.OrderInfoTotalAmountVO;
import com.dxhy.order.exception.OrderReceiveException;
import com.dxhy.order.model.*;
import com.dxhy.base.constant.OrderSeparationException;
@ -13,6 +14,7 @@ import com.dxhy.order.consumer.modules.order.model.PageKySlRsp;
import com.dxhy.order.consumer.modules.order.model.bo.YwlxCountTotalBO;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
@ -34,6 +36,15 @@ public interface OrderInfoService {
*/
PageUtils selectOrderInfo(Map<String, Object> map, List<String> shList, List<String> entList);
/**
* 查询订单列表金额统计
* @param map
* @param shList
* @param entList
* @return
*/
OrderInfoTotalAmountVO selectOrderSum(Map<String, Object> map, List<String> shList, List<String> entList);
/**
* 根据发票请求流水号 查询订单信息和订单明细
*

@ -78,6 +78,12 @@ public interface OrderProcessService {
*/
int updateOrderProcessInfoByProcessId(OrderProcessInfo orderProcessInfo, List<String> shList);
/**
* 删除开票申请单
* @param orderProcessInfo
*/
void deleteOrderProcessInfoAndOrderInfoByProcessId(OrderProcessInfo orderProcessInfo, List<String> shList);
/**
* 根据销方税号,订单号,发票请求流水号进行查询orderprocess信息
*

@ -35,6 +35,7 @@ import com.dxhy.order.consumer.modules.order.model.PageKySlReq;
import com.dxhy.order.consumer.modules.order.model.PageKySlRsp;
import com.dxhy.order.consumer.modules.order.model.bo.YwlxCountTotalBO;
import com.dxhy.order.consumer.modules.order.model.vo.OrderInfoVo;
import com.dxhy.order.consumer.modules.order.model.vo.OrderInfoTotalAmountVO;
import com.dxhy.order.consumer.modules.order.service.*;
import com.dxhy.order.consumer.modules.validate.service.ValidateOrderInfoService;
import com.dxhy.order.consumer.openapi.service.CommonInterfaceService;
@ -183,6 +184,11 @@ public class OrderInfoServiceImpl implements OrderInfoService {
return orderProcessService.selectOrderInfo(map, shList, entList);
}
@Override
public OrderInfoTotalAmountVO selectOrderSum(Map<String, Object> map, List<String> shList, List<String> entList) {
return orderProcessInfoMapper.queryOrderInfoTotalAmount(map, shList, entList);
}
@Override
public OderDetailInfo selectOrderDetailByFpqqlsh(String fpqqlsh, List<String> shList) {
/**

@ -2,6 +2,7 @@ package com.dxhy.order.consumer.modules.order.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.dxhy.base.constant.OrderSeparationException;
import com.dxhy.order.baseservice.module.thirdservice.user.model.DeptEntity;
import com.dxhy.order.baseservice.module.thirdservice.user.service.UserInfoService;
import com.dxhy.order.constant.ConfigureConstant;
@ -11,15 +12,14 @@ import com.dxhy.order.consumer.dao.OrderProcessInfoMapper;
import com.dxhy.order.consumer.modules.order.model.bo.YwlxCountBO;
import com.dxhy.order.consumer.modules.order.model.bo.YwlxCountTotalBO;
import com.dxhy.order.consumer.modules.order.service.OrderProcessService;
import com.dxhy.order.invoice.module.invoice.dao.OrderInfoMapper;
import com.dxhy.order.invoice.module.invoice.service.OrderInvoiceInfoService;
import com.dxhy.order.model.OrderInvoiceInfo;
import com.dxhy.order.model.OrderProcessInfo;
import com.dxhy.order.model.OrderProcessInfoExt;
import com.dxhy.order.model.PageUtils;
import com.dxhy.order.model.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -50,6 +50,9 @@ public class OrderProcessServiceImpl implements OrderProcessService {
private OrderInvoiceInfoService orderInvoiceInfoService;
@Resource
private UserInfoService userInfoService;
@Autowired
private OrderInfoMapper orderInfoMapper;
@Override
public OrderProcessInfo selectOrderProcessInfoByProcessId(String id, List<String> shList) {
@ -130,7 +133,23 @@ public class OrderProcessServiceImpl implements OrderProcessService {
public int updateOrderProcessInfoByProcessId(OrderProcessInfo orderProcessInfo, List<String> shList) {
return orderProcessInfoMapper.updateOrderProcessInfoByProcessId(orderProcessInfo, shList);
}
@Override
public void deleteOrderProcessInfoAndOrderInfoByProcessId(OrderProcessInfo orderProcessInfo, List<String> shList) {
if (StringUtils.isNotBlank(orderProcessInfo.getXtly())&&OrderInfoEnum.SYS_SOURCE_SAP.getKey().equals(orderProcessInfo.getXtly())) {
OrderInfo orderInfo = orderInfoMapper.queryOrderInfoByProcessId(orderProcessInfo.getId());
if (orderInfo == null) {
throw new RuntimeException("删除SAP推送单据,数据异常");
}
orderInfo.setFpqqlsh(orderProcessInfo.getFpqqlsh());
int rs = orderInfoMapper.updateOrderInfoByOrderId(orderInfo, null);
if (rs == 0) {
throw new RuntimeException("删除SAP推送单据,数据异常");
}
}
orderProcessInfoMapper.updateOrderProcessInfoByProcessId(orderProcessInfo, shList);
}
/**
* 根据销方税号,订单号,发票请求流水号进行查询orderprocess信息
*

@ -1317,6 +1317,295 @@
</if>
</where>
</select>
<select id="queryOrderInfoTotalAmount"
resultType="com.dxhy.order.consumer.modules.order.model.vo.OrderInfoTotalAmountVO">
<bind name="dataType" value="${dataType}"/>
select
ifnull(sum(cast(op.kphjje as decimal(18,6))),0) as kphjje,
ifnull(sum(cast(op.hjbhsje as decimal(18,6))),0) as hjbhsje,
ifnull(sum(cast(op.kpse as decimal(18,6))),0) as kpse
from order_process_info op
left join order_invoice_info oii on op.id = oii.order_process_info_id
<where>
<!-- mysql数据库 -->
<if test="dataType == 0">
<choose>
<when
test="map.minhjje !=null and map.minhjje != '' and map.maxhjje !=null and map.maxhjje != ''">
and cast(op.kphjje as DECIMAL) BETWEEN
#{map.minhjje,jdbcType=DOUBLE}
and
#{map.maxhjje,jdbcType=DOUBLE}
</when>
<otherwise>
<if test="map.minhjje !=null and map.minhjje != ''">
and cast(op.kphjje as DECIMAL) >=
#{map.minhjje,jdbcType=DOUBLE}
</if>
<if test="map.maxhjje !=null and map.maxhjje != ''">
and #{map.maxhjje,jdbcType=DOUBLE}
>= cast(op.kphjje as DECIMAL)
</if>
</otherwise>
</choose>
<if test="map.startTime !=null and map.startTime != ''">
and op.ddcjsj >= #{map.startTime}
</if>
<if test="map.endTime !=null and map.endTime != ''">
and #{map.endTime} >= op.ddcjsj
</if>
<if test="map.ddh != null and map.ddh != ''">
and op.ddh like "%"#{map.ddh,jdbcType=VARCHAR}"%"
</if>
<if test="map.gmfmc != null and map.gmfmc != ''">
and op.ghf_mc like
concat('%',#{map.gmfmc,jdbcType=VARCHAR},'%')
</if>
<if test="map.xhfmc != null and map.xhfmc != ''">
and op.xhf_mc like
concat('%',#{map.xhfmc,jdbcType=VARCHAR},'%')
</if>
<if test="map.sbyy != null and map.sbyy != ''">
and op.sbyy like
concat('%',#{map.sbyy,jdbcType=VARCHAR},'%')
</if>
</if>
<!-- oracle数据库 -->
<if test="dataType == 1">
<choose>
<when
test="map.minhjje !=null and map.minhjje != '' and map.maxhjje !=null and map.maxhjje != ''">
and to_number(op.kphjje) BETWEEN
#{map.minhjje,jdbcType=DOUBLE}
and
#{map.maxhjje,jdbcType=DOUBLE}
</when>
<otherwise>
<if test="map.minhjje !=null and map.minhjje != ''">
and to_number(op.kphjje) >=
#{map.minhjje,jdbcType=DOUBLE}
</if>
<if test="map.maxhjje !=null and map.maxhjje != ''">
and #{map.maxhjje,jdbcType=DOUBLE}
>= to_number(op.kphjje)
</if>
</otherwise>
</choose>
<if test="map.startTime !=null and map.startTime != ''">
and trunc(op.ddcjsj)
>=to_date(#{map.startTime,jdbcType=VARCHAR},'yyyy-mm-dd hh24:mi:ss')
</if>
<if test="map.endTime !=null and map.endTime != ''">
and to_date(#{map.endTime,jdbcType=VARCHAR},'yyyy-mm-dd
hh24:mi:ss')>=trunc(op.ddcjsj)
</if>
<if test="map.ddh != null and map.ddh != ''">
and op.ddh like '%' || #{map.ddh,jdbcType=VARCHAR} || '%'
</if>
<if test="map.gmfmc != null and map.gmfmc != ''">
and op.ghf_mc like '%' || #{map.gmfmc,jdbcType=VARCHAR} ||
'%'
</if>
<if test="map.xhfmc != null and map.xhfmc != ''">
and op.xhf_mc like % || #{map.xhfmc,jdbcType=VARCHAR} ||
'%'
</if>
<if test="map.sbyy != null and map.sbyy != ''">
and op.sbyy like % || #{map.sbyy,jdbcType=VARCHAR} ||
'%'
</if>
</if>
<if test="map.ddzt != null and map.ddzt.size != 0">
and op.ddzt in
<foreach collection="map.ddzt" index="index" item="ddzti"
open="(" separator="," close=")">
#{ddzti,jdbcType=VARCHAR}
</foreach>
</if>
<if test="map.ddly != null and map.ddly.size() != 0">
and op.ddly in
<foreach collection="map.ddly" index="index" item="ddlyit"
open="(" separator="," close=")">
#{ddlyit,jdbcType=VARCHAR}
</foreach>
</if>
<if test="map.fpzldm != null and map.fpzldm.size() != 0">
and op.fpzl_dm in
<foreach collection="map.fpzldm" index="index" item="fpzldmit"
open="(" separator="," close=")">
#{fpzldmit,jdbcType=VARCHAR}
</foreach>
</if>
<if test="map.fpqqlshList != null and map.fpqqlshList.size() == 1">
and op.fpqqlsh =
<foreach collection="map.fpqqlshList" index="index" item="item">
#{item}
</foreach>
</if>
<if test="map.fpqqlshList != null and map.fpqqlshList.size() > 1">
and op.fpqqlsh in
<foreach collection="map.fpqqlshList" index="index" item="item"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="map.kplshList != null and map.kplshList.size() == 1">
and oii.kplsh =
<foreach collection="map.kplshList" index="index" item="item">
#{item}
</foreach>
</if>
<if test="map.kplshList != null and map.kplshList.size() > 1">
and oii.kplsh in
<foreach collection="map.kplshList" index="index" item="item"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="map.sksbCode != null and map.sksbCode != ''">
and oii.sksbdm = #{map.sksbCode,jdbcType=VARCHAR}
</if>
<if test="map.tsJosList != null and map.tsJosList.size == 1">
and oii.push_jos_status =
<foreach collection="map.tsJosList" index="index" item="item">
#{item}
</foreach>
</if>
<if test="map.tsJosList != null and map.tsJosList.size > 1">
and oii.push_jos_status in
<foreach collection="map.tsJosList" index="index" item="tsJosListi"
open="(" separator="," close=")">
#{tsJosListi,jdbcType=VARCHAR}
</foreach>
</if>
<if test="map.ywlx != null and map.ywlx != ''">
and op.ywlx = #{map.ywlx,jdbcType=VARCHAR}
</if>
<if test="map.fplx != null and map.fplx != '' ">
and op.fpzl_dm = #{map.fplx,jdbcType=VARCHAR}
</if>
<if test="map.ghfNsrsbh != null and map.ghfNsrsbh != ''">
and op.ghf_nsrsbh = #{map.ghfNsrsbh,jdbcType=VARCHAR}
</if>
<if test="map.orderStatus !=null and map.orderStatus !='' ">
and op.order_status = #{map.orderStatus,jdbcType=VARCHAR}
</if>
<if test="map.checkStatus !=null and map.checkStatus !='' ">
and op.check_status = #{map.checkStatus,jdbcType=VARCHAR}
</if>
<if test="shList != null and shList.size() == 0">
and op.xhf_nsrsbh = ''
</if>
<if test="shList != null and shList.size() == 1">
and op.xhf_nsrsbh =
<foreach collection="shList" index="index" item="item">
#{item}
</foreach>
</if>
<if test="shList != null and shList.size() > 1">
and op.xhf_nsrsbh in
<foreach collection="shList" index="index" item="item"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="entList != null and entList.size() == 0">
and op.ent_id = ''
</if>
<if test="entList != null and entList.size() == 1">
and op.ent_id =
<foreach collection="entList" index="index" item="item">
#{item}
</foreach>
</if>
<if test="entList != null and entList.size() > 1">
and op.ent_id in
<foreach collection="entList" index="index" item="item"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="map.bzdh != null and map.bzdh != ''">
and op.bzdh = #{map.bzdh,jdbcType=VARCHAR}
</if>
<if test="map.xtly != null and map.xtly != ''">
and op.xtly = #{map.xtly,jdbcType=VARCHAR}
</if>
<if test="map.gsdm != null and map.gsdm != ''">
and op.gsdm = #{map.gsdm,jdbcType=VARCHAR}
</if>
<if test="map.bhzt != null and map.bhzt != ''">
and op.bhzt = #{map.bhzt,jdbcType=VARCHAR}
</if>
<if test="map.ygxm != null and map.ygxm != ''">
and op.ygxm = #{map.ygxm,jdbcType=VARCHAR}
</if>
<if test="map.kppzh != null and map.kppzh != ''">
and op.kppzh = #{map.kppzh,jdbcType=VARCHAR}
</if>
<if test="map.pzgzrq != null">
and op.pzgzrq = #{map.pzgzrq,jdbcType=TIMESTAMP}
</if>
<if test="map.yzfp != null and map.yzfp != ''">
and op.yzfp = #{map.yzfp,jdbcType=VARCHAR}
</if>
<if test="map.originDdh != null and map.originDdh != ''">
and op.origin_ddh = #{map.originDdh,jdbcType=VARCHAR}
</if>
<if test="map.originOrderId != null and map.originOrderId != ''">
and op.origin_order_id = #{map.originOrderId,jdbcType=VARCHAR}
</if>
<if test="map.kb != null and map.kb != ''">
and op.kb = #{map.kb,jdbcType=VARCHAR}
</if>
<if test="map.pzgzrqBegin !=null and map.pzgzrqBegin != ''">
and op.pzgzrq >= #{map.pzgzrqBegin}
</if>
<if test="map.pzgzrqEnd !=null and map.pzgzrqEnd != ''">
and #{map.pzgzrqEnd} >= op.pzgzrq
</if>
<if test="map.dyzt != null and map.dyzt != ''">
and oii.dyzt = #{map.dyzt,jdbcType=VARCHAR}
</if>
<if test="map.qdbz != null ">
and oii.qd_bz in
<foreach collection="map.qdbz" index="index" item="item"
open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="map.kplx != null and map.kplx != ''">
and oii.kplx = #{map.kplx,jdbcType=VARCHAR}
</if>
<!-- 异常订单列表根据订单更新时间排序 -->
<choose>
<when test="map.orderBy !=null and map.orderBy == 'updateTime' ">
order by op.update_time desc
</when>
<when test="map.orderBy !=null and map.orderBy == 'createTimeAsc' ">
order by op.ddcjsj asc
</when>
<otherwise>
order by op.ddcjsj desc,op.num desc,op.create_time desc,op.id desc
</otherwise>
</choose>
</where>
</select>
</mapper>

@ -31,6 +31,8 @@ public interface OrderInfoMapper {
*/
OrderInfo selectOrderInfoByOrderId(@Param(value = "id") String id, @Param("shList") List<String> shList);
OrderInfo queryOrderInfoByProcessId(@Param("processId") String processId);
/**
* 根据发票请求流水号获取订单数据,主要用于查询数据是否存在.
*

@ -3,6 +3,7 @@ package com.dxhy.order.invoice.module.invoice.service.impl;
import cn.hutool.core.util.IdUtil;
import cn.hutool.crypto.digest.DigestUtil;
import com.alibaba.fastjson.JSONObject;
import com.dxhy.order.constant.ConfigureConstant;
import com.dxhy.order.constant.OrderInfoEnum;
import com.dxhy.order.invoice.module.invoice.service.OfdToPngSDEnergyService;
import com.dxhy.order.model.ofd.OfdToPngResponse;
@ -36,6 +37,7 @@ public class OfdToPngSDEnergyServiceImpl implements OfdToPngSDEnergyService {
String url = yxurl + "/yxSims/ofdToImage?timestamp="+timestamp+"&md5Str="+md5Str;
OfdToPngResponse ofdToPngResponse = new OfdToPngResponse();
ofdToPngResponse.setZTDM(ConfigureConstant.STRING_0000);
try {
log.info("调用影像接口ofd转png,url:{}",url);
String rs = HttpUtils.doPostUpload(url, bytes, IdUtil.fastSimpleUUID()+".ofd");

@ -548,7 +548,7 @@
</update>
<!-- selectOrderInfoByYfpdmhm -->
<!-- selectOrderInfoByYfpdmhm -->
<select id="selectOrderInfoByYfpdmhm" resultMap="BaseResultMap"
parameterType="java.lang.String">
select
@ -622,5 +622,11 @@
</foreach>
</if>
</select>
<select id="queryOrderInfoByProcessId" resultType="com.dxhy.order.model.OrderInfo">
select * from order_info where process_id=#{processId} limit 1
</select>
</mapper>

Loading…
Cancel
Save