Index: ssts-web/src/test/java/test/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerTests.java =================================================================== diff -u -r22634 -r25146 --- ssts-web/src/test/java/test/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerTests.java (.../InvoiceManagerTests.java) (revision 22634) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerTests.java (.../InvoiceManagerTests.java) (revision 25146) @@ -373,6 +373,13 @@ disposableGoodsStock.setGoodsBatchs(batchList); disposableGoodsStock.recalculateAmount(); objectDao.saveOrUpdate(disposableGoodsStock); + + identification.setAncestorId(identification.getId()); + identification22.setAncestorId(identification22.getId()); + identification2.setAncestorId(identification2.getId()); + objectDao.update(identification); + objectDao.update(identification22); + objectDao.update(identification2); } public void createInvoiceGoods(){} Index: ssts-web/src/test/java/test/forgon/disinfectsystem/reports/TestDepartmentMonthDetail.java =================================================================== diff -u -r23840 -r25146 --- ssts-web/src/test/java/test/forgon/disinfectsystem/reports/TestDepartmentMonthDetail.java (.../TestDepartmentMonthDetail.java) (revision 23840) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/reports/TestDepartmentMonthDetail.java (.../TestDepartmentMonthDetail.java) (revision 25146) @@ -413,6 +413,18 @@ disposableGoodsStock2.recalculateAmount(); objectDao.saveOrUpdate(disposableGoodsStock2); + for (DisposableGoodsBatchStock disposableGoodsBatchStock : batchList) { + for (DisposableGoodsIdentification identification : disposableGoodsBatchStock.getIdentifications()) { + identification.setAncestorId(identification.getId()); + objectDao.update(identification); + } + } + for (DisposableGoodsBatchStock disposableGoodsBatchStock : batchList2) { + for (DisposableGoodsIdentification identification : disposableGoodsBatchStock.getIdentifications()) { + identification.setAncestorId(identification.getId()); + objectDao.update(identification); + } + } } /** Index: ssts-web/src/test/java/test/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerForComboFormTests.java =================================================================== diff -u -r24252 -r25146 --- ssts-web/src/test/java/test/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerForComboFormTests.java (.../InvoiceManagerForComboFormTests.java) (revision 24252) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerForComboFormTests.java (.../InvoiceManagerForComboFormTests.java) (revision 25146) @@ -381,6 +381,13 @@ disposableGoodsStock.setGoodsBatchs(batchList); disposableGoodsStock.recalculateAmount(); objectDao.saveOrUpdate(disposableGoodsStock); + + identification.setAncestorId(identification.getId()); + identification22.setAncestorId(identification22.getId()); + identification2.setAncestorId(identification2.getId()); + objectDao.update(identification); + objectDao.update(identification22); + objectDao.update(identification2); } public void createInvoiceGoods(){} Index: ssts-web/src/main/webapp/dataUpdater/sqls/4.9.26_4.9.27.sql =================================================================== diff -u --- ssts-web/src/main/webapp/dataUpdater/sqls/4.9.26_4.9.27.sql (revision 0) +++ ssts-web/src/main/webapp/dataUpdater/sqls/4.9.26_4.9.27.sql (revision 25146) @@ -0,0 +1,2 @@ +update DisposableGoodsIdentification set ancestorId=srcIdentification where ancestorId is null and srcIdentification is not null; +update DisposableGoodsIdentification set ancestorId=id where ancestorId is null; \ No newline at end of file Index: ssts-web/src/test/java/test/forgon/disinfectsystem/invoicemanager/service/DataGenerater.java =================================================================== diff -u -r20798 -r25146 --- ssts-web/src/test/java/test/forgon/disinfectsystem/invoicemanager/service/DataGenerater.java (.../DataGenerater.java) (revision 20798) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/invoicemanager/service/DataGenerater.java (.../DataGenerater.java) (revision 25146) @@ -202,6 +202,11 @@ Assert.assertNotNull(objectDao); disposableGoodsStock.recalculateAmount(); objectDao.saveOrUpdate(disposableGoodsStock); + + for (DisposableGoodsIdentification identification : identificationList) { + identification.setAncestorId(identification.getId()); + objectDao.update(identification); + } } } } else if (type.equals("器械包")) {