Compare commits
	
		
			2 Commits
		
	
	
		
			519bf02bed
			...
			6371693c46
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | 6371693c46 | |
|  | 061303811f | 
|  | @ -38,7 +38,7 @@ public class WMSInvoiceQueryController extends AbstractFormPlugin implements Plu | ||||||
|         String message ="成功"; |         String message ="成功"; | ||||||
|         WMSInvoiceQueryModel.Data data = new WMSInvoiceQueryModel.Data(); |         WMSInvoiceQueryModel.Data data = new WMSInvoiceQueryModel.Data(); | ||||||
|         String billno = cDPCode; |         String billno = cDPCode; | ||||||
|         String fileurl = null; |         String pdffileurl = null; | ||||||
|         QFilter qFilter = new QFilter("billno", QCP.in, billno); |         QFilter qFilter = new QFilter("billno", QCP.in, billno); | ||||||
|         qFilter.and("billstatus", QCP.equals, "C"); |         qFilter.and("billstatus", QCP.equals, "C"); | ||||||
|         DynamicObject sm_delivernotice = BusinessDataServiceHelper.loadSingle(Constants.SM_DELIVERNOTICE, qFilter.toArray()); |         DynamicObject sm_delivernotice = BusinessDataServiceHelper.loadSingle(Constants.SM_DELIVERNOTICE, qFilter.toArray()); | ||||||
|  | @ -51,8 +51,8 @@ public class WMSInvoiceQueryController extends AbstractFormPlugin implements Plu | ||||||
|                 if (sim_original_bil != null) { |                 if (sim_original_bil != null) { | ||||||
|                     String invoiceno = sim_original_bil.getString("invoiceno"); |                     String invoiceno = sim_original_bil.getString("invoiceno"); | ||||||
|                     DynamicObject sim_vatinvoice = BusinessDataServiceHelper.loadSingle("sim_vatinvoice", new QFilter[]{new QFilter("invoiceno", QCP.equals, invoiceno)}); |                     DynamicObject sim_vatinvoice = BusinessDataServiceHelper.loadSingle("sim_vatinvoice", new QFilter[]{new QFilter("invoiceno", QCP.equals, invoiceno)}); | ||||||
|                     if (sim_vatinvoice != null && StringUtils.isNotBlank(sim_vatinvoice.getString("fileurl"))) { |                     if (sim_vatinvoice != null && StringUtils.isNotBlank(sim_vatinvoice.getString("pdffileurl"))) { | ||||||
|                         fileurl = sim_vatinvoice.getString("fileurl"); |                         pdffileurl = sim_vatinvoice.getString("pdffileurl"); | ||||||
|                     }else{ |                     }else{ | ||||||
|                         code ="-1"; |                         code ="-1"; | ||||||
|                         message ="根据DP单号:"+cDPCode+",未找到发票查询信息"; |                         message ="根据DP单号:"+cDPCode+",未找到发票查询信息"; | ||||||
|  | @ -66,7 +66,7 @@ public class WMSInvoiceQueryController extends AbstractFormPlugin implements Plu | ||||||
|                 message ="根据DP单号:"+cDPCode+",未找到开票申请单"; |                 message ="根据DP单号:"+cDPCode+",未找到开票申请单"; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         data.setSalesInvoiceUrl(fileurl); |         data.setSalesInvoiceUrl(pdffileurl); | ||||||
|         data.setSalesOrderCode(billno); |         data.setSalesOrderCode(billno); | ||||||
|         wmsInvoiceQueryModel.setCode(code); |         wmsInvoiceQueryModel.setCode(code); | ||||||
|         wmsInvoiceQueryModel.setMessage(message); |         wmsInvoiceQueryModel.setMessage(message); | ||||||
|  | @ -82,7 +82,7 @@ public class WMSInvoiceQueryController extends AbstractFormPlugin implements Plu | ||||||
|         String message ="成功"; |         String message ="成功"; | ||||||
|         WMSInvoiceQueryModel.Data data = new WMSInvoiceQueryModel.Data(); |         WMSInvoiceQueryModel.Data data = new WMSInvoiceQueryModel.Data(); | ||||||
|         String billno = salesOrderCode; |         String billno = salesOrderCode; | ||||||
|         String fileurl = null; |         String pdffileurl = null; | ||||||
|         QFilter qFilter = new QFilter("billno", QCP.in, billno); |         QFilter qFilter = new QFilter("billno", QCP.in, billno); | ||||||
|         qFilter.and("billstatus", QCP.equals, "C"); |         qFilter.and("billstatus", QCP.equals, "C"); | ||||||
|         DynamicObject sm_delivernotice = BusinessDataServiceHelper.loadSingle(Constants.SM_DELIVERNOTICE, qFilter.toArray()); |         DynamicObject sm_delivernotice = BusinessDataServiceHelper.loadSingle(Constants.SM_DELIVERNOTICE, qFilter.toArray()); | ||||||
|  | @ -95,8 +95,8 @@ public class WMSInvoiceQueryController extends AbstractFormPlugin implements Plu | ||||||
|                 if (sim_original_bil != null) { |                 if (sim_original_bil != null) { | ||||||
|                     String invoiceno = sim_original_bil.getString("invoiceno"); |                     String invoiceno = sim_original_bil.getString("invoiceno"); | ||||||
|                     DynamicObject sim_vatinvoice = BusinessDataServiceHelper.loadSingle("sim_vatinvoice", new QFilter[]{new QFilter("invoiceno", QCP.equals, invoiceno)}); |                     DynamicObject sim_vatinvoice = BusinessDataServiceHelper.loadSingle("sim_vatinvoice", new QFilter[]{new QFilter("invoiceno", QCP.equals, invoiceno)}); | ||||||
|                     if (sim_vatinvoice != null && StringUtils.isNotBlank(sim_vatinvoice.getString("fileurl"))) { |                     if (sim_vatinvoice != null && StringUtils.isNotBlank(sim_vatinvoice.getString("pdffileurl"))) { | ||||||
|                         fileurl = sim_vatinvoice.getString("fileurl"); |                         pdffileurl = sim_vatinvoice.getString("pdffileurl"); | ||||||
|                     }else{ |                     }else{ | ||||||
|                         code ="-1"; |                         code ="-1"; | ||||||
|                         message ="根据DP单号:"+salesOrderCode+",未找到发票查询信息"; |                         message ="根据DP单号:"+salesOrderCode+",未找到发票查询信息"; | ||||||
|  | @ -110,7 +110,7 @@ public class WMSInvoiceQueryController extends AbstractFormPlugin implements Plu | ||||||
|             code ="-1"; |             code ="-1"; | ||||||
|             message ="根据DP单号:"+salesOrderCode+",未找到销售订单"; |             message ="根据DP单号:"+salesOrderCode+",未找到销售订单"; | ||||||
|         } |         } | ||||||
|         data.setSalesInvoiceUrl(fileurl); |         data.setSalesInvoiceUrl(pdffileurl); | ||||||
|         data.setSalesOrderCode(billno); |         data.setSalesOrderCode(billno); | ||||||
|         wmsInvoiceQueryModel.setCode(code); |         wmsInvoiceQueryModel.setCode(code); | ||||||
|         wmsInvoiceQueryModel.setMessage(message); |         wmsInvoiceQueryModel.setMessage(message); | ||||||
|  |  | ||||||
|  | @ -44,7 +44,7 @@ public class WMSInvoiceQueryModel implements Serializable { | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     @ApiModel |     @ApiModel | ||||||
|     public static class Data   { |     public static class Data implements Serializable   { | ||||||
|         @ApiParam("发票文件地址") |         @ApiParam("发票文件地址") | ||||||
|         private String salesOrderCode; |         private String salesOrderCode; | ||||||
|         @ApiParam("发票文件地址") |         @ApiParam("发票文件地址") | ||||||
|  |  | ||||||
|  | @ -398,6 +398,30 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin { | ||||||
|                 this.getView().showErrorNotification("物料明细分录行" + seq + "含税单价超过最高采购限价,请修改"); |                 this.getView().showErrorNotification("物料明细分录行" + seq + "含税单价超过最高采购限价,请修改"); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |         //收获组织带出供应商,仓库 | ||||||
|  |         if (StringUtils.equals("entryrecorg", name)) { | ||||||
|  |             ChangeData changeData = e.getChangeSet()[0]; | ||||||
|  |             int rowIndex = changeData.getRowIndex(); | ||||||
|  |             int seq = rowIndex; | ||||||
|  |             DynamicObject newValue = (DynamicObject) changeData.getNewValue(); | ||||||
|  |             if (newValue != null && StringUtils.equals("SHLC", newValue.getString("number"))) { | ||||||
|  |                 DynamicObject tqq9_sup_sh = (DynamicObject) getModel().getValue("tqq9_sup_sh");//供应商 | ||||||
|  |                 DynamicObject tqq9_rewares_sh = (DynamicObject) getModel().getValue("tqq9_rewares_sh");//仓库 | ||||||
|  |                 getModel().setValue("supplier", tqq9_sup_sh, seq); | ||||||
|  |                 getModel().setValue("warehouse", tqq9_rewares_sh, seq); | ||||||
|  |             } else if (newValue != null && StringUtils.equals("BJLC", newValue.getString("number"))) { | ||||||
|  |                 DynamicObject tqq9_sup_bj = (DynamicObject) getModel().getValue("tqq9_sup_bj");//供应商 | ||||||
|  |                 DynamicObject tqq9_rewares_bj = (DynamicObject) getModel().getValue("tqq9_rewares_bj");//仓库 | ||||||
|  |                 getModel().setValue("supplier", tqq9_sup_bj, seq); | ||||||
|  |                 getModel().setValue("warehouse", tqq9_rewares_bj, seq); | ||||||
|  |             } else if (newValue != null && StringUtils.equals("GZLC", newValue.getString("number"))) { | ||||||
|  |                 DynamicObject tqq9_sup_gz = (DynamicObject) getModel().getValue("tqq9_sup_gz");//供应商 | ||||||
|  |                 DynamicObject tqq9_rewares_gz = (DynamicObject) getModel().getValue("tqq9_rewares_gz");//仓库 | ||||||
|  |                 getModel().setValue("supplier", tqq9_sup_gz, seq); | ||||||
|  |                 getModel().setValue("warehouse", tqq9_rewares_gz, seq); | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     @Override |     @Override | ||||||
|  | @ -471,14 +495,16 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin { | ||||||
|                     DynamicObject materialpurchaseinfo = BusinessDataServiceHelper.loadSingle("bd_materialpurchaseinfo", new QFilter[]{new QFilter("masterid", QCP.equals, tqq9_material.getLong("id"))});//物料采购信息 |                     DynamicObject materialpurchaseinfo = BusinessDataServiceHelper.loadSingle("bd_materialpurchaseinfo", new QFilter[]{new QFilter("masterid", QCP.equals, tqq9_material.getLong("id"))});//物料采购信息 | ||||||
|                     BigDecimal tqq9_saledates = entry.getBigDecimal("tqq9_saledates"); |                     BigDecimal tqq9_saledates = entry.getBigDecimal("tqq9_saledates"); | ||||||
|                     model.setValue("material", materialpurchaseinfo, i);//物料 |                     model.setValue("material", materialpurchaseinfo, i);//物料 | ||||||
|  |                     model.setValue("materialmasterid", tqq9_material, i);//主物料(封存) | ||||||
|                     model.setValue("materialname", tqq9_material.getString("name"), i);//物料名称 |                     model.setValue("materialname", tqq9_material.getString("name"), i);//物料名称 | ||||||
|                     model.setValue("unit", tqq9_material.getDynamicObject("baseunit"), i);//计量单位 |                     model.setValue("unit", tqq9_material.getDynamicObject("baseunit"), i);//计量单位 | ||||||
|                     model.setValue("baseunit", tqq9_material.getDynamicObject("baseunit"), i);//基本单位 |                     model.setValue("baseunit", tqq9_material.getDynamicObject("baseunit"), i);//基本单位 | ||||||
|                     model.setValue("rowclosestatus", "A",i);//行关闭状态 |                     model.setValue("rowclosestatus", "A", i);//行关闭状态 | ||||||
|                     model.setValue("rowterminatestatus", "A",i);//行终止状态 |                     model.setValue("rowterminatestatus", "A", i);//行终止状态 | ||||||
|  |                     model.setValue("entrypurog", LCJT, i);//分录采购组织(封存) | ||||||
|                     model.setValue("entryrecorg", tqq9_org, i);//收货组织 |                     model.setValue("entryrecorg", tqq9_org, i);//收货组织 | ||||||
|                     model.setValue("entryreqorg", tqq9_org, i);//需求组织 |                     model.setValue("entryreqorg", LCJT, i);//需求组织 | ||||||
|                     model.setValue("entryreqdept", dept, i);//需求部门 |                     model.setValue("entryreqdept", LCJT, i);//需求部门 | ||||||
|                     model.setValue("reqdate", date, i);//需求日期 |                     model.setValue("reqdate", date, i);//需求日期 | ||||||
|                     model.setValue("purdate", date, i);//建议采购日期 |                     model.setValue("purdate", date, i);//建议采购日期 | ||||||
|                     model.setValue("deliverdate", date, i);//交货日期 |                     model.setValue("deliverdate", date, i);//交货日期 | ||||||
|  | @ -488,7 +514,7 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin { | ||||||
|                     model.setValue("entrychangetype", "B", i);//变更方式 |                     model.setValue("entrychangetype", "B", i);//变更方式 | ||||||
|                     model.setValue("entrycreator", user, i);//创建人 |                     model.setValue("entrycreator", user, i);//创建人 | ||||||
|                     model.setValue("entryrecdept", tqq9_org, i);//收货部门 |                     model.setValue("entryrecdept", tqq9_org, i);//收货部门 | ||||||
|                     model.setValue("entrypurdept", tqq9_org, i);//采购部门 |                     model.setValue("entrypurdept", LCJT, i);//采购部门 | ||||||
|                     model.setValue("entryoperatorgroup", tqq9_org, i);//采购组 |                     model.setValue("entryoperatorgroup", tqq9_org, i);//采购组 | ||||||
|                     model.setValue("tqq9_expectsaletime", tqq9_saledates, i);//预计销售时间(月) |                     model.setValue("tqq9_expectsaletime", tqq9_saledates, i);//预计销售时间(月) | ||||||
|                     if (StringUtils.equals(tqq9_org.getString("number"), "SHLC")) { |                     if (StringUtils.equals(tqq9_org.getString("number"), "SHLC")) { | ||||||
|  | @ -506,4 +532,5 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin { | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
		Loading…
	
		Reference in New Issue