release
gaorl 2 years ago
commit d13845e8be
  1. 9
      order-management-base-service/src/main/resources/mybatis/mapper/CommodityMapper.xml
  2. 1
      order-management-common/src/main/java/com/dxhy/order/constant/ConfigureConstant.java
  3. 1
      order-management-common/src/main/java/com/dxhy/order/constant/OrderInfoEnum.java
  4. 3
      order-management-consumer/src/main/java/com/dxhy/order/consumer/dao/OrderProcessInfoMapper.java
  5. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/PushInvoiceServiceImpl.java
  6. 6
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/controller/OrderInfoController.java
  7. 29
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/controller/OrderInvoiceController.java
  8. 29
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/model/vo/OrderInfoTotalAmountVO.java
  9. 11
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/OrderInfoService.java
  10. 6
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/OrderProcessService.java
  11. 6
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/OrderInfoServiceImpl.java
  12. 27
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/OrderProcessServiceImpl.java
  13. 19
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/protocol/po/generateinvoice/sap/FpkjReqSap.java
  14. 11
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/protocol/po/generateinvoicepush/sap/FpkjtsReqSap.java
  15. 20
      order-management-consumer/src/main/java/com/dxhy/order/consumer/utils/BeanTransitionUtils.java
  16. 289
      order-management-consumer/src/main/resources/mybatis/mapper/OrderProcessInfoMapper.xml
  17. 4
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/controller/InvoiceDetailsController.java
  18. 2
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/dao/OrderInfoMapper.java
  19. 8
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/service/impl/OfdToPngSDEnergyServiceImpl.java
  20. 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表示模糊查询)-->

