39 changed files with 2424 additions and 6 deletions
@ -0,0 +1,88 @@ |
|||||
|
/** |
||||
|
* 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.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.AdminImgDTO; |
||||
|
import com.elink.esua.epdc.service.AdminImgService; |
||||
|
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 qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-10 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("adminimg") |
||||
|
public class AdminImgController { |
||||
|
|
||||
|
@Autowired |
||||
|
private AdminImgService adminImgService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<AdminImgDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<AdminImgDTO> page = adminImgService.page(params); |
||||
|
return new Result<PageData<AdminImgDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<AdminImgDTO> get(@PathVariable("id") String id){ |
||||
|
AdminImgDTO data = adminImgService.get(id); |
||||
|
return new Result<AdminImgDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody AdminImgDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
adminImgService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody AdminImgDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
adminImgService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
adminImgService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,94 @@ |
|||||
|
/** |
||||
|
* 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.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.PartyOrgDTO; |
||||
|
import com.elink.esua.epdc.excel.PartyOrgExcel; |
||||
|
import com.elink.esua.epdc.service.PartyOrgService; |
||||
|
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 qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("partyorg") |
||||
|
public class PartyOrgController { |
||||
|
|
||||
|
@Autowired |
||||
|
private PartyOrgService partyOrgService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<PartyOrgDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<PartyOrgDTO> page = partyOrgService.page(params); |
||||
|
return new Result<PageData<PartyOrgDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<PartyOrgDTO> get(@PathVariable("id") String id){ |
||||
|
PartyOrgDTO data = partyOrgService.get(id); |
||||
|
return new Result<PartyOrgDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody PartyOrgDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
partyOrgService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody PartyOrgDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
partyOrgService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
partyOrgService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<PartyOrgDTO> list = partyOrgService.selectListPartyOrg(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, "党组织管理", list, PartyOrgExcel.class); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,106 @@ |
|||||
|
/** |
||||
|
* 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.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.PartyOrgTypeDTO; |
||||
|
import com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO; |
||||
|
import com.elink.esua.epdc.excel.PartyOrgTypeExcel; |
||||
|
import com.elink.esua.epdc.service.PartyOrgTypeService; |
||||
|
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 qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("partyorgtype") |
||||
|
public class PartyOrgTypeController { |
||||
|
|
||||
|
@Autowired |
||||
|
private PartyOrgTypeService partyOrgTypeService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<PartyOrgTypeDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<PartyOrgTypeDTO> page = partyOrgTypeService.page(params); |
||||
|
return new Result<PageData<PartyOrgTypeDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<PartyOrgTypeDTO> get(@PathVariable("id") String id){ |
||||
|
PartyOrgTypeDTO data = partyOrgTypeService.get(id); |
||||
|
return new Result<PartyOrgTypeDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody PartyOrgTypeDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
partyOrgTypeService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody PartyOrgTypeDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
partyOrgTypeService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
partyOrgTypeService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<PartyOrgTypeDTO> list = partyOrgTypeService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, PartyOrgTypeExcel.class); |
||||
|
} |
||||
|
|
||||
|
/* |
||||
|
* 获取 党组织类型,用于下拉选项 |
||||
|
* @param |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO>> |
||||
|
* @Author zhangyong |
||||
|
* @Date 15:28 2021-08-06 |
||||
|
**/ |
||||
|
@GetMapping("getPartyOrgType") |
||||
|
public Result<List<PartyOrgTypeSelectDTO>> getPartyOrgType() { |
||||
|
return new Result<List<PartyOrgTypeSelectDTO>>().ok(partyOrgTypeService.getPartyOrgType()); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,88 @@ |
|||||
|
/** |
||||
|
* 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.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.SysDeptInfoDTO; |
||||
|
import com.elink.esua.epdc.service.SysDeptInfoService; |
||||
|
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 qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-10 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("sysdeptinfo") |
||||
|
public class SysDeptInfoController { |
||||
|
|
||||
|
@Autowired |
||||
|
private SysDeptInfoService sysDeptInfoService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<SysDeptInfoDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<SysDeptInfoDTO> page = sysDeptInfoService.page(params); |
||||
|
return new Result<PageData<SysDeptInfoDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<SysDeptInfoDTO> get(@PathVariable("id") String id){ |
||||
|
SysDeptInfoDTO data = sysDeptInfoService.get(id); |
||||
|
return new Result<SysDeptInfoDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody SysDeptInfoDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
sysDeptInfoService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody SysDeptInfoDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
sysDeptInfoService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
sysDeptInfoService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -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.dao; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
||||
|
import com.elink.esua.epdc.entity.AdminImgEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 图片表 图片表 |
||||
|
* |
||||
|
* @author qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-10 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface AdminImgDao extends BaseDao<AdminImgEntity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,57 @@ |
|||||
|
/** |
||||
|
* 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.dao; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
||||
|
import com.elink.esua.epdc.dto.PartyOrgDTO; |
||||
|
import com.elink.esua.epdc.entity.PartyOrgEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 党组织表 党组织表 |
||||
|
* |
||||
|
* @author qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface PartyOrgDao extends BaseDao<PartyOrgEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 是否存在该类型(partyOrgType)的党组织 |
||||
|
* |
||||
|
* @param typeCode |
||||
|
* @return java.lang.Integer |
||||
|
* @Author zhangyong |
||||
|
* @Date 14:34 2021-08-06 |
||||
|
**/ |
||||
|
Integer isPartyOrgExistByPartyOrgType(@Param("typeCode") String typeCode); |
||||
|
|
||||
|
/** |
||||
|
* PC 首页查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<com.elink.esua.epdc.dto.PartyOrgDTO> |
||||
|
* @Author zhangyong |
||||
|
* @Date 15:21 2021-08-11 |
||||
|
**/ |
||||
|
List<PartyOrgDTO> selectListPartyOrg(Map<String, Object> params); |
||||
|
} |
||||
@ -0,0 +1,67 @@ |
|||||
|
/** |
||||
|
* 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.dao; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
||||
|
import com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO; |
||||
|
import com.elink.esua.epdc.entity.PartyOrgTypeEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 党组织类型表 党组织类型表 |
||||
|
* |
||||
|
* @author qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface PartyOrgTypeDao extends BaseDao<PartyOrgTypeEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 返回值 >0 code 已经存在 |
||||
|
* |
||||
|
* @param typeCode |
||||
|
* @param id 过滤自身(可选项) |
||||
|
* @return java.lang.Integer |
||||
|
* @Author zhangyong |
||||
|
* @Date 10:55 2021-04-28 |
||||
|
**/ |
||||
|
Integer isTypeCodeRepeated(@Param("typeCode") String typeCode, @Param("id") String id); |
||||
|
|
||||
|
/** |
||||
|
* 返回值 >0 name 已经存在 |
||||
|
* |
||||
|
* @param typeName |
||||
|
* @param id 过滤自身(可选项) |
||||
|
* @return java.lang.Integer |
||||
|
* @Author zhangyong |
||||
|
* @Date 10:55 2021-04-28 |
||||
|
**/ |
||||
|
Integer isTypeNameRepeated(@Param("typeName") String typeName, @Param("id") String id); |
||||
|
|
||||
|
/* |
||||
|
* 获取 党组织类型,用于下拉选项 |
||||
|
* @param |
||||
|
* @return java.util.List<com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO> |
||||
|
* @Author zhangyong |
||||
|
* @Date 15:28 2021-08-06 |
||||
|
**/ |
||||
|
List<PartyOrgTypeSelectDTO> getPartyOrgType(); |
||||
|
} |
||||
@ -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.dao; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
||||
|
import com.elink.esua.epdc.entity.SysDeptInfoEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 部门信息表 组织信息表 |
||||
|
* |
||||
|
* @author qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-10 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface SysDeptInfoDao extends BaseDao<SysDeptInfoEntity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,56 @@ |
|||||
|
/** |
||||
|
* 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.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 qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-10 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("epdc_admin_img") |
||||
|
public class AdminImgEntity extends BaseEpdcEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 引用ID |
||||
|
*/ |
||||
|
private String referenceId; |
||||
|
|
||||
|
/** |
||||
|
* 图片地址 |
||||
|
*/ |
||||
|
private String imgUrl; |
||||
|
|
||||
|
/** |
||||
|
* 图片类型lllll |
||||
|
*/ |
||||
|
private String imgType; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,106 @@ |
|||||
|
/** |
||||
|
* 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.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 qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("epdc_party_org") |
||||
|
public class PartyOrgEntity extends BaseEpdcEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 党组织名称 |
||||
|
*/ |
||||
|
private String partyOrgName; |
||||
|
|
||||
|
/** |
||||
|
* 党组织介绍 |
||||
|
*/ |
||||
|
private String introduction; |
||||
|
|
||||
|
/** |
||||
|
* 两委干部 |
||||
|
*/ |
||||
|
private String twoCommittees; |
||||
|
|
||||
|
/** |
||||
|
* 党员数量 |
||||
|
*/ |
||||
|
private Integer partyMemberNum; |
||||
|
|
||||
|
/** |
||||
|
* 经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 所属组织名称 |
||||
|
*/ |
||||
|
private String deptName; |
||||
|
|
||||
|
/** |
||||
|
* 所属组织ID |
||||
|
*/ |
||||
|
private String deptId; |
||||
|
|
||||
|
/** |
||||
|
* 党组织类型编码 |
||||
|
*/ |
||||
|
private String typeCode; |
||||
|
|
||||
|
/** |
||||
|
* 父所有部门ID |
||||
|
*/ |
||||
|
private String parentDeptIds; |
||||
|
|
||||
|
/** |
||||
|
* 父所有部门名称 |
||||
|
*/ |
||||
|
private String parentDeptNames; |
||||
|
|
||||
|
/** |
||||
|
* 所有部门ID |
||||
|
*/ |
||||
|
private String allDeptIds; |
||||
|
|
||||
|
/** |
||||
|
* 所有部门名称 |
||||
|
*/ |
||||
|
private String allDeptNames; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
/** |
||||
|
* 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.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 qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("epdc_party_org_type") |
||||
|
public class PartyOrgTypeEntity extends BaseEpdcEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 类型名称 |
||||
|
*/ |
||||
|
private String typeName; |
||||
|
|
||||
|
/** |
||||
|
* 类型编码 |
||||
|
*/ |
||||
|
private String typeCode; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 启用标识 0-否,1-是 |
||||
|
*/ |
||||
|
private String enable; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,91 @@ |
|||||
|
/** |
||||
|
* 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.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 qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-10 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("sys_dept_info") |
||||
|
public class SysDeptInfoEntity extends BaseEpdcEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 部门ID |
||||
|
*/ |
||||
|
private Long deptId; |
||||
|
|
||||
|
/** |
||||
|
* 概况介绍 |
||||
|
*/ |
||||
|
private String introduction; |
||||
|
|
||||
|
/** |
||||
|
* 社区数量 |
||||
|
*/ |
||||
|
private Integer communityNum; |
||||
|
|
||||
|
/** |
||||
|
* 网格数量 |
||||
|
*/ |
||||
|
private Integer gridNum; |
||||
|
|
||||
|
/** |
||||
|
* 网格员数量 |
||||
|
*/ |
||||
|
private Integer gridmanNum; |
||||
|
|
||||
|
/** |
||||
|
* 党员数量 |
||||
|
*/ |
||||
|
private Integer partyMemberNum; |
||||
|
|
||||
|
/** |
||||
|
* 经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 辖区面积 |
||||
|
*/ |
||||
|
private String acreage; |
||||
|
|
||||
|
/** |
||||
|
* 社区人数 |
||||
|
*/ |
||||
|
private Integer communityManNum; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
/** |
||||
|
* 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.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 党组织表 党组织表 |
||||
|
* |
||||
|
* @author qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PartyOrgExcel { |
||||
|
|
||||
|
@Excel(name = "所属组织") |
||||
|
private String allDeptNames; |
||||
|
|
||||
|
@Excel(name = "党组织名称") |
||||
|
private String partyOrgName; |
||||
|
|
||||
|
@Excel(name = "党组织类型") |
||||
|
private String typeName; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,68 @@ |
|||||
|
/** |
||||
|
* 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.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 党组织类型表 党组织类型表 |
||||
|
* |
||||
|
* @author qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PartyOrgTypeExcel { |
||||
|
|
||||
|
@Excel(name = "标识号") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "类型名称") |
||||
|
private String typeName; |
||||
|
|
||||
|
@Excel(name = "类型编码") |
||||
|
private String typeCode; |
||||
|
|
||||
|
@Excel(name = "排序") |
||||
|
private Integer sort; |
||||
|
|
||||
|
@Excel(name = "启用标识 0-否,1-是") |
||||
|
private String enable; |
||||
|
|
||||
|
@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,55 @@ |
|||||
|
package com.elink.esua.epdc.feign; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.dto.RoleModuleRealationDTO; |
||||
|
import com.elink.esua.epdc.feign.fallback.NewsFeignClientFallback; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.http.MediaType; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.PutMapping; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author: wangtong |
||||
|
* @Date: 2021/8/11 09:28 |
||||
|
* @Description: 通知接口 |
||||
|
*/ |
||||
|
@FeignClient(name = ServiceConstant.EPDC_NEWS_SERVER, fallback = NewsFeignClientFallback.class |
||||
|
// ,url = "http://127.0.0.1:9064"
|
||||
|
) |
||||
|
public interface NewsFeignClient { |
||||
|
|
||||
|
/** |
||||
|
* @param orgTypeFormDTO |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result |
||||
|
* @Author yinzuomei |
||||
|
* @Description 保存项目处理类型权限 |
||||
|
* @Date 2019/12/24 17:17 |
||||
|
**/ |
||||
|
@PostMapping(value = "news/rolemodule/saveRoleModuleRealation", consumes = MediaType.APPLICATION_JSON_VALUE) |
||||
|
Result saveRoleModuleRealation(RoleModuleRealationDTO moduleDto); |
||||
|
|
||||
|
/** |
||||
|
* @describe: 查询角色对应的栏目权限 |
||||
|
* @author wangtong |
||||
|
* @date 2021/8/11 16:08 |
||||
|
* @params [roleId] |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<java.lang.Long>> |
||||
|
*/ |
||||
|
@GetMapping(value = "news/rolemodule/getModuleMenuIdList/{roleId}") |
||||
|
Result<List<Long>> getModuleMenuIdList(@PathVariable("roleId") Long roleId); |
||||
|
|
||||
|
/** |
||||
|
* @param orgTypeFormDTO |
||||
|
* @return com.elink.esua.epdc.commons.tools.utils.Result |
||||
|
* @Author yinzuomei |
||||
|
* @Description 保存项目处理类型权限 |
||||
|
* @Date 2019/12/24 17:17 |
||||
|
**/ |
||||
|
@PutMapping(value = "news/rolemodule/updateRoleModuleRealation", consumes = MediaType.APPLICATION_JSON_VALUE) |
||||
|
Result updateRoleModuleRealation(RoleModuleRealationDTO moduleDto); |
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
package com.elink.esua.epdc.feign.fallback; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.dto.RoleModuleRealationDTO; |
||||
|
import com.elink.esua.epdc.feign.NewsFeignClient; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yinzuomei |
||||
|
* @Date 2019/12/24 9:45 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class NewsFeignClientFallback implements NewsFeignClient { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public Result saveRoleModuleRealation(RoleModuleRealationDTO moduleDto) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.EPDC_NEWS_SERVER, "saveRoleModuleRealation", moduleDto); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Result<List<Long>> getModuleMenuIdList(Long roleId) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.EPDC_NEWS_SERVER, "getModuleMenuIdList", roleId); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Result updateRoleModuleRealation(RoleModuleRealationDTO moduleDto) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.EPDC_NEWS_SERVER, "updateRoleModuleRealation", moduleDto); |
||||
|
} |
||||
|
} |
||||
@ -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.redis; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 党组织表 党组织表 |
||||
|
* |
||||
|
* @author qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class PartyOrgRedis { |
||||
|
@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.redis; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 党组织类型表 党组织类型表 |
||||
|
* |
||||
|
* @author qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class PartyOrgTypeRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,107 @@ |
|||||
|
/** |
||||
|
* 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.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.AdminImgDTO; |
||||
|
import com.elink.esua.epdc.entity.AdminImgEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 图片表 图片表 |
||||
|
* |
||||
|
* @author qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-10 |
||||
|
*/ |
||||
|
public interface AdminImgService extends BaseService<AdminImgEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<AdminImgDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
PageData<AdminImgDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<AdminImgDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
List<AdminImgDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return AdminImgDTO |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
AdminImgDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
void save(AdminImgDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
void update(AdminImgDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
|
||||
|
|
||||
|
/*** |
||||
|
* 根据类型 +引用ID |
||||
|
* @param imgType |
||||
|
* @param referenceId |
||||
|
* @return com.elink.esua.epdc.dto.AdminImgDTO |
||||
|
* @author qushutong |
||||
|
* @date 2021/8/10 17:20 |
||||
|
*/ |
||||
|
AdminImgDTO getDtoByReference(String imgType,String referenceId); |
||||
|
} |
||||
@ -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.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.PartyOrgDTO; |
||||
|
import com.elink.esua.epdc.entity.PartyOrgEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 党组织表 党组织表 |
||||
|
* |
||||
|
* @author qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
public interface PartyOrgService extends BaseService<PartyOrgEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<PartyOrgDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-08-06 |
||||
|
*/ |
||||
|
PageData<PartyOrgDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<PartyOrgDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-08-06 |
||||
|
*/ |
||||
|
List<PartyOrgDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return PartyOrgDTO |
||||
|
* @author generator |
||||
|
* @date 2021-08-06 |
||||
|
*/ |
||||
|
PartyOrgDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-08-06 |
||||
|
*/ |
||||
|
void save(PartyOrgDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-08-06 |
||||
|
*/ |
||||
|
void update(PartyOrgDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-08-06 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/** |
||||
|
* PC 首页查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<com.elink.esua.epdc.dto.PartyOrgDTO> |
||||
|
* @Author zhangyong |
||||
|
* @Date 15:21 2021-08-11 |
||||
|
**/ |
||||
|
List<PartyOrgDTO> selectListPartyOrg(Map<String, Object> params); |
||||
|
} |
||||
@ -0,0 +1,106 @@ |
|||||
|
/** |
||||
|
* 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.service; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.dto.PartyOrgTypeDTO; |
||||
|
import com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO; |
||||
|
import com.elink.esua.epdc.entity.PartyOrgTypeEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 党组织类型表 党组织类型表 |
||||
|
* |
||||
|
* @author qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
public interface PartyOrgTypeService extends BaseService<PartyOrgTypeEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<PartyOrgTypeDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-08-06 |
||||
|
*/ |
||||
|
PageData<PartyOrgTypeDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<PartyOrgTypeDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-08-06 |
||||
|
*/ |
||||
|
List<PartyOrgTypeDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return PartyOrgTypeDTO |
||||
|
* @author generator |
||||
|
* @date 2021-08-06 |
||||
|
*/ |
||||
|
PartyOrgTypeDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-08-06 |
||||
|
*/ |
||||
|
void save(PartyOrgTypeDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-08-06 |
||||
|
*/ |
||||
|
void update(PartyOrgTypeDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-08-06 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/* |
||||
|
* 获取 党组织类型,用于下拉选项 |
||||
|
* @param |
||||
|
* @return java.util.List<com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO> |
||||
|
* @Author zhangyong |
||||
|
* @Date 15:28 2021-08-06 |
||||
|
**/ |
||||
|
List<PartyOrgTypeSelectDTO> getPartyOrgType(); |
||||
|
} |
||||
@ -0,0 +1,106 @@ |
|||||
|
/** |
||||
|
* 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.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.SysDeptInfoDTO; |
||||
|
import com.elink.esua.epdc.entity.SysDeptInfoEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 部门信息表 组织信息表 |
||||
|
* |
||||
|
* @author qu qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-10 |
||||
|
*/ |
||||
|
public interface SysDeptInfoService extends BaseService<SysDeptInfoEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<SysDeptInfoDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
PageData<SysDeptInfoDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<SysDeptInfoDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
List<SysDeptInfoDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return SysDeptInfoDTO |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
SysDeptInfoDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
void save(SysDeptInfoDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
void update(SysDeptInfoDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 根据关联deptID 查询 |
||||
|
* |
||||
|
* @param deptId |
||||
|
* @return SysDeptInfoDTO |
||||
|
* @author generator |
||||
|
* @date 2021-08-10 |
||||
|
*/ |
||||
|
SysDeptInfoDTO getDeptInfoByDeptID(String deptId); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,110 @@ |
|||||
|
/** |
||||
|
* 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.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.dao.AdminImgDao; |
||||
|
import com.elink.esua.epdc.dto.AdminImgDTO; |
||||
|
import com.elink.esua.epdc.entity.AdminImgEntity; |
||||
|
import com.elink.esua.epdc.entity.SysDeptInfoEntity; |
||||
|
import com.elink.esua.epdc.service.AdminImgService; |
||||
|
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 qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-10 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class AdminImgServiceImpl extends BaseServiceImpl<AdminImgDao, AdminImgEntity> implements AdminImgService { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public PageData<AdminImgDTO> page(Map<String, Object> params) { |
||||
|
IPage<AdminImgEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, AdminImgDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<AdminImgDTO> list(Map<String, Object> params) { |
||||
|
List<AdminImgEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, AdminImgDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<AdminImgEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<AdminImgEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public AdminImgDTO get(String id) { |
||||
|
AdminImgEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, AdminImgDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(AdminImgDTO dto) { |
||||
|
AdminImgEntity entity = ConvertUtils.sourceToTarget(dto, AdminImgEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(AdminImgDTO dto) { |
||||
|
AdminImgEntity entity = ConvertUtils.sourceToTarget(dto, AdminImgEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public AdminImgDTO getDtoByReference(String imgType, String referenceId) { |
||||
|
QueryWrapper<AdminImgEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(referenceId), FieldConstant.REFERENCE_ID, referenceId); |
||||
|
wrapper.eq(StringUtils.isNotBlank(imgType), FieldConstant.IMG_TYPE, imgType); |
||||
|
return ConvertUtils.sourceToTarget(baseDao.selectOne(wrapper),AdminImgDTO.class); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,138 @@ |
|||||
|
/** |
||||
|
* 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.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.constant.NumConstant; |
||||
|
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.dao.PartyOrgDao; |
||||
|
import com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO; |
||||
|
import com.elink.esua.epdc.dto.PartyOrgDTO; |
||||
|
import com.elink.esua.epdc.entity.PartyOrgEntity; |
||||
|
import com.elink.esua.epdc.optimize.modules.deptlevel.service.OptSysDeptService; |
||||
|
import com.elink.esua.epdc.redis.PartyOrgRedis; |
||||
|
import com.elink.esua.epdc.service.PartyOrgService; |
||||
|
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 qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class PartyOrgServiceImpl extends BaseServiceImpl<PartyOrgDao, PartyOrgEntity> implements PartyOrgService { |
||||
|
|
||||
|
@Autowired |
||||
|
private PartyOrgRedis partyOrgRedis; |
||||
|
@Autowired |
||||
|
private OptSysDeptService optSysDeptService; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<PartyOrgDTO> page(Map<String, Object> params) { |
||||
|
IPage<PartyOrgDTO> page = getPage(params); |
||||
|
List<PartyOrgDTO> list = baseDao.selectListPartyOrg(params); |
||||
|
return new PageData<>(list, page.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PartyOrgDTO> list(Map<String, Object> params) { |
||||
|
List<PartyOrgEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, PartyOrgDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<PartyOrgEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<PartyOrgEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PartyOrgDTO get(String id) { |
||||
|
PartyOrgEntity entity = baseDao.selectById(id); |
||||
|
PartyOrgDTO dto = ConvertUtils.sourceToTarget(entity, PartyOrgDTO.class); |
||||
|
if (null != dto && null != dto.getAllDeptIds()) { |
||||
|
String[] split = dto.getAllDeptIds().split(","); |
||||
|
// 去除,顶级组织
|
||||
|
String[] allDeptIdArr = new String[split.length - NumConstant.ONE]; |
||||
|
System.arraycopy(split, NumConstant.ONE, allDeptIdArr, NumConstant.ZERO,split.length - NumConstant.ONE); |
||||
|
dto.setAllDeptIdArr(allDeptIdArr); |
||||
|
} |
||||
|
return dto; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(PartyOrgDTO dto) { |
||||
|
PartyOrgEntity entity = ConvertUtils.sourceToTarget(dto, PartyOrgEntity.class); |
||||
|
this.packageOrgLevel(entity, Long.valueOf(dto.getDeptId())); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(PartyOrgDTO dto) { |
||||
|
PartyOrgEntity entity = ConvertUtils.sourceToTarget(dto, PartyOrgEntity.class); |
||||
|
this.packageOrgLevel(entity, Long.valueOf(dto.getDeptId())); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 组装部门层级 |
||||
|
* |
||||
|
* @param entity |
||||
|
* @param deptId |
||||
|
* @return void |
||||
|
* @Author zhangyong |
||||
|
* @Date 16:25 2021-08-06 |
||||
|
**/ |
||||
|
private void packageOrgLevel(PartyOrgEntity entity, Long deptId) { |
||||
|
DeptLevelAndLeaderDTO deptLevel = optSysDeptService.getDeptLevelById(deptId); |
||||
|
entity.setAllDeptIds(deptLevel.getAllDeptIds()); |
||||
|
entity.setAllDeptNames(deptLevel.getAllDeptNames()); |
||||
|
entity.setParentDeptIds(deptLevel.getParentDeptIds()); |
||||
|
entity.setParentDeptNames(deptLevel.getParentDeptNames()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PartyOrgDTO> selectListPartyOrg(Map<String, Object> params) { |
||||
|
return baseDao.selectListPartyOrg(params); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,143 @@ |
|||||
|
/** |
||||
|
* 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.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.constant.NumConstant; |
||||
|
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.dao.PartyOrgDao; |
||||
|
import com.elink.esua.epdc.dao.PartyOrgTypeDao; |
||||
|
import com.elink.esua.epdc.dto.PartyOrgTypeDTO; |
||||
|
import com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO; |
||||
|
import com.elink.esua.epdc.entity.PartyOrgTypeEntity; |
||||
|
import com.elink.esua.epdc.redis.PartyOrgTypeRedis; |
||||
|
import com.elink.esua.epdc.service.PartyOrgTypeService; |
||||
|
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 qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-06 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class PartyOrgTypeServiceImpl extends BaseServiceImpl<PartyOrgTypeDao, PartyOrgTypeEntity> implements PartyOrgTypeService { |
||||
|
|
||||
|
@Autowired |
||||
|
private PartyOrgTypeRedis partyOrgTypeRedis; |
||||
|
@Autowired |
||||
|
private PartyOrgDao partyOrgDao; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<PartyOrgTypeDTO> page(Map<String, Object> params) { |
||||
|
IPage<PartyOrgTypeEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, PartyOrgTypeDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PartyOrgTypeDTO> list(Map<String, Object> params) { |
||||
|
List<PartyOrgTypeEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, PartyOrgTypeDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<PartyOrgTypeEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<PartyOrgTypeEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
wrapper.orderByAsc("SORT"); |
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PartyOrgTypeDTO get(String id) { |
||||
|
PartyOrgTypeEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, PartyOrgTypeDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(PartyOrgTypeDTO dto) { |
||||
|
Integer num = baseDao.isTypeCodeRepeated(dto.getTypeCode(), null); |
||||
|
this.exceptionHandling(num, "党组织类型编码"); |
||||
|
num = baseDao.isTypeNameRepeated(dto.getTypeName(), null); |
||||
|
this.exceptionHandling(num, "党组织类型"); |
||||
|
|
||||
|
PartyOrgTypeEntity entity = ConvertUtils.sourceToTarget(dto, PartyOrgTypeEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(PartyOrgTypeDTO dto) { |
||||
|
Integer num = baseDao.isTypeCodeRepeated(dto.getTypeCode(), dto.getId()); |
||||
|
this.exceptionHandling(num, "党组织类型编码 不可重复!"); |
||||
|
num = baseDao.isTypeNameRepeated(dto.getTypeName(), dto.getId()); |
||||
|
this.exceptionHandling(num, "党组织类型 不可重复!"); |
||||
|
|
||||
|
PartyOrgTypeEntity entity = ConvertUtils.sourceToTarget(dto, PartyOrgTypeEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 异常处理 |
||||
|
* @param num > 0 输出异常 |
||||
|
* @param exceptionInfo 异常描述 |
||||
|
* @return void |
||||
|
* @Author zhangyong |
||||
|
* @Date 14:26 2021-08-06 |
||||
|
**/ |
||||
|
private void exceptionHandling(Integer num, String exceptionInfo) { |
||||
|
if (NumConstant.ZERO < num) { |
||||
|
throw new RenException(exceptionInfo); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
for (String id : ids) { |
||||
|
PartyOrgTypeEntity partyOrgTypeEntity = baseDao.selectById(id); |
||||
|
Integer num = partyOrgDao.isPartyOrgExistByPartyOrgType(partyOrgTypeEntity.getTypeCode()); |
||||
|
this.exceptionHandling(num, "该类型不能被删除,因当前尚存在该类型的党组织。"); |
||||
|
} |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PartyOrgTypeSelectDTO> getPartyOrgType() { |
||||
|
return baseDao.getPartyOrgType(); |
||||
|
} |
||||
|
} |
||||
@ -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.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.dao.SysDeptInfoDao; |
||||
|
import com.elink.esua.epdc.dto.SysDeptInfoDTO; |
||||
|
import com.elink.esua.epdc.entity.SysDeptInfoEntity; |
||||
|
import com.elink.esua.epdc.service.SysDeptInfoService; |
||||
|
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 qu@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-10 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class SysDeptInfoServiceImpl extends BaseServiceImpl<SysDeptInfoDao, SysDeptInfoEntity> implements SysDeptInfoService { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public PageData<SysDeptInfoDTO> page(Map<String, Object> params) { |
||||
|
IPage<SysDeptInfoEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, SysDeptInfoDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<SysDeptInfoDTO> list(Map<String, Object> params) { |
||||
|
List<SysDeptInfoEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, SysDeptInfoDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<SysDeptInfoEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<SysDeptInfoEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public SysDeptInfoDTO get(String id) { |
||||
|
SysDeptInfoEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, SysDeptInfoDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(SysDeptInfoDTO dto) { |
||||
|
SysDeptInfoEntity entity = ConvertUtils.sourceToTarget(dto, SysDeptInfoEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(SysDeptInfoDTO dto) { |
||||
|
SysDeptInfoEntity entity = ConvertUtils.sourceToTarget(dto, SysDeptInfoEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public SysDeptInfoDTO getDeptInfoByDeptID(String deptId) { |
||||
|
QueryWrapper<SysDeptInfoEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(deptId), FieldConstant.DEPT_ID, deptId); |
||||
|
SysDeptInfoEntity sysDeptInfoEntity = baseDao.selectOne(wrapper); |
||||
|
return ConvertUtils.sourceToTarget(sysDeptInfoEntity,SysDeptInfoDTO.class); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
<?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.dao.AdminImgDao"> |
||||
|
|
||||
|
<resultMap type="com.elink.esua.epdc.entity.AdminImgEntity" id="adminImgMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="referenceId" column="REFERENCE_ID"/> |
||||
|
<result property="imgUrl" column="IMG_URL"/> |
||||
|
<result property="imgType" column="IMG_TYPE"/> |
||||
|
<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,54 @@ |
|||||
|
<?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.dao.PartyOrgDao"> |
||||
|
|
||||
|
<resultMap type="com.elink.esua.epdc.entity.PartyOrgEntity" id="partyOrgMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="partyOrgName" column="PARTY_ORG_NAME"/> |
||||
|
<result property="introduction" column="INTRODUCTION"/> |
||||
|
<result property="twoCommittees" column="TWO_COMMITTEES"/> |
||||
|
<result property="partyMemberNum" column="PARTY_MEMBER_NUM"/> |
||||
|
<result property="longitude" column="LONGITUDE"/> |
||||
|
<result property="latitude" column="LATITUDE"/> |
||||
|
<result property="deptName" column="DEPT_NAME"/> |
||||
|
<result property="deptId" column="DEPT_ID"/> |
||||
|
<result property="typeCode" column="TYPE_CODE"/> |
||||
|
<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="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="isPartyOrgExistByPartyOrgType" resultType="Integer"> |
||||
|
SELECT |
||||
|
COUNT(1) |
||||
|
FROM epdc_party_org |
||||
|
WHERE DEL_FLAG = '0' |
||||
|
AND TYPE_CODE = #{typeCode} |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectListPartyOrg" resultType="com.elink.esua.epdc.dto.PartyOrgDTO"> |
||||
|
SELECT |
||||
|
o.ID id, |
||||
|
REPLACE(o.ALL_DEPT_NAMES, '平阴县-', '') allDeptNames, |
||||
|
o.PARTY_ORG_NAME partyOrgName, |
||||
|
t.TYPE_NAME typeName |
||||
|
FROM epdc_party_org o |
||||
|
LEFT JOIN epdc_party_org_type t ON o.TYPE_CODE = t.TYPE_CODE AND t.DEL_FLAG ='0' |
||||
|
WHERE o.DEL_FLAG ='0' |
||||
|
<if test="deptId != null and deptId.trim() != ''"> |
||||
|
AND o.ALL_DEPT_IDS LIKE CONCAT( '%', #{deptId}, '%' ) |
||||
|
</if> |
||||
|
<if test="partyOrgName != null and partyOrgName.trim() != ''"> |
||||
|
AND o.PARTY_ORG_NAME LIKE CONCAT( '%', #{partyOrgName}, '%' ) |
||||
|
</if> |
||||
|
ORDER BY o.CREATED_TIME DESC |
||||
|
</select> |
||||
|
</mapper> |
||||
@ -0,0 +1,50 @@ |
|||||
|
<?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.dao.PartyOrgTypeDao"> |
||||
|
|
||||
|
<resultMap type="com.elink.esua.epdc.entity.PartyOrgTypeEntity" id="partyOrgTypeMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="typeName" column="TYPE_NAME"/> |
||||
|
<result property="typeCode" column="TYPE_CODE"/> |
||||
|
<result property="sort" column="SORT"/> |
||||
|
<result property="enable" column="ENABLE"/> |
||||
|
<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="isTypeCodeRepeated" resultType="Integer"> |
||||
|
SELECT |
||||
|
COUNT(1) |
||||
|
FROM epdc_party_org_type |
||||
|
WHERE DEL_FLAG = '0' |
||||
|
AND TYPE_CODE = #{typeCode} |
||||
|
<if test="id != null and id.trim() != ''"> |
||||
|
AND ID != #{id} |
||||
|
</if> |
||||
|
</select> |
||||
|
|
||||
|
<select id="isTypeNameRepeated" resultType="Integer"> |
||||
|
SELECT |
||||
|
COUNT(1) |
||||
|
FROM epdc_party_org_type |
||||
|
WHERE DEL_FLAG = '0' |
||||
|
AND TYPE_NAME = #{typeName} |
||||
|
<if test="id != null and id.trim() != ''"> |
||||
|
AND ID != #{id} |
||||
|
</if> |
||||
|
</select> |
||||
|
|
||||
|
<select id="getPartyOrgType" resultType="com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO"> |
||||
|
SELECT |
||||
|
TYPE_CODE tagValue, |
||||
|
TYPE_NAME tagName |
||||
|
FROM epdc_party_org_type |
||||
|
WHERE DEL_FLAG = '0' |
||||
|
AND ENABLE = '1' |
||||
|
</select> |
||||
|
</mapper> |
||||
@ -0,0 +1,26 @@ |
|||||
|
<?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.dao.SysDeptInfoDao"> |
||||
|
|
||||
|
<resultMap type="com.elink.esua.epdc.entity.SysDeptInfoEntity" id="sysDeptInfoMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="deptId" column="DEPT_ID"/> |
||||
|
<result property="introduction" column="INTRODUCTION"/> |
||||
|
<result property="communityNum" column="COMMUNITY_NUM"/> |
||||
|
<result property="gridNum" column="GRID_NUM"/> |
||||
|
<result property="gridmanNum" column="GRIDMAN_NUM"/> |
||||
|
<result property="partyMemberNum" column="PARTY_MEMBER_NUM"/> |
||||
|
<result property="longitude" column="LONGITUDE"/> |
||||
|
<result property="latitude" column="LATITUDE"/> |
||||
|
<result property="acreage" column="ACREAGE"/> |
||||
|
<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> |
||||
@ -1 +1 @@ |
|||||
Subproject commit 982b1ff01e69e7cb48180e3d68c94664605ae73e |
Subproject commit c660ca360356218f48dbdb987f4fba70f7642435 |
||||
@ -1 +1 @@ |
|||||
Subproject commit 5b077ffda98e46ce47e9c5540dabbc50f092968d |
Subproject commit 235f56d5ea756317efe54c5e0d4be0ac45e09155 |
||||
Loading…
Reference in new issue