Commit ab433b9dbd4f7956a80beca6a88f28f250d64926

Authored by youxiw2000
1 parent 688c46d1

m

trash-admin/src/main/resources/application-dev.yml
@@ -16,9 +16,10 @@ trash: @@ -16,9 +16,10 @@ trash:
16 # 验证码类型 math 数组计算 char 字符验证 16 # 验证码类型 math 数组计算 char 字符验证
17 captchaType: math 17 captchaType: math
18 # 远程服务器地址 18 # 远程服务器地址
19 - remotePath: http://183.66.242.6:6001  
20 - #remotePath: http://183.66.242.6:14601 19 + #remotePath: http://183.66.242.6:6001
  20 + remotePath: http://183.66.242.6:14601
21 token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0MzI3NzQ1ODkyfQ.4BrpgD9i_1TwjLRGqa3wo4Ikx8t8Gcl3FzHfjL_uolPnNMm2rd7fCvrUoBBN4Qp4cMGzg9h2Nt4NNx8PYThTaQ 21 token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0MzI3NzQ1ODkyfQ.4BrpgD9i_1TwjLRGqa3wo4Ikx8t8Gcl3FzHfjL_uolPnNMm2rd7fCvrUoBBN4Qp4cMGzg9h2Nt4NNx8PYThTaQ
  22 +
