- 问题描述:调整其他入库文件和其他出库文件时,无法输入或维护文件中的保质期信息;
- 问题分析:客户存货前未启用保质期管理,后通过数据库语句启用保质期管理,导致历史文件保质期信息缺失;
- 解决方案:通过库存信息查询相应的仓储账户,找到相应的仓储文件,更新相应的仓储文件数据表,更新库存记录表、库存库存表、现货汇总表、月度库存账单;
- 操作样例:如下代码块; --rdrecords08 其他入库单表 --cInvCode 存货编码 --dMadeDate 生产日期 --iExpiratDateCalcu 有效期计算方法 --cMassUnit 保质期单位 --cExpirationdate 有效期至 --iMassDate 保质期天数 --dVDate 失效日期 select * from rdrecords08 where cBatch = '3412762076' update rdrecords08 set dMadeDate = '2021-07-19',iExpiratDateCalcu = '2',cMassUnit = '3',cExpirationdate = '2022-07-19',iMassDate = '365' , dVDate = '2022-07-19'where cBatch = '3412762076' and cInvCode = 'B13174797' --rdrecords09 其他出库单表 --cInvCode 存货编码 --dMadeDate 生产日期 --iExpiratDateCalcu 有效期计算方法 --cMassUnit 保质期单位 --cExpirationdate 有效期至 --iMassDate 保质期天数 --dVDate 失效日期 select * from rdrecords09 where cBatch = '3412762076' update rdrecords09 set dMadeDate = '2021-07-19',iExpiratDateCalcu = '2',cMassUnit = '3',cExpirationdate = '2022-07-19',iMassDate = '365' , dVDate = '2022-07-19'where cBatch = '3412762076' and cInvCode = 'B13174797' --InvPosition 库存货位记录表 --iExpiratDateCalcu 有效期计算方法 --dExpirationdate 有效期计算项 --cExpirationdate 有效期至 --dVDate 失效日期 --dMadeDate 生产日期 --iMassDate 保质期天数 --cMassUnit 保质期单位 select * from InvPosition where cBatch = '3412762076' and cInvCode = 'B13174797' update InvPosition set iExpiratDateCalcu = '2',dExpirationdate = '2021-07-19',cExpirationdate = '2022-07-19',dVDate = '2022-07-19',dMadeDate = '2021-07-19',iMassDate = '365', cMassUnit = '3' where cBatch = '3412762076' and cInvCode = 'B13174797' --InvPositionSum 存货位存量表 --iExpiratDateCalcu 有效期计算方法 --dExpirationdate 有效期计算项 --cExpirationdate 有效期至 --dVDate 失效日期 --dMadeDate 生产日期 --iMassDate 保质期天数 --cMassUnit 保质期单位 update InvPositionSum set iExpiratDateCalcu = '2',dExpirationdate = '2021-07-19',cExpirationdate = '2022-07-19',dVDate = '2022-07-19',dMadeDate = '2021-07-19',iMassDate = '365', cMassUnit = '3' where cBatch = '3412762076' and cInvCode = 'B13174797' --CurrentStock 现有汇总表 --iExpiratDateCalcu 有效期计算方法 --dExpirationdate 有效期计算项 --cExpirationdate 有效期至 --dVDate 失效日期 --dMdate 生产日期 --iMassDate 保质期天数 --cMassUnit 保质期单位 select * from CurrentStock where cBatch = '3412762076' and cInvCode = 'B13174797' update CurrentStock set iExpiratDateCalcu = '2',dExpirationdate = '2021-07-19',cExpirationdate = '2022-07-19',dVDate = '2022-07-19',dMdate = '2021-07-19',iMassDate = '365', cMassUnit = '3' where cBatch = '3412762076' and cInvCode = 'B13174797' /* 库存月度账表查询无数据 --ST_MonthAccount 月度库存账表 --iExpiratDateCalcu 有效期计算方法 --dExpirationdate 有效期计算项 --cExpirationdate 有效期至 --dVDate 失效日期 --dMdate 生产日期 --iMassDate 保质期天数 --cMassUnit 保质期单位 select * from ST_MonthAccount where cBatch = '3412762076' and cInvCode = 'B13174797' update ST_MonthAccount set iExpiratDateCalcu = '2',dExpirationdate = '2021-07-19',cExpirationdate = '2022-07-19',dVDate = '2022-07-19',dMdate = '2021-07-19',iMassDate = '365', cMassUnit = '3' where cBatch = '3412762076' and cInvCode = 'B13174797' */