-- 形态转换批号属性预置数据
IF NOT EXISTS (SELECT 1 FROM T_BD_LOTCODEITEMENTRY WHERE FENTRYID = 726013709495121920) 
insert into t_bd_lotcodeitementry (FID, FENTRYID, FSEQ, FAPPBILLID, FENTRYENTITYID, FBILLFIELDNAME, FBILLFIELDID)
values (621746542658810880, 726013709495121920, 12, 'im_adjustbill', ' ', '单据头.业务日期', 'biztime');

IF NOT EXISTS (SELECT 1 FROM T_BD_LOTCODEITEMENTRY WHERE FENTRYID = 729605140427983872) 
insert into t_bd_lotcodeitementry (FID, FENTRYID, FSEQ, FAPPBILLID, FENTRYENTITYID, FBILLFIELDNAME, FBILLFIELDID)
values (621756342507518976, 729605140427983872, 12, 'im_adjustbill', 'im_adjustbill', '转换后分录', 'afterentity');

IF NOT EXISTS (SELECT 1 FROM T_BD_LOTCODEITEMENTRY WHERE FENTRYID = 726015344560524288) 
insert into t_bd_lotcodeitementry (FID, FENTRYID, FSEQ, FAPPBILLID, FENTRYENTITYID, FBILLFIELDNAME, FBILLFIELDID)
values (621758342041295872, 726015344560524288, 12, 'im_adjustbill', ' ', '单据头.库管员.业务员编码', 'operator.operatornumber');

IF NOT EXISTS (SELECT 1 FROM T_BD_LOTCODEITEMENTRY WHERE FENTRYID = 728915007626346496) 
insert into t_bd_lotcodeitementry (FID, FENTRYID, FSEQ, FAPPBILLID, FENTRYENTITYID, FBILLFIELDNAME, FBILLFIELDID)
values (621760772179090432, 728915007626346496, 12, 'im_adjustbill', 'afterentity', '转换后分录.项目号.项目编码', 'project1.number');

-- 修复生产入库，领料申请分录描述文字
update T_BD_LOTCODEITEMENTRY set FBILLFIELDNAME = '单据体' where FENTRYID=713706003455349760 and FBILLFIELDNAME = '单据头';
update T_BD_LOTCODEITEMENTRY set FBILLFIELDNAME = '单据体' where FENTRYID=713706003455349761 and FBILLFIELDNAME = '单据头';
