feat: 汇总单号

dev_2.5_csconfilt
chenhc 3 months ago
parent 29bfb16806
commit ce0d312ea9

@ -213,12 +213,24 @@ public class IoCollectOrderController extends BaseController {
if (collectOrder == null) { if (collectOrder == null) {
return ResultVOUtils.error(500, "未找到单据"); return ResultVOUtils.error(500, "未找到单据");
} }
List<CollectOrderBizResponse> list = collectOrderBizService.filterList(collectOrderBizRequest); //如果是 处理单据页面来的 有汇总单号 要走汇总单号
PageInfo<CollectOrderBizResponse> pageInfo = new PageInfo<>(list); if (collectOrderBizRequest.getSummaryNoFlag() && StrUtil.isNotEmpty(collectOrder.getSummaryNo())){
PageSimpleResponse<CollectOrderBizResponse> pageSimpleResponse = new PageSimpleResponse<>(); collectOrderBizRequest.setSummaryNo(collectOrder.getSummaryNo());
pageSimpleResponse.setTotal(pageInfo.getTotal()); List<CollectOrderBizResponse> list = collectOrderBizService.filterList(collectOrderBizRequest);
pageSimpleResponse.setList(list); PageInfo<CollectOrderBizResponse> pageInfo = new PageInfo<>(list);
return ResultVOUtils.success(pageSimpleResponse); PageSimpleResponse<CollectOrderBizResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(list);
return ResultVOUtils.success(pageSimpleResponse);
}else {
List<CollectOrderBizResponse> list = collectOrderBizService.filterList(collectOrderBizRequest);
PageInfo<CollectOrderBizResponse> pageInfo = new PageInfo<>(list);
PageSimpleResponse<CollectOrderBizResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(list);
return ResultVOUtils.success(pageSimpleResponse);
}
} }
@Resource @Resource

@ -288,6 +288,9 @@ public class IoCollectOrder implements Serializable {
@ApiModelProperty(value = "关联预验收入库单号") @ApiModelProperty(value = "关联预验收入库单号")
private String preInBillNo; private String preInBillNo;
@TableField(value = "summaryNo")
@ApiModelProperty(value = "汇总单号")
private String summaryNo;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

@ -283,4 +283,8 @@ public class IoCollectOrderBackup implements Serializable {
@ApiModelProperty(value = "上传医保时间") @ApiModelProperty(value = "上传医保时间")
private Date uploadYbTime; private Date uploadYbTime;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableField(value = "summaryNo")
@ApiModelProperty(value = "汇总单号")
private String summaryNo;
} }

@ -337,4 +337,8 @@ public class IoCollectOrderOrigin implements Serializable {
@TableField(value = "preInBillNo") @TableField(value = "preInBillNo")
@ApiModelProperty(value = "关联预验收入库单号") @ApiModelProperty(value = "关联预验收入库单号")
private String preInBillNo; private String preInBillNo;
@TableField(value = "summaryNo")
@ApiModelProperty(value = "汇总单号")
private String summaryNo;
} }

@ -1,6 +1,8 @@
package com.glxp.api.req.collect; package com.glxp.api.req.collect;
import com.baomidou.mybatisplus.annotation.TableField;
import com.glxp.api.util.page.ListPageRequest; import com.glxp.api.util.page.ListPageRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
@ -129,4 +131,10 @@ public class CollectOrderBizRequest extends ListPageRequest {
* null * null
*/ */
private Integer isOrderCheck; private Integer isOrderCheck;
private Boolean summaryNoFlag;
@TableField(value = "summaryNo")
@ApiModelProperty(value = "汇总单号")
private String summaryNo;
} }

