8 files modified
1 files added
| | |
| | | @ExcelProperty("是否制证") |
| | | private String userType; |
| | | |
| | | /** |
| | | * 制证时间 |
| | | */ |
| | | @ColumnWidth(10) |
| | | @ExcelProperty("制证时间") |
| | | private String userPaperTime; |
| | | |
| | | |
| | | } |
| | |
| | | ELT(sar.audit_status,"待审核","审核通过","审核不通过") auditStatus, |
| | | sar.audit_time auditTime, |
| | | sar.audit_detail auditDetail, |
| | | if(bu.user_type=6,"是","否") userType |
| | | if(bu.user_type=6,"是","否") userType, |
| | | DATE_FORMAT(bu.paper_time,'%Y-%m-%d') as userPaperTime |
| | | FROM |
| | | sys_accreditation_records sar |
| | | left join |
| | |
| | | 1=1 |
| | | and bu.status = 1 |
| | | and bu.is_deleted = 0 |
| | | <if test="accreditationRecords.userPaperTime != null and accreditationRecords.userPaperTime !=''"> |
| | | AND DATE_FORMAT(bu.paper_time,'%Y-%m-%d') = #{accreditationRecords.userPaperTime} |
| | | </if> |
| | | <if test="accreditationRecords.deptName!=null and accreditationRecords.deptName!=''"> |
| | | and bt.dept_name like concat('%', #{accreditationRecords.deptName},'%') |
| | | </if> |
| | |
| | | @ApiOperation(value = "删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | CacheUtil.clear(SYS_CACHE); |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | | list.forEach(id -> { |
| | | //内网同步 |
| | | String s1 = "update blade_dept set is_deleted = 1 where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(deptService.removeDept(ids)); |
| | | } |
| | | |
| | |
| | | return R.status(userWxService.removeUser(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 导出用户 |
| | | */ |
| | | @GetMapping("export-user") |
| | | @ApiOperationSupport(order = 13) |
| | | @ApiOperation(value = "导出用户", notes = "传入user") |
| | | public void exportUser(@ApiIgnore @RequestParam Map<String, Object> user, BladeUser bladeUser, HttpServletResponse response) { |
| | | List<UserWxExcel> list = userWxService.exportUser(user); |
| | | ExcelUtil.export(response, "小程序用户数据" + DateUtil.time(), "用户数据表", list, UserWxExcel.class); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.system.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * UserExcel |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class UserWxExcel implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ExcelProperty("企业名称*") |
| | | private String deptId; |
| | | |
| | | // @ColumnWidth(15) |
| | | // @ExcelProperty("警号*") |
| | | // private String code; |
| | | |
| | | @ColumnWidth(10) |
| | | @ExcelProperty("姓名*") |
| | | private String realName; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("联系电话") |
| | | private String phone; |
| | | |
| | | @ExcelProperty("身份证号*") |
| | | private String cardid; |
| | | |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.entity.UserWx; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.excel.UserWxExcel; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface UserWxMapper extends BaseMapper<UserWx> { |
| | | UserWx getUserWx(String tenantId, String account, String password); |
| | |
| | | List<String> getDeptName(@Param("deptId") String deptId); |
| | | |
| | | UserVO getUserDetailById(Long id); |
| | | |
| | | List<UserWxExcel> exportUser(@Param("obj") Map<String, Object> param); |
| | | } |
| | |
| | | where bu.is_deleted = 0 |
| | | and bu.id = #{id} |
| | | </select> |
| | | <select id="exportUser" resultType="org.springblade.modules.system.excel.UserWxExcel"> |
| | | SELECT |
| | | bu.id, |
| | | bd.dept_name AS deptId, |
| | | bu.real_name, |
| | | bu.phone, |
| | | bu.cardid |
| | | FROM |
| | | blade_user_wx bu |
| | | LEFT JOIN blade_dept bd ON bu.dept_id = bd.id |
| | | where bu.is_deleted = 0 |
| | | <if test="obj.account != null and obj.account != ''"> |
| | | AND bu.account LIKE CONCAT('%',#{obj.account},'%') |
| | | </if> |
| | | <if test="obj.realName != null and obj.realName != ''"> |
| | | AND bu.real_name LIKE CONCAT('%',#{obj.realName},'%') |
| | | </if> |
| | | <if test="obj.deptId != null and obj.deptId != ''"> |
| | | AND bu.dept_id = #{obj.deptId} |
| | | </if> |
| | | <if test="obj.cardid != null and obj.cardid != ''"> |
| | | and bu.cardid like concat('%', #{obj.cardid},'%') |
| | | </if> |
| | | ORDER BY bu.id desc |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.entity.UserWx; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.excel.UserWxExcel; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface IUserWxService extends BaseService<UserWx> { |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | boolean removeUser(String userIds); |
| | | |
| | | List<UserWxExcel> exportUser(Map<String, Object> user); |
| | | } |
| | |
| | | import org.springblade.modules.system.entity.Role; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.entity.UserWx; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.excel.UserWxExcel; |
| | | import org.springblade.modules.system.mapper.UserWxMapper; |
| | | import org.springblade.modules.system.service.IRoleService; |
| | | import org.springblade.modules.system.service.IUserWxService; |
| | |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | |
| | | } |
| | | return deleteLogic(Func.toLongList(userIds)); |
| | | } |
| | | |
| | | @Override |
| | | public List<UserWxExcel> exportUser(Map<String, Object> param) { |
| | | List<UserWxExcel> userList = baseMapper.exportUser(param); |
| | | return userList; |
| | | } |
| | | } |