Commit 43a9362345c2abbf3a294b44385a3eec1c04fa03
1 parent
3309e731
m
Showing
11 changed files
with
122 additions
and
21 deletions
trash-admin/src/main/java/com/trash/Application.java
| 1 | 1 | package com.trash; |
| 2 | 2 | |
| 3 | +import java.util.ArrayList; | |
| 4 | +import java.util.HashSet; | |
| 5 | +import java.util.Set; | |
| 6 | + | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 3 | 8 | import org.springframework.boot.SpringApplication; |
| 4 | 9 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| 5 | 10 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| 6 | 11 | import org.springframework.scheduling.annotation.EnableScheduling; |
| 12 | +import org.springframework.security.core.authority.SimpleGrantedAuthority; | |
| 13 | + | |
| 14 | +import com.alibaba.fastjson.JSONObject; | |
| 15 | +import com.trash.common.core.domain.entity.SysDept; | |
| 16 | +import com.trash.common.core.domain.entity.SysRole; | |
| 17 | +import com.trash.common.core.domain.entity.SysUser; | |
| 18 | +import com.trash.common.core.domain.model.LoginUser; | |
| 19 | +import com.trash.common.utils.RemoteServerUtils; | |
| 20 | +import com.trash.framework.web.service.TokenService; | |
| 7 | 21 | |
| 8 | 22 | /** |
| 9 | 23 | * 启动程序 |
| ... | ... | @@ -13,11 +27,13 @@ import org.springframework.scheduling.annotation.EnableScheduling; |
| 13 | 27 | @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) |
| 14 | 28 | @EnableScheduling |
| 15 | 29 | public class Application |
| 16 | -{ | |
| 30 | +{ | |
| 31 | + @Autowired | |
| 32 | + TokenService tokenService; | |
| 33 | + | |
| 17 | 34 | public static void main(String[] args) |
| 18 | 35 | { |
| 19 | 36 | // System.setProperty("spring.devtools.restart.enabled", "false"); |
| 20 | 37 | SpringApplication.run(Application.class, args); |
| 21 | - System.out.println("Application start success"); | |
| 22 | 38 | } |
| 23 | 39 | } | ... | ... |
trash-admin/src/main/resources/application-dev.yml
| ... | ... | @@ -9,8 +9,8 @@ trash: |
| 9 | 9 | # 实例演示开关 |
| 10 | 10 | demoEnabled: true |
| 11 | 11 | # 文件路径 示例( Windows配置D:/trash/uploadPath,Linux配置 /home/trash/uploadPath,存储桶 trash/uploadPath,nginx配置 /trash/upload) |
| 12 | - profile: /home/trash/uploadPath | |
| 13 | -# profile: E:/trash/uploadPath | |
| 12 | + #profile: /home/trash/uploadPath | |
| 13 | + profile: E:/trash/uploadPath | |
| 14 | 14 | # profile: F:/work/project/Documents/uploadPath/trash |
| 15 | 15 | # 获取ip地址开关 |
| 16 | 16 | addressEnabled: false | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/controller/GarbageOrderController.java
| ... | ... | @@ -94,7 +94,6 @@ public class GarbageOrderController { |
| 94 | 94 | // 上传并返回新文件名称 |
| 95 | 95 | fileName = FileUploadUtils.upload(filePath, file); |
| 96 | 96 | } catch (IOException e) { |
| 97 | - log.error("上传图片异常",e); | |
| 98 | 97 | throw new BizException(ResultCode.CODE_400, ResultCode.CODE_400.getMsg()); |
| 99 | 98 | } |
| 100 | 99 | String url = serverConfig.getUrl() + fileName; | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/pojo/domain/GarOrderCar.java
| ... | ... | @@ -146,4 +146,21 @@ public class GarOrderCar implements Serializable { |
| 146 | 146 | public void setGarRemark(String garRemark) { |
| 147 | 147 | this.garRemark = garRemark; |
| 148 | 148 | } |
| 149 | + | |
| 150 | + public Integer getCarId() { | |
| 151 | + return carId; | |
| 152 | + } | |
| 153 | + | |
| 154 | + public void setCarId(Integer carId) { | |
| 155 | + this.carId = carId; | |
| 156 | + } | |
| 157 | + | |
| 158 | + public String getContainerVolume() { | |
| 159 | + return containerVolume; | |
| 160 | + } | |
| 161 | + | |
| 162 | + public void setContainerVolume(String containerVolume) { | |
| 163 | + this.containerVolume = containerVolume; | |
| 164 | + } | |
| 165 | + | |
| 149 | 166 | } |
| 150 | 167 | \ No newline at end of file | ... | ... |
trash-ui/dist.7z
No preview for this file type
trash-ui/src/api/truck_active.js
| ... | ... | @@ -255,9 +255,9 @@ export default { |
| 255 | 255 | size:1000 |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | - | |
| 259 | - for(let i in res.result.unitCompanyList){ | |
| 260 | - let unit = res.result.unitCompanyList[i]; | |
| 258 | + let vids = res.result.transportCompanyVehicleId; | |
| 259 | + for(let idx in res.result.unitCompanyList){ | |
| 260 | + let unit = res.result.unitCompanyList[idx]; | |
| 261 | 261 | if(!unit.companyName) |
| 262 | 262 | continue; |
| 263 | 263 | |
| ... | ... | @@ -267,6 +267,7 @@ export default { |
| 267 | 267 | continue; |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | + | |
| 270 | 271 | for(let i in this.remoteCompanys){ |
| 271 | 272 | if(this.remoteCompanys[i].id == unit.companyId){ |
| 272 | 273 | if(this.remoteCompanys[i].auditStatus != 1){ |
| ... | ... | @@ -284,6 +285,10 @@ export default { |
| 284 | 285 | name: unit.companyName + credit, |
| 285 | 286 | creditStatus: this.remoteCompanys[i].dishonestState |
| 286 | 287 | }); |
| 288 | + | |
| 289 | + for(let j in unit.vehicleList){ | |
| 290 | + vids.push(unit.vehicleList[j].id); | |
| 291 | + } | |
| 287 | 292 | break; |
| 288 | 293 | } |
| 289 | 294 | } |
| ... | ... | @@ -293,13 +298,16 @@ export default { |
| 293 | 298 | let list = tres.result.list; |
| 294 | 299 | |
| 295 | 300 | let qr = { |
| 296 | - status:0 | |
| 301 | + status:0, | |
| 302 | + constructionId:item.objectId | |
| 297 | 303 | } |
| 298 | 304 | |
| 299 | 305 | listTruckActivate(qr).then(response => { |
| 300 | 306 | let taList = response.rows; |
| 301 | 307 | for(let i = 0;i< list.length;i++){ |
| 302 | - | |
| 308 | + if(vids.indexOf(list[i].id) == -1){ | |
| 309 | + continue; | |
| 310 | + } | |
| 303 | 311 | let count = 0; |
| 304 | 312 | for(let j in taList){ |
| 305 | 313 | if(taList[j].objectId == list[i].id){ | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/SupervisionThreestepController.java
| ... | ... | @@ -128,7 +128,7 @@ public class SupervisionThreestepController extends BaseController { |
| 128 | 128 | |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - String[] outside = { "长沙县", "望城区", "浏阳市", "宁乡市", "株洲市", "湘潭市", "汩罗市", "湘阴县" }; | |
| 131 | + String[] outside = {"株洲市", "湘潭市", "汩罗市", "湘阴县" }; | |
| 132 | 132 | |
| 133 | 133 | /** |
| 134 | 134 | * 查询三查机制列表 | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/TruckActivateController.java
| ... | ... | @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestBody; |
| 13 | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | 15 | |
| 16 | +import com.github.pagehelper.PageHelper; | |
| 16 | 17 | import com.trash.business.domain.TruckActivate; |
| 17 | 18 | import com.trash.business.domain.TruckActivateInfo; |
| 18 | 19 | import com.trash.business.mapper.TruckActivateMapper; |
| ... | ... | @@ -22,10 +23,14 @@ import com.trash.common.annotation.Log; |
| 22 | 23 | import com.trash.common.annotation.RepeatSubmit; |
| 23 | 24 | import com.trash.common.core.controller.BaseController; |
| 24 | 25 | import com.trash.common.core.domain.AjaxResult; |
| 26 | +import com.trash.common.core.page.PageDomain; | |
| 25 | 27 | import com.trash.common.core.page.TableDataInfo; |
| 28 | +import com.trash.common.core.page.TableSupport; | |
| 26 | 29 | import com.trash.common.core.redis.RedisCache; |
| 27 | 30 | import com.trash.common.enums.BusinessType; |
| 31 | +import com.trash.common.utils.StringUtils; | |
| 28 | 32 | import com.trash.common.utils.poi.ExcelUtil; |
| 33 | +import com.trash.common.utils.sql.SqlUtil; | |
| 29 | 34 | |
| 30 | 35 | /** |
| 31 | 36 | * 车辆激活Controller |
| ... | ... | @@ -54,19 +59,72 @@ public class TruckActivateController extends BaseController |
| 54 | 59 | @GetMapping("/list") |
| 55 | 60 | public TableDataInfo list(TruckActivate truckActivate) |
| 56 | 61 | { |
| 57 | - | |
| 62 | + startPage(); | |
| 63 | + | |
| 58 | 64 | if(truckActivate.getStatus() == 0){ |
| 59 | 65 | truckActivate.setMyTables(new ArrayList<>()); |
| 60 | 66 | truckActivate.getMyTables().add("truck_activate"); |
| 67 | + return getDataTable(truckActivateService.selectTruckActivateList(truckActivate)); | |
| 61 | 68 | }else{ |
| 62 | - List<String> tables = truckActivateMapper.getTables("truck_activate%"); | |
| 63 | - truckActivate.setMyTables(tables); | |
| 69 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | |
| 70 | + Integer pageNum = pageDomain.getPageNum(); | |
| 71 | + Integer pageSize = pageDomain.getPageSize(); | |
| 72 | + | |
| 73 | + String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); | |
| 74 | + | |
| 75 | + PageHelper.startPage(pageNum, pageSize, orderBy); | |
| 76 | + | |
| 77 | + | |
| 78 | + truckActivate.setMyTables(new ArrayList<>()); | |
| 79 | + truckActivate.getMyTables().add("truck_activate"); | |
| 80 | + | |
| 81 | + TableDataInfo info = getDataTable(truckActivateService.selectTruckActivateList(truckActivate)); | |
| 82 | + | |
| 83 | + | |
| 84 | + if(pageSize*pageNum - info.getTotal() > 10 ){ | |
| 85 | + info.getRows().clear(); | |
| 86 | + } | |
| 87 | + | |
| 88 | + if(info.getRows().size() == pageSize){ | |
| 89 | + List<String> tables = truckActivateMapper.getTables("truck_activate_%"); | |
| 90 | + for(String tb:tables){ | |
| 91 | + startPage(); | |
| 92 | + truckActivate.setMyTables(new ArrayList<>()); | |
| 93 | + truckActivate.getMyTables().add(tb); | |
| 94 | + info.setTotal(info.getTotal() +getDataTable(truckActivateService.selectTruckActivateList(truckActivate)).getTotal()); | |
| 95 | + } | |
| 96 | + }else{ | |
| 97 | + List<String> tables = truckActivateMapper.getTables("truck_activate_%"); | |
| 98 | + for(String tb:tables){ | |
| 99 | + int oSize = 0; | |
| 100 | + if(info.getRows().size() < pageSize){ | |
| 101 | + pageDomain = TableSupport.buildPageRequest(); | |
| 102 | + pageNum = pageDomain.getPageNum(); | |
| 103 | + pageSize = pageDomain.getPageSize(); | |
| 104 | + int oPage = (int)(((pageNum * pageSize) - info.getTotal()) / pageSize); | |
| 105 | + PageHelper.startPage(oPage, pageSize, orderBy); | |
| 106 | + | |
| 107 | + }else{ | |
| 108 | + pageNum = 1; | |
| 109 | + pageSize = 0; | |
| 110 | + } | |
| 111 | + | |
| 112 | + truckActivate.setMyTables(new ArrayList<>()); | |
| 113 | + truckActivate.getMyTables().add(tb); | |
| 114 | + List list = truckActivateService.selectTruckActivateList(truckActivate); | |
| 115 | + info.getRows().addAll(list); | |
| 116 | + info.setTotal(info.getTotal() +getDataTable(list).getTotal()); | |
| 117 | + if(pageSize*pageNum - info.getTotal() > 10 ){ | |
| 118 | + info.getRows().clear(); | |
| 119 | + } | |
| 120 | + } | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + } | |
| 125 | + | |
| 126 | + return info; | |
| 64 | 127 | } |
| 65 | - | |
| 66 | - | |
| 67 | - startPage(); | |
| 68 | - | |
| 69 | - return getDataTable(truckActivateService.selectTruckActivateList(truckActivate)); | |
| 70 | 128 | } |
| 71 | 129 | |
| 72 | 130 | /** | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionThreestepServiceImpl.java
| ... | ... | @@ -266,7 +266,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer |
| 266 | 266 | return supervisionThreestepMapper.getNames(supervisionThreestep); |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | - String[] outside = { "长沙县", "望城区", "浏阳市", "宁乡市", "株洲市", "湘潭市", "汩罗市", "湘阴县" }; | |
| 269 | + String[] outside = {"株洲市", "湘潭市", "汩罗市", "湘阴县" }; | |
| 270 | 270 | |
| 271 | 271 | @SuppressWarnings("unchecked") |
| 272 | 272 | @Override | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/TruckActivateServiceImpl.java
| ... | ... | @@ -77,6 +77,9 @@ public class TruckActivateServiceImpl implements ITruckActivateService { |
| 77 | 77 | |
| 78 | 78 | |
| 79 | 79 | List<TruckActivate> list = new ArrayList<>(); |
| 80 | + if(1==1){ | |
| 81 | + return truckActivateMapper.selectTruckActivateList(truckActivate); | |
| 82 | + } | |
| 80 | 83 | |
| 81 | 84 | List<String> companys = SecurityUtils.getLoginUser().getUser().getCompanyIds(); |
| 82 | 85 | List<String> tList = SecurityUtils.getLoginUser().getUser().getTruckList(); | ... | ... |
trash-workFlow/src/main/resources/mapper/TruckActivateMapper.xml
| ... | ... | @@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 79 | 79 | </foreach> |
| 80 | 80 | </if> |
| 81 | 81 | </where> |
| 82 | - ORDER BY create_time desc | |
| 82 | + ORDER BY id desc | |
| 83 | 83 | </select> |
| 84 | 84 | |
| 85 | 85 | <select id="selectTruckActivateListByConstructions" parameterType="TruckActivate" resultMap="TruckActivateResult"> | ... | ... |