@ -29,6 +29,7 @@ public class ConfigureConstant {
public static final String STRING_1_ = "-1";
public static final String STRING_0 = "0";
public static final String STRING_X = "X";
public static final String STRING_000 = "0.00";

@ -403,6 +403,7 @@ public enum OrderInfoEnum {
* 系统来源(SAP:SAP)
*/
SYS_SOURCE_SAP("SAP","SAP"),
SYS_SOURCE_DSXT("DSXT","DSXT"),
/**
* 订单类型0:原始订单,1:拆分后订单,2:合并后订单,3:系统冲红订单,4:自动开票订单,5:作废重开订单;6:历史数据订单;7:发票修复数据

@ -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查询处理表
*

@ -1344,6 +1344,8 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
fpkjtsReqSap.setZGSDM(orderProcessInfo.getGsdm());
fpkjtsReqSap.setZYWDJ(orderProcessInfo.getBzdh());
fpkjtsReqSap.setIMGID(orderInvoiceInfo.getDocuId());
fpkjtsReqSap.setPDFZJL(ddfpxx.getPDFZJL());
fpkjtsReqSap.setZJLLX(ddfpxx.getZJLLX());
//明细信息
ddmxxx.stream().forEach(f -> {
FpkjtsMxSap detail = new FpkjtsMxSap();

@ -9,6 +9,7 @@ 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.OrderInfoVo;
import com.dxhy.order.consumer.modules.order.model.vo.OrderInfoTotalAmountVO;
import com.dxhy.order.consumer.modules.order.service.OrderBzdhService;
import com.dxhy.order.exception.OrderReceiveException;
import com.dxhy.order.model.*;
@ -151,7 +152,10 @@ 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;
@ -186,6 +187,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;
@ -51,6 +51,9 @@ public class OrderProcessServiceImpl implements OrderProcessService {
@Resource
private UserInfoService userInfoService;
@Autowired
private OrderInfoMapper orderInfoMapper;
@Override
public OrderProcessInfo selectOrderProcessInfoByProcessId(String id, List<String> shList) {
return orderProcessInfoMapper.selectOrderProcessInfoByProcessId(id, shList);
@ -131,6 +134,22 @@ public class OrderProcessServiceImpl implements OrderProcessService {
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信息
*

@ -1,6 +1,5 @@
package com.dxhy.order.consumer.openapi.protocol.po.generateinvoice.sap;
import com.dxhy.order.consumer.openapi.protocol.po.PoCommonRequestParam;
import lombok.Data;
import java.util.List;
@ -88,6 +87,20 @@ public class FpkjReqSap {
* 行项目结构
*/
private List<FpkjMxSap> ITITEM;
//是否为电商系统数据
private String ZDSXT;
//是否独立开票抬头
private String ZDLKPTT;
//金税开票抬头名称
private String ZKPTTMC;
//金税开票纳税人识别号
private String ZKPSBH;
//金税开票地址
private String ZKPDZ;
//金税开票电话
private String ZKPDH;
//金税开票开户行
private String ZKPKHH;
//金税开票银行账号
private String ZKPZH;
}

@ -1,7 +1,6 @@
package com.dxhy.order.consumer.openapi.protocol.po.generateinvoicepush.sap;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.util.List;
@ -273,4 +272,14 @@ public class FpkjtsReqSap {
*/
@JSONField(name = "IT_ITEM")
private List<FpkjtsMxSap> ITITEM;
/**
* pdf流
*/
private String PDFZJL;
/**
* 字节流类型针对pdfzjl进行处理,OFD和PDF
*/
private String ZJLLX;
}

@ -51,12 +51,14 @@ import com.dxhy.order.model.sk.hp.*;
import com.dxhy.order.model.sk.kp.*;
import com.dxhy.order.model.sk.query.ResponseCommonInvoice;
import com.dxhy.order.model.sk.sld.SearchSld;
import com.dxhy.order.utils.*;
import com.dxhy.order.utils.CommonUtils;
import com.dxhy.order.utils.DecimalCalculateUtil;
import com.dxhy.order.utils.JsonUtils;
import com.dxhy.order.utils.StringUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.*;
@ -3504,6 +3506,20 @@ public class BeanTransitionUtils {
ddtxxBO.setDDH(req.getZJSDH());
ddtxxBO.setBZDH(req.getZBZDH());
ddtxxBO.setXTLY(isinput.getSYSID());
//如果为X,表示数据来自电商系统,开票完成后需要推送给电商系统开票数据及板式文件。
// if(StringUtils.isNotBlank(req.getZDSXT()) && ConfigureConstant.STRING_X.equals(req.getZDSXT())){
// ddtxxBO.setXTLY(OrderInfoEnum.SYS_SOURCE_DSXT.getKey());
// }
//如果此字段为X,表示开票抬头数据不取购方ZGFBH关联的信息,而是取21-26列数据。
if(StringUtils.isNotBlank(req.getZDLKPTT()) && ConfigureConstant.STRING_X.equals(req.getZDLKPTT())){
ddtxxBO.setGMFMC(req.getZKPTTMC());
ddtxxBO.setGMFSBH(req.getZKPSBH());
ddtxxBO.setGMFDH(req.getZKPDH());
ddtxxBO.setGMFDZ(req.getZKPDZ());
ddtxxBO.setGMFYH(req.getZKPKHH());
ddtxxBO.setGMFZH(req.getZKPZH());
ddtxxBO.setGMFBM("");
}
ddtxxBO.setGSDM(req.getBUKRS());
ddtxxBO.setENTID(deptEntity.getDeptId());
ddtxxBO.setBHZT(ConfigureConstant.STRING_0);

@ -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>

@ -97,8 +97,8 @@ public class InvoiceDetailsController {
private String yxisuse;
@GetMapping("priviewOfd")
public R priviewOfd() throws IOException {
File file = new File("C:\\Users\\10216\\Desktop\\042002200113_04440777.ofd");
public R priviewOfd(@RequestParam("path") String path) throws IOException {
File file = new File(path);
FileInputStream fis = null;
ByteArrayOutputStream bos = new ByteArrayOutputStream(1000);

@ -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;
@ -11,11 +12,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@Service
@ -31,11 +28,12 @@ public class OfdToPngSDEnergyServiceImpl implements OfdToPngSDEnergyService {
@Override
public OfdToPngResponse getOfdPngBySDenergy(byte[] bytes) {
Long timestamp = new Date().getTime();
Long timestamp = System.currentTimeMillis();
String md5Str = DigestUtil.md5Hex(timestamp + simsSalt);
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