| | |
| | | return CommonResult.success(agencyService.agencyList(agency)); |
| | | } |
| | | |
| | | @ApiOperation(value = "机构列表") |
| | | @GetMapping("/agencyLists") |
| | | public CommonResult agencyLists(SysAgency agency){ |
| | | return CommonResult.success(agencyService.agencyLists(agency)); |
| | | } |
| | | |
| | | |
| | | @RequiresPermissions(value={"system:assess:monitor","system:assess:agency"},logical = Logical.OR) |
| | | @ApiOperation(value = "根据id获取机构详情") |
| | | @ApiImplicitParams({ |
| | |
| | | @TableField(exist = false) |
| | | private String agencyName; |
| | | |
| | | @ApiModelProperty(value = "机构属性(0疆内,1疆外,默认0)",required = false) |
| | | @TableField(exist = false) |
| | | private Integer attribute; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.assess.system.domain.SysUser; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 机构表 服务类 |
| | |
| | | CommonPage agencyList(SysAgency agency); |
| | | |
| | | /** |
| | | * 根据条件分页查询机构列表 |
| | | * @param agency |
| | | * @return |
| | | */ |
| | | List<SysAgency> agencyLists(SysAgency agency); |
| | | |
| | | /** |
| | | * 校验机构名称是否唯一 |
| | | * @param agency |
| | | * @return |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<SysAgency> agencyLists(SysAgency agency) { |
| | | return baseMapper.agencyList(agency); |
| | | } |
| | | |
| | | @Override |
| | | public boolean checkAgencyNameUnique(SysAgency agency) { |
| | | Long agencyId = agency.getId()==null? -1L : agency.getId(); |
| | | SysAgency info = baseMapper.checkAgencyNameUnique(agency.getName()); |
| | |
| | | <if test="state != null"> |
| | | AND u.state = #{state} |
| | | </if> |
| | | <if test="attribute != null"> |
| | | AND a.attribute = #{attribute} |
| | | </if> |
| | | <if test="phone != null and phone != ''"> |
| | | AND u.phone like concat('%', #{phone}, '%') |
| | | </if> |
| | |
| | | <if test="post != null and post != ''"> |
| | | AND u.post =#{post} |
| | | </if> |
| | | <if test="agencyName != null and agencyName != ''"> |
| | | AND a.name like concat('%', #{agencyName}, '%') |
| | | </if> |
| | | |
| | | </where> |
| | | order by u.create_time desc |