22 # 数据源配置 23 # 数据源配置
23 spring: 24 spring:
24 datasource: 25 datasource:
trash-admin/src/main/resources/logback.xml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <configuration> 2 <configuration>
3 <!-- 日志存放路径 --> 3 <!-- 日志存放路径 -->
4 <!-- <property name="log.path" value="/home/trash/logs" />--> 4 <!-- <property name="log.path" value="/home/trash/logs" />-->
5 - <property name="log.path" value="D:/work/project/logs/trash" /> 5 + <property name="log.path" value="C:/work/project/logs/trash" />
6 <!-- 日志输出格式 --> 6 <!-- 日志输出格式 -->
7 <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" /> 7 <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
8 8
trash-ui/src/views/business/TruckCredit/index.vue
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 <el-row type="flex" justify="center"> 15 <el-row type="flex" justify="center">
16 <el-col> 16 <el-col>
17 <el-form-item label="车牌号码" prop="licensePlate" style="float:right;"> 17 <el-form-item label="车牌号码" prop="licensePlate" style="float:right;">
18 - <el-select v-model="queryParams.licensePlate" filterable reserve-keyword placeholder="车牌号码" 18 + <el-select v-model="queryParams.licensePlate" filterable reserve-keyword placeholder="车牌号码"
19 size="small" :loading="loading"> 19 size="small" :loading="loading">
20 <el-option v-for="item in dictNames" :label="item" :value="item"> 20 <el-option v-for="item in dictNames" :label="item" :value="item">
21 </el-option> 21 </el-option>
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 25
26 <el-col> 26 <el-col>
27 <el-form-item label="运输企业" prop="companyId"> 27 <el-form-item label="运输企业" prop="companyId">
28 - <el-select v-model="queryParams.companyId" filterable reserve-keyword placeholder="运输企业" 28 + <el-select v-model="queryParams.companyId" filterable reserve-keyword placeholder="运输企业"
29 size="small" :loading="loading"> 29 size="small" :loading="loading">
30 <el-option v-for="item in dictCompanys" :label="item" :value="item"> 30 <el-option v-for="item in dictCompanys" :label="item" :value="item">
31 </el-option> 31 </el-option>
@@ -94,13 +94,13 @@ @@ -94,13 +94,13 @@
94 <el-form ref="form" :model="form" :rules="rules" label-width="120px" v-if="open"> 94 <el-form ref="form" :model="form" :rules="rules" label-width="120px" v-if="open">
95 <el-form-item label="运输企业" prop="companyId"> 95 <el-form-item label="运输企业" prop="companyId">
96 <el-select v-model="form.companyId" filterable reserve-keyword placeholder="运输企业"> 96 <el-select v-model="form.companyId" filterable reserve-keyword placeholder="运输企业">
97 - <el-option v-for="item in companyList" @click.native="form.licensePlate=null;" :key="item.name" :label="item.name" :value="item.name" v-if="item.dishonestState==0"> 97 + <el-option v-for="item in companyList" @click.native="form.licensePlate=null;" :key="item.name" :label="item.name" :value="item.name">
98 </el-option> 98 </el-option>
99 </el-select> 99 </el-select>
100 </el-form-item> 100 </el-form-item>
101 <el-form-item label="车牌号码" prop="licensePlate"> 101 <el-form-item label="车牌号码" prop="licensePlate">
102 <el-select v-model="form.licensePlate" filterable reserve-keyword placeholder="车牌号码"> 102 <el-select v-model="form.licensePlate" filterable reserve-keyword placeholder="车牌号码">
103 - <el-option @click.native="getObjId(item)" v-for="item in truckList" :key="item.id" :label="item.licenseplateNo" :value="item.licenseplateNo" v-if="form.companyId==item.companyName && item.creditStatus==0"> 103 + <el-option @click.native="getObjId(item)" v-for="item in truckList" :key="item.id" :label="item.licenseplateNo" :value="item.licenseplateNo" v-if="form.companyId==item.companyName">
104 </el-option> 104 </el-option>
105 </el-select> 105 </el-select>
106 </el-form-item> 106 </el-form-item>
@@ -295,11 +295,11 @@ @@ -295,11 +295,11 @@
295 getData(stauts) { 295 getData(stauts) {
296 this.queryParams.status = 0; 296 this.queryParams.status = 0;
297 this.queryParams.lostCredit = stauts; 297 this.queryParams.lostCredit = stauts;
298 - this.getList(); 298 + this.init();
299 }, 299 },
300 getHistoryData() { 300 getHistoryData() {
301 this.queryParams.status = 1; 301 this.queryParams.status = 1;
302 - this.getList(); 302 + this.init();
303 }, 303 },
304 colStyle(obj) { 304 colStyle(obj) {
305 if (obj.column.property == "id") { 305 if (obj.column.property == "id") {
trash-ui/src/views/business/dayWorkReport/index.vue
1 <template> 1 <template>
2 <div class="app-container"> 2 <div class="app-container">
  3 + <el-row :gutter="10" class="mb8">
  4 + <el-col :span="1.5">
  5 + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.pageStatus==0}" size="mini"
  6 + @click="getList(0);">报工记录</el-button>
  7 + </el-col>
  8 + <el-col :span="1.5">
  9 + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.pageStatus==1}" size="mini"
  10 + @click="getList(1);">历史报工记录</el-button>
  11 + </el-col>
  12 + </el-row>
  13 +
3 14
4 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> 15 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
5 <el-form-item label="工地名称" prop="name"> 16 <el-form-item label="工地名称" prop="name">
@@ -21,12 +32,12 @@ @@ -21,12 +32,12 @@
21 <el-option v-for="item in areas" :label="item.name" :value="item.code" /> 32 <el-option v-for="item in areas" :label="item.name" :value="item.code" />
22 </el-select> 33 </el-select>
23 </el-form-item> 34 </el-form-item>
24 - <el-form-item label="开始时间" prop="workStartTime"> 35 + <el-form-item label="开始时间" prop="workStartTime" v-if="this.queryParams.his==1">
25 <el-date-picker size="small" style="width: 200px" v-model="queryParams.workStartTime" type="date" 36 <el-date-picker size="small" style="width: 200px" v-model="queryParams.workStartTime" type="date"
26 value-format="yyyy-MM-dd" placeholder="开始时间"> 37 value-format="yyyy-MM-dd" placeholder="开始时间">
27 </el-date-picker> 38 </el-date-picker>
28 </el-form-item> 39 </el-form-item>
29 - <el-form-item label="结束时间" prop="workEndTime"> 40 + <el-form-item label="结束时间" prop="workEndTime" v-if="this.queryParams.his==1">
30 <el-date-picker size="small" style="width: 200px" v-model="queryParams.workEndTime" type="date" 41 <el-date-picker size="small" style="width: 200px" v-model="queryParams.workEndTime" type="date"
31 value-format="yyyy-MM-dd" placeholder="结束时间"> 42 value-format="yyyy-MM-dd" placeholder="结束时间">
32 </el-date-picker> 43 </el-date-picker>
@@ -195,7 +206,20 @@ @@ -195,7 +206,20 @@
195 206
196 this.loading = true; 207 this.loading = true;
197 208
198 - dayWorkList(this.queryParams).then(response => { 209 + let query = this.queryParams;
  210 +
  211 + if(this.queryParams.his != tabIdx && tabIdx == 1){
  212 + this.queryParams.his = tabIdx;
  213 + query.workStartTime = "2000-01-01 00:00:00";
  214 + query.workEndTime = "2999-01-01 00:00:00";
  215 + }else if(tabIdx==0){
  216 + this.queryParams.his = null;
  217 + query.workStartTime = null;
  218 + query.workEndTime = null;
  219 + }
  220 +
  221 + dayWorkList(query).then(response => {
  222 +
199 this.threestepList = response.rows; 223 this.threestepList = response.rows;
200 224
201 getArea().then(res => { 225 getArea().then(res => {
@@ -207,6 +231,7 @@ @@ -207,6 +231,7 @@
207 this.threestepList[i].descript = "开工"; 231 this.threestepList[i].descript = "开工";
208 } 232 }
209 } 233 }
  234 +
210 } 235 }
211 }); 236 });
212 237
@@ -225,23 +250,23 @@ @@ -225,23 +250,23 @@
225 } 250 }
226 } 251 }
227 } 252 }
  253 + this.loading = false;
228 }); 254 });
229 255
230 earthsitesList(this.remoteQueryData).then(res => { 256 earthsitesList(this.remoteQueryData).then(res => {
231 this.earthsitesList = res.result.list; 257 this.earthsitesList = res.result.list;
232 for(let i =0;i< this.threestepList.length;i++){ 258 for(let i =0;i< this.threestepList.length;i++){
233 for(let j =0;j<this.earthsitesList.length;j++){ 259 for(let j =0;j<this.earthsitesList.length;j++){
234 - console.log(this.threestepList[i].eid + "==" + this.earthsitesList[j].id);  
235 if(this.threestepList[i].eid == this.earthsitesList[j].id){ 260 if(this.threestepList[i].eid == this.earthsitesList[j].id){
236 this.threestepList[i].etype = this.earthsitesList[j].typeName; 261 this.threestepList[i].etype = this.earthsitesList[j].typeName;
237 this.threestepList[i].eplace = this.earthsitesList[j].areaName; 262 this.threestepList[i].eplace = this.earthsitesList[j].areaName;
238 } 263 }
239 } 264 }
240 } 265 }
  266 + this.loading = false;
241 }); 267 });
242 268
243 this.total = response.total; 269 this.total = response.total;
244 - this.loading = false;  
245 }); 270 });
246 271
247 272
trash-workFlow/src/main/java/com/trash/business/service/impl/CompanyCreditServiceImpl.java
@@ -118,11 +118,11 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService @@ -118,11 +118,11 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService
118 else 118 else
119 turckList = RemoteServerUtils.getTruckList(map,token); 119 turckList = RemoteServerUtils.getTruckList(map,token);
120 120
121 - List<Map> updateList = new ArrayList();  
122 121
123 if(turckList != null){ 122 if(turckList != null){
124 for(Object objec:turckList){ 123 for(Object objec:turckList){
125 - 124 +
  125 + List<Map> updateList = new ArrayList();
126 JSONObject truck = (JSONObject)objec; 126 JSONObject truck = (JSONObject)objec;
127 127
128 String truckId = truck.getString("id"); 128 String truckId = truck.getString("id");
@@ -137,21 +137,22 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService @@ -137,21 +137,22 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService
137 if(oldData.size() > 0){ 137 if(oldData.size() > 0){
138 data = oldData.get(0); 138 data = oldData.get(0);
139 if(data.getLostCredit() != credit){ 139 if(data.getLostCredit() != credit){
140 - if(credit == 0 && data.getCreateType() == 1){ 140 + if(credit == 0 && (data.getCreateType() != null && data.getCreateType() == 1)){
141 data.setLostCredit(credit); 141 data.setLostCredit(credit);
142 data.setReason("公司失信恢复"); 142 data.setReason("公司失信恢复");
143 truckService.updateTruckCredit(data); 143 truckService.updateTruckCredit(data);
144 -  
145 Map upParam = new HashedMap<>(); 144 Map upParam = new HashedMap<>();
146 upParam.put("creditStatus", credit); 145 upParam.put("creditStatus", credit);
147 upParam.put("id", truckId); 146 upParam.put("id", truckId);
148 updateList.add(upParam); 147 updateList.add(upParam);
  148 +
  149 + if(token != null)
  150 + RemoteServerUtils.updateTruckList(updateList,token);
  151 + else
  152 + RemoteServerUtils.updateTruckList(updateList);
149 153
150 continue; 154 continue;
151 } 155 }
152 - if(credit == 1 && data.getCreateType() == 1){  
153 - continue;  
154 - }  
155 } 156 }
156 }else{ 157 }else{
157 if(credit==0) 158 if(credit==0)
@@ -182,27 +183,15 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService @@ -182,27 +183,15 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService
182 upParam.put("creditStatus", credit); 183 upParam.put("creditStatus", credit);
183 upParam.put("id", truckId); 184 upParam.put("id", truckId);
184 updateList.add(upParam); 185 updateList.add(upParam);
  186 + if(token != null)
  187 + RemoteServerUtils.updateTruckList(updateList,token);
  188 + else
  189 + RemoteServerUtils.updateTruckList(updateList);
  190 +
185 } 191 }
186 } 192 }
187 - if(updateList.size() > 0){  
188 - if(token != null)  
189 - RemoteServerUtils.updateTruckList(updateList,token);  
190 - else  
191 - RemoteServerUtils.updateTruckList(updateList);  
192 - }  
193 } 193 }
194 194
195 - updateList.clear();  
196 -  
197 - Map upParam = new HashedMap<>();  
198 - upParam.put("dishonestState", credit);  
199 - upParam.put("id", companyId);  
200 - updateList.add(upParam);  
201 -  
202 - if(token != null)  
203 - RemoteServerUtils.updateTruckList(updateList,token);  
204 - else  
205 - RemoteServerUtils.updateTruckList(updateList);  
206 } 195 }
207 196
208 /** 197 /**
trash-workFlow/src/main/resources/mapper/TruckCreditMapper.xml
@@ -120,6 +120,7 @@ @@ -120,6 +120,7 @@
120 select c.* from (select a.* from truck_credit a where not exists (select b.* from truck_credit b where a.license_plate = b.license_plate and a.id &lt; id )) c 120 select c.* from (select a.* from truck_credit a where not exists (select b.* from truck_credit b where a.license_plate = b.license_plate and a.id &lt; id )) c
121 121
122 <where> 122 <where>
  123 + <if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%')</if>
123 <if test="licensePlate != null and licensePlate != ''"> and license_plate like concat('%', #{license_plate}, '%')</if> 124 <if test="licensePlate != null and licensePlate != ''"> and license_plate like concat('%', #{license_plate}, '%')</if>
124 </where> 125 </where>
125 </select> 126 </select>