K3WISE 和 K3CLOUD 对接问题,用我们开发的插件销售出库的仓库或物料不能做销售退料,做过销售退料的仓库或物料不能做销售出库,系统手工录入可以。报错信息:
"ORA-00001: unique constraint (KUSER03.IDX_STK_INVENTORY_CLUST) violated"
发生时间: 2016-03-02 01:47:49
错误编号: BOS_ExecuteNonQuery
错误信息: ORA-00001: unique constraint (KUSER03.IDX_STK_INVENTORY_CLUST) violated
Sql语句:
MERGE INTO T_STK_INVENTORY IT
USING (SELECT MIN(FINVENTORYID) AS FINVENTORYID, SUM(FBASEQTY) AS FBASEQTY,SUM(FSECQTY) AS FSECQTY,
FSTOCKORGID,FKEEPERTYPEID,FKEEPERID,FOWNERTYPEID,FOWNERID,FSTOCKID,FSTOCKLOCID,FAUXPROPID,FSTOCKSTATUSID,
FLOT,FBOMID,FMTONO,FPROJECTNO,FPRODUCEDATE,FEXPIRYDATE,FBASEUNITID,FSTOCKUNITID,FMATERIALID,FSECUNITID
FROM TM_STK_UpdateStockToTemp
GROUP BY FMATERIALID,FSTOCKORGID,FKEEPERTYPEID,FKEEPERID,FOWNERTYPEID,FOWNERID,FSTOCKID,FSTOCKLOCID,FAUXPROPID,FSTOCKSTATUSID,
FLOT,FBOMID,FMTONO,FPROJECTNO,FPRODUCEDATE,FEXPIRYDATE,FBASEUNITID,FSTOCKUNITID,FSECUNITID ) IT2
ON (IT.FID = IT2.FINVENTORYID)
WHEN MATCHED THEN
UPDATE SET IT.FBASEQTY = IT.FBASEQTY + IT2.FBASEQTY,IT.FSECQTY = IT.FSECQTY + IT2.FSECQTY,FUPDATETIME = SYSDATE
WHEN NOT MATCHED THEN
INSERT (FID,FSTOCKORGID,FKEEPERTYPEID,FKEEPERID,FOWNERTYPEID,FOWNERID,FSTOCKID,
FSTOCKLOCID,FAUXPROPID,FSTOCKSTATUSID,FLOT,FBOMID,FMTONO,FPROJECTNO,FPRODUCEDATE,
FEXPIRYDATE,FBASEUNITID,FBASEQTY,FBASELOCKQTY,FSECQTY,FSECLOCKQTY,FSTOCKUNITID,FMATERIALID,FQTY,FLOCKQTY,FSECUNITID,
FOBJECTTYPEID,FBASEAVBQTY,FAVBQTY,FSECAVBQTY)
VALUES(IT2.FINVENTORYID,IT2.FSTOCKORGID,IT2.FKEEPERTYPEID,IT2.FKEEPERID,IT2.FOWNERTYPEID,IT2.FOWNERID,IT2.FSTOCKID,
IT2.FSTOCKLOCID,IT2.FAUXPROPID,IT2.FSTOCKSTATUSID,IT2.FLOT,IT2.FBOMID,IT2.FMTONO,IT2.FPROJECTNO,IT2.FPRODUCEDATE,
IT2.FEXPIRYDATE,IT2.FBASEUNITID,IT2.FBASEQTY,0,IT2.FSECQTY,0,IT2.FSTOCKUNITID,IT2.FMATERIALID,0,0,IT2.FSECUNITID,
'STK_Inventory',0,0,0)
===================================================
调用堆栈:
Server stack trace:
在 Kingdee.K3.SCM.App.Core.AppBusinessService.UpdateStockService.DoActionBatch(AppBusinessServiceArgs e)
在 Kingdee.BOS.App.Core.AbstractOprerationService.ExecuteFormBusinessService(IAppFormBusinessService iBusiness, ExtendedDataEntity[] dataEntities, FormBusinessService service)
在 Kingdee.BOS.App.Core.AbstractOprerationService.InvokeFormBusiness(DynamicObject[] objs, Int32 iActionPoint)
在 Kingdee.BOS.App.Core.AbstractOprerationService.CallOperation(DynamicObject[]& objs)
在 Kingdee.BOS.App.Core.AbstractOprerationService.CallOperatinTransaction(DynamicObject[] objs)
在 Kingdee.BOS.App.Core.AbstractOprerationService.DoExcete()
在 Kingdee.BOS.App.Core.AbstractOprerationService.Excute(DynamicObject[] dataEntities)
在 Kingdee.BOS.App.Core.SaveService.Save(Context ctx, BusinessInfo info, DynamicObject[] dataEntities, OperateOption option, String operationNumber)
Exception rethrown at [0]:
在 Kingdee.BOS.ServiceHelper.BusinessDataServiceHelper.Save(Context ctx, BusinessInfo businessInfo, DynamicObject dataObject, OperateOption option, String operationNumber)
在 Kingdee.BOS.Model.Bill.BillModel.Save(OperateOption option)
在 Kingdee.BOS.Business.Bill.Operation.Save.ExecuteBillOperation(OperateOption option)
在 Kingdee.BOS.Core.DynamicForm.AbstractDynamicFormOperation.Operation(CallBackWfAfterOperation callbackwf, IOperationResult result)
希望总部的老师可以远程支持下!QQ749885858!!!!!!!!!!!!!!!!!!!
推荐阅读