diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaKettleBaseDisputeProcessDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaKettleBaseDisputeProcessDTO.java new file mode 100644 index 0000000000..1e4a92d86e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaKettleBaseDisputeProcessDTO.java @@ -0,0 +1,235 @@ +package com.epmet.opendata.dto.ca; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-06 + */ +@Data +public class CaKettleBaseDisputeProcessDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 事件信息主键,事件流转关联字段,关联tbactinst表的recid字段 + */ + private Integer baseKeyId; + + /** + * 网格编码 + */ + private String griddingid; + + /** + * 网格名称 + */ + private String griddingname; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 事件名称 + */ + private String eventtitle; + + /** + * 发生日期 + */ + private Date eventdate; + + /** + * 发生地点 + */ + private String eventaddrdetail; + + /** + * 事件规模 + */ + private String eventscale; + + /** + * 事件类别 + */ + private String eventcategoryid; + + /** + * 涉及人数 + */ + private String peoplenum; + + /** + * 事件简述 + */ + private String eventtext; + + /** + * 涉及单位 + */ + private String responsibilityUnit; + + /** + * 主要当事人姓名 + */ + private String mainpartyid; + + /** + * 主要当事人民族 + */ + private String mainnation; + + /** + * 办结时限 + */ + private BigDecimal timelimit; + + /** + * 办结方式 + */ + private String finishedmethod; + + /** + * 办结层级 + */ + private String completionleve; + + /** + * 是否办结 + */ + private String eventstatus; + + /** + * 创建人 + */ + private String createUser; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新人 + */ + private String updateUser; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * + */ + private Date eventtime; + + /** + * + */ + private Date finisheddatetime; + + /** + * 重点场所类别 + */ + private String keyAreaType; + + /** + * 宗教活动规模 + */ + private String religionScale; + + /** + * 宗教类别 + */ + private String religionType; + + /** + * 重点场所是否变动 + */ + private String isKeyareaState; + + /** + * 重点人员是否在当地 + */ + private String isLocal; + + /** + * 重点人员现状 + */ + private String presentSituation; + + /** + * + */ + private Integer qdDeleteflag; + + /** + * 是否化解 + */ + private String successfulDefuse; + + /** + * 关注程度 + */ + private String attentionlevel; + + /** + * 事件编码 + */ + private String eventnumber; + + /** + * 事件来源,网格员上报赋值05;街道吹哨赋值03;其他赋值99 + */ + private String eventsource; + + /** + * 事件状态 0待提交1提交2代派发3处理中4复核5办结6退回-1作废 + */ + private Integer curstatus; + + /** + * 上报人(网格员姓名) + */ + private String wgy; + + /** + * 附件id + */ + private String fileid; + + /** + * 网格员id + */ + private String wgyhumanid; + + /** + * 是否已抽取 0 未抽取 1 已抽取 2 准备抽取(中间状态) + */ + private String isExtracted; + + /** + * 1正常2临期3超期 + */ + private Integer timelimitstatus; + + /** + * 数据同步时间 + */ + private Date importTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaKettleBaseDisputeProcessController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaKettleBaseDisputeProcessController.java new file mode 100644 index 0000000000..cef55de631 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaKettleBaseDisputeProcessController.java @@ -0,0 +1,83 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; + +import com.epmet.opendata.dto.ca.CaKettleBaseDisputeProcessDTO; +import com.epmet.opendata.excel.CaKettleBaseDisputeProcessExcel; +import com.epmet.opendata.service.CaKettleBaseDisputeProcessService; +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 generator generator@elink-cn.com + * @since v1.0.0 2022-07-06 + */ +@RestController +@RequestMapping("caKettleBaseDisputeProcess") +public class CaKettleBaseDisputeProcessController { + + @Autowired + private CaKettleBaseDisputeProcessService caKettleBaseDisputeProcessService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = caKettleBaseDisputeProcessService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + CaKettleBaseDisputeProcessDTO data = caKettleBaseDisputeProcessService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody CaKettleBaseDisputeProcessDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + caKettleBaseDisputeProcessService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody CaKettleBaseDisputeProcessDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + caKettleBaseDisputeProcessService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + caKettleBaseDisputeProcessService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = caKettleBaseDisputeProcessService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CaKettleBaseDisputeProcessExcel.class); + } + + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaKettleBaseDisputeProcessDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaKettleBaseDisputeProcessDao.java new file mode 100644 index 0000000000..ed6156164a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaKettleBaseDisputeProcessDao.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.CaKettleBaseDisputeProcessEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-06 + */ +@Mapper +public interface CaKettleBaseDisputeProcessDao extends BaseDao { + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaKettleBaseDisputeProcessEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaKettleBaseDisputeProcessEntity.java new file mode 100644 index 0000000000..1058663c96 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaKettleBaseDisputeProcessEntity.java @@ -0,0 +1,240 @@ +package com.epmet.opendata.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ca_kettle_base_dispute_process") +public class CaKettleBaseDisputeProcessEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 事件信息主键,事件流转关联字段,关联tbactinst表的recid字段 + */ + private Integer baseKeyId; + + /** + * 网格编码 + */ + private String griddingid; + + /** + * 网格名称 + */ + private String griddingname; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 事件名称 + */ + private String eventtitle; + + /** + * 发生日期 + */ + private Date eventdate; + + /** + * 发生地点 + */ + private String eventaddrdetail; + + /** + * 事件规模 + */ + private String eventscale; + + /** + * 事件类别 + */ + private String eventcategoryid; + + /** + * 涉及人数 + */ + private String peoplenum; + + /** + * 事件简述 + */ + private String eventtext; + + /** + * 涉及单位 + */ + private String responsibilityUnit; + + /** + * 主要当事人姓名 + */ + private String mainpartyid; + + /** + * 主要当事人民族 + */ + private String mainnation; + + /** + * 办结时限 + */ + private BigDecimal timelimit; + + /** + * 办结方式 + */ + private String finishedmethod; + + /** + * 办结层级 + */ + private String completionleve; + + /** + * 是否办结 + */ + private String eventstatus; + + /** + * 创建人 + */ + private String createUser; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新人 + */ + private String updateUser; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * + */ + private Date eventtime; + + /** + * + */ + private Date finisheddatetime; + + /** + * 重点场所类别 + */ + private String keyAreaType; + + /** + * 宗教活动规模 + */ + private String religionScale; + + /** + * 宗教类别 + */ + private String religionType; + + /** + * 重点场所是否变动 + */ + private String isKeyareaState; + + /** + * 重点人员是否在当地 + */ + private String isLocal; + + /** + * 重点人员现状 + */ + private String presentSituation; + + /** + * + */ + private Integer qdDeleteflag; + + /** + * 是否化解 + */ + private String successfulDefuse; + + /** + * 关注程度 + */ + private String attentionlevel; + + /** + * 事件编码 + */ + private String eventnumber; + + /** + * 事件来源,网格员上报赋值05;街道吹哨赋值03;其他赋值99 + */ + private String eventsource; + + /** + * 事件状态 0待提交1提交2代派发3处理中4复核5办结6退回-1作废 + */ + private Integer curstatus; + + /** + * 上报人(网格员姓名) + */ + private String wgy; + + /** + * 附件id + */ + private String fileid; + + /** + * 网格员id + */ + private String wgyhumanid; + + /** + * 是否已抽取 0 未抽取 1 已抽取 2 准备抽取(中间状态) + */ + private String isExtracted; + + /** + * 1正常2临期3超期 + */ + private Integer timelimitstatus; + + /** + * 数据同步时间 + */ + private Date importTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaKettleBaseDisputeProcessExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaKettleBaseDisputeProcessExcel.java new file mode 100644 index 0000000000..d97655f6a5 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaKettleBaseDisputeProcessExcel.java @@ -0,0 +1,148 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-06 + */ +@Data +public class CaKettleBaseDisputeProcessExcel { + + @Excel(name = "事件信息主键,事件流转关联字段,关联tbactinst表的recid字段") + private Integer baseKeyId; + + @Excel(name = "网格编码") + private String griddingid; + + @Excel(name = "网格名称") + private String griddingname; + + @Excel(name = "经度") + private BigDecimal longitude; + + @Excel(name = "纬度") + private BigDecimal latitude; + + @Excel(name = "事件名称") + private String eventtitle; + + @Excel(name = "发生日期") + private Date eventdate; + + @Excel(name = "发生地点") + private String eventaddrdetail; + + @Excel(name = "事件规模") + private String eventscale; + + @Excel(name = "事件类别") + private String eventcategoryid; + + @Excel(name = "涉及人数") + private String peoplenum; + + @Excel(name = "事件简述") + private String eventtext; + + @Excel(name = "涉及单位") + private String responsibilityUnit; + + @Excel(name = "主要当事人姓名") + private String mainpartyid; + + @Excel(name = "主要当事人民族") + private String mainnation; + + @Excel(name = "办结时限") + private BigDecimal timelimit; + + @Excel(name = "办结方式") + private String finishedmethod; + + @Excel(name = "办结层级") + private String completionleve; + + @Excel(name = "是否办结") + private String eventstatus; + + @Excel(name = "创建人") + private String createUser; + + @Excel(name = "创建时间") + private Date createTime; + + @Excel(name = "更新人") + private String updateUser; + + @Excel(name = "更新时间") + private Date updateTime; + + @Excel(name = "") + private Date eventtime; + + @Excel(name = "") + private Date finisheddatetime; + + @Excel(name = "重点场所类别") + private String keyAreaType; + + @Excel(name = "宗教活动规模") + private String religionScale; + + @Excel(name = "宗教类别") + private String religionType; + + @Excel(name = "重点场所是否变动") + private String isKeyareaState; + + @Excel(name = "重点人员是否在当地") + private String isLocal; + + @Excel(name = "重点人员现状") + private String presentSituation; + + @Excel(name = "") + private Integer qdDeleteflag; + + @Excel(name = "是否化解") + private String successfulDefuse; + + @Excel(name = "关注程度") + private String attentionlevel; + + @Excel(name = "事件编码") + private String eventnumber; + + @Excel(name = "事件来源,网格员上报赋值05;街道吹哨赋值03;其他赋值99") + private String eventsource; + + @Excel(name = "事件状态 0待提交1提交2代派发3处理中4复核5办结6退回-1作废") + private Integer curstatus; + + @Excel(name = "上报人(网格员姓名)") + private String wgy; + + @Excel(name = "附件id") + private String fileid; + + @Excel(name = "网格员id") + private String wgyhumanid; + + @Excel(name = "是否已抽取 0 未抽取 1 已抽取 2 准备抽取(中间状态)") + private String isExtracted; + + @Excel(name = "1正常2临期3超期") + private Integer timelimitstatus; + + @Excel(name = "数据同步时间") + private Date importTime; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaKettleBaseDisputeProcessRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaKettleBaseDisputeProcessRedis.java new file mode 100644 index 0000000000..4232a87f9c --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaKettleBaseDisputeProcessRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-06 + */ +@Component +public class CaKettleBaseDisputeProcessRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaKettleBaseDisputeProcessService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaKettleBaseDisputeProcessService.java new file mode 100644 index 0000000000..52e01e5bf1 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaKettleBaseDisputeProcessService.java @@ -0,0 +1,78 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.ca.CaKettleBaseDisputeProcessDTO; +import com.epmet.opendata.entity.CaKettleBaseDisputeProcessEntity; + +import java.util.List; +import java.util.Map; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-06 + */ +public interface CaKettleBaseDisputeProcessService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-07-06 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-07-06 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return CaKettleBaseDisputeProcessDTO + * @author generator + * @date 2022-07-06 + */ + CaKettleBaseDisputeProcessDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-07-06 + */ + void save(CaKettleBaseDisputeProcessDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-07-06 + */ + void update(CaKettleBaseDisputeProcessDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-07-06 + */ + void delete(String[] ids); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaKettleBaseDisputeProcessServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaKettleBaseDisputeProcessServiceImpl.java new file mode 100644 index 0000000000..7b6d1af64d --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaKettleBaseDisputeProcessServiceImpl.java @@ -0,0 +1,87 @@ +package com.epmet.opendata.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.opendata.dao.CaKettleBaseDisputeProcessDao; +import com.epmet.opendata.dto.ca.CaKettleBaseDisputeProcessDTO; +import com.epmet.opendata.entity.CaKettleBaseDisputeProcessEntity; +import com.epmet.opendata.redis.CaKettleBaseDisputeProcessRedis; +import com.epmet.opendata.service.CaKettleBaseDisputeProcessService; +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 generator generator@elink-cn.com + * @since v1.0.0 2022-07-06 + */ +@Service +public class CaKettleBaseDisputeProcessServiceImpl extends BaseServiceImpl implements CaKettleBaseDisputeProcessService { + + @Autowired + private CaKettleBaseDisputeProcessRedis caKettleBaseDisputeProcessRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CaKettleBaseDisputeProcessDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CaKettleBaseDisputeProcessDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public CaKettleBaseDisputeProcessDTO get(String id) { + CaKettleBaseDisputeProcessEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CaKettleBaseDisputeProcessDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CaKettleBaseDisputeProcessDTO dto) { + CaKettleBaseDisputeProcessEntity entity = ConvertUtils.sourceToTarget(dto, CaKettleBaseDisputeProcessEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CaKettleBaseDisputeProcessDTO dto) { + CaKettleBaseDisputeProcessEntity entity = ConvertUtils.sourceToTarget(dto, CaKettleBaseDisputeProcessEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaKettleBaseDisputeProcessDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaKettleBaseDisputeProcessDao.xml new file mode 100644 index 0000000000..13d8b297a1 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaKettleBaseDisputeProcessDao.xml @@ -0,0 +1,8 @@ + + + + + + + +