Commit f224a0e887af8d2a676f4e68e4badaefa43b762a
1 parent
1e3b15f9
m
Showing
19 changed files
with
731 additions
and
636 deletions
trash-activiti/src/main/java/com/trash/activiti/service/impl/ActTaskServiceImpl.java
| @@ -33,6 +33,7 @@ import org.apache.commons.collections4.map.HashedMap; | @@ -33,6 +33,7 @@ import org.apache.commons.collections4.map.HashedMap; | ||
| 33 | import org.springframework.beans.factory.annotation.Autowired; | 33 | import org.springframework.beans.factory.annotation.Autowired; |
| 34 | import org.springframework.stereotype.Service; | 34 | import org.springframework.stereotype.Service; |
| 35 | 35 | ||
| 36 | +import com.alibaba.fastjson.JSONObject; | ||
| 36 | import com.github.pagehelper.Page; | 37 | import com.github.pagehelper.Page; |
| 37 | import com.trash.activiti.domain.ActWorkflowFormData; | 38 | import com.trash.activiti.domain.ActWorkflowFormData; |
| 38 | import com.trash.activiti.domain.dto.ActTaskDTO; | 39 | import com.trash.activiti.domain.dto.ActTaskDTO; |
| @@ -44,6 +45,7 @@ import com.trash.activiti.service.IActWorkflowFormDataService; | @@ -44,6 +45,7 @@ import com.trash.activiti.service.IActWorkflowFormDataService; | ||
| 44 | import com.trash.activiti.service.myTaskService; | 45 | import com.trash.activiti.service.myTaskService; |
| 45 | import com.trash.common.core.page.PageDomain; | 46 | import com.trash.common.core.page.PageDomain; |
| 46 | import com.trash.common.core.redis.RedisCache; | 47 | import com.trash.common.core.redis.RedisCache; |
| 48 | +import com.trash.common.utils.RemoteServerUtils; | ||
| 47 | import com.trash.common.utils.SecurityUtils; | 49 | import com.trash.common.utils.SecurityUtils; |
| 48 | import com.trash.common.utils.ServletUtils; | 50 | import com.trash.common.utils.ServletUtils; |
| 49 | import com.trash.common.utils.StringUtils; | 51 | import com.trash.common.utils.StringUtils; |
| @@ -454,35 +456,49 @@ public class ActTaskServiceImpl implements IActTaskService { | @@ -454,35 +456,49 @@ public class ActTaskServiceImpl implements IActTaskService { | ||
| 454 | 456 | ||
| 455 | if(task != null){ | 457 | if(task != null){ |
| 456 | 458 | ||
| 457 | - List<Mobile> mobileList=new ArrayList<Mobile>(); | ||
| 458 | - | 459 | + try{ |
| 460 | + | ||
| 459 | 461 | ||
| 460 | - String number = actMapper.getPhoneNumber(processInstance.getProcessDefinitionKey(),task.getName()); | ||
| 461 | - | ||
| 462 | - | ||
| 463 | - if(number != null){ | ||
| 464 | - String smsString = "工作提醒:您有新的工作流程,请及时处理。"; | ||
| 465 | - Mobile mobile=new Mobile(); | ||
| 466 | - mobile.setMobile(number); | ||
| 467 | - mobileList.add(mobile); | ||
| 468 | - | ||
| 469 | - if(processInstance.getProcessDefinitionKey().equals("workflow_caseoffline")){ | ||
| 470 | - | ||
| 471 | - String dname = actMapper.getCaseTypeName("case_offline_type",processInstance.getBusinessKey().split(":")[1]); | ||
| 472 | - smsString = "案卷提醒:有一条"+ dname +"的案卷,请及时处理。"; | ||
| 473 | - } | ||
| 474 | - | ||
| 475 | - JsonSmsSend jsonSmsSend= PostSms.sendSms(mobileList,smsString); | ||
| 476 | - if(jsonSmsSend!=null){ | ||
| 477 | - if(jsonSmsSend.getState()==0){ | ||
| 478 | - System.out.println("发送成功"); | ||
| 479 | - }else{ | ||
| 480 | - System.out.println(jsonSmsSend.getMessage()); | ||
| 481 | - } | ||
| 482 | - }else{ | ||
| 483 | - System.out.println("发送返回空"); | ||
| 484 | - } | ||
| 485 | - } | 462 | + List<Mobile> mobileList=new ArrayList<Mobile>(); |
| 463 | + | ||
| 464 | + | ||
| 465 | + String number = actMapper.getPhoneNumber(processInstance.getProcessDefinitionKey(),task.getName()); | ||
| 466 | + | ||
| 467 | + | ||
| 468 | + if(number != null){ | ||
| 469 | + String smsString = "工作提醒:您有新的工作流程,请及时处理。"; | ||
| 470 | + Mobile mobile=new Mobile(); | ||
| 471 | + mobile.setMobile(number); | ||
| 472 | + mobileList.add(mobile); | ||
| 473 | + | ||
| 474 | + if(processInstance.getProcessDefinitionKey().equals("workflow_constructsite")){ | ||
| 475 | + | ||
| 476 | + JSONObject json = RemoteServerUtils.getConstructionInfo(processInstance.getBusinessKey().split(":")[1]); | ||
| 477 | + if(json != null) | ||
| 478 | + smsString = "审批提醒:您有新的工作流程需要审批 "+json.getString("areaCodeName")+" "+json.getString("name"); | ||
| 479 | + | ||
| 480 | + } | ||
| 481 | + | ||
| 482 | + if(processInstance.getProcessDefinitionKey().equals("workflow_caseoffline")){ | ||
| 483 | + | ||
| 484 | + String dname = actMapper.getCaseTypeName("case_offline_type",processInstance.getBusinessKey().split(":")[1]); | ||
| 485 | + smsString = "案卷提醒:有一条"+ dname +"的案卷,请及时处理。"; | ||
| 486 | + } | ||
| 487 | + | ||
| 488 | + JsonSmsSend jsonSmsSend= PostSms.sendSms(mobileList,smsString); | ||
| 489 | + if(jsonSmsSend!=null){ | ||
| 490 | + if(jsonSmsSend.getState()==0){ | ||
| 491 | + System.out.println("发送成功"); | ||
| 492 | + }else{ | ||
| 493 | + System.out.println(jsonSmsSend.getMessage()); | ||
| 494 | + } | ||
| 495 | + }else{ | ||
| 496 | + System.out.println("发送返回空"); | ||
| 497 | + } | ||
| 498 | + } | ||
| 499 | + }catch(Exception e){ | ||
| 500 | + e.printStackTrace(); | ||
| 501 | + } | ||
| 486 | 502 | ||
| 487 | } | 503 | } |
| 488 | 504 |
trash-admin/src/main/resources/application-dev.yml
| @@ -17,8 +17,8 @@ trash: | @@ -17,8 +17,8 @@ trash: | ||
| 17 | # 验证码类型 math 数组计算 char 字符验证 | 17 | # 验证码类型 math 数组计算 char 字符验证 |
| 18 | captchaType: math | 18 | captchaType: math |
| 19 | # 远程服务器地址 | 19 | # 远程服务器地址 |
| 20 | - # remotePath: http://175.6.47.84:8008 | ||
| 21 | - # token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJkdXJhYmxlIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg1NDE2NjEzMzU1fQ.58-J0KKfsK2pQhDQAzaBaUj-oFWMbYF1YzMAcshmcfidIkW16TZWIVhAVKPvCJvWfG54x7xB-ETxKCDLFnSctQ | 20 | + #remotePath: http://175.6.47.84:8008 |
| 21 | + #token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJkdXJhYmxlIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg1NDE2NjEzMzU1fQ.58-J0KKfsK2pQhDQAzaBaUj-oFWMbYF1YzMAcshmcfidIkW16TZWIVhAVKPvCJvWfG54x7xB-ETxKCDLFnSctQ | ||
| 22 | remotePath: http://183.66.242.6:14601 | 22 | remotePath: http://183.66.242.6:14601 |
| 23 | token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0NDU5MjEzNzQ2fQ.85oIrOnU7cz7L_-IGt4Bt1LXDTkFtyrdqNt05K0v9-4nsrrzzpbjbemK-yMlbnUpe4Fx2FFES-Wbw8Yr8ML69w | 23 | token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0NDU5MjEzNzQ2fQ.85oIrOnU7cz7L_-IGt4Bt1LXDTkFtyrdqNt05K0v9-4nsrrzzpbjbemK-yMlbnUpe4Fx2FFES-Wbw8Yr8ML69w |
| 24 | 24 |
trash-framework/src/main/java/com/trash/framework/web/service/SysLoginService.java
| @@ -126,7 +126,7 @@ public class SysLoginService | @@ -126,7 +126,7 @@ public class SysLoginService | ||
| 126 | token = "Bearer "+ token; | 126 | token = "Bearer "+ token; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | - Request request = new Request.Builder().url(RemoteServerUtils.remote + LOGIN_URL).addHeader("Authorization",token ).get().build(); | 129 | + Request request = new Request.Builder().url(RemoteServerUtils.remote + LOGIN_URL).addHeader("Authorization",token).get().build(); |
| 130 | 130 | ||
| 131 | try { | 131 | try { |
| 132 | okhttp3.Response response = okHttpClient.newCall(request).execute(); | 132 | okhttp3.Response response = okHttpClient.newCall(request).execute(); |
trash-ui/dist.7z
No preview for this file type
trash-ui/src/api/caseOfflineInfo.js
| @@ -95,9 +95,6 @@ export default { | @@ -95,9 +95,6 @@ export default { | ||
| 95 | this.areas = res.result; | 95 | this.areas = res.result; |
| 96 | this.handleUpdate(); | 96 | this.handleUpdate(); |
| 97 | }); | 97 | }); |
| 98 | - listReplyApprovalProcess({tableName: "workflow_caseoffline:"+id}).then(response => { | ||
| 99 | - this.replyApprovalProcessList = response.rows; | ||
| 100 | - }); | ||
| 101 | }, | 98 | }, |
| 102 | methods: { | 99 | methods: { |
| 103 | 100 | ||
| @@ -160,7 +157,7 @@ export default { | @@ -160,7 +157,7 @@ export default { | ||
| 160 | if (res.data.advice1) { | 157 | if (res.data.advice1) { |
| 161 | this.adviceList.push({ | 158 | this.adviceList.push({ |
| 162 | name: res.data.advice1.create_by, | 159 | name: res.data.advice1.create_by, |
| 163 | - time: res.data.advice1.create_time, | 160 | + time: res.data.create_time, |
| 164 | text: this.form.advice1 | 161 | text: this.form.advice1 |
| 165 | }) | 162 | }) |
| 166 | } | 163 | } |
| @@ -187,24 +184,34 @@ export default { | @@ -187,24 +184,34 @@ export default { | ||
| 187 | } | 184 | } |
| 188 | 185 | ||
| 189 | } | 186 | } |
| 190 | - }); | ||
| 191 | - if(response.data.status == 0){ | ||
| 192 | - historyFromData(this.workflow + ":" + id).then(response => { | 187 | + }); |
| 188 | + | ||
| 189 | + | ||
| 193 | 190 | ||
| 194 | - let obj = response.data[0]; | 191 | + historyFromData(this.workflow + ":" + id).then(response => { |
| 192 | + | ||
| 193 | + let obj = response.data[0]; | ||
| 195 | let data = { | 194 | let data = { |
| 196 | reply:obj.controlValue, | 195 | reply:obj.controlValue, |
| 197 | replyPeople:obj.createBy, | 196 | replyPeople:obj.createBy, |
| 197 | + replyTime:obj.createTime | ||
| 198 | }; | 198 | }; |
| 199 | 199 | ||
| 200 | - this.replyApprovalProcessList.push(data); | ||
| 201 | - }); | ||
| 202 | - } | 200 | + this.replyApprovalProcessList.push(data); |
| 201 | + | ||
| 202 | + listReplyApprovalProcess({tableName: "workflow_caseoffline:"+id}).then(response => { | ||
| 203 | + for(let i in response.rows){ | ||
| 204 | + | ||
| 205 | + this.replyApprovalProcessList.push(response.rows[i]); | ||
| 206 | + } | ||
| 207 | + }); | ||
| 208 | + }); | ||
| 209 | + | ||
| 210 | + | ||
| 203 | 211 | ||
| 204 | this.open2 = true; | 212 | this.open2 = true; |
| 205 | - }); | ||
| 206 | - | ||
| 207 | 213 | ||
| 214 | + }); | ||
| 208 | }, | 215 | }, |
| 209 | } | 216 | } |
| 210 | }; | 217 | }; |
trash-ui/src/api/caseoffline.js
| @@ -357,9 +357,39 @@ export default { | @@ -357,9 +357,39 @@ export default { | ||
| 357 | this.open2 = true; | 357 | this.open2 = true; |
| 358 | }, | 358 | }, |
| 359 | /** 提交按钮 */ | 359 | /** 提交按钮 */ |
| 360 | - submitForm() { | 360 | + submitForm() { |
| 361 | + let that = this; | ||
| 361 | this.$refs["form"].validate(valid => { | 362 | this.$refs["form"].validate(valid => { |
| 362 | - if (valid) { | 363 | + if (valid) { |
| 364 | + if(!this.form.objectId){ | ||
| 365 | + if(this.form.siteType == 0){ | ||
| 366 | + for(let i in this.data[0]){ | ||
| 367 | + if(this.data[0][i].name == this.form.siteName){ | ||
| 368 | + this.form.objectId = this.data[0][i].id; | ||
| 369 | + break; | ||
| 370 | + } | ||
| 371 | + } | ||
| 372 | + }else if(this.form.siteType == 1){ | ||
| 373 | + for(let i in this.data[1]){ | ||
| 374 | + if(this.data[1][i].name == this.form.siteName){ | ||
| 375 | + this.form.objectId = this.data[1][i].id; | ||
| 376 | + break; | ||
| 377 | + } | ||
| 378 | + } | ||
| 379 | + }else if(this.form.siteType == 2){ | ||
| 380 | + for(let i in this.data[2]){ | ||
| 381 | + if(res.result.list[i].licenseplateNo == this.form.siteName){ | ||
| 382 | + this.form.objectId = this.data[2][i].id; | ||
| 383 | + break; | ||
| 384 | + } | ||
| 385 | + } | ||
| 386 | + } | ||
| 387 | + } | ||
| 388 | + | ||
| 389 | + console.log(this.form); | ||
| 390 | + | ||
| 391 | + | ||
| 392 | + | ||
| 363 | this.form.attach = this.form.attach +""; | 393 | this.form.attach = this.form.attach +""; |
| 364 | if (this.form.id != null) { | 394 | if (this.form.id != null) { |
| 365 | updateCaseOffline(this.form).then(response => { | 395 | updateCaseOffline(this.form).then(response => { |
trash-ui/src/api/taskmethod.js
| @@ -53,9 +53,10 @@ export default { | @@ -53,9 +53,10 @@ export default { | ||
| 53 | this.videoSrc1 = []; | 53 | this.videoSrc1 = []; |
| 54 | }, | 54 | }, |
| 55 | removeImage(index, img) { | 55 | removeImage(index, img) { |
| 56 | + let name = img.split(":")[1]; | ||
| 56 | let target = "sub_img" + this.picIndex; | 57 | let target = "sub_img" + this.picIndex; |
| 57 | for (let i = 0; i < this.slides[index].length; i++) { | 58 | for (let i = 0; i < this.slides[index].length; i++) { |
| 58 | - if (this.slides[index][i].alt == img) { | 59 | + if (this.slides[index][i].alt == name) { |
| 59 | this.slides[index].splice(i, 1); | 60 | this.slides[index].splice(i, 1); |
| 60 | } | 61 | } |
| 61 | } | 62 | } |
| @@ -333,18 +334,6 @@ export default { | @@ -333,18 +334,6 @@ export default { | ||
| 333 | } | 334 | } |
| 334 | 335 | ||
| 335 | if (this.definitionKey == "workflow_threestep") { | 336 | if (this.definitionKey == "workflow_threestep") { |
| 336 | - if(!this.form["sub_img0"] || this.form["sub_img0"].length == 0 || | ||
| 337 | - !this.form["sub_img1"] || this.form["sub_img1"].length == 0 || | ||
| 338 | - !this.form["sub_img3"] || this.form["sub_img3"].length == 0 || | ||
| 339 | - !this.form["sub_img4"] || this.form["sub_img4"].length == 0 || | ||
| 340 | - !this.form["sub_img5"] || this.form["sub_img5"].length == 0 || | ||
| 341 | - (this.form.type == 0 && (!this.form["sub_img6"] || this.form["sub_img6"].length == 0)) || | ||
| 342 | - !this.form["sub_img7"] || this.form["sub_img7"].length == 0 | ||
| 343 | - ){ | ||
| 344 | - this.$message("缺少必要的图片"); | ||
| 345 | - return; | ||
| 346 | - } | ||
| 347 | - | ||
| 348 | 337 | ||
| 349 | 338 | ||
| 350 | this.$refs["form"].validate(valid => { | 339 | this.$refs["form"].validate(valid => { |
| @@ -366,6 +355,17 @@ export default { | @@ -366,6 +355,17 @@ export default { | ||
| 366 | } | 355 | } |
| 367 | 356 | ||
| 368 | if (this.form.status == 1) { | 357 | if (this.form.status == 1) { |
| 358 | + // if(!this.form["sub_img0"] || this.form["sub_img0"].length == 0 || | ||
| 359 | + // !this.form["sub_img1"] || this.form["sub_img1"].length == 0 || | ||
| 360 | + // !this.form["sub_img3"] || this.form["sub_img3"].length == 0 || | ||
| 361 | + // !this.form["sub_img4"] || this.form["sub_img4"].length == 0 || | ||
| 362 | + // !this.form["sub_img5"] || this.form["sub_img5"].length == 0 || | ||
| 363 | + // (this.form.type == 0 && (!this.form["sub_img6"] || this.form["sub_img6"].length == 0)) || | ||
| 364 | + // !this.form["sub_img7"] || this.form["sub_img7"].length == 0 | ||
| 365 | + // ){ | ||
| 366 | + // this.$message("缺少必要的图片"); | ||
| 367 | + // return; | ||
| 368 | + // } | ||
| 369 | activeThreestep(this.form).then(res => { | 369 | activeThreestep(this.form).then(res => { |
| 370 | formDataSave(this.id, this.form.formData).then(response => { | 370 | formDataSave(this.id, this.form.formData).then(response => { |
| 371 | this.msgSuccess("审批成功"); | 371 | this.msgSuccess("审批成功"); |
| @@ -375,6 +375,8 @@ export default { | @@ -375,6 +375,8 @@ export default { | ||
| 375 | }); | 375 | }); |
| 376 | }); | 376 | }); |
| 377 | } else { | 377 | } else { |
| 378 | + | ||
| 379 | + | ||
| 378 | formDataSave(this.id, this.form.formData).then(response => { | 380 | formDataSave(this.id, this.form.formData).then(response => { |
| 379 | this.msgSuccess("审批成功"); | 381 | this.msgSuccess("审批成功"); |
| 380 | this.open2 = false; | 382 | this.open2 = false; |
trash-ui/src/api/three_step.js
| @@ -751,10 +751,8 @@ export default { | @@ -751,10 +751,8 @@ export default { | ||
| 751 | this.form["img" + i] = this.form["img" + i].split(","); | 751 | this.form["img" + i] = this.form["img" + i].split(","); |
| 752 | } | 752 | } |
| 753 | } | 753 | } |
| 754 | - | ||
| 755 | this.companyList = []; | 754 | this.companyList = []; |
| 756 | this.truckList = []; | 755 | this.truckList = []; |
| 757 | - | ||
| 758 | constructionById(this.form.objectId).then(response => { | 756 | constructionById(this.form.objectId).then(response => { |
| 759 | this.companyList.push({id: response.result.transportCompanyId, name: response.result.transportCompany}); | 757 | this.companyList.push({id: response.result.transportCompanyId, name: response.result.transportCompany}); |
| 760 | let query = { | 758 | let query = { |
| @@ -833,19 +831,18 @@ export default { | @@ -833,19 +831,18 @@ export default { | ||
| 833 | /** 提交按钮 */ | 831 | /** 提交按钮 */ |
| 834 | submitForm() { | 832 | submitForm() { |
| 835 | 833 | ||
| 836 | - if(!this.form["img0"] || this.form["img0"].length == 0 || | ||
| 837 | - !this.form["img1"] || this.form["img1"].length == 0 || | ||
| 838 | - !this.form["img2"] || this.form["img2"].length == 0 || | ||
| 839 | - !this.form["img3"] || this.form["img3"].length == 0 || | ||
| 840 | - !this.form["img4"] || this.form["img4"].length == 0 || | ||
| 841 | - !this.form["img5"] || this.form["img5"].length == 0 || | ||
| 842 | - (this.form.type == 0 && (!this.form["img6"] || this.form["img6"].length == 0)) || | ||
| 843 | - !this.form["img7"] || this.form["img7"].length == 0 | ||
| 844 | - ){ | ||
| 845 | - this.$message("缺少必要的图片"); | ||
| 846 | - return; | ||
| 847 | - } | ||
| 848 | - | 834 | + // if(!this.form["img0"] || this.form["img0"].length == 0 || |
| 835 | + // !this.form["img1"] || this.form["img1"].length == 0 || | ||
| 836 | + // !this.form["img2"] || this.form["img2"].length == 0 || | ||
| 837 | + // !this.form["img3"] || this.form["img3"].length == 0 || | ||
| 838 | + // !this.form["img4"] || this.form["img4"].length == 0 || | ||
| 839 | + // !this.form["img5"] || this.form["img5"].length == 0 || | ||
| 840 | + // (this.form.type == 0 && (!this.form["img6"] || this.form["img6"].length == 0)) || | ||
| 841 | + // !this.form["img7"] || this.form["img7"].length == 0 | ||
| 842 | + // ){ | ||
| 843 | + // this.$message("缺少必要的图片"); | ||
| 844 | + // return; | ||
| 845 | + // } | ||
| 849 | 846 | ||
| 850 | 847 | ||
| 851 | 848 | ||
| @@ -858,7 +855,6 @@ export default { | @@ -858,7 +855,6 @@ export default { | ||
| 858 | "contractStatus":1 | 855 | "contractStatus":1 |
| 859 | }; | 856 | }; |
| 860 | 857 | ||
| 861 | - this.form.companys = companyNames; | ||
| 862 | 858 | ||
| 863 | if(this.form.type == 0){ | 859 | if(this.form.type == 0){ |
| 864 | query.constructionSiteID = [this.form.objectId]; | 860 | query.constructionSiteID = [this.form.objectId]; |
| @@ -911,8 +907,9 @@ export default { | @@ -911,8 +907,9 @@ export default { | ||
| 911 | if (this.form.id != null) { | 907 | if (this.form.id != null) { |
| 912 | if (this.queryParams.pageStatus == 1) { | 908 | if (this.queryParams.pageStatus == 1) { |
| 913 | 909 | ||
| 914 | - this.form.companys = this.form.companys + ""; | ||
| 915 | - this.form.companyTrucks = this.form.companyTrucks + ""; | 910 | + this.form.companys = ""; |
| 911 | + this.form.companyTrucks = ""; | ||
| 912 | + | ||
| 916 | updateThreestep(this.form).then(response => { | 913 | updateThreestep(this.form).then(response => { |
| 917 | this.msgSuccess("提交成功"); | 914 | this.msgSuccess("提交成功"); |
| 918 | this.open = false; | 915 | this.open = false; |
| @@ -933,8 +930,8 @@ export default { | @@ -933,8 +930,8 @@ export default { | ||
| 933 | } | 930 | } |
| 934 | }); | 931 | }); |
| 935 | } else { | 932 | } else { |
| 936 | - this.form.companyTrucks = this.form.companyTrucks + ""; | ||
| 937 | - | 933 | + this.form.companys = ""; |
| 934 | + this.form.companyTrucks = ""; | ||
| 938 | for (let i = 0; i < 13; i++) { | 935 | for (let i = 0; i < 13; i++) { |
| 939 | if (this.form["img" + i]) { | 936 | if (this.form["img" + i]) { |
| 940 | this.form["img" + i] = this.form["img" + i] + ""; | 937 | this.form["img" + i] = this.form["img" + i] + ""; |
trash-ui/src/views/caseOffline/caseOffline/caseOfflineInfo.vue
| @@ -13,10 +13,11 @@ | @@ -13,10 +13,11 @@ | ||
| 13 | <el-form-item label="类型" prop="siteType"> | 13 | <el-form-item label="类型" prop="siteType"> |
| 14 | <el-select v-model="form.siteType" placeholder="请选择类型" disabled> | 14 | <el-select v-model="form.siteType" placeholder="请选择类型" disabled> |
| 15 | <el-option label="工地" value="0"/> | 15 | <el-option label="工地" value="0"/> |
| 16 | - <el-option label="处理场所" value="1"/> | 16 | + <el-option label="处理场所" value="1"/> |
| 17 | + <el-option label="车辆" value="2" /> | ||
| 17 | </el-select> | 18 | </el-select> |
| 18 | </el-form-item> | 19 | </el-form-item> |
| 19 | - <el-form-item :label="form.siteType==0?'工地名称':'处理场所名称'" prop="siteName"> | 20 | + <el-form-item :label="form.siteType==0?'工地名称':form.siteType==1?'处理场所名称':'车牌号'" prop="siteName"> |
| 20 | <el-select v-model="form.siteName" placeholder="请选择类型" disabled> | 21 | <el-select v-model="form.siteName" placeholder="请选择类型" disabled> |
| 21 | <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" | 22 | <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" |
| 22 | @native.click="getSite(item)" disabled/> | 23 | @native.click="getSite(item)" disabled/> |
trash-ui/src/views/caseOffline/caseOffline/index.vue
| @@ -116,7 +116,7 @@ | @@ -116,7 +116,7 @@ | ||
| 116 | :popper-append-to-body="false" class="product-style" | 116 | :popper-append-to-body="false" class="product-style" |
| 117 | v-model="form.siteName" placeholder="请选择类型" | 117 | v-model="form.siteName" placeholder="请选择类型" |
| 118 | allow-create filterable :filter-method="getSite"> | 118 | allow-create filterable :filter-method="getSite"> |
| 119 | - <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" :title="item.name"/> | 119 | + <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" :title="item.name" /> |
| 120 | </el-select> | 120 | </el-select> |
| 121 | </el-form-item> | 121 | </el-form-item> |
| 122 | <el-form-item label="问题描述" prop="caseDec"> | 122 | <el-form-item label="问题描述" prop="caseDec"> |
trash-ui/src/views/h5/caseOffline/caseOfflineInfo.vue
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | 3 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| 4 | - | 4 | + |
| 5 | <el-form-item label="案卷类型" prop="type"> | 5 | <el-form-item label="案卷类型" prop="type"> |
| 6 | <el-input v-model="form.type" type="textarea" :rows="3" disabled /> | 6 | <el-input v-model="form.type" type="textarea" :rows="3" disabled /> |
| 7 | </el-form-item> | 7 | </el-form-item> |
| @@ -14,9 +14,10 @@ | @@ -14,9 +14,10 @@ | ||
| 14 | <el-select v-model="form.siteType" placeholder="请选择类型" disabled> | 14 | <el-select v-model="form.siteType" placeholder="请选择类型" disabled> |
| 15 | <el-option label="工地" value="0" /> | 15 | <el-option label="工地" value="0" /> |
| 16 | <el-option label="处理场所" value="1" /> | 16 | <el-option label="处理场所" value="1" /> |
| 17 | + <el-option label="车辆" value="2" /> | ||
| 17 | </el-select> | 18 | </el-select> |
| 18 | </el-form-item> | 19 | </el-form-item> |
| 19 | - <el-form-item :label="form.siteType==0?'工地名称':'处理场所名称'" prop="siteName"> | 20 | + <el-form-item :label="form.siteType==0?'工地名称':form.siteType==1?'处理场所名称':'车牌号'" prop="siteName"> |
| 20 | <el-select v-model="form.siteName" placeholder="请选择类型" disabled> | 21 | <el-select v-model="form.siteName" placeholder="请选择类型" disabled> |
| 21 | <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" @native.click="getSite(item)" disabled/> | 22 | <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" @native.click="getSite(item)" disabled/> |
| 22 | </el-select> | 23 | </el-select> |
| @@ -41,11 +42,25 @@ | @@ -41,11 +42,25 @@ | ||
| 41 | </el-form-item> | 42 | </el-form-item> |
| 42 | 43 | ||
| 43 | 44 | ||
| 44 | - <el-table :data="adviceList" v-if="adviceList != null"> | ||
| 45 | - <el-table-column label="用户" width="55" align="center" prop="name"/> | ||
| 46 | - <el-table-column label="审批内容" align="center" prop="text" /> | ||
| 47 | - <el-table-column label="时间" align="center" prop="time" /> | ||
| 48 | - </el-table> | 45 | + <el-table :data="replyApprovalProcessList"> |
| 46 | + <el-table-column property="replyPeople" label="操作人" header-align="center" align="center"></el-table-column> | ||
| 47 | + <el-table-column property="reply" label="意见" header-align="center" align="center"></el-table-column> | ||
| 48 | + <el-table-column property="replyTime" label="操作时间" header-align="center" align="center"></el-table-column> | ||
| 49 | + <el-table-column property="replyImg" label="预览" header-align="center" align="center"> | ||
| 50 | + <template slot-scope="scope"> | ||
| 51 | + <el-button | ||
| 52 | + size="mini" | ||
| 53 | + type="text" | ||
| 54 | + icon="el-icon-view" | ||
| 55 | + @click="openImage(scope.row.replyImg)" | ||
| 56 | + v-if="scope.row.replyImg!=null && scope.row.replyImg!='undefined'" | ||
| 57 | + v-hasPermi="['casefile:violationWarningInformation:edit']" | ||
| 58 | + >查看 | ||
| 59 | + </el-button> | ||
| 60 | + <span v-if="scope.row.replyImg==null || scope.row.replyImg=='undefined'">暂无</span> | ||
| 61 | + </template> | ||
| 62 | + </el-table-column> | ||
| 63 | + </el-table> | ||
| 49 | 64 | ||
| 50 | 65 | ||
| 51 | </el-form> | 66 | </el-form> |
trash-ui/src/views/h5/threestep/index.vue
| @@ -31,8 +31,6 @@ | @@ -31,8 +31,6 @@ | ||
| 31 | value-format="yyyy-MM-dd HH:mm:ss" placeholder="结束时间"> | 31 | value-format="yyyy-MM-dd HH:mm:ss" placeholder="结束时间"> |
| 32 | </el-date-picker> | 32 | </el-date-picker> |
| 33 | </el-form-item> | 33 | </el-form-item> |
| 34 | - | ||
| 35 | - | ||
| 36 | <el-form-item> | 34 | <el-form-item> |
| 37 | <el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> | 35 | <el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> |
| 38 | <el-button size="mini" @click="resetQuery">重置</el-button> | 36 | <el-button size="mini" @click="resetQuery">重置</el-button> |
| @@ -135,7 +133,8 @@ | @@ -135,7 +133,8 @@ | ||
| 135 | 上传附件:<a style="color:blue;font-size: 12px;" @click="picSample=true">示意图</a> | 133 | 上传附件:<a style="color:blue;font-size: 12px;" @click="picSample=true">示意图</a> |
| 136 | 134 | ||
| 137 | <el-row type="flex" justify="center" style="margin-top: 20px;" v-if="form.type != null"> | 135 | <el-row type="flex" justify="center" style="margin-top: 20px;" v-if="form.type != null"> |
| 138 | - <el-col :span="12"> | 136 | + <el-col :span="12"> |
| 137 | + <span style="color: red;">*</span> | ||
| 139 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(0)">过水槽照片</a> | 138 | <a style="color:blue;font-size: 12px;" @click="showFileUpload(0)">过水槽照片</a> |
| 140 | <el-image v-for="item in slides[0]" | 139 | <el-image v-for="item in slides[0]" |
| 141 | style="width: 100px; height: 100px; margin: 5px;" | 140 | style="width: 100px; height: 100px; margin: 5px;" |
trash-workFlow/src/main/java/com/trash/business/service/impl/ConstructionCreditServiceImpl.java
| @@ -19,9 +19,11 @@ import com.trash.business.service.IConstructionCreditService; | @@ -19,9 +19,11 @@ import com.trash.business.service.IConstructionCreditService; | ||
| 19 | import com.trash.common.core.redis.RedisCache; | 19 | import com.trash.common.core.redis.RedisCache; |
| 20 | import com.trash.common.utils.RemoteServerUtils; | 20 | import com.trash.common.utils.RemoteServerUtils; |
| 21 | import com.trash.common.utils.SecurityUtils; | 21 | import com.trash.common.utils.SecurityUtils; |
| 22 | +import com.trash.common.utils.spring.SpringUtils; | ||
| 22 | import com.trash.common.utils.util.PostSms; | 23 | import com.trash.common.utils.util.PostSms; |
| 23 | import com.trash.common.utils.vo.mt.JsonSmsSend; | 24 | import com.trash.common.utils.vo.mt.JsonSmsSend; |
| 24 | import com.trash.common.utils.vo.mt.Mobile; | 25 | import com.trash.common.utils.vo.mt.Mobile; |
| 26 | +import com.trash.system.mapper.SysTempMapper; | ||
| 25 | 27 | ||
| 26 | /** | 28 | /** |
| 27 | * 三查机制Service业务层处理 | 29 | * 三查机制Service业务层处理 |
| @@ -30,311 +32,314 @@ import com.trash.common.utils.vo.mt.Mobile; | @@ -30,311 +32,314 @@ import com.trash.common.utils.vo.mt.Mobile; | ||
| 30 | * @date 2023-04-21 | 32 | * @date 2023-04-21 |
| 31 | */ | 33 | */ |
| 32 | @Service | 34 | @Service |
| 33 | -public class ConstructionCreditServiceImpl implements IConstructionCreditService | ||
| 34 | -{ | ||
| 35 | - @Autowired | ||
| 36 | - private ConstructionCreditMapper constructionCreditMapper; | ||
| 37 | - | ||
| 38 | - @Autowired | ||
| 39 | - SmsMapper smsMapper; | ||
| 40 | - | ||
| 41 | - | ||
| 42 | - @Autowired | ||
| 43 | - RedisCache redis; | ||
| 44 | - /** | ||
| 45 | - * 查询三查机制 | ||
| 46 | - * | ||
| 47 | - * @param id 三查机制ID | ||
| 48 | - * @return 三查机制 | ||
| 49 | - */ | ||
| 50 | - @Override | ||
| 51 | - public ConstructionCredit selectConstructionCreditById(Long id) | ||
| 52 | - { | ||
| 53 | - return constructionCreditMapper.selectConstructionCreditById(id); | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | - /** | ||
| 57 | - * 查询三查机制列表 | ||
| 58 | - * | ||
| 59 | - * @param constructionCredit 三查机制 | ||
| 60 | - * @return 三查机制 | ||
| 61 | - */ | ||
| 62 | - @Override | ||
| 63 | - public List<ConstructionCredit> selectConstructionCreditList(ConstructionCredit constructionCredit) | ||
| 64 | - { | ||
| 65 | - List<ConstructionCredit> list = new ArrayList<>(); | ||
| 66 | - if (SecurityUtils.getLoginUser().getUser().getConAreas().size() > 0 || SecurityUtils.getLoginUser().getUser().getConList().size() > 0) { | ||
| 67 | - List<String> ids = new ArrayList<>(); | ||
| 68 | - for(String str:SecurityUtils.getLoginUser().getUser().getConList()){ | ||
| 69 | - ids.add(str); | ||
| 70 | - } | ||
| 71 | - | ||
| 72 | - | ||
| 73 | - if(SecurityUtils.getLoginUser().getUser().getConAreas().size() > 0){ | ||
| 74 | - | ||
| 75 | - List<String> cArea = SecurityUtils.getLoginUser().getUser().getConAreas(); | ||
| 76 | - | ||
| 77 | - JSONArray jsonArray = redis.getCacheObject("constructionList"); | ||
| 78 | - | ||
| 79 | - for(Object obj:jsonArray){ | ||
| 80 | - JSONObject json = (JSONObject) obj; | ||
| 81 | - if(cArea.indexOf(json.getString("areaCode")) > -1){ | ||
| 82 | - ids.add(json.getString("id")); | ||
| 83 | - } | ||
| 84 | - } | ||
| 85 | - } | ||
| 86 | - | ||
| 87 | - constructionCredit.setIds(ids); | ||
| 88 | - | ||
| 89 | - | ||
| 90 | - list = constructionCreditMapper.selectConstructionCreditList(constructionCredit); | ||
| 91 | - } | ||
| 92 | - | ||
| 93 | - | ||
| 94 | - return list; | ||
| 95 | - } | ||
| 96 | - | ||
| 97 | - @Override | ||
| 98 | - public List<ConstructionCredit> selectConstructionCreditHistory(ConstructionCredit constructionCredit) | ||
| 99 | - { | ||
| 100 | - List<ConstructionCredit> list = new ArrayList<>(); | ||
| 101 | - | ||
| 102 | - if (SecurityUtils.getLoginUser().getUser().getConAreas().size() > 0 || SecurityUtils.getLoginUser().getUser().getConList().size() > 0) { | ||
| 103 | - List<String> ids = new ArrayList<>(); | ||
| 104 | - for(String str:SecurityUtils.getLoginUser().getUser().getConList()){ | ||
| 105 | - ids.add(str); | 35 | +public class ConstructionCreditServiceImpl implements IConstructionCreditService { |
| 36 | + @Autowired | ||
| 37 | + private ConstructionCreditMapper constructionCreditMapper; | ||
| 38 | + | ||
| 39 | + @Autowired | ||
| 40 | + SmsMapper smsMapper; | ||
| 41 | + | ||
| 42 | + @Autowired | ||
| 43 | + RedisCache redis; | ||
| 44 | + | ||
| 45 | + /** | ||
| 46 | + * 查询三查机制 | ||
| 47 | + * | ||
| 48 | + * @param id | ||
| 49 | + * 三查机制ID | ||
| 50 | + * @return 三查机制 | ||
| 51 | + */ | ||
| 52 | + @Override | ||
| 53 | + public ConstructionCredit selectConstructionCreditById(Long id) { | ||
| 54 | + return constructionCreditMapper.selectConstructionCreditById(id); | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + /** | ||
| 58 | + * 查询三查机制列表 | ||
| 59 | + * | ||
| 60 | + * @param constructionCredit | ||
| 61 | + * 三查机制 | ||
| 62 | + * @return 三查机制 | ||
| 63 | + */ | ||
| 64 | + @Override | ||
| 65 | + public List<ConstructionCredit> selectConstructionCreditList(ConstructionCredit constructionCredit) { | ||
| 66 | + List<ConstructionCredit> list = new ArrayList<>(); | ||
| 67 | + if (SecurityUtils.getLoginUser().getUser().getConAreas().size() > 0 | ||
| 68 | + || SecurityUtils.getLoginUser().getUser().getConList().size() > 0) { | ||
| 69 | + List<String> ids = new ArrayList<>(); | ||
| 70 | + for (String str : SecurityUtils.getLoginUser().getUser().getConList()) { | ||
| 71 | + ids.add(str); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + if (SecurityUtils.getLoginUser().getUser().getConAreas().size() > 0) { | ||
| 75 | + | ||
| 76 | + List<String> cArea = SecurityUtils.getLoginUser().getUser().getConAreas(); | ||
| 77 | + | ||
| 78 | + JSONArray jsonArray = redis.getCacheObject("constructionList"); | ||
| 79 | + | ||
| 80 | + if (jsonArray == null) { | ||
| 81 | + jsonArray = JSONArray | ||
| 82 | + .parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("constructionList")); | ||
| 106 | } | 83 | } |
| 107 | - | ||
| 108 | - | ||
| 109 | - if(SecurityUtils.getLoginUser().getUser().getConAreas().size() > 0){ | ||
| 110 | - | ||
| 111 | - List<String> cArea = SecurityUtils.getLoginUser().getUser().getConAreas(); | ||
| 112 | - | ||
| 113 | - JSONArray jsonArray = redis.getCacheObject("constructionList"); | ||
| 114 | - | ||
| 115 | - for(Object obj:jsonArray){ | ||
| 116 | - JSONObject json = (JSONObject) obj; | ||
| 117 | - if(cArea.indexOf(json.getString("areaCode")) > -1){ | ||
| 118 | - ids.add(json.getString("id")); | ||
| 119 | - } | 84 | + |
| 85 | + for (Object obj : jsonArray) { | ||
| 86 | + JSONObject json = (JSONObject) obj; | ||
| 87 | + if (cArea.indexOf(json.getString("areaCode")) > -1) { | ||
| 88 | + ids.add(json.getString("id")); | ||
| 120 | } | 89 | } |
| 121 | } | 90 | } |
| 122 | - | ||
| 123 | - constructionCredit.setIds(ids); | ||
| 124 | - | ||
| 125 | - | ||
| 126 | - list = constructionCreditMapper.selectConstructionCreditHistory(constructionCredit); | ||
| 127 | } | 91 | } |
| 128 | 92 | ||
| 129 | - return list; | ||
| 130 | - } | ||
| 131 | - | ||
| 132 | - | ||
| 133 | - /** | ||
| 134 | - * 新增三查机制 | ||
| 135 | - * | ||
| 136 | - * @param constructionCredit 三查机制 | ||
| 137 | - * @return 结果 | ||
| 138 | - */ | ||
| 139 | - @Override | ||
| 140 | - public int insertConstructionCredit(ConstructionCredit constructionCredit) | ||
| 141 | - { | ||
| 142 | - | ||
| 143 | - List<Map> map = new ArrayList<Map>(); | ||
| 144 | - | ||
| 145 | - ConstructionCredit cc = new ConstructionCredit(); | ||
| 146 | - | ||
| 147 | - cc.setStatus(0L); | ||
| 148 | - cc.setLostCredit(constructionCredit.getLostCredit()); | ||
| 149 | - cc.setObjectId(constructionCredit.getObjectId()); | ||
| 150 | - | ||
| 151 | - List old = constructionCreditMapper.selectConstructionCreditList(cc); | ||
| 152 | - | ||
| 153 | - int i = 0; | ||
| 154 | - | ||
| 155 | - if(old.size() > 0){ | ||
| 156 | - i = 1; | ||
| 157 | - }else{ | ||
| 158 | - i = constructionCreditMapper.insertConstructionCredit(constructionCredit); | ||
| 159 | - Map param = new HashMap(); | ||
| 160 | - param.put("objectId", constructionCredit.getObjectId()); | ||
| 161 | - param.put("creditStatus", constructionCredit.getLostCredit()); | ||
| 162 | - map.add(param); | ||
| 163 | - RemoteServerUtils.updateConstationCreditAndStatus(map); | ||
| 164 | - | ||
| 165 | - JSONArray array = redis.getCacheObject("constructionList"); | ||
| 166 | - | ||
| 167 | - sendCreditSMS(constructionCredit.getObjectId(), | ||
| 168 | - constructionCredit.getName(),constructionCredit.getReason(), | ||
| 169 | - constructionCredit.getLostCredit(),array,"credit",smsMapper,"constructionCompanyPhone","projectnCompanyPhone"); | ||
| 170 | - } | ||
| 171 | - | ||
| 172 | - | ||
| 173 | - | ||
| 174 | - | ||
| 175 | - return i; | ||
| 176 | - } | ||
| 177 | - | ||
| 178 | - | ||
| 179 | - | ||
| 180 | - | ||
| 181 | - public void sendCreditSMS(String objectId , String name,String reason,long lost,JSONArray array,String smsType,SmsMapper smsMapper,String phone,String phone1) { | ||
| 182 | - | 93 | + constructionCredit.setIds(ids); |
| 94 | + | ||
| 95 | + list = constructionCreditMapper.selectConstructionCreditList(constructionCredit); | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + return list; | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + @Override | ||
| 102 | + public List<ConstructionCredit> selectConstructionCreditHistory(ConstructionCredit constructionCredit) { | ||
| 103 | + List<ConstructionCredit> list = new ArrayList<>(); | ||
| 104 | + | ||
| 105 | + if (SecurityUtils.getLoginUser().getUser().getConAreas().size() > 0 | ||
| 106 | + || SecurityUtils.getLoginUser().getUser().getConList().size() > 0) { | ||
| 107 | + List<String> ids = new ArrayList<>(); | ||
| 108 | + for (String str : SecurityUtils.getLoginUser().getUser().getConList()) { | ||
| 109 | + ids.add(str); | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + if (SecurityUtils.getLoginUser().getUser().getConAreas().size() > 0) { | ||
| 113 | + | ||
| 114 | + List<String> cArea = SecurityUtils.getLoginUser().getUser().getConAreas(); | ||
| 115 | + | ||
| 116 | + JSONArray jsonArray = redis.getCacheObject("constructionList"); | ||
| 117 | + | ||
| 118 | + if (jsonArray == null) { | ||
| 119 | + jsonArray = JSONArray | ||
| 120 | + .parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("constructionList")); | ||
| 121 | + } | ||
| 122 | + for (Object obj : jsonArray) { | ||
| 123 | + JSONObject json = (JSONObject) obj; | ||
| 124 | + if (cArea.indexOf(json.getString("areaCode")) > -1) { | ||
| 125 | + ids.add(json.getString("id")); | ||
| 126 | + } | ||
| 127 | + } | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + constructionCredit.setIds(ids); | ||
| 131 | + | ||
| 132 | + list = constructionCreditMapper.selectConstructionCreditHistory(constructionCredit); | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + return list; | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + /** | ||
| 139 | + * 新增三查机制 | ||
| 140 | + * | ||
| 141 | + * @param constructionCredit | ||
| 142 | + * 三查机制 | ||
| 143 | + * @return 结果 | ||
| 144 | + */ | ||
| 145 | + @Override | ||
| 146 | + public int insertConstructionCredit(ConstructionCredit constructionCredit) { | ||
| 147 | + | ||
| 148 | + List<Map> map = new ArrayList<Map>(); | ||
| 149 | + | ||
| 150 | + ConstructionCredit cc = new ConstructionCredit(); | ||
| 151 | + | ||
| 152 | + cc.setStatus(0L); | ||
| 153 | + cc.setLostCredit(constructionCredit.getLostCredit()); | ||
| 154 | + cc.setObjectId(constructionCredit.getObjectId()); | ||
| 155 | + List old = constructionCreditMapper.selectConstructionCreditList(cc); | ||
| 156 | + | ||
| 157 | + int i = 0; | ||
| 158 | + | ||
| 159 | + if (old.size() > 0) { | ||
| 160 | + i = 1; | ||
| 161 | + } else { | ||
| 162 | + i = constructionCreditMapper.insertConstructionCredit(constructionCredit); | ||
| 163 | + Map param = new HashMap(); | ||
| 164 | + param.put("objectId", constructionCredit.getObjectId()); | ||
| 165 | + param.put("creditStatus", constructionCredit.getLostCredit()); | ||
| 166 | + map.add(param); | ||
| 167 | + RemoteServerUtils.updateConstationCreditAndStatus(map); | ||
| 168 | + | ||
| 169 | + try { | ||
| 170 | + JSONArray array = redis.getCacheObject("constructionList"); | ||
| 171 | + | ||
| 172 | + if (array == null) { | ||
| 173 | + array = JSONArray | ||
| 174 | + .parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("constructionList")); | ||
| 175 | + } | ||
| 176 | + sendCreditSMS(constructionCredit.getObjectId(), constructionCredit.getName(), | ||
| 177 | + constructionCredit.getReason(), constructionCredit.getLostCredit(), array, "credit", smsMapper, | ||
| 178 | + "constructionCompanyPhone", "projectnCompanyPhone"); | ||
| 179 | + } catch (Exception e) { | ||
| 180 | + | ||
| 181 | + e.printStackTrace(); | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + return i; | ||
| 187 | + } | ||
| 188 | + | ||
| 189 | + public void sendCreditSMS(String objectId, String name, String reason, long lost, JSONArray array, String smsType, | ||
| 190 | + SmsMapper smsMapper, String phone, String phone1) { | ||
| 191 | + | ||
| 183 | String number = null; | 192 | String number = null; |
| 184 | - List<Mobile> mobileList=new ArrayList<Mobile>(); | 193 | + List<Mobile> mobileList = new ArrayList<Mobile>(); |
| 185 | String areaCode = null; | 194 | String areaCode = null; |
| 186 | - | ||
| 187 | - for(Object obj:array){ | ||
| 188 | - JSONObject json = (JSONObject)obj; | ||
| 189 | - if(objectId.equals(json.getString("id"))){ | ||
| 190 | 195 | ||
| 191 | - areaCode = json.getString("areaCode"); | ||
| 192 | - | 196 | + for (Object obj : array) { |
| 197 | + JSONObject json = (JSONObject) obj; | ||
| 198 | + if (objectId.equals(json.getString("id"))) { | ||
| 199 | + | ||
| 200 | + areaCode = json.getString("areaCode"); | ||
| 201 | + | ||
| 193 | String p = json.getString(phone); | 202 | String p = json.getString(phone); |
| 194 | - if(p!=null){ | ||
| 195 | - Mobile mobile=new Mobile(); | ||
| 196 | - mobile.setMobile(p); | ||
| 197 | - mobileList.add(mobile); | 203 | + if (p != null) { |
| 204 | + Mobile mobile = new Mobile(); | ||
| 205 | + mobile.setMobile(p); | ||
| 206 | + mobileList.add(mobile); | ||
| 198 | } | 207 | } |
| 199 | - | ||
| 200 | - if(phone1!=null){ | 208 | + |
| 209 | + if (phone1 != null) { | ||
| 201 | String p1 = json.getString(phone1); | 210 | String p1 = json.getString(phone1); |
| 202 | - if(p1 != null){ | ||
| 203 | - Mobile mobile2=new Mobile(); | ||
| 204 | - mobile2.setMobile(p1); | ||
| 205 | - mobileList.add(mobile2); | ||
| 206 | - } | 211 | + if (p1 != null) { |
| 212 | + Mobile mobile2 = new Mobile(); | ||
| 213 | + mobile2.setMobile(p1); | ||
| 214 | + mobileList.add(mobile2); | ||
| 215 | + } | ||
| 207 | } | 216 | } |
| 208 | - | ||
| 209 | - | 217 | + |
| 210 | break; | 218 | break; |
| 211 | } | 219 | } |
| 212 | } | 220 | } |
| 213 | - | ||
| 214 | - if(mobileList.size() > 0){ | ||
| 215 | - | ||
| 216 | - String smsString = ""; | ||
| 217 | - if(lost == 1){ | ||
| 218 | - smsString = "失信提醒:"+name+"因"+reason+"原因,被纳入失信名单,将影响渣土业务办理,请及时处理。"; | ||
| 219 | - }else{ | ||
| 220 | - smsString = "失信解除提醒:"+name+"现已解除失信,可以进行渣土业务办理,请知悉。"; | ||
| 221 | - } | ||
| 222 | - | ||
| 223 | - JsonSmsSend jsonSmsSend= PostSms.sendSms(mobileList,smsString); | ||
| 224 | - if(jsonSmsSend!=null){ | ||
| 225 | - if(jsonSmsSend.getState()==0){ | ||
| 226 | - System.out.println("发送成功"); | ||
| 227 | - }else{ | ||
| 228 | - System.out.println(jsonSmsSend.getMessage()); | ||
| 229 | - } | ||
| 230 | - }else{ | ||
| 231 | - System.out.println("发送返回空"); | ||
| 232 | - } | 221 | + |
| 222 | + if (mobileList.size() > 0) { | ||
| 223 | + | ||
| 224 | + String smsString = ""; | ||
| 225 | + if (lost == 1) { | ||
| 226 | + smsString = "失信提醒:" + name + "因" + reason + "原因,被纳入失信名单,将影响渣土业务办理,请及时处理。"; | ||
| 227 | + } else { | ||
| 228 | + smsString = "失信解除提醒:" + name + "现已解除失信,可以进行渣土业务办理,请知悉。"; | ||
| 229 | + } | ||
| 230 | + | ||
| 231 | + JsonSmsSend jsonSmsSend = PostSms.sendSms(mobileList, smsString); | ||
| 232 | + if (jsonSmsSend != null) { | ||
| 233 | + if (jsonSmsSend.getState() == 0) { | ||
| 234 | + System.out.println("发送成功"); | ||
| 235 | + } else { | ||
| 236 | + System.out.println(jsonSmsSend.getMessage()); | ||
| 237 | + } | ||
| 238 | + } else { | ||
| 239 | + System.out.println("发送返回空"); | ||
| 240 | + } | ||
| 233 | } | 241 | } |
| 234 | - | 242 | + |
| 235 | number = smsMapper.getPhoneNumber(smsType, areaCode); | 243 | number = smsMapper.getPhoneNumber(smsType, areaCode); |
| 236 | - | ||
| 237 | - if(number!=null){ | 244 | + |
| 245 | + if (number != null) { | ||
| 238 | String[] nums = number.split(","); | 246 | String[] nums = number.split(","); |
| 239 | - | ||
| 240 | - for(String string:nums){ | ||
| 241 | - Mobile mobile=new Mobile(); | ||
| 242 | - mobile.setMobile(number); | ||
| 243 | - mobileList.add(mobile); | 247 | + |
| 248 | + for (String string : nums) { | ||
| 249 | + Mobile mobile = new Mobile(); | ||
| 250 | + mobile.setMobile(number); | ||
| 251 | + mobileList.add(mobile); | ||
| 244 | } | 252 | } |
| 245 | 253 | ||
| 246 | } | 254 | } |
| 247 | - | ||
| 248 | - | ||
| 249 | - if(mobileList.size() > 0){ | ||
| 250 | - | ||
| 251 | - String smsString = ""; | ||
| 252 | - if(lost == 1){ | ||
| 253 | - smsString = "失信提醒:"+name+"因"+reason+"原因,被纳入失信名单,将影响渣土业务办理,请加强监管。"; | ||
| 254 | - }else{ | ||
| 255 | - smsString = "失信解除提醒:你辖区内"+name+"现已解除失信,可以进行渣土业务办理,请知悉。"; | ||
| 256 | - } | ||
| 257 | - | ||
| 258 | - JsonSmsSend jsonSmsSend= PostSms.sendSms(mobileList,smsString); | ||
| 259 | - if(jsonSmsSend!=null){ | ||
| 260 | - if(jsonSmsSend.getState()==0){ | ||
| 261 | - System.out.println("发送成功"); | ||
| 262 | - }else{ | ||
| 263 | - System.out.println(jsonSmsSend.getMessage()); | ||
| 264 | - } | ||
| 265 | - }else{ | ||
| 266 | - System.out.println("发送返回空"); | ||
| 267 | - } | 255 | + |
| 256 | + if (mobileList.size() > 0) { | ||
| 257 | + | ||
| 258 | + String smsString = ""; | ||
| 259 | + if (lost == 1) { | ||
| 260 | + smsString = "失信提醒:" + name + "因" + reason + "原因,被纳入失信名单,将影响渣土业务办理,请加强监管。"; | ||
| 261 | + } else { | ||
| 262 | + smsString = "失信解除提醒:你辖区内" + name + "现已解除失信,可以进行渣土业务办理,请知悉。"; | ||
| 263 | + } | ||
| 264 | + | ||
| 265 | + JsonSmsSend jsonSmsSend = PostSms.sendSms(mobileList, smsString); | ||
| 266 | + if (jsonSmsSend != null) { | ||
| 267 | + if (jsonSmsSend.getState() == 0) { | ||
| 268 | + System.out.println("发送成功"); | ||
| 269 | + } else { | ||
| 270 | + System.out.println(jsonSmsSend.getMessage()); | ||
| 271 | + } | ||
| 272 | + } else { | ||
| 273 | + System.out.println("发送返回空"); | ||
| 274 | + } | ||
| 268 | } | 275 | } |
| 269 | - | 276 | + |
| 270 | } | 277 | } |
| 271 | - | 278 | + |
| 272 | /** | 279 | /** |
| 273 | - * 修改三查机制 | ||
| 274 | - * | ||
| 275 | - * @param constructionCredit 三查机制 | ||
| 276 | - * @return 结果 | ||
| 277 | - */ | ||
| 278 | - @Override | ||
| 279 | - @Transactional | ||
| 280 | - public int updateConstructionCredit(ConstructionCredit constructionCredit) | ||
| 281 | - { | ||
| 282 | - | ||
| 283 | - ConstructionCredit cc = constructionCreditMapper.selectConstructionCreditById(constructionCredit.getId()); | ||
| 284 | - | ||
| 285 | - cc.setStatus(1L); | ||
| 286 | - | ||
| 287 | - try { | ||
| 288 | - constructionCreditMapper.updateConstructionCredit(cc); | ||
| 289 | - | ||
| 290 | - cc.setTime(new Date()); | ||
| 291 | - cc.setReason(constructionCredit.getReason()); | ||
| 292 | - cc.setLostCredit(0L); | ||
| 293 | - | ||
| 294 | - return insertConstructionCredit(cc); | ||
| 295 | - | 280 | + * 修改三查机制 |
| 281 | + * | ||
| 282 | + * @param constructionCredit | ||
| 283 | + * 三查机制 | ||
| 284 | + * @return 结果 | ||
| 285 | + */ | ||
| 286 | + @Override | ||
| 287 | + @Transactional | ||
| 288 | + public int updateConstructionCredit(ConstructionCredit constructionCredit) { | ||
| 289 | + | ||
| 290 | + ConstructionCredit cc = constructionCreditMapper.selectConstructionCreditById(constructionCredit.getId()); | ||
| 291 | + | ||
| 292 | + cc.setStatus(1L); | ||
| 293 | + | ||
| 294 | + try { | ||
| 295 | + constructionCreditMapper.updateConstructionCredit(cc); | ||
| 296 | + | ||
| 297 | + cc.setTime(new Date()); | ||
| 298 | + cc.setReason(constructionCredit.getReason()); | ||
| 299 | + cc.setLostCredit(0L); | ||
| 300 | + | ||
| 301 | + return insertConstructionCredit(cc); | ||
| 302 | + | ||
| 296 | } catch (Exception e) { | 303 | } catch (Exception e) { |
| 297 | - | 304 | + |
| 298 | } | 305 | } |
| 299 | - | ||
| 300 | - return 0; | ||
| 301 | - } | ||
| 302 | - | ||
| 303 | - /** | ||
| 304 | - * 批量删除三查机制 | ||
| 305 | - * | ||
| 306 | - * @param ids 需要删除的三查机制ID | ||
| 307 | - * @return 结果 | ||
| 308 | - */ | ||
| 309 | - @Override | ||
| 310 | - public int deleteConstructionCreditByIds(Long[] ids) | ||
| 311 | - { | ||
| 312 | - return constructionCreditMapper.deleteConstructionCreditByIds(ids); | ||
| 313 | - } | ||
| 314 | - | ||
| 315 | - /** | ||
| 316 | - * 删除三查机制信息 | ||
| 317 | - * | ||
| 318 | - * @param id 三查机制ID | ||
| 319 | - * @return 结果 | ||
| 320 | - */ | ||
| 321 | - @Override | ||
| 322 | - public int deleteConstructionCreditById(Long id) | ||
| 323 | - { | ||
| 324 | - return constructionCreditMapper.deleteConstructionCreditById(id); | ||
| 325 | - } | ||
| 326 | - | ||
| 327 | - | ||
| 328 | - | ||
| 329 | - public List<String> getNames(ConstructionCredit constructionCredit){ | ||
| 330 | - return constructionCreditMapper.getNames(constructionCredit); | 306 | + |
| 307 | + return 0; | ||
| 308 | + } | ||
| 309 | + | ||
| 310 | + /** | ||
| 311 | + * 批量删除三查机制 | ||
| 312 | + * | ||
| 313 | + * @param ids | ||
| 314 | + * 需要删除的三查机制ID | ||
| 315 | + * @return 结果 | ||
| 316 | + */ | ||
| 317 | + @Override | ||
| 318 | + public int deleteConstructionCreditByIds(Long[] ids) { | ||
| 319 | + return constructionCreditMapper.deleteConstructionCreditByIds(ids); | ||
| 320 | + } | ||
| 321 | + | ||
| 322 | + /** | ||
| 323 | + * 删除三查机制信息 | ||
| 324 | + * | ||
| 325 | + * @param id | ||
| 326 | + * 三查机制ID | ||
| 327 | + * @return 结果 | ||
| 328 | + */ | ||
| 329 | + @Override | ||
| 330 | + public int deleteConstructionCreditById(Long id) { | ||
| 331 | + return constructionCreditMapper.deleteConstructionCreditById(id); | ||
| 332 | + } | ||
| 333 | + | ||
| 334 | + public List<String> getNames(ConstructionCredit constructionCredit) { | ||
| 335 | + return constructionCreditMapper.getNames(constructionCredit); | ||
| 331 | } | 336 | } |
| 332 | 337 | ||
| 333 | - public List<String> getTypes(ConstructionCredit constructionCredit){ | ||
| 334 | - return constructionCreditMapper.getTypes(constructionCredit); | 338 | + public List<String> getTypes(ConstructionCredit constructionCredit) { |
| 339 | + return constructionCreditMapper.getTypes(constructionCredit); | ||
| 335 | } | 340 | } |
| 336 | 341 | ||
| 337 | - public List<String> getPlaces(ConstructionCredit constructionCredit){ | ||
| 338 | - return constructionCreditMapper.getPlaces(constructionCredit); | 342 | + public List<String> getPlaces(ConstructionCredit constructionCredit) { |
| 343 | + return constructionCreditMapper.getPlaces(constructionCredit); | ||
| 339 | } | 344 | } |
| 340 | } | 345 | } |
trash-workFlow/src/main/java/com/trash/business/service/impl/EarthsitesCreditServiceImpl.java
| @@ -28,219 +28,216 @@ import com.trash.common.utils.SecurityUtils; | @@ -28,219 +28,216 @@ import com.trash.common.utils.SecurityUtils; | ||
| 28 | * @date 2023-04-26 | 28 | * @date 2023-04-26 |
| 29 | */ | 29 | */ |
| 30 | @Service | 30 | @Service |
| 31 | -public class EarthsitesCreditServiceImpl implements IEarthsitesCreditService | ||
| 32 | -{ | ||
| 33 | - @Autowired | ||
| 34 | - private EarthsitesCreditMapper earthsitesCreditMapper; | ||
| 35 | - | ||
| 36 | - | ||
| 37 | - @Autowired | ||
| 38 | - private IConstructionCreditService smsServer; | ||
| 39 | - | ||
| 40 | - @Autowired | ||
| 41 | - SmsMapper smsMapper; | ||
| 42 | - | ||
| 43 | - @Autowired | ||
| 44 | - RedisCache redis; | ||
| 45 | - /** | ||
| 46 | - * 查询处理场所失信 | ||
| 47 | - * | ||
| 48 | - * @param id 处理场所失信ID | ||
| 49 | - * @return 处理场所失信 | ||
| 50 | - */ | ||
| 51 | - @Override | ||
| 52 | - public EarthsitesCredit selectEarthsitesCreditById(Long id) | ||
| 53 | - { | ||
| 54 | - return earthsitesCreditMapper.selectEarthsitesCreditById(id); | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - /** | ||
| 58 | - * 查询处理场所失信列表 | ||
| 59 | - * | ||
| 60 | - * @param earthsitesCredit 处理场所失信 | ||
| 61 | - * @return 处理场所失信 | ||
| 62 | - */ | ||
| 63 | - @Override | ||
| 64 | - public List<EarthsitesCredit> selectEarthsitesCreditList(EarthsitesCredit earthsitesCredit) | ||
| 65 | - { | ||
| 66 | - List<EarthsitesCredit> list = new ArrayList<>(); | ||
| 67 | - | ||
| 68 | - List<String> eLish = SecurityUtils.getLoginUser().getUser().getEarthList(); | ||
| 69 | - List<String> eArea = SecurityUtils.getLoginUser().getUser().getEarthAreas(); | ||
| 70 | - | ||
| 71 | - if (eLish.size() > 0 || eArea.size() > 0) { | ||
| 72 | - List<String> ids = new ArrayList<>(); | ||
| 73 | - for(String str:eLish){ | ||
| 74 | - ids.add(str); | ||
| 75 | - } | ||
| 76 | - | ||
| 77 | - | ||
| 78 | - if(eArea.size() > 0){ | ||
| 79 | - | ||
| 80 | - JSONArray jsonArray = redis.getCacheObject("earthSitesList"); | ||
| 81 | - | ||
| 82 | - for(Object obj:jsonArray){ | ||
| 83 | - JSONObject json = (JSONObject) obj; | ||
| 84 | - if(eArea.indexOf(json.getString("areaCode")) > -1){ | ||
| 85 | - ids.add(json.getString("id")); | ||
| 86 | - } | 31 | +public class EarthsitesCreditServiceImpl implements IEarthsitesCreditService { |
| 32 | + @Autowired | ||
| 33 | + private EarthsitesCreditMapper earthsitesCreditMapper; | ||
| 34 | + | ||
| 35 | + @Autowired | ||
| 36 | + private IConstructionCreditService smsServer; | ||
| 37 | + | ||
| 38 | + @Autowired | ||
| 39 | + SmsMapper smsMapper; | ||
| 40 | + | ||
| 41 | + @Autowired | ||
| 42 | + RedisCache redis; | ||
| 43 | + | ||
| 44 | + /** | ||
| 45 | + * 查询处理场所失信 | ||
| 46 | + * | ||
| 47 | + * @param id | ||
| 48 | + * 处理场所失信ID | ||
| 49 | + * @return 处理场所失信 | ||
| 50 | + */ | ||
| 51 | + @Override | ||
| 52 | + public EarthsitesCredit selectEarthsitesCreditById(Long id) { | ||
| 53 | + return earthsitesCreditMapper.selectEarthsitesCreditById(id); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 查询处理场所失信列表 | ||
| 58 | + * | ||
| 59 | + * @param earthsitesCredit | ||
| 60 | + * 处理场所失信 | ||
| 61 | + * @return 处理场所失信 | ||
| 62 | + */ | ||
| 63 | + @Override | ||
| 64 | + public List<EarthsitesCredit> selectEarthsitesCreditList(EarthsitesCredit earthsitesCredit) { | ||
| 65 | + List<EarthsitesCredit> list = new ArrayList<>(); | ||
| 66 | + | ||
| 67 | + List<String> eLish = SecurityUtils.getLoginUser().getUser().getEarthList(); | ||
| 68 | + List<String> eArea = SecurityUtils.getLoginUser().getUser().getEarthAreas(); | ||
| 69 | + | ||
| 70 | + if (eLish.size() > 0 || eArea.size() > 0) { | ||
| 71 | + List<String> ids = new ArrayList<>(); | ||
| 72 | + for (String str : eLish) { | ||
| 73 | + ids.add(str); | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + if (eArea.size() > 0) { | ||
| 77 | + | ||
| 78 | + JSONArray jsonArray = redis.getCacheObject("earthSitesList"); | ||
| 79 | + | ||
| 80 | + for (Object obj : jsonArray) { | ||
| 81 | + JSONObject json = (JSONObject) obj; | ||
| 82 | + if (eArea.indexOf(json.getString("areaCode")) > -1) { | ||
| 83 | + ids.add(json.getString("id")); | ||
| 87 | } | 84 | } |
| 88 | } | 85 | } |
| 89 | - | ||
| 90 | - earthsitesCredit.setIds(ids); | ||
| 91 | - | ||
| 92 | - | ||
| 93 | - list = earthsitesCreditMapper.selectEarthsitesCreditList(earthsitesCredit); | ||
| 94 | } | 86 | } |
| 95 | 87 | ||
| 96 | - | ||
| 97 | - return list; | ||
| 98 | - } | ||
| 99 | - | ||
| 100 | - /** | ||
| 101 | - * 新增处理场所失信 | ||
| 102 | - * | ||
| 103 | - * @param earthsitesCredit 处理场所失信 | ||
| 104 | - * @return 结果 | ||
| 105 | - */ | ||
| 106 | - @Override | ||
| 107 | - public int insertEarthsitesCredit(EarthsitesCredit earthsitesCredit) | ||
| 108 | - { | ||
| 109 | - | ||
| 110 | - List<Map> map = new ArrayList<Map>(); | ||
| 111 | - | ||
| 112 | - EarthsitesCredit cc = new EarthsitesCredit(); | ||
| 113 | - | ||
| 114 | - cc.setStatus(0L); | ||
| 115 | - cc.setLostCredit(earthsitesCredit.getLostCredit()); | ||
| 116 | - cc.setObjectId(earthsitesCredit.getObjectId()); | ||
| 117 | - | ||
| 118 | - List old = earthsitesCreditMapper.selectEarthsitesCreditList(cc); | ||
| 119 | - | ||
| 120 | - int i = 0; | ||
| 121 | - | ||
| 122 | - if(old.size() > 0){ | ||
| 123 | - i = 1; | ||
| 124 | - }else{ | ||
| 125 | - | ||
| 126 | - i = earthsitesCreditMapper.insertEarthsitesCredit(earthsitesCredit); | ||
| 127 | - | ||
| 128 | - | ||
| 129 | - Map param = new HashMap(); | ||
| 130 | - param.put("objectId", earthsitesCredit.getObjectId()); | ||
| 131 | - param.put("creditStatus", earthsitesCredit.getLostCredit()); | ||
| 132 | - map.add(param); | ||
| 133 | - | ||
| 134 | - RemoteServerUtils.updateEarthSitesCreditAndStatus(map); | ||
| 135 | - | ||
| 136 | - JSONArray array = redis.getCacheObject("earthSitesList"); | ||
| 137 | - | ||
| 138 | - smsServer.sendCreditSMS(earthsitesCredit.getObjectId() , earthsitesCredit.getName(),earthsitesCredit.getReason(), | ||
| 139 | - earthsitesCredit.getLostCredit(),array,"credit",smsMapper,"principalPhoneNo",null);; | ||
| 140 | - } | ||
| 141 | - return i; | ||
| 142 | - } | ||
| 143 | - | ||
| 144 | - /** | ||
| 145 | - * 修改处理场所失信 | ||
| 146 | - * | ||
| 147 | - * @param earthsitesCredit 处理场所失信 | ||
| 148 | - * @return 结果 | ||
| 149 | - */ | ||
| 150 | - @Override | ||
| 151 | - public int updateEarthsitesCredit(EarthsitesCredit earthsitesCredit) | ||
| 152 | - { | ||
| 153 | - | ||
| 154 | - EarthsitesCredit cc = earthsitesCreditMapper.selectEarthsitesCreditById(earthsitesCredit.getId()); | ||
| 155 | - | ||
| 156 | - cc.setStatus(1L); | ||
| 157 | - | ||
| 158 | - try { | ||
| 159 | - earthsitesCreditMapper.updateEarthsitesCredit(cc); | ||
| 160 | - | ||
| 161 | - cc.setReason(earthsitesCredit.getReason()); | ||
| 162 | - cc.setTime(new Date()); | ||
| 163 | - cc.setLostCredit(0L); | ||
| 164 | - | ||
| 165 | - return insertEarthsitesCredit(cc); | ||
| 166 | - | ||
| 167 | - } catch (Exception e) { | ||
| 168 | - | ||
| 169 | - } | ||
| 170 | - | ||
| 171 | - return 0; | ||
| 172 | - } | ||
| 173 | - | ||
| 174 | - /** | ||
| 175 | - * 批量删除处理场所失信 | ||
| 176 | - * | ||
| 177 | - * @param ids 需要删除的处理场所失信ID | ||
| 178 | - * @return 结果 | ||
| 179 | - */ | ||
| 180 | - @Override | ||
| 181 | - public int deleteEarthsitesCreditByIds(Long[] ids) | ||
| 182 | - { | ||
| 183 | - return earthsitesCreditMapper.deleteEarthsitesCreditByIds(ids); | ||
| 184 | - } | ||
| 185 | - | ||
| 186 | - /** | ||
| 187 | - * 删除处理场所失信信息 | ||
| 188 | - * | ||
| 189 | - * @param id 处理场所失信ID | ||
| 190 | - * @return 结果 | ||
| 191 | - */ | ||
| 192 | - @Override | ||
| 193 | - public int deleteEarthsitesCreditById(Long id) | ||
| 194 | - { | ||
| 195 | - return earthsitesCreditMapper.deleteEarthsitesCreditById(id); | ||
| 196 | - } | ||
| 197 | - | ||
| 198 | - | ||
| 199 | - public List<String> getNames(EarthsitesCredit earthsitesCredit) { | ||
| 200 | - return earthsitesCreditMapper.getNames(earthsitesCredit); | ||
| 201 | - } | ||
| 202 | - | ||
| 203 | - | ||
| 204 | - public List<String> getTypes(EarthsitesCredit earthsitesCredit){ | ||
| 205 | - return earthsitesCreditMapper.getTypes(earthsitesCredit); | 88 | + earthsitesCredit.setIds(ids); |
| 89 | + | ||
| 90 | + list = earthsitesCreditMapper.selectEarthsitesCreditList(earthsitesCredit); | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + return list; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + /** | ||
| 97 | + * 新增处理场所失信 | ||
| 98 | + * | ||
| 99 | + * @param earthsitesCredit | ||
| 100 | + * 处理场所失信 | ||
| 101 | + * @return 结果 | ||
| 102 | + */ | ||
| 103 | + @Override | ||
| 104 | + public int insertEarthsitesCredit(EarthsitesCredit earthsitesCredit) { | ||
| 105 | + | ||
| 106 | + List<Map> map = new ArrayList<Map>(); | ||
| 107 | + | ||
| 108 | + EarthsitesCredit cc = new EarthsitesCredit(); | ||
| 109 | + | ||
| 110 | + cc.setStatus(0L); | ||
| 111 | + cc.setLostCredit(earthsitesCredit.getLostCredit()); | ||
| 112 | + cc.setObjectId(earthsitesCredit.getObjectId()); | ||
| 113 | + | ||
| 114 | + List old = earthsitesCreditMapper.selectEarthsitesCreditList(cc); | ||
| 115 | + | ||
| 116 | + int i = 0; | ||
| 117 | + | ||
| 118 | + if (old.size() > 0) { | ||
| 119 | + i = 1; | ||
| 120 | + } else { | ||
| 121 | + | ||
| 122 | + i = earthsitesCreditMapper.insertEarthsitesCredit(earthsitesCredit); | ||
| 123 | + | ||
| 124 | + Map param = new HashMap(); | ||
| 125 | + param.put("objectId", earthsitesCredit.getObjectId()); | ||
| 126 | + param.put("creditStatus", earthsitesCredit.getLostCredit()); | ||
| 127 | + map.add(param); | ||
| 128 | + | ||
| 129 | + RemoteServerUtils.updateEarthSitesCreditAndStatus(map); | ||
| 130 | + try { | ||
| 131 | + | ||
| 132 | + JSONArray array = redis.getCacheObject("earthSitesList"); | ||
| 133 | + | ||
| 134 | + smsServer.sendCreditSMS(earthsitesCredit.getObjectId(), earthsitesCredit.getName(), | ||
| 135 | + earthsitesCredit.getReason(), earthsitesCredit.getLostCredit(), array, "credit", smsMapper, | ||
| 136 | + "principalPhoneNo", null); | ||
| 137 | + ; | ||
| 138 | + } catch (Exception e) { | ||
| 139 | + e.printStackTrace(); | ||
| 140 | + } | ||
| 141 | + } | ||
| 142 | + return i; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + /** | ||
| 146 | + * 修改处理场所失信 | ||
| 147 | + * | ||
| 148 | + * @param earthsitesCredit | ||
| 149 | + * 处理场所失信 | ||
| 150 | + * @return 结果 | ||
| 151 | + */ | ||
| 152 | + @Override | ||
| 153 | + public int updateEarthsitesCredit(EarthsitesCredit earthsitesCredit) { | ||
| 154 | + | ||
| 155 | + EarthsitesCredit cc = earthsitesCreditMapper.selectEarthsitesCreditById(earthsitesCredit.getId()); | ||
| 156 | + | ||
| 157 | + cc.setStatus(1L); | ||
| 158 | + | ||
| 159 | + try { | ||
| 160 | + earthsitesCreditMapper.updateEarthsitesCredit(cc); | ||
| 161 | + | ||
| 162 | + cc.setReason(earthsitesCredit.getReason()); | ||
| 163 | + cc.setTime(new Date()); | ||
| 164 | + cc.setLostCredit(0L); | ||
| 165 | + | ||
| 166 | + return insertEarthsitesCredit(cc); | ||
| 167 | + | ||
| 168 | + } catch (Exception e) { | ||
| 169 | + | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + return 0; | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + /** | ||
| 176 | + * 批量删除处理场所失信 | ||
| 177 | + * | ||
| 178 | + * @param ids | ||
| 179 | + * 需要删除的处理场所失信ID | ||
| 180 | + * @return 结果 | ||
| 181 | + */ | ||
| 182 | + @Override | ||
| 183 | + public int deleteEarthsitesCreditByIds(Long[] ids) { | ||
| 184 | + return earthsitesCreditMapper.deleteEarthsitesCreditByIds(ids); | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + /** | ||
| 188 | + * 删除处理场所失信信息 | ||
| 189 | + * | ||
| 190 | + * @param id | ||
| 191 | + * 处理场所失信ID | ||
| 192 | + * @return 结果 | ||
| 193 | + */ | ||
| 194 | + @Override | ||
| 195 | + public int deleteEarthsitesCreditById(Long id) { | ||
| 196 | + return earthsitesCreditMapper.deleteEarthsitesCreditById(id); | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + public List<String> getNames(EarthsitesCredit earthsitesCredit) { | ||
| 200 | + return earthsitesCreditMapper.getNames(earthsitesCredit); | ||
| 201 | + } | ||
| 202 | + | ||
| 203 | + public List<String> getTypes(EarthsitesCredit earthsitesCredit) { | ||
| 204 | + return earthsitesCreditMapper.getTypes(earthsitesCredit); | ||
| 206 | } | 205 | } |
| 207 | 206 | ||
| 208 | - public List<String> getPlaces(EarthsitesCredit earthsitesCredit){ | ||
| 209 | - return earthsitesCreditMapper.getPlaces(earthsitesCredit); | 207 | + public List<String> getPlaces(EarthsitesCredit earthsitesCredit) { |
| 208 | + return earthsitesCreditMapper.getPlaces(earthsitesCredit); | ||
| 210 | } | 209 | } |
| 211 | 210 | ||
| 212 | - @Override | ||
| 213 | - public List<EarthsitesCredit> selectEarthsitesCreditHistory(EarthsitesCredit earthsitesCredit) { | ||
| 214 | - List<EarthsitesCredit> list = new ArrayList<>(); | ||
| 215 | - | ||
| 216 | - List<String> eLish = SecurityUtils.getLoginUser().getUser().getEarthList(); | ||
| 217 | - List<String> eArea = SecurityUtils.getLoginUser().getUser().getEarthAreas(); | ||
| 218 | - | ||
| 219 | - if (eLish.size() > 0 || eArea.size() > 0) { | ||
| 220 | - List<String> ids = new ArrayList<>(); | ||
| 221 | - for(String str:eLish){ | ||
| 222 | - ids.add(str); | ||
| 223 | - } | ||
| 224 | - | ||
| 225 | - | ||
| 226 | - if(eArea.size() > 0){ | ||
| 227 | - | ||
| 228 | - JSONArray jsonArray = redis.getCacheObject("earthSitesList"); | ||
| 229 | - | ||
| 230 | - for(Object obj:jsonArray){ | ||
| 231 | - JSONObject json = (JSONObject) obj; | ||
| 232 | - if(eArea.indexOf(json.getString("areaCode")) > -1){ | ||
| 233 | - ids.add(json.getString("id")); | ||
| 234 | - } | ||
| 235 | - } | ||
| 236 | - } | ||
| 237 | - | ||
| 238 | - earthsitesCredit.setIds(ids); | ||
| 239 | - | ||
| 240 | - | ||
| 241 | - list = earthsitesCreditMapper.selectEarthsitesCreditHistory(earthsitesCredit); | ||
| 242 | - } | ||
| 243 | - | ||
| 244 | - return list; | ||
| 245 | - } | 211 | + @Override |
| 212 | + public List<EarthsitesCredit> selectEarthsitesCreditHistory(EarthsitesCredit earthsitesCredit) { | ||
| 213 | + List<EarthsitesCredit> list = new ArrayList<>(); | ||
| 214 | + | ||
| 215 | + List<String> eLish = SecurityUtils.getLoginUser().getUser().getEarthList(); | ||
| 216 | + List<String> eArea = SecurityUtils.getLoginUser().getUser().getEarthAreas(); | ||
| 217 | + | ||
| 218 | + if (eLish.size() > 0 || eArea.size() > 0) { | ||
| 219 | + List<String> ids = new ArrayList<>(); | ||
| 220 | + for (String str : eLish) { | ||
| 221 | + ids.add(str); | ||
| 222 | + } | ||
| 223 | + | ||
| 224 | + if (eArea.size() > 0) { | ||
| 225 | + | ||
| 226 | + JSONArray jsonArray = redis.getCacheObject("earthSitesList"); | ||
| 227 | + | ||
| 228 | + for (Object obj : jsonArray) { | ||
| 229 | + JSONObject json = (JSONObject) obj; | ||
| 230 | + if (eArea.indexOf(json.getString("areaCode")) > -1) { | ||
| 231 | + ids.add(json.getString("id")); | ||
| 232 | + } | ||
| 233 | + } | ||
| 234 | + } | ||
| 235 | + | ||
| 236 | + earthsitesCredit.setIds(ids); | ||
| 237 | + | ||
| 238 | + list = earthsitesCreditMapper.selectEarthsitesCreditHistory(earthsitesCredit); | ||
| 239 | + } | ||
| 240 | + | ||
| 241 | + return list; | ||
| 242 | + } | ||
| 246 | } | 243 | } |
| 247 | \ No newline at end of file | 244 | \ No newline at end of file |
trash-workFlow/src/main/java/com/trash/business/service/impl/TruckActivateServiceImpl.java
| @@ -132,6 +132,27 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | @@ -132,6 +132,27 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | ||
| 132 | for (TruckActivate ta : list) { | 132 | for (TruckActivate ta : list) { |
| 133 | if (ta.getAddress() == null) { | 133 | if (ta.getAddress() == null) { |
| 134 | JSONObject construction = RemoteServerUtils.getConstructionLicenseById(ta.getConstructionId()); | 134 | JSONObject construction = RemoteServerUtils.getConstructionLicenseById(ta.getConstructionId()); |
| 135 | + | ||
| 136 | + String routeName = ""; | ||
| 137 | + String earthName = ""; | ||
| 138 | + JSONArray eList = construction.getJSONArray("earthList"); | ||
| 139 | + | ||
| 140 | + | ||
| 141 | + if(eList != null && eList.size() > 0){ | ||
| 142 | + for(Object obj:eList){ | ||
| 143 | + JSONObject earth = (JSONObject) obj; | ||
| 144 | + if(earth.getString("earthSiteName") != null){ | ||
| 145 | + earthName += earth.getString("earthSiteName") + ","; | ||
| 146 | + } | ||
| 147 | + if(earth.getString("routeName") != null){ | ||
| 148 | + routeName += earth.getString("routeName") + ","; | ||
| 149 | + } | ||
| 150 | + } | ||
| 151 | + if(earthName.length() > 0) | ||
| 152 | + earthName = earthName.substring(0,earthName.length()-1); | ||
| 153 | + if(routeName.length() > 0) | ||
| 154 | + routeName = routeName.substring(0,routeName.length()-1); | ||
| 155 | + } | ||
| 135 | 156 | ||
| 136 | ta.setAddress(construction.getString("address")); | 157 | ta.setAddress(construction.getString("address")); |
| 137 | ta.setEffectiveFrom(construction.getString("effectiveFrom")); | 158 | ta.setEffectiveFrom(construction.getString("effectiveFrom")); |
| @@ -139,8 +160,8 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | @@ -139,8 +160,8 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | ||
| 139 | 160 | ||
| 140 | ta.setTransportStartTime(construction.getString("transportStartTime")); | 161 | ta.setTransportStartTime(construction.getString("transportStartTime")); |
| 141 | ta.setTransportEndTime(construction.getString("transportEndTime")); | 162 | ta.setTransportEndTime(construction.getString("transportEndTime")); |
| 142 | - ta.setRouteName(construction.getString("routeName")); | ||
| 143 | - ta.setEarthName(construction.getString("earthName")); | 163 | + ta.setRouteName(routeName); |
| 164 | + ta.setEarthName(earthName); | ||
| 144 | ta.setRouteInfo(construction.getString("routeInfo")); | 165 | ta.setRouteInfo(construction.getString("routeInfo")); |
| 145 | ta.setEarthList(construction.getString("earthList")); | 166 | ta.setEarthList(construction.getString("earthList")); |
| 146 | ta.setCoord(construction.getString("coord")); | 167 | ta.setCoord(construction.getString("coord")); |
| @@ -193,6 +214,29 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | @@ -193,6 +214,29 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | ||
| 193 | List<TruckActivate> oldDatas = truckActivateMapper.selectTodayTruckByObjIds(objs); | 214 | List<TruckActivate> oldDatas = truckActivateMapper.selectTodayTruckByObjIds(objs); |
| 194 | 215 | ||
| 195 | JSONObject construction = RemoteServerUtils.getConstructionLicenseById(truckActivate.getConstructionId()); | 216 | JSONObject construction = RemoteServerUtils.getConstructionLicenseById(truckActivate.getConstructionId()); |
| 217 | + | ||
| 218 | + String routeName = ""; | ||
| 219 | + String earthName = ""; | ||
| 220 | + JSONArray eList = construction.getJSONArray("earthList"); | ||
| 221 | + | ||
| 222 | + | ||
| 223 | + if(eList != null && eList.size() > 0){ | ||
| 224 | + for(Object obj:eList){ | ||
| 225 | + JSONObject earth = (JSONObject) obj; | ||
| 226 | + if(earth.getString("earthSiteName") != null){ | ||
| 227 | + earthName += earth.getString("earthSiteName") + ","; | ||
| 228 | + } | ||
| 229 | + if(earth.getString("routeName") != null){ | ||
| 230 | + routeName += earth.getString("routeName") + ","; | ||
| 231 | + } | ||
| 232 | + } | ||
| 233 | + | ||
| 234 | + if(earthName.length() > 0) | ||
| 235 | + earthName = earthName.substring(0,earthName.length()-1); | ||
| 236 | + | ||
| 237 | + if(routeName.length() > 0) | ||
| 238 | + routeName = routeName.substring(0,routeName.length()-1); | ||
| 239 | + } | ||
| 196 | 240 | ||
| 197 | for (int i = 0; i < objs.length; i++) { | 241 | for (int i = 0; i < objs.length; i++) { |
| 198 | 242 | ||
| @@ -211,8 +255,9 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | @@ -211,8 +255,9 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | ||
| 211 | 255 | ||
| 212 | active.setTransportStartTime(construction.getString("transportStartTime")); | 256 | active.setTransportStartTime(construction.getString("transportStartTime")); |
| 213 | active.setTransportEndTime(construction.getString("transportEndTime")); | 257 | active.setTransportEndTime(construction.getString("transportEndTime")); |
| 214 | - active.setRouteName(construction.getString("routeName")); | ||
| 215 | - active.setEarthName(construction.getString("earthName")); | 258 | + |
| 259 | + active.setRouteName(routeName); | ||
| 260 | + active.setEarthName(earthName); | ||
| 216 | active.setRouteInfo(construction.getString("routeInfo")); | 261 | active.setRouteInfo(construction.getString("routeInfo")); |
| 217 | active.setEarthList(construction.getString("earthList")); | 262 | active.setEarthList(construction.getString("earthList")); |
| 218 | active.setCoord(construction.getString("coord")); | 263 | active.setCoord(construction.getString("coord")); |
trash-workFlow/src/main/java/com/trash/caseOffline/domain/CaseOffline.java
| @@ -95,12 +95,32 @@ public class CaseOffline extends BaseEntity { | @@ -95,12 +95,32 @@ public class CaseOffline extends BaseEntity { | ||
| 95 | 95 | ||
| 96 | private List<String> names; | 96 | private List<String> names; |
| 97 | 97 | ||
| 98 | + private List<String> tNames; | ||
| 99 | + | ||
| 100 | + private List<String> companyArea; | ||
| 101 | + | ||
| 98 | private List<String> cArea; | 102 | private List<String> cArea; |
| 99 | 103 | ||
| 100 | private List<String> eArea; | 104 | private List<String> eArea; |
| 101 | 105 | ||
| 102 | 106 | ||
| 103 | 107 | ||
| 108 | + public List<String> getCompanyArea() { | ||
| 109 | + return companyArea; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + public void setCompanyArea(List<String> companyArea) { | ||
| 113 | + this.companyArea = companyArea; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public List<String> gettNames() { | ||
| 117 | + return tNames; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public void settNames(List<String> tNames) { | ||
| 121 | + this.tNames = tNames; | ||
| 122 | + } | ||
| 123 | + | ||
| 104 | public String getStatus1() { | 124 | public String getStatus1() { |
| 105 | return status1; | 125 | return status1; |
| 106 | } | 126 | } |
trash-workFlow/src/main/java/com/trash/caseOffline/service/impl/CaseOfflineServiceImpl.java
| @@ -83,24 +83,14 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService | @@ -83,24 +83,14 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService | ||
| 83 | 83 | ||
| 84 | List<CaseOffline> list = new ArrayList<>(); | 84 | List<CaseOffline> list = new ArrayList<>(); |
| 85 | 85 | ||
| 86 | - List<String> names = new ArrayList<>(); | ||
| 87 | - | ||
| 88 | - List<String> cLish = SecurityUtils.getLoginUser().getUser().getConList(); | ||
| 89 | List<String> cArea = SecurityUtils.getLoginUser().getUser().getConAreas(); | 86 | List<String> cArea = SecurityUtils.getLoginUser().getUser().getConAreas(); |
| 90 | - List<String> eLish = SecurityUtils.getLoginUser().getUser().getEarthList(); | ||
| 91 | List<String> eArea = SecurityUtils.getLoginUser().getUser().getEarthAreas(); | 87 | List<String> eArea = SecurityUtils.getLoginUser().getUser().getEarthAreas(); |
| 88 | + List<String> companyArea = SecurityUtils.getLoginUser().getUser().getCompanyAreas(); | ||
| 92 | 89 | ||
| 93 | JSONArray earthList = redisCache.getCacheObject("earthSitesList"); | 90 | JSONArray earthList = redisCache.getCacheObject("earthSitesList"); |
| 94 | JSONArray construList = redisCache.getCacheObject("constructionList"); | 91 | JSONArray construList = redisCache.getCacheObject("constructionList"); |
| 95 | - | ||
| 96 | - | ||
| 97 | - if(earthList == null){ | ||
| 98 | - earthList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("earthSitesList")); | ||
| 99 | - } | 92 | + JSONArray companyList = redisCache.getCacheObject("companyList"); |
| 100 | 93 | ||
| 101 | - if(construList == null){ | ||
| 102 | - construList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("constructionList")); | ||
| 103 | - } | ||
| 104 | 94 | ||
| 105 | if(caseOffline.status1 != null){ | 95 | if(caseOffline.status1 != null){ |
| 106 | if(caseOffline.status1.equals("0")){ | 96 | if(caseOffline.status1.equals("0")){ |
| @@ -114,36 +104,14 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService | @@ -114,36 +104,14 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService | ||
| 114 | } | 104 | } |
| 115 | } | 105 | } |
| 116 | 106 | ||
| 117 | - if(cArea.size() > 0){ | ||
| 118 | - caseOffline.setcArea(cArea); | ||
| 119 | - }else{ | ||
| 120 | - | ||
| 121 | - for(Object obj:construList){ | ||
| 122 | - JSONObject jsonObject = (JSONObject) obj; | ||
| 123 | - if(cLish.indexOf(jsonObject.getString("id")) > -1){ | ||
| 124 | - names.add(jsonObject.getString("name")); | ||
| 125 | - } | ||
| 126 | - } | ||
| 127 | - | ||
| 128 | - } | ||
| 129 | - if(eArea.size() > 0){ | ||
| 130 | - caseOffline.seteArea(eArea); | ||
| 131 | - }else{ | ||
| 132 | - for(Object obj:earthList){ | ||
| 133 | - JSONObject jsonObject = (JSONObject) obj; | ||
| 134 | - if(eLish.indexOf(jsonObject.getString("id")) > -1){ | ||
| 135 | - names.add(jsonObject.getString("name")); | ||
| 136 | - } | ||
| 137 | - } | ||
| 138 | - } | 107 | + companyArea.add("x"); |
| 108 | + cArea.add("x"); | ||
| 109 | + eArea.add("x"); | ||
| 139 | 110 | ||
| 111 | + caseOffline.setCompanyArea(companyArea); | ||
| 112 | + caseOffline.setcArea(cArea); | ||
| 113 | + caseOffline.seteArea(eArea); | ||
| 140 | 114 | ||
| 141 | - if(names.size() == 0 && cArea.size() == 0 && eArea.size() == 0){ | ||
| 142 | - return list; | ||
| 143 | - }else{ | ||
| 144 | - caseOffline.setNames(names); | ||
| 145 | - } | ||
| 146 | - | ||
| 147 | 115 | ||
| 148 | return caseOfflineMapper.selectCaseOfflineList(caseOffline); | 116 | return caseOfflineMapper.selectCaseOfflineList(caseOffline); |
| 149 | } | 117 | } |
| @@ -204,6 +172,7 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService | @@ -204,6 +172,7 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService | ||
| 204 | credit.setObjectId(caseOffline.getObjectId()); | 172 | credit.setObjectId(caseOffline.getObjectId()); |
| 205 | credit.setLostCredit(1L); | 173 | credit.setLostCredit(1L); |
| 206 | credit.setName(caseOffline.getSiteName()); | 174 | credit.setName(caseOffline.getSiteName()); |
| 175 | + credit.setCreateBy(SecurityUtils.getUsername()); | ||
| 207 | 176 | ||
| 208 | for(SysDictData d:caseType){ | 177 | for(SysDictData d:caseType){ |
| 209 | if(caseOffline.getType().equals(d.getDictValue())){ | 178 | if(caseOffline.getType().equals(d.getDictValue())){ |
| @@ -215,6 +184,7 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService | @@ -215,6 +184,7 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService | ||
| 215 | credit.setPlace(placeName); | 184 | credit.setPlace(placeName); |
| 216 | credit.setType(object.getString("cargoIdName")); | 185 | credit.setType(object.getString("cargoIdName")); |
| 217 | credit.setTime(new Date()); | 186 | credit.setTime(new Date()); |
| 187 | + credit.setCreateBy(SecurityUtils.getUsername()); | ||
| 218 | constructionCredit.insertConstructionCredit(credit); | 188 | constructionCredit.insertConstructionCredit(credit); |
| 219 | }else if(caseOffline.getSiteType() == 1){ | 189 | }else if(caseOffline.getSiteType() == 1){ |
| 220 | EarthsitesCredit credit = new EarthsitesCredit(); | 190 | EarthsitesCredit credit = new EarthsitesCredit(); |
| @@ -222,6 +192,7 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService | @@ -222,6 +192,7 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService | ||
| 222 | credit.setObjectId(caseOffline.getObjectId()); | 192 | credit.setObjectId(caseOffline.getObjectId()); |
| 223 | credit.setLostCredit(1L); | 193 | credit.setLostCredit(1L); |
| 224 | credit.setName(caseOffline.getSiteName()); | 194 | credit.setName(caseOffline.getSiteName()); |
| 195 | + credit.setCreateBy(SecurityUtils.getUsername()); | ||
| 225 | for(SysDictData d:caseType){ | 196 | for(SysDictData d:caseType){ |
| 226 | if(caseOffline.getType().equals(d.getDictValue())){ | 197 | if(caseOffline.getType().equals(d.getDictValue())){ |
| 227 | credit.setReason(d.getDictLabel()); | 198 | credit.setReason(d.getDictLabel()); |
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationWarningInformationServiceImpl.java
| @@ -119,6 +119,7 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | @@ -119,6 +119,7 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | ||
| 119 | List<String> eLish = SecurityUtils.getLoginUser().getUser().getEarthList(); | 119 | List<String> eLish = SecurityUtils.getLoginUser().getUser().getEarthList(); |
| 120 | List<String> eArea = SecurityUtils.getLoginUser().getUser().getEarthAreas(); | 120 | List<String> eArea = SecurityUtils.getLoginUser().getUser().getEarthAreas(); |
| 121 | 121 | ||
| 122 | + | ||
| 122 | JSONArray earthList = redisCache.getCacheObject("earthSitesList"); | 123 | JSONArray earthList = redisCache.getCacheObject("earthSitesList"); |
| 123 | JSONArray construList = redisCache.getCacheObject("constructionList"); | 124 | JSONArray construList = redisCache.getCacheObject("constructionList"); |
| 124 | JSONArray companyList = redisCache.getCacheObject("companyList"); | 125 | JSONArray companyList = redisCache.getCacheObject("companyList"); |
trash-workFlow/src/main/resources/mapper/caseOffline/CaseOfflineMapper.xml
| @@ -54,25 +54,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -54,25 +54,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 54 | <foreach item="name" collection="eArea" open="(" separator="," close=")"> | 54 | <foreach item="name" collection="eArea" open="(" separator="," close=")"> |
| 55 | #{name} | 55 | #{name} |
| 56 | </foreach> | 56 | </foreach> |
| 57 | - and site_type = 1 | ||
| 58 | - ) | 57 | + and site_type = 1) |
| 58 | + or (place in | ||
| 59 | + <foreach item="name" collection="companyArea" open="(" separator="," close=")"> | ||
| 60 | + #{name} | ||
| 61 | + </foreach> | ||
| 62 | + and site_type = 2) | ||
| 59 | ) | 63 | ) |
| 60 | </if> | 64 | </if> |
| 61 | - <if test="cArea != null and cArea.size() > 0 and (eArea == null or eArea.size() == 0)"> | ||
| 62 | - and place in | ||
| 63 | - <foreach item="name" collection="cArea" open="(" separator="," close=")"> | ||
| 64 | - #{name} | ||
| 65 | - </foreach> | ||
| 66 | - and site_type = 0 | ||
| 67 | - | ||
| 68 | - </if> | ||
| 69 | - <if test="eArea != null and eArea.size() > 0 and (cArea == null or cArea.size() == 0)"> | ||
| 70 | - and place in | ||
| 71 | - <foreach item="name" collection="cArea" open="(" separator="," close=")"> | ||
| 72 | - #{name} | ||
| 73 | - </foreach> | ||
| 74 | - and site_type = 1 | ||
| 75 | - </if> | ||
| 76 | <if test="createTime != null "> and create_time > #{createTime}</if> | 65 | <if test="createTime != null "> and create_time > #{createTime}</if> |
| 77 | 66 | ||
| 78 | </where> | 67 | </where> |