| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemClaimDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.UserRankDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.CommunityWestService; |
| | | import com.panzhihua.common.service.partybuilding.NewStriveForFeign; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | @Resource |
| | | private NewStriveForFeign newStriveForFeign; |
| | | |
| | | @ApiOperation(value = "获取党员个人排名", response = UserRankDTO.class) |
| | | @GetMapping("/NewStriveFor/getUserRank") |
| | | public R getUserRank() |
| | | { |
| | | return newStriveForFeign.getUserRank(getUserId()+""); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取党员排名列表", response = UserRankDTO.class) |
| | | @GetMapping("/NewStriveFor/getUserRankList") |
| | | public R getUserRankList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | |
| | | return newStriveForFeign.getUserRankList(pageNum,pageSize,getUserId()+""); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取累计积分") |
| | | @GetMapping("/getAllintegral") |
| | | public R getAllintegral(@RequestParam("type") String type, |
| | | @RequestParam("userId") String userId) |
| | | { |
| | | return newStriveForFeign.getAllintegral(type,userId); |
| | | } |
| | | |
| | | |
| | | /***************************************************************************************************************** |
| | | * |
| | | * 任务需求清单 |
| | | * |
| | | ******************************************************************************************************************/ |
| | | @ApiOperation(value = "任务需求清单列表", response = NeedProblemInventoryDTO.class) |
| | | @GetMapping("/NeedProblem/getList") |
| | | public R getNeedProblemList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "kind", required = false)String kind, |
| | | @RequestParam(value = "userId", required = false)String userId) |
| | | { |
| | | return newStriveForFeign.getNeedProblemList(pageNum,pageSize,kind,userId,getCommunityId()+""); |
| | | } |
| | | |
| | | @ApiOperation(value = "任务需求清单详情", response = NeedProblemInventoryDTO.class) |
| | | @GetMapping("/NeedProblem/getDetails") |
| | | public R getNeedProblemDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.getNeedProblemDetails(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增任务需求") |
| | | @PostMapping("/NeedProblem/addData") |
| | | public R addNeedProblemData(@RequestBody NeedProblemInventoryDTO item) |
| | | { |
| | | return newStriveForFeign.addNeedProblemData(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑任务需求") |
| | | @PostMapping("/NeedProblem/editData") |
| | | public R editNeedProblemData(@RequestBody NeedProblemInventoryDTO item) |
| | | { |
| | | return newStriveForFeign.editNeedProblemData(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除任务需求") |
| | | @DeleteMapping("/NeedProblem/expurgateData") |
| | | public R expurgateNeedProblemData(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.expurgateNeedProblemData(id); |
| | | } |
| | | |
| | | |
| | | /******************************************************************************************************* |
| | | * |
| | | * 任务需求报名 |
| | | * |
| | | *******************************************************************************************************/ |
| | | @ApiOperation(value = "任务报名列表", response = NeedProblemClaimDTO.class) |
| | | @GetMapping("/getNeedClaimList") |
| | | public R getNeedClaimList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "kind", required = false) String kind, |
| | | @RequestParam(value = "userId", required = false) String userId, |
| | | @RequestParam(value = "unitId", required = false) String unitId) |
| | | { |
| | | return newStriveForFeign.getNeedClaimList(pageNum,pageSize,kind,userId,unitId); |
| | | } |
| | | |
| | | @ApiOperation(value = "任务报名详情", response = NeedProblemClaimDTO.class) |
| | | @GetMapping("/getNeedClaimDetails") |
| | | public R getNeedClaimDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.getNeedClaimDetails(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "任务报名") |
| | | @PostMapping("/addNeedClaimData") |
| | | public R addNeedClaimData(@RequestBody NeedProblemClaimDTO item) |
| | | { |
| | | return newStriveForFeign.addNeedClaimData(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改任务报名") |
| | | @PostMapping("/editNeedClaimData") |
| | | public R editNeedClaimData(@RequestBody NeedProblemClaimDTO item) |
| | | { |
| | | return newStriveForFeign.editNeedClaimData(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "取消报名") |
| | | @DeleteMapping("/expurgateNeedClaimData") |
| | | public R expurgateNeedClaimData(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.expurgateNeedClaimData(id); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.partybuilding; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("新双争双评需求问题清单认领") |
| | | public class NeedProblemClaimDTO |
| | | { |
| | | @ApiModelProperty("主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty("任务id") |
| | | private String taskId; |
| | | |
| | | @ApiModelProperty("单位id") |
| | | private String unitId; |
| | | |
| | | @ApiModelProperty("领取人员id") |
| | | private String userId; |
| | | |
| | | @ApiModelProperty("服务时间") |
| | | private String serviceTime; |
| | | |
| | | @ApiModelProperty("打卡开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date punchStartTime; |
| | | |
| | | @ApiModelProperty("打卡结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date punchEndTime; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | |
| | | @ApiModelProperty("更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.partybuilding; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("新双争双评需求问题清单") |
| | | public class NeedProblemInventoryDTO |
| | | { |
| | | @ApiModelProperty("主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty("标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private String communityId; |
| | | |
| | | @ApiModelProperty("分类id") |
| | | private String classifyId; |
| | | |
| | | @ApiModelProperty("认领人数(-1 不限制) ") |
| | | private String claimNum; |
| | | |
| | | @ApiModelProperty("需求地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("认领开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date claimStartTime; |
| | | |
| | | @ApiModelProperty("认领结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date claimEndTime; |
| | | |
| | | @ApiModelProperty("需求开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date needStartTime; |
| | | |
| | | @ApiModelProperty("需求结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date needEndTime; |
| | | |
| | | @ApiModelProperty("联系人") |
| | | private String linkman; |
| | | |
| | | @ApiModelProperty("电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("联系电话") |
| | | private String signInScope; |
| | | |
| | | @ApiModelProperty("签到范围") |
| | | private String signOutScope; |
| | | |
| | | @ApiModelProperty("签退范围") |
| | | private String award; |
| | | |
| | | @ApiModelProperty("奖励") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("图片") |
| | | private String imgsUrl; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | |
| | | @ApiModelProperty("更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | @ApiModelProperty("1问题清单 2需求清单") |
| | | private String kind; |
| | | |
| | | @ApiModelProperty("创建人id") |
| | | private String userId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.partybuilding; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("任务需求单位任务") |
| | | public class NeedProblemUnitTaskDTO |
| | | { |
| | | @ApiModelProperty("主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty("标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private String communityId; |
| | | |
| | | @ApiModelProperty("分类id") |
| | | private String classifyId; |
| | | |
| | | @ApiModelProperty("认领人数") |
| | | private String claimNum; |
| | | |
| | | @ApiModelProperty("需求地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("认领开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date claimStartTime; |
| | | |
| | | @ApiModelProperty("认领结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date claimEndTime; |
| | | |
| | | @ApiModelProperty("需求开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date needStartTime; |
| | | |
| | | @ApiModelProperty("需求结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date needEndTime; |
| | | |
| | | @ApiModelProperty("联系人") |
| | | private String linkman; |
| | | |
| | | @ApiModelProperty("电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("联系电话") |
| | | private String signInScope; |
| | | |
| | | @ApiModelProperty("签到范围") |
| | | private String signOutScope; |
| | | |
| | | @ApiModelProperty("签退范围") |
| | | private String award; |
| | | |
| | | @ApiModelProperty("奖励") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("图片") |
| | | private String imgsUrl; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | |
| | | @ApiModelProperty("更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | @ApiModelProperty("1问题清单 2需求清单") |
| | | private String kind; |
| | | |
| | | @ApiModelProperty("创建人id") |
| | | private String userId; |
| | | |
| | | @ApiModelProperty("代单位接单人") |
| | | private String unitUserId; |
| | | |
| | | @ApiModelProperty("任务id") |
| | | private String taskId; |
| | | @ApiModelProperty("公司id") |
| | | private String unitId; |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.service.partybuilding; |
| | | |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemClaimDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * |
| | |
| | | public interface NewStriveForFeign |
| | | { |
| | | |
| | | |
| | | /************************************************************************************************************ |
| | | * |
| | | * 党员排序 |
| | | * |
| | | ************************************************************************************************************/ |
| | | |
| | | @GetMapping("/NewStriveFor/getUserRank") |
| | | public R getUserRank(@RequestParam("userId") String userId); |
| | | |
| | |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("userId") String userId); |
| | | |
| | | @GetMapping("/getAllintegral") |
| | | public R getAllintegral(@RequestParam("type") String type, |
| | | @RequestParam("userId") String userId); |
| | | |
| | | |
| | | |
| | | |
| | | /************************************************************************************************************ |
| | | * |
| | | * 问题需求清单 |
| | | * |
| | | ************************************************************************************************************/ |
| | | |
| | | |
| | | @GetMapping("/NeedProblem/getList") |
| | | public R getNeedProblemList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "kind", required = false)String kind, |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "communityId", required = false)String communityId); |
| | | |
| | | @GetMapping("/NeedProblem/getDetails") |
| | | public R getNeedProblemDetails(@RequestParam("id") String id); |
| | | |
| | | @PostMapping("/NeedProblem/addData") |
| | | public R addNeedProblemData(@RequestBody NeedProblemInventoryDTO item); |
| | | |
| | | @PostMapping("/NeedProblem/editData") |
| | | public R editNeedProblemData(@RequestBody NeedProblemInventoryDTO item); |
| | | |
| | | @DeleteMapping("/NeedProblem/expurgateData") |
| | | public R expurgateNeedProblemData(@RequestParam("id") String id); |
| | | |
| | | |
| | | /******************************************************************************************************* |
| | | * |
| | | * 任务需求报名 |
| | | * |
| | | *******************************************************************************************************/ |
| | | @GetMapping("/NeedClaim/getNeedClaimList") |
| | | public R getNeedClaimList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "kind", required = false) String kind, |
| | | @RequestParam(value = "userId", required = false) String userId, |
| | | @RequestParam(value = "unitId", required = false) String unitId); |
| | | |
| | | @GetMapping("/NeedClaim/getNeedClaimDetails") |
| | | public R getNeedClaimDetails(@RequestParam("id") String id); |
| | | |
| | | @PostMapping("/NeedClaim/addNeedClaimData") |
| | | public R addNeedClaimData(@RequestBody NeedProblemClaimDTO item); |
| | | |
| | | @PostMapping("/NeedClaim/editNeedClaimData") |
| | | public R editNeedClaimData(@RequestBody NeedProblemClaimDTO item); |
| | | |
| | | @DeleteMapping("/NeedClaim/expurgateNeedClaimData") |
| | | public R expurgateNeedClaimData(@RequestParam("id") String id); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemInventoryService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/NeedProblem") |
| | | public class NeedProblemApi |
| | | { |
| | | @Resource |
| | | private NeedProblemInventoryService inventoryService; |
| | | |
| | | @GetMapping("/getList") |
| | | public R getNeedProblemList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "kind", required = false)String kind, |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "communityId", required = false)String communityId) |
| | | { |
| | | return R.ok(inventoryService.getList(pageNum,pageSize,kind,userId,communityId)); |
| | | } |
| | | |
| | | @GetMapping("/getDetails") |
| | | public R getNeedProblemDetails(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(inventoryService.getDetails(id)); |
| | | } |
| | | |
| | | @PostMapping("/addData") |
| | | public R addNeedProblemData(@RequestBody NeedProblemInventoryDTO item) |
| | | { |
| | | return R.ok(inventoryService.addData(item)); |
| | | } |
| | | |
| | | @PostMapping("/editData") |
| | | public R editNeedProblemData(@RequestBody NeedProblemInventoryDTO item) |
| | | { |
| | | return R.ok(inventoryService.editData(item)); |
| | | } |
| | | |
| | | @DeleteMapping("/expurgateData") |
| | | public R expurgateNeedProblemData(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(inventoryService.expurgateData(id)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemClaimDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemClaimService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/NeedClaim") |
| | | public class NeedProblemClaimApi |
| | | { |
| | | @Resource |
| | | private NeedProblemClaimService claimService; |
| | | |
| | | @GetMapping("/getNeedClaimList") |
| | | public R getNeedClaimList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "kind", required = false) String kind, |
| | | @RequestParam(value = "userId", required = false) String userId, |
| | | @RequestParam(value = "unitId", required = false) String unitId) |
| | | { |
| | | return R.ok(claimService.getList(pageNum,pageSize,kind,userId,unitId)); |
| | | } |
| | | |
| | | @GetMapping("/getNeedClaimDetails") |
| | | public R getNeedClaimDetails(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(claimService.getDetails(id)); |
| | | } |
| | | |
| | | @PostMapping("/addNeedClaimData") |
| | | public R addNeedClaimData(@RequestBody NeedProblemClaimDTO item) |
| | | { |
| | | return claimService.addData(item); |
| | | } |
| | | |
| | | @PostMapping("/editNeedClaimData") |
| | | public R editNeedClaimData(@RequestBody NeedProblemClaimDTO item) |
| | | { |
| | | return claimService.editData(item); |
| | | } |
| | | |
| | | @DeleteMapping("/expurgateNeedClaimData") |
| | | public R expurgateNeedClaimData(@RequestParam("id") String id) |
| | | { |
| | | return claimService.expurgateData(id); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemUnitTaskDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemUnitTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/NeedTask") |
| | | public class NeedProblemUnitTaskApi |
| | | { |
| | | @Resource |
| | | private NeedProblemUnitTaskService taskService; |
| | | |
| | | @GetMapping("/getNeedTaskList") |
| | | public R getNeedTaskList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageNum") int pageSize, |
| | | @RequestParam(value = "unitId", required = false) String unitId) |
| | | { |
| | | return R.ok(taskService.getList(pageNum,pageSize,unitId)); |
| | | } |
| | | |
| | | @GetMapping("/getNeedTaskDetails") |
| | | public R getNeedTaskDetails(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(taskService.getDetails(id)); |
| | | } |
| | | |
| | | @PostMapping("/addNeedTaskData") |
| | | public R addNeedTaskData(@RequestBody NeedProblemUnitTaskDTO item) |
| | | { |
| | | return R.ok(taskService.addData(item)); |
| | | } |
| | | |
| | | @PostMapping("/editNeedTaskData") |
| | | public R editNeedTaskData(@RequestBody NeedProblemUnitTaskDTO item) |
| | | { |
| | | return R.ok(taskService.editData(item)); |
| | | } |
| | | |
| | | @DeleteMapping("/expurgateNeedTaskData") |
| | | public R expurgateNeedTaskData(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(taskService.expurgateData(id)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getAllintegral") |
| | | public R getAllintegral(@RequestParam("type") String type, |
| | | @RequestParam("userId") String userId) |
| | | { |
| | | return R.ok(forService.getAllintegral(type, userId)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemClaimDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党员双争双评排序 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-21 17:37 |
| | | **/ |
| | | @Mapper |
| | | public interface NeedProblemClaimDAO extends BaseMapper<NeedProblemClaimDTO> |
| | | { |
| | | |
| | | IPage<NeedProblemClaimDTO> getList(Page page,@Param("kind") String kind, |
| | | @Param("userId") String userId, |
| | | @Param("unitId") String unitId); |
| | | |
| | | NeedProblemClaimDTO getDetails(@Param("id")String id); |
| | | |
| | | int addData(@Param("item") NeedProblemClaimDTO userIds); |
| | | |
| | | int editData(@Param("item") NeedProblemClaimDTO userId); |
| | | |
| | | int expurgateData(@Param("id") String id); |
| | | |
| | | int getJionNum(@Param("taskId") String taskId, |
| | | @Param("userId") String userId); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.UserRankDTO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党员双争双评排序 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-21 17:37 |
| | | **/ |
| | | @Mapper |
| | | public interface NeedProblemInventoryDAO extends BaseMapper<NeedProblemInventoryDTO> |
| | | { |
| | | |
| | | IPage<NeedProblemInventoryDTO> getList(Page page,@Param("kind") String kind, |
| | | @Param("userId") String userId, |
| | | @Param("communityId") String communityId); |
| | | |
| | | NeedProblemInventoryDTO getDetails(@Param("id")String id); |
| | | |
| | | int addData(@Param("item") NeedProblemInventoryDTO userIds); |
| | | |
| | | int editData(@Param("item") NeedProblemInventoryDTO userId); |
| | | |
| | | int expurgateData(@Param("id") String id); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemUnitTaskDTO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党员双争双评排序 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-21 17:37 |
| | | **/ |
| | | @Mapper |
| | | public interface NeedProblemUnitTaskDAO extends BaseMapper<NeedProblemUnitTaskDTO> |
| | | { |
| | | |
| | | |
| | | IPage<NeedProblemUnitTaskDTO> getList(Page page, |
| | | @Param("unitId") String unitId); |
| | | |
| | | NeedProblemUnitTaskDTO getDetails(@Param("id")String id); |
| | | |
| | | int addData(@Param("item") NeedProblemUnitTaskDTO userIds); |
| | | |
| | | int editData(@Param("item") NeedProblemUnitTaskDTO userId); |
| | | |
| | | int expurgateData(@Param("id") String id); |
| | | |
| | | } |
| | |
| | | |
| | | IPage<UserRankDTO> getUserRankList(Page page,@Param("userId")String userId); |
| | | |
| | | String getAllintegral(@Param("userIds") List<String> userIds); |
| | | |
| | | List<String> getPartyMember(@Param("userId") String userId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemClaimDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党组织 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 11:39 |
| | | **/ |
| | | public interface NeedProblemClaimService |
| | | { |
| | | |
| | | IPage<NeedProblemClaimDTO> getList(int pageNum, int pageSize, String kind, String userId,String unitId); |
| | | |
| | | NeedProblemClaimDTO getDetails(String id); |
| | | |
| | | R addData(NeedProblemClaimDTO item); |
| | | |
| | | R editData(NeedProblemClaimDTO item); |
| | | |
| | | R expurgateData(String id); |
| | | |
| | | int getJionNum(String taskId,String userId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.UserRankDTO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党组织 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 11:39 |
| | | **/ |
| | | public interface NeedProblemInventoryService |
| | | { |
| | | |
| | | IPage<NeedProblemInventoryDTO> getList(int pageNum, int pageSize, String kind,String userId,String communityId); |
| | | |
| | | NeedProblemInventoryDTO getDetails(String id); |
| | | |
| | | int addData(NeedProblemInventoryDTO item); |
| | | |
| | | int editData(NeedProblemInventoryDTO item); |
| | | |
| | | int expurgateData(String id); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemUnitTaskDTO; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党组织 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 11:39 |
| | | **/ |
| | | public interface NeedProblemUnitTaskService |
| | | { |
| | | |
| | | IPage<NeedProblemUnitTaskDTO> getList(int pageNum, int pageSize, String unitId); |
| | | |
| | | NeedProblemUnitTaskDTO getDetails(String id); |
| | | |
| | | int addData(NeedProblemUnitTaskDTO item); |
| | | |
| | | int editData(NeedProblemUnitTaskDTO item); |
| | | |
| | | int expurgateData(String id); |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.partybuilding.west.PartyOrganizationVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | UserRankDTO getUserRank(String userId); |
| | | |
| | | IPage<UserRankDTO> getUserRankList(int pageNum,int pageSize,String userId); |
| | | |
| | | String getAllintegral(String type,String userId); |
| | | |
| | | List<String> getPartyMember(String userId); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemClaimDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_dangjian.dao.NeedProblemClaimDAO; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemClaimService; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemInventoryService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党组织 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 11:40 |
| | | **/ |
| | | @Service |
| | | public class NeedProblemClaimServiceImpl extends ServiceImpl<NeedProblemClaimDAO, NeedProblemClaimDTO> |
| | | implements NeedProblemClaimService |
| | | { |
| | | //任务 问题接口 |
| | | @Resource |
| | | private NeedProblemInventoryService inventoryService; |
| | | |
| | | @Override |
| | | public IPage<NeedProblemClaimDTO> getList(int pageNum, int pageSize, |
| | | String kind, String userId,String unitId) |
| | | { |
| | | Page page = new Page<>(pageNum,pageSize); |
| | | return baseMapper.getList(page,kind,userId,unitId); |
| | | } |
| | | |
| | | @Override |
| | | public NeedProblemClaimDTO getDetails(String id) { |
| | | return baseMapper.getDetails(id); |
| | | } |
| | | |
| | | @Override |
| | | public R addData(NeedProblemClaimDTO item) |
| | | { |
| | | //任务问题详情 |
| | | NeedProblemInventoryDTO inventoryDTO=inventoryService.getDetails(item.getTaskId()); |
| | | long times=System.currentTimeMillis(); |
| | | if(times<inventoryDTO.getClaimStartTime().getTime()) |
| | | { |
| | | return R.fail("报名未开始"); |
| | | } |
| | | |
| | | if(times>inventoryDTO.getClaimEndTime().getTime()) |
| | | { |
| | | return R.fail("报名已结束"); |
| | | } |
| | | int isJion= baseMapper.getJionNum(item.getTaskId(),item.getUserId()); |
| | | if(isJion>0) |
| | | { |
| | | return R.fail("您已报名!"); |
| | | } |
| | | |
| | | int peopleAstrict=0; |
| | | if(!StringUtils.isEmpty(inventoryDTO.getClaimNum())) |
| | | { |
| | | peopleAstrict=Integer.valueOf(inventoryDTO.getClaimNum()); |
| | | } |
| | | |
| | | if(peopleAstrict>0) |
| | | { |
| | | //活动参与人数 |
| | | int jionNum= baseMapper.getJionNum(item.getTaskId(),null); |
| | | if(peopleAstrict<=jionNum) |
| | | { |
| | | return R.fail("参与人数已满"); |
| | | } |
| | | } |
| | | return R.ok(baseMapper.addData(item)); |
| | | } |
| | | |
| | | @Override |
| | | public R editData(NeedProblemClaimDTO item) |
| | | { |
| | | int num=baseMapper.editData(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R expurgateData(String id) |
| | | { |
| | | //报名信息 |
| | | NeedProblemClaimDTO claimDTO=baseMapper.getDetails(id); |
| | | NeedProblemInventoryDTO inventoryDTO=inventoryService.getDetails(claimDTO.getTaskId()); |
| | | long times=System.currentTimeMillis(); |
| | | |
| | | if(times>inventoryDTO.getNeedStartTime().getTime()) |
| | | { |
| | | return R.fail("任务已开始!不能取消"); |
| | | } |
| | | |
| | | int num=baseMapper.expurgateData(id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public int getJionNum(String taskId,String userId) |
| | | { |
| | | return baseMapper.getJionNum(taskId,userId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.UserRankDTO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_dangjian.dao.NeedProblemInventoryDAO; |
| | | import com.panzhihua.service_dangjian.dao.NewStriveForDAO; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemInventoryService; |
| | | import com.panzhihua.service_dangjian.service.NewStriveForService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党组织 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 11:40 |
| | | **/ |
| | | @Service |
| | | public class NeedProblemInventoryServiceImpl extends ServiceImpl<NeedProblemInventoryDAO, NeedProblemInventoryDTO> |
| | | implements NeedProblemInventoryService |
| | | { |
| | | |
| | | |
| | | @Override |
| | | public IPage<NeedProblemInventoryDTO> getList(int pageNum, int pageSize, String kind, String userId,String communityId) |
| | | { |
| | | Page page = new Page<>(pageNum,pageSize); |
| | | return baseMapper.getList(page,kind,userId,communityId); |
| | | } |
| | | |
| | | @Override |
| | | public NeedProblemInventoryDTO getDetails(String id) { |
| | | return baseMapper.getDetails(id); |
| | | } |
| | | |
| | | @Override |
| | | public int addData(NeedProblemInventoryDTO item) { |
| | | return baseMapper.addData(item); |
| | | } |
| | | |
| | | @Override |
| | | public int editData(NeedProblemInventoryDTO item) { |
| | | return baseMapper.editData(item); |
| | | } |
| | | |
| | | @Override |
| | | public int expurgateData(String id) { |
| | | return baseMapper.expurgateData(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemUnitTaskDTO; |
| | | import com.panzhihua.service_dangjian.dao.NeedProblemInventoryDAO; |
| | | import com.panzhihua.service_dangjian.dao.NeedProblemUnitTaskDAO; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemInventoryService; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemUnitTaskService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党组织 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 11:40 |
| | | **/ |
| | | @Service |
| | | public class NeedProblemUnitTaskServiceImpl extends ServiceImpl<NeedProblemUnitTaskDAO, NeedProblemUnitTaskDTO> |
| | | implements NeedProblemUnitTaskService |
| | | { |
| | | |
| | | |
| | | @Override |
| | | public IPage<NeedProblemUnitTaskDTO> getList(int pageNum, int pageSize, String unitId) |
| | | { |
| | | Page page = new Page<>(pageNum,pageSize); |
| | | return baseMapper.getList(page,unitId); |
| | | } |
| | | |
| | | @Override |
| | | public NeedProblemUnitTaskDTO getDetails(String id) |
| | | { |
| | | return baseMapper.getDetails(id); |
| | | } |
| | | |
| | | @Override |
| | | public int addData(NeedProblemUnitTaskDTO item) { |
| | | return baseMapper.addData(item); |
| | | } |
| | | |
| | | @Override |
| | | public int editData(NeedProblemUnitTaskDTO item) { |
| | | return baseMapper.editData(item); |
| | | } |
| | | |
| | | @Override |
| | | public int expurgateData(String id) { |
| | | return baseMapper.expurgateData(id); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.partybuilding.UserRankDTO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_dangjian.dao.NewStriveForDAO; |
| | | import com.panzhihua.service_dangjian.service.NewStriveForService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | return baseMapper.getUserRankList(page,userId); |
| | | } |
| | | |
| | | @Override |
| | | public String getAllintegral(String type,String userId) |
| | | { |
| | | if(StringUtils.equals("1",type)) |
| | | { |
| | | return baseMapper.getAllintegral(null); |
| | | } |
| | | else |
| | | { |
| | | List<String> userIds=baseMapper.getPartyMember(userId); |
| | | return baseMapper.getAllintegral(userIds); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<String> getPartyMember(String userId) { |
| | | return baseMapper.getPartyMember(userId); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_dangjian.dao.NeedProblemClaimDAO"> |
| | | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, |
| | | task_id, |
| | | user_id, |
| | | punch_start_time, |
| | | punch_end_time, |
| | | service_time, |
| | | unit_id, |
| | | creation_time, |
| | | update_time |
| | | </sql> |
| | | |
| | | |
| | | <select id="getList" resultType="com.panzhihua.common.model.dtos.partybuilding.NeedProblemClaimDTO"> |
| | | SELECT |
| | | <include refid="Base_Column_List" /> |
| | | FROM |
| | | new_fight_need_problem_claim |
| | | <where> |
| | | 1=1 |
| | | <if test="taskId !=null and taskId != '' "> |
| | | and task_id =#{taskId} |
| | | </if> |
| | | <if test="userId !=null and userId != '' "> |
| | | and user_id =#{userId} |
| | | </if> |
| | | <if test="unitId !=null and unitId != '' "> |
| | | and unit_id =#{unitId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="getDetails" resultType="com.panzhihua.common.model.dtos.partybuilding.NeedProblemClaimDTO"> |
| | | SELECT |
| | | <include refid="Base_Column_List" /> |
| | | FROM |
| | | new_fight_need_problem_claim |
| | | <where> |
| | | 1=1 |
| | | <if test="id !=null and id != '' "> |
| | | and id =#{id} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <insert id="addData"> |
| | | insert into new_fight_need_problem_claim |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null" > |
| | | id, |
| | | </if> |
| | | <if test="item.taskId != null and item.taskId != '' " > |
| | | task_id, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' " > |
| | | user_id, |
| | | </if> |
| | | <if test="item.punchStartTime != null" > |
| | | punch_start_time, |
| | | </if> |
| | | <if test="item.punchEndTime != null" > |
| | | punch_end_time, |
| | | </if> |
| | | <if test="item.serviceTime != null and item.serviceTime != '' " > |
| | | service_time, |
| | | </if> |
| | | <if test="item.unitId !=null and item.unitId != '' "> |
| | | unit_id, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null" > |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.taskId != null and item.taskId != '' " > |
| | | #{item.taskId}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' " > |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.punchStartTime != null" > |
| | | #{item.punchStartTime}, |
| | | </if> |
| | | <if test="item.punchEndTime != null" > |
| | | #{item.punchEndTime}, |
| | | </if> |
| | | <if test="item.serviceTime != null and item.serviceTime != '' " > |
| | | #{item.serviceTime}, |
| | | </if> |
| | | <if test="item.unitId !=null and item.unitId != '' "> |
| | | #{item.unitId}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editData"> |
| | | update new_fight_need_problem_claim |
| | | <set> |
| | | <if test="item.id != null" > |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.taskId != null and item.taskId != '' " > |
| | | task_id=#{item.taskId}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' " > |
| | | user_id=#{item.userId}, |
| | | </if> |
| | | <if test="item.punchStartTime != null" > |
| | | punch_start_time=#{item.punchStartTime}, |
| | | </if> |
| | | <if test="item.punchEndTime != null" > |
| | | punch_end_time=#{item.punchEndTime}, |
| | | </if> |
| | | <if test="item.serviceTime != null and item.serviceTime != '' " > |
| | | service_time=#{item.serviceTime}, |
| | | </if> |
| | | <if test="item.unitId !=null and item.unitId != '' "> |
| | | unit_id=#{item.unitId}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <delete id="expurgateData" parameterType="String"> |
| | | delete from new_fight_need_problem_claim where id=#{id} |
| | | </delete> |
| | | |
| | | <select id="getJionNum" resultType="int"> |
| | | SELECT |
| | | count(id) |
| | | FROM |
| | | new_fight_need_problem_claim |
| | | <where> |
| | | 1=1 |
| | | <if test="taskId !=null and taskId != '' "> |
| | | and task_id =#{taskId} |
| | | </if> |
| | | <if test="userId !=null and userId != '' "> |
| | | and user_id =#{userId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | | |
New file |
| | |
| | | <?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.panzhihua.service_dangjian.dao.NeedProblemInventoryDAO"> |
| | | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, |
| | | title, |
| | | classify_id, |
| | | claim_num, |
| | | address, |
| | | lat, |
| | | lon, |
| | | claim_start_time, |
| | | claim_end_time, |
| | | need_start_time, |
| | | need_end_time, |
| | | linkman, |
| | | phone, |
| | | sign_in_scope, |
| | | sign_out_scope, |
| | | award, |
| | | content, |
| | | imgs_url, |
| | | creation_time, |
| | | update_time, |
| | | kind, |
| | | community_id, |
| | | user_id |
| | | </sql> |
| | | |
| | | |
| | | <select id="getList" resultType="com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO"> |
| | | SELECT |
| | | <include refid="Base_Column_List" /> |
| | | FROM |
| | | new_fight_need_problem_inventory |
| | | <where> |
| | | 1=1 |
| | | <if test="kind !=null and kind != '' "> |
| | | and kind =#{kind} |
| | | </if> |
| | | <if test="communityId !=null and communityId != '' "> |
| | | and community_id =#{communityId} |
| | | </if> |
| | | <if test="userId !=null and userId != '' "> |
| | | and user_id =#{userId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="getDetails" resultType="com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO"> |
| | | SELECT |
| | | <include refid="Base_Column_List" /> |
| | | FROM |
| | | new_fight_need_problem_inventory |
| | | <where> |
| | | 1=1 |
| | | <if test="id !=null and id != '' "> |
| | | and id =#{id} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <insert id="addData"> |
| | | insert into new_fight_need_problem_inventory |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null" > |
| | | id, |
| | | </if> |
| | | <if test="item.title != null and item.title !='' " > |
| | | title, |
| | | </if> |
| | | <if test="item.classifyId != null and item.classifyId !='' " > |
| | | classify_id, |
| | | </if> |
| | | <if test="item.claimNum != null and item.claimNum !='' " > |
| | | claim_num, |
| | | </if> |
| | | <if test="item.address != null and item.address !='' " > |
| | | address, |
| | | </if> |
| | | <if test="item.lat != null and item.lat !='' " > |
| | | lat, |
| | | </if> |
| | | <if test="item.lon != null and item.lon !='' " > |
| | | lon, |
| | | </if> |
| | | <if test="item.claimStartTime != null" > |
| | | claim_start_time, |
| | | </if> |
| | | <if test="item.claimEndTime != null " > |
| | | claim_end_time, |
| | | </if> |
| | | <if test="item.needStartTime != null" > |
| | | need_start_time, |
| | | </if> |
| | | <if test="item.needEndTime != null" > |
| | | need_end_time, |
| | | </if> |
| | | <if test="item.linkman != null and item.linkman !='' " > |
| | | linkman, |
| | | </if> |
| | | <if test="item.phone != null and item.phone !='' " > |
| | | phone, |
| | | </if> |
| | | <if test="item.signInScope != null and item.signInScope !='' " > |
| | | sign_in_scope, |
| | | </if> |
| | | <if test="item.signOutScope != null and item.signOutScope !='' " > |
| | | sign_out_scope, |
| | | </if> |
| | | <if test="item.award != null and item.award !='' " > |
| | | award, |
| | | </if> |
| | | <if test="item.content != null and item.content !='' " > |
| | | content, |
| | | </if> |
| | | <if test="item.imgsUrl != null and item.imgsUrl !='' " > |
| | | imgs_url, |
| | | </if> |
| | | <if test="item.kind != null and item.kind !='' " > |
| | | kind, |
| | | </if> |
| | | <if test="item.userId != null and item.userId !='' " > |
| | | user_id, |
| | | </if> |
| | | <if test="item.communityId != null and item.communityId !='' " > |
| | | community_id, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null" > |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.title != null and item.title !='' " > |
| | | #{item.title}, |
| | | </if> |
| | | <if test="item.classifyId != null and item.classifyId !='' " > |
| | | #{item.classifyId}, |
| | | </if> |
| | | <if test="item.claimNum != null and item.claimNum !='' " > |
| | | #{item.claimNum}, |
| | | </if> |
| | | <if test="item.address != null and item.address !='' " > |
| | | #{item.address}, |
| | | </if> |
| | | <if test="item.lat != null and item.lat !='' " > |
| | | #{item.lat}, |
| | | </if> |
| | | <if test="item.lon != null and item.lon !='' " > |
| | | #{item.lon}, |
| | | </if> |
| | | <if test="item.claimStartTime != null" > |
| | | #{item.claimStartTime}, |
| | | </if> |
| | | <if test="item.claimEndTime != null " > |
| | | #{item.claimEndTime}, |
| | | </if> |
| | | <if test="item.needStartTime != null" > |
| | | #{item.needStartTime}, |
| | | </if> |
| | | <if test="item.needEndTime != null" > |
| | | #{item.needEndTime}, |
| | | </if> |
| | | <if test="item.linkman != null and item.linkman !='' " > |
| | | #{item.linkman}, |
| | | </if> |
| | | <if test="item.phone != null and item.phone !='' " > |
| | | #{item.phone}, |
| | | </if> |
| | | <if test="item.signInScope != null and item.signInScope !='' " > |
| | | #{item.signInScope}, |
| | | </if> |
| | | <if test="item.signOutScope != null and item.signOutScope !='' " > |
| | | #{item.signOutScope}, |
| | | </if> |
| | | <if test="item.award != null and item.award !='' " > |
| | | #{item.award}, |
| | | </if> |
| | | <if test="item.content != null and item.content !='' " > |
| | | #{item.content}, |
| | | </if> |
| | | <if test="item.imgsUrl != null and item.imgsUrl !='' " > |
| | | #{item.imgsUrl}, |
| | | </if> |
| | | <if test="item.kind != null and item.kind !='' " > |
| | | #{item.kind}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId !='' " > |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.communityId != null and item.communityId !='' " > |
| | | #{communityId}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editData"> |
| | | update new_fight_need_problem_inventory |
| | | <set> |
| | | <if test="item.id != null" > |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.id != null" > |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.title != null and item.title !='' " > |
| | | title=#{item.title}, |
| | | </if> |
| | | <if test="item.classifyId != null and item.classifyId !='' " > |
| | | classify_id=#{item.classifyId}, |
| | | </if> |
| | | <if test="item.claimNum != null and item.claimNum !='' " > |
| | | claim_num=#{item.claimNum}, |
| | | </if> |
| | | <if test="item.address != null and item.address !='' " > |
| | | address=#{item.address}, |
| | | </if> |
| | | <if test="item.lat != null and item.lat !='' " > |
| | | lat=#{item.lat}, |
| | | </if> |
| | | <if test="item.lon != null and item.lon !='' " > |
| | | lon=#{item.lon}, |
| | | </if> |
| | | <if test="item.claimStartTime != null" > |
| | | claim_start_time=#{item.claimStartTime}, |
| | | </if> |
| | | <if test="item.claimEndTime != null " > |
| | | claim_end_time=#{item.claimEndTime}, |
| | | </if> |
| | | <if test="item.needStartTime != null" > |
| | | need_start_time=#{item.needStartTime}, |
| | | </if> |
| | | <if test="item.needEndTime != null" > |
| | | need_end_time=#{item.needEndTime}, |
| | | </if> |
| | | <if test="item.linkman != null and item.linkman !='' " > |
| | | linkman=#{item.linkman}, |
| | | </if> |
| | | <if test="item.phone != null and item.phone !='' " > |
| | | phone=#{item.phone}, |
| | | </if> |
| | | <if test="item.signInScope != null and item.signInScope !='' " > |
| | | sign_in_scope=#{item.signInScope}, |
| | | </if> |
| | | <if test="item.signOutScope != null and item.signOutScope !='' " > |
| | | sign_out_scope=#{item.signOutScope}, |
| | | </if> |
| | | <if test="item.award != null and item.award !='' " > |
| | | award=#{item.award}, |
| | | </if> |
| | | <if test="item.content != null and item.content !='' " > |
| | | content=#{item.content}, |
| | | </if> |
| | | <if test="item.imgsUrl != null and item.imgsUrl !='' " > |
| | | imgs_url=#{item.imgsUrl}, |
| | | </if> |
| | | <if test="item.kind != null and item.kind !='' " > |
| | | kind=#{item.kind}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId !='' " > |
| | | user_id=#{item.userId}, |
| | | </if> |
| | | <if test="item.communityId != null and item.communityId !='' " > |
| | | community_id=#{communityId}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <delete id="expurgateData" parameterType="String"> |
| | | delete from new_fight_need_problem_inventory where id=#{id} |
| | | </delete> |
| | | |
| | | |
| | | <!-- <foreach collection="userIds" item="ids" index="index"--> |
| | | <!-- open="(" close=")" separator=",">--> |
| | | <!-- #{ids}--> |
| | | <!-- </foreach>--> |
| | | |
| | | |
| | | </mapper> |
| | | |
New file |
| | |
| | | <?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.panzhihua.service_dangjian.dao.NeedProblemUnitTaskDAO"> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, |
| | | task_id, |
| | | user_id, |
| | | unit_id, |
| | | creation_time, |
| | | update_time |
| | | </sql> |
| | | |
| | | <select id="getList" resultType="com.panzhihua.common.model.dtos.partybuilding.NeedProblemUnitTaskDTO"> |
| | | SELECT |
| | | npi.title, |
| | | npi.classify_id, |
| | | npi.claim_num, |
| | | npi.address, |
| | | npi.lat, |
| | | npi.lon, |
| | | npi.claim_start_time, |
| | | npi.claim_end_time, |
| | | npi.need_start_time, |
| | | npi.need_end_time, |
| | | npi.linkman, |
| | | npi.phone, |
| | | npi.sign_in_scope, |
| | | npi.sign_out_scope, |
| | | npi.award, |
| | | npi.content, |
| | | npi.imgs_url, |
| | | npi.kind, |
| | | npi.community_id, |
| | | npi.user_id, |
| | | nput.id, |
| | | nput.task_id, |
| | | nput.user_id as unitUserId, |
| | | nput.unit_id, |
| | | nput.creation_time, |
| | | nput.update_time |
| | | FROM |
| | | new_fight_need_problem_unit_task as nput |
| | | LEFT JOIN new_fight_need_problem_inventory AS npi ON npi.task_id=nput.id |
| | | <where> |
| | | 1=1 |
| | | <if test="unitId !=null and unitId != '' "> |
| | | and nput.unit_id =#{unitId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getDetails" resultType="com.panzhihua.common.model.dtos.partybuilding.NeedProblemUnitTaskDTO"> |
| | | SELECT |
| | | npi.title, |
| | | npi.classify_id, |
| | | npi.claim_num, |
| | | npi.address, |
| | | npi.lat, |
| | | npi.lon, |
| | | npi.claim_start_time, |
| | | npi.claim_end_time, |
| | | npi.need_start_time, |
| | | npi.need_end_time, |
| | | npi.linkman, |
| | | npi.phone, |
| | | npi.sign_in_scope, |
| | | npi.sign_out_scope, |
| | | npi.award, |
| | | npi.content, |
| | | npi.imgs_url, |
| | | npi.kind, |
| | | npi.community_id, |
| | | npi.user_id, |
| | | nput.id, |
| | | nput.task_id, |
| | | nput.user_id as unitUserId, |
| | | nput.unit_id, |
| | | nput.creation_time, |
| | | nput.update_time |
| | | FROM new_fight_need_problem_unit_task as nput |
| | | LEFT JOIN new_fight_need_problem_inventory AS npi ON npi.task_id=nput.id |
| | | <where> |
| | | 1=1 |
| | | <if test="id !=null and id != '' "> |
| | | and nput.id =#{id} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <insert id="addData"> |
| | | insert into new_fight_need_problem_unit_task |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null" > |
| | | id, |
| | | </if> |
| | | <if test="item.taskId != null and item.taskId != '' " > |
| | | task_id, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' " > |
| | | user_id, |
| | | </if> |
| | | <if test="item.unitId != null and item.unitId != '' " > |
| | | unit_id, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null" > |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.taskId != null and item.taskId != '' " > |
| | | #{item.taskId}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' " > |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.unitId != null and item.unitId != '' " > |
| | | #{item.unitId}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editData"> |
| | | update new_fight_need_problem_unit_task |
| | | <set> |
| | | <if test="item.id != null" > |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.taskId != null and item.taskId != '' " > |
| | | task_id=#{item.taskId}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' " > |
| | | user_id=#{item.userId}, |
| | | </if> |
| | | <if test="item.unitId != null and item.unitId != '' " > |
| | | unit_id=#{item.unitId}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <delete id="expurgateData" parameterType="String"> |
| | | delete from new_fight_need_problem_unit_task where id=#{id} |
| | | </delete> |
| | | |
| | | |
| | | </mapper> |
| | | |
| | |
| | | ,(SELECT @row_number:=0) AS t |
| | | </select> |
| | | |
| | | <select id="getAllintegral" resultType="String"> |
| | | SELECT |
| | | SUM(caiu.integral_sum) as amount |
| | | FROM |
| | | com_act_integral_user |
| | | <where> |
| | | 1=1 |
| | | <if test="userIds !=null "> |
| | | and user_id in |
| | | <foreach collection="userIds" item="ids" index="index" |
| | | open="(" close=")" separator=","> |
| | | #{ids} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getPartyMember" resultType="String"> |
| | | SELECT |
| | | cpm.user_id |
| | | FROM com_pb_member as cpm |
| | | WHERE cpm.check_unit_id=(SELECT check_unit_id FROM com_pb_member WHERE user_id=#{userId}) |
| | | </select> |
| | | |
| | | |
| | | |
| | | </mapper> |
| | | |