Merge remote-tracking branch 'origin/fix_bug_first_stage' into fix_bug_first_stage
This commit is contained in:
+3
@@ -53,6 +53,9 @@ public class BussDocumentLibraryEO implements Serializable {
|
||||
/**适用地区*/
|
||||
@ApiModelProperty(value = "适用地区")
|
||||
private java.lang.String region;
|
||||
/**适用地区*/
|
||||
@ApiModelProperty(value = "类别")
|
||||
private java.lang.String lei4Bie2;
|
||||
|
||||
/**状态*/
|
||||
@ApiModelProperty(value = "状态")
|
||||
|
||||
+1
@@ -12,6 +12,7 @@
|
||||
<id column="xin1_che1_xing2_shi2_shi1_ri4_qi1" property="xin1Che1Xing2Shi2Shi1Ri4Qi1" />
|
||||
<id column="implement_time" property="implementTime" />
|
||||
<id column="corresponding_standard" property="correspondingStandard" />
|
||||
<id column="lei4_bie2" property="lei4Bie2" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertInfo">
|
||||
|
||||
+24
-1
@@ -3574,8 +3574,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
|
||||
@NotNull
|
||||
private String getConditionStr(Map<String, Object> parameter) {
|
||||
public String getConditionStr(Map<String, Object> parameter) {
|
||||
String cut = (String) parameter.get("cut");
|
||||
String flag = String.valueOf(parameter.get("flag"));
|
||||
//查询条件
|
||||
StringBuilder conditionSb = new StringBuilder("where 1 = 1");
|
||||
|
||||
@@ -3640,6 +3641,28 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
}
|
||||
|
||||
//处理法规预警模块预警时间查询条件 flag = 0(新车实施日期), flag = 1(在产车实施日期)
|
||||
String warnTime = (String) parameter.get("WarnTime");
|
||||
if(StringUtils.isNotBlank(warnTime)){
|
||||
if("0".equals(flag)){
|
||||
//日期(区分单日期还时间范围)
|
||||
if (warnTime.contains(",")) {
|
||||
conditionSb.append(" and " + "date_format(" + "xin1_che1_xing2_shi2_shi1_ri4_qi1" + ",'%Y-%m-%d') >= '" + warnTime.split(",")[0] + "'"
|
||||
+ " and " + "date_format(" + "xin1_che1_xing2_shi2_shi1_ri4_qi1" + ",'%Y-%m-%d') <= '" + warnTime.split(",")[1] + "'");
|
||||
} else {
|
||||
conditionSb.append(" and " + "date_format(" + "xin1_che1_xing2_shi2_shi1_ri4_qi1" + ",'%Y-%m-%d') = '" + warnTime + "'");
|
||||
}
|
||||
}else{
|
||||
//日期(区分单日期还时间范围)
|
||||
if (warnTime.contains(",")) {
|
||||
conditionSb.append(" and " + "date_format(" + "implement_time" + ",'%Y-%m-%d') >= '" + warnTime.split(",")[0] + "'"
|
||||
+ " and " + "date_format(" + "implement_time" + ",'%Y-%m-%d') <= '" + warnTime.split(",")[1] + "'");
|
||||
} else {
|
||||
conditionSb.append(" and " + "date_format(" + "implement_time" + ",'%Y-%m-%d') = '" + warnTime + "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//高级搜索 queryConditionVOList List<QueryConditionVO>
|
||||
if(ObjectUtils.isNotEmpty(parameter.get("queryConditionVOList"))){
|
||||
String queryConditionVOListStr = (String) parameter.get("queryConditionVOList");
|
||||
|
||||
+2
-1
@@ -7,7 +7,8 @@ package com.jero.modules.dummy.enums;
|
||||
*/
|
||||
public enum InventoryStateEnum {
|
||||
ISSUE("已发布","1"),
|
||||
DRAFT("草稿","2");
|
||||
DRAFT("草稿","2"),
|
||||
TO_BE_RELEASED("待发布","2");
|
||||
|
||||
|
||||
|
||||
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.lawsOpinionGather.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionAssessmentResultEO;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionAssessmentResultEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 法规意见收集-评估结果表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="法规意见收集-评估结果表")
|
||||
@RestController
|
||||
@RequestMapping("/lawsOpinionGather/lawsOpinionAssessmentResultEO")
|
||||
@Slf4j
|
||||
public class LawsOpinionAssessmentResultEOController extends JeroController<LawsOpinionAssessmentResultEO, ILawsOpinionAssessmentResultEOService> {
|
||||
@Autowired
|
||||
private ILawsOpinionAssessmentResultEOService lawsOpinionAssessmentResultEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param lawsOpinionAssessmentResultEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集-评估结果表-分页列表查询")
|
||||
@ApiOperation(value="法规意见收集-评估结果表-分页列表查询", notes="法规意见收集-评估结果表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsOpinionAssessmentResultEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsOpinionAssessmentResultEO, req.getParameterMap());
|
||||
Page<LawsOpinionAssessmentResultEO> page = new Page<LawsOpinionAssessmentResultEO>(pageNo, pageSize);
|
||||
IPage<LawsOpinionAssessmentResultEO> pageList = lawsOpinionAssessmentResultEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集-评估结果表-列表查询")
|
||||
@ApiOperation(value="法规意见收集-评估结果表-列表查询", notes="法规意见收集-评估结果表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LawsOpinionAssessmentResultEO>> queryList() {
|
||||
List<LawsOpinionAssessmentResultEO> list = lawsOpinionAssessmentResultEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param lawsOpinionAssessmentResultEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集-评估结果表-添加")
|
||||
@ApiOperation(value="法规意见收集-评估结果表-添加", notes="法规意见收集-评估结果表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO) {
|
||||
lawsOpinionAssessmentResultEOService.add(lawsOpinionAssessmentResultEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param lawsOpinionAssessmentResultEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集-评估结果表-编辑")
|
||||
@ApiOperation(value="法规意见收集-评估结果表-编辑", notes="法规意见收集-评估结果表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO) {
|
||||
lawsOpinionAssessmentResultEOService.editById(lawsOpinionAssessmentResultEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集-评估结果表-通过id删除")
|
||||
@ApiOperation(value="法规意见收集-评估结果表-通过id删除", notes="法规意见收集-评估结果表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
lawsOpinionAssessmentResultEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集-评估结果表-批量删除")
|
||||
@ApiOperation(value="法规意见收集-评估结果表-批量删除", notes="法规意见收集-评估结果表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.lawsOpinionAssessmentResultEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集-评估结果表-通过id查询")
|
||||
@ApiOperation(value="法规意见收集-评估结果表-通过id查询", notes="法规意见收集-评估结果表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO = lawsOpinionAssessmentResultEOService.queryById(id);
|
||||
if(lawsOpinionAssessmentResultEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(lawsOpinionAssessmentResultEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param lawsOpinionAssessmentResultEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO) {
|
||||
return super.exportXls(request, lawsOpinionAssessmentResultEO, LawsOpinionAssessmentResultEO.class, "法规意见收集-评估结果表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, LawsOpinionAssessmentResultEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
package com.jero.modules.lawsOpinionGather.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 法规意见收集表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="法规意见收集表")
|
||||
@RestController
|
||||
@RequestMapping("/lawsOpinionGather/lawsOpinionGatherEO")
|
||||
@Slf4j
|
||||
public class LawsOpinionGatherEOController extends JeroController<LawsOpinionGatherEO, ILawsOpinionGatherEOService> {
|
||||
@Autowired
|
||||
private ILawsOpinionGatherEOService lawsOpinionGatherEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param lawsOpinionGatherEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集表-分页列表查询")
|
||||
@ApiOperation(value="法规意见收集表-分页列表查询", notes="法规意见收集表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(LawsOpinionGatherEO lawsOpinionGatherEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsOpinionGatherEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsOpinionGatherEO, req.getParameterMap());
|
||||
Page<LawsOpinionGatherEO> page = new Page<LawsOpinionGatherEO>(pageNo, pageSize);
|
||||
IPage<LawsOpinionGatherEO> pageList = lawsOpinionGatherEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集表-列表查询")
|
||||
@ApiOperation(value="法规意见收集表-列表查询", notes="法规意见收集表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LawsOpinionGatherEO>> queryList() {
|
||||
List<LawsOpinionGatherEO> list = lawsOpinionGatherEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param lawsOpinionGatherEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集表-添加")
|
||||
@ApiOperation(value="法规意见收集表-添加", notes="法规意见收集表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody LawsOpinionGatherEO lawsOpinionGatherEO) {
|
||||
lawsOpinionGatherEOService.add(lawsOpinionGatherEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param lawsOpinionGatherEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集表-编辑")
|
||||
@ApiOperation(value="法规意见收集表-编辑", notes="法规意见收集表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody LawsOpinionGatherEO lawsOpinionGatherEO) {
|
||||
lawsOpinionGatherEOService.editById(lawsOpinionGatherEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集表-通过id删除")
|
||||
@ApiOperation(value="法规意见收集表-通过id删除", notes="法规意见收集表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
lawsOpinionGatherEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集表-批量删除")
|
||||
@ApiOperation(value="法规意见收集表-批量删除", notes="法规意见收集表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.lawsOpinionGatherEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集表-通过id查询")
|
||||
@ApiOperation(value="法规意见收集表-通过id查询", notes="法规意见收集表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
LawsOpinionGatherEO lawsOpinionGatherEO = lawsOpinionGatherEOService.queryById(id);
|
||||
if(lawsOpinionGatherEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(lawsOpinionGatherEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param lawsOpinionGatherEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, LawsOpinionGatherEO lawsOpinionGatherEO) {
|
||||
return super.exportXls(request, lawsOpinionGatherEO, LawsOpinionGatherEO.class, "法规意见收集表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, LawsOpinionGatherEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程调用接口
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集表-流程调用")
|
||||
@ApiOperation(value="法规意见收集表-流程调用", notes="法规意见收集表-流程调用")
|
||||
@PostMapping(value = "/processCall")
|
||||
public Result<?> processCall(@RequestBody JSONObject jsonObject){
|
||||
return this.lawsOpinionGatherEOService.processCall(jsonObject);
|
||||
}
|
||||
|
||||
}
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
package com.jero.modules.lawsOpinionGather.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsProcessHistoryEO;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsProcessHistoryEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 法规-流程历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="法规-流程历史表")
|
||||
@RestController
|
||||
@RequestMapping("/lawsOpinionGather/lawsProcessHistoryEO")
|
||||
@Slf4j
|
||||
public class LawsProcessHistoryEOController extends JeroController<LawsProcessHistoryEO, ILawsProcessHistoryEOService> {
|
||||
@Autowired
|
||||
private ILawsProcessHistoryEOService lawsProcessHistoryEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param lawsProcessHistoryEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规-流程历史表-分页列表查询")
|
||||
@ApiOperation(value="法规-流程历史表-分页列表查询", notes="法规-流程历史表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(LawsProcessHistoryEO lawsProcessHistoryEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsProcessHistoryEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsProcessHistoryEO, req.getParameterMap());
|
||||
Page<LawsProcessHistoryEO> page = new Page<LawsProcessHistoryEO>(pageNo, pageSize);
|
||||
IPage<LawsProcessHistoryEO> pageList = lawsProcessHistoryEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规-流程历史表-列表查询")
|
||||
@ApiOperation(value="法规-流程历史表-列表查询", notes="法规-流程历史表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LawsProcessHistoryEO>> queryList() {
|
||||
List<LawsProcessHistoryEO> list = lawsProcessHistoryEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param lawsProcessHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规-流程历史表-添加")
|
||||
@ApiOperation(value="法规-流程历史表-添加", notes="法规-流程历史表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody LawsProcessHistoryEO lawsProcessHistoryEO) {
|
||||
lawsProcessHistoryEOService.add(lawsProcessHistoryEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param lawsProcessHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规-流程历史表-编辑")
|
||||
@ApiOperation(value="法规-流程历史表-编辑", notes="法规-流程历史表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody LawsProcessHistoryEO lawsProcessHistoryEO) {
|
||||
lawsProcessHistoryEOService.editById(lawsProcessHistoryEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规-流程历史表-通过id删除")
|
||||
@ApiOperation(value="法规-流程历史表-通过id删除", notes="法规-流程历史表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
lawsProcessHistoryEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规-流程历史表-批量删除")
|
||||
@ApiOperation(value="法规-流程历史表-批量删除", notes="法规-流程历史表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.lawsProcessHistoryEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规-流程历史表-通过id查询")
|
||||
@ApiOperation(value="法规-流程历史表-通过id查询", notes="法规-流程历史表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
LawsProcessHistoryEO lawsProcessHistoryEO = lawsProcessHistoryEOService.queryById(id);
|
||||
if(lawsProcessHistoryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(lawsProcessHistoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param lawsProcessHistoryEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, LawsProcessHistoryEO lawsProcessHistoryEO) {
|
||||
return super.exportXls(request, lawsProcessHistoryEO, LawsProcessHistoryEO.class, "法规-流程历史表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, LawsProcessHistoryEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程调用接口
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规-流程历史表-流程调用")
|
||||
@ApiOperation(value="法规-流程历史表-流程调用", notes="法规-流程历史表-流程调用")
|
||||
@PostMapping(value = "/processCall")
|
||||
public Result<?> processCall(@RequestBody JSONObject jsonObject){
|
||||
return this.lawsProcessHistoryEOService.processCall(jsonObject);
|
||||
}
|
||||
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
package com.jero.modules.lawsOpinionGather.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 法规意见收集-评估结果表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("laws_opinion_assessment_result")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="laws_opinion_assessment_result对象", description="法规意见收集-评估结果表")
|
||||
public class LawsOpinionAssessmentResultEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**意见收集表id*/
|
||||
@Excel(name = "意见收集表id", width = 15)
|
||||
@ApiModelProperty(value = "意见收集表id")
|
||||
private String lawsOpinionGatherId;
|
||||
|
||||
/**相关章节*/
|
||||
@Excel(name = "相关章节", width = 15)
|
||||
@ApiModelProperty(value = "相关章节")
|
||||
private String relatedSection;
|
||||
|
||||
/**问题/建议*/
|
||||
@Excel(name = "问题/建议", width = 15)
|
||||
@ApiModelProperty(value = "问题/建议")
|
||||
private String issueOrSuggest;
|
||||
|
||||
/**理由*/
|
||||
@Excel(name = "理由", width = 15)
|
||||
@ApiModelProperty(value = "理由")
|
||||
private String reason;
|
||||
|
||||
/**附件*/
|
||||
@Excel(name = "附件", width = 15)
|
||||
@ApiModelProperty(value = "附件")
|
||||
private String accessoryFile;
|
||||
|
||||
/**提出时间*/
|
||||
@Excel(name = "提出时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "提出时间")
|
||||
private Date submitTime;
|
||||
|
||||
/**流程实例id*/
|
||||
@Excel(name = "流程实例id", width = 15)
|
||||
@ApiModelProperty(value = "流程实例id")
|
||||
private String actiProcInstId;
|
||||
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
package com.jero.modules.lawsOpinionGather.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 法规意见收集表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("laws_opinion_gather")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="laws_opinion_gather对象", description="法规意见收集表")
|
||||
public class LawsOpinionGatherEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**编号*/
|
||||
@Excel(name = "编号", width = 15)
|
||||
@ApiModelProperty(value = "编号")
|
||||
private String serialNumber;
|
||||
|
||||
/**标题*/
|
||||
@Excel(name = "标题", width = 15)
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**技术领域*/
|
||||
@Excel(name = "技术领域", width = 15)
|
||||
@ApiModelProperty(value = "技术领域")
|
||||
private String technologyTerritory;
|
||||
|
||||
/**收集结果*/
|
||||
@Excel(name = "收集结果", width = 15)
|
||||
@ApiModelProperty(value = "收集结果")
|
||||
private String gatherResult;
|
||||
|
||||
/**发起日期*/
|
||||
@Excel(name = "发起日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "发起日期")
|
||||
private Date startTime;
|
||||
|
||||
/**截止日期*/
|
||||
@Excel(name = "截止日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "截止日期")
|
||||
private Date endTime;
|
||||
|
||||
/**流程实例id*/
|
||||
@Excel(name = "流程实例id", width = 15)
|
||||
@ApiModelProperty(value = "流程实例id")
|
||||
private String actiProcInstId;
|
||||
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.jero.modules.lawsOpinionGather.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 法规-流程历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("laws_process_history")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="laws_process_history对象", description="法规-流程历史表")
|
||||
public class LawsProcessHistoryEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**流程实例id*/
|
||||
@Excel(name = "流程实例id", width = 15)
|
||||
@ApiModelProperty(value = "流程实例id")
|
||||
private String actiProcInstId;
|
||||
|
||||
/**操作节点*/
|
||||
@Excel(name = "操作节点", width = 15)
|
||||
@ApiModelProperty(value = "操作节点")
|
||||
private String taskDefinitionKey;
|
||||
|
||||
/**操作人id*/
|
||||
@Excel(name = "操作人id", width = 15)
|
||||
@ApiModelProperty(value = "操作人id")
|
||||
private String operatorPersonId;
|
||||
|
||||
/**操作角色编码*/
|
||||
@Excel(name = "操作角色编码", width = 15)
|
||||
@ApiModelProperty(value = "操作角色编码")
|
||||
private String operatorRoleCode;
|
||||
|
||||
/**操作时间*/
|
||||
@Excel(name = "操作时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "操作时间")
|
||||
private Date operatorTime;
|
||||
|
||||
/**流程类型*/
|
||||
@Excel(name = "流程类型", width = 15)
|
||||
@ApiModelProperty(value = "流程类型")
|
||||
private String flowType;
|
||||
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.jero.modules.lawsOpinionGather.enums;
|
||||
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 收集结果枚举类
|
||||
*/
|
||||
public enum GatherResultEnum {
|
||||
|
||||
UNDERWAY("进行中","Underway","Underway"),
|
||||
COMPLETED("已完成","Completed","Completed"),
|
||||
;
|
||||
|
||||
|
||||
String cnName;
|
||||
String enName;
|
||||
String value;
|
||||
|
||||
private GatherResultEnum(String cnName, String value, String enName) {
|
||||
this.cnName = cnName;
|
||||
this.value = value;
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getCnName() {
|
||||
return cnName;
|
||||
}
|
||||
|
||||
public void setCnName(String cnName) {
|
||||
this.cnName = cnName;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value,String cut) {
|
||||
GatherResultEnum[] values = values();
|
||||
for (GatherResultEnum taskStatusEnum : values) {
|
||||
if (taskStatusEnum.value.equals(value)) {
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
return taskStatusEnum.cnName;
|
||||
}else if(StringUtils.equals(cut, CutEnum.EN.getValue())){
|
||||
return taskStatusEnum.enName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.jero.modules.lawsOpinionGather.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
|
||||
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.modules.jmreport.common.constant.CommonConstant;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 法规意见收集表 - 定时器
|
||||
* 作用:当前日期大于等于截止日志的时候,把该数据的收集结果,更新为已完成,同时把当前这条数据的所有待办任务提交
|
||||
*/
|
||||
@Slf4j
|
||||
public class LawsOpinionGatherJob implements Job {
|
||||
|
||||
@Autowired
|
||||
private ILawsOpinionGatherEOService lawsOpinionGatherEOService;
|
||||
@Autowired
|
||||
private WorkFlowFeignClient workFlowFeignClient;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.info("法规意见收集流程,定时任务开启 =====================================================");
|
||||
QueryWrapper<LawsOpinionGatherEO> lawsOpinionGatherEOQueryWrapper = new QueryWrapper<>();
|
||||
lawsOpinionGatherEOQueryWrapper.lambda().eq(LawsOpinionGatherEO::getGatherResult, GatherResultEnum.UNDERWAY.getValue());
|
||||
List<LawsOpinionGatherEO> lawsOpinionGatherEOList = this.lawsOpinionGatherEOService.list(lawsOpinionGatherEOQueryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(lawsOpinionGatherEOList)) {
|
||||
Date currentDate = new Date();
|
||||
List<LawsOpinionGatherEO> updateLawsOpinionGatherEOList = lawsOpinionGatherEOList.stream().filter(e -> {
|
||||
boolean flag = false;
|
||||
if(currentDate.after(e.getEndTime())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(updateLawsOpinionGatherEOList)){
|
||||
List<String> actiProcInstIdList = updateLawsOpinionGatherEOList.stream().map(LawsOpinionGatherEO::getActiProcInstId).distinct().collect(Collectors.toList());
|
||||
String actiProcInstIds = StringUtils.join(actiProcInstIdList,",");
|
||||
//将这些流程实例下的待办任务提交
|
||||
Result<String> result = this.workFlowFeignClient.completeTaskByPids(actiProcInstIds);
|
||||
if(result.getCode().equals(CommonConstant.SC_OK_200)){
|
||||
updateLawsOpinionGatherEOList.forEach(lawsOpinionGatherEO -> {
|
||||
lawsOpinionGatherEO.setGatherResult(GatherResultEnum.COMPLETED.getValue());
|
||||
});
|
||||
this.lawsOpinionGatherEOService.updateBatchById(updateLawsOpinionGatherEOList);
|
||||
}
|
||||
}
|
||||
}
|
||||
log.info("法规意见收集流程,定时任务开启 =====================================================");
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.lawsOpinionGather.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionAssessmentResultEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 法规意见收集-评估结果表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LawsOpinionAssessmentResultEOMapper extends BaseMapper<LawsOpinionAssessmentResultEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.lawsOpinionGather.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 法规意见收集表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LawsOpinionGatherEOMapper extends BaseMapper<LawsOpinionGatherEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.lawsOpinionGather.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsProcessHistoryEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 法规-流程历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LawsProcessHistoryEOMapper extends BaseMapper<LawsProcessHistoryEO> {
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<?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.jero.modules.lawsOpinionGather.mapper.LawsOpinionAssessmentResultEOMapper">
|
||||
<resultMap id="LawsOpinionAssessmentResultEOResultMap" type="com.jero.modules.lawsOpinionGather.entity.LawsOpinionAssessmentResultEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="laws_opinion_gather_id" property="lawsOpinionGatherId" />
|
||||
<result column="related_section" property="relatedSection" />
|
||||
<result column="issue_or_suggest" property="issueOrSuggest" />
|
||||
<result column="reason" property="reason" />
|
||||
<result column="accessory_file" property="accessoryFile" />
|
||||
<result column="submit_time" property="submitTime" />
|
||||
<result column="acti_proc_inst_id" property="actiProcInstId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<?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.jero.modules.lawsOpinionGather.mapper.LawsOpinionGatherEOMapper">
|
||||
<resultMap id="LawsOpinionGatherEOResultMap" type="com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="serial_number" property="serialNumber" />
|
||||
<result column="title" property="title" />
|
||||
<result column="technology_territory" property="technologyTerritory" />
|
||||
<result column="gather_result" property="gatherResult" />
|
||||
<result column="start_time" property="startTime" />
|
||||
<result column="end_time" property="endTime" />
|
||||
<result column="acti_proc_inst_id" property="actiProcInstId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<?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.jero.modules.lawsOpinionGather.mapper.LawsProcessHistoryEOMapper">
|
||||
<resultMap id="LawsProcessHistoryEOResultMap" type="com.jero.modules.lawsOpinionGather.entity.LawsProcessHistoryEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="acti_proc_inst_id" property="actiProcInstId" />
|
||||
<result column="task_definition_key" property="taskDefinitionKey" />
|
||||
<result column="operator_person_id" property="operatorPersonId" />
|
||||
<result column="operator_role_code" property="operatorRoleCode" />
|
||||
<result column="operator_time" property="operatorTime" />
|
||||
<result column="flow_type" property="flowType" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.lawsOpinionGather.service;
|
||||
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionAssessmentResultEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 法规意见收集-评估结果表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ILawsOpinionAssessmentResultEOService extends IService<LawsOpinionAssessmentResultEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param lawsOpinionAssessmentResultEO
|
||||
* @return
|
||||
*/
|
||||
void add(LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lawsOpinionAssessmentResultEO
|
||||
* @return
|
||||
*/
|
||||
void editById(LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
LawsOpinionAssessmentResultEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<LawsOpinionAssessmentResultEO> queryList();
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package com.jero.modules.lawsOpinionGather.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 法规意见收集表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ILawsOpinionGatherEOService extends IService<LawsOpinionGatherEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param lawsOpinionGatherEO
|
||||
* @return
|
||||
*/
|
||||
void add(LawsOpinionGatherEO lawsOpinionGatherEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lawsOpinionGatherEO
|
||||
* @return
|
||||
*/
|
||||
void editById(LawsOpinionGatherEO lawsOpinionGatherEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
LawsOpinionGatherEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<LawsOpinionGatherEO> queryList();
|
||||
|
||||
/**
|
||||
* 流程调用
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
Result<?> processCall(JSONObject jsonObject);
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package com.jero.modules.lawsOpinionGather.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsProcessHistoryEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 法规-流程历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ILawsProcessHistoryEOService extends IService<LawsProcessHistoryEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param lawsProcessHistoryEO
|
||||
* @return
|
||||
*/
|
||||
void add(LawsProcessHistoryEO lawsProcessHistoryEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lawsProcessHistoryEO
|
||||
* @return
|
||||
*/
|
||||
void editById(LawsProcessHistoryEO lawsProcessHistoryEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
LawsProcessHistoryEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<LawsProcessHistoryEO> queryList();
|
||||
|
||||
/**
|
||||
* 流程调用
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
Result<?> processCall(JSONObject jsonObject);
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.lawsOpinionGather.service.impl;
|
||||
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionAssessmentResultEO;
|
||||
import com.jero.modules.lawsOpinionGather.mapper.LawsOpinionAssessmentResultEOMapper;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionAssessmentResultEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 法规意见收集-评估结果表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOpinionAssessmentResultEOMapper, LawsOpinionAssessmentResultEO> implements ILawsOpinionAssessmentResultEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param lawsOpinionAssessmentResultEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO) {
|
||||
Date now = new Date();
|
||||
lawsOpinionAssessmentResultEO.setCreateTime(now);
|
||||
lawsOpinionAssessmentResultEO.setUpdateTime(now);
|
||||
save(lawsOpinionAssessmentResultEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lawsOpinionAssessmentResultEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO) {
|
||||
Date now = new Date();
|
||||
lawsOpinionAssessmentResultEO.setUpdateTime(now);
|
||||
saveOrUpdate(lawsOpinionAssessmentResultEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public LawsOpinionAssessmentResultEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LawsOpinionAssessmentResultEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package com.jero.modules.lawsOpinionGather.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||
import com.jero.modules.lawsOpinionGather.mapper.LawsOpinionGatherEOMapper;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
|
||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 法规意见收集表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGatherEOMapper, LawsOpinionGatherEO> implements ILawsOpinionGatherEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param lawsOpinionGatherEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(LawsOpinionGatherEO lawsOpinionGatherEO) {
|
||||
Date now = new Date();
|
||||
lawsOpinionGatherEO.setCreateTime(now);
|
||||
lawsOpinionGatherEO.setUpdateTime(now);
|
||||
save(lawsOpinionGatherEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lawsOpinionGatherEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(LawsOpinionGatherEO lawsOpinionGatherEO) {
|
||||
Date now = new Date();
|
||||
lawsOpinionGatherEO.setUpdateTime(now);
|
||||
saveOrUpdate(lawsOpinionGatherEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public LawsOpinionGatherEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LawsOpinionGatherEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> processCall(JSONObject jsonObject) {
|
||||
String requestSource = jsonObject.getString("requestSource");
|
||||
if(StringUtils.isEmpty(requestSource)){
|
||||
throw new JeroBootException("请求来源不能为空!");
|
||||
}
|
||||
if(!StringUtils.equals(requestSource, RequestSourceEnum.WORK_FLOW.getValue())){
|
||||
throw new JeroBootException("来源有误,没有权限调用该接口!");
|
||||
}
|
||||
|
||||
String operatorType = jsonObject.getString("operatorType");
|
||||
if(StringUtils.isEmpty(operatorType)){
|
||||
throw new JeroBootException("操作类型不能为空!");
|
||||
}
|
||||
|
||||
if(StringUtils.equals(operatorType, OperatorTypeEnum.ADD_LAWS_OPINION_GATHER.getValue())){
|
||||
Object lawsOpinionGatherInfoJson = jsonObject.get("lawsOpinionGatherInfo");
|
||||
LawsOpinionGatherEO lawsOpinionGatherEO = JSONObject.parseObject(
|
||||
JSONObject.toJSONString(lawsOpinionGatherInfoJson),LawsOpinionGatherEO.class
|
||||
);
|
||||
this.baseMapper.insert(lawsOpinionGatherEO);
|
||||
}
|
||||
|
||||
if(StringUtils.equals(operatorType, OperatorTypeEnum.UPDATE_LAWS_OPINION_GATHER_GATHER_RESULT.getValue())){
|
||||
LawsOpinionGatherEO lawsOpinionGatherEO = new LawsOpinionGatherEO();
|
||||
lawsOpinionGatherEO.setId(jsonObject.getString("id"));
|
||||
lawsOpinionGatherEO.setGatherResult(jsonObject.getString("gatherResult"));
|
||||
this.baseMapper.updateById(lawsOpinionGatherEO);
|
||||
}
|
||||
return new Result<>().success("调用成功!");
|
||||
}
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
package com.jero.modules.lawsOpinionGather.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsProcessHistoryEO;
|
||||
import com.jero.modules.lawsOpinionGather.mapper.LawsProcessHistoryEOMapper;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsProcessHistoryEOService;
|
||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 法规-流程历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LawsProcessHistoryEOServiceImpl extends ServiceImpl<LawsProcessHistoryEOMapper, LawsProcessHistoryEO> implements ILawsProcessHistoryEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param lawsProcessHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(LawsProcessHistoryEO lawsProcessHistoryEO) {
|
||||
Date now = new Date();
|
||||
lawsProcessHistoryEO.setCreateTime(now);
|
||||
lawsProcessHistoryEO.setUpdateTime(now);
|
||||
save(lawsProcessHistoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lawsProcessHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(LawsProcessHistoryEO lawsProcessHistoryEO) {
|
||||
Date now = new Date();
|
||||
lawsProcessHistoryEO.setUpdateTime(now);
|
||||
saveOrUpdate(lawsProcessHistoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public LawsProcessHistoryEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LawsProcessHistoryEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> processCall(JSONObject jsonObject) {
|
||||
String requestSource = jsonObject.getString("requestSource");
|
||||
if(StringUtils.isEmpty(requestSource)){
|
||||
throw new JeroBootException("请求来源不能为空!");
|
||||
}
|
||||
if(!StringUtils.equals(requestSource, RequestSourceEnum.WORK_FLOW.getValue())){
|
||||
throw new JeroBootException("来源有误,没有权限调用该接口!");
|
||||
}
|
||||
|
||||
String operatorType = jsonObject.getString("operatorType");
|
||||
if(StringUtils.isEmpty(operatorType)){
|
||||
throw new JeroBootException("操作类型不能为空!");
|
||||
}
|
||||
if(StringUtils.equals(operatorType, OperatorTypeEnum.ADD.getValue())){
|
||||
JSONArray lawsProcessHistoryEOArray = jsonObject.getJSONArray("lawsProcessHistoryEOList");
|
||||
List<LawsProcessHistoryEO> lawsProcessHistoryEOList = new ArrayList<>();
|
||||
LawsProcessHistoryEO lawsProcessHistoryEO = null;
|
||||
for (Object lawsProcessHistory : lawsProcessHistoryEOArray) {
|
||||
lawsProcessHistoryEO = JSONObject.parseObject(JSONObject.toJSONString(lawsProcessHistory),LawsProcessHistoryEO.class);
|
||||
lawsProcessHistoryEOList.add(lawsProcessHistoryEO);
|
||||
}
|
||||
this.saveBatch(lawsProcessHistoryEOList);
|
||||
}
|
||||
|
||||
return new Result<>().success("调用成功!");
|
||||
}
|
||||
}
|
||||
+3
@@ -36,6 +36,9 @@ public enum OperatorTypeEnum {
|
||||
QUERY_PREHOMO_STATISTICS("查询prehomo统计","queryPrehomoStatistics"),
|
||||
QUERY_VERIFY_STATISTICS("查询验证符合性统计","queryVerifyStatistics"),
|
||||
QUERY_CERTIFICATION_PROGRESS_STATISTICS("查询认证进度统计","queryCertificationProgressStatistics"),
|
||||
|
||||
ADD_LAWS_OPINION_GATHER("添加法规意见收集数据","addLawsOpinionGather"),
|
||||
UPDATE_LAWS_OPINION_GATHER_GATHER_RESULT("更新法规意见收集数据收集结果","updateLawsOpinionGatherGatherResult"),
|
||||
;
|
||||
|
||||
String name;
|
||||
|
||||
+4
-8
@@ -156,13 +156,11 @@ public class PrehomoJob implements Job {
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName();
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
@@ -193,13 +191,11 @@ public class PrehomoJob implements Job {
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName();
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
|
||||
+4
-8
@@ -153,13 +153,11 @@ public class VerifyComplianceJob implements Job {
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName();
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
@@ -190,13 +188,11 @@ public class VerifyComplianceJob implements Job {
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName();
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
|
||||
+3
-12
@@ -150,17 +150,10 @@ public class designComplianceJob implements Job {
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName();
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
@@ -190,13 +183,11 @@ public class designComplianceJob implements Job {
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName();
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
|
||||
+23
-55
@@ -2030,7 +2030,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
feishuMsgVo.setDueDate(taskAffirmDueDate);
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.TASK_AFFIRM_LINK.getLink()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='" + JumpLinkEnum.TASK_AFFIRM_LINK.getLink() + "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
@@ -2049,17 +2051,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
LambdaQueryWrapper<ProjectLawsInventoryEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(ProjectLawsInventoryEO::getId,Arrays.asList(ids.split(",")));
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.list(wrapper);
|
||||
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = new ArrayList<>();
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOList) {
|
||||
|
||||
String projectLawsInventoryId = UUID.randomUUID().toString().replace("-", "");
|
||||
projectLawsInventoryEO.setId(projectLawsInventoryId);
|
||||
|
||||
ProjectTaskInventoryEO projectTaskInventoryEO = new ProjectTaskInventoryEO();
|
||||
String projectTaskInventoryId = UUID.randomUUID().toString().replace("-", "");
|
||||
projectTaskInventoryEO.setId(projectTaskInventoryId);
|
||||
projectTaskInventoryEO.setProjectLawsInventoryId(projectLawsInventoryId);
|
||||
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
||||
projectLawsInventoryEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
}
|
||||
this.saveBatch(projectLawsInventoryEOList);
|
||||
|
||||
@@ -2072,9 +2065,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String enContentLog = username+" copied “"+serialNumber+"”";
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId,CutEnum.CN.getValue());
|
||||
projectLawsInventoryLogEOService.updateLog(enContentLog, projectLibraryId,CutEnum.EN.getValue());
|
||||
|
||||
//项目任务清单数据初始化。
|
||||
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2101,38 +2091,33 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
//实施类别 implementType
|
||||
if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getImplementType())){
|
||||
projectLawsInventoryEOTemp.setImplementType(projectLawsInventoryEO.getImplementType());
|
||||
}else{
|
||||
projectLawsInventoryEOTemp.setImplementType("");
|
||||
}
|
||||
// else{
|
||||
// projectLawsInventoryEOTemp.setImplementType("");
|
||||
// }
|
||||
//认证类型 attestationType
|
||||
if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationType())){
|
||||
projectLawsInventoryEOTemp.setAttestationType(projectLawsInventoryEO.getAttestationType());
|
||||
}else{
|
||||
projectLawsInventoryEOTemp.setAttestationType("");
|
||||
}
|
||||
// else{
|
||||
// projectLawsInventoryEOTemp.setAttestationType("");
|
||||
// }
|
||||
//认证级别 attestationRank
|
||||
if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())){
|
||||
projectLawsInventoryEOTemp.setAttestationRank(projectLawsInventoryEO.getAttestationRank());
|
||||
}else{
|
||||
projectLawsInventoryEOTemp.setAttestationRank("");
|
||||
}
|
||||
// else{
|
||||
// projectLawsInventoryEOTemp.setAttestationRank("");
|
||||
// }
|
||||
//责任领域 dutyTerritory
|
||||
if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())){
|
||||
projectLawsInventoryEOTemp.setDutyTerritory(projectLawsInventoryEO.getDutyTerritory());
|
||||
}else{
|
||||
projectLawsInventoryEOTemp.setDutyTerritory("");
|
||||
}
|
||||
// else{
|
||||
// projectLawsInventoryEOTemp.setDutyTerritory("");
|
||||
// }
|
||||
//适用地区region
|
||||
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getRegion())){
|
||||
projectLawsInventoryEOTemp.setRegion(projectLawsInventoryEO.getRegion());
|
||||
}else{
|
||||
projectLawsInventoryEOTemp.setRegion("");
|
||||
}
|
||||
// else{
|
||||
// projectLawsInventoryEOTemp.setRegion("");
|
||||
// }
|
||||
//在产车实施日期implementTime
|
||||
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getImplementTime())){
|
||||
projectLawsInventoryEOTemp.setImplementTime(projectLawsInventoryEO.getImplementTime());
|
||||
@@ -2156,14 +2141,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
projectLawsInventoryEOList.add(projectLawsInventoryEOTemp);
|
||||
}
|
||||
|
||||
this.updateBatchById(projectLawsInventoryEOList);
|
||||
// for (ProjectLawsInventoryEO lawsInventoryEO : projectLawsInventoryEOList) {
|
||||
// LambdaUpdateWrapper<ProjectLawsInventoryEO> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
// updateWrapper.in(ProjectLawsInventoryEO::getId,lawsInventoryEO.getId());
|
||||
// setDateNull(lawsInventoryEO, updateWrapper);
|
||||
// //保存
|
||||
// this.update(lawsInventoryEO,updateWrapper);
|
||||
// }
|
||||
// this.updateBatchById(projectLawsInventoryEOList);
|
||||
for (ProjectLawsInventoryEO lawsInventoryEO : projectLawsInventoryEOList) {
|
||||
LambdaUpdateWrapper<ProjectLawsInventoryEO> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.in(ProjectLawsInventoryEO::getId,lawsInventoryEO.getId());
|
||||
setDateNull(lawsInventoryEO, updateWrapper);
|
||||
//保存
|
||||
this.update(lawsInventoryEO,updateWrapper);
|
||||
}
|
||||
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
@@ -3325,14 +3310,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
fileTemp.mkdirs();
|
||||
//文件
|
||||
exportFile(dataList,fileInfos);
|
||||
String excelName = "";
|
||||
if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){
|
||||
excelName = "法规清单.xlsx";
|
||||
}else{
|
||||
excelName = "Regulation List.xlsx";
|
||||
}
|
||||
//excel
|
||||
OutputStream excelOS = new FileOutputStream(path + File.separator + excelName);
|
||||
OutputStream excelOS = new FileOutputStream(path + File.separator + "法规清单.xlsx");
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){
|
||||
@@ -3471,17 +3450,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
if(StringUtils.isNotBlank(pullVerifyDeliverableType)){
|
||||
projectLawsInventoryEOEn.setVerifyDeliverableType(pullVerifyDeliverableType);
|
||||
}
|
||||
//清单确认状态
|
||||
String inventoryAffirmStatus = projectLawsInventoryEOEn.getInventoryAffirmStatus();
|
||||
if(StringUtils.isNotBlank(inventoryAffirmStatus)){
|
||||
projectLawsInventoryEOEn.setInventoryAffirmStatusName(inventoryAffirmStatus);
|
||||
}
|
||||
|
||||
//任务确认状态
|
||||
String taskAffirmStatus = projectLawsInventoryEOEn.getTaskAffirmStatus();
|
||||
if(StringUtils.isNotBlank(taskAffirmStatus)){
|
||||
projectLawsInventoryEOEn.setTaskAffirmStatusName(taskAffirmStatus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -320,13 +320,11 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName();
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
|
||||
+3
-1
@@ -666,12 +666,14 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName();
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ projectLibraryBase.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
package com.jero.modules.report.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportManageEO;
|
||||
import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 法规月报管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="法规月报管理")
|
||||
@RestController
|
||||
@RequestMapping("/report/lawsMonthlyReportManageEO")
|
||||
@Slf4j
|
||||
public class LawsMonthlyReportManageEOController extends JeroController<LawsMonthlyReportManageEO, ILawsMonthlyReportManageEOService> {
|
||||
@Autowired
|
||||
private ILawsMonthlyReportManageEOService lawsMonthlyReportManageEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param lawsMonthlyReportManageEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规月报管理-分页列表查询")
|
||||
@ApiOperation(value="法规月报管理-分页列表查询", notes="法规月报管理-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(LawsMonthlyReportManageEO lawsMonthlyReportManageEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsMonthlyReportManageEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsMonthlyReportManageEO, req.getParameterMap());
|
||||
Page<LawsMonthlyReportManageEO> page = new Page<LawsMonthlyReportManageEO>(pageNo, pageSize);
|
||||
IPage<LawsMonthlyReportManageEO> pageList = lawsMonthlyReportManageEOService.getPageInfo(page, queryWrapper);
|
||||
return Result.OK(lawsMonthlyReportManageEO.getCut(),pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规月报管理-列表查询")
|
||||
@ApiOperation(value="法规月报管理-列表查询", notes="法规月报管理-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LawsMonthlyReportManageEO>> queryList() {
|
||||
List<LawsMonthlyReportManageEO> list = lawsMonthlyReportManageEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param lawsMonthlyReportManageEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规月报管理-添加")
|
||||
@ApiOperation(value="法规月报管理-添加", notes="法规月报管理-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody LawsMonthlyReportManageEO lawsMonthlyReportManageEO) {
|
||||
lawsMonthlyReportManageEOService.add(lawsMonthlyReportManageEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param lawsMonthlyReportManageEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规月报管理-编辑")
|
||||
@ApiOperation(value="法规月报管理-编辑", notes="法规月报管理-编辑")
|
||||
@GetMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody LawsMonthlyReportManageEO lawsMonthlyReportManageEO) {
|
||||
lawsMonthlyReportManageEOService.editById(lawsMonthlyReportManageEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规月报管理-通过id删除")
|
||||
@ApiOperation(value="法规月报管理-通过id删除", notes="法规月报管理-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
lawsMonthlyReportManageEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规月报管理-批量删除")
|
||||
@ApiOperation(value="法规月报管理-批量删除", notes="法规月报管理-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.lawsMonthlyReportManageEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规月报管理-通过id查询")
|
||||
@ApiOperation(value="法规月报管理-通过id查询", notes="法规月报管理-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
LawsMonthlyReportManageEO lawsMonthlyReportManageEO = lawsMonthlyReportManageEOService.queryById(id);
|
||||
if(lawsMonthlyReportManageEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(lawsMonthlyReportManageEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param lawsMonthlyReportManageEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, LawsMonthlyReportManageEO lawsMonthlyReportManageEO) {
|
||||
return super.exportXls(request, lawsMonthlyReportManageEO, LawsMonthlyReportManageEO.class, "法规月报管理");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, LawsMonthlyReportManageEO.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@AutoLog(value = "发布")
|
||||
@ApiOperation(value="发布", notes="发布")
|
||||
@PostMapping(value = "/issue")
|
||||
// @RequiresPermissions("dummyInventoryBase:issue")
|
||||
public Result<?> issue(@RequestBody LawsMonthlyReportManageEO lawsMonthlyReportManageEO) {
|
||||
try {
|
||||
lawsMonthlyReportManageEOService.issue(lawsMonthlyReportManageEO);
|
||||
} catch (Exception e) {
|
||||
return Result.error("操作失败");
|
||||
}
|
||||
return Result.OK("操作成功");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
package com.jero.modules.report.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO;
|
||||
import com.jero.modules.report.service.ILawsMonthlyReportTitleTemplateEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 月报标题模板
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="月报标题模板")
|
||||
@RestController
|
||||
@RequestMapping("/report/lawsMonthlyReportTitleTemplateEO")
|
||||
@Slf4j
|
||||
public class LawsMonthlyReportTitleTemplateEOController extends JeroController<LawsMonthlyReportTitleTemplateEO, ILawsMonthlyReportTitleTemplateEOService> {
|
||||
@Autowired
|
||||
private ILawsMonthlyReportTitleTemplateEOService lawsMonthlyReportTitleTemplateEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param lawsMonthlyReportTitleTemplateEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "月报标题模板-分页列表查询")
|
||||
@ApiOperation(value="月报标题模板-分页列表查询", notes="月报标题模板-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsMonthlyReportTitleTemplateEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsMonthlyReportTitleTemplateEO, req.getParameterMap());
|
||||
// Page<LawsMonthlyReportTitleTemplateEO> page = new Page<LawsMonthlyReportTitleTemplateEO>(pageNo, pageSize);
|
||||
// IPage<LawsMonthlyReportTitleTemplateEO> pageList = lawsMonthlyReportTitleTemplateEOService.page(page, queryWrapper);
|
||||
IPage<LawsMonthlyReportTitleTemplateEO> pageList = lawsMonthlyReportTitleTemplateEOService.getPageInfo(pageNo,pageSize, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "月报标题模板-列表查询")
|
||||
@ApiOperation(value="月报标题模板-列表查询", notes="月报标题模板-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LawsMonthlyReportTitleTemplateEO>> queryList() {
|
||||
List<LawsMonthlyReportTitleTemplateEO> list = lawsMonthlyReportTitleTemplateEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param lawsMonthlyReportTitleTemplateEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "月报标题模板-添加")
|
||||
@ApiOperation(value="月报标题模板-添加", notes="月报标题模板-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO) {
|
||||
lawsMonthlyReportTitleTemplateEOService.add(lawsMonthlyReportTitleTemplateEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param lawsMonthlyReportTitleTemplateEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "月报标题模板-编辑")
|
||||
@ApiOperation(value="月报标题模板-编辑", notes="月报标题模板-编辑")
|
||||
@GetMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO) {
|
||||
lawsMonthlyReportTitleTemplateEOService.editById(lawsMonthlyReportTitleTemplateEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "月报标题模板-通过id删除")
|
||||
@ApiOperation(value="月报标题模板-通过id删除", notes="月报标题模板-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
lawsMonthlyReportTitleTemplateEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "月报标题模板-批量删除")
|
||||
@ApiOperation(value="月报标题模板-批量删除", notes="月报标题模板-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.lawsMonthlyReportTitleTemplateEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "月报标题模板-通过id查询")
|
||||
@ApiOperation(value="月报标题模板-通过id查询", notes="月报标题模板-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO = lawsMonthlyReportTitleTemplateEOService.queryById(id);
|
||||
if(lawsMonthlyReportTitleTemplateEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(lawsMonthlyReportTitleTemplateEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param lawsMonthlyReportTitleTemplateEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO) {
|
||||
return super.exportXls(request, lawsMonthlyReportTitleTemplateEO, LawsMonthlyReportTitleTemplateEO.class, "月报标题模板");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, LawsMonthlyReportTitleTemplateEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "月报标题模板-列表查询")
|
||||
@ApiOperation(value="月报标题模板-列表查询", notes="月报标题模板-列表查询")
|
||||
@GetMapping(value = "/oneMenu")
|
||||
public Result<List<LawsMonthlyReportTitleTemplateEO>> OneMenuList() {
|
||||
List<LawsMonthlyReportTitleTemplateEO> list = lawsMonthlyReportTitleTemplateEOService.OneMenuList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
}
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
package com.jero.modules.report.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 法规月报管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("laws_monthly_report_manage")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="laws_monthly_report_manage对象", description="法规月报管理")
|
||||
public class LawsMonthlyReportManageEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField(exist = false)
|
||||
private java.lang.String cut;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**法规月报名称*/
|
||||
@Excel(name = "法规月报名称", width = 15)
|
||||
@ApiModelProperty(value = "法规月报名称")
|
||||
private java.lang.String name;
|
||||
|
||||
/**月报语种*/
|
||||
@Dict(dicCode ="yue4_bao4_yu3_zhong3")
|
||||
@Excel(name = "月报语种", width = 15)
|
||||
@ApiModelProperty(value = "月报语种")
|
||||
private java.lang.String language;
|
||||
|
||||
/**发布状态*/
|
||||
@Dict(dicCode ="fa3_gui1_yue4_bao4_guan3_li3_-_-_fa1_bu4_zhuang4_tai4")
|
||||
@Excel(name = "发布状态", width = 15)
|
||||
@ApiModelProperty(value = "发布状态")
|
||||
private java.lang.String issueStatus;
|
||||
|
||||
/**文件id*/
|
||||
@Excel(name = "文件id", width = 15)
|
||||
@ApiModelProperty(value = "文件id")
|
||||
private java.lang.String fileId;
|
||||
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.report.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 月报标题模板
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("laws_monthly_report_title_template")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="laws_monthly_report_title_template对象", description="月报标题模板")
|
||||
public class LawsMonthlyReportTitleTemplateEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**父id*/
|
||||
@Excel(name = "父id", width = 15)
|
||||
@ApiModelProperty(value = "父id")
|
||||
private java.lang.String parentId;
|
||||
|
||||
/**中文标题*/
|
||||
@Excel(name = "中文标题", width = 15)
|
||||
@ApiModelProperty(value = "中文标题")
|
||||
private java.lang.String titleCn;
|
||||
|
||||
/**英文标题*/
|
||||
@Excel(name = "英文标题", width = 15)
|
||||
@ApiModelProperty(value = "英文标题")
|
||||
private java.lang.String titleEn;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<LawsMonthlyReportTitleTemplateEO> children = new ArrayList<>();
|
||||
|
||||
//标识(上移-->0,下移-->1)
|
||||
@TableField(exist = false)
|
||||
private String flag;
|
||||
|
||||
//排序
|
||||
private int sort;
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.report.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportManageEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 法规月报管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LawsMonthlyReportManageEOMapper extends BaseMapper<LawsMonthlyReportManageEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.report.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 月报标题模板
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LawsMonthlyReportTitleTemplateEOMapper extends BaseMapper<LawsMonthlyReportTitleTemplateEO> {
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?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.jero.modules.report.mapper.LawsMonthlyReportManageEOMapper">
|
||||
<resultMap id="LawsMonthlyReportManageEOResultMap" type="com.jero.modules.report.entity.LawsMonthlyReportManageEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="name" property="name" />
|
||||
<result column="language" property="language" />
|
||||
<result column="issue_status" property="issueStatus" />
|
||||
<result column="file_id" property="fileId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?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.jero.modules.report.mapper.LawsMonthlyReportTitleTemplateEOMapper">
|
||||
<resultMap id="LawsMonthlyReportTitleTemplateEOResultMap" type="com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="parent_id" property="parentId" />
|
||||
<result column="title_cn" property="titleCn" />
|
||||
<result column="title_en" property="titleEn" />
|
||||
<result column="sort" property="sort" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package com.jero.modules.report.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportManageEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 法规月报管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ILawsMonthlyReportManageEOService extends IService<LawsMonthlyReportManageEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param lawsMonthlyReportManageEO
|
||||
* @return
|
||||
*/
|
||||
void add(LawsMonthlyReportManageEO lawsMonthlyReportManageEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lawsMonthlyReportManageEO
|
||||
* @return
|
||||
*/
|
||||
void editById(LawsMonthlyReportManageEO lawsMonthlyReportManageEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
LawsMonthlyReportManageEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<LawsMonthlyReportManageEO> queryList();
|
||||
|
||||
/**
|
||||
* 分页
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @return
|
||||
*/
|
||||
IPage<LawsMonthlyReportManageEO> getPageInfo(Page<LawsMonthlyReportManageEO> page, QueryWrapper<LawsMonthlyReportManageEO> queryWrapper);
|
||||
|
||||
void issue(LawsMonthlyReportManageEO lawsMonthlyReportManageEO);
|
||||
|
||||
|
||||
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
package com.jero.modules.report.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 月报标题模板
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ILawsMonthlyReportTitleTemplateEOService extends IService<LawsMonthlyReportTitleTemplateEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param lawsMonthlyReportTitleTemplateEO
|
||||
* @return
|
||||
*/
|
||||
void add(LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lawsMonthlyReportTitleTemplateEO
|
||||
* @return
|
||||
*/
|
||||
void editById(LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
LawsMonthlyReportTitleTemplateEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<LawsMonthlyReportTitleTemplateEO> queryList();
|
||||
|
||||
/**
|
||||
* 分页
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param queryWrapper
|
||||
* @return
|
||||
*/
|
||||
IPage<LawsMonthlyReportTitleTemplateEO> getPageInfo(Integer pageNo,Integer pageSize, QueryWrapper<LawsMonthlyReportTitleTemplateEO> queryWrapper);
|
||||
|
||||
/**
|
||||
* 以及菜单
|
||||
*/
|
||||
List<LawsMonthlyReportTitleTemplateEO> OneMenuList();
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
package com.jero.modules.report.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.dummy.enums.InventoryStateEnum;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportManageEO;
|
||||
import com.jero.modules.report.mapper.LawsMonthlyReportManageEOMapper;
|
||||
import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 法规月报管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthlyReportManageEOMapper, LawsMonthlyReportManageEO> implements ILawsMonthlyReportManageEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param lawsMonthlyReportManageEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(LawsMonthlyReportManageEO lawsMonthlyReportManageEO) {
|
||||
lawsMonthlyReportManageEO.setIssueStatus(InventoryStateEnum.TO_BE_RELEASED.getValue());
|
||||
Date now = new Date();
|
||||
lawsMonthlyReportManageEO.setCreateTime(now);
|
||||
lawsMonthlyReportManageEO.setUpdateTime(now);
|
||||
save(lawsMonthlyReportManageEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lawsMonthlyReportManageEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(LawsMonthlyReportManageEO lawsMonthlyReportManageEO) {
|
||||
Date now = new Date();
|
||||
lawsMonthlyReportManageEO.setUpdateTime(now);
|
||||
saveOrUpdate(lawsMonthlyReportManageEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public LawsMonthlyReportManageEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LawsMonthlyReportManageEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<LawsMonthlyReportManageEO> getPageInfo(Page<LawsMonthlyReportManageEO> page, QueryWrapper<LawsMonthlyReportManageEO> queryWrapper) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
queryWrapper.and(query->{
|
||||
query.in("create_by",sysUser.getUsername()).in("issue_status", InventoryStateEnum.TO_BE_RELEASED.getValue())
|
||||
.or().in("issue_status",InventoryStateEnum.ISSUE.getValue());
|
||||
});
|
||||
Page<LawsMonthlyReportManageEO> pageInfo = this.page(page, queryWrapper);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void issue(LawsMonthlyReportManageEO lawsMonthlyReportManageEO) {
|
||||
this.updateById(lawsMonthlyReportManageEO);
|
||||
}
|
||||
}
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
package com.jero.modules.report.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO;
|
||||
import com.jero.modules.report.mapper.LawsMonthlyReportTitleTemplateEOMapper;
|
||||
import com.jero.modules.report.service.ILawsMonthlyReportTitleTemplateEOService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 月报标题模板
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-06-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LawsMonthlyReportTitleTemplateEOServiceImpl extends ServiceImpl<LawsMonthlyReportTitleTemplateEOMapper, LawsMonthlyReportTitleTemplateEO> implements ILawsMonthlyReportTitleTemplateEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param lawsMonthlyReportTitleTemplateEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO) {
|
||||
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS = this.list();
|
||||
List<LawsMonthlyReportTitleTemplateEO> parent = lawsMonthlyReportTitleTemplateEOS.stream().filter(e -> StringUtils.isBlank(e.getParentId())).collect(Collectors.toList());
|
||||
List<LawsMonthlyReportTitleTemplateEO> children = lawsMonthlyReportTitleTemplateEOS.stream().filter(e -> StringUtils.isNotBlank(e.getParentId())).collect(Collectors.toList());
|
||||
int sort = 0;
|
||||
if(StringUtils.isBlank(lawsMonthlyReportTitleTemplateEO.getParentId())){
|
||||
if(parent.size() == 0){
|
||||
lawsMonthlyReportTitleTemplateEO.setSort(0);
|
||||
}else{
|
||||
List<Integer> sortList = parent.stream().map(LawsMonthlyReportTitleTemplateEO::getSort).collect(Collectors.toList());
|
||||
Collections.sort(sortList);
|
||||
sort = sortList.get(sortList.size()-1) + 1;
|
||||
}
|
||||
}else{
|
||||
if(children.size() == 0){
|
||||
lawsMonthlyReportTitleTemplateEO.setSort(0);
|
||||
}else{
|
||||
List<Integer> sortList = parent.stream().map(LawsMonthlyReportTitleTemplateEO::getSort).collect(Collectors.toList());
|
||||
Collections.sort(sortList);
|
||||
sort = sortList.get(sortList.size()-1) + 1;
|
||||
}
|
||||
}
|
||||
lawsMonthlyReportTitleTemplateEO.setSort(sort);
|
||||
Date now = new Date();
|
||||
lawsMonthlyReportTitleTemplateEO.setCreateTime(now);
|
||||
lawsMonthlyReportTitleTemplateEO.setUpdateTime(now);
|
||||
save(lawsMonthlyReportTitleTemplateEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lawsMonthlyReportTitleTemplateEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO) {
|
||||
Date now = new Date();
|
||||
lawsMonthlyReportTitleTemplateEO.setUpdateTime(now);
|
||||
saveOrUpdate(lawsMonthlyReportTitleTemplateEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public LawsMonthlyReportTitleTemplateEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LawsMonthlyReportTitleTemplateEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<LawsMonthlyReportTitleTemplateEO> getPageInfo( Integer pageNo,Integer pageSize,QueryWrapper<LawsMonthlyReportTitleTemplateEO> queryWrapper) {
|
||||
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS = this.list();
|
||||
List<LawsMonthlyReportTitleTemplateEO> parentList = lawsMonthlyReportTitleTemplateEOS.stream()
|
||||
.filter(e -> StringUtils.isBlank(e.getParentId())).collect(Collectors.toList());
|
||||
Collections.sort(parentList, new Comparator<LawsMonthlyReportTitleTemplateEO>() {
|
||||
@Override
|
||||
public int compare(LawsMonthlyReportTitleTemplateEO p1, LawsMonthlyReportTitleTemplateEO p2) {
|
||||
return String.valueOf(p1.getSort()).compareTo(String.valueOf(p2.getSort()));
|
||||
}
|
||||
});
|
||||
|
||||
for (LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO : parentList) {
|
||||
List<LawsMonthlyReportTitleTemplateEO> children = lawsMonthlyReportTitleTemplateEOS.stream()
|
||||
.filter(e -> lawsMonthlyReportTitleTemplateEO.getId().equals(e.getParentId())).collect(Collectors.toList());
|
||||
if(children.size() != 0){
|
||||
Collections.sort(children, new Comparator<LawsMonthlyReportTitleTemplateEO>() {
|
||||
@Override
|
||||
public int compare(LawsMonthlyReportTitleTemplateEO p1, LawsMonthlyReportTitleTemplateEO p2) {
|
||||
return String.valueOf(p1.getSort()).compareTo(String.valueOf(p2.getSort()));
|
||||
}
|
||||
});
|
||||
lawsMonthlyReportTitleTemplateEO.setChildren(children);
|
||||
}
|
||||
}
|
||||
Page pages = getPages(pageNo, pageSize, parentList);
|
||||
return pages;
|
||||
}
|
||||
|
||||
/**
|
||||
* 以及菜单
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LawsMonthlyReportTitleTemplateEO> OneMenuList() {
|
||||
LambdaQueryWrapper<LawsMonthlyReportTitleTemplateEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.isNull(LawsMonthlyReportTitleTemplateEO::getParentId);
|
||||
return this.list(wrapper);
|
||||
}
|
||||
|
||||
public Page getPages(Integer currentPage, Integer pageSize, List<LawsMonthlyReportTitleTemplateEO> list){
|
||||
Page page =new Page();
|
||||
if(list==null){
|
||||
return null;
|
||||
}
|
||||
int size = list.size();
|
||||
if(pageSize > size){
|
||||
pageSize = size;
|
||||
}
|
||||
if(pageSize!=0){
|
||||
//求出最⼤页数,防⽌currentPage越界
|
||||
int maxPage = size % pageSize ==0? size / pageSize : size / pageSize +1;
|
||||
if(currentPage > maxPage){
|
||||
currentPage = maxPage;
|
||||
}
|
||||
}
|
||||
//当前页第⼀条数据的下标
|
||||
int curIdx = currentPage >1?(currentPage -1)* pageSize :0;
|
||||
List pageList =new ArrayList();
|
||||
//将当前页的数据放进pageList
|
||||
for(int i =0; i < pageSize && curIdx + i < size; i++){
|
||||
pageList.add(list.get(curIdx + i));
|
||||
}
|
||||
page.setCurrent(currentPage).setSize(pageSize).setTotal(list.size()).setRecords(pageList);
|
||||
return page;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1492,7 +1492,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
FileUtils.copyInputStreamToFile(file.getInputStream(), new File(path +File.separator+ file.getOriginalFilename()));
|
||||
try{
|
||||
//解压缩
|
||||
String zipEntryName = FileUnZip.unZipFiles2(path +File.separator+ file.getOriginalFilename(),path);
|
||||
String zipEntryName = FileUnZip.unZipFiles2(path +File.separator+ file.getOriginalFilename(), path);
|
||||
// 数据相关处理,
|
||||
// 1.获取其中的Excel,
|
||||
List<File> excelfilelist = FileUnZip.readExcelFile(zipEntryName);
|
||||
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package com.jero.modules.warn.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.warn.service.LawsWarnService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/6/20 11:54
|
||||
* @auth zhn
|
||||
*/
|
||||
@Api(tags="法规预警")
|
||||
@RestController
|
||||
@RequestMapping("/LawsWarn")
|
||||
@Slf4j
|
||||
public class LawsWarnController {
|
||||
|
||||
@Autowired
|
||||
private LawsWarnService lawsWarnService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="分页查询", notes="分页查询")
|
||||
@PostMapping(value = "/queryPageInfo")
|
||||
@ResponseBody
|
||||
// @RequiresPermissions("document:queryPageInfo")
|
||||
public JSONObject queryPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = lawsWarnService.getInfoPage(parameter);
|
||||
Result<IPage> ok = Result.OK(infoPage);
|
||||
JSONObject jsonResult = JSONObject.fromObject(ok);
|
||||
return jsonResult;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "导出excel")
|
||||
@GetMapping(value = "/exportExcel")
|
||||
// @RequiresPermissions("document:exportExcel")
|
||||
public void exportExcel(@RequestParam Map<String,Object> map,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request){
|
||||
lawsWarnService.exportExcel(map,response,request);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "推送")
|
||||
@GetMapping(value = "/warnPullMessage")
|
||||
// @RequiresPermissions("document:pullMessage")
|
||||
public Result<?> pullMessage(String departIds,String userIds,String documentIds) {
|
||||
lawsWarnService.warnPullMessage(departIds,userIds,documentIds);
|
||||
return Result.OK("推送成功");
|
||||
}
|
||||
}
|
||||
+359
@@ -0,0 +1,359 @@
|
||||
package com.jero.modules.warn.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.ModuleEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysAnnouncementService;
|
||||
import com.jero.modules.system.service.ISysDepartService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.ss.usermodel.CellStyle;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.yaml.snakeyaml.util.UriEncoder;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/6/20 11:55
|
||||
* @auth zhn
|
||||
*/
|
||||
@Service
|
||||
public class LawsWarnService {
|
||||
@Autowired
|
||||
private BussDocumentLibraryEOServiceImpl bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private BussDocumentLibraryEOMapper bussDocumentLibraryEOMapper;
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
@Autowired
|
||||
private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
@Autowired
|
||||
private ISysDepartService sysDepartService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
@Autowired
|
||||
private ISysAnnouncementService sysAnnouncementService;
|
||||
@Resource
|
||||
private IFeishuService iFeishuService;
|
||||
|
||||
public IPage getInfoPage(Map<String, Object> parameter) {
|
||||
String cut = (String) parameter.get("cut");//中英文切换标识
|
||||
List<OnlCgformField> onlCgformFieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
|
||||
//查询的字段
|
||||
String fieldQuery = "id,serial_number,title,title_en,state,region,technology_territory,xin1_che1_xing2_shi2_shi1_ri4_qi1,implement_time";
|
||||
List<String> fieldList = Arrays.asList(fieldQuery.split(","));
|
||||
|
||||
List<String> fieldListNew = new ArrayList<>();
|
||||
for (String field : fieldList) {
|
||||
String fieldTemp = null;
|
||||
if ("xin1_che1_xing2_shi2_shi1_ri4_qi1".equals(field) || "implement_time".equals(field)) {
|
||||
String fieldNew = "date_format(" + field + ", '%Y-%m-%d')";
|
||||
fieldTemp = "case when " + fieldNew + " is null then \"\" else " + fieldNew + " end " + field;
|
||||
fieldListNew.add(fieldTemp);
|
||||
} else {
|
||||
fieldTemp = "case when " + field + " is null then \"\" else " + field + " end " + field;
|
||||
fieldListNew.add(fieldTemp);
|
||||
}
|
||||
}
|
||||
//封装查询条件
|
||||
String condition = bussDocumentLibraryEOService.getConditionStr(parameter);
|
||||
int pageNo = Integer.parseInt(parameter.get("pageNo").toString());
|
||||
int pageSize = Integer.parseInt(parameter.get("pageSize").toString());
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage infoPage = bussDocumentLibraryEOMapper.getInfoPage(page, " " + StringUtils.join(fieldListNew, ","), condition);
|
||||
|
||||
|
||||
//树形数据字典
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
//数据字典
|
||||
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
|
||||
List<OnlCgformField> onlCgformFieldListTemp = onlCgformFieldList.stream().filter(e -> fieldList.contains(e.getDbFieldName())).collect(Collectors.toList());
|
||||
List<Map> records = infoPage.getRecords();
|
||||
for (Map record : records) {
|
||||
//处理标题
|
||||
if(CutEnum.EN.getValue().equals(cut)){
|
||||
record.put("title",record.get("title_en"));
|
||||
}
|
||||
Map<String, Object> record1 = (Map) record;
|
||||
List<OnlCgformField> treeFieldList = new ArrayList<>();
|
||||
OnlCgformField onlCgformField = new OnlCgformField();
|
||||
onlCgformField.setDbFieldName("technology_territory");
|
||||
treeFieldList.add(onlCgformField);
|
||||
for (Map.Entry<String, Object> entry : record1.entrySet()) {
|
||||
//下拉选处理数据字典
|
||||
bussDocumentLibraryEOService.dictItem(sysDictItems, entry, cut, onlCgformFieldListTemp,null);
|
||||
bussDocumentLibraryEOService.treeDictItem(categoryList, entry, treeFieldList, cut,null);
|
||||
}
|
||||
}
|
||||
return infoPage;
|
||||
}
|
||||
|
||||
public void exportExcel(Map<String, Object> map, HttpServletResponse response, HttpServletRequest request) {
|
||||
String cut = (String) map.get("cut");
|
||||
String flag = String.valueOf(map.get("flag"));
|
||||
List<OnlCgformField> onlCgformFieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
|
||||
onlCgformFieldList = onlCgformFieldList.stream().filter(e -> !"id".equals(e.getDbFieldName())
|
||||
&& !"create_by".equals(e.getDbFieldName())
|
||||
&& !"create_time".equals(e.getDbFieldName())
|
||||
&& !"update_by".equals(e.getDbFieldName())
|
||||
&& !"update_time".equals(e.getDbFieldName())
|
||||
&& !"sys_org_code".equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||
//要查询的字段
|
||||
String fieldQuery = "id,serial_number,title,title_en,state,region,technology_territory,xin1_che1_xing2_shi2_shi1_ri4_qi1,implement_time";
|
||||
List<String> fieldList = Arrays.asList(fieldQuery.split(","));
|
||||
//封装查询条件(包含高级搜索)
|
||||
String condition = bussDocumentLibraryEOService.getConditionStr(map);
|
||||
List<Map<String, Object>> datas = bussDocumentLibraryEOMapper.getInfoList(" " + StringUtils.join(fieldList, ","), condition);
|
||||
//部分导出
|
||||
String partId = (String) map.get("id");
|
||||
if (StringUtils.isNotBlank(partId)) {
|
||||
//部门导出的数据
|
||||
datas = datas.stream().filter(entry -> partId.contains((String) entry.get("id"))).collect(Collectors.toList());
|
||||
}
|
||||
OutputStream os = null;
|
||||
Workbook workbook = new XSSFWorkbook();
|
||||
//创建工作表对象
|
||||
Sheet sheet = workbook.createSheet();
|
||||
String dateName = "";
|
||||
|
||||
// 创建头部
|
||||
String header = "";
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
header = "编号,标题,状态,适用地区,技术领域,";
|
||||
if("0".equals(flag)){
|
||||
dateName = "新车型实施日期";
|
||||
}else{
|
||||
dateName = "在产车实施日期";
|
||||
}
|
||||
}else{
|
||||
header = "Number,Title,Status,region,Technical Field,";
|
||||
if("0".equals(flag)){
|
||||
dateName = "New Type Execution Date";
|
||||
}else{
|
||||
dateName = "New Vehicle Execution Date";
|
||||
}
|
||||
}
|
||||
header = header +dateName;
|
||||
|
||||
bussDocumentLibraryEOService.createHeader(workbook, sheet, header);
|
||||
List<OnlCgformField> onlCgformFieldListTemp = new LinkedList<>();
|
||||
List<OnlCgformField> numberOnlCgformField = onlCgformFieldList.stream().filter(e -> "serial_number".equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||
List<OnlCgformField> titleOnlCgformField = onlCgformFieldList.stream().filter(e -> "title".equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||
List<OnlCgformField> titleEnOnlCgformField = onlCgformFieldList.stream().filter(e -> "title_en".equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||
List<OnlCgformField> stateOnlCgformField = onlCgformFieldList.stream().filter(e -> "state".equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||
List<OnlCgformField> regionOnlCgformField = onlCgformFieldList.stream().filter(e -> "region".equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||
List<OnlCgformField> technologyOnlCgformField = onlCgformFieldList.stream().filter(e -> "technology_territory".equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||
List<OnlCgformField> newCarOnlCgformField = onlCgformFieldList.stream().filter(e -> "xin1_che1_xing2_shi2_shi1_ri4_qi1".equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||
List<OnlCgformField> implementOnlCgformField = onlCgformFieldList.stream().filter(e -> "implement_time".equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||
onlCgformFieldListTemp.addAll(numberOnlCgformField);
|
||||
onlCgformFieldListTemp.addAll(titleOnlCgformField);
|
||||
onlCgformFieldListTemp.addAll(titleEnOnlCgformField);
|
||||
onlCgformFieldListTemp.addAll(stateOnlCgformField);
|
||||
onlCgformFieldListTemp.addAll(regionOnlCgformField);
|
||||
onlCgformFieldListTemp.addAll(technologyOnlCgformField);
|
||||
onlCgformFieldListTemp.addAll(newCarOnlCgformField);
|
||||
onlCgformFieldListTemp.addAll(implementOnlCgformField);
|
||||
// 创建数据
|
||||
createDatas(workbook, sheet, datas,onlCgformFieldListTemp, cut,flag);
|
||||
try {
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
} catch (IOException e) {
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("导出失败");
|
||||
}else{
|
||||
throw new JeroBootException("Export failure");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void createDatas(Workbook workbook, Sheet sheet, List<Map<String, Object>> datas,List<OnlCgformField> onlCgformFieldListTemp, String cut,String flag){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
//数据字典
|
||||
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
|
||||
//树形数据字典
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
|
||||
//过滤出树形字段
|
||||
List<OnlCgformField> treeFieldList = onlCgformFieldListTemp.stream()
|
||||
.filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType()))
|
||||
.collect(Collectors.toList());
|
||||
//下拉单选,多选
|
||||
List<OnlCgformField> pullFieldList = onlCgformFieldListTemp.stream()
|
||||
.filter(e -> FieldTypeEnum.PULL_SINGLE.getValue().equals(e.getFieldShowType()) || FieldTypeEnum.PULL_MORE.getValue().equals(e.getFieldShowType()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
int i = 0;
|
||||
for (Map<String, Object> data : datas) {
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
data.remove("title_en");
|
||||
}else{
|
||||
data.remove("title");
|
||||
}
|
||||
if("0".equals(flag)){
|
||||
data.remove("implement_time");
|
||||
}else{
|
||||
data.remove("xin1_che1_xing2_shi2_shi1_ri4_qi1");
|
||||
}
|
||||
List<OnlCgformField> onlCgformFieldList = new LinkedList<>();
|
||||
for (Map.Entry<String, Object> entry : data.entrySet()) {
|
||||
List<OnlCgformField> collect = onlCgformFieldListTemp.stream().filter(e -> e.getDbFieldName().equals(entry.getKey())).collect(Collectors.toList());
|
||||
onlCgformFieldList.addAll(collect);
|
||||
//下拉选处理数据字典
|
||||
bussDocumentLibraryEOService.dictItem(sysDictItems, entry, cut, pullFieldList,null);
|
||||
//处理树形数据字典
|
||||
bussDocumentLibraryEOService.treeDictItem(categoryList, entry, treeFieldList, cut,null);
|
||||
}
|
||||
|
||||
Row row = sheet.createRow(i + 1);
|
||||
i++;
|
||||
int sheetNum = 0;
|
||||
|
||||
for (OnlCgformField onlCgformField : onlCgformFieldList) {
|
||||
String value = "";
|
||||
//时间类型
|
||||
if (FieldTypeEnum.DATE_SINGLE.getValue().equals(onlCgformField.getFieldShowType())) {
|
||||
if (ObjectUtils.isNotEmpty(data.get(onlCgformField.getDbFieldName()))) {
|
||||
value = sdf.format(data.get(onlCgformField.getDbFieldName()));
|
||||
}
|
||||
} else {
|
||||
value = StringUtils.valueOf(data.get(onlCgformField.getDbFieldName()));
|
||||
}
|
||||
if("null".equals(value)){
|
||||
value = "";
|
||||
}
|
||||
row.createCell(sheetNum).setCellValue(value);
|
||||
sheetNum++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String warnPullMessage(String departIds, String userIds, String documentIds) {
|
||||
Set<String> allDepartIds = new HashSet<>();
|
||||
//查询当前部门下所有部门
|
||||
if (StringUtils.isNotEmpty(departIds)) {
|
||||
String[] departIdArr = departIds.split(",");
|
||||
for (String departId : departIdArr) {
|
||||
List<String> subDepIdsByDepId = sysDepartService.getSubDepIdsByDepId(departId);
|
||||
allDepartIds.addAll(subDepIdsByDepId);
|
||||
}
|
||||
}
|
||||
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(departIds)) {
|
||||
//查询部门下的人员
|
||||
List<SysUser> userList = new ArrayList<>();
|
||||
if(allDepartIds.size() != 0){
|
||||
userList = sysUserService.getUserListByDepIds(new ArrayList<>(allDepartIds));
|
||||
}
|
||||
|
||||
if (userList.size() != 0) {
|
||||
userIdList = userList.stream().map(SysUser::getId).distinct().collect(Collectors.toList());
|
||||
thirdIdList = userList.stream().map(SysUser::getThirdId).distinct().collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
if(userIdList.size() == 0 && StringUtils.isNotBlank(userIds)){
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(Arrays.asList(userIds.split(",")));
|
||||
if(sysUsers.size() != 0){
|
||||
List<String> userId = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
List<String> thirdId = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
userIdList.addAll(userId);
|
||||
thirdIdList.addAll(thirdId);
|
||||
}
|
||||
}
|
||||
|
||||
//查询文档
|
||||
List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(documentIds);
|
||||
List<String> serialNumberList = new ArrayList<>();
|
||||
List<String> urlList = new ArrayList<>();
|
||||
List<String> hrefList = new ArrayList<>();
|
||||
for (Map<String, Object> map : mapList) {
|
||||
serialNumberList.add(StringUtils.valueOf(map.get("serial_number")));
|
||||
String url = backUrl + "/docManage/library/detail?id=" + map.get("id") +
|
||||
"&title=" + map.get("title") +
|
||||
"&serial_number=" + map.get("serial_number");
|
||||
|
||||
String href = "<a href='/docManage/library/detail?id=" + map.get("id") +
|
||||
"&title=" + map.get("title") +
|
||||
"&serial_number=" + map.get("serial_number") + "'" + " target='_blank'>" + map.get("serial_number") + "</a>";
|
||||
urlList.add(url);
|
||||
hrefList.add(href);
|
||||
}
|
||||
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String content = sysUser.getUsername() + " pushed " + StringUtils.join(serialNumberList, ",") + " to you. Please be reminded to check it out.";
|
||||
String contentInfo = sysUser.getUsername() + " pushed " + StringUtils.join(hrefList, ",") + " to you. Please be reminded to check it out.";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, content, contentInfo);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||
//飞书
|
||||
try {
|
||||
for (String s : urlList) {
|
||||
String encode = UriEncoder.encode(s);
|
||||
List<String> list = new ArrayList<>();
|
||||
mapList.stream().forEach(e->{
|
||||
if(s.contains((String)e.get("id"))){
|
||||
String serialNumber = StringUtils.valueOf(e.get("serial_number"));
|
||||
list.add(serialNumber);
|
||||
}
|
||||
});
|
||||
String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you. Please be reminded to check it out.";
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
bussDocumentLibraryEOService.sendWebsocket(documentIds, contentInfo);
|
||||
return "推送成功";
|
||||
}
|
||||
}
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
package com.jero.modules.warn.service;
|
||||
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.ISysAnnouncementService;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/6/28 18:38
|
||||
* @auth zhn
|
||||
*/
|
||||
@Service
|
||||
public class TimedTaskWarn implements Job {
|
||||
|
||||
@Autowired
|
||||
private BussDocumentLibraryEOServiceImpl bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private IOnlCgformSubscribeService iOnlCgformSubscribeService;
|
||||
@Autowired
|
||||
private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||
@Autowired
|
||||
private ISysAnnouncementService sysAnnouncementService;
|
||||
@Resource
|
||||
private IFeishuService iFeishuService;
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
//获取所有的法规
|
||||
List<BussDocumentLibraryEO> bussDocumentLibraryEOList = bussDocumentLibraryEOService.list();
|
||||
//订阅信息
|
||||
List<OnlCgformSubscribe> subscribeList = iOnlCgformSubscribeService.list();
|
||||
List<String> documentIdList = subscribeList.stream().map(OnlCgformSubscribe::getDocumentId).distinct().collect(Collectors.toList());
|
||||
//已经订阅的法规
|
||||
List<BussDocumentLibraryEO> bussDocumentLibraryEOS = bussDocumentLibraryEOList.stream()
|
||||
.filter(e -> documentIdList.contains(e.getId())).collect(Collectors.toList());
|
||||
if(bussDocumentLibraryEOS.size() == 0){
|
||||
return;
|
||||
}
|
||||
//普通数据字典
|
||||
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String currentTime = sdf.format(new Date());
|
||||
for (BussDocumentLibraryEO bussDocumentLibraryEO : bussDocumentLibraryEOS) {
|
||||
Date xin1Che1Xing2Shi2Shi1Ri4Qi1 = bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1();
|
||||
Date implementTime = bussDocumentLibraryEO.getImplementTime();
|
||||
String category = bussDocumentLibraryEO.getLei4Bie2();
|
||||
String serialNumber = bussDocumentLibraryEO.getSerialNumber();
|
||||
String id = bussDocumentLibraryEO.getId();
|
||||
String title = bussDocumentLibraryEO.getTitleEn();
|
||||
//类别
|
||||
if(StringUtils.isNotBlank(category)){
|
||||
String finalCategory = category;
|
||||
List<SysDictItem> stateDictItemList = dictItemList.stream()
|
||||
.filter(e -> "type".equals(e.getDictCode()) && finalCategory.equals(e.getItemValue()))
|
||||
.collect(Collectors.toList());
|
||||
if(stateDictItemList.size() != 0){
|
||||
category = stateDictItemList.get(0).getEnName();
|
||||
}
|
||||
}else{
|
||||
category = "";
|
||||
}
|
||||
String href = "<a href='/docManage/library/detail?id=" + id +
|
||||
"&title=" + title +
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
|
||||
//跳转文档详情
|
||||
String url = backUrl + "/docManage/library/detail?id=" + id;
|
||||
//订阅的用户
|
||||
List<OnlCgformSubscribe> onlCgformSubscribe = subscribeList.stream().filter(e -> e.getDocumentId().equals(bussDocumentLibraryEO.getId())).collect(Collectors.toList());
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(onlCgformSubscribe.size() != 0){
|
||||
List<String> userNameList = onlCgformSubscribe.stream().map(OnlCgformSubscribe::getCreateBy).collect(Collectors.toList());
|
||||
List<SysUser> userList = sysUserMapper.getUserListByNames(StringUtils.join(userNameList, ","));
|
||||
userIdList = userList.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
thirdIdList = userList.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//新车型实施日期
|
||||
//您所订阅的标准GB 7258 新车型实施日期为2022-01-01,请注意查看
|
||||
//The implementation date of the standard GB 7258 new model you subscribed to is 2022-01-01,
|
||||
// please pay attention to check
|
||||
if(ObjectUtils.isNotEmpty(xin1Che1Xing2Shi2Shi1Ri4Qi1)){
|
||||
//当前时间的前6个月
|
||||
String beforeTimeSix = beforeTime(6,xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
//当前时间的前12个月
|
||||
String beforeTimeSixTen = beforeTime(12,xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
|
||||
if(currentTime.equals(beforeTimeSix) || currentTime.equals(beforeTimeSixTen)){
|
||||
//发送站内消息和飞书消息
|
||||
String format = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
String content = "The implementation date of the " + category +" "+ serialNumber
|
||||
+ " new model you subscribed to is "+format+",please pay attention to check";
|
||||
String contentInfo = "The implementation date of the " + category +" "+ href
|
||||
+ " new model you subscribed to is "+format+",please pay attention to check";
|
||||
sendMessage(content,contentInfo,content, url, userIdList, thirdIdList);
|
||||
}
|
||||
}
|
||||
|
||||
//在产车实施日期
|
||||
//The implementation date of the standard GB 7258 in production vehicle you subscribed to is 2022-01-01,
|
||||
// please pay attention to check
|
||||
if(ObjectUtils.isNotEmpty(implementTime)){
|
||||
//当前时间的前6个月
|
||||
String beforeTimeSix = beforeTime(6,implementTime);
|
||||
//当前时间的前12个月
|
||||
String beforeTimeSixTen = beforeTime(12,implementTime);
|
||||
if(currentTime.equals(beforeTimeSix) || currentTime.equals(beforeTimeSixTen)){
|
||||
//发送站内消息和飞书消息
|
||||
String format = sdf.format(implementTime);
|
||||
String content = "The implementation date of the " + category +" "+ serialNumber
|
||||
+ " production vehicle you subscribed to is "+format+",please pay attention to check";
|
||||
String contentInfo = "The implementation date of the " + category +" "+ href
|
||||
+ " production vehicle you subscribed to is "+format+",please pay attention to check";
|
||||
sendMessage(content,contentInfo,content, url, userIdList, thirdIdList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendMessage(String content,String contentInfo,String contentFeiShu, String url, List<String> userIdList, List<String> thirdIdList) {
|
||||
//站内消息
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, content, contentInfo);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(userIdList, ","), content);
|
||||
|
||||
//飞书消息
|
||||
try {
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentFeiShu, MessageTypeEnum.WARN.getName(), url);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private String beforeTime (int month,Date date){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar calendarBefore = Calendar.getInstance();
|
||||
calendarBefore.setTime(date);
|
||||
calendarBefore.add(Calendar.MONTH, -month);
|
||||
Date dateBefore = calendarBefore.getTime();
|
||||
String beforeTime = sdf.format(dateBefore);
|
||||
return beforeTime;
|
||||
}
|
||||
}
|
||||
+3
@@ -68,6 +68,9 @@ public class workFlowController {
|
||||
jsonObject.put("id", FlowTypeEnum.YZFHXSCLC.getProcessDefinitionKey());
|
||||
initConditionAssessmentEO(jsonObject);
|
||||
return this.activiti_define_start(jsonObject);
|
||||
}else if(StringUtils.equals(type,FlowTypeEnum.FGYJSJLC.getValue())){
|
||||
jsonObject.put("id", FlowTypeEnum.FGYJSJLC.getProcessDefinitionKey());
|
||||
return this.activiti_define_start(jsonObject);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
|
||||
+1
@@ -9,6 +9,7 @@ public enum FlowTypeEnum {
|
||||
SJFHXSHLC("2","设计符合性审查流程","SJFHXSHLC","设计符合性审查流程","sjfhxlc"),
|
||||
PREHOMOQRLC("3","prehomo确认流程","PREHOMOQRLC","prehomo确认流程","prehomoqrlc"),
|
||||
YZFHXSCLC("4","验证符合性审查流程","YZFHXSCLC","验证符合性审查流程","yzfhxsclc"),
|
||||
FGYJSJLC("5","法规意见收集流程","FGYJSJLC","法规意见收集流程","fgyjsjlc"),
|
||||
;
|
||||
|
||||
private String value;
|
||||
|
||||
+2
@@ -135,4 +135,6 @@ public interface WorkFlowFeignClient {
|
||||
@RequestMapping(value = "/bat-wkflow/task/queryProcessHistoryByPrcId",method = RequestMethod.GET)
|
||||
List<Map<String, Object>> queryProcessHistoryByPrcId(@RequestParam("prcId") String prcId, @RequestParam("cut") String cut,@RequestParam("prcType") String prcType,@RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu);
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/task/completeTaskByPids",method = RequestMethod.GET)
|
||||
Result<String> completeTaskByPids(@RequestParam("actiProcInstIds") String actiProcInstIds);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user