| | |
| | | d.dict_value AS categoryName |
| | | FROM |
| | | blade_notice n |
| | | LEFT JOIN ( SELECT * FROM blade_dict WHERE code = 'notice' ) d ON n.category = d.dict_key |
| | | LEFT JOIN |
| | | ( SELECT * FROM blade_dict WHERE code = 'notice' ) d |
| | | ON |
| | | n.category = d.dict_key |
| | | <if test="notice.deptId!=null and notice.jurisdiction!=null"> |
| | | left join |
| | | blade_user bu |
| | | on |
| | | bu.dept_id = n.dept_id |
| | | </if> |
| | | WHERE |
| | | n.is_deleted = 0 and n.tenant_id = #{notice.tenantId} |
| | | n.is_deleted = 0 |
| | | <if test="notice.title!=null"> |
| | | and n.title like concat(concat('%', #{notice.title}), '%') |
| | | </if> |
| | | <if test="notice.category!=null"> |
| | | and n.category = #{notice.category} |
| | | </if> |
| | | <if test="notice.deptId!=null and notice.jurisdiction!=null"> |
| | | and (n.dept_id = #{notice.deptId} or bu.jurisdiction = #{notice.jurisdiction} |
| | | or n.dept_id = 1123598813738675201 |
| | | ) |
| | | </if> |
| | | <if test="notice.deptId!=null and notice.jurisdiction==null"> |
| | | and (n.dept_id = #{notice.deptId} and n.category=2 |
| | | or n.dept_id = 1123598813738675201 |
| | | ) |
| | | </if> |
| | | <if test="notice.startTime!=null and notice.startTime!=''"> |
| | | and n.release_time >= #{notice.startTime} |
| | | </if> |
| | | <if test="notice.endTime!=null and notice.endTime!=''"> |
| | | and n.release_time <= #{notice.endTime} |
| | | </if> |
| | | <if test="notice.category!=null"> |
| | | and n.category = #{notice.category} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | */ |
| | | private String endTime; |
| | | |
| | | /** |
| | | * 行政区(辖区)id |
| | | */ |
| | | private Long jurisdiction; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | } |
| | |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | return R.data(pages); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * @param dispatcher |
| | | * @return |
| | | */ |
| | | @GetMapping("/page-tree") |
| | | public R pageTree(DispatcherUnitVO dispatcher) { |
| | | List<DispatcherUnitVO> pages = dispatcherUnitService.selectDispatcherUnitPageTree(dispatcher); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | |
| | | * @return |
| | | */ |
| | | DispatcherUnitVO selectDispatcherUnitInfo(@Param("dispatcherUnit")DispatcherUnit dispatcherUnit); |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * @param dispatcher |
| | | * @return |
| | | */ |
| | | List<DispatcherUnitVO> selectDispatcherUnitPageTree(@Param("dispatcherUnit")DispatcherUnitVO dispatcher); |
| | | } |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!--自定义树--> |
| | | <select id="selectDispatcherUnitPageTree" resultType="org.springblade.modules.dispatcher.vo.DispatcherUnitVO"> |
| | | select |
| | | sdu.id,sdu.name |
| | | from |
| | | sys_dispatcher_unit sdu |
| | | LEFT JOIN |
| | | blade_dept bt |
| | | ON |
| | | sdu.dept_id = bt.id |
| | | WHERE |
| | | 1=1 |
| | | <if test="dispatcherUnit.tenantName!=null and dispatcherUnit.tenantName!=''"> |
| | | and bt.dept_name like concat('%', #{dispatcherUnit.tenantName},'%') |
| | | </if> |
| | | <if test="dispatcherUnit.name!=null and dispatcherUnit.name!=''"> |
| | | and sdu.name like concat('%', #{dispatcherUnit.name},'%') |
| | | </if> |
| | | <if test="dispatcherUnit.linkman!=null and dispatcherUnit.linkman!=''"> |
| | | and sdu.linkman like concat('%', #{dispatcherUnit.linkman},'%') |
| | | </if> |
| | | <if test="dispatcherUnit.phone!=null and dispatcherUnit.phone!=''"> |
| | | and sdu.phone like concat('%', #{dispatcherUnit.phone},'%') |
| | | </if> |
| | | <if test="dispatcherUnit.province!=null"> |
| | | and sdu.province = #{dispatcherUnit.province} |
| | | </if> |
| | | <if test="dispatcherUnit.city!=null"> |
| | | and sdu.city = #{dispatcherUnit.city} |
| | | </if> |
| | | <if test="dispatcherUnit.jurisdiction!=null"> |
| | | and sdu.jurisdiction = #{dispatcherUnit.jurisdiction} |
| | | </if> |
| | | <if test="dispatcherUnit.district!=null"> |
| | | and sdu.district = #{dispatcherUnit.district} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!--派遣公司详细信息--> |
| | | <select id="selectDispatcherUnitInfo" resultType="org.springblade.modules.dispatcher.vo.DispatcherUnitVO"> |
| | |
| | | import org.springblade.modules.dispatcher.vo.DispatcherUnitVO; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 服务类 |
| | | * |
| | |
| | | * @return |
| | | */ |
| | | DispatcherUnitVO selectDispatcherUnitInfo(DispatcherUnit dispatcherUnit); |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * @param dispatcher |
| | | * @return |
| | | */ |
| | | List<DispatcherUnitVO> selectDispatcherUnitPageTree(DispatcherUnitVO dispatcher); |
| | | } |
| | |
| | | import org.springblade.modules.dispatcher.vo.DispatcherVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | | * |
| | |
| | | public DispatcherUnitVO selectDispatcherUnitInfo(DispatcherUnit dispatcherUnit) { |
| | | return baseMapper.selectDispatcherUnitInfo(dispatcherUnit); |
| | | } |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * @param dispatcher |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<DispatcherUnitVO> selectDispatcherUnitPageTree(DispatcherUnitVO dispatcher) { |
| | | return baseMapper.selectDispatcherUnitPageTree(dispatcher); |
| | | } |
| | | } |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.modules.dispatcher.entity.DispatcherUnit; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 视图实体类 |
| | | * |
| | |
| | | public class DispatcherUnitVO extends DispatcherUnit { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 保安公司名称 |
| | | */ |
| | | private String tenantName; |
| | | |
| | | /** |
| | | * 派遣单位名称 |
| | | */ |
| | | private String dispatcherUnitName; |
| | | } |
| | |
| | | <if test="car.carNumber!=null and car.carNumber!=''"> |
| | | and sc.car_number like concat('%', #{car.carNumber},'%') |
| | | </if> |
| | | <if test="car.deptId!=null and car.deptId!=''"> |
| | | and sc.dept_id = #{car.deptId} |
| | | </if> |
| | | <if test="car.numberType!=null and car.numberType!=''"> |
| | | and sc.number_type like concat('%', #{car.numberType},'%') |
| | | </if> |
| | |
| | | <if test="equipage.tenantName!=null and equipage.tenantName!=''"> |
| | | and bt.dept_name like concat('%', #{equipage.tenantName},'%') |
| | | </if> |
| | | <if test="equipage.deptId!=null and equipage.deptId!=''"> |
| | | and se.dept_id = #{equipage.deptId} |
| | | </if> |
| | | <if test="equipage.number!=null and equipage.number!=''"> |
| | | and se.number like concat('%', #{equipage.number},'%') |
| | | </if> |
| | |
| | | <if test="gun.tenantName!=null and gun.tenantName!=''"> |
| | | and bt.dept_name like concat('%', #{gun.tenantName},'%') |
| | | </if> |
| | | <if test="gun.deptId!=null and gun.deptId!=''"> |
| | | and sg.dept_id = #{gun.deptId} |
| | | </if> |
| | | <if test="gun.gunCardNumber!=null and gun.gunCardNumber!=''"> |
| | | and sg.gun_card_number like concat('%', #{gun.gunCardNumber},'%') |
| | | </if> |
| | |
| | | <if test="recruitment.permit!=null"> |
| | | and sr.permit = #{recruitment.permit} |
| | | </if> |
| | | <if test="recruitment.deptId!=null"> |
| | | and sr.dept_id = #{recruitment.deptId} |
| | | </if> |
| | | <if test="recruitment.education!=null and recruitment.education!=''"> |
| | | and sr.education = #{recruitment.education} |
| | | </if> |