Commit 9b89bea3451e896d666448f233167f68558ae33f
1 parent
bcf7be75
m
Showing
5 changed files
with
40 additions
and
35 deletions
trash-activiti/src/main/java/com/trash/activiti/service/impl/myTaskServiceImpl.java
| ... | ... | @@ -26,6 +26,7 @@ import org.activiti.api.task.runtime.TaskRuntime; |
| 26 | 26 | import org.activiti.api.task.runtime.conf.TaskRuntimeConfiguration; |
| 27 | 27 | import org.activiti.engine.TaskService; |
| 28 | 28 | import org.activiti.engine.impl.TaskQueryImpl; |
| 29 | +import org.activiti.engine.query.QueryProperty; | |
| 29 | 30 | import org.activiti.engine.task.IdentityLink; |
| 30 | 31 | import org.activiti.engine.task.IdentityLinkType; |
| 31 | 32 | import org.activiti.engine.task.NativeTaskQuery; |
| ... | ... | @@ -106,8 +107,6 @@ public class myTaskServiceImpl implements myTaskService { |
| 106 | 107 | @Override |
| 107 | 108 | public Page<Task> tasks(Pageable pageable,GetTasksPayload getTasksPayload) { |
| 108 | 109 | |
| 109 | - | |
| 110 | - long time = new Date().getTime(); | |
| 111 | 110 | TaskQuery crossQuery = taskService.createTaskQuery(); |
| 112 | 111 | |
| 113 | 112 | |
| ... | ... | @@ -142,7 +141,6 @@ public class myTaskServiceImpl implements myTaskService { |
| 142 | 141 | } |
| 143 | 142 | } |
| 144 | 143 | |
| 145 | - System.out.println(new Date().getTime() - time); | |
| 146 | 144 | |
| 147 | 145 | for(org.activiti.engine.task.Task t1:list1){ |
| 148 | 146 | |
| ... | ... | @@ -154,18 +152,16 @@ public class myTaskServiceImpl implements myTaskService { |
| 154 | 152 | } |
| 155 | 153 | } |
| 156 | 154 | |
| 157 | - System.out.println(new Date().getTime() - time); | |
| 158 | 155 | |
| 159 | 156 | for(org.activiti.engine.task.Task tasks : userQuery.list()){ |
| 160 | 157 | pid.add(tasks.getProcessInstanceId()); |
| 161 | 158 | } |
| 162 | 159 | |
| 163 | - System.out.println(new Date().getTime() - time); | |
| 164 | 160 | |
| 165 | 161 | if(pid.size() > 0){ |
| 166 | - taskQuery.processInstanceIdIn(pid); | |
| 162 | + taskQuery.processInstanceIdIn(pid).orderByTaskCreateTime().desc(); | |
| 167 | 163 | }else{ |
| 168 | - taskQuery.taskAssignee(SecurityUtils.getUsername()); | |
| 164 | + taskQuery.taskAssignee(SecurityUtils.getUsername()).orderByTaskCreateTime().desc(); | |
| 169 | 165 | } |
| 170 | 166 | |
| 171 | 167 | |
| ... | ... | @@ -173,7 +169,6 @@ public class myTaskServiceImpl implements myTaskService { |
| 173 | 169 | List<Task> tasks = taskConverter.from(taskQuery.listPage(pageable.getStartIndex(), |
| 174 | 170 | pageable.getMaxItems())); |
| 175 | 171 | |
| 176 | - System.out.println(new Date().getTime() - time); | |
| 177 | 172 | |
| 178 | 173 | return new PageImpl<>(tasks,Math.toIntExact(taskQuery.count())); |
| 179 | 174 | } | ... | ... |
trash-activiti/src/main/resources/mapper/activiti/ActReDeploymentMapper.xml
| ... | ... | @@ -24,14 +24,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 24 | 24 | </select> |
| 25 | 25 | |
| 26 | 26 | <select id="selectWorkByIds" parameterType="String" resultType="java.util.Map"> |
| 27 | - select start_time as startTime,end_time as endTime, reason,type,instance_id from workflow where id in | |
| 27 | + select start_time as startTime,end_time as endTime, reason,type,instance_id,create_time as createTime from workflow where id in | |
| 28 | 28 | <foreach item="id" collection="ids" open="(" separator="," close=")"> |
| 29 | 29 | #{id} |
| 30 | 30 | </foreach> |
| 31 | 31 | </select> |
| 32 | 32 | |
| 33 | 33 | <select id="selectHistoryWorkByPIds" parameterType="String" resultType="java.util.Map"> |
| 34 | - select start_time as startTime,end_time as endTime, reason,type,instance_id from workflow_hi where instance_id in | |
| 34 | + select start_time as startTime,end_time as endTime, reason,type,instance_id,create_time as createTime from workflow_hi where instance_id in | |
| 35 | 35 | <foreach item="id" collection="ids" open="(" separator="," close=")"> |
| 36 | 36 | #{id} |
| 37 | 37 | </foreach> | ... | ... |
trash-ui/src/views/daily/situation/index.vue
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | placeholder="请输入操作人" |
| 17 | 17 | |
| 18 | 18 | size="small" |
| 19 | - | |
| 19 | + | |
| 20 | 20 | /> |
| 21 | 21 | </el-form-item> |
| 22 | 22 | <el-form-item> |
| ... | ... | @@ -121,11 +121,10 @@ |
| 121 | 121 | </el-col> |
| 122 | 122 | <el-col> |
| 123 | 123 | <el-form-item label="操作人" prop="operator"> |
| 124 | - <el-input v-model="form.operator" placeholder="请输入操作人" style="width: 200px"/> | |
| 124 | + <el-input v-model="form.operator" placeholder="请输入操作人" style="width: 200px" disabled/> | |
| 125 | 125 | </el-form-item> |
| 126 | 126 | </el-col> |
| 127 | 127 | </el-row> |
| 128 | - | |
| 129 | 128 | <el-form-item label="全市工地,消纳场开停情况" prop="consumptionSiteSituation"> |
| 130 | 129 | <editor v-model="form.consumptionSiteSituation" :min-height="192"/> |
| 131 | 130 | </el-form-item> |
| ... | ... | @@ -168,12 +167,14 @@ |
| 168 | 167 | import { listSituation, getSituation, delSituation, addSituation, updateSituation, exportSituation } from "@/api/daily/situation"; |
| 169 | 168 | import Editor from '@/components/Editor'; |
| 170 | 169 | import {getToollist} from "@/api/daily/toollist"; |
| 171 | - | |
| 170 | +import store from "@/store"; | |
| 172 | 171 | export default { |
| 173 | 172 | name: "Situation", |
| 174 | 173 | components: { Editor }, |
| 175 | 174 | data() { |
| 176 | 175 | return { |
| 176 | + | |
| 177 | + userName:store.getters.name, | |
| 177 | 178 | // 遮罩层 |
| 178 | 179 | loading: true, |
| 179 | 180 | border:true, |
| ... | ... | @@ -218,6 +219,15 @@ export default { |
| 218 | 219 | consumptionSiteSituation: [ |
| 219 | 220 | { required: true, message: "不能为空", trigger: "blur" } |
| 220 | 221 | ], |
| 222 | + }, | |
| 223 | + dayForDate:{ | |
| 224 | + 0:"日", | |
| 225 | + 1:"一", | |
| 226 | + 2:"二", | |
| 227 | + 3:"三", | |
| 228 | + 4:"四", | |
| 229 | + 5:"五", | |
| 230 | + 6:"六", | |
| 221 | 231 | } |
| 222 | 232 | }; |
| 223 | 233 | }, |
| ... | ... | @@ -227,11 +237,8 @@ export default { |
| 227 | 237 | methods: { |
| 228 | 238 | selectDate(date){ |
| 229 | 239 | |
| 230 | - let day = new Date(date).getDay(); | |
| 231 | 240 | |
| 232 | - if(day == 0){ | |
| 233 | - day = 7; | |
| 234 | - } | |
| 241 | + let day = this.dayForDate[new Date(this.form.date).getDay()]; | |
| 235 | 242 | |
| 236 | 243 | this.dayOfWeek = day; |
| 237 | 244 | |
| ... | ... | @@ -287,6 +294,9 @@ export default { |
| 287 | 294 | this.reset(); |
| 288 | 295 | this.open = true; |
| 289 | 296 | this.title = "添加每日工作清单"; |
| 297 | + | |
| 298 | + | |
| 299 | + this.form.operator = this.userName; | |
| 290 | 300 | }, |
| 291 | 301 | /** 修改按钮操作 */ |
| 292 | 302 | handleUpdate(row) { |
| ... | ... | @@ -295,11 +305,7 @@ export default { |
| 295 | 305 | getSituation(id).then(response => { |
| 296 | 306 | this.form = response.data; |
| 297 | 307 | |
| 298 | - let day = new Date(this.form.date).getDay(); | |
| 299 | - | |
| 300 | - if(day == 0){ | |
| 301 | - day = 7; | |
| 302 | - } | |
| 308 | + let day = this.dayForDate[new Date(this.form.date).getDay()]; | |
| 303 | 309 | |
| 304 | 310 | this.dayOfWeek = day; |
| 305 | 311 | |
| ... | ... | @@ -315,11 +321,7 @@ export default { |
| 315 | 321 | getSituation(id).then(response => { |
| 316 | 322 | this.form = response.data; |
| 317 | 323 | |
| 318 | - let day = new Date(this.form.date).getDay(); | |
| 319 | - | |
| 320 | - if(day == 0){ | |
| 321 | - day = 7; | |
| 322 | - } | |
| 324 | + let day = this.dayForDate[new Date(this.form.date).getDay()]; | |
| 323 | 325 | |
| 324 | 326 | this.dayOfWeek = day; |
| 325 | 327 | ... | ... |
trash-ui/src/views/daily/toollist/index.vue
| ... | ... | @@ -5,18 +5,18 @@ |
| 5 | 5 | <el-input |
| 6 | 6 | v-model="queryParams.title" |
| 7 | 7 | placeholder="请输入标题" |
| 8 | - | |
| 8 | + | |
| 9 | 9 | size="small" |
| 10 | - | |
| 10 | + | |
| 11 | 11 | /> |
| 12 | 12 | </el-form-item> |
| 13 | 13 | <el-form-item label="操作人" prop="operator"> |
| 14 | 14 | <el-input |
| 15 | 15 | v-model="queryParams.operator" |
| 16 | 16 | placeholder="请输入操作人" |
| 17 | - | |
| 17 | + | |
| 18 | 18 | size="small" |
| 19 | - | |
| 19 | + | |
| 20 | 20 | /> |
| 21 | 21 | </el-form-item> |
| 22 | 22 | <el-form-item> |
| ... | ... | @@ -93,7 +93,7 @@ |
| 93 | 93 | <el-row type="flex" justify="center"> |
| 94 | 94 | <el-col :span='12'> |
| 95 | 95 | <el-form-item label="操作人" prop="operator"> |
| 96 | - <el-input v-model="form.operator" placeholder="请输入操作人" /> | |
| 96 | + <el-input v-model="form.operator" placeholder="请输入操作人" disabled/> | |
| 97 | 97 | </el-form-item> |
| 98 | 98 | </el-col> |
| 99 | 99 | <el-col :span='12'> |
| ... | ... | @@ -169,6 +169,7 @@ |
| 169 | 169 | <script> |
| 170 | 170 | import { listToollist, getToollist, delToollist, addToollist, updateToollist, exportToollist } from "@/api/daily/toollist"; |
| 171 | 171 | import Editor from '@/components/Editor'; |
| 172 | +import store from "@/store"; | |
| 172 | 173 | import { |
| 173 | 174 | earthsitesList, |
| 174 | 175 | constructionsitesList, |
| ... | ... | @@ -181,6 +182,7 @@ export default { |
| 181 | 182 | components: { Editor }, |
| 182 | 183 | data() { |
| 183 | 184 | return { |
| 185 | + userName:store.getters.name, | |
| 184 | 186 | // 遮罩层 |
| 185 | 187 | loading: true, |
| 186 | 188 | border:true, |
| ... | ... | @@ -316,7 +318,8 @@ export default { |
| 316 | 318 | handleAdd() { |
| 317 | 319 | this.reset(); |
| 318 | 320 | this.open = true; |
| 319 | - this.edit = true; | |
| 321 | + this.form.operator = this.userName; | |
| 322 | + this.edit = true; | |
| 320 | 323 | }, |
| 321 | 324 | /** 修改按钮操作 */ |
| 322 | 325 | handleUpdate(row) { | ... | ... |
trash-workFlow/src/main/java/com/trash/workflow/service/impl/WorkflowServiceImpl.java
| ... | ... | @@ -152,7 +152,7 @@ public class WorkflowServiceImpl implements IWorkflowService { |
| 152 | 152 | workflow.setType(map.get("type").toString()); |
| 153 | 153 | workflow.setInstanceId(processInstance.getId()); |
| 154 | 154 | workflow.setState("0"); |
| 155 | - | |
| 155 | + workflow.setCreateTime(new Date()); | |
| 156 | 156 | |
| 157 | 157 | return workflowMapper.insertWorkflow(workflow); |
| 158 | 158 | } catch (Exception e) { |
| ... | ... | @@ -200,6 +200,7 @@ public class WorkflowServiceImpl implements IWorkflowService { |
| 200 | 200 | |
| 201 | 201 | workflow.setInstanceId(processInstance.getId()); |
| 202 | 202 | |
| 203 | + workflow.setCreateTime(new Date()); | |
| 203 | 204 | return workflowMapper.insertWorkflow(workflow); |
| 204 | 205 | } catch (Exception e) { |
| 205 | 206 | |
| ... | ... | @@ -234,6 +235,7 @@ public class WorkflowServiceImpl implements IWorkflowService { |
| 234 | 235 | workflow.setType(supervision.getType() == 0 ? "工地" : "消纳场"); |
| 235 | 236 | workflow.setInstanceId(processInstance.getId()); |
| 236 | 237 | workflow.setState("0"); |
| 238 | + workflow.setCreateTime(new Date()); | |
| 237 | 239 | |
| 238 | 240 | return workflowMapper.insertWorkflow(workflow); |
| 239 | 241 | } catch (Exception e) { |
| ... | ... | @@ -282,6 +284,7 @@ public class WorkflowServiceImpl implements IWorkflowService { |
| 282 | 284 | workflow.setType("案卷"); |
| 283 | 285 | workflow.setInstanceId(processInstance.getId()); |
| 284 | 286 | workflow.setState("0"); |
| 287 | + workflow.setCreateTime(new Date()); | |
| 285 | 288 | |
| 286 | 289 | return workflowMapper.insertWorkflow(workflow); |
| 287 | 290 | } catch (Exception e) { |
| ... | ... | @@ -341,6 +344,7 @@ public class WorkflowServiceImpl implements IWorkflowService { |
| 341 | 344 | workflow.setType("违规预警信息案卷"); |
| 342 | 345 | workflow.setInstanceId(instance.getId()); |
| 343 | 346 | workflow.setState("0"); |
| 347 | + workflow.setCreateTime(new Date()); | |
| 344 | 348 | |
| 345 | 349 | return workflowMapper.insertWorkflow(workflow); |
| 346 | 350 | } catch (Exception e) { |
| ... | ... | @@ -378,6 +382,7 @@ public class WorkflowServiceImpl implements IWorkflowService { |
| 378 | 382 | workflow.setType("案卷"); |
| 379 | 383 | workflow.setInstanceId(processInstance.getId()); |
| 380 | 384 | workflow.setState("0"); |
| 385 | + workflow.setCreateTime(new Date()); | |
| 381 | 386 | |
| 382 | 387 | return workflowMapper.insertWorkflow(workflow); |
| 383 | 388 | } catch (Exception e) { | ... | ... |