@ -200,6 +200,11 @@ public class IoCollectOrderResponse {
*/ */
private Integer codingStatus; private Integer codingStatus;
@TableField(value = "summaryNo")
@ApiModelProperty(value = "汇总单号")
private String summaryNo;
@TableField(value = "uploadYbTime") @TableField(value = "uploadYbTime")
@ApiModelProperty(value = "上传医保时间") @ApiModelProperty(value = "上传医保时间")
private Date uploadYbTime; private Date uploadYbTime;

@ -75,7 +75,7 @@ public class DownloadFactory {
int limit = 100; int limit = 100;
int maxPages = 1000; // 设置最大页数限制,防止死循环 int maxPages = 1000; // 设置最大页数限制,防止死循环
StringBuilder errorMsgAll = new StringBuilder(); StringBuilder errorMsgAll = new StringBuilder();
GetSickPrescribeRequest getSickPrescribeRequest = new GetSickPrescribeRequest(); GetSickPrescribeRequest getSickPrescribeRequest = new GetSickPrescribeRequest();
getSickPrescribeRequest.setLimit(limit); getSickPrescribeRequest.setLimit(limit);
getSickPrescribeRequest.setCode(collectOrderRequest.getBillNo()); getSickPrescribeRequest.setCode(collectOrderRequest.getBillNo());
@ -204,6 +204,7 @@ public class DownloadFactory {
ioCollectOrder.setSplitStatus(0); ioCollectOrder.setSplitStatus(0);
ioCollectOrder.setTagStatus(0); ioCollectOrder.setTagStatus(0);
ioCollectOrder.setBackupOrderRemark1(thrOrder.getBackupOrderRemark1()); ioCollectOrder.setBackupOrderRemark1(thrOrder.getBackupOrderRemark1());
ioCollectOrder.setSummaryNo(thrOrder.getSummaryNo());
List<IoCollectOrderBiz> bizList = new ArrayList<>(); List<IoCollectOrderBiz> bizList = new ArrayList<>();
for (IoCollectOrderBiz entity : thrOrder.getBizList()) { for (IoCollectOrderBiz entity : thrOrder.getBizList()) {

@ -17,6 +17,7 @@
sys_workplace_queue.name queueName sys_workplace_queue.name queueName
FROM io_collect_order_biz icob FROM io_collect_order_biz icob
left join io_collect_order ico on ico.billNo = icob.orderIdFk
left join basic_udirel bu on icob.relId = bu.id left join basic_udirel bu on icob.relId = bu.id
left join basic_products bp on bu.uuid = bp.uuid left join basic_products bp on bu.uuid = bp.uuid
left join sys_workplace_queue on sys_workplace_queue.relId = bu.id left join sys_workplace_queue on sys_workplace_queue.relId = bu.id
@ -24,27 +25,40 @@
left join sys_workplace_freight swf on swf.code = sys_workplace_queue.freightCode left join sys_workplace_freight swf on swf.code = sys_workplace_queue.freightCode
left join sys_workplace_region swr on swr.regionCode = swf.freightRow left join sys_workplace_region swr on swr.regionCode = swf.freightRow
<where> <where>
<if test="thrCode != '' and thrCode != null"> <!-- 当汇总单号存在时,仅用汇总单号查询 -->
AND icob.thrCode LIKE concat('%', #{thrCode}, '%') <choose>
</if> <when test="summaryNo != null and summaryNo != ''">
<if test="orderIdFk != null and orderIdFk != ''"> AND ico.summaryNo = #{summaryNo}
AND icob.orderIdFk = #{orderIdFk} </when>
</if> <otherwise>
<if test="relId != null"> <!-- 无汇总单号时,组合查询条件 -->
AND icob.relId = #{relId} <trim prefixOverrides="AND">
</if> <if test="thrCode != null and thrCode != ''">
<if test="cpmctymc != null and cpmctymc != ''"> AND icob.thrCode LIKE CONCAT('%', #{thrCode}, '%')
AND icob.cpmctymc LIKE concat('%', #{cpmctymc}, '%') </if>
</if> <if test="orderIdFk != null and orderIdFk != ''">
<if test="unionCode != '' and unionCode != null"> AND icob.orderIdFk = #{orderIdFk}
and ( </if>
bp.nameCode LIKE concat( #{unionCode}, '%') <if test="relId != null">
or bp.ybbm LIKE concat( #{unionCode}, '%') AND icob.relId = #{relId}
or bp.sptm LIKE concat(#{unionCode}, '%')) </if>
</if> <if test="cpmctymc != null and cpmctymc != ''">
<if test="ggxh != '' and ggxh != null"> AND icob.cpmctymc LIKE CONCAT('%', #{cpmctymc}, '%')
AND ggxh LIKE concat( #{ggxh}, '%') </if>
</if> <!-- 联合编码查询 -->
<if test="unionCode != null and unionCode != ''">
AND (
bp.nameCode LIKE CONCAT(#{unionCode}, '%')
OR bp.ybbm LIKE CONCAT(#{unionCode}, '%')
OR bp.sptm LIKE CONCAT(#{unionCode}, '%')
)
</if>
<if test="ggxh != null and ggxh != ''">
AND ggxh LIKE CONCAT(#{ggxh}, '%')
</if>
</trim>
</otherwise>
</choose>
</where> </where>
group by icob.id group by icob.id
ORDER BY icob.getConfirm, icob.id desc ORDER BY icob.getConfirm, icob.id desc

@ -32,6 +32,7 @@
ico.uploadError, ico.uploadError,
sol.ledNum, sol.ledNum,
ico.errorMsg, ico.errorMsg,
ico.summaryNo,
row_number() over ( order by case row_number() over ( order by case
when ico.orderTime is null then ico.createTime when ico.orderTime is null then ico.createTime
else ico.orderTime end desc ) as orderSequence else ico.orderTime end desc ) as orderSequence

Loading…
Cancel
Save