diff --git a/so/src/private/nc/pubimpl/so/sobalance/arap/listener/GatheringAddAfterListenerAction.java b/so/src/private/nc/pubimpl/so/sobalance/arap/listener/GatheringAddAfterListenerAction.java index 34986bc..d081566 100644 --- a/so/src/private/nc/pubimpl/so/sobalance/arap/listener/GatheringAddAfterListenerAction.java +++ b/so/src/private/nc/pubimpl/so/sobalance/arap/listener/GatheringAddAfterListenerAction.java @@ -128,15 +128,11 @@ public class GatheringAddAfterListenerAction { for(IDataFromF2ForM30 data : datas) { if (!ccustomerid.equals(data.getPayBillOrderCust())) { - if(!data.getFirstBillType().equals("30") ){ - throw new BusinessException(NCLangRes4VoTransl.getNCLangRes().getStrByID("4006011_0", "04006011-0193", (String)null, new String[]{head.getVbillcode()})); - } + throw new BusinessException(NCLangRes4VoTransl.getNCLangRes().getStrByID("4006011_0", "04006011-0193", (String)null, new String[]{head.getVbillcode()})); } if (!cinvoicecustid.equals(data.getPayBillCustomer())) { - if(!data.getFirstBillType().equals("30") ){ throw new BusinessException(NCLangRes4VoTransl.getNCLangRes().getStrByID("4006011_0", "04006011-0194", (String)null, new String[]{head.getVbillcode()})); - } } if (!corigcurrencyid.equals(data.getPayBillCurID())) { @@ -148,9 +144,7 @@ public class GatheringAddAfterListenerAction { } if (MathTool.isDiffSign(ntotalorigmny, data.getPayBillmny())) { - if(!data.getFirstBillType().equals("30") ) {; - throw new BusinessException(NCLangRes4VoTransl.getNCLangRes().getStrByID("4006011_0", "04006011-0412")); - } + throw new BusinessException(NCLangRes4VoTransl.getNCLangRes().getStrByID("4006011_0", "04006011-0412")); } } @@ -297,9 +291,9 @@ public class GatheringAddAfterListenerAction { for(Map.Entry> entry : dataMap.entrySet()) { if (csaleorderidSet.contains(entry.getKey())) { - this.updateDataMap.put((String)entry.getKey(), (Collection)entry.getValue()); + this.updateDataMap.put(entry.getKey(), entry.getValue()); } else { - this.insertDataMap.put((String)entry.getKey(), (Collection)entry.getValue()); + this.insertDataMap.put(entry.getKey(), entry.getValue()); } } diff --git a/so/src/public/nccloud/api/so/so/UpCloses/ClosesoUpdateBL.java b/so/src/public/nccloud/api/so/so/UpCloses/ClosesoUpdateBL.java index 28d7c0b..0f24c7c 100644 --- a/so/src/public/nccloud/api/so/so/UpCloses/ClosesoUpdateBL.java +++ b/so/src/public/nccloud/api/so/so/UpCloses/ClosesoUpdateBL.java @@ -121,26 +121,33 @@ public JSONString ClosesoUpdateBL(JSONString json) { // for (Map row : operationresult) { // operationId = (String) row.get("bd.pk_defdoc"); // } - operationId = (String) valList.get("ID"); + operationId = (String) valList.get("id"); + if (operationId == null) { + errojson.put("status", "0"); + errojson.put("message", "操作类型不存在"); + errojson.put("codeList", null); + // 返回表示操作成功的JSON字符串 + return ResultMessageUtil.toJSON(errojson); + } for (int i = 0; i < array.size(); i++) { Map item = (Map) array.get(i); String vctcode = (String) item.getOrDefault("vctcode", ""); -// updateSql = " UPDATE so_saleorder h" + -// " SET h.vdef1 = '" + operationId + "' , h.vdef19 = '"+json.toJSONString() +"' '"+ -// " WHERE EXISTS (" + -// " SELECT 1" + -// " FROM so_saleorder_b b" + -// " left join bd_defdoc hbd on hbd.pk_defdoc=b.vbdef1 "+ -// " WHERE b.csaleorderid = h.csaleorderid" + -// " AND hbd.code = '" + vctcode + "' " + -// " );"; + updateSql = " UPDATE so_saleorder h" + + " SET h.vdef1 = '" + operationId + "' "+ + " WHERE EXISTS (" + + " SELECT 1" + + " FROM so_saleorder_b b" + + " left join bd_defdoc hbd on hbd.pk_defdoc=b.vbdef1 "+ + " WHERE b.csaleorderid = h.csaleorderid" + + " AND hbd.code = '" + vctcode + "' " + + " );"; // updateSql = " UPDATE so_saleorder h" + // " SET h.vdef19 = '" + json.toJSONString() + "' " + // " WHERE h.vdef6 = '" + "ZKWEQ0400425" + "' " + " ;"; - updateSql = " UPDATE so_saleorder h" + - " SET h.vdef1 = '" + operationId + "' , h.vdef19 = '"+json.toJSONString() +"' '"+ - " WHERE h.vdef6 = '" + vctcode + "' " + " ;"; +// updateSql = " UPDATE so_saleorder h" + +// " SET h.vdef1 = '" + operationId + "' , h.vdef19 = '"+json.toJSONString() +"' '"+ +// " WHERE h.vdef6 = '" + result.get(0)[0]+ "' " + " ;"; // 验证operation字段是否存在 if (vctcode == null) { return ResultMessageUtil.exceptionToJSON(new NullPointerException("vctcode:null")); @@ -151,7 +158,7 @@ public JSONString ClosesoUpdateBL(JSONString json) { + "left join org_salesorg o on h.pk_org=o.pk_salesorg " +" left join bd_defdoc hbd on hbd.pk_defdoc=b.vbdef1 "+ - "where h.vdef6='" + vctcode + "' "; + "where hbd.code='" + vctcode + "' "; List result = (List) getQueryService().executeQuery(sql, new ArrayListProcessor()); if (result == null || result.size() == 0) { errojson.put("status", "0"); diff --git a/sscivm/src/client/nccloud/web/sscivm/ivsale/application/util/DataChangeLogic.java b/sscivm/src/client/nccloud/web/sscivm/ivsale/application/util/DataChangeLogic.java index cefc747..2531be0 100644 --- a/sscivm/src/client/nccloud/web/sscivm/ivsale/application/util/DataChangeLogic.java +++ b/sscivm/src/client/nccloud/web/sscivm/ivsale/application/util/DataChangeLogic.java @@ -126,10 +126,10 @@ public class DataChangeLogic { for (int i = 0; i < rows.length; ++i) { String materialPk = (String) rows[i].getCell("pk_materiel").getValue(); // gridPrecisionOperator.addNumPrecision("xmsl", i, (String)materialMeasdocMap.get(materialPk)); - gridPrecisionOperator.addNumPrecision("caninvoice_xmsl", i, (String) materialMeasdocMap.get(materialPk)); - gridPrecisionOperator.addNumPrecision("invoiceing_xmsl", i, (String) materialMeasdocMap.get(materialPk)); - gridPrecisionOperator.addNumPrecision("invoiced_xmsl", i, (String) materialMeasdocMap.get(materialPk)); - gridPrecisionOperator.addCurrencyPricePrecision("xmdj", i, orgLocalCurrPK); +// gridPrecisionOperator.addNumPrecision("caninvoice_xmsl", i, (String) materialMeasdocMap.get(materialPk)); +// gridPrecisionOperator.addNumPrecision("invoiceing_xmsl", i, (String) materialMeasdocMap.get(materialPk)); +// gridPrecisionOperator.addNumPrecision("invoiced_xmsl", i, (String) materialMeasdocMap.get(materialPk)); +// gridPrecisionOperator.addCurrencyPricePrecision("xmdj", i, orgLocalCurrPK); } gridPrecisionOperator.processPrecision(); @@ -188,10 +188,10 @@ public class DataChangeLogic { for (int i = 0; i < rows.length; ++i) { String materialPk = (String) rows[i].getCell("pk_materiel").getValue(); // gridPrecisionOperator.addNumPrecision("xmsl", i, (String)materialMeasdocMap.get(materialPk)); - gridPrecisionOperator.addNumPrecision("caninvoice_xmsl", i, (String) materialMeasdocMap.get(materialPk)); - gridPrecisionOperator.addNumPrecision("invoiced_xmsl", i, (String) materialMeasdocMap.get(materialPk)); - gridPrecisionOperator.addNumPrecision("invoiceing_xmsl", i, (String) materialMeasdocMap.get(materialPk)); - gridPrecisionOperator.addCurrencyPricePrecision("xmdj", i, orgLocalCurrPK); +// gridPrecisionOperator.addNumPrecision("caninvoice_xmsl", i, (String) materialMeasdocMap.get(materialPk)); +// gridPrecisionOperator.addNumPrecision("invoiced_xmsl", i, (String) materialMeasdocMap.get(materialPk)); +// gridPrecisionOperator.addNumPrecision("invoiceing_xmsl", i, (String) materialMeasdocMap.get(materialPk)); +// gridPrecisionOperator.addCurrencyPricePrecision("xmdj", i, orgLocalCurrPK); } gridPrecisionOperator.processPrecision(); diff --git a/sscivm/src/public/nc/bs/sscivm/ivsale/util/InvoiceTransferUtil.java b/sscivm/src/public/nc/bs/sscivm/ivsale/util/InvoiceTransferUtil.java index 7c8c00f..10b0c37 100644 --- a/sscivm/src/public/nc/bs/sscivm/ivsale/util/InvoiceTransferUtil.java +++ b/sscivm/src/public/nc/bs/sscivm/ivsale/util/InvoiceTransferUtil.java @@ -1360,7 +1360,7 @@ public class InvoiceTransferUtil { pinvoice.setZnj(headvo.getZnj() == null ? null : getUFDoubleToBigDecimal(headvo.getZnj()).setScale(2, UFDouble.ROUND_HALF_UP)); pinvoice.setJehj(headvo.getJehj() == null ? null : getUFDoubleToBigDecimal(headvo.getJehj()).setScale(2, UFDouble.ROUND_HALF_UP)); pinvoice.setCjh(headvo.getCjh()); - pinvoice.setKqysssxbgglbm(headvo.getKqysssxbgglbm()); +// pinvoice.setKqysssxbgglbm(headvo.getKqysssxbgglbm()); return pinvoice; } diff --git a/uapbd/src/private/nc/bs/uapbd/task/InvoiceTaskPlugin.java b/uapbd/src/private/nc/bs/uapbd/task/InvoiceTaskPlugin.java index 9f1b06b..ee6729d 100644 --- a/uapbd/src/private/nc/bs/uapbd/task/InvoiceTaskPlugin.java +++ b/uapbd/src/private/nc/bs/uapbd/task/InvoiceTaskPlugin.java @@ -31,7 +31,7 @@ public class InvoiceTaskPlugin implements IBackgroundWorkPlugin{ " left join sscivm_ivapplog on sscivm_ivapplog.fphm = sscivm_invoice.fphm " + " where " + " sscivm_invoice_relation.billtype = '32' " + - " and so_saleinvoice.vdef20 <> 'Y' " + + " and (so_saleinvoice.vdef20 <> 'Y' OR so_saleinvoice.vdef13 IS NULL OR so_saleinvoice.vdef13='~' ) " + " and sscivm_invoice.dr = 0 " + " and sscivm_ivapplog.kpzt = 2 "; // + " so_saleinvoice.vbillcode = 'SI2024070400000738' "; @@ -76,10 +76,10 @@ public class InvoiceTaskPlugin implements IBackgroundWorkPlugin{ // Logger.error("---sirSqlExecute------"+sirSql); //ERP销售发票回传,根据销售发票id,回写发票号和单据编号 // String sSaleSql = "UPDATE so_saleinvoice set vdef20 = 'Y' , vdef13 = '" + fphm + "', vbillcode = '" + fphm +"' where csaleinvoiceid = '" + csaleinvoiceid + "'"; - String sSaleSql = "UPDATE so_saleinvoice set vdef20 = 'Y' , vdef13 = '" + fphm + "' where csaleinvoiceid = '" + csaleinvoiceid + "'"; +// String sSaleSql = "UPDATE so_saleinvoice set vdef20 = 'Y' , vdef13 = '" + fphm + "' where csaleinvoiceid = '" + csaleinvoiceid + "'"; - dao.executeUpdate(sSaleSql); - Logger.error("---sSaleSqlExecute------"+sSaleSql); +// dao.executeUpdate(sSaleSql); +// Logger.error("---sSaleSqlExecute------"+sSaleSql); //根据销售发票id 回写下游应收单表头发票号 String recBillSql = "MERGE INTO ar_recbill a USING (select DISTINCT pk_recbill,top_billid,top_billtype from ar_recitem) b ON ( a.pk_recbill = b.pk_recbill AND b.top_billid = '" + csaleinvoiceid + "' AND b.top_billtype = '32' ) \n" + "WHEN MATCHED THEN\n" +