415ad99b 张雷

feat(ajh): 添加经营方案审批功能

- 新增 AjhPlanScheduleInfo 实体类,用于经营方案审批
- 实现经营方案审批的 CRUD 接口和控制器
- 添加经营方案审批的流程启动功能
- 在 FlowBussinessDescManageServiceImpl 中增加经营方案审批流程的处理逻辑
- 更新 DataAssessmentInfo 实体类,添加考核对象和考核时间类型等字段
- 在 DangerInspectionRecordController 中添加巡检类型查询条件
- 更新 DangerInspectionRecordVO 实体类,添加巡检类型字段
1 个父辈 63002f31
1 package com.skua.modules.ajh.controller;
2
3 import java.util.*;
4 import java.io.IOException;
5 import java.io.UnsupportedEncodingException;
6 import java.net.URLDecoder;
7 import java.util.stream.Collectors;
8 import javax.servlet.http.HttpServletRequest;
9 import javax.servlet.http.HttpServletResponse;
10 import com.skua.core.api.vo.Result;
11 import com.skua.core.aspect.annotation.AutoLog;
12 import com.skua.core.query.QueryGenerator;
13 import com.skua.core.util.ConvertUtils;
14 import com.skua.modules.ajh.entity.AjhPlanScheduleInfo;
15 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
16 import com.baomidou.mybatisplus.core.metadata.IPage;
17 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
18 import com.skua.modules.ajh.service.IAjhPlanScheduleInfoService;
19 import com.skua.modules.emergency.entity.DangerousOperation;
20 import com.skua.modules.flow.business.service.FlowBusinessService;
21 import lombok.extern.slf4j.Slf4j;
22
23 import org.apache.commons.lang3.StringUtils;
24 import org.jeecgframework.poi.excel.ExcelImportUtil;
25 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
26 import org.jeecgframework.poi.excel.entity.ExportParams;
27 import org.jeecgframework.poi.excel.entity.ImportParams;
28 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
29
30 import org.springframework.beans.factory.annotation.Autowired;
31 import org.springframework.web.bind.annotation.*;
32 import org.springframework.web.multipart.MultipartFile;
33 import org.springframework.web.multipart.MultipartHttpServletRequest;
34 import org.springframework.web.servlet.ModelAndView;
35 import com.alibaba.fastjson.JSON;
36 import io.swagger.annotations.Api;
37 import io.swagger.annotations.ApiOperation;
38
39 /**
40 * <pre>
41 * 经营方案审批父类
42 * </pre>
43 * @author 开发者姓名
44 * @version V0.1, 开发时间
45 */
46 @Slf4j
47 @Api(tags="经营方案审批父类")
48 @RestController
49 @RequestMapping("/ajh/ajhPlanScheduleInfo")
50 public class AjhPlanScheduleInfoController {
51 @Autowired
52 private IAjhPlanScheduleInfoService ajhPlanScheduleInfoService;
53 @Autowired
54 private FlowBusinessService flowBusinessService;
55
56 /**
57 * <pre>
58 * 分页列表查询
59 * </pre>
60 * @param ajhPlanScheduleInfo
61 * @param pageNo
62 * @param pageSize
63 * @param req
64 * @return
65 * @author 开发者姓名, 开发时间
66 * @Description: TODO(这里描述这个方法的需求变更情况)
67 */
68
69 @AutoLog(value = "经营方案审批父类-分页列表查询")
70 @ApiOperation(value="经营方案审批父类-分页列表查询", notes="经营方案审批父类-分页列表查询")
71 @GetMapping(value = "/list")
72 public Result<IPage<AjhPlanScheduleInfo>> queryPageList(AjhPlanScheduleInfo ajhPlanScheduleInfo,
73 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
74 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
75 HttpServletRequest req) {
76 Result<IPage<AjhPlanScheduleInfo>> result = new Result<IPage<AjhPlanScheduleInfo>>();
77 QueryWrapper<AjhPlanScheduleInfo> queryWrapper = QueryGenerator.initQueryWrapper(ajhPlanScheduleInfo, req.getParameterMap());
78 Page<AjhPlanScheduleInfo> page = new Page<AjhPlanScheduleInfo>(pageNo, pageSize);
79 IPage<AjhPlanScheduleInfo> pageList = ajhPlanScheduleInfoService.page(page, queryWrapper);
80
81 //获取流程状态
82 List<AjhPlanScheduleInfo> records = pageList.getRecords();
83 Set<String> processInstanceIdSet = records.stream().filter(data-> StringUtils.isNotBlank(data.getProcessInstanceId()))
84 .map(AjhPlanScheduleInfo::getProcessInstanceId).collect(Collectors.toSet());
85 Map<String, Map<String, String>> processInstanceMap;
86 try {
87 processInstanceMap = flowBusinessService.getProcessState(processInstanceIdSet);
88 } catch (Exception e) {
89 processInstanceMap = new HashMap<>();
90 }
91 for (AjhPlanScheduleInfo record : records) {
92 record.getFlow().setProcessDefinitionKey(processInstanceMap.getOrDefault(record.getProcessInstanceId(), new HashMap<>()).get("processDefinitionKey"));
93 record.getFlow().setTaskDefinitionKey(processInstanceMap.getOrDefault(record.getProcessInstanceId(), new HashMap<>()).get("taskDefinitionKey"));
94 record.getFlow().setStatus(processInstanceMap.getOrDefault(record.getProcessInstanceId(), new HashMap<>()).get("state"));
95 record.getFlow().setTaskName(processInstanceMap.getOrDefault(record.getProcessInstanceId(), new HashMap<>()).get("processDefinitionName"));
96 }
97
98 result.setSuccess(true);
99 result.setResult(pageList);
100 return result;
101 }
102
103 @AutoLog(value = "经营方案数据审批-开始流程")
104 @ApiOperation(value="经营方案数据审批-开始流程", notes="经营方案数据审批-开始流程")
105 @PostMapping(value = "/start-process")
106 public Result<AjhPlanScheduleInfo> startProcess(@RequestBody AjhPlanScheduleInfo ajhPlanScheduleInfo) {
107 Result<AjhPlanScheduleInfo> result = new Result<>();
108 try {
109 AjhPlanScheduleInfo data = ajhPlanScheduleInfoService.startProcess(ajhPlanScheduleInfo);
110 result.setResult(data);
111 result.success("添加成功!");
112 } catch (Exception e) {
113 log.error(e.getMessage(), e);
114 result.error500("操作失败");
115 }
116 return result;
117 }
118
119 @AutoLog(value = "经营方案审批父类-获取详情信息")
120 @ApiOperation(value="经营方案审批父类-获取详情信息", notes="经营方案审批父类-获取详情信息")
121 @GetMapping(value = "/get")
122 public Result<AjhPlanScheduleInfo> getInfo(AjhPlanScheduleInfo ajhPlanScheduleInfo) {
123 Result<AjhPlanScheduleInfo> result = new Result<AjhPlanScheduleInfo>();
124 QueryWrapper<AjhPlanScheduleInfo> queryWrapper = new QueryWrapper<>();
125 queryWrapper.eq("depart_id", ajhPlanScheduleInfo.getDepartId());
126 queryWrapper.eq("date_time", ajhPlanScheduleInfo.getDateTime());
127 List<AjhPlanScheduleInfo> list = ajhPlanScheduleInfoService.list(queryWrapper);
128 if(list.size() > 0){
129 Set<String> processInstanceIdSet = list.stream().filter(data-> StringUtils.isNotBlank(data.getProcessInstanceId()))
130 .map(AjhPlanScheduleInfo::getProcessInstanceId).collect(Collectors.toSet());
131 Map<String, Map<String, String>> processInstanceMap;
132 try {
133 processInstanceMap = flowBusinessService.getProcessState(processInstanceIdSet);
134 } catch (Exception e) {
135 processInstanceMap = new HashMap<>();
136 }
137 ajhPlanScheduleInfo = list.get(0);
138 ajhPlanScheduleInfo.getFlow().setProcessDefinitionKey(processInstanceMap.getOrDefault(ajhPlanScheduleInfo.getProcessInstanceId(), new HashMap<>()).get("processDefinitionKey"));
139 ajhPlanScheduleInfo.getFlow().setTaskDefinitionKey(processInstanceMap.getOrDefault(ajhPlanScheduleInfo.getProcessInstanceId(), new HashMap<>()).get("taskDefinitionKey"));
140 ajhPlanScheduleInfo.getFlow().setStatus(processInstanceMap.getOrDefault(ajhPlanScheduleInfo.getProcessInstanceId(), new HashMap<>()).get("state"));
141 ajhPlanScheduleInfo.getFlow().setTaskName(processInstanceMap.getOrDefault(ajhPlanScheduleInfo.getProcessInstanceId(), new HashMap<>()).get("processDefinitionName"));
142 }else{
143 ajhPlanScheduleInfo = new AjhPlanScheduleInfo();
144 }
145 result.setResult(ajhPlanScheduleInfo);
146 result.setSuccess(true);
147 return result;
148 }
149
150 /**
151 * <pre>
152 * 添加
153 * </pre>
154 * @param ajhPlanScheduleInfo
155 * @return
156 * @author 开发者姓名, 开发时间
157 * @Description: TODO(这里描述这个方法的需求变更情况)
158 */
159 @AutoLog(value = "经营方案审批父类-添加")
160 @ApiOperation(value="经营方案审批父类-添加", notes="经营方案审批父类-添加")
161 @PostMapping(value = "/add")
162 public Result<AjhPlanScheduleInfo> add(@RequestBody AjhPlanScheduleInfo ajhPlanScheduleInfo) {
163 Result<AjhPlanScheduleInfo> result = new Result<AjhPlanScheduleInfo>();
164 try {
165 ajhPlanScheduleInfoService.save(ajhPlanScheduleInfo);
166 result.success("添加成功!");
167 } catch (Exception e) {
168 log.error(e.getMessage(),e);
169 result.error500("操作失败");
170 }
171 return result;
172 }
173 /**
174 * <pre>
175 * 编辑
176 * </pre>
177 * @param ajhPlanScheduleInfo
178 * @return
179 * @author 开发者姓名, 开发时间
180 * @Description: TODO(这里描述这个方法的需求变更情况)
181 */
182 @AutoLog(value = "经营方案审批父类-编辑")
183 @ApiOperation(value="经营方案审批父类-编辑", notes="经营方案审批父类-编辑")
184 @PutMapping(value = "/edit")
185 public Result<AjhPlanScheduleInfo> edit(@RequestBody AjhPlanScheduleInfo ajhPlanScheduleInfo) {
186 Result<AjhPlanScheduleInfo> result = new Result<AjhPlanScheduleInfo>();
187 AjhPlanScheduleInfo ajhPlanScheduleInfoEntity = ajhPlanScheduleInfoService.getById(ajhPlanScheduleInfo.getId());
188 if(ajhPlanScheduleInfoEntity==null) {
189 result.error500("未找到对应实体");
190 }else {
191 boolean ok = ajhPlanScheduleInfoService.updateById(ajhPlanScheduleInfo);
192 //TODO 返回false说明什么?
193 if(ok) {
194 result.success("修改成功!");
195 }
196 }
197
198 return result;
199 }
200 /**
201 * <pre>
202 * 通过id删除
203 * </pre>
204 * @param id
205 * @return
206 * @author 开发者姓名, 开发时间
207 * @Description: TODO(这里描述这个方法的需求变更情况)
208 */
209 @AutoLog(value = "经营方案审批父类-通过id删除")
210 @ApiOperation(value="经营方案审批父类-通过id删除", notes="经营方案审批父类-通过id删除")
211 @DeleteMapping(value = "/delete")
212 public Result<?> delete(@RequestParam(name="id",required=true) String id) {
213 try {
214 ajhPlanScheduleInfoService.removeById(id);
215 } catch (Exception e) {
216 log.error("删除失败",e.getMessage());
217 return Result.error("删除失败!");
218 }
219 return Result.ok("删除成功!");
220 }
221
222 /**
223 * <pre>
224 * 批量删除
225 * </pre>
226 * @param ids
227 * @return
228 * @author 开发者姓名, 开发时间
229 * @Description: TODO(这里描述这个方法的需求变更情况)
230 */
231 @AutoLog(value = "经营方案审批父类-批量删除")
232 @ApiOperation(value="经营方案审批父类-批量删除", notes="经营方案审批父类-批量删除")
233 @DeleteMapping(value = "/deleteBatch")
234 public Result<AjhPlanScheduleInfo> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
235 Result<AjhPlanScheduleInfo> result = new Result<AjhPlanScheduleInfo>();
236 if(ids==null || "".equals(ids.trim())) {
237 result.error500("参数不识别!");
238 }else {
239 this.ajhPlanScheduleInfoService.removeByIds(Arrays.asList(ids.split(",")));
240 result.success("删除成功!");
241 }
242 return result;
243 }
244 /**
245 * <pre>
246 * 通过id查询
247 * </pre>
248 * @param id
249 * @return
250 * @author 开发者姓名, 开发时间
251 * @Description: TODO(这里描述这个方法的需求变更情况)
252 */
253 @AutoLog(value = "经营方案审批父类-通过id查询")
254 @ApiOperation(value="经营方案审批父类-通过id查询", notes="经营方案审批父类-通过id查询")
255 @GetMapping(value = "/queryById")
256 public Result<AjhPlanScheduleInfo> queryById(@RequestParam(name="id",required=true) String id) {
257 Result<AjhPlanScheduleInfo> result = new Result<AjhPlanScheduleInfo>();
258 AjhPlanScheduleInfo ajhPlanScheduleInfo = ajhPlanScheduleInfoService.getById(id);
259 if(ajhPlanScheduleInfo==null) {
260 result.error500("未找到对应实体");
261 }else {
262 result.setResult(ajhPlanScheduleInfo);
263 result.setSuccess(true);
264 }
265 return result;
266 }
267
268 /**
269 * <pre>
270 * 导出excel
271 * </pre>
272 * @param request
273 * @param response
274 * @return
275 * @author 开发者姓名, 开发时间
276 * @Description: TODO(这里描述这个方法的需求变更情况)
277 */
278
279 @RequestMapping(value = "/exportXls")
280 public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
281 // Step.1 组装查询条件
282 QueryWrapper<AjhPlanScheduleInfo> queryWrapper = null;
283 try {
284 String paramsStr = request.getParameter("paramsStr");
285 if (ConvertUtils.isNotEmpty(paramsStr)) {
286 String deString = URLDecoder.decode(paramsStr, "UTF-8");
287 AjhPlanScheduleInfo ajhPlanScheduleInfo = JSON.parseObject(deString, AjhPlanScheduleInfo.class);
288 queryWrapper = QueryGenerator.initQueryWrapper(ajhPlanScheduleInfo, request.getParameterMap());
289 }
290 } catch (UnsupportedEncodingException e) {
291 e.printStackTrace();
292 }
293
294 //Step.2 AutoPoi 导出Excel
295 ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
296 List<AjhPlanScheduleInfo> pageList = ajhPlanScheduleInfoService.list(queryWrapper);
297 //导出文件名称
298 mv.addObject(NormalExcelConstants.FILE_NAME, "经营方案审批父类列表");
299 mv.addObject(NormalExcelConstants.CLASS, AjhPlanScheduleInfo.class);
300 mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("经营方案审批父类列表数据", "导出人:Jeecg", "导出信息"));
301 mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
302 return mv;
303 }
304
305 /**
306 * <pre>
307 * 通过excel导入数据
308 * </pre>
309 * @param request
310 * @param response
311 * @return
312 * @author 开发者姓名, 开发时间
313 * @Description: TODO(这里描述这个方法的需求变更情况)
314 */
315 @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
316 public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
317 MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
318 Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
319 for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
320 MultipartFile file = entity.getValue();// 获取上传文件对象
321 ImportParams params = new ImportParams();
322 params.setTitleRows(2);
323 params.setHeadRows(1);
324 params.setNeedSave(true);
325 try {
326 List<AjhPlanScheduleInfo> listAjhPlanScheduleInfos = ExcelImportUtil.importExcel(file.getInputStream(), AjhPlanScheduleInfo.class, params);
327 ajhPlanScheduleInfoService.saveBatch(listAjhPlanScheduleInfos);
328 return Result.ok("文件导入成功!数据行数:" + listAjhPlanScheduleInfos.size());
329 } catch (Exception e) {
330 log.error(e.getMessage(),e);
331 return Result.error("文件导入失败:"+e.getMessage());
332 } finally {
333 try {
334 file.getInputStream().close();
335 } catch (IOException e) {
336 e.printStackTrace();
337 }
338 }
339 }
340 return Result.ok("文件导入失败!");
341 }
342
343 }
1 package com.skua.modules.ajh.entity;
2
3 import java.io.Serializable;
4 import java.util.Date;
5 import com.baomidou.mybatisplus.annotation.IdType;
6 import com.baomidou.mybatisplus.annotation.TableId;
7 import com.baomidou.mybatisplus.annotation.TableName;
8 import com.baomidou.mybatisplus.annotation.TableField;
9 import com.skua.core.aspect.annotation.Dict;
10 import com.skua.modules.flow.core.entity.FlowEntity;
11 import io.swagger.annotations.ApiModel;
12 import io.swagger.annotations.ApiModelProperty;
13 import lombok.Data;
14 import lombok.EqualsAndHashCode;
15 import lombok.experimental.Accessors;
16 import com.fasterxml.jackson.annotation.JsonFormat;
17 import org.springframework.format.annotation.DateTimeFormat;
18 import org.jeecgframework.poi.excel.annotation.Excel;
19
20 /**
21 * 经营方案审批父类
22 */
23 @Data
24 @TableName("ajh_plan_schedule_info")
25 @EqualsAndHashCode(callSuper = false)
26 @Accessors(chain = true)
27 @ApiModel(value="ajh_plan_schedule_info对象", description="经营方案审批父类")
28 public class AjhPlanScheduleInfo extends FlowEntity {
29
30 /**id*/
31 @TableId(type = IdType.ID_WORKER_STR)
32 @ApiModelProperty(value = "id")
33 private String id;
34 /**所属厂站编号*/
35 @Excel(name = "所属厂站编号", width = 15)
36 @ApiModelProperty(value = "所属厂站编号")
37 @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name")
38 private String departId;
39 /**时间yyyy-MM*/
40 @Excel(name = "时间yyyy-MM", width = 15)
41 @ApiModelProperty(value = "时间yyyy-MM")
42 private String dateTime;
43 /**流程定义id*/
44 @Excel(name = "流程定义id", width = 15)
45 @ApiModelProperty(value = "流程定义id")
46 private String processDefinitionId;
47 /**流程实例id*/
48 @Excel(name = "流程实例id", width = 15)
49 @ApiModelProperty(value = "流程实例id")
50 private String processInstanceId;
51 /**创建人Id*/
52 @Excel(name = "创建人Id", width = 15)
53 @ApiModelProperty(value = "创建人Id")
54 private String createBy;
55 /**创建时间*/
56 @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
57 @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
58 @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
59 @ApiModelProperty(value = "创建时间")
60 private Date createTime;
61 /**修改人Id*/
62 @Excel(name = "修改人Id", width = 15)
63 @ApiModelProperty(value = "修改人Id")
64 private String updateBy;
65 /**修改时间*/
66 @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
67 @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
68 @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
69 @ApiModelProperty(value = "修改时间")
70 private Date updateTime;
71 }
1 package com.skua.modules.ajh.mapper;
2
3 import java.util.List;
4
5 import org.apache.ibatis.annotations.Param;
6 import com.skua.modules.ajh.entity.AjhPlanScheduleInfo;
7 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
8
9 /**
10 * 经营方案审批父类
11 */
12 public interface AjhPlanScheduleInfoMapper extends BaseMapper<AjhPlanScheduleInfo> {
13
14 }
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 <mapper namespace="com.skua.modules.ajh.mapper.AjhPlanScheduleInfoMapper">
4
5 </mapper>
...\ No newline at end of file ...\ No newline at end of file
1 package com.skua.modules.ajh.service;
2
3 import com.skua.modules.ajh.entity.AjhPlanScheduleInfo;
4 import com.baomidou.mybatisplus.extension.service.IService;
5
6 /**
7 * 经营方案审批父类
8 */
9 public interface IAjhPlanScheduleInfoService extends IService<AjhPlanScheduleInfo> {
10
11 AjhPlanScheduleInfo startProcess(AjhPlanScheduleInfo ajhPlanScheduleInfo);
12 }
1 package com.skua.modules.ajh.service.impl;
2
3 import com.skua.core.exception.JeecgBootException;
4 import com.skua.modules.ajh.entity.AjhPlanScheduleInfo;
5 import com.skua.modules.ajh.mapper.AjhPlanScheduleInfoMapper;
6 import com.skua.modules.ajh.service.IAjhPlanScheduleInfoService;
7 import com.skua.modules.flow.business.service.IFlowService;
8 import com.skua.modules.flow.core.constant.ProcessConstant;
9 import com.skua.modules.flow.core.entity.BladeFlow;
10 import com.skua.modules.flow.core.utils.FlowUtil;
11 import com.skua.modules.flow.support.Kv;
12 import com.skua.modules.flow.utils.Func;
13 import org.springframework.beans.factory.annotation.Autowired;
14 import org.springframework.stereotype.Service;
15
16 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
17 import org.springframework.transaction.annotation.Transactional;
18
19 import java.text.SimpleDateFormat;
20 import java.util.Date;
21
22 /**
23 * 经营方案审批父类
24 */
25 @Service
26 public class AjhPlanScheduleInfoServiceImpl extends ServiceImpl<AjhPlanScheduleInfoMapper, AjhPlanScheduleInfo> implements IAjhPlanScheduleInfoService {
27
28 @Autowired
29 private IFlowService flowService;
30
31 @Override
32 @Transactional(rollbackFor = Exception.class)
33 public AjhPlanScheduleInfo startProcess(AjhPlanScheduleInfo ajhPlanScheduleInfo) {
34 String businessTable = "ajh_plan_schedule_info";
35 this.saveOrUpdate(ajhPlanScheduleInfo);
36 // 启动流程
37 Kv variables = Kv.create().set(ProcessConstant.TASK_VARIABLE_CREATE_USER, "");
38 BladeFlow flow = flowService.startProcessInstanceById(ajhPlanScheduleInfo.getProcessDefinitionId(),
39 FlowUtil.getBusinessKey(businessTable, String.valueOf(ajhPlanScheduleInfo.getId())), variables);
40
41 if (Func.isNotEmpty(flow)){
42 log.debug("流程已启动,流程ID:" + flow.getProcessInstanceId());
43 // 返回流程id写入leave
44 ajhPlanScheduleInfo.setProcessInstanceId(flow.getProcessInstanceId());
45 updateById(ajhPlanScheduleInfo);
46 } else {
47 throw new JeecgBootException("开启流程失败");
48 }
49 return ajhPlanScheduleInfo;
50 }
51 }
...@@ -56,6 +56,22 @@ public class DataAssessmentInfo { ...@@ -56,6 +56,22 @@ public class DataAssessmentInfo {
56 @Excel(name = "考核厂站", width = 15) 56 @Excel(name = "考核厂站", width = 15)
57 @ApiModelProperty(value = "考核厂站") 57 @ApiModelProperty(value = "考核厂站")
58 private String asseDepartId; 58 private String asseDepartId;
59
60 @Excel(name = "考核对象", width = 15)
61 @ApiModelProperty(value = "考核对象")
62 private String asseObject;
63
64 @Excel(name = "考核时间类型", width = 15)
65 @ApiModelProperty(value = "考核时间类型")
66 private String asseTimeType;
67
68 @Excel(name = "初试分数", width = 15)
69 @ApiModelProperty(value = "初试分数")
70 private String initScore;
71
72 @Excel(name = "是否展示总分", width = 15)
73 @ApiModelProperty(value = "是否展示总分")
74 private String isShowScore;
59 /** 75 /**
60 * 标识 76 * 标识
61 */ 77 */
......
...@@ -176,6 +176,20 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ ...@@ -176,6 +176,20 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ
176 for (Map<String, Object> dataMap : dataList) { 176 for (Map<String, Object> dataMap : dataList) {
177 resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("title"))); 177 resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("title")));
178 } 178 }
179 }else if(tableName.equals("ajh_plan_schedule_info")) {
180 //经营方案审批流程
181 String ids = tableMap.get(tableName).substring(1);
182 List<String> avgIndexCodeArray = Arrays.asList(ids.split(","));
183 String inSqlPart = avgIndexCodeArray.stream().map(s -> "'"+s.trim()+"'").collect(Collectors.joining(","));
184 String sql = "select s.id,CONCAT(d.depart_name,'[',s.date_time,']','-经营方案填报审批') as title " +
185 " from ajh_plan_schedule_info s " +
186 " left join sys_depart d on s.depart_id = d.id " +
187 " WHERE " +
188 " s.id in ("+inSqlPart+")";
189 List<Map<String, Object>> dataList = masterDB.queryForList(sql);
190 for(Map<String, Object> dataMap : dataList) {
191 resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("title")));
192 }
179 } 193 }
180 } 194 }
181 } 195 }
......
...@@ -71,6 +71,9 @@ public class APPDangerInspectionRecordController { ...@@ -71,6 +71,9 @@ public class APPDangerInspectionRecordController {
71 if(StringUtils.isNotBlank(dangerInspectionRecord.getEndTime())){ 71 if(StringUtils.isNotBlank(dangerInspectionRecord.getEndTime())){
72 queryWrapper.le("report_date", dangerInspectionRecord.getEndTime() ) ; 72 queryWrapper.le("report_date", dangerInspectionRecord.getEndTime() ) ;
73 } 73 }
74 if(StringUtils.isNotBlank(dangerInspectionRecord.getInspectionType())){
75 queryWrapper.eq("inspection_type", dangerInspectionRecord.getInspectionType() ) ;
76 }
74 if(StringUtils.isNotBlank(dangerInspectionRecord.getDangerName())){ 77 if(StringUtils.isNotBlank(dangerInspectionRecord.getDangerName())){
75 queryWrapper.like("danger_name", dangerInspectionRecord.getDangerName() ) ; 78 queryWrapper.like("danger_name", dangerInspectionRecord.getDangerName() ) ;
76 } 79 }
......
...@@ -41,7 +41,6 @@ public class DangerInspectionRecordVO { ...@@ -41,7 +41,6 @@ public class DangerInspectionRecordVO {
41 @ApiModelProperty(value = "巡检记录编号") 41 @ApiModelProperty(value = "巡检记录编号")
42 private String inspectionRecord; 42 private String inspectionRecord;
43 43
44
45 @Excel(name = "风险等级名称", width = 15) 44 @Excel(name = "风险等级名称", width = 15)
46 @ApiModelProperty(value = "风险等级名称") 45 @ApiModelProperty(value = "风险等级名称")
47 private String dangerName; 46 private String dangerName;
...@@ -52,6 +51,9 @@ public class DangerInspectionRecordVO { ...@@ -52,6 +51,9 @@ public class DangerInspectionRecordVO {
52 @ApiModelProperty(value = "风险区域名称") 51 @ApiModelProperty(value = "风险区域名称")
53 private String dangerPlace; 52 private String dangerPlace;
54 53
54 @ApiModelProperty(value = "巡检类型")
55 private String inspectionType;
56
55 @ApiModelProperty(value = "巡检状态(1:开始,2:结束)") 57 @ApiModelProperty(value = "巡检状态(1:开始,2:结束)")
56 private String status; 58 private String status;
57 59
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!