d42c6390 张雷

危险作业工作流开发

1 个父辈 f464509b
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
15 FROM 15 FROM
16 ajh_waste_produce p 16 ajh_waste_produce p
17 LEFT JOIN ( SELECT * FROM ajh_waste_keep WHERE 1=1 17 LEFT JOIN ( SELECT * FROM ajh_waste_keep WHERE 1=1
18 18
19 <if test="reportMonth!=null and reportMonth!=''"> 19 <if test="reportMonth!=null and reportMonth!=''">
20 and LEFT ( keep_in_date, 7 ) = #{reportMonth} 20 and LEFT ( keep_in_date, 7 ) = #{reportMonth}
21 </if> 21 </if>
22 22
23 ) k ON p.depart_id = k.depart_id 23 ) k ON p.depart_id = k.depart_id
24 AND p.waste_code = k.waste_code 24 AND p.waste_code = k.waste_code
25 AND p.waste_name = k.waste_name 25 AND p.waste_name = k.waste_name
...@@ -30,7 +30,10 @@ ...@@ -30,7 +30,10 @@
30 and LEFT ( p.pro_out_date, 7 ) = #{reportMonth} 30 and LEFT ( p.pro_out_date, 7 ) = #{reportMonth}
31 </if> 31 </if>
32 <if test="departId!=null and departId!=''"> 32 <if test="departId!=null and departId!=''">
33 and p.depart_id = #{departId} 33 and p.depart_id in
34 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
35 '${item}'
36 </foreach>
34 </if> 37 </if>
35 GROUP BY 38 GROUP BY
36 p.depart_id, 39 p.depart_id,
......
...@@ -20,7 +20,10 @@ ...@@ -20,7 +20,10 @@
20 WHERE 20 WHERE
21 LEFT ( p.pro_out_date, 4 ) = #{reportYear} 21 LEFT ( p.pro_out_date, 4 ) = #{reportYear}
22 <if test="departId!=null and departId!=''"> 22 <if test="departId!=null and departId!=''">
23 and p.depart_id = #{departId} 23 and p.depart_id in
24 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
25 '${item}'
26 </foreach>
24 </if> 27 </if>
25 GROUP BY 28 GROUP BY
26 p.depart_id, 29 p.depart_id,
......
1 package com.skua.modules.ajh.service.impl; 1 package com.skua.modules.ajh.service.impl;
2 2
3 import com.skua.core.context.BaseContextHandler;
3 import com.skua.modules.ajh.entity.AjhWasteMonthReport; 4 import com.skua.modules.ajh.entity.AjhWasteMonthReport;
4 import com.skua.modules.ajh.mapper.AjhWasteMonthReportMapper; 5 import com.skua.modules.ajh.mapper.AjhWasteMonthReportMapper;
5 import com.skua.modules.ajh.service.IAjhWasteMonthReportService; 6 import com.skua.modules.ajh.service.IAjhWasteMonthReportService;
7 import com.skua.modules.system.service.ISysDepartService;
8 import org.apache.commons.lang3.StringUtils;
6 import org.springframework.beans.factory.annotation.Autowired; 9 import org.springframework.beans.factory.annotation.Autowired;
7 import org.springframework.stereotype.Service; 10 import org.springframework.stereotype.Service;
8 11
9 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 12 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
10 13
14 import javax.annotation.Resource;
15 import java.text.SimpleDateFormat;
11 import java.util.ArrayList; 16 import java.util.ArrayList;
17 import java.util.Date;
12 import java.util.List; 18 import java.util.List;
13 19
14 /** 20 /**
...@@ -19,16 +25,22 @@ public class AjhWasteMonthReportServiceImpl extends ServiceImpl<AjhWasteMonthRep ...@@ -19,16 +25,22 @@ public class AjhWasteMonthReportServiceImpl extends ServiceImpl<AjhWasteMonthRep
19 25
20 @Autowired 26 @Autowired
21 private AjhWasteMonthReportMapper ajhWasteMonthReportMapper; 27 private AjhWasteMonthReportMapper ajhWasteMonthReportMapper;
28 @Resource
29 private ISysDepartService departService;
22 30
23 @Override 31 @Override
24 public List<AjhWasteMonthReport> getList(AjhWasteMonthReport ajhWasteMonthReport) { 32 public List<AjhWasteMonthReport> getList(AjhWasteMonthReport ajhWasteMonthReport) {
25 List<AjhWasteMonthReport> list = new ArrayList<>(); 33 List<AjhWasteMonthReport> list = new ArrayList<>();
26 String departId = null; 34 String departId = null;
27 String reportMonth = null; 35 if (StringUtils.isBlank(ajhWasteMonthReport.getDepartId())&&StringUtils.isNotBlank(BaseContextHandler.getDeparts())) {
28 departId = ajhWasteMonthReport.getDepartId(); 36 departId = departService.getChildDepartId(BaseContextHandler.getDeparts());
29 reportMonth = ajhWasteMonthReport.getReportMonth(); 37 }else{
30 // if(reportMonth==null){ 38 departId = departService.getChildDepartId(ajhWasteMonthReport.getDepartId());
31 // reportMonth = "2022-03"; 39 }
40 String reportMonth = ajhWasteMonthReport.getReportMonth();
41 // if(reportMonth == null){
42 // SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM");
43 // reportMonth = dateFormat.format(new Date());
32 // } 44 // }
33 list = ajhWasteMonthReportMapper.getList(departId,reportMonth); 45 list = ajhWasteMonthReportMapper.getList(departId,reportMonth);
34 return list; 46 return list;
......
1 package com.skua.modules.ajh.service.impl; 1 package com.skua.modules.ajh.service.impl;
2 2
3 import com.skua.core.context.BaseContextHandler;
3 import com.skua.modules.ajh.entity.AjhWasteYearReport; 4 import com.skua.modules.ajh.entity.AjhWasteYearReport;
4 import com.skua.modules.ajh.mapper.AjhWasteYearReportMapper; 5 import com.skua.modules.ajh.mapper.AjhWasteYearReportMapper;
5 import com.skua.modules.ajh.service.IAjhWasteYearReportService; 6 import com.skua.modules.ajh.service.IAjhWasteYearReportService;
7 import com.skua.modules.system.service.ISysDepartService;
8 import org.apache.commons.lang3.StringUtils;
6 import org.springframework.beans.factory.annotation.Autowired; 9 import org.springframework.beans.factory.annotation.Autowired;
7 import org.springframework.stereotype.Service; 10 import org.springframework.stereotype.Service;
8 11
9 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 12 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
10 13
14 import javax.annotation.Resource;
15 import java.time.Year;
11 import java.util.ArrayList; 16 import java.util.ArrayList;
12 import java.util.List; 17 import java.util.List;
13 18
...@@ -19,16 +24,21 @@ public class AjhWasteYearReportServiceImpl extends ServiceImpl<AjhWasteYearRepor ...@@ -19,16 +24,21 @@ public class AjhWasteYearReportServiceImpl extends ServiceImpl<AjhWasteYearRepor
19 24
20 @Autowired 25 @Autowired
21 private AjhWasteYearReportMapper ajhWasteYearReportMapper; 26 private AjhWasteYearReportMapper ajhWasteYearReportMapper;
27 @Resource
28 private ISysDepartService departService;
22 29
23 @Override 30 @Override
24 public List<AjhWasteYearReport> queryList(AjhWasteYearReport ajhWasteYearReport) { 31 public List<AjhWasteYearReport> queryList(AjhWasteYearReport ajhWasteYearReport) {
25 List<AjhWasteYearReport> list = new ArrayList<>(); 32 List<AjhWasteYearReport> list = new ArrayList<>();
26 String departId = null; 33 String departId = null;
27 String reportYear = null; 34 if (StringUtils.isBlank(ajhWasteYearReport.getDepartId())&&StringUtils.isNotBlank(BaseContextHandler.getDeparts())) {
28 departId = ajhWasteYearReport.getDepartId(); 35 departId = departService.getChildDepartId(BaseContextHandler.getDeparts());
29 reportYear = ajhWasteYearReport.getReportYear(); 36 }else{
37 departId = departService.getChildDepartId(ajhWasteYearReport.getDepartId());
38 }
39 String reportYear = ajhWasteYearReport.getReportYear();
30 if(reportYear==null){ 40 if(reportYear==null){
31 reportYear = "2022"; 41 reportYear = String.valueOf(Year.now().getValue());
32 } 42 }
33 list = ajhWasteYearReportMapper.queryList(departId,reportYear); 43 list = ajhWasteYearReportMapper.queryList(departId,reportYear);
34 return list; 44 return list;
......
...@@ -7,18 +7,17 @@ import com.skua.core.api.vo.Result; ...@@ -7,18 +7,17 @@ import com.skua.core.api.vo.Result;
7 import com.skua.core.aspect.annotation.AutoLog; 7 import com.skua.core.aspect.annotation.AutoLog;
8 import com.skua.core.query.QueryGenerator; 8 import com.skua.core.query.QueryGenerator;
9 import com.skua.core.util.ConvertUtils; 9 import com.skua.core.util.ConvertUtils;
10 import com.skua.modules.emergency.dto.EmergencyRiskEventAddDTO;
11 import com.skua.modules.emergency.dto.EmergencyRiskEventHandleDto;
12 import com.skua.modules.emergency.entity.DangerousOperation; 10 import com.skua.modules.emergency.entity.DangerousOperation;
13 import com.skua.modules.emergency.service.IDangerousOperationService; 11 import com.skua.modules.emergency.service.IDangerousOperationService;
14 import com.skua.modules.flow.business.service.FlowBusinessService; 12 import com.skua.modules.flow.business.service.FlowBusinessService;
13 import com.skua.modules.flow.core.entity.FlowAssemblyEntity;
14 import com.skua.tool.util.BeanExtUtils;
15 import io.swagger.annotations.Api; 15 import io.swagger.annotations.Api;
16 import io.swagger.annotations.ApiOperation; 16 import io.swagger.annotations.ApiOperation;
17 import lombok.extern.slf4j.Slf4j; 17 import lombok.extern.slf4j.Slf4j;
18 import org.apache.commons.lang3.StringUtils; 18 import org.apache.commons.lang3.StringUtils;
19 import org.springframework.beans.factory.annotation.Autowired; 19 import org.springframework.beans.factory.annotation.Autowired;
20 import org.springframework.web.bind.annotation.*; 20 import org.springframework.web.bind.annotation.*;
21
22 import javax.servlet.http.HttpServletRequest; 21 import javax.servlet.http.HttpServletRequest;
23 import javax.validation.Valid; 22 import javax.validation.Valid;
24 import java.util.*; 23 import java.util.*;
...@@ -120,8 +119,8 @@ public class DangerousOperationController { ...@@ -120,8 +119,8 @@ public class DangerousOperationController {
120 return result; 119 return result;
121 } 120 }
122 121
123 @AutoLog(value = "应急风险事件-分页列表查询") 122 @AutoLog(value = "危险作业事件-分页列表查询")
124 @ApiOperation(value="应急风险事件-分页列表查询", notes="应急风险事件-分页列表查询") 123 @ApiOperation(value="危险作业事件-分页列表查询", notes="危险作业事件-分页列表查询")
125 @GetMapping(value = "/list") 124 @GetMapping(value = "/list")
126 public Result<IPage<DangerousOperation>> queryPageList(DangerousOperation dangerousOperation, 125 public Result<IPage<DangerousOperation>> queryPageList(DangerousOperation dangerousOperation,
127 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, 126 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
...@@ -166,16 +165,18 @@ public class DangerousOperationController { ...@@ -166,16 +165,18 @@ public class DangerousOperationController {
166 * @author 开发者姓名, 开发时间 165 * @author 开发者姓名, 开发时间
167 * @Description: TODO(这里描述这个方法的需求变更情况) 166 * @Description: TODO(这里描述这个方法的需求变更情况)
168 */ 167 */
169 @AutoLog(value = "应急风险事件-开始流程") 168 @AutoLog(value = "危险作业事件-开始流程")
170 @ApiOperation(value="应急风险事件-开始流程", notes="应急风险事件-开始流程") 169 @ApiOperation(value="危险作业事件-开始流程", notes="危险作业事件-开始流程")
171 @PostMapping(value = "/startProcess") 170 @PostMapping(value = "/start-process")
172 public Result<DangerousOperation> startProcess(@Valid @RequestBody DangerousOperation dangerousOperation) { 171 public Result<DangerousOperation> startProcess(@RequestBody DangerousOperation dangerousOperation) {
173 Result<DangerousOperation> result = new Result<DangerousOperation>(); 172 Result<DangerousOperation> result = new Result<>();
174 try { 173 try {
175 dangerousOperationService.startProcess(dangerousOperation); 174 dangerousOperation.setDelFlag(0);
175 DangerousOperation data = dangerousOperationService.startProcess(dangerousOperation);
176 result.setResult(data);
176 result.success("添加成功!"); 177 result.success("添加成功!");
177 } catch (Exception e) { 178 } catch (Exception e) {
178 log.error(e.getMessage(),e); 179 log.error(e.getMessage(), e);
179 result.error500("操作失败"); 180 result.error500("操作失败");
180 } 181 }
181 return result; 182 return result;
...@@ -189,8 +190,8 @@ public class DangerousOperationController { ...@@ -189,8 +190,8 @@ public class DangerousOperationController {
189 * @author 开发者姓名, 开发时间 190 * @author 开发者姓名, 开发时间
190 * @Description: TODO(这里描述这个方法的需求变更情况) 191 * @Description: TODO(这里描述这个方法的需求变更情况)
191 */ 192 */
192 @AutoLog(value = "应急风险事件-处理") 193 @AutoLog(value = "危险作业事件-处理")
193 @ApiOperation(value="应急风险事件-处理", notes="应急风险事件-处理") 194 @ApiOperation(value="危险作业事件-处理", notes="危险作业事件-处理")
194 @PostMapping(value = "/handle") 195 @PostMapping(value = "/handle")
195 public Result<DangerousOperation> handle(@Valid @RequestBody DangerousOperation dangerousOperation) { 196 public Result<DangerousOperation> handle(@Valid @RequestBody DangerousOperation dangerousOperation) {
196 Result<DangerousOperation> result = new Result<DangerousOperation>(); 197 Result<DangerousOperation> result = new Result<DangerousOperation>();
...@@ -207,8 +208,8 @@ public class DangerousOperationController { ...@@ -207,8 +208,8 @@ public class DangerousOperationController {
207 * @author 开发者姓名, 开发时间 208 * @author 开发者姓名, 开发时间
208 * @Description: TODO(这里描述这个方法的需求变更情况) 209 * @Description: TODO(这里描述这个方法的需求变更情况)
209 */ 210 */
210 @AutoLog(value = "应急风险事件-通过id删除") 211 @AutoLog(value = "危险作业事件-通过id删除")
211 @ApiOperation(value="应急风险事件-通过id删除", notes="应急风险事件-通过id删除") 212 @ApiOperation(value="危险作业事件-通过id删除", notes="危险作业事件-通过id删除")
212 @DeleteMapping(value = "/delete") 213 @DeleteMapping(value = "/delete")
213 public Result<?> delete(@RequestParam(name="id",required=true) String id) { 214 public Result<?> delete(@RequestParam(name="id",required=true) String id) {
214 try { 215 try {
...@@ -220,5 +221,45 @@ public class DangerousOperationController { ...@@ -220,5 +221,45 @@ public class DangerousOperationController {
220 return Result.ok("删除成功!"); 221 return Result.ok("删除成功!");
221 } 222 }
222 223
224 @PostMapping(value = "/complete-task-choose-user-pass")
225 public Result<?> completeTaskChooseUserPass(@RequestBody DangerousOperation dangerousOperation) throws Exception {
226 Result<?> result = new Result();
227 FlowAssemblyEntity flowAssemblyEntity = BeanExtUtils.bean2Bean(dangerousOperation, FlowAssemblyEntity.class);
228 if (org.apache.commons.lang.StringUtils.isEmpty(flowAssemblyEntity.getAssemblyKey())) {
229 //AssemblyKey对应参数用户id
230 flowAssemblyEntity.setAssemblyKey("");
231 }
232 String activeResult = this.flowBusinessService.completeTaskChooseUserPass(flowAssemblyEntity);
233 if ("noChooseUser".equals(activeResult)) {
234 result.error500("未指定下一节点用户!");
235 } else if ("fail".equals(activeResult)) {
236 result.error500("程序异常,流程审批失败!");
237 } else {
238 DangerousOperation dangerOperation = BeanExtUtils.bean2Bean(dangerousOperation, DangerousOperation.class);
239 dangerousOperationService.updateById(dangerOperation);
240 result.success("成功");
241 }
242 return result;
243 }
244
245 @AutoLog(value = "危险作业事件-办结流程")
246 @ApiOperation(value = "危险作业事件-办结流程", notes = "危险作业事件-办结流程")
247 @PostMapping(value = "/complete-process")
248 public Result<DangerousOperation> completeProcess(@RequestBody DangerousOperation dangerousOperation) {
249 Result<DangerousOperation> result = new Result<>();
250 try {
251 dangerousOperation.setDelFlag(0);
252 boolean flag = dangerousOperationService.completeProcess(dangerousOperation);
253 if (flag) {
254 result.success("办结成功!");
255 } else {
256 result.error500("办结失败!");
257 }
258 } catch (Exception e) {
259 log.error(e.getMessage(), e);
260 result.error500("办结失败");
261 }
262 return result;
263 }
223 264
224 } 265 }
......
...@@ -3,8 +3,6 @@ package com.skua.modules.emergency.service; ...@@ -3,8 +3,6 @@ package com.skua.modules.emergency.service;
3 import com.baomidou.mybatisplus.extension.service.IService; 3 import com.baomidou.mybatisplus.extension.service.IService;
4 import com.skua.modules.emergency.entity.DangerousOperation; 4 import com.skua.modules.emergency.entity.DangerousOperation;
5 5
6 import java.util.Map;
7
8 /** 6 /**
9 * 应急风险事件 7 * 应急风险事件
10 */ 8 */
...@@ -14,7 +12,7 @@ public interface IDangerousOperationService extends IService<DangerousOperation> ...@@ -14,7 +12,7 @@ public interface IDangerousOperationService extends IService<DangerousOperation>
14 * 开始流程 12 * 开始流程
15 * @param dangerousOperation 13 * @param dangerousOperation
16 */ 14 */
17 void startProcess(DangerousOperation dangerousOperation); 15 DangerousOperation startProcess(DangerousOperation dangerousOperation);
18 16
19 /** 17 /**
20 * 应急风险事件-处理 18 * 应急风险事件-处理
...@@ -22,4 +20,5 @@ public interface IDangerousOperationService extends IService<DangerousOperation> ...@@ -22,4 +20,5 @@ public interface IDangerousOperationService extends IService<DangerousOperation>
22 */ 20 */
23 void handle(DangerousOperation dangerousOperation); 21 void handle(DangerousOperation dangerousOperation);
24 22
23 boolean completeProcess(DangerousOperation dangerousOperation);
25 } 24 }
......
...@@ -19,6 +19,7 @@ import com.skua.modules.flow.custombiz.handle.IFlowCustomHandle; ...@@ -19,6 +19,7 @@ import com.skua.modules.flow.custombiz.handle.IFlowCustomHandle;
19 import com.skua.modules.flow.custombiz.vo.FlowProcessFormFieldInfoVO; 19 import com.skua.modules.flow.custombiz.vo.FlowProcessFormFieldInfoVO;
20 import com.skua.modules.flow.support.Kv; 20 import com.skua.modules.flow.support.Kv;
21 import com.skua.modules.flow.utils.Func; 21 import com.skua.modules.flow.utils.Func;
22 import com.skua.modules.system.entity.ProblemReportPlan;
22 import com.skua.tool.util.UniqIdUtils; 23 import com.skua.tool.util.UniqIdUtils;
23 import org.apache.commons.lang3.StringUtils; 24 import org.apache.commons.lang3.StringUtils;
24 import org.springframework.beans.BeanUtils; 25 import org.springframework.beans.BeanUtils;
...@@ -26,6 +27,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -26,6 +27,8 @@ import org.springframework.beans.factory.annotation.Autowired;
26 import org.springframework.stereotype.Service; 27 import org.springframework.stereotype.Service;
27 import org.springframework.transaction.annotation.Transactional; 28 import org.springframework.transaction.annotation.Transactional;
28 29
30 import java.text.SimpleDateFormat;
31 import java.util.Date;
29 import java.util.List; 32 import java.util.List;
30 import java.util.Map; 33 import java.util.Map;
31 34
...@@ -41,30 +44,24 @@ public class DangerousOperationServiceImpl extends ServiceImpl<DangerousOperatio ...@@ -41,30 +44,24 @@ public class DangerousOperationServiceImpl extends ServiceImpl<DangerousOperatio
41 44
42 @Override 45 @Override
43 @Transactional(rollbackFor = Exception.class) 46 @Transactional(rollbackFor = Exception.class)
44 public void startProcess(DangerousOperation dangerousOperation) { 47 public DangerousOperation startProcess(DangerousOperation dangerousOperation) {
45 DangerousOperation saveParam = new DangerousOperation();
46 BeanUtils.copyProperties(dangerousOperation, saveParam);
47 saveParam.setId(UniqIdUtils.getInstance().getUniqID());
48 saveParam.setOperationStatus(DangerousOperationHandleResultEnums.UN_HANDLE.getItemValue());
49 this.save(saveParam);
50
51 String businessTable = "dangerous_operation_manage"; 48 String businessTable = "dangerous_operation_manage";
52 //设置当前人为上报人 49 dangerousOperation.setReportDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
53 50 this.saveOrUpdate(dangerousOperation);
54 // 启动流程 51 // 启动流程
55 Kv variables = Kv.create().set(ProcessConstant.TASK_VARIABLE_CREATE_USER, ""); 52 Kv variables = Kv.create().set(ProcessConstant.TASK_VARIABLE_CREATE_USER, "");
53 BladeFlow flow = flowService.startProcessInstanceById(dangerousOperation.getProcessDefinitionId(),
54 FlowUtil.getBusinessKey(businessTable, String.valueOf(dangerousOperation.getId())), variables);
56 55
57 BladeFlow flow = flowService.startProcessInstanceById(saveParam.getProcessDefinitionId(), FlowUtil.getBusinessKey(businessTable, String.valueOf(saveParam.getId())), variables); 56 if (Func.isNotEmpty(flow)){
58
59 if (Func.isNotEmpty(flow)) {
60 log.debug("流程已启动,流程ID:" + flow.getProcessInstanceId()); 57 log.debug("流程已启动,流程ID:" + flow.getProcessInstanceId());
61 // 返回流程id写入leave 58 // 返回流程id写入leave
62 saveParam.setProcessInstanceId(flow.getProcessInstanceId()); 59 dangerousOperation.setProcessInstanceId(flow.getProcessInstanceId());
63 updateById(saveParam); 60 updateById(dangerousOperation);
64 } else { 61 } else {
65 throw new JeecgBootException("开启流程失败"); 62 throw new JeecgBootException("开启流程失败");
66 } 63 }
67 64 return dangerousOperation;
68 } 65 }
69 66
70 @Override 67 @Override
...@@ -86,6 +83,21 @@ public class DangerousOperationServiceImpl extends ServiceImpl<DangerousOperatio ...@@ -86,6 +83,21 @@ public class DangerousOperationServiceImpl extends ServiceImpl<DangerousOperatio
86 } 83 }
87 84
88 @Override 85 @Override
86 @Transactional(rollbackFor = Exception.class)
87 public boolean completeProcess(DangerousOperation dangerousOperation) {
88 DangerousOperation dangerousOperation1 = baseMapper.selectById(dangerousOperation.getId());
89 dangerousOperation1.setOperationStatus("1");
90 dangerousOperation1.setOperationUser(BaseContextHandler.getUserId());
91 dangerousOperation1.setOperationDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
92 dangerousOperation1.setOperationResult(dangerousOperation.getOperationResult());
93 dangerousOperation1.setOperationImg(dangerousOperation.getOperationImg());
94 this.updateById(dangerousOperation1);
95 //调用同意接口
96 boolean flag = flowBusinessService.completeTask(ProcessConstant.PASS_KEY, dangerousOperation.getFlow());
97 return flag;
98 }
99
100 @Override
89 public List<FlowProcessFormFieldInfoVO> buildCustomData(String s, List<FlowProcessFormFieldInfoVO> list) { 101 public List<FlowProcessFormFieldInfoVO> buildCustomData(String s, List<FlowProcessFormFieldInfoVO> list) {
90 for (FlowProcessFormFieldInfoVO entity : list) { 102 for (FlowProcessFormFieldInfoVO entity : list) {
91 if ("operationUser".equals(entity.getFieldCode())) { 103 if ("operationUser".equals(entity.getFieldCode())) {
......
...@@ -159,6 +159,21 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ ...@@ -159,6 +159,21 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ
159 for (Map<String, Object> dataMap : dataList) { 159 for (Map<String, Object> dataMap : dataList) {
160 resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("title"))); 160 resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("title")));
161 } 161 }
162 }else if (tableName.equals("dangerous_operation_manage")) {
163 //危险作业
164 String ids = tableMap.get(tableName).substring(1);
165 List<String> avgIndexCodeArray = Arrays.asList(ids.split(","));
166 String inSqlPart = avgIndexCodeArray.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(","));
167 String sql = "SELECT a.id," +
168 " CONCAT(a.operation_name,'-危险作业审批') as title " +
169 "FROM " +
170 " dangerous_operation_manage a " +
171 "WHERE " +
172 " a.id in (" + inSqlPart + ")";
173 List<Map<String, Object>> dataList = masterDB.queryForList(sql);
174 for (Map<String, Object> dataMap : dataList) {
175 resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("title")));
176 }
162 } 177 }
163 } 178 }
164 } 179 }
......
...@@ -192,35 +192,42 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { ...@@ -192,35 +192,42 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService {
192 Map<String, Object> yclslMap = new HashMap<>(); 192 Map<String, Object> yclslMap = new HashMap<>();
193 yclslMap.put("value","0"); 193 yclslMap.put("value","0");
194 yclslMap.put("valueTb","0"); 194 yclslMap.put("valueTb","0");
195 yclslMap.put("unit","吨");
195 yclslMap.put("valueHb","0"); 196 yclslMap.put("valueHb","0");
196 map.put("rjclsl",new HashMap<>()); 197 map.put("rjclsl",new HashMap<>());
197 Map<String, Object> rjclslMap = new HashMap<>(); 198 Map<String, Object> rjclslMap = new HashMap<>();
198 rjclslMap.put("value","0"); 199 rjclslMap.put("value","0");
200 rjclslMap.put("unit","吨");
199 rjclslMap.put("valueTb","0"); 201 rjclslMap.put("valueTb","0");
200 rjclslMap.put("valueHb","0"); 202 rjclslMap.put("valueHb","0");
201 map.put("yzdl",new HashMap<>()); 203 map.put("yzdl",new HashMap<>());
202 Map<String, Object> yzdlMap = new HashMap<>(); 204 Map<String, Object> yzdlMap = new HashMap<>();
203 yzdlMap.put("value","0"); 205 yzdlMap.put("value","0");
206 yzdlMap.put("unit","Kw.h");
204 yzdlMap.put("valueTb","0"); 207 yzdlMap.put("valueTb","0");
205 yzdlMap.put("valueHb","0"); 208 yzdlMap.put("valueHb","0");
206 map.put("dsdh",new HashMap<>()); 209 map.put("dsdh",new HashMap<>());
207 Map<String, Object> dsdhMap = new HashMap<>(); 210 Map<String, Object> dsdhMap = new HashMap<>();
208 dsdhMap.put("value","0"); 211 dsdhMap.put("value","0");
212 dsdhMap.put("unit","Kw.h/吨水");
209 dsdhMap.put("valueTb","-"); 213 dsdhMap.put("valueTb","-");
210 dsdhMap.put("valueHb","0"); 214 dsdhMap.put("valueHb","0");
211 map.put("yzcnl",new HashMap<>()); 215 map.put("yzcnl",new HashMap<>());
212 Map<String, Object> yzcnlMap = new HashMap<>(); 216 Map<String, Object> yzcnlMap = new HashMap<>();
213 yzcnlMap.put("value","0"); 217 yzcnlMap.put("value","0");
218 yzcnlMap.put("unit","吨");
214 yzcnlMap.put("valueTb","-"); 219 yzcnlMap.put("valueTb","-");
215 yzcnlMap.put("valueHb","0"); 220 yzcnlMap.put("valueHb","0");
216 map.put("wdscnl",new HashMap<>()); 221 map.put("wdscnl",new HashMap<>());
217 Map<String, Object> wdscnlMap = new HashMap<>(); 222 Map<String, Object> wdscnlMap = new HashMap<>();
218 wdscnlMap.put("value","0"); 223 wdscnlMap.put("value","0");
224 wdscnlMap.put("unit","吨/万吨");
219 wdscnlMap.put("valueTb","-"); 225 wdscnlMap.put("valueTb","-");
220 wdscnlMap.put("valueHb","0"); 226 wdscnlMap.put("valueHb","0");
221 map.put("rjdl",new HashMap<>()); 227 map.put("rjdl",new HashMap<>());
222 Map<String, Object> rjdlMap = new HashMap<>(); 228 Map<String, Object> rjdlMap = new HashMap<>();
223 rjdlMap.put("value","0"); 229 rjdlMap.put("value","0");
230 rjdlMap.put("unit","Kw.h");
224 rjdlMap.put("valueTb","-"); 231 rjdlMap.put("valueTb","-");
225 rjdlMap.put("valueHb","0"); 232 rjdlMap.put("valueHb","0");
226 map.put("yclsl", yclslMap); 233 map.put("yclsl", yclslMap);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!