Compare commits

...

6 Commits

  1. 2
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/controller/InvoiceController.java
  2. 8
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/model/OrderListQuery.java
  3. 30
      order-management-invoice/src/main/resources/mybatis/mapper/OrderInvoiceInfoMapper.xml
  4. 12
      order-management-order/src/main/java/com/dxhy/order/consumer/modules/bespoke/service/impl/YyOrderServiceImpl.java

@ -66,6 +66,8 @@ public class InvoiceController {
log.debug("{}发票明细列表查询参数:{}", LOGGER_MSG, JsonUtils.getInstance().toJsonString(orderBatchQuery));
//数据转换
Map<String, Object> paramMap = PageBeanConvertUtil.convertToMap(orderBatchQuery);
paramMap.put("pzhStart", orderBatchQuery.getPzhStart());
paramMap.put("pzhEnd", orderBatchQuery.getPzhEnd());
if (StringUtils.isBlank(orderBatchQuery.getXhfNsrsbh())) {
log.error("{},请求税号为空!", LOGGER_MSG);
return R.error(OrderValidateEnum.TAXCODE_ISNULL.getKey(), OrderValidateEnum.TAXCODE_ISNULL.getMessage());

@ -260,5 +260,13 @@ public class OrderListQuery {
* 短信交付状态 0未交付 1已交付
*/
private String shortMsgPushStatus;
/**
* 凭证号排序
*/
private String pzhStart;
/**
* 订单号排序
*/
private String pzhEnd;
}

@ -1636,6 +1636,12 @@
<if test="map.maxhjje!=null and map.maxhjje!= '' ">
and CAST(oii.kphjje AS DECIMAL(40,2)) &lt;= CAST(#{map.maxhjje,jdbcType=VARCHAR} as DECIMAL(40,2))
</if>
<if test="map.pzhStart !=null and map.pzhStart != '' ">
and CAST(oi.byzd2 AS UNSIGNED) &gt;= CAST(#{map.pzhStart,jdbcType=VARCHAR} as UNSIGNED)
</if>
<if test="map.pzhEnd !=null and map.pzhEnd != '' ">
and CAST(oi.byzd2 AS UNSIGNED) &lt;= CAST(#{map.pzhEnd,jdbcType=VARCHAR} as UNSIGNED)
</if>
</where>
</sql>
@ -1649,11 +1655,25 @@
<when test="map.orderBy !=null and map.orderBy == 'checkTime' ">
order by check_time desc
</when>
<when test="map.orderBy !=null and map.orderBy == 'pzhAsc' ">
order by CONVERT(oi.byzd2, UNSIGNED) asc,kprq DESC
</when>
<when test="map.orderBy !=null and map.orderBy == 'pzhDesc' ">
order by CONVERT(oi.byzd2, UNSIGNED) desc,kprq DESC
<when test="map.orderBy !=null and map.orderBy == '88' ">
order by CASE
WHEN oi.byzd2 IS NULL OR oi.byzd2 = '' THEN 1
ELSE 0
END,
CONVERT(oi.byzd2, UNSIGNED) asc,ddh DESC
</when>
<when test="map.orderBy !=null and map.orderBy == '99' ">
order by CASE
WHEN oi.byzd2 IS NULL OR oi.byzd2 = '' THEN 1
ELSE 0
END,
CONVERT(oi.byzd2, UNSIGNED) asc,ddh asc
</when>
<when test="map.orderBy !=null and map.orderBy == '66' ">
order by CONVERT(oi.byzd2, UNSIGNED) DESC,ddh DESC
</when>
<when test="map.orderBy !=null and map.orderBy == '77' ">
order by CONVERT(oi.byzd2, UNSIGNED) DESC,ddh asc
</when>
<otherwise>
ORDER BY kprq DESC

@ -97,6 +97,9 @@ public class YyOrderServiceImpl implements OrderService {
@Resource
private RedissonService redissonService;
@Value("${exculd.nsrsbh}")
private String exculdNsrsbh;
//订单读入
@Override
public R orderRead(ReqParam reqParam) {
@ -309,6 +312,14 @@ public class YyOrderServiceImpl implements OrderService {
log.debug("cdlCodeList:{}", JSON.toJSONString(ddhList));
for (String cdlCode : ddhList) {
DynamicContextHolder.push(nsrsbh);
log.debug("exculdNsrsbh:{}", exculdNsrsbh);
if (StringUtils.isNotBlank(exculdNsrsbh) && Arrays.asList(exculdNsrsbh.split(",")).contains(nsrsbh)){
NewTable newTableFull = new NewTable();
BeanUtil.copyProperties(newTable, newTableFull);
newTableFull.setCDLCode(cdlCode);
DynamicContextHolder.push(ConfigureConstant.MAIN);
count += tInvoiceInvmapMapper.insertBackMsg(newTableFull);
}else {
List<InvoiceBpmmap> ddbhList = yyOrderMapper.getDdbh(cdlCode);
log.debug("查询到中间表信息:{}", JSON.toJSONString(ddbhList));
if (CollectionUtils.isNotEmpty(ddbhList)) {
@ -324,6 +335,7 @@ public class YyOrderServiceImpl implements OrderService {
}
}
}
}

Loading…
Cancel
Save