| | |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | query.setRoleType(roleType); |
| | | List<TSysAppUserClinicExport> sysAppUserClinicExports = sysAppUserService.exportListClinic(query); |
| | | for (TSysAppUserClinicExport sysAppUserClinicExport : sysAppUserClinicExports) { |
| | | String lastReminderTime = sysAppUserClinicExport.getLastReminderTime(); |
| | | lastReminderTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(lastReminderTime); |
| | | sysAppUserClinicExport.setLastReminderTime(lastReminderTime); |
| | | } |
| | | // for (TSysAppUserClinicExport sysAppUserClinicExport : sysAppUserClinicExports) { |
| | | // String lastReminderTime = sysAppUserClinicExport.getLastReminderTime(); |
| | | // lastReminderTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(lastReminderTime); |
| | | // sysAppUserClinicExport.setLastReminderTime(lastReminderTime); |
| | | // } |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TSysAppUserClinicExport.class, sysAppUserClinicExports); |
| | | HttpServletResponse response = WebUtils.response(); |
| | | assert response != null; |
| | |
| | | |
| | | List<TSysGoodsExchange> list = sysGoodsExchangeService.list(new LambdaQueryWrapper<TSysGoodsExchange>().eq(TSysGoodsExchange::getGoodsId, goods.getId())); |
| | | int sum = list.stream().mapToInt(TSysGoodsExchange::getGoodsCount).sum(); |
| | | if (goods.getGoodsTotal() < sum) { |
| | | if (Objects.nonNull(goods.getGoodsTotal()) && goods.getGoodsTotal() < sum) { |
| | | return R.fail("商品总数不能小于已兑换数量"); |
| | | } |
| | | if (roleType == 4) { |
| | |
| | | <if test="roleKey != null and roleKey != ''"> |
| | | AND r.role_key like concat('%', #{roleKey}, '%') |
| | | </if> |
| | | AND r.role_id not in (1,2,3,4,5,6) |
| | | order by r.role_sort |
| | | </select> |
| | | |
| | |
| | | tsau.chronic_disease_id,tsau.status,tsau.last_reminder_time,tsau.clinic_id, tsau.create_time, |
| | | tsau.update_time, tsau.create_by,tsau.update_by, tsau.disabled, tsi.lastInspectionTime |
| | | from t_sys_app_user tsau |
| | | left join (select id,app_user_id, max(check_time) as lastInspectionTime from t_sys_inspection limit 1) tsi on tsi.app_user_id = tsau.id |
| | | left join (select app_user_id, max(check_time) as lastInspectionTime from t_sys_inspection group by app_user_id) tsi on tsi.app_user_id = tsau.id |
| | | <where> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tsau.phone like concat('%',#{query.phone},'%') |
| | |
| | | tsau.chronic_disease_id,tsau.status,tsau.last_reminder_time,tsau.clinic_id, tsau.create_time, |
| | | tsau.update_time, tsau.create_by,tsau.update_by, tsau.disabled |
| | | from t_sys_app_user tsau |
| | | left join (select id,app_user_id, max(check_time) as lastInspectionTime from t_sys_inspection limit 1) tsi on tsi.app_user_id = tsau.id |
| | | left join (select app_user_id, max(check_time) as lastInspectionTime from t_sys_inspection group by app_user_id) tsi on tsi.app_user_id = tsau.id |
| | | <where> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tsau.phone like concat('%',#{query.phone},'%') |
| | |
| | | tsau.chronic_disease_id,tsau.status,tsau.last_reminder_time,tsau.clinic_id, tsau.create_time, |
| | | tsau.update_time, tsau.create_by,tsau.update_by, tsau.disabled, tsi.lastInspectionTime |
| | | from t_sys_app_user tsau |
| | | left join (select id,app_user_id, max(check_time) as lastInspectionTime from t_sys_inspection limit 1) tsi on tsi.app_user_id = tsau.id |
| | | left join (select app_user_id, max(check_time) as lastInspectionTime from t_sys_inspection group by app_user_id) tsi on tsi.app_user_id = tsau.id |
| | | <where> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tsau.phone = #{query.phone} |