feat: 带票出入库明细

lh_dev_fifo
chenhc 11 months ago
parent 0ec915d253
commit 8fdd2a487d

@ -370,6 +370,10 @@ public class IoOrderDetailResultController extends BaseController {
ioOrderDetailResultData.put("confirmEndTime", filterOrderDetailResultRequest.getConfirmEndTime() == null ? ' ' : filterOrderDetailResultRequest.getConfirmEndTime()); ioOrderDetailResultData.put("confirmEndTime", filterOrderDetailResultRequest.getConfirmEndTime() == null ? ' ' : filterOrderDetailResultRequest.getConfirmEndTime());
ioOrderDetailResultData.put("employeeName", filterOrderDetailResultRequest.getEmployeeName() == null ? ' ' : filterOrderDetailResultRequest.getEmployeeName()); ioOrderDetailResultData.put("employeeName", filterOrderDetailResultRequest.getEmployeeName() == null ? ' ' : filterOrderDetailResultRequest.getEmployeeName());
ioOrderDetailResultData.put("fromInvName", ioOrderDetailResultResponse.getFromInvName() == null ? ' ' : ioOrderDetailResultResponse.getFromInvName()); ioOrderDetailResultData.put("fromInvName", ioOrderDetailResultResponse.getFromInvName() == null ? ' ' : ioOrderDetailResultResponse.getFromInvName());
ioOrderDetailResultData.put("isStack", ioOrderDetailResultResponse.getIsStack() == null ? ' ' : ioOrderDetailResultResponse.getIsStack());
ioOrderDetailResultData.put("groupBuy", ioOrderDetailResultResponse.getGroupBuy() == null ? ' ' : ioOrderDetailResultResponse.getGroupBuy());
ioOrderDetailResultData.put("invoiceCodes", ioOrderDetailResultResponse.getInvoiceCodes() == null ? ' ' : ioOrderDetailResultResponse.getInvoiceCodes());
ioOrderDetailResultData.put("fromOutName", ioOrderDetailResultResponse.getFromOutName() == null ? ' ' : ioOrderDetailResultResponse.getFromOutName());
if (thrProductsEntity != null) { if (thrProductsEntity != null) {
ioOrderDetailResultData.put("cplb", thrProductsEntity.getCplb() == null ? ' ' : thrProductsEntity.getCplb()); ioOrderDetailResultData.put("cplb", thrProductsEntity.getCplb() == null ? ' ' : thrProductsEntity.getCplb());
} }

@ -64,4 +64,8 @@ public class FilterOrderDetailResultRequest extends ListPageRequest {
private String confirmStarTime; //发票确认起始日期 private String confirmStarTime; //发票确认起始日期
private String confirmEndTime; //发票确认结束日期 private String confirmEndTime; //发票确认结束日期
private String corpName;//供应商名字 private String corpName;//供应商名字
private String fromOutName;//出库科室
private Boolean groupBuy; //是否集采产品
} }

@ -189,6 +189,7 @@ public class IoOrderDetailResultResponse {
private String mainAction; private String mainAction;
@ExcelProperty(value = "出入库时间", index = 12) @ExcelProperty(value = "出入库时间", index = 12)
private Date auditTime; private Date auditTime;
private Date productionDate;
private String fromInvName; private String fromInvName;
@ExcelProperty(value = "往来单位", index = 0) @ExcelProperty(value = "往来单位", index = 0)
@ -217,8 +218,10 @@ public class IoOrderDetailResultResponse {
@ExcelProperty(value = "配送商", index = 7) @ExcelProperty(value = "配送商", index = 7)
private String corpName; private String corpName;
private Boolean isStack;
private Boolean isStack;
private Boolean groupBuy;
private String fromOutName;
public String getFromName() { public String getFromName() {
if (StrUtil.isNotEmpty(fromCorpName)) if (StrUtil.isNotEmpty(fromCorpName))
return fromCorpName; return fromCorpName;

@ -26,24 +26,32 @@
<select id="filterOrderList" resultType="com.glxp.api.res.inout.IoOrderDetailResultResponse"> <select id="filterOrderList" resultType="com.glxp.api.res.inout.IoOrderDetailResultResponse">
SELECT a2.*, SELECT a2.*,
aw.name as fromInvName, aw.name as fromInvName,
aw2.name as fromOutName,
a1.mainAction, a1.mainAction,
a1.confirmTime,
a1.auditTime,
bu.isStack, bu.isStack,
bu.groupBuy,
GROUP_CONCAT(ioi.invoiceEncode ORDER BY ioi.invoiceEncode SEPARATOR ',') AS invoiceCodes, GROUP_CONCAT(ioi.invoiceEncode ORDER BY ioi.invoiceEncode SEPARATOR ',') AS invoiceCodes,
b1.NAME AS fromCorpName b1.NAME AS fromCorpName,
,
basic_bussiness_type.name billTypeName basic_bussiness_type.name billTypeName
FROM io_order_detail_result a2 FROM io_order_detail_result a2
LEFT JOIN io_order a1 ON a1.billNo = a2.orderIdFk LEFT JOIN io_order a1 ON a1.billNo = a2.orderIdFk
LEFT JOIN io_order a3 ON a3.ullageSupNo = a2.orderIdFk
LEFT JOIN basic_corp b1 ON b1.erpId = a1.fromCorp LEFT JOIN basic_corp b1 ON b1.erpId = a1.fromCorp
LEFT JOIN basic_udirel bu ON a2.bindRlFk = bu.id LEFT JOIN basic_udirel bu ON a2.bindRlFk = bu.id
left join basic_bussiness_type on a1.action = basic_bussiness_type.action left join basic_bussiness_type on a1.action = basic_bussiness_type.action
LEFT JOIN io_order_invoice ioi ON a1.billNo = ioi.orderIdFk LEFT JOIN io_order_invoice ioi ON a1.billNo = ioi.orderIdFk
left join auth_warehouse aw on aw.code = a1.fromInvCode left join auth_warehouse aw on aw.code = a1.fromInvCode
left join auth_warehouse aw2 on aw2.code = a3.fromInvCode
<where> <where>
a1.status = 7 a1.status = 7
<if test="orderIdFk != null and orderIdFk != ''"> <if test="orderIdFk != null and orderIdFk != ''">
AND a2.orderIdFk = #{orderIdFk} AND a2.orderIdFk = #{orderIdFk}
</if> </if>
<if test="groupBuy != null ">
AND bu.groupBuy = #{groupBuy}
</if>
<if test="keyWords != null and keyWords != ''"> <if test="keyWords != null and keyWords != ''">
AND (aw.name like concat('%', #{keyWords}, '%') or b1.name like concat('%', #{keyWords}, '%')) AND (aw.name like concat('%', #{keyWords}, '%') or b1.name like concat('%', #{keyWords}, '%'))
</if> </if>
@ -71,6 +79,9 @@
<if test="spec != null and spec != ''"> <if test="spec != null and spec != ''">
AND a2.spec like concat('%', #{spec}, '%') AND a2.spec like concat('%', #{spec}, '%')
</if> </if>
<if test="fromOutName != null and fromOutName != ''">
AND aw2.name like concat('%', #{fromOutName}, '%')
</if>
<if test="fromCorp != null and fromCorp != ''"> <if test="fromCorp != null and fromCorp != ''">
AND a1.fromCorp = #{fromCorp} AND a1.fromCorp = #{fromCorp}
</if> </if>

Loading…
Cancel
Save