Commit 871cd1bf2fec5bd6bf7deaede61e7a76810aa87f
Merge remote-tracking branch 'origin/dev' into dev
Showing
20 changed files
with
182 additions
and
86 deletions
trash-admin/src/main/resources/application.yml
trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java
| ... | ... | @@ -126,7 +126,11 @@ public class DriverTask |
| 126 | 126 | List<SupervisionThreestep> cs = SpringUtils.getBean(SupervisionThreestepMapper.class).selectTodayDataList(param); |
| 127 | 127 | |
| 128 | 128 | for(SupervisionThreestep c:cs){ |
| 129 | - SpringUtils.getBean(ISupervisionThreestepService.class).checkDataToActiveTruck(c,TOKEN); | |
| 129 | + try { | |
| 130 | + SpringUtils.getBean(ISupervisionThreestepService.class).checkDataToActiveTruck(c,TOKEN); | |
| 131 | + } catch (Exception e) { | |
| 132 | + // TODO: handle exception | |
| 133 | + } | |
| 130 | 134 | } |
| 131 | 135 | |
| 132 | 136 | } | ... | ... |
trash-ui/src/api/construction_credit.js
| ... | ... | @@ -18,8 +18,13 @@ import { |
| 18 | 18 | updateConstructionsites |
| 19 | 19 | } from "@/api/dict"; |
| 20 | 20 | |
| 21 | +import h5Page from '@/views/h5/Pagination'; | |
| 22 | + | |
| 21 | 23 | export default { |
| 22 | - name: "ConstructionCredit", | |
| 24 | + name: "ConstructionCredit", | |
| 25 | + components: { | |
| 26 | + h5Page | |
| 27 | + }, | |
| 23 | 28 | data() { |
| 24 | 29 | return { |
| 25 | 30 | // 遮罩层 |
| ... | ... | @@ -288,4 +293,4 @@ import { |
| 288 | 293 | }) |
| 289 | 294 | } |
| 290 | 295 | } |
| 291 | - }; | |
| 292 | 296 | \ No newline at end of file |
| 297 | + }; | ... | ... |
trash-ui/src/api/dayWorkReport.js
| 1 | + | |
| 2 | +import h5Page from '@/views/h5/Pagination'; | |
| 3 | + | |
| 4 | + | |
| 1 | 5 | import { |
| 2 | 6 | dayWorkList, |
| 3 | 7 | exportDayWorkList, |
| ... | ... | @@ -21,6 +25,9 @@ import { |
| 21 | 25 | |
| 22 | 26 | export default { |
| 23 | 27 | name: "dayWorkReport", |
| 28 | + components: { | |
| 29 | + h5Page | |
| 30 | + }, | |
| 24 | 31 | data() { |
| 25 | 32 | return { |
| 26 | 33 | // 遮罩层 |
| ... | ... | @@ -96,7 +103,7 @@ export default { |
| 96 | 103 | }, |
| 97 | 104 | created() { |
| 98 | 105 | this.getList(0); |
| 99 | - | |
| 106 | + | |
| 100 | 107 | getArea().then(res=>{ |
| 101 | 108 | this.areas = res.result; |
| 102 | 109 | }); |
| ... | ... | @@ -180,7 +187,8 @@ export default { |
| 180 | 187 | if (this.queryParams.his == 1) { |
| 181 | 188 | exportDayWorkHistoryList(data).then(res => { |
| 182 | 189 | |
| 183 | - this.loading = false; | |
| 190 | + this.loading.close(); | |
| 191 | + | |
| 184 | 192 | |
| 185 | 193 | this.queryParams.page = page; |
| 186 | 194 | this.queryParams.pageSize = size; |
| ... | ... | @@ -191,7 +199,8 @@ export default { |
| 191 | 199 | } else { |
| 192 | 200 | exportDayWorkList(data).then(res => { |
| 193 | 201 | |
| 194 | - this.loading = false; | |
| 202 | + this.loading.close(); | |
| 203 | + | |
| 195 | 204 | debugger; |
| 196 | 205 | console.log(page); |
| 197 | 206 | this.queryParams.page = page; |
| ... | ... | @@ -211,35 +220,29 @@ export default { |
| 211 | 220 | /** 查询开工报表列表 */ |
| 212 | 221 | getList(tabIdx) { |
| 213 | 222 | |
| 214 | - this.loading = true; | |
| 215 | - | |
| 223 | + this.loading = this.$loading({ | |
| 224 | + lock: true, | |
| 225 | + text: 'Loading', | |
| 226 | + spinner: 'el-icon-loading', | |
| 227 | + background: 'rgba(255, 255, 255, 0.7)' | |
| 228 | + }); | |
| 216 | 229 | // let query = this.queryParams; |
| 217 | 230 | |
| 218 | 231 | if (tabIdx == 1) { |
| 232 | + this.queryParams.pageNum = 1; | |
| 219 | 233 | this.resetQuery(); |
| 220 | 234 | this.queryParams.his = tabIdx; |
| 221 | 235 | } else if (tabIdx == 0) { |
| 236 | + this.queryParams.pageNum = 1; | |
| 222 | 237 | this.resetQuery(); |
| 223 | 238 | this.queryParams.his = tabIdx; |
| 224 | 239 | } |
| 225 | 240 | |
| 226 | 241 | dayWorkList(this.queryParams).then(response => { |
| 242 | + this.threestepList = response.rows; | |
| 227 | 243 | |
| 228 | - this.threestepList = response.rows; | |
| 229 | - | |
| 230 | - | |
| 231 | - for (let i = 0; i < this.threestepList.length; i++) { | |
| 232 | - if (this.outside.indexOf(this.threestepList[i].place) > -1) { | |
| 233 | - if (this.threestepList[i].status == "开工") { | |
| 234 | - this.threestepList[i].estatus = "开工"; | |
| 235 | - this.threestepList[i].eselfCheckTime = this.threestepList[i].selfCheckTime; | |
| 236 | - this.threestepList[i].descript = "开工"; | |
| 237 | - } | |
| 238 | - } | |
| 239 | - | |
| 240 | - } | |
| 244 | + this.loading.close(); | |
| 241 | 245 | |
| 242 | - this.loading = false; | |
| 243 | 246 | this.dayWorkCount = response.msg; |
| 244 | 247 | this.total = response.total; |
| 245 | 248 | }); |
| ... | ... | @@ -299,9 +302,7 @@ export default { |
| 299 | 302 | this.queryParams.earthsitesName = null; |
| 300 | 303 | this.queryParams.name = null; |
| 301 | 304 | |
| 302 | - | |
| 303 | 305 | this.resetForm("queryForm"); |
| 304 | - this.handleQuery(); | |
| 305 | 306 | }, |
| 306 | 307 | // 多选框选中数据 |
| 307 | 308 | handleSelectionChange(selection) { | ... | ... |
trash-ui/src/api/driver_credit.js
| ... | ... | @@ -8,7 +8,7 @@ import { |
| 8 | 8 | getNames, |
| 9 | 9 | historyCredit |
| 10 | 10 | } from "@/api/business/driver"; |
| 11 | - | |
| 11 | +import h5Page from '@/views/h5/Pagination'; | |
| 12 | 12 | import { |
| 13 | 13 | companyList, |
| 14 | 14 | driverList |
| ... | ... | @@ -16,6 +16,9 @@ import { |
| 16 | 16 | |
| 17 | 17 | export default { |
| 18 | 18 | name: "ConstructionCredit", |
| 19 | + components: { | |
| 20 | + h5Page | |
| 21 | + }, | |
| 19 | 22 | data() { |
| 20 | 23 | return { |
| 21 | 24 | // 遮罩层 |
| ... | ... | @@ -233,4 +236,4 @@ export default { |
| 233 | 236 | }) |
| 234 | 237 | } |
| 235 | 238 | } |
| 236 | -}; | |
| 237 | 239 | \ No newline at end of file |
| 240 | +}; | ... | ... |
trash-ui/src/api/earthsites_credit.js
| ... | ... | @@ -16,11 +16,14 @@ import { |
| 16 | 16 | earthsitesList, |
| 17 | 17 | updateEarthsites |
| 18 | 18 | } from "@/api/dict"; |
| 19 | - | |
| 19 | +import h5Page from '@/views/h5/Pagination'; | |
| 20 | 20 | import requestRemote from '@/utils/requestRemote' |
| 21 | 21 | |
| 22 | 22 | export default { |
| 23 | 23 | name: "EarthSitesCredit", |
| 24 | + components: { | |
| 25 | + h5Page | |
| 26 | + }, | |
| 24 | 27 | data() { |
| 25 | 28 | return { |
| 26 | 29 | // 遮罩层 |
| ... | ... | @@ -256,4 +259,4 @@ export default { |
| 256 | 259 | }) |
| 257 | 260 | } |
| 258 | 261 | } |
| 259 | -}; | |
| 260 | 262 | \ No newline at end of file |
| 263 | +}; | ... | ... |
trash-ui/src/api/three_step.js
| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 | import threestepInfo from "@/views/business/threestep/threestepInfo"; |
| 14 | 14 | |
| 15 | 15 | import h5Info from "@/views/h5/task/threestepInfo"; |
| 16 | + import h5Page from '@/views/h5/Pagination'; | |
| 16 | 17 | |
| 17 | 18 | import { |
| 18 | 19 | Upload |
| ... | ... | @@ -37,7 +38,9 @@ |
| 37 | 38 | name: "Threestep", |
| 38 | 39 | components: { |
| 39 | 40 | threestepInfo, |
| 40 | - h5Info | |
| 41 | + h5Info, | |
| 42 | + | |
| 43 | + h5Page | |
| 41 | 44 | }, |
| 42 | 45 | data() { |
| 43 | 46 | return { |
| ... | ... | @@ -189,6 +192,12 @@ |
| 189 | 192 | }; |
| 190 | 193 | }, |
| 191 | 194 | created() { |
| 195 | + if(window.location.search){ | |
| 196 | + let arr = window.location.search.split("&"); | |
| 197 | + this.queryParams.pageStatus = arr[0].split("=")[1]; | |
| 198 | + } | |
| 199 | + | |
| 200 | + | |
| 192 | 201 | getArea().then(res => { |
| 193 | 202 | this.areas = res.result; |
| 194 | 203 | for(let i =0;i< this.threestepList.length;i++){ |
| ... | ... | @@ -196,7 +205,7 @@ |
| 196 | 205 | } |
| 197 | 206 | }); |
| 198 | 207 | |
| 199 | - this.getList(0); | |
| 208 | + this.getList(this.queryParams.pageStatus); | |
| 200 | 209 | |
| 201 | 210 | }, |
| 202 | 211 | methods: { |
| ... | ... | @@ -339,7 +348,6 @@ |
| 339 | 348 | |
| 340 | 349 | getConstructionTruck(item.id).then(res=>{ |
| 341 | 350 | for(let i in res.result){ |
| 342 | - debugger; | |
| 343 | 351 | this.companyList.push({id:res.result[i].companyId , name: res.result[i].companyName}); |
| 344 | 352 | for(let j in res.result[i].vehicleList){ |
| 345 | 353 | this.truckList.push({id:res.result[i].vehicleList[j].id,licenseplateNo:res.result[i].vehicleList[j].licenseplateNo,companyName:res.result[i].companyName}); |
| ... | ... | @@ -660,7 +668,6 @@ |
| 660 | 668 | }, |
| 661 | 669 | /** 修改按钮操作 */ |
| 662 | 670 | handleUpdate(row,idx) { |
| 663 | - debugger; | |
| 664 | 671 | this.reset(); |
| 665 | 672 | this.businessKey = row.id +""; |
| 666 | 673 | if(idx == 0){ | ... | ... |
trash-ui/src/api/truck_credit.js
trash-ui/src/layout/index3.vue renamed to trash-ui/src/layout/inde3x.vue
trash-ui/src/views/activiti/task/constructsiteInfo.vue
| ... | ... | @@ -129,21 +129,16 @@ |
| 129 | 129 | <el-col :span="6" class="bd_right bd_padding">消纳场地</el-col> |
| 130 | 130 | <el-col :span="18" class="bd_padding">{{infoData.earthSiteNames}}</el-col> |
| 131 | 131 | </el-row> |
| 132 | - <el-row > | |
| 132 | + <el-row class="bd_bottom"> | |
| 133 | 133 | <el-col :span="6" class="bd_right bd_padding">行驶路线</el-col> |
| 134 | 134 | <el-col :span="18" class="bd_padding">{{infoData.routeNames}}</el-col> |
| 135 | 135 | </el-row> |
| 136 | - </el-col> | |
| 137 | - </el-row> | |
| 138 | - | |
| 139 | - | |
| 140 | - <el-row class="bd_left bd_right bd_bottom" v-if="signData && signData.sign1"> | |
| 141 | - <el-col :span="1" class="bd_padding bd_right" >部门意见</el-col> | |
| 142 | - <el-col :span="23" > | |
| 143 | - <el-row class="bd_padding">{{signData.sign1Text}}</el-row> | |
| 144 | - <el-row > | |
| 145 | - <label style="float: right;">勘察人:<img :src="signData.sign1" width="100px" height="40px" v-if="signData.sign1"/></label> | |
| 146 | - </el-row> | |
| 136 | + <el-col :span="24" > | |
| 137 | + <el-row class="bd_padding">{{infoData.applyOpinion}}</el-row> | |
| 138 | + <el-row class="bd_padding"> | |
| 139 | + <label style="float: right;">勘察人:{{infoData.surveyor}}</label> | |
| 140 | + </el-row> | |
| 141 | + </el-col> | |
| 147 | 142 | </el-col> |
| 148 | 143 | </el-row> |
| 149 | 144 | ... | ... |
trash-ui/src/views/activiti/task/index.vue
| ... | ... | @@ -198,8 +198,7 @@ |
| 198 | 198 | <el-dialog :title="title" :visible.sync="construct" width="800px" append-to-body> |
| 199 | 199 | <constructsiteInfo :businessKey="businessKey" :signData="signData" v-if="construct"/> |
| 200 | 200 | <el-row> |
| 201 | - | |
| 202 | - <el-input v-model="signDataInfo" type="textarea" :rows="4" style="margin-top: 10px;"></el-input> | |
| 201 | + <el-input v-model="signDataInfo" type="textarea" :rows="4" style="margin-top: 10px;" ></el-input> | |
| 203 | 202 | </el-row> |
| 204 | 203 | <div slot="footer" class="dialog-footer"> |
| 205 | 204 | <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button> | ... | ... |
trash-ui/src/views/business/DriverCredit/index.vue
trash-ui/src/views/business/dayWorkReport/index.vue
| ... | ... | @@ -69,7 +69,7 @@ |
| 69 | 69 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| 70 | 70 | </el-row> |
| 71 | 71 | |
| 72 | - <el-table v-loading="loading" :data="threestepList" @selection-change="handleSelectionChange"> | |
| 72 | + <el-table :data="threestepList" @selection-change="handleSelectionChange"> | |
| 73 | 73 | <el-table-column label="序号" align="center" type="index" /> |
| 74 | 74 | <el-table-column label="日期" align="center" prop="createTime" /> |
| 75 | 75 | <el-table-column label="工地名称" align="center" prop="name" /> | ... | ... |
trash-ui/src/views/business/threestep/threestepInfo.vue
| ... | ... | @@ -455,7 +455,6 @@ |
| 455 | 455 | window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path); |
| 456 | 456 | }, |
| 457 | 457 | getInfo() { |
| 458 | - debugger; | |
| 459 | 458 | let id; |
| 460 | 459 | if(this.businessKey.split(":").length == 2){ |
| 461 | 460 | id = this.businessKey.split(":")[1]; | ... | ... |
trash-ui/src/views/h5/DriverCredit/index.vue
trash-ui/src/views/h5/dayWorkReport/index.vue
| 1 | 1 | <template> |
| 2 | - <div class="app-container"> | |
| 2 | + <div class="app-container" > | |
| 3 | 3 | <el-row :gutter="10" class="mb8"> |
| 4 | 4 | <el-col :span="1.5"> |
| 5 | 5 | <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.pageStatus==0}" size="mini" |
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | |
| 29 | 29 | <el-form-item label="消纳场区属" prop="subReason"> |
| 30 | 30 | <el-select v-model="queryParams.subReason" placeholder="工地所属区域 " size="small"> |
| 31 | - <el-option v-for="item in areas" :label="item.name" :value="item.code" /> | |
| 31 | + <el-option v-for="item in areas" :label="item.name" :value="item.name" /> | |
| 32 | 32 | </el-select> |
| 33 | 33 | </el-form-item> |
| 34 | 34 | <el-form-item label="开始时间" prop="workStartTime" v-if="this.queryParams.his==1"> |
| ... | ... | @@ -108,6 +108,9 @@ |
| 108 | 108 | .el-select-dropdown__item{ |
| 109 | 109 | width:300px; |
| 110 | 110 | } |
| 111 | + .card_title{ | |
| 112 | + word-break: break-all; | |
| 113 | + } | |
| 111 | 114 | </style> |
| 112 | 115 | |
| 113 | 116 | <script src="../../../api/dayWorkReport.js" /> | ... | ... |
trash-ui/src/views/h5/task/constructsiteInfo.vue
| ... | ... | @@ -132,17 +132,13 @@ |
| 132 | 132 | <el-col :span="6" class="bd_right bd_padding">行驶路线</el-col> |
| 133 | 133 | <el-col :span="18" class="bd_padding">{{infoData.routeNames}}</el-col> |
| 134 | 134 | </el-row> |
| 135 | - </el-col> | |
| 136 | - </el-row> | |
| 137 | - | |
| 138 | - | |
| 139 | - <el-row class="bd_left bd_right bd_bottom" v-if="signData.sign1"> | |
| 140 | - <el-col :span="2" class="bd_padding bd_right" >部门意见</el-col> | |
| 141 | - <el-col :span="22" > | |
| 142 | - <el-row class="bd_padding">{{signData.sign1Text}}</el-row> | |
| 143 | - <el-row > | |
| 144 | - <label style="float: right;">勘察人:<img :src="signData.sign1" width="100px" height="40px" v-if="signData.sign1"/></label> | |
| 145 | - </el-row> | |
| 135 | + <el-col :span="24" > | |
| 136 | + <el-row class="bd_padding">{{infoData.applyOpinion}}</el-row> | |
| 137 | + <el-row class="bd_padding"> | |
| 138 | + <label style="float: right;">勘察人:{{infoData.surveyor}}</label> | |
| 139 | + </el-row> | |
| 140 | + </el-col> | |
| 141 | + </el-col> | |
| 146 | 142 | </el-col> |
| 147 | 143 | </el-row> |
| 148 | 144 | ... | ... |
trash-ui/src/views/h5/threestep/index.vue
| ... | ... | @@ -71,7 +71,7 @@ |
| 71 | 71 | |
| 72 | 72 | </el-card> |
| 73 | 73 | |
| 74 | - <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 74 | + <h5Page v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 75 | 75 | @pagination="getList" /> |
| 76 | 76 | |
| 77 | 77 | <el-dialog :title="title" :visible.sync="open" width="330px" append-to-body v-loading="loading"> |
| ... | ... | @@ -273,7 +273,7 @@ |
| 273 | 273 | |
| 274 | 274 | <el-dialog title="查看详情" width="400px" append-to-body :visible.sync="info2" > |
| 275 | 275 | <h5Info :businessKey="businessKey" v-if="info2"/> |
| 276 | - | |
| 276 | + | |
| 277 | 277 | </el-dialog> |
| 278 | 278 | |
| 279 | 279 | <el-dialog title="附件" :visible.sync="uploadImageDialog" append-to-body :beforeClose="handleClose" width="330px"> |
| ... | ... | @@ -296,8 +296,6 @@ |
| 296 | 296 | |
| 297 | 297 | <script> |
| 298 | 298 | |
| 299 | -import pagination from '../Pagination'; | |
| 300 | - | |
| 301 | 299 | </script> |
| 302 | 300 | |
| 303 | 301 | <script src="../../../api/three_step.js" /> |
| ... | ... | @@ -305,4 +303,8 @@ import pagination from '../Pagination'; |
| 305 | 303 | .el-select-dropdown__item{ |
| 306 | 304 | width:300px; |
| 307 | 305 | } |
| 308 | -</style> | |
| 309 | 306 | \ No newline at end of file |
| 307 | + | |
| 308 | + .card_title{ | |
| 309 | + word-break: break-all; | |
| 310 | + } | |
| 311 | +</style> | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionThreestepServiceImpl.java
| ... | ... | @@ -178,6 +178,9 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 178 | 178 | |
| 179 | 179 | SimpleDateFormat dateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| 180 | 180 | |
| 181 | + | |
| 182 | + String[] outside = {"长沙县", "望城区", "浏阳市", "宁乡市", "株洲市", "湘潭市", "汩罗市", "湘阴县"}; | |
| 183 | + | |
| 181 | 184 | @SuppressWarnings("unchecked") |
| 182 | 185 | @Override |
| 183 | 186 | public List<Map<String,String>> selectDayWorkList(SupervisionThreestep supervisionThreestep) { |
| ... | ... | @@ -207,21 +210,22 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 207 | 210 | // TODO Auto-generated catch block |
| 208 | 211 | e.printStackTrace(); |
| 209 | 212 | } |
| 210 | - } | |
| 211 | - if(supervisionThreestep.getHis().equals("1")){ | |
| 212 | - try { | |
| 213 | - supervisionThreestep.setWorkStartTime(dateTime.parse("2000-01-01 00:00:00")); | |
| 214 | - supervisionThreestep.setWorkEndTime(dateTime.parse("2100-01-01 00:00:00")); | |
| 215 | - } catch (ParseException e) { | |
| 216 | - // TODO Auto-generated catch block | |
| 217 | - e.printStackTrace(); | |
| 213 | + if(supervisionThreestep.getHis().equals("1")){ | |
| 214 | + try { | |
| 215 | + supervisionThreestep.setWorkStartTime(dateTime.parse("2000-01-01 00:00:00")); | |
| 216 | + supervisionThreestep.setWorkEndTime(dateTime.parse("2100-01-01 00:00:00")); | |
| 217 | + } catch (ParseException e) { | |
| 218 | + // TODO Auto-generated catch block | |
| 219 | + e.printStackTrace(); | |
| 220 | + } | |
| 218 | 221 | } |
| 219 | 222 | } |
| 220 | 223 | |
| 221 | - | |
| 222 | 224 | |
| 223 | 225 | List<SupervisionThreestep> allList = supervisionThreestepMapper.selectDayWorkList(supervisionThreestep); |
| 226 | + | |
| 224 | 227 | |
| 228 | + long start = new Date().getTime(); | |
| 225 | 229 | |
| 226 | 230 | List<SupervisionThreestep> constructions = new ArrayList<>(); |
| 227 | 231 | List<SupervisionThreestep> earthsites = new ArrayList<>(); |
| ... | ... | @@ -232,7 +236,6 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 232 | 236 | if(yearFomat.format(s.getSelfCheckTime()).equals(yearFomat.format(new Date()))){ |
| 233 | 237 | continue; |
| 234 | 238 | } |
| 235 | - | |
| 236 | 239 | } |
| 237 | 240 | |
| 238 | 241 | if(s.getType() == 0){ |
| ... | ... | @@ -313,6 +316,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 313 | 316 | } |
| 314 | 317 | list.add(map); |
| 315 | 318 | } |
| 319 | + | |
| 316 | 320 | |
| 317 | 321 | List newList = new ArrayList<>(); |
| 318 | 322 | |
| ... | ... | @@ -334,6 +338,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 334 | 338 | continue; |
| 335 | 339 | |
| 336 | 340 | JSONObject con = RemoteServerUtils.getConstructionInfo(e.getEarthsitesId()); |
| 341 | + | |
| 337 | 342 | |
| 338 | 343 | map.put("id", e.getId() + ""); |
| 339 | 344 | map.put("createTime", yearFomat.format(e.getCreateTime())); |
| ... | ... | @@ -357,6 +362,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 357 | 362 | list.addAll(newList); |
| 358 | 363 | } |
| 359 | 364 | |
| 365 | + | |
| 360 | 366 | |
| 361 | 367 | List FilterList = new ArrayList<>(); |
| 362 | 368 | |
| ... | ... | @@ -400,7 +406,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 400 | 406 | FilterList.add(map); |
| 401 | 407 | |
| 402 | 408 | } |
| 403 | - | |
| 409 | + | |
| 404 | 410 | return FilterList; |
| 405 | 411 | } |
| 406 | 412 | |
| ... | ... | @@ -582,6 +588,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 582 | 588 | * @return 结果 |
| 583 | 589 | */ |
| 584 | 590 | @Override |
| 591 | + @Transactional | |
| 585 | 592 | public int updateSupervisionThreestep(SupervisionThreestep supervisionThreestep) { |
| 586 | 593 | return supervisionThreestepMapper.updateSupervisionThreestep(supervisionThreestep); |
| 587 | 594 | } |
| ... | ... | @@ -591,15 +598,63 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 591 | 598 | @Override |
| 592 | 599 | public int activeSupervisionThreestep(SupervisionThreestep supervisionThreestep) { |
| 593 | 600 | |
| 594 | - int i = supervisionThreestepMapper.updateSupervisionThreestep(supervisionThreestep); | |
| 601 | + int j = supervisionThreestepMapper.updateSupervisionThreestep(supervisionThreestep); | |
| 595 | 602 | |
| 596 | - | |
| 597 | 603 | supervisionThreestep = supervisionThreestepMapper.selectSupervisionThreestepById(supervisionThreestep.getId()); |
| 598 | 604 | |
| 605 | + | |
| 606 | + JSONArray areas = RemoteServerUtils.getAreas(); | |
| 607 | + | |
| 608 | + for(int i =0;i< outside.length;i++){ | |
| 609 | + | |
| 610 | + for(Object object:areas){ | |
| 611 | + | |
| 612 | + JSONObject area = (JSONObject)object; | |
| 613 | + | |
| 614 | + if(outside[i].equals(area.getString("name"))){ | |
| 615 | + outside[i] = area.getString("code"); | |
| 616 | + } | |
| 617 | + | |
| 618 | + } | |
| 619 | + | |
| 620 | + } | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + if(supervisionThreestep.getStatus() == 1 && supervisionThreestep.getType() == 0){ | |
| 625 | + for(String out:outside){ | |
| 626 | + if(out.equals(supervisionThreestep.getPlace())){ | |
| 627 | + | |
| 628 | + | |
| 629 | + supervisionThreestep.setId(null); | |
| 630 | + String name = supervisionThreestep.getName(); | |
| 631 | + String objId = supervisionThreestep.getObjectId(); | |
| 632 | + String eName = supervisionThreestep.getEarthsitesName(); | |
| 633 | + String eId = supervisionThreestep.getEarthsitesId(); | |
| 634 | + supervisionThreestep.setCompanys(null); | |
| 635 | + supervisionThreestep.setCompanyTrucks(null); | |
| 636 | + supervisionThreestep.setType(1L); | |
| 637 | + | |
| 638 | + supervisionThreestep.setEarthsitesId(objId); | |
| 639 | + supervisionThreestep.setEarthsitesName(name); | |
| 640 | + supervisionThreestep.setName(eName); | |
| 641 | + supervisionThreestep.setObjectId(eId); | |
| 642 | + supervisionThreestep.setCheckTime(new Date()); | |
| 643 | + | |
| 644 | + supervisionThreestepMapper.insertSupervisionThreestep(supervisionThreestep); | |
| 645 | + | |
| 646 | + return j; | |
| 647 | + } | |
| 648 | + } | |
| 649 | + | |
| 650 | + | |
| 651 | + } | |
| 652 | + | |
| 653 | + | |
| 599 | 654 | // if(supervisionThreestep.getType() == 0 && supervisionThreestep.getStatus() == 1) |
| 600 | 655 | // checkDataToActiveTruck(supervisionThreestep,null); |
| 601 | 656 | |
| 602 | - return i; | |
| 657 | + return j; | |
| 603 | 658 | } |
| 604 | 659 | |
| 605 | 660 | @Override |
| ... | ... | @@ -607,12 +662,33 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 607 | 662 | |
| 608 | 663 | String trucks = construct.getCompanyTrucks(); |
| 609 | 664 | |
| 610 | - if(trucks != null){ | |
| 611 | 665 | |
| 612 | - String[] truckArray = trucks.split(","); | |
| 666 | + String[] truckArray = trucks.split(","); | |
| 667 | + | |
| 668 | + String unActiveTruck = ""; | |
| 669 | + | |
| 670 | + for(String truckId:truckArray){ | |
| 671 | + | |
| 672 | + TruckActivate truckActivate = new TruckActivate(); | |
| 673 | + truckActivate.setObjectId(truckId); //设置ID | |
| 674 | + truckActivate.setCreateTime(construct.getCheckTime()); | |
| 675 | + | |
| 676 | + List<TruckActivate> taList = truckActivateService.selectTruckActivateList(truckActivate); | |
| 677 | + | |
| 678 | + if(taList.size() == 0 || taList.get(0).getActivateTime() == null){ | |
| 679 | + unActiveTruck += truckId + ","; | |
| 680 | + } | |
| 681 | + } | |
| 682 | + | |
| 683 | + | |
| 684 | + if(!unActiveTruck.isEmpty()){ | |
| 685 | + | |
| 686 | + unActiveTruck = unActiveTruck.substring(0,unActiveTruck.length()-1); | |
| 613 | 687 | |
| 614 | 688 | Map<String,Object> params = new HashedMap<>(); |
| 615 | 689 | |
| 690 | + truckArray = unActiveTruck.split(","); | |
| 691 | + | |
| 616 | 692 | params.put("vehicleIds", truckArray); |
| 617 | 693 | params.put("page", 1); |
| 618 | 694 | params.put("size", 9999); |
| ... | ... | @@ -657,10 +733,6 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 657 | 733 | truckActivate.setActivateTime(new Date()); |
| 658 | 734 | } |
| 659 | 735 | |
| 660 | - | |
| 661 | - System.out.println(truckObject.getString("licenseplateNo") + " " + truckObject.getInteger("vehicleStatus")); | |
| 662 | - | |
| 663 | - | |
| 664 | 736 | if(taList.size() > 0){ |
| 665 | 737 | truckActivate.setId(taList.get(0).getId()); |
| 666 | 738 | truckActivateMapper.updateTruckActivate(truckActivate); | ... | ... |
trash-workFlow/src/main/resources/mapper/TruckActivateMapper.xml
| ... | ... | @@ -38,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 38 | 38 | <if test="activateDate != null "> and activate_time like concat('%',#{activateDate},'%')</if> |
| 39 | 39 | <if test="activateStatus == 0 "> and activate_time is null</if> |
| 40 | 40 | <if test="activateStatus == 1 "> and activate_time is not null</if> |
| 41 | + <if test="createTime != null "> and DATE_FORMAT(create_time,("%y%m%d")) = DATE_FORMAT(#{createTime},("%y%m%d"))</if> | |
| 41 | 42 | </where> |
| 42 | 43 | </select> |
| 43 | 44 | ... | ... |