Commit 9034e854016b68479d10abe860473a75533255bf
1 parent
d0f5cab7
m
Showing
4 changed files
with
34 additions
and
24 deletions
trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java
| ... | ... | @@ -15,6 +15,7 @@ import java.util.Map; |
| 15 | 15 | import java.util.concurrent.TimeUnit; |
| 16 | 16 | import java.util.stream.Collectors; |
| 17 | 17 | |
| 18 | +import org.apache.commons.collections4.map.HashedMap; | |
| 18 | 19 | import org.springframework.beans.BeansException; |
| 19 | 20 | import org.springframework.beans.factory.annotation.Autowired; |
| 20 | 21 | import org.springframework.stereotype.Component; |
| ... | ... | @@ -718,8 +719,9 @@ public class DriverTask { |
| 718 | 719 | Map map = new HashMap<>(); |
| 719 | 720 | map.put("size", 99999); |
| 720 | 721 | map.put("page", 1); |
| 721 | - | |
| 722 | + | |
| 722 | 723 | JSONArray companys = RemoteServerUtils.getCompanyList(map, TOKEN); |
| 724 | + List<JSONObject> losts = new ArrayList<>(); | |
| 723 | 725 | if (companys != null) { |
| 724 | 726 | for (Object jsonObject : companys) { |
| 725 | 727 | JSONObject company = (JSONObject) jsonObject; |
| ... | ... | @@ -740,6 +742,11 @@ public class DriverTask { |
| 740 | 742 | companyCredit.setStatus(0L); |
| 741 | 743 | SpringUtils.getBean(ICompanyCreditService.class).insertCompanyCredit(companyCredit, TOKEN); |
| 742 | 744 | } |
| 745 | + | |
| 746 | + if(company.getInteger("dishonestState") == 1){ | |
| 747 | + losts.add(company); | |
| 748 | + } | |
| 749 | + | |
| 743 | 750 | } catch (Exception e) { |
| 744 | 751 | e.printStackTrace(); |
| 745 | 752 | } |
| ... | ... | @@ -757,7 +764,28 @@ public class DriverTask { |
| 757 | 764 | for (CompanyCredit c : companyList) { |
| 758 | 765 | SpringUtils.getBean(ICompanyCreditService.class).updateRemoteCompanyAndTruck(c, TOKEN); |
| 759 | 766 | } |
| 760 | - | |
| 767 | + | |
| 768 | + for(JSONObject obj:losts){ | |
| 769 | + CompanyCredit ce = new CompanyCredit(); | |
| 770 | + ce.setObjectId(obj.getString("id")); | |
| 771 | + ce.setLostCredit(1L); | |
| 772 | + ce.setStatus(0L); | |
| 773 | + | |
| 774 | + List<CompanyCredit> list = SpringUtils.getBean(CompanyCreditMapper.class).selectCompanyCreditList(ce); | |
| 775 | + | |
| 776 | + if(list.size() == 0){ | |
| 777 | + List<Map> cpcList = new ArrayList<>(); | |
| 778 | + Map cpc = new HashedMap<>(); | |
| 779 | + cpc.put("dishonestState", 0); | |
| 780 | + cpc.put("id", obj.getString("id")); | |
| 781 | + cpcList.add(cpc); | |
| 782 | + RemoteServerUtils.updateCompanyList(cpcList,TOKEN); | |
| 783 | + } | |
| 784 | + | |
| 785 | + } | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 761 | 789 | try { |
| 762 | 790 | checkToSendSMS(); // 检查驾驶员信用 |
| 763 | 791 | } catch (Exception e) { | ... | ... |
trash-ui/dist.7z
No preview for this file type
trash-ui/src/views/business/CompanyCredit/index.vue
| ... | ... | @@ -14,19 +14,10 @@ |
| 14 | 14 | <el-col> |
| 15 | 15 | <el-form-item label="运输企业" prop="name" |
| 16 | 16 | style="float:right;"> |
| 17 | - <el-select v-model="queryParams.name" | |
| 18 | - filterable | |
| 19 | - reserve-keyword | |
| 17 | + <el-input v-model="queryParams.name" | |
| 20 | 18 | placeholder="运输企业" |
| 21 | 19 | |
| 22 | - size="small" | |
| 23 | - :loading="loading"> | |
| 24 | - <el-option | |
| 25 | - v-for="item in dictNames" | |
| 26 | - :label="item" | |
| 27 | - :value="item"> | |
| 28 | - </el-option> | |
| 29 | - </el-select> | |
| 20 | + size="small" /> | |
| 30 | 21 | </el-form-item> |
| 31 | 22 | </el-col> |
| 32 | 23 | <el-col> | ... | ... |
trash-ui/src/views/business/DriverCredit/index.vue
| ... | ... | @@ -103,19 +103,10 @@ |
| 103 | 103 | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body v-loading="loading"> |
| 104 | 104 | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| 105 | 105 | <el-form-item label="驾驶员姓名" prop="name"> |
| 106 | - <el-select | |
| 106 | + <el-input | |
| 107 | 107 | v-model="form.name" |
| 108 | - filterable | |
| 109 | - reserve-keyword | |
| 110 | 108 | placeholder="驾驶员姓名" |
| 111 | - @change="getObjId"> | |
| 112 | - <el-option | |
| 113 | - v-for="item in driverList" | |
| 114 | - :key="item.id" | |
| 115 | - :label="item.name" | |
| 116 | - :value="item.name"> | |
| 117 | - </el-option> | |
| 118 | - </el-select> | |
| 109 | + @change="getObjId"/> | |
| 119 | 110 | </el-form-item> |
| 120 | 111 | |
| 121 | 112 | <el-form-item label="证件号码" prop="idNumber"> | ... | ... |