花城 需求清单列表新增显示隐藏字段 新增认领人数字段 新增时间段筛选功能
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Slf4j |
| | |
| | | @RequestParam(value = "status", required = false)String status, |
| | | @RequestParam(value = "kind", required = false)String kind, |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "communityId", required = false)String communityId) |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime) |
| | | { |
| | | return newStriveForFeign.getNeedProblemList(pageNum,pageSize,search,classifyId,status,kind,userId,getUserId()+"",communityId); |
| | | Date start=null; |
| | | Date end=null; |
| | | |
| | | try { |
| | | if(!StringUtils.isEmpty(startTime)) { |
| | | start = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(startTime); |
| | | } |
| | | if(!StringUtils.isEmpty(startTime)) { |
| | | end = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(endTime); |
| | | } |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return newStriveForFeign.getNeedProblemList(pageNum,pageSize,search,classifyId,status,kind,userId,getUserId()+"",communityId,"1",start,end); |
| | | } |
| | | |
| | | |
| | |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "search", required = false)String search, |
| | | @RequestParam(value = "status", required = false)String status, |
| | | @RequestParam(value = "kind", required = false)String kind) |
| | | @RequestParam(value = "kind", required = false)String kind, |
| | | @RequestParam(value = "isDisplay", required = false)String isDisplay, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime) |
| | | { |
| | | return newStriveForFeign.getMyJoinNeedProblemList(pageNum,pageSize,search,status,kind,getUserId()+"",getUserId()+""); |
| | | Date start=null; |
| | | Date end=null; |
| | | |
| | | try { |
| | | if(!StringUtils.isEmpty(startTime)) { |
| | | start = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(startTime); |
| | | } |
| | | if(!StringUtils.isEmpty(startTime)) { |
| | | end = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(endTime); |
| | | } |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | |
| | | return newStriveForFeign.getMyJoinNeedProblemList(pageNum,pageSize,search,status,kind,getUserId()+"",getUserId()+"",isDisplay,start,end); |
| | | } |
| | | |
| | | |
| | |
| | | @ApiModelProperty("分类id") |
| | | private String classifyId; |
| | | |
| | | @ApiModelProperty("认领人数(-1 不限制) ") |
| | | @ApiModelProperty("认领人数限制(-1 不限制) ") |
| | | private String claimNum; |
| | | |
| | | @ApiModelProperty("认领人数") |
| | | private String joinNum; |
| | | |
| | | @ApiModelProperty("需求地址") |
| | | private String address; |
| | |
| | | @ApiModelProperty("服务时长 毫秒值") |
| | | private String serviceTime; |
| | | |
| | | @ApiModelProperty("是否显示 1显示 0隐藏 默认显示") |
| | | private String isDisplay; |
| | | |
| | | @ApiModelProperty("开始时间打卡") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date punchStartTime; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @RequestParam(value = "kind", required = false)String kind, |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "userIds", required = false)String userIds, |
| | | @RequestParam(value = "communityId", required = false)String communityId); |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "isDisplay", required = false)String isDisplay, |
| | | @RequestParam(value = "startTime", required = false) Date startTime, |
| | | @RequestParam(value = "endTime", required = false) Date endTime); |
| | | |
| | | @GetMapping("/NeedProblem/getMyJoinNeedProblemList") |
| | | public R getMyJoinNeedProblemList(@RequestParam("pageNum") int pageNum, |
| | |
| | | @RequestParam(value = "status", required = false)String status, |
| | | @RequestParam(value = "kind", required = false)String kind, |
| | | @RequestParam(value = "userIds", required = false)String userIds, |
| | | @RequestParam(value = "userId", required = false)String userId); |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "isDisplay", required = false)String isDisplay, |
| | | @RequestParam(value = "startTime", required = false) Date startTime, |
| | | @RequestParam(value = "endTime", required = false) Date endTime); |
| | | |
| | | |
| | | @GetMapping("/NeedProblem/getDetails") |
| | |
| | | import com.panzhihua.common.model.vos.community.building.NewFightShoppingVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.common.service.partybuilding.NewStriveForFeign; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Slf4j |
| | |
| | | @RequestParam(value = "status", required = false)String status, |
| | | @RequestParam(value = "kind", required = false)String kind, |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "communityId", required = false)String communityId) |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "isDisplay", required = false)String isDisplay, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime) |
| | | { |
| | | return newStriveForFeign.getNeedProblemList(pageNum,pageSize,search,classifyId,status,kind,userId,getUserId()+"",communityId); |
| | | Date start=null; |
| | | Date end=null; |
| | | |
| | | try { |
| | | if(!StringUtils.isEmpty(startTime)) { |
| | | start = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(startTime); |
| | | } |
| | | if(!StringUtils.isEmpty(startTime)) { |
| | | end = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(endTime); |
| | | } |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return newStriveForFeign.getNeedProblemList(pageNum,pageSize,search,classifyId,status,kind,userId,getUserId()+"",communityId,isDisplay,start,end); |
| | | } |
| | | |
| | | |
| | |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "search", required = false)String search, |
| | | @RequestParam(value = "status", required = false)String status, |
| | | @RequestParam(value = "kind", required = false)String kind) |
| | | @RequestParam(value = "kind", required = false)String kind, |
| | | @RequestParam(value = "isDisplay", required = false)String isDisplay, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime) |
| | | { |
| | | return newStriveForFeign.getMyJoinNeedProblemList(pageNum,pageSize,search,status,kind,getUserId()+"",getUserId()+""); |
| | | Date start=null; |
| | | Date end=null; |
| | | |
| | | try { |
| | | if(!StringUtils.isEmpty(startTime)) { |
| | | start = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(startTime); |
| | | } |
| | | if(!StringUtils.isEmpty(startTime)) { |
| | | end = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(endTime); |
| | | } |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return newStriveForFeign.getMyJoinNeedProblemList(pageNum,pageSize,search,status,kind,getUserId()+"",getUserId()+"",isDisplay,start,end); |
| | | } |
| | | |
| | | |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | @RequestParam(value = "kind", required = false)String kind, |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "userIds", required = false)String userIds, |
| | | @RequestParam(value = "communityId", required = false)String communityId) |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "isDisplay", required = false) String isDisplay, |
| | | @RequestParam(value = "startTime", required = false) Date startTime, |
| | | @RequestParam(value = "endTime", required = false) Date endTime) |
| | | { |
| | | return R.ok(inventoryService.getList(pageNum,pageSize,search,classifyId,status,kind,userId,userIds,communityId)); |
| | | return R.ok(inventoryService.getList(pageNum,pageSize,search,classifyId,status,kind,userId,userIds,isDisplay,communityId,startTime,endTime)); |
| | | } |
| | | |
| | | @GetMapping("/getMyJoinNeedProblemList") |
| | |
| | | @RequestParam(value = "status", required = false) String status, |
| | | @RequestParam(value = "kind", required = false) String kind, |
| | | @RequestParam(value = "userIds", required = false) String userIds, |
| | | @RequestParam(value = "userId", required = false)String userId) |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "isDisplay", required = false)String isDisplay, |
| | | @RequestParam(value = "startTime", required = false) Date startTime, |
| | | @RequestParam(value = "endTime", required = false) Date endTime) |
| | | { |
| | | return R.ok(inventoryService.getMyJoinList(pageNum,pageSize,search,status,kind,userIds,userId)); |
| | | return R.ok(inventoryService.getMyJoinList(pageNum,pageSize,search,status,kind,userIds,isDisplay,userId,startTime,endTime)); |
| | | } |
| | | |
| | | @GetMapping("/getDetails") |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Param("kind") String kind, |
| | | @Param("userId") String userId, |
| | | @Param("userIds") String userIds, |
| | | @Param("communityId") String communityId); |
| | | @Param("isDisplay") String isDisplay, |
| | | @Param("communityId") String communityId, |
| | | @Param("startTime") Date startTime, |
| | | @Param("endTime") Date endTime); |
| | | |
| | | IPage<NeedProblemInventoryDTO> getMyJoinList(Page page, |
| | | @Param("search") String search, |
| | | @Param("status") String status, |
| | | @Param("kind") String kind, |
| | | @Param("userIds") String userIds, |
| | | @Param("userId") String userId); |
| | | @Param("isDisplay") String isDisplay, |
| | | @Param("userId") String userId, |
| | | @Param("startTime") Date startTime, |
| | | @Param("endTime") Date endTime); |
| | | |
| | | NeedProblemInventoryDTO getDetails(@Param("id")String id,@Param("userIds") String userIds); |
| | | |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public interface NeedProblemInventoryService |
| | | { |
| | | |
| | | IPage<NeedProblemInventoryDTO> getList(int pageNum, int pageSize, |
| | | IPage<NeedProblemInventoryDTO> getList(int pageNum, |
| | | int pageSize, |
| | | String search, |
| | | String classifyId, |
| | | String status, |
| | | String kind, |
| | | String userId, |
| | | String userIds, |
| | | String communityId); |
| | | String isDisplay, |
| | | String communityId, |
| | | Date startTime, |
| | | Date endTime); |
| | | |
| | | IPage<NeedProblemInventoryDTO> getMyJoinList(int pageNum, int pageSize, |
| | | String search,String status, |
| | | String kind, |
| | | String userIds, |
| | | String userId); |
| | | String isDisplay, |
| | | String userId, |
| | | Date startTime, |
| | | Date endTime); |
| | | |
| | | NeedProblemInventoryDTO getDetails(String id,String userIds); |
| | | |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | String kind, |
| | | String userId, |
| | | String userIds, |
| | | String communityId) |
| | | String isDisplay, |
| | | String communityId, |
| | | Date startTime, |
| | | Date endTime) |
| | | { |
| | | Page page = new Page<>(pageNum,pageSize); |
| | | return baseMapper.getList(page, search, classifyId,status,kind,userId,userIds,communityId); |
| | | return baseMapper.getList(page, search, classifyId,status,kind,userId,userIds,isDisplay,communityId,startTime,endTime); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<NeedProblemInventoryDTO> getMyJoinList(int pageNum, int pageSize,String search,String status, |
| | | String kind, |
| | | String userIds, |
| | | String userId) { |
| | | String isDisplay, |
| | | String userId, |
| | | Date startTime, |
| | | Date endTime) { |
| | | Page page = new Page<>(pageNum,pageSize); |
| | | return baseMapper.getMyJoinList(page, search, status,kind,userIds,userId); |
| | | return baseMapper.getMyJoinList(page, search, status,kind,userIds,isDisplay,userId,startTime,endTime); |
| | | } |
| | | |
| | | @Override |
| | |
| | | update_time, |
| | | kind, |
| | | community_id, |
| | | is_display, |
| | | user_id |
| | | </sql> |
| | | |
| | |
| | | (count(task_id)) as joinNum, |
| | | nfnpc.service_time, |
| | | nfpi.status, |
| | | nfpi.is_display, |
| | | nfpi.user_id |
| | | FROM new_fight_need_problem_inventory as nfpi |
| | | left join com_act_neighbor_circle_topic_new as canct on canct.id=nfpi.classify_id |
| | |
| | | 1=1 |
| | | <if test="search !=null and search != '' "> |
| | | and nfpi.title like concat ('%',#{search},'%') |
| | | </if> |
| | | <if test="isDisplay !=null and isDisplay != '' "> |
| | | and nfpi.is_display=#{isDisplay} |
| | | </if> |
| | | <if test="classifyId !=null and classifyId != '' "> |
| | | and nfpi.classify_id=#{classifyId} |
| | |
| | | </if> |
| | | <if test="userId !=null and userId != '' "> |
| | | and nfpi.user_id =#{userId} |
| | | </if> |
| | | <if test="startTime != null"> |
| | | AND nfpi.creation_time <![CDATA[ >= ]]> #{startTime} |
| | | </if> |
| | | <if test="endTime != null"> |
| | | AND nfpi.creation_time <![CDATA[ <= ]]> #{endTime} |
| | | </if> |
| | | </where> |
| | | GROUP BY nfpi.id |
| | |
| | | if(nfnpc.user_id>0,1,0) as isJoin, |
| | | (count(task_id)) as joinNum, |
| | | nfpi.status, |
| | | nfpi.is_display, |
| | | nfpi.user_id |
| | | FROM new_fight_need_problem_inventory as nfpi |
| | | left join com_act_neighbor_circle_topic_new as canct on canct.id=nfpi.classify_id |
| | | left join new_fight_need_problem_claim as nfnpc on nfnpc.task_id=nfpi.id and nfnpc.user_id=#{userIds} |
| | | <where> |
| | | 1=1 |
| | | <if test="isDisplay !=null and isDisplay != '' "> |
| | | and nfpi.is_display=#{isDisplay} |
| | | </if> |
| | | <if test="search !=null and search != '' "> |
| | | and nfpi.title like concat ('%',#{search},'%') |
| | | </if> |
| | |
| | | </if> |
| | | <if test="userId !=null and userId != '' "> |
| | | and nfpi.id in(SELECT task_id FROM new_fight_need_problem_claim where user_id=#{userId} ) |
| | | </if> |
| | | <if test="startTime != null "> |
| | | AND nfpi.creation_time <![CDATA[ >= ]]> #{startTime} |
| | | </if> |
| | | <if test="endTime != null "> |
| | | AND nfpi.creation_time <![CDATA[ <= ]]> #{endTime} |
| | | </if> |
| | | </where> |
| | | GROUP BY nfpi.id |
| | |
| | | if(nfnpc.user_id>0,1,0) as isJoin, |
| | | (count(task_id)) as joinNum, |
| | | nfpi.status, |
| | | nfpi.is_display, |
| | | nfpi.user_id |
| | | FROM new_fight_need_problem_inventory as nfpi |
| | | left join com_act_neighbor_circle_topic_new as canct on canct.id=nfpi.classify_id |
| | |
| | | <if test="item.status != null and item.status !='' " > |
| | | status, |
| | | </if> |
| | | <if test="item.isDisplay != null and item.isDisplay !='' " > |
| | | is_display, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | |
| | | </if> |
| | | <if test="item.status != null and item.status !='' " > |
| | | #{item.status}, |
| | | </if> |
| | | <if test="item.isDisplay != null and item.isDisplay !='' " > |
| | | #{item.isDisplay}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | |
| | | <if test="item.status != null and item.status !='' " > |
| | | status=#{item.status}, |
| | | </if> |
| | | <if test="item.isDisplay != null and item.isDisplay !='' " > |
| | | is_display=#{item.isDisplay}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |