| | |
| | | import com.matrix.system.hive.dao.ShoppingGoodsDao; |
| | | import com.matrix.system.hive.dao.SysProjUseDao; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.hive.plugin.message.StringUtil; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.service.MoneyCardUseService; |
| | | import com.matrix.system.hive.service.SysProjUseService; |
| | |
| | | |
| | | List<ExcelSheetPO> excelSheetPOList = ExcelUtil.readExcel(saveFile, null, null); |
| | | |
| | | /* |
| | | |
| | | //项目资料导入 |
| | | List<List<Object>> dataList = excelSheetPOList.get(0).getDataList(); |
| | | List<SysProjUse> projUseList = new ArrayList<>(); |
| | |
| | | //套餐资料导入=======end=== |
| | | |
| | | |
| | | */ |
| | | //充值卡资料导入 |
| | | List<List<Object>> cardList = excelSheetPOList.get(2).getDataList(); |
| | | List<MoneyCardUse> cardUseArrayList = new ArrayList<>(); |
| | |
| | | Object tel = objects.get(1); |
| | | if (tel != null) { |
| | | String telStr = tel.toString(); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr,sysUsers.getCompanyId()); |
| | | if (vipInfo == null) { |
| | | vipInfo = new SysVipInfo(); |
| | | vipInfo.setShopId(sysUsers.getShopId()); |
| | |
| | | Object tel = objects.get(1); |
| | | if (tel != null) { |
| | | String telStr = tel.toString(); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr,sysUsers.getCompanyId()); |
| | | if (vipInfo == null) { |
| | | vipInfo = new SysVipInfo(); |
| | | vipInfo.setShopId(sysUsers.getShopId()); |
| | |
| | | vipInfoDao.insert(vipInfo); |
| | | } |
| | | String goodNo = String.valueOf(objects.get(3)); |
| | | String goodName = String.valueOf(objects.get(2)).trim(); |
| | | |
| | | |
| | | ShoppingGoods goods = shoppingGoodsDao.findByCode(goodNo); |
| | | |
| | | String goodName = String.valueOf(objects.get(2)).trim(); |
| | | if("储值卡".equals(goodName)){ |
| | | goods= shoppingGoodsDao.selectVipCzGoods(); |
| | | } |
| | | |
| | | |
| | | if (goods != null || "储值卡".equals(goodName)) { |
| | | |
| | | moneyCardUse.setVipId(vipInfo.getId()); |