Index: ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/action/InvoiceAction.java =================================================================== diff -u -r23361 -r23472 --- ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/action/InvoiceAction.java (.../InvoiceAction.java) (revision 23361) +++ ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/action/InvoiceAction.java (.../InvoiceAction.java) (revision 23472) @@ -640,8 +640,9 @@ "recyclingApplicantId", ""); String sql = "where 1=1"; if (StringUtils.isNotBlank(recyclingApplicantId)) { - sql += " and po.invoicePlan.id = " + recyclingApplicantId - + " and po.status != '" + Invoice.STATUS_UNDELIVERED + "'"; +// sql += " and po.invoicePlan.id = " + recyclingApplicantId +// + " and po.status != '" + Invoice.STATUS_UNDELIVERED + "'"; + sql += String.format( " and (po.invoicePlan.id=%s or po.id in (select invoiceId from Invoice_InvoicePlan where invoicePlanId=%s))", recyclingApplicantId,recyclingApplicantId); } List invoices = invoiceManager.findBySql(sql); Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/invoice/service/SubmitInvoiceContext.java =================================================================== diff -u -r23217 -r23472 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/invoice/service/SubmitInvoiceContext.java (.../SubmitInvoiceContext.java) (revision 23217) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/invoice/service/SubmitInvoiceContext.java (.../SubmitInvoiceContext.java) (revision 23472) @@ -24,6 +24,7 @@ import com.forgon.disinfectsystem.entity.invoicemanager.InvoiceItem; import com.forgon.disinfectsystem.entity.invoicemanager.InvoicePlan; import com.forgon.disinfectsystem.expensivegoods.ExpensiveGoodsServiceContext; +import com.forgon.disinfectsystem.vo.DisposableGoodsStorageAdjustVo; /** * 发货的上下文 @@ -43,6 +44,11 @@ private boolean sendOnlyUrgentGoods; /** + * 聚合包按包装的包进行发货 + */ + private boolean comboTousseSendByWrapperTousse; + + /** * 发货类型 */ private String invoiceType; @@ -204,6 +210,10 @@ */ private List allGoodsStocksInDB = new LinkedList<>(); + // 回写相关 + List disposableGoodsStorageAdjustVoList; + List writeBackInvoiceList = null; + /** * 外来器械允许部分发货 */ @@ -230,6 +240,15 @@ this.sendOnlyUrgentGoods = sendOnlyUrgentGoods; } + public boolean isComboTousseSendByWrapperTousse() { + return comboTousseSendByWrapperTousse; + } + + public void setComboTousseSendByWrapperTousse( + boolean comboTousseSendByWrapperTousse) { + this.comboTousseSendByWrapperTousse = comboTousseSendByWrapperTousse; + } + public String getInvoiceType() { return invoiceType; } @@ -474,6 +493,20 @@ this.comboTousseInstanceIdSet = comboTousseInstanceIdSet; } + public Set getTousseInstancesByComboTousseInstance(TousseInstance comboTousseInstance) { + Set tousses = new HashSet(); + Long comboTousseInstanceId = comboTousseInstance.getId(); + if(comboTousseInstanceId == null){ + return tousses; + } + for (TousseInstance tousseInstance : scannedTousseInstances) { + if(comboTousseInstanceId.equals(tousseInstance.getComboTousseInstanceId())){ + tousses.add(tousseInstance); + } + } + return tousses; + } + public Set getComboTousseInstances() { return comboTousseInstances; } @@ -633,4 +666,22 @@ this.allowPartlyInvoiceForeignTousse = allowPartlyInvoiceForeignTousse; } + public List getDisposableGoodsStorageAdjustVoList() { + return disposableGoodsStorageAdjustVoList; + } + + public void setDisposableGoodsStorageAdjustVoList( + List disposableGoodsStorageAdjustVoList) { + this.disposableGoodsStorageAdjustVoList = disposableGoodsStorageAdjustVoList; + } + + public List getWriteBackInvoiceList() { + return writeBackInvoiceList; + } + + public void setWriteBackInvoiceList(List writeBackInvoiceList) { + this.writeBackInvoiceList = writeBackInvoiceList; + } + + } Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/invoicemanager/Invoice_InvoicePlan.java =================================================================== diff -u --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/invoicemanager/Invoice_InvoicePlan.java (revision 0) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/invoicemanager/Invoice_InvoicePlan.java (revision 23472) @@ -0,0 +1,62 @@ +package com.forgon.disinfectsystem.entity.invoicemanager; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Index; +import javax.persistence.Table; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import com.forgon.disinfectsystem.idpredicate.IDAble; + +/** + * @author dandan 2018年6月2日 上午11:06:33 + * + */ +@Entity +@Table(name = "Invoice_InvoicePlan", indexes = { + @Index(columnList = "invoicePlanId", name = "invoicePlanId_index"), + @Index(columnList = "invoiceId", name = "invoiceId_index") }) +@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) +public class Invoice_InvoicePlan implements IDAble { + private Long id; + + /** + * 发货单id + */ + private Long invoiceId; + /** + * 申请单id + */ + private Long invoicePlanId; + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getInvoiceId() { + return invoiceId; + } + + public Long getInvoicePlanId() { + return invoicePlanId; + } + + public void setInvoiceId(Long invoiceId) { + this.invoiceId = invoiceId; + } + + public void setInvoicePlanId(Long invoicePlanId) { + this.invoicePlanId = invoicePlanId; + } + +}