共享文档

-- 按照行 UPDATE fieia.ia_ledger_b_x_sgaccount SET dr=2 WHERE id in ( SELECT id FROM fieia.ia_ledger_b WHERE fi_event_code='IA03' and dr=0 and accent

  -- 按照行
  UPDATE fieia.ia_ledger_b_x_sgaccount SET dr=2 WHERE id in (
  SELECT id FROM fieia.ia_ledger_b WHERE fi_event_code='IA03' and dr=0 and accentity_id='2124004196065738773' and src_bill_row_id in (
  SELECT b.id FROM 
  ustock.st_salesouts b 
  LEFT JOIN ustock.st_salesout a on b.imainid = a.id
  LEFT JOIN ustock.salesouts_character_define_1 bf on bf.id=b.salesOutsDefineCharacter WHERE bf.vcol12 ='UKID数据')
  );
  
  UPDATE fieia.ia_ledger_b SET dr=2 WHERE id in (
  SELECT id FROM fieia.ia_ledger_b_x_sgaccount WHERE dr=2
  );sql

DELETE FROM ustock.st_salesouts WHERE out_sys_lineid="185110283";

-- 整单

SELECT a.code FROM

ustock.st_salesouts b

LEFT JOIN ustock.st_salesout a on b.imainid = a.id

LEFT JOIN ustock.salesouts_character_define_1 bf on bf.id=b.salesOutsDefineCharacter WHERE bf.vcol12 ='319372451' ;

UPDATE fieia.ia_ledger_b_x_sgaccount SET dr=2 WHERE id in (

SELECT id FROM fieia.ia_ledger_b WHERE fi_event_code='IA03' and dr=0 and accentity_id='2124004196065738773' and src_bill_no in ('单据号')

);

UPDATE fieia.ia_ledger_b SET dr=2 WHERE id in (

SELECT id FROM fieia.ia_ledger_b_x_sgaccount WHERE dr=2

);

  • jdk
  • maven
  • idea
  • api工具
  • git
  • 文本工具
  • 向日葵
  • toDesk
SELECT DISTINCT
 invent.`name` AS 库存组织,-- main.iOrgid AS 库存组织id,
 type.`name` AS 交易类型,-- main.iBusType AS 交易类型id,
 main.`code` AS 单据编号,
 main.vouchdate AS 单据日期,-- detail.id AS 明细行id,
-- detail.iProductid AS 物料id,
 pro.`code` AS 物料编码,
 pro.`name` AS 物料名称,
 detail.qty AS 数量,
 fb.org_price AS 单价,
 fb.org_amount AS 金额,
 def.vcol7 AS 外部来源行号,
 def.vcol14 AS 外部来源订单类型,
 cust.`name` AS 存货分类,-- def.vcol16 AS 存货分类,
 def.vcol6 AS 外部来源关联行号,
 def.vcol10 AS 外部来源单据号,
 def.vcol12 AS 外部来源关联单据号,
 def.vcol8 AS 外部来源关联订单类型 
FROM
 ustock.st_othinrecord main
 LEFT JOIN iuap_apdoc_basedoc.org_inventory invent ON main.iOrgid = invent.id 
 AND invent.dr = 0
 LEFT JOIN iuap_apdoc_basedoc.bd_transtype type ON main.iBusType = type.id 
 AND type.dr = 0
 LEFT JOIN ustock.st_othinrecords detail ON main.id = detail.iMainId
 LEFT JOIN iuap_apdoc_coredoc.product pro ON detail.iProductid = pro.id 
 AND pro.iDeleted = 0
 LEFT JOIN ustock.othinrecords_character_define_1 def ON detail.othInRecordsDefineCharacter = def.id
 LEFT JOIN iuap_apdoc_basedoc.bd_cust_doc cust ON def.vcol16 = cust.id 
 AND cust.dr = 0
 LEFT JOIN fieia.ia_ledger_b fb ON detail.id = CAST(fb.src_bill_row_id AS UNSIGNED)
 AND fb.dr = 0 UNION ALL
SELECT DISTINCT
 invent.`name` AS 库存组织,-- main.iOrgid AS 库存组织id,
 type.`name` AS 交易类型,-- main.iBusType AS 交易类型id,
 main.`code` AS 单据编号,
 main.vouchdate AS 单据日期,-- detail.id AS 明细行id,
-- detail.iProductid AS 物料id,
 pro.`code` AS 物料编码,
 pro.`name` AS 物料名称,
 detail.qty AS 数量,
 fb.org_price AS 单价,
 fb.org_amount AS 金额,
 def.vcol7 AS 外部来源行号,
 def.vcol14 AS 外部来源订单类型,
 cust.`name` AS 存货分类,-- def.vcol16 AS 存货分类,
 def.vcol6 AS 外部来源关联行号,
 def.vcol10 AS 外部来源单据号,
 def.vcol12 AS 外部来源关联单据号,
 def.vcol8 AS 外部来源关联订单类型 
FROM
 ustock.st_othoutrecord main
 LEFT JOIN iuap_apdoc_basedoc.org_inventory invent ON main.iOrgid = invent.id 
 AND invent.dr = 0
 LEFT JOIN iuap_apdoc_basedoc.bd_transtype type ON main.iBusType = type.id 
 AND type.dr = 0
 LEFT JOIN ustock.st_othoutrecords detail ON main.id = detail.iMainId
 LEFT JOIN iuap_apdoc_coredoc.product pro ON detail.iProductid = pro.id 
 AND pro.iDeleted = 0
 LEFT JOIN ustock.othoutrecords_character_define_1 def ON detail.othOutRecordsDefineCharacter = def.id
 LEFT JOIN iuap_apdoc_basedoc.bd_cust_doc cust ON def.vcol16 = cust.id 
 AND cust.dr = 0
 LEFT JOIN fieia.ia_ledger_b fb ON detail.id = CAST(fb.src_bill_row_id AS UNSIGNED)
 AND fb.dr = 0;

http://localhost:8080/basedata/jde/savaRole

SELECT
 * 
FROM
 iuap_apcom_workflow.act_hi_taskinst 
WHERE
 ID_ IN (SELECT business_key FROM c_fc_cg_trtjk_db.oa_cas_bip_message WHERE dr = 0 AND message_type = 0) 
 AND LEFT(END_TIME_, 4) != '2069'
 
-- SELECT
-- 	* 
-- FROM
-- 	c_fc_cg_trtjk_db.oa_cas_bip_message
-- WHERE
-- 	dr = 0
-- 	AND modify_time IS NOT NULL
--   AND error LIKE '%手动%'
-- ORDER BY
-- 	modify_time

https://www.doc.liuxn.top/s/4/aqx7tzbf7nt5

LICENSED UNDER CC BY-NC-SA 4.0
Comment