| | |
| | | @Resource |
| | | private TCrmWarehouseMapper crmWarehouseMapper; |
| | | |
| | | @Resource |
| | | private TErpMaintenanceReminderMapper tErpMaintenanceReminderMapper; |
| | | |
| | | |
| | | @Override |
| | | public PageInfo<TErpGoodsVO> pageList(TErpGoodsQuery query, SysUser user) { |
| | |
| | | tErpSupplierWarehousingBatch.setProductionDate(warehousingGoodsNextDto.getProductionDate().atStartOfDay()); |
| | | tErpSupplierWarehousingBatch.setExpiryDate(warehousingGoodsNextDto.getExpiryDate().atStartOfDay()); |
| | | erpSupplierWarehousingBatchMapper.insert(tErpSupplierWarehousingBatch); |
| | | |
| | | if(goods.getMaintenanceInterval()!=null){ |
| | | TErpMaintenanceReminder tErpMaintenanceReminder = new TErpMaintenanceReminder(); |
| | | tErpMaintenanceReminder.setClinicSupplierId(user.getUserId().toString()); |
| | | tErpMaintenanceReminder.setMaintenanceType(1); |
| | | tErpMaintenanceReminder.setWarehousingBatchId(tErpSupplierWarehousingBatch.getId()); |
| | | Integer day = Integer.valueOf(goods.getMaintenanceInterval()); |
| | | // 当前时间+day天 |
| | | LocalDateTime time1 = LocalDateTime.now().plusDays(day); |
| | | tErpMaintenanceReminder.setMaintenanceTime(time1); |
| | | tErpMaintenanceReminderMapper.insert(tErpMaintenanceReminder); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |