Browse Source

北尚诉办-新增 执法诉求;民生/发展补充字段

feature/dangjian
Jackwang 3 years ago
parent
commit
4c230b6f66
  1. 12
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkItemController.java
  2. 10
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/WorkItemFeignClient.java
  3. 5
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/WorkItemFeignClientFallback.java
  4. 9
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/WorkItemService.java
  5. 5
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/WorkItemServiceImpl.java
  6. 157
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemLawDTO.java
  7. 168
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/ItemLawSubmitDTO.java
  8. 10
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/SubmitItemFormDTO.java
  9. 94
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemLawController.java
  10. 12
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/WorkItemController.java
  11. 33
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemLawDao.java
  12. 10
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java
  13. 126
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemLawEntity.java
  14. 107
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemLawExcel.java
  15. 47
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/redis/ItemLawRedis.java
  16. 106
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemLawService.java
  17. 9
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java
  18. 112
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemLawServiceImpl.java
  19. 47
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
  20. 34
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemLawDao.xml

12
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkItemController.java

@ -131,4 +131,16 @@ public class ApiWorkItemController {
public Result<List<ItemHandleResultDTO>> queryHandleCategories(EventDeptFormDTO formDto) {
return workItemService.queryHandleCategories(formDto);
}
/**
* @describe: 工作端-执法诉求上报
* @author wangtong
* @date 2022/9/3 10:10
* @params [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@PostMapping("submitLawItem")
public Result submitLawItem(@RequestBody ItemLawSubmitDTO formDto) {
return workItemService.submitLawItem(formDto);
}
}

10
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/WorkItemFeignClient.java

@ -121,4 +121,14 @@ public interface WorkItemFeignClient {
**/
@GetMapping(value = "events/work/item/handleCategory", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<ItemHandleResultDTO>> queryHandleCategories(EventDeptFormDTO formDto);
/**
* @describe: 工作端-执法诉求上报
* @author wangtong
* @date 2022/9/3 10:10
* @params [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@PostMapping(value = "events/work/item/submitLawItem", consumes = MediaType.APPLICATION_JSON_VALUE)
Result submitLawItem(ItemLawSubmitDTO formDto);
}

5
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/WorkItemFeignClientFallback.java

@ -67,4 +67,9 @@ public class WorkItemFeignClientFallback implements WorkItemFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "queryHandleCategories",formDto);
}
@Override
public Result submitLawItem(ItemLawSubmitDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "submitLawItem",formDto);
}
}

9
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/WorkItemService.java

@ -97,4 +97,13 @@ public interface WorkItemService {
* @Date 2020/1/13 16:49
**/
Result<List<ItemHandleResultDTO>> queryHandleCategories(EventDeptFormDTO formDto);
/**
* @describe: 工作端-执法诉求上报
* @author wangtong
* @date 2022/9/3 10:10
* @params [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result submitLawItem(ItemLawSubmitDTO formDto);
}

5
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/WorkItemServiceImpl.java

@ -81,4 +81,9 @@ public class WorkItemServiceImpl implements WorkItemService {
return workItemFeignClient.queryHandleCategories(formDto);
}
@Override
public Result submitLawItem(ItemLawSubmitDTO formDto) {
return workItemFeignClient.submitLawItem(formDto);
}
}

157
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemLawDTO.java

@ -0,0 +1,157 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dto.item;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 执法诉办详情
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2022-09-03
*/
@Data
public class ItemLawDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 项目ID
*/
private String itemId;
/**
* 事项名称
*/
private String lawName;
/**
* 诉求详情
*/
private String lawContent;
/**
* 主办单位
*/
private String hostUnit;
/**
* 协办单位
*/
private String assistUnit;
/**
* 有关需求
*/
private String demand;
/**
* 事项类型0计划事项 1临时事项
*/
private String lawType;
/**
* 与部门是否沟通 0已经沟通 1尚未沟通
*/
private String isExchange;
/**
* 召集人姓名
*/
private String convenerName;
/**
* 召集人职务
*/
private String convenerJob;
/**
* 召集人电话
*/
private String convenerMobile;
/**
* 联系人姓名
*/
private String contactName;
/**
* 联系人职务
*/
private String contactJob;
/**
* 联系人电话
*/
private String contactMobile;
/**
* 报到时间
*/
private Date reportTime;
/**
* 报到地点
*/
private String reportAddress;
/**
* 会议名称
*/
private String meetingName;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

168
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/ItemLawSubmitDTO.java

@ -0,0 +1,168 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dto.item.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 执法诉办详情
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2022-09-03
*/
@Data
public class ItemLawSubmitDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 项目ID
*/
private String itemId;
/**
* 事项名称
*/
@NotBlank(message = "事项名称不可为空")
private String lawName;
/**
* 诉求详情
*/
@NotBlank(message = "诉求详情不可为空")
private String lawContent;
/**
* 主办单位
*/
@NotBlank(message = "主办单位不可为空")
private String hostUnit;
/**
* 协办单位
*/
@NotBlank(message = "协办单位不可为空")
private String assistUnit;
/**
* 有关需求
*/
@NotBlank(message = "有关需求不可为空")
private String demand;
/**
* 事项类型0计划事项 1临时事项
*/
@NotBlank(message = "事项类型不可为空")
private String lawType;
/**
* 与部门是否沟通 0已经沟通 1尚未沟通
*/
@NotBlank(message = "是否沟通不可为空")
private String isExchange;
/**
* 召集人姓名
*/
@NotBlank(message = "召集人姓名不可为空")
private String convenerName;
/**
* 召集人职务
*/
@NotBlank(message = "召集人职务不可为空")
private String convenerJob;
/**
* 召集人电话
*/
@NotBlank(message = "召集人电话不可为空")
private String convenerMobile;
/**
* 联系人姓名
*/
@NotBlank(message = "联系人姓名不可为空")
private String contactName;
/**
* 联系人职务
*/
@NotBlank(message = "联系人职务不可为空")
private String contactJob;
/**
* 联系人电话
*/
@NotBlank(message = "联系人电话不可为空")
private String contactMobile;
/**
* 报到时间
*/
@NotNull(message = "报到时间不能为空")
private Date reportTime;
/**
* 报到地点
*/
@NotBlank(message = "报到地点不可为空")
private String reportAddress;
/**
* 位置纬度
*/
@NotNull(message = "纬度不能为空")
private Double issueLatitude;
/**
* 位置经度
*/
@NotNull(message = "经度不能为空")
private Double issueLongitude;
/**
* 会议名称
*/
@NotBlank(message = "会议名称不可为空")
private String meetingName;
/**
* 语音
*/
private String itemVoice;
/**
* 图片
*/
private List<String> images;
}

10
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/SubmitItemFormDTO.java

@ -104,6 +104,16 @@ public class SubmitItemFormDTO implements Serializable {
@NotBlank(message = "是否公开不能为空")
private String showFlag;
/**
* 语音
*/
private String itemVoice;
/**
* 联系人
*/
private String contactName;
/**
* 图片
*/

94
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemLawController.java

@ -0,0 +1,94 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.item.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.item.ItemLawDTO;
import com.elink.esua.epdc.modules.item.excel.ItemLawExcel;
import com.elink.esua.epdc.modules.item.service.ItemLawService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 执法诉办详情
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2022-09-03
*/
@RestController
@RequestMapping("itemlaw")
public class ItemLawController {
@Autowired
private ItemLawService itemLawService;
@GetMapping("page")
public Result<PageData<ItemLawDTO>> page(@RequestParam Map<String, Object> params){
PageData<ItemLawDTO> page = itemLawService.page(params);
return new Result<PageData<ItemLawDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<ItemLawDTO> get(@PathVariable("id") String id){
ItemLawDTO data = itemLawService.get(id);
return new Result<ItemLawDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody ItemLawDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
itemLawService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody ItemLawDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
itemLawService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
itemLawService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ItemLawDTO> list = itemLawService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, ItemLawExcel.class);
}
}

12
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/WorkItemController.java

@ -161,4 +161,16 @@ public class WorkItemController {
public Result<List<ItemHandleResultDTO>> queryHandleCategories(@RequestBody EventDeptFormDTO formDto) {
return itemService.queryHandleCategories(formDto);
}
/**
* @describe: 工作端-执法诉求上报
* @author wangtong
* @date 2022/9/3 10:10
* @params [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping("submitLawItem")
public Result submitLawItem(@RequestBody ItemLawSubmitDTO formDto) {
return itemService.submitLawItem(formDto);
}
}

33
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemLawDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.item.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.modules.item.entity.ItemLawEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 执法诉办详情
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2022-09-03
*/
@Mapper
public interface ItemLawDao extends BaseDao<ItemLawEntity> {
}

10
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java

@ -225,4 +225,14 @@ public class ItemEntity extends BaseEpdcEntity {
*/
private String isPeople;
/**
* 语音
*/
private String itemVoice;
/**
* 联系人
*/
private String contactName;
}

126
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemLawEntity.java

@ -0,0 +1,126 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.item.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 执法诉办详情
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2022-09-03
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_item_law")
public class ItemLawEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 项目ID
*/
private String itemId;
/**
* 事项名称
*/
private String lawName;
/**
* 诉求详情
*/
private String lawContent;
/**
* 主办单位
*/
private String hostUnit;
/**
* 协办单位
*/
private String assistUnit;
/**
* 有关需求
*/
private String demand;
/**
* 事项类型0计划事项 1临时事项
*/
private String lawType;
/**
* 与部门是否沟通 0已经沟通 1尚未沟通
*/
private String isExchange;
/**
* 召集人姓名
*/
private String convenerName;
/**
* 召集人职务
*/
private String convenerJob;
/**
* 召集人电话
*/
private String convenerMobile;
/**
* 联系人姓名
*/
private String contactName;
/**
* 联系人职务
*/
private String contactJob;
/**
* 联系人电话
*/
private String contactMobile;
/**
* 报到时间
*/
private Date reportTime;
/**
* 报到地点
*/
private String reportAddress;
/**
* 会议名称
*/
private String meetingName;
}

107
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemLawExcel.java

@ -0,0 +1,107 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.item.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 执法诉办详情
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2022-09-03
*/
@Data
public class ItemLawExcel {
@Excel(name = "ID")
private String id;
@Excel(name = "项目ID")
private String itemId;
@Excel(name = "事项名称")
private String lawName;
@Excel(name = "诉求详情")
private String lawContent;
@Excel(name = "主办单位")
private String hostUnit;
@Excel(name = "协办单位")
private String assistUnit;
@Excel(name = "有关需求")
private String demand;
@Excel(name = "事项类型:0计划事项 1临时事项")
private String lawType;
@Excel(name = "与部门是否沟通: 0已经沟通 1尚未沟通")
private String isExchange;
@Excel(name = "召集人姓名")
private String convenerName;
@Excel(name = "召集人职务")
private String convenerJob;
@Excel(name = "召集人电话")
private String convenerMobile;
@Excel(name = "联系人姓名")
private String contactName;
@Excel(name = "联系人职务")
private String contactJob;
@Excel(name = "联系人电话")
private String contactMobile;
@Excel(name = "报到时间")
private Date reportTime;
@Excel(name = "报到地点")
private String reportAddress;
@Excel(name = "会议名称")
private String meetingName;
@Excel(name = "删除标识 0:未删除,1:已删除")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

47
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/redis/ItemLawRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.item.redis;
import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 执法诉办详情
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2022-09-03
*/
@Component
public class ItemLawRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

106
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemLawService.java

@ -0,0 +1,106 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.item.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.dto.item.ItemLawDTO;
import com.elink.esua.epdc.dto.item.form.ItemLawSubmitDTO;
import com.elink.esua.epdc.modules.item.entity.ItemLawEntity;
import java.util.List;
import java.util.Map;
/**
* 执法诉办详情
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2022-09-03
*/
public interface ItemLawService extends BaseService<ItemLawEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ItemLawDTO>
* @author generator
* @date 2022-09-03
*/
PageData<ItemLawDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ItemLawDTO>
* @author generator
* @date 2022-09-03
*/
List<ItemLawDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ItemLawDTO
* @author generator
* @date 2022-09-03
*/
ItemLawDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-09-03
*/
void save(ItemLawDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-09-03
*/
void update(ItemLawDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-09-03
*/
void delete(String[] ids);
/**
* @describe: 保存执法诉求详情
* @author wangtong
* @date 2022/9/3 11:38
* @params [formDto]
* @return void
*/
void saveLawDetail(ItemLawSubmitDTO formDto);
}

9
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java

@ -472,4 +472,13 @@ public interface ItemService extends BaseService<ItemEntity> {
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.ItemResultDTO>>
*/
Result<List<ItemResultDTO>> getItemListByUserId(PeopleItemFormDTO formDto);
/**
* @describe: 工作端-执法诉求上报
* @author wangtong
* @date 2022/9/3 10:10
* @params [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result submitLawItem(ItemLawSubmitDTO formDto);
}

112
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemLawServiceImpl.java

@ -0,0 +1,112 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.item.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.dto.item.ItemLawDTO;
import com.elink.esua.epdc.dto.item.form.ItemLawSubmitDTO;
import com.elink.esua.epdc.modules.item.dao.ItemLawDao;
import com.elink.esua.epdc.modules.item.entity.ItemLawEntity;
import com.elink.esua.epdc.modules.item.redis.ItemLawRedis;
import com.elink.esua.epdc.modules.item.service.ItemLawService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 执法诉办详情
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2022-09-03
*/
@Service
public class ItemLawServiceImpl extends BaseServiceImpl<ItemLawDao, ItemLawEntity> implements ItemLawService {
@Autowired
private ItemLawRedis itemLawRedis;
@Override
public PageData<ItemLawDTO> page(Map<String, Object> params) {
IPage<ItemLawEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ItemLawDTO.class);
}
@Override
public List<ItemLawDTO> list(Map<String, Object> params) {
List<ItemLawEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ItemLawDTO.class);
}
private QueryWrapper<ItemLawEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ItemLawEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ItemLawDTO get(String id) {
ItemLawEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ItemLawDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ItemLawDTO dto) {
ItemLawEntity entity = ConvertUtils.sourceToTarget(dto, ItemLawEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ItemLawDTO dto) {
ItemLawEntity entity = ConvertUtils.sourceToTarget(dto, ItemLawEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public void saveLawDetail(ItemLawSubmitDTO formDto) {
ItemLawEntity entity = ConvertUtils.sourceToTarget(formDto, ItemLawEntity.class);
insert(entity);
}
}

47
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java

@ -173,6 +173,9 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
@Autowired
private UserFeignClient userInfoFeignClient;
@Autowired
private ItemLawService itemLawService;
@Override
public PageData<ItemDTO> page(Map<String, Object> params) {
@ -289,6 +292,50 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
return new Result<List<ItemResultDTO>>().ok(data);
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result submitLawItem(ItemLawSubmitDTO formDto) {
UserDetail userDetail = SecurityUser.getUser();
ItemEntity itemEntity = new ItemEntity();
/**
* userIDzfsq+当前账户ID
* is_party_member:统一填0
* grid"执法诉求"+街道名称
* grid_ID:街道ID
*/
itemEntity.setUserId("zfsq"+userDetail.getId());
itemEntity.setNickName(userDetail.getUsername());
itemEntity.setIsPartyMember(YesOrNoEnum.NO.value());
itemEntity.setMobile(userDetail.getMobile());
itemEntity.setDistributeTime(new Date());
itemEntity.setGrid("执法诉求"+userDetail.getDeptName());
itemEntity.setGridId(userDetail.getDeptId());
itemEntity.setItemContent(formDto.getLawContent());
itemEntity.setItemVoice(formDto.getItemVoice());
itemEntity.setIssueAddress(formDto.getReportAddress());
itemEntity.setIssueLatitude(formDto.getIssueLatitude());
itemEntity.setIssueLongitude(formDto.getIssueLongitude());
itemEntity.setItemState(0);//处理中
itemEntity.setLastHandleTime(new Date());
itemEntity.setCategoryCode("13");
itemEntity.setCategoryFullName("其他");
itemEntity.setFirstCategoryCode("13");
itemEntity.setItemCode("PT" + System.currentTimeMillis());//项目编号
itemEntity.setIsPeople("1");//诉求上报
itemEntity.setPeopleFlag("2");//执法诉求
baseDao.insert(itemEntity);
//插入项目部门关联表
itemDeptService.savePeopleSubmitInfo(itemEntity);
// 保存图片
imgService.saveImages(formDto.getImages(), itemEntity.getId(), ImageConstant.TYPE_IMAGE_BIZ_EVENTS);
//保存到执法诉求详情表
formDto.setItemId(itemEntity.getId());
itemLawService.saveLawDetail(formDto);
//todo bssb上报网格化平台
return new Result();
}
@Override
public Result<List<ItemResultDTO>> getQuestionList(ItemByQuestionFormDTO formDto) {

34
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemLawDao.xml

@ -0,0 +1,34 @@
<?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.elink.esua.epdc.modules.item.dao.ItemLawDao">
<resultMap type="com.elink.esua.epdc.modules.item.entity.ItemLawEntity" id="itemLawMap">
<result property="id" column="ID"/>
<result property="itemId" column="ITEM_ID"/>
<result property="lawName" column="LAW_NAME"/>
<result property="lawContent" column="LAW_CONTENT"/>
<result property="hostUnit" column="HOST_UNIT"/>
<result property="assistUnit" column="ASSIST_UNIT"/>
<result property="demand" column="DEMAND"/>
<result property="lawType" column="LAW_TYPE"/>
<result property="isExchange" column="IS_EXCHANGE"/>
<result property="convenerName" column="CONVENER_NAME"/>
<result property="convenerJob" column="CONVENER_JOB"/>
<result property="convenerMobile" column="CONVENER_MOBILE"/>
<result property="contactName" column="CONTACT_NAME"/>
<result property="contactJob" column="CONTACT_JOB"/>
<result property="contactMobile" column="CONTACT_MOBILE"/>
<result property="reportTime" column="REPORT_TIME"/>
<result property="reportAddress" column="REPORT_ADDRESS"/>
<result property="meetingName" column="MEETING_NAME"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>
Loading…
Cancel
Save