| | |
| | | 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.NeedProblemUnitTaskDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.UserRankDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.partybuilding.NewStriveForFeign; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | |
| | | } |
| | | |
| | | |
| | | /******************************************************************************************************************* |
| | | * |
| | | * 新双争双评社区共建 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | |
| | | @ApiOperation(value = "社区共建项目列表", response = NewFightCommunityConstructionDTO.class) |
| | | @GetMapping("/NewFightCommunity/getNeedClaimList") |
| | | public R getNewFightCommunityList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | { |
| | | return newStriveForFeign.getNewFightCommunityList(pageNum,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区共建项目删除", response = NewFightCommunityConstructionDTO.class) |
| | | @GetMapping("/getNeedClaimDetails") |
| | | public R getNewFightCommunityDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.getNewFightCommunityDetails(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区共建项目添加") |
| | | @PostMapping("/addNeedClaimData") |
| | | public R addNewFightCommunityData(@RequestBody NewFightCommunityConstructionDTO item) |
| | | { |
| | | return newStriveForFeign.addNewFightCommunityData(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区共建项目编辑") |
| | | @PostMapping("/editNeedClaimData") |
| | | public R editNewFightCommunityData(@RequestBody NewFightCommunityConstructionDTO item) |
| | | { |
| | | return newStriveForFeign.editNewFightCommunityData(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区共建项目删除") |
| | | @DeleteMapping("/expurgateNeedClaimData") |
| | | public R expurgateNewFightCommunityData(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.expurgateNewFightCommunityData(id); |
| | | } |
| | | |
| | | |
| | | /************************************************************************************************************** |
| | | * |
| | | * 项目规划 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | @ApiOperation(value = "项目规划列表", response = NewFightCommunityConstructionDTO.class) |
| | | @GetMapping("/getProjectPlanList") |
| | | public R getProjectPlanList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("projectId") String projectId) |
| | | { |
| | | return newStriveForFeign.getProjectPlanList(pageNum,pageSize,projectId); |
| | | } |
| | | |
| | | @ApiOperation(value = "项目规划详情", response = NewFightCommunityConstructionDTO.class) |
| | | @GetMapping("/getProjectPlanDetails") |
| | | public R getProjectPlanDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.getProjectPlanDetails(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "项目规划添加") |
| | | @PostMapping("/addProjectPlanData") |
| | | public R addProjectPlanData(@RequestBody NewFightProjectPlanDTO item) |
| | | { |
| | | return newStriveForFeign.addProjectPlanData(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "项目规划编辑") |
| | | @PostMapping("/editProjectPlanData") |
| | | public R editProjectPlanData(@RequestBody NewFightProjectPlanDTO item) |
| | | { |
| | | return newStriveForFeign.editProjectPlanData(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "项目规划删除") |
| | | @DeleteMapping("/expurgateProjectPlanData") |
| | | public R expurgateProjectPlanData(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.expurgateProjectPlanData(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 NewFightCommunityConstructionDTO |
| | | { |
| | | @ApiModelProperty("主键") |
| | | private String id; |
| | | |
| | | |
| | | @ApiModelProperty("项目封面") |
| | | private String itemCover; |
| | | |
| | | @ApiModelProperty("项目标题") |
| | | private String itemTitle; |
| | | |
| | | @ApiModelProperty("协议标题") |
| | | private String agreementTitle; |
| | | |
| | | |
| | | @ApiModelProperty("协议内容") |
| | | private String agreementContent; |
| | | |
| | | @ApiModelProperty("共建社区id") |
| | | private String constructionCommunityId; |
| | | |
| | | @ApiModelProperty("创建人id") |
| | | private String userId; |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private String communityId; |
| | | |
| | | @ApiModelProperty("预计完工时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date estimatedTime; |
| | | |
| | | @ApiModelProperty("协议定制时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date agreementCustomizationTime; |
| | | |
| | | @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 NewFightProjectPlanDTO |
| | | { |
| | | @ApiModelProperty("主键") |
| | | private String id; |
| | | |
| | | |
| | | @ApiModelProperty("项目id") |
| | | private String projectId; |
| | | |
| | | @ApiModelProperty("协议规划") |
| | | private String agreementPlan; |
| | | |
| | | @ApiModelProperty("完工节点") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date completionTime; |
| | | |
| | | @ApiModelProperty("规划内容") |
| | | private String planContent; |
| | | |
| | | @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; |
| | | |
| | | } |
| | |
| | | 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.dtos.partybuilding.NeedProblemUnitTaskDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * |
| | |
| | | public R expurgateNeedTaskData(@RequestParam("id") String id); |
| | | |
| | | |
| | | /******************************************************************************************************************* |
| | | * |
| | | * 新双争双评社区共建 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | @GetMapping("/NewFightCommunity/getNeedClaimList") |
| | | public R getNewFightCommunityList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize); |
| | | |
| | | @GetMapping("/getNeedClaimDetails") |
| | | public R getNewFightCommunityDetails(@RequestParam("id") String id); |
| | | |
| | | @PostMapping("/addNeedClaimData") |
| | | public R addNewFightCommunityData(@RequestBody NewFightCommunityConstructionDTO item); |
| | | |
| | | @PostMapping("/editNeedClaimData") |
| | | public R editNewFightCommunityData(@RequestBody NewFightCommunityConstructionDTO item); |
| | | |
| | | @DeleteMapping("/expurgateNeedClaimData") |
| | | public R expurgateNewFightCommunityData(@RequestParam("id") String id); |
| | | |
| | | |
| | | /************************************************************************************************************** |
| | | * |
| | | * 项目规划 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | |
| | | @GetMapping("/NewFightCommunity/getProjectPlanList") |
| | | public R getProjectPlanList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("projectId") String projectId); |
| | | |
| | | @GetMapping("/NewFightCommunity/getProjectPlanDetails") |
| | | public R getProjectPlanDetails(@RequestParam("id") String id); |
| | | |
| | | @PostMapping("/NewFightCommunity/addProjectPlanData") |
| | | public R addProjectPlanData(@RequestBody NewFightProjectPlanDTO item); |
| | | |
| | | @PostMapping("/NewFightCommunity/editProjectPlanData") |
| | | public R editProjectPlanData(@RequestBody NewFightProjectPlanDTO item); |
| | | |
| | | @DeleteMapping("/NewFightCommunity/expurgateProjectPlanData") |
| | | public R expurgateProjectPlanData(@RequestParam("id") String id); |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.panzhihua.service_dangjian.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.partybuilding.NewFightCommunityConstructionDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NewFightProjectPlanDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_dangjian.service.NewFightCommunityConstructionService; |
| | | import com.panzhihua.service_dangjian.service.NewFightProjectPlanService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/NewFightCommunity") |
| | | public class NewFightCommunityConstructionApi |
| | | { |
| | | @Resource |
| | | private NewFightCommunityConstructionService claimService; |
| | | |
| | | @GetMapping("/getNeedClaimList") |
| | | public R getNewFightCommunityList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | { |
| | | return R.ok(claimService.getList(pageNum,pageSize)); |
| | | } |
| | | |
| | | @GetMapping("/getNeedClaimDetails") |
| | | public R getNewFightCommunityDetails(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(claimService.getDetails(id)); |
| | | } |
| | | |
| | | @PostMapping("/addNeedClaimData") |
| | | public R addNewFightCommunityData(@RequestBody NewFightCommunityConstructionDTO item) |
| | | { |
| | | return claimService.addData(item); |
| | | } |
| | | |
| | | @PostMapping("/editNeedClaimData") |
| | | public R editNewFightCommunityData(@RequestBody NewFightCommunityConstructionDTO item) |
| | | { |
| | | return claimService.editData(item); |
| | | } |
| | | |
| | | @DeleteMapping("/expurgateNeedClaimData") |
| | | public R expurgateNewFightCommunityData(@RequestParam("id") String id) |
| | | { |
| | | return claimService.expurgateData(id); |
| | | } |
| | | |
| | | |
| | | /************************************************************************************************************** |
| | | * |
| | | * 项目规划 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | |
| | | @Resource |
| | | private NewFightProjectPlanService projectPlanService; |
| | | |
| | | @GetMapping("/getProjectPlanList") |
| | | public R getProjectPlanList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("projectId") String projectId) |
| | | { |
| | | return R.ok(projectPlanService.getList(pageNum,pageSize,projectId)); |
| | | } |
| | | |
| | | @GetMapping("/getProjectPlanDetails") |
| | | public R getProjectPlanDetails(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(projectPlanService.getDetails(id)); |
| | | } |
| | | |
| | | @PostMapping("/addProjectPlanData") |
| | | public R addProjectPlanData(@RequestBody NewFightProjectPlanDTO item) |
| | | { |
| | | return projectPlanService.addData(item); |
| | | } |
| | | |
| | | @PostMapping("/editProjectPlanData") |
| | | public R editProjectPlanData(@RequestBody NewFightProjectPlanDTO item) |
| | | { |
| | | return projectPlanService.editData(item); |
| | | } |
| | | |
| | | @DeleteMapping("/expurgateProjectPlanData") |
| | | public R expurgateProjectPlanData(@RequestParam("id") String id) |
| | | { |
| | | return projectPlanService.expurgateData(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.NeedProblemUnitTaskDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NewFightCommunityConstructionDTO; |
| | | 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 NewFightCommunityConstructionDAO extends BaseMapper<NewFightCommunityConstructionDTO> |
| | | { |
| | | |
| | | IPage<NewFightCommunityConstructionDTO> getList(Page page); |
| | | |
| | | NewFightCommunityConstructionDTO getDetails(@Param("id")String id); |
| | | |
| | | String addData(@Param("item") NewFightCommunityConstructionDTO userIds); |
| | | |
| | | int editData(@Param("item") NewFightCommunityConstructionDTO 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.NewFightProjectPlanDTO; |
| | | 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 NewFightProjectPlanDAO extends BaseMapper<NewFightProjectPlanDTO> |
| | | { |
| | | |
| | | IPage<NewFightProjectPlanDTO> getList(Page page,@Param("projectId") String projectId); |
| | | |
| | | NewFightProjectPlanDTO getDetails(@Param("id")String id); |
| | | |
| | | int addData(@Param("item") NewFightProjectPlanDTO userIds); |
| | | |
| | | int editData(@Param("item") NewFightProjectPlanDTO userId); |
| | | |
| | | int expurgateData(@Param("id") 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; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NewFightCommunityConstructionDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党组织 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 11:39 |
| | | **/ |
| | | public interface NewFightCommunityConstructionService |
| | | { |
| | | |
| | | IPage<NewFightCommunityConstructionDTO> getList(int pageNum, int pageSize); |
| | | |
| | | NewFightCommunityConstructionDTO getDetails(String id); |
| | | |
| | | R addData(NewFightCommunityConstructionDTO item); |
| | | |
| | | R editData(NewFightCommunityConstructionDTO item); |
| | | |
| | | R 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.NewFightCommunityConstructionDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NewFightProjectPlanDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党组织 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 11:39 |
| | | **/ |
| | | public interface NewFightProjectPlanService |
| | | { |
| | | |
| | | IPage<NewFightProjectPlanDTO> getList(int pageNum, int pageSize,String projectId); |
| | | |
| | | NewFightProjectPlanDTO getDetails(String id); |
| | | |
| | | R addData(NewFightProjectPlanDTO item); |
| | | |
| | | R editData(NewFightProjectPlanDTO item); |
| | | |
| | | R expurgateData(String 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.NeedProblemUnitTaskDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NewFightCommunityConstructionDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_dangjian.dao.NeedProblemUnitTaskDAO; |
| | | import com.panzhihua.service_dangjian.dao.NewFightCommunityConstructionDAO; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemUnitTaskService; |
| | | import com.panzhihua.service_dangjian.service.NewFightCommunityConstructionService; |
| | | 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 NewFightCommunityConstructionServiceImpl extends ServiceImpl<NewFightCommunityConstructionDAO, |
| | | NewFightCommunityConstructionDTO> implements NewFightCommunityConstructionService |
| | | { |
| | | |
| | | |
| | | @Override |
| | | public IPage<NewFightCommunityConstructionDTO> getList(int pageNum, int pageSize) |
| | | { |
| | | Page page = new Page<>(pageNum,pageSize); |
| | | return baseMapper.getList(page); |
| | | } |
| | | |
| | | @Override |
| | | public NewFightCommunityConstructionDTO getDetails(String id) |
| | | { |
| | | return baseMapper.getDetails(id); |
| | | } |
| | | |
| | | @Override |
| | | public R addData(NewFightCommunityConstructionDTO item) |
| | | { |
| | | String num=baseMapper.addData(item); |
| | | if(!StringUtils.isEmpty(num)) |
| | | { |
| | | return R.ok(num); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R editData(NewFightCommunityConstructionDTO item) |
| | | { |
| | | int num=baseMapper.editData(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R expurgateData(String id) |
| | | { |
| | | int num= baseMapper.expurgateData(id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | |
| | | } |
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.NewFightCommunityConstructionDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NewFightProjectPlanDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_dangjian.dao.NewFightCommunityConstructionDAO; |
| | | import com.panzhihua.service_dangjian.dao.NewFightProjectPlanDAO; |
| | | import com.panzhihua.service_dangjian.service.NewFightCommunityConstructionService; |
| | | import com.panzhihua.service_dangjian.service.NewFightProjectPlanService; |
| | | 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 NewFightProjectPlanServiceImpl extends ServiceImpl<NewFightProjectPlanDAO, |
| | | NewFightProjectPlanDTO> implements NewFightProjectPlanService |
| | | { |
| | | |
| | | |
| | | @Override |
| | | public IPage<NewFightProjectPlanDTO> getList(int pageNum, int pageSize,String projectId) |
| | | { |
| | | Page page = new Page<>(pageNum,pageSize); |
| | | return baseMapper.getList(page,projectId); |
| | | } |
| | | |
| | | @Override |
| | | public NewFightProjectPlanDTO getDetails(String id) |
| | | { |
| | | return baseMapper.getDetails(id); |
| | | } |
| | | |
| | | @Override |
| | | public R addData(NewFightProjectPlanDTO item) |
| | | { |
| | | int num=baseMapper.addData(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R editData(NewFightProjectPlanDTO item) |
| | | { |
| | | int num=baseMapper.editData(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R expurgateData(String id) |
| | | { |
| | | int num= baseMapper.expurgateData(id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | |
| | | } |
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.NewFightCommunityConstructionDAO"> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, |
| | | item_cover, |
| | | item_title, |
| | | agreement_title, |
| | | agreement_customization_time, |
| | | agreement_content, |
| | | construction_community_id, |
| | | estimated_time, |
| | | creation_time, |
| | | update_time, |
| | | user_id, |
| | | community_id |
| | | </sql> |
| | | |
| | | <select id="getList" resultType="com.panzhihua.common.model.dtos.partybuilding.NewFightCommunityConstructionDTO"> |
| | | SELECT <include refid="Base_Column_List"></include> |
| | | FROM new_fight_community_construction |
| | | </select> |
| | | |
| | | <select id="getDetails" resultType="com.panzhihua.common.model.dtos.partybuilding.NewFightCommunityConstructionDTO"> |
| | | SELECT <include refid="Base_Column_List"></include> |
| | | FROM new_fight_community_construction |
| | | <where> |
| | | 1=1 |
| | | <if test="id !=null and id != '' "> |
| | | and id =#{id} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <insert id="addData" useGeneratedKeys="true" keyProperty="id" |
| | | parameterType="com.panzhihua.common.model.dtos.partybuilding.NewFightCommunityConstructionDTO"> |
| | | insert into new_fight_community_construction |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' " > |
| | | id, |
| | | </if> |
| | | <if test="item.itemCover != null and item.itemCover != '' " > |
| | | item_cover, |
| | | </if> |
| | | <if test="item.itemTitle != null and item.itemTitle != '' " > |
| | | item_title, |
| | | </if> |
| | | <if test="item.agreementTitle != null and item.agreementTitle != '' " > |
| | | agreement_title, |
| | | </if> |
| | | <if test="item.agreementCustomizationTime != null" > |
| | | agreement_customization_time, |
| | | </if> |
| | | <if test="item.agreementContent != null and item.agreementContent != '' " > |
| | | agreement_content, |
| | | </if> |
| | | <if test="item.constructionCommunityId != null and item.constructionCommunityId != '' " > |
| | | construction_community_id, |
| | | </if> |
| | | <if test="item.estimatedTime != null " > |
| | | estimated_time, |
| | | </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.itemCover != null and item.itemCover != '' " > |
| | | #{item.itemCover}, |
| | | </if> |
| | | <if test="item.itemTitle != null and item.itemTitle != '' " > |
| | | #{item.itemTitle}, |
| | | </if> |
| | | <if test="item.agreementTitle != null and item.agreementTitle != '' " > |
| | | #{item.agreementTitle}, |
| | | </if> |
| | | <if test="item.agreementCustomizationTime != null" > |
| | | #{item.agreementCustomizationTime}, |
| | | </if> |
| | | <if test="item.agreementContent != null and item.agreementContent != '' " > |
| | | #{item.agreementContent}, |
| | | </if> |
| | | <if test="item.constructionCommunityId != null and item.constructionCommunityId != '' " > |
| | | #{item.constructionCommunityId}, |
| | | </if> |
| | | <if test="item.estimatedTime != null " > |
| | | #{item.estimatedTime}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' " > |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.communityId != null and item.communityId != '' " > |
| | | #{item.communityId}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editData"> |
| | | update new_fight_community_construction |
| | | <set> |
| | | <if test="item.id != null" > |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.itemCover != null and item.itemCover != '' " > |
| | | item_cover=#{item.itemCover}, |
| | | </if> |
| | | <if test="item.itemTitle != null and item.itemTitle != '' " > |
| | | item_title=#{item.itemTitle}, |
| | | </if> |
| | | <if test="item.agreementTitle != null and item.agreementTitle != '' " > |
| | | agreement_title=#{item.agreementTitle}, |
| | | </if> |
| | | <if test="item.agreementCustomizationTime != null" > |
| | | agreement_customization_time=#{item.agreementCustomizationTime}, |
| | | </if> |
| | | <if test="item.agreementContent != null and item.agreementContent != '' " > |
| | | agreement_content=#{item.agreementContent}, |
| | | </if> |
| | | <if test="item.constructionCommunityId != null and item.constructionCommunityId != '' " > |
| | | construction_community_id=#{item.constructionCommunityId}, |
| | | </if> |
| | | <if test="item.estimatedTime != null " > |
| | | estimated_time=#{item.estimatedTime}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' " > |
| | | user_id=#{item.userId}, |
| | | </if> |
| | | <if test="item.communityId != null and item.communityId != '' " > |
| | | community_id=#{item.communityId}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <delete id="expurgateData" parameterType="String"> |
| | | delete from new_fight_community_construction where id=#{id} |
| | | </delete> |
| | | |
| | | |
| | | </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.NewFightProjectPlanDAO"> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, |
| | | project_id, |
| | | agreement_plan, |
| | | completion_time, |
| | | plan_content, |
| | | creation_time, |
| | | update_time |
| | | |
| | | </sql> |
| | | |
| | | <select id="getList" resultType="com.panzhihua.common.model.dtos.partybuilding.NewFightProjectPlanDTO"> |
| | | SELECT <include refid="Base_Column_List"></include> |
| | | FROM new_fight_project_plan |
| | | <where> |
| | | 1=1 |
| | | <if test="projectId !=null and projectId != '' "> |
| | | and project_id=#{projectId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getDetails" resultType="com.panzhihua.common.model.dtos.partybuilding.NewFightProjectPlanDTO"> |
| | | SELECT <include refid="Base_Column_List"></include> |
| | | FROM new_fight_project_plan |
| | | <where> |
| | | 1=1 |
| | | <if test="id !=null and id != '' "> |
| | | and id =#{id} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <insert id="addData"> |
| | | insert into new_fight_project_plan |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' " > |
| | | id, |
| | | </if> |
| | | <if test="item.projectId != null and item.projectId != '' " > |
| | | project_id, |
| | | </if> |
| | | <if test="item.agreementPlan != null and item.agreementPlan != '' " > |
| | | agreement_plan, |
| | | </if> |
| | | <if test="item.completionTime != null " > |
| | | completion_time, |
| | | </if> |
| | | <if test="item.planContent != null and item.planContent != '' " > |
| | | plan_content, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null" > |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.projectId != null and item.projectId != '' " > |
| | | #{item.projectId}, |
| | | </if> |
| | | <if test="item.agreementPlan != null and item.agreementPlan != '' " > |
| | | #{item.agreementPlan}, |
| | | </if> |
| | | <if test="item.completionTime != null " > |
| | | #{item.completionTime}, |
| | | </if> |
| | | <if test="item.planContent != null and item.planContent != '' " > |
| | | #{item.planContent}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editData"> |
| | | update new_fight_project_plan |
| | | <set> |
| | | <if test="item.id != null" > |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.projectId != null and item.projectId != '' " > |
| | | project_id=#{item.projectId}, |
| | | </if> |
| | | <if test="item.agreementPlan != null and item.agreementPlan != '' " > |
| | | agreement_plan=#{item.agreementPlan}, |
| | | </if> |
| | | <if test="item.completionTime != null " > |
| | | completion_time=#{item.completionTime}, |
| | | </if> |
| | | <if test="item.planContent != null and item.planContent != '' " > |
| | | plan_content=#{item.planContent}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <delete id="expurgateData" parameterType="String"> |
| | | delete from new_fight_project_plan where id=#{id} |
| | | </delete> |
| | | |
| | | |
| | | </mapper> |
| | | |