37 changed files with 2122 additions and 4 deletions
@ -0,0 +1,32 @@ |
|||||
|
package com.elink.esua.epdc.controller; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.service.CustomConsultService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @author: qushutong |
||||
|
* @Date: 2020/3/2 16:12 |
||||
|
* @Description: 客服咨询相关 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("custom/consult") |
||||
|
public class ApiCustomConsultController { |
||||
|
|
||||
|
@Autowired |
||||
|
private CustomConsultService customConsultService; |
||||
|
/*** |
||||
|
* 首页咨询入口是否开启 |
||||
|
* @param |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.lang.String> |
||||
|
* @author qushutong |
||||
|
* @date 2020/3/2 16:03 |
||||
|
*/ |
||||
|
@GetMapping("checkConsultFlag") |
||||
|
public Result<String> checkConsultFlag(){ |
||||
|
return customConsultService.getSwitchByNewest(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.elink.esua.epdc.service; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
|
||||
|
/** |
||||
|
* @author: qushutong |
||||
|
* @Date: 2020/3/2 16:16 |
||||
|
* @Description: 咨询相关 |
||||
|
*/ |
||||
|
public interface CustomConsultService { |
||||
|
|
||||
|
/*** |
||||
|
* 咨询公示,首页开关 |
||||
|
* @param |
||||
|
* @return java.lang.String |
||||
|
* @author qushutong |
||||
|
* @date 2020/3/2 15:53 |
||||
|
*/ |
||||
|
Result<String> getSwitchByNewest(); |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.elink.esua.epdc.service.impl; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.feign.CustomFeignClient; |
||||
|
import com.elink.esua.epdc.service.CustomConsultService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @author: qushutong |
||||
|
* @Date: 2020/3/2 16:16 |
||||
|
* @Description: 咨询相关 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class CustomConsultServiceImpl implements CustomConsultService { |
||||
|
@Autowired |
||||
|
private CustomFeignClient customFeignClient; |
||||
|
|
||||
|
@Override |
||||
|
public Result<String> getSwitchByNewest() { |
||||
|
return customFeignClient.getSwitchByNewest(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,76 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.dto.consult; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 咨询,网格员信息表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ConsultConfDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 是否公示网格员信息 0:否,1:是 |
||||
|
*/ |
||||
|
private String gridOperatorFlag; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0:否,1:是 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,76 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.dto.consult; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 职责分类管理 |
||||
|
* |
||||
|
* @author qu elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GridOperatorDutyCategoryDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 权限编码(1.点赞,2.吐槽) |
||||
|
*/ |
||||
|
private String dutyCategoryName; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0:否,1:是 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,146 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.dto.consult; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 网格员信息 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GridOperatorInfoDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 用户姓名 |
||||
|
*/ |
||||
|
private String realName; |
||||
|
|
||||
|
/** |
||||
|
* 性别 0女 1男 |
||||
|
*/ |
||||
|
private String sex; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 联系电话 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 身份证号 |
||||
|
*/ |
||||
|
private String identityNo; |
||||
|
|
||||
|
/** |
||||
|
* 头像访问地址 |
||||
|
*/ |
||||
|
private String faceImg; |
||||
|
|
||||
|
/** |
||||
|
* 工作单位 |
||||
|
*/ |
||||
|
private String workUnit; |
||||
|
|
||||
|
/** |
||||
|
* 职责类别id |
||||
|
*/ |
||||
|
private String dutyCategoryId; |
||||
|
|
||||
|
/** |
||||
|
* 前端收费展示 0否 1是 |
||||
|
*/ |
||||
|
private String showFlag; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 居住网格id |
||||
|
*/ |
||||
|
private Long deptId; |
||||
|
|
||||
|
/** |
||||
|
* 父所有部门 |
||||
|
*/ |
||||
|
private String parentDeptIds; |
||||
|
|
||||
|
/** |
||||
|
* 父所有部门 |
||||
|
*/ |
||||
|
private String parentDeptNames; |
||||
|
|
||||
|
/** |
||||
|
* 所有部门ID |
||||
|
*/ |
||||
|
private String[] allDeptIds; |
||||
|
|
||||
|
/** |
||||
|
* 所有部门名称 |
||||
|
*/ |
||||
|
private String allDeptNames; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0:否,1:是 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,105 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.controller; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.elink.esua.epdc.dto.consult.ConsultConfDTO; |
||||
|
import com.elink.esua.epdc.modules.consult.excel.ConsultConfExcel; |
||||
|
import com.elink.esua.epdc.modules.consult.service.ConsultConfService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 咨询,网格员信息表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("consultconf") |
||||
|
public class ConsultConfController { |
||||
|
|
||||
|
@Autowired |
||||
|
private ConsultConfService consultConfService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<ConsultConfDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<ConsultConfDTO> page = consultConfService.page(params); |
||||
|
return new Result<PageData<ConsultConfDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<ConsultConfDTO> get(@PathVariable("id") String id){ |
||||
|
ConsultConfDTO data = consultConfService.get(id); |
||||
|
return new Result<ConsultConfDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody ConsultConfDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
consultConfService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody ConsultConfDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
consultConfService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
consultConfService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<ConsultConfDTO> list = consultConfService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, ConsultConfExcel.class); |
||||
|
} |
||||
|
|
||||
|
/*** |
||||
|
* 首页咨询入口是否开启 |
||||
|
* @param |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.lang.String> |
||||
|
* @author qushutong |
||||
|
* @date 2020/3/2 16:03 |
||||
|
*/ |
||||
|
@GetMapping("checkConsultFlag") |
||||
|
public Result<String> checkConsultFlag(){ |
||||
|
return new Result<String>().ok(consultConfService.getSwitchByNewest()); |
||||
|
} |
||||
|
} |
@ -0,0 +1,99 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.controller; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.elink.esua.epdc.dto.consult.GridOperatorDutyCategoryDTO; |
||||
|
import com.elink.esua.epdc.modules.consult.excel.GridOperatorDutyCategoryExcel; |
||||
|
import com.elink.esua.epdc.modules.consult.service.GridOperatorDutyCategoryService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.HashMap; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 职责分类管理 |
||||
|
* |
||||
|
* @author qu elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("gridoperatordutycategory") |
||||
|
public class GridOperatorDutyCategoryController { |
||||
|
|
||||
|
@Autowired |
||||
|
private GridOperatorDutyCategoryService gridOperatorDutyCategoryService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<GridOperatorDutyCategoryDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<GridOperatorDutyCategoryDTO> page = gridOperatorDutyCategoryService.page(params); |
||||
|
return new Result<PageData<GridOperatorDutyCategoryDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<GridOperatorDutyCategoryDTO> get(@PathVariable("id") String id){ |
||||
|
GridOperatorDutyCategoryDTO data = gridOperatorDutyCategoryService.get(id); |
||||
|
return new Result<GridOperatorDutyCategoryDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody GridOperatorDutyCategoryDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
gridOperatorDutyCategoryService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody GridOperatorDutyCategoryDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
gridOperatorDutyCategoryService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
gridOperatorDutyCategoryService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<GridOperatorDutyCategoryDTO> list = gridOperatorDutyCategoryService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, GridOperatorDutyCategoryExcel.class); |
||||
|
} |
||||
|
@GetMapping("getAllDutyCat") |
||||
|
public Result<List<GridOperatorDutyCategoryDTO>> getAllDutyCat(){ |
||||
|
List<GridOperatorDutyCategoryDTO> list = gridOperatorDutyCategoryService.list(new HashMap<>()); |
||||
|
return new Result<List<GridOperatorDutyCategoryDTO>>().ok(list); |
||||
|
} |
||||
|
} |
@ -0,0 +1,101 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.controller; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.elink.esua.epdc.dto.consult.GridOperatorInfoDTO; |
||||
|
import com.elink.esua.epdc.modules.consult.excel.GridOperatorInfoExcel; |
||||
|
import com.elink.esua.epdc.modules.consult.service.GridOperatorInfoService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 网格员信息 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("gridoperatorinfo") |
||||
|
public class GridOperatorInfoController { |
||||
|
|
||||
|
@Autowired |
||||
|
private GridOperatorInfoService gridOperatorInfoService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<GridOperatorInfoDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<GridOperatorInfoDTO> page = gridOperatorInfoService.page(params); |
||||
|
return new Result<PageData<GridOperatorInfoDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<GridOperatorInfoDTO> get(@PathVariable("id") String id){ |
||||
|
GridOperatorInfoDTO data = gridOperatorInfoService.get(id); |
||||
|
return new Result<GridOperatorInfoDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody GridOperatorInfoDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
dto.setShowFlag("0"); |
||||
|
gridOperatorInfoService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody GridOperatorInfoDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
gridOperatorInfoService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
gridOperatorInfoService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
@PostMapping("changeShowFlag") |
||||
|
public Result changeShowFlag(@RequestBody GridOperatorInfoDTO dto){ |
||||
|
gridOperatorInfoService.changeShowFlag(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<GridOperatorInfoDTO> list = gridOperatorInfoService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, GridOperatorInfoExcel.class); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.dao; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
||||
|
import com.elink.esua.epdc.modules.consult.entity.ConsultConfEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 咨询,网格员信息表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ConsultConfDao extends BaseDao<ConsultConfEntity> { |
||||
|
|
||||
|
/*** |
||||
|
* 咨询公示,首页开关 |
||||
|
* @param |
||||
|
* @return |
||||
|
* @author qushutong |
||||
|
* @date 2020/3/2 15:56 |
||||
|
*/ |
||||
|
String selectOneSwitchByNewest(); |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.dao; |
||||
|
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
||||
|
import com.elink.esua.epdc.modules.consult.entity.GridOperatorDutyCategoryEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 职责分类管理 |
||||
|
* |
||||
|
* @author qu elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface GridOperatorDutyCategoryDao extends BaseDao<GridOperatorDutyCategoryEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.dao; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
||||
|
import com.elink.esua.epdc.modules.consult.entity.GridOperatorInfoEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 网格员信息 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface GridOperatorInfoDao extends BaseDao<GridOperatorInfoEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 咨询,网格员信息表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("epdc_consult_conf") |
||||
|
public class ConsultConfEntity extends BaseEpdcEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 是否公示网格员信息 0:否,1:是 |
||||
|
*/ |
||||
|
private String gridOperatorFlag; |
||||
|
|
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 职责分类管理 |
||||
|
* |
||||
|
* @author qu elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("epdc_grid_operator_duty_category") |
||||
|
public class GridOperatorDutyCategoryEntity extends BaseEpdcEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 权限编码(1.点赞,2.吐槽) |
||||
|
*/ |
||||
|
private String dutyCategoryName; |
||||
|
|
||||
|
} |
@ -0,0 +1,116 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 网格员信息 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("epdc_grid_operator_info") |
||||
|
public class GridOperatorInfoEntity extends BaseEpdcEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 用户姓名 |
||||
|
*/ |
||||
|
private String realName; |
||||
|
|
||||
|
/** |
||||
|
* 性别 0女 1男 |
||||
|
*/ |
||||
|
private String sex; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 联系电话 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 身份证号 |
||||
|
*/ |
||||
|
private String identityNo; |
||||
|
|
||||
|
/** |
||||
|
* 头像访问地址 |
||||
|
*/ |
||||
|
private String faceImg; |
||||
|
|
||||
|
/** |
||||
|
* 工作单位 |
||||
|
*/ |
||||
|
private String workUnit; |
||||
|
|
||||
|
/** |
||||
|
* 职责类别id |
||||
|
*/ |
||||
|
private String dutyCategoryId; |
||||
|
|
||||
|
/** |
||||
|
* 前端是否展示 0否 1是 |
||||
|
*/ |
||||
|
private String showFlag; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 居住网格id |
||||
|
*/ |
||||
|
private Long deptId; |
||||
|
|
||||
|
/** |
||||
|
* 父所有部门 |
||||
|
*/ |
||||
|
private String parentDeptIds; |
||||
|
|
||||
|
/** |
||||
|
* 父所有部门 |
||||
|
*/ |
||||
|
private String parentDeptNames; |
||||
|
|
||||
|
/** |
||||
|
* 所有部门ID |
||||
|
*/ |
||||
|
private String allDeptIds; |
||||
|
|
||||
|
/** |
||||
|
* 所有部门名称 |
||||
|
*/ |
||||
|
private String allDeptNames; |
||||
|
|
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 咨询,网格员信息表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ConsultConfExcel { |
||||
|
|
||||
|
@Excel(name = "主键") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "是否公示网格员信息 0:否,1:是") |
||||
|
private String gridOperatorFlag; |
||||
|
|
||||
|
@Excel(name = "删除标识 0:否,1:是") |
||||
|
private String delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 职责分类管理 |
||||
|
* |
||||
|
* @author qu elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GridOperatorDutyCategoryExcel { |
||||
|
|
||||
|
@Excel(name = "主键") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "权限编码(1.点赞,2.吐槽)") |
||||
|
private String dutyCategoryName; |
||||
|
|
||||
|
@Excel(name = "删除标识 0:否,1:是") |
||||
|
private String delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,101 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 网格员信息 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GridOperatorInfoExcel { |
||||
|
|
||||
|
@Excel(name = "主键") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "用户姓名") |
||||
|
private String realName; |
||||
|
|
||||
|
@Excel(name = "性别 0女 1男") |
||||
|
private String sex; |
||||
|
|
||||
|
@Excel(name = "排序") |
||||
|
private Integer sort; |
||||
|
|
||||
|
@Excel(name = "联系电话") |
||||
|
private String mobile; |
||||
|
|
||||
|
@Excel(name = "身份证号") |
||||
|
private String identityNo; |
||||
|
|
||||
|
@Excel(name = "头像访问地址") |
||||
|
private String faceImg; |
||||
|
|
||||
|
@Excel(name = "工作单位") |
||||
|
private String workUnit; |
||||
|
|
||||
|
@Excel(name = "职责类别id") |
||||
|
private String dutyCategoryId; |
||||
|
|
||||
|
@Excel(name = "前端收费展示 0否 1是") |
||||
|
private String showFlag; |
||||
|
|
||||
|
@Excel(name = "备注") |
||||
|
private String remark; |
||||
|
|
||||
|
@Excel(name = "居住网格id") |
||||
|
private Long deptId; |
||||
|
|
||||
|
@Excel(name = "父所有部门") |
||||
|
private String parentDeptIds; |
||||
|
|
||||
|
@Excel(name = "父所有部门") |
||||
|
private String parentDeptNames; |
||||
|
|
||||
|
@Excel(name = "所有部门ID") |
||||
|
private String allDeptIds; |
||||
|
|
||||
|
@Excel(name = "所有部门名称") |
||||
|
private String allDeptNames; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "删除标识 0:否,1:是") |
||||
|
private String delFlag; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.redis; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 咨询,网格员信息表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class ConsultConfRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.redis; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 职责分类管理 |
||||
|
* |
||||
|
* @author qu elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class GridOperatorDutyCategoryRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.redis; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 网格员信息 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class GridOperatorInfoRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,104 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.service; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.dto.consult.ConsultConfDTO; |
||||
|
import com.elink.esua.epdc.modules.consult.entity.ConsultConfEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 咨询,网格员信息表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
public interface ConsultConfService extends BaseService<ConsultConfEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<ConsultConfDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
PageData<ConsultConfDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<ConsultConfDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
List<ConsultConfDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return ConsultConfDTO |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
ConsultConfDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
void save(ConsultConfDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
void update(ConsultConfDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/*** |
||||
|
* 咨询公示,首页开关 |
||||
|
* @param |
||||
|
* @return java.lang.String |
||||
|
* @author qushutong |
||||
|
* @date 2020/3/2 15:53 |
||||
|
*/ |
||||
|
String getSwitchByNewest(); |
||||
|
} |
@ -0,0 +1,96 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.service; |
||||
|
|
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.dto.consult.GridOperatorDutyCategoryDTO; |
||||
|
import com.elink.esua.epdc.modules.consult.entity.GridOperatorDutyCategoryEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 职责分类管理 |
||||
|
* |
||||
|
* @author qu elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
public interface GridOperatorDutyCategoryService extends BaseService<GridOperatorDutyCategoryEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<GridOperatorDutyCategoryDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
PageData<GridOperatorDutyCategoryDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<GridOperatorDutyCategoryDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
List<GridOperatorDutyCategoryDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return GridOperatorDutyCategoryDTO |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
GridOperatorDutyCategoryDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
void save(GridOperatorDutyCategoryDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
void update(GridOperatorDutyCategoryDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,103 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.service; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.dto.consult.GridOperatorInfoDTO; |
||||
|
import com.elink.esua.epdc.modules.consult.entity.GridOperatorInfoEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 网格员信息 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
public interface GridOperatorInfoService extends BaseService<GridOperatorInfoEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<GridOperatorInfoDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
PageData<GridOperatorInfoDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<GridOperatorInfoDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
List<GridOperatorInfoDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return GridOperatorInfoDTO |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
GridOperatorInfoDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
void save(GridOperatorInfoDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
void update(GridOperatorInfoDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-03-02 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
/** |
||||
|
* @Description 是否展示 |
||||
|
* @Author songyunpeng |
||||
|
* @Date 2020/3/2 |
||||
|
* @Param [dto] |
||||
|
* @return void |
||||
|
**/ |
||||
|
void changeShowFlag(GridOperatorInfoDTO dto); |
||||
|
} |
@ -0,0 +1,109 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
||||
|
import com.elink.esua.epdc.dto.consult.ConsultConfDTO; |
||||
|
import com.elink.esua.epdc.modules.consult.dao.ConsultConfDao; |
||||
|
import com.elink.esua.epdc.modules.consult.entity.ConsultConfEntity; |
||||
|
import com.elink.esua.epdc.modules.consult.redis.ConsultConfRedis; |
||||
|
import com.elink.esua.epdc.modules.consult.service.ConsultConfService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 咨询,网格员信息表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class ConsultConfServiceImpl extends BaseServiceImpl<ConsultConfDao, ConsultConfEntity> implements ConsultConfService { |
||||
|
|
||||
|
@Autowired |
||||
|
private ConsultConfRedis consultConfRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<ConsultConfDTO> page(Map<String, Object> params) { |
||||
|
IPage<ConsultConfEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, ConsultConfDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<ConsultConfDTO> list(Map<String, Object> params) { |
||||
|
List<ConsultConfEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, ConsultConfDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<ConsultConfEntity> getWrapper(Map<String, Object> params) { |
||||
|
String id = (String) params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<ConsultConfEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ConsultConfDTO get(String id) { |
||||
|
ConsultConfEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, ConsultConfDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(ConsultConfDTO dto) { |
||||
|
ConsultConfEntity entity = ConvertUtils.sourceToTarget(dto, ConsultConfEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(ConsultConfDTO dto) { |
||||
|
ConsultConfEntity entity = ConvertUtils.sourceToTarget(dto, ConsultConfEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getSwitchByNewest() { |
||||
|
return baseDao.selectOneSwitchByNewest(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,104 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
||||
|
import com.elink.esua.epdc.dto.consult.GridOperatorDutyCategoryDTO; |
||||
|
import com.elink.esua.epdc.modules.consult.dao.GridOperatorDutyCategoryDao; |
||||
|
import com.elink.esua.epdc.modules.consult.entity.GridOperatorDutyCategoryEntity; |
||||
|
import com.elink.esua.epdc.modules.consult.redis.GridOperatorDutyCategoryRedis; |
||||
|
import com.elink.esua.epdc.modules.consult.service.GridOperatorDutyCategoryService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 职责分类管理 |
||||
|
* |
||||
|
* @author qu elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class GridOperatorDutyCategoryServiceImpl extends BaseServiceImpl<GridOperatorDutyCategoryDao, GridOperatorDutyCategoryEntity> implements GridOperatorDutyCategoryService { |
||||
|
|
||||
|
@Autowired |
||||
|
private GridOperatorDutyCategoryRedis gridOperatorDutyCategoryRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<GridOperatorDutyCategoryDTO> page(Map<String, Object> params) { |
||||
|
IPage<GridOperatorDutyCategoryEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, GridOperatorDutyCategoryDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<GridOperatorDutyCategoryDTO> list(Map<String, Object> params) { |
||||
|
List<GridOperatorDutyCategoryEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, GridOperatorDutyCategoryDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<GridOperatorDutyCategoryEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<GridOperatorDutyCategoryEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public GridOperatorDutyCategoryDTO get(String id) { |
||||
|
GridOperatorDutyCategoryEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, GridOperatorDutyCategoryDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(GridOperatorDutyCategoryDTO dto) { |
||||
|
GridOperatorDutyCategoryEntity entity = ConvertUtils.sourceToTarget(dto, GridOperatorDutyCategoryEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(GridOperatorDutyCategoryDTO dto) { |
||||
|
GridOperatorDutyCategoryEntity entity = ConvertUtils.sourceToTarget(dto, GridOperatorDutyCategoryEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,152 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.consult.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.elink.esua.epdc.commons.tools.exception.RenException; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; |
||||
|
import com.elink.esua.epdc.dto.consult.GridOperatorInfoDTO; |
||||
|
import com.elink.esua.epdc.modules.consult.dao.GridOperatorInfoDao; |
||||
|
import com.elink.esua.epdc.modules.consult.entity.GridOperatorInfoEntity; |
||||
|
import com.elink.esua.epdc.modules.consult.redis.GridOperatorInfoRedis; |
||||
|
import com.elink.esua.epdc.modules.consult.service.GridOperatorInfoService; |
||||
|
import com.elink.esua.epdc.modules.feign.AdminFeignClient; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 网格员信息 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2020-03-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class GridOperatorInfoServiceImpl extends BaseServiceImpl<GridOperatorInfoDao, GridOperatorInfoEntity> implements GridOperatorInfoService { |
||||
|
|
||||
|
@Autowired |
||||
|
private GridOperatorInfoRedis gridOperatorInfoRedis; |
||||
|
|
||||
|
@Autowired |
||||
|
private AdminFeignClient adminFeignClient; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<GridOperatorInfoDTO> page(Map<String, Object> params) { |
||||
|
IPage<GridOperatorInfoEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, GridOperatorInfoDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<GridOperatorInfoDTO> list(Map<String, Object> params) { |
||||
|
List<GridOperatorInfoEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, GridOperatorInfoDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<GridOperatorInfoEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<GridOperatorInfoEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public GridOperatorInfoDTO get(String id) { |
||||
|
GridOperatorInfoEntity entity = baseDao.selectById(id); |
||||
|
GridOperatorInfoDTO gridOperatorInfoDTO = ConvertUtils.sourceToTarget(entity, GridOperatorInfoDTO.class); |
||||
|
if(StringUtils.isNotBlank(entity.getAllDeptIds())){ |
||||
|
String depts[] = entity.getAllDeptIds().split(","); |
||||
|
gridOperatorInfoDTO.setAllDeptIds(depts); |
||||
|
} |
||||
|
return gridOperatorInfoDTO; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(GridOperatorInfoDTO dto) { |
||||
|
GridOperatorInfoEntity entity = ConvertUtils.sourceToTarget(dto, GridOperatorInfoEntity.class); |
||||
|
Result<ParentAndAllDeptDTO> parentResult = null; |
||||
|
if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { |
||||
|
parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); |
||||
|
} |
||||
|
if (parentResult != null) { |
||||
|
if (!parentResult.success() || parentResult.getData() == null) { |
||||
|
throw new RenException("获取部门信息失败"); |
||||
|
} else { |
||||
|
ParentAndAllDeptDTO deptDTO = parentResult.getData(); |
||||
|
entity.setAllDeptIds(deptDTO.getAllDeptIds()); |
||||
|
entity.setAllDeptNames(deptDTO.getAllDeptNames()); |
||||
|
entity.setParentDeptIds(deptDTO.getParentDeptIds()); |
||||
|
entity.setParentDeptNames(deptDTO.getParentDeptNames()); |
||||
|
entity.setDeptId(Long.valueOf(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1])); |
||||
|
} |
||||
|
} |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(GridOperatorInfoDTO dto) { |
||||
|
GridOperatorInfoEntity entity = ConvertUtils.sourceToTarget(dto, GridOperatorInfoEntity.class); |
||||
|
String[] allDeptIds = dto.getAllDeptIds(); |
||||
|
Result<ParentAndAllDeptDTO> parentResult = adminFeignClient.getParentAndAllDept(String.valueOf(allDeptIds[allDeptIds.length - 1])); |
||||
|
if (!parentResult.success() || parentResult.getData() == null) { |
||||
|
throw new RenException("获取部门信息失败"); |
||||
|
} else { |
||||
|
ParentAndAllDeptDTO deptDTO = parentResult.getData(); |
||||
|
entity.setAllDeptIds(deptDTO.getAllDeptIds()); |
||||
|
entity.setAllDeptNames(deptDTO.getAllDeptNames()); |
||||
|
entity.setParentDeptIds(deptDTO.getParentDeptIds()); |
||||
|
entity.setParentDeptNames(deptDTO.getParentDeptNames()); |
||||
|
} |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void changeShowFlag(GridOperatorInfoDTO dto) { |
||||
|
GridOperatorInfoEntity gridOperatorInfoEntity = new GridOperatorInfoEntity(); |
||||
|
gridOperatorInfoEntity.setId(dto.getId()); |
||||
|
gridOperatorInfoEntity.setShowFlag(dto.getShowFlag()); |
||||
|
updateById(gridOperatorInfoEntity); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.elink.esua.epdc.modules.consult.dao.ConsultConfDao"> |
||||
|
|
||||
|
<resultMap type="com.elink.esua.epdc.modules.consult.entity.ConsultConfEntity" id="consultConfMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="gridOperatorFlag" column="GRID_OPERATOR_FLAG"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
<select id="selectOneSwitchByNewest" resultType="String"> |
||||
|
SELECT |
||||
|
ec.GRID_OPERATOR_FLAG |
||||
|
FROM |
||||
|
epdc_consult_conf ec |
||||
|
WHERE |
||||
|
ec.DEL_FLAG = '0' |
||||
|
ORDER BY |
||||
|
ec.UPDATED_TIME DESC |
||||
|
LIMIT 1 |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,18 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.elink.esua.epdc.modules.consult.dao.GridOperatorDutyCategoryDao"> |
||||
|
|
||||
|
<resultMap type="com.elink.esua.epdc.modules.consult.entity.GridOperatorDutyCategoryEntity" id="gridOperatorDutyCategoryMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="dutyCategoryName" column="DUTY_CATEGORY_NAME"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,32 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.elink.esua.epdc.modules.consult.dao.GridOperatorInfoDao"> |
||||
|
|
||||
|
<resultMap type="com.elink.esua.epdc.modules.consult.entity.GridOperatorInfoEntity" id="gridOperatorInfoMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="realName" column="REAL_NAME"/> |
||||
|
<result property="sex" column="SEX"/> |
||||
|
<result property="sort" column="SORT"/> |
||||
|
<result property="mobile" column="MOBILE"/> |
||||
|
<result property="identityNo" column="IDENTITY_NO"/> |
||||
|
<result property="faceImg" column="FACE_IMG"/> |
||||
|
<result property="workUnit" column="WORK_UNIT"/> |
||||
|
<result property="dutyCategoryId" column="DUTY_CATEGORY_ID"/> |
||||
|
<result property="showFlag" column="SHOW_FLAG"/> |
||||
|
<result property="remark" column="REMARK"/> |
||||
|
<result property="deptId" column="DEPT_ID"/> |
||||
|
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/> |
||||
|
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/> |
||||
|
<result property="allDeptIds" column="ALL_DEPT_IDS"/> |
||||
|
<result property="allDeptNames" column="ALL_DEPT_NAMES"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
@ -1,3 +1,3 @@ |
|||||
#Default |
#Default |
||||
#100006001=\u5728\u515A\u5458\u5E93\u4E2D\u6CA1\u6709\u627E\u5230\u60A8\u7684\u4FE1\u606F\uFF0C\u6211\u4EEC\u5148\u5C06\u60A8\u8BA4\u8BC1\u4E3A\u5C45\u6C11\uFF0C\u8BF7\u8054\u7CFB\u5F53\u5730\u7BA1\u7406\u4EBA\u5458\u5B8C\u5584\u515A\u5458\u5E93\u540E\u7EE7\u7EED\u8BA4\u8BC1 |
#100006001=\u5728\u515A\u5458\u5E93\u4E2D\u6CA1\u6709\u627E\u5230\u60A8\u7684\u4FE1\u606F\uFF0C\u6211\u4EEC\u5148\u5C06\u60A8\u8BA4\u8BC1\u4E3A\u5C45\u6C11\uFF0C\u8BF7\u8054\u7CFB\u5F53\u5730\u7BA1\u7406\u4EBA\u5458\u5B8C\u5584\u515A\u5458\u5E93\u540E\u7EE7\u7EED\u8BA4\u8BC1 |
||||
100006001=\u8BA4\u8BC1\u4FE1\u606F\u63D0\u4EA4\u6210\u529F\uFF0C\u6211\u4EEC\u6536\u5230\u60A8\u7684\u8BA4\u8BC1\u4FE1\u606F\uFF0C\u4F1A\u5C3D\u5FEB\u5BA1\u6838\uFF0C\u60A8\u53EF\u4EE5\u4EAB\u53D7\u5E73\u53F0\u7684\u670D\u52A1\u4E86 |
100006001=\u6211\u4EEC\u6536\u5230\u60A8\u7684\u8BA4\u8BC1\u4FE1\u606F\uFF0C\u4F1A\u5C3D\u5FEB\u5BA1\u6838\uFF0C\u60A8\u53EF\u4EE5\u4EAB\u53D7\u5E73\u53F0\u7684\u670D\u52A1\u4E86 |
Loading…
Reference in new issue