diff --git a/pom.xml b/pom.xml
index e401043fe..3be6e5f69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -988,7 +988,10 @@
org.spring
wflow-server-1.0-SNAPSHOT.jar
+
A6F449ECD7E1024F703F37F2294AC8F2D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E
+
+
diff --git a/src/main/java/com/zhgd/mybatis/DataScopeHandler.java b/src/main/java/com/zhgd/mybatis/DataScopeHandler.java
index 1e50a6e36..2f3b81fc2 100644
--- a/src/main/java/com/zhgd/mybatis/DataScopeHandler.java
+++ b/src/main/java/com/zhgd/mybatis/DataScopeHandler.java
@@ -100,6 +100,7 @@ public class DataScopeHandler implements DataPermissionHandler {
tables.put("exam_train_record", "enterprise_id");
tables.put("exam_course_record", "enterprise_id");
tables.put("xz_worker_safe_watch_alarm", "enterprise_id");
+ tables.put("dangerous_engineering_record", "responsibility_company_id");
if (!environmentUtil.isBaise()) {
tables.put("car_info", "enterprise_id");
tables.put("enterprise_info", "id");
diff --git a/src/main/java/com/zhgd/xmgl/call/HikvisionCall.java b/src/main/java/com/zhgd/xmgl/call/HikvisionCall.java
index 18286d1ad..c09f5a9b4 100644
--- a/src/main/java/com/zhgd/xmgl/call/HikvisionCall.java
+++ b/src/main/java/com/zhgd/xmgl/call/HikvisionCall.java
@@ -1412,7 +1412,7 @@ public class HikvisionCall {
JSONObject rs = addAlarmCarForHttp(project, addJo);
sendNoticeAndSetStatusForCarInfo("车辆添加黑名单到海康isc", rs.toJSONString(), carInfo, 7, null, null, true);
} else {
- sendNoticeAndSetStatusForCarInfo("车辆取消布防(取消黑名单)到海康isc", null, carInfo, 7, null, true, false);
+ sendNoticeAndSetStatusForCarInfo("车辆取消黑名单到海康isc", null, carInfo, 7, null, true, false);
}
} else {
if (carInfo.getIsBlack() == 1) {
@@ -1423,7 +1423,7 @@ public class HikvisionCall {
JSONObject deleteJo = new JSONObject();
deleteJo.put("alarmSyscodes", alarmSyscode);
JSONObject rs = this.deletionAlarmCarForHttp(project, deleteJo);
- sendNoticeAndSetStatusForCarInfo("车辆取消布防(取消黑名单)到海康isc", rs.toJSONString(), carInfo, 7, null, null, true);
+ sendNoticeAndSetStatusForCarInfo("车辆取消黑名单到海康isc", rs.toJSONString(), carInfo, 7, null, null, true);
}
}
} else {
diff --git a/src/main/java/com/zhgd/xmgl/modules/car/controller/CarInfoController.java b/src/main/java/com/zhgd/xmgl/modules/car/controller/CarInfoController.java
index 2c9473dea..e78eb305c 100644
--- a/src/main/java/com/zhgd/xmgl/modules/car/controller/CarInfoController.java
+++ b/src/main/java/com/zhgd/xmgl/modules/car/controller/CarInfoController.java
@@ -14,7 +14,6 @@ import com.zhgd.xmgl.modules.car.entity.vo.CountCarModuleTypeVo;
import com.zhgd.xmgl.modules.car.service.ICarInfoService;
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
import com.zhgd.xmgl.security.util.SecurityUtils;
-import com.zhgd.xmgl.util.MessageUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -26,6 +25,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
import java.util.ArrayList;
import java.util.HashMap;
@@ -33,11 +33,11 @@ import java.util.List;
import java.util.Map;
- /**
+/**
* @Title: Controller
* @Description: 车辆黑白名单管理
* @author: pds
- * @date: 2020-09-29
+ * @date: 2020-09-29
* @version: V1.0
*/
@RestController
@@ -45,224 +45,236 @@ import java.util.Map;
@Slf4j
@Api(tags = "车辆黑白名单管理")
public class CarInfoController {
- @Autowired
- private ICarInfoService carInfoService;
+ @Autowired
+ private ICarInfoService carInfoService;
- @Autowired
- private ISystemUserService systemUserService;
+ @Autowired
+ private ISystemUserService systemUserService;
- @Autowired
- private IWorkerInfoService workerInfoService;
+ @Autowired
+ private IWorkerInfoService workerInfoService;
- @ApiOperation(value = "分页列表查询项目下车辆黑白名单", notes = "分页列表查询项目下车辆黑白名单", httpMethod = "POST")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "isBlack", value = "是否黑名单,0白名单,1黑名单", paramType = "body", required = false, dataType = "String"),
- @ApiImplicitParam(name = "carNumber", value = "车牌号", paramType = "body", required = true, dataType = "String"),
- @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
- @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "body", required = true, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"),
- @ApiImplicitParam(name = "carModuleType", value = "车辆类型(1、固定车,2、预约车辆(临时)、3外来车辆)", paramType = "body", required = false, dataType = "Integer"),
- })
- @PostMapping(value = "/selectCarList")
- public Result> selectCarPage(@RequestBody Map map) {
- return Result.success(carInfoService.selectCarListPage(map));
- }
+ @ApiOperation(value = "分页列表查询项目下车辆黑白名单", notes = "分页列表查询项目下车辆黑白名单", httpMethod = "POST")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "isBlack", value = "是否黑名单,0白名单,1黑名单", paramType = "body", required = false, dataType = "String"),
+ @ApiImplicitParam(name = "carNumber", value = "车牌号", paramType = "body", required = true, dataType = "String"),
+ @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
+ @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "body", required = true, dataType = "Integer"),
+ @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"),
+ @ApiImplicitParam(name = "carModuleType", value = "车辆类型(1、固定车,2、预约车辆(临时)、3外来车辆)", paramType = "body", required = false, dataType = "Integer"),
+ })
+ @PostMapping(value = "/selectCarList")
+ public Result> selectCarPage(@RequestBody Map map) {
+ return Result.success(carInfoService.selectCarListPage(map));
+ }
- @ApiOperation(value = "列表查询项目下车辆黑白名单", notes = "列表查询项目下车辆黑白名单", httpMethod = "POST")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "isBlack", value = "是否黑名单,0白名单,1黑名单", paramType = "body", required = false, dataType = "String"),
- @ApiImplicitParam(name = "carNumber", value = "车牌号", paramType = "body", required = true, dataType = "String"),
- @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
- @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "body", required = true, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"),
- @ApiImplicitParam(name = "carModuleType", value = "车辆类型(1、固定车,2、预约车辆(临时)、3外来车辆)", paramType = "body", required = false, dataType = "Integer"),
- })
- @PostMapping(value = "/list")
- public Result> selectCarList(@RequestBody Map map) {
- return Result.success(carInfoService.selectCarList(map));
- }
+ @ApiOperation(value = "列表查询项目下车辆黑白名单", notes = "列表查询项目下车辆黑白名单", httpMethod = "POST")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "isBlack", value = "是否黑名单,0白名单,1黑名单", paramType = "body", required = false, dataType = "String"),
+ @ApiImplicitParam(name = "carNumber", value = "车牌号", paramType = "body", required = true, dataType = "String"),
+ @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
+ @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "body", required = true, dataType = "Integer"),
+ @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"),
+ @ApiImplicitParam(name = "carModuleType", value = "车辆类型(1、固定车,2、预约车辆(临时)、3外来车辆)", paramType = "body", required = false, dataType = "Integer"),
+ })
+ @PostMapping(value = "/list")
+ public Result> selectCarList(@RequestBody Map map) {
+ return Result.success(carInfoService.selectCarList(map));
+ }
- @OperLog(operModul = "车辆管理", operType = "添加车辆黑白名单", operDesc = "添加车辆黑白名单管理信息")
- @ApiOperation(value = "添加车辆黑白名单管理信息", notes = "添加车辆黑白名单管理信息", httpMethod = "POST")
- @PostMapping(value = "/add")
- public Result add(@RequestBody CarInfo carInfo) {
- carInfo.setCreateBy(SecurityUtils.getUser().getUserId());
- carInfoService.addCarInfo(carInfo);
- return Result.ok();
- }
+ @OperLog(operModul = "车辆管理", operType = "添加车辆黑白名单", operDesc = "添加车辆黑白名单管理信息")
+ @ApiOperation(value = "添加车辆黑白名单管理信息", notes = "添加车辆黑白名单管理信息", httpMethod = "POST")
+ @PostMapping(value = "/add")
+ public Result add(@RequestBody CarInfo carInfo) {
+ carInfo.setCreateBy(SecurityUtils.getUser().getUserId());
+ carInfoService.addCarInfo(carInfo);
+ return Result.ok();
+ }
- /**
- * 添加
- * @param map
- * @return
- */
- @OperLog(operModul = "车辆管理", operType = "添加车辆黑白名单", operDesc = "添加车辆黑白名单管理信息")
- @ApiOperation(value = "添加车辆黑白名单管理信息", notes = "添加车辆黑白名单管理信息", httpMethod = "POST")
- @PostMapping(value = "/save")
- public Result save(@RequestBody Map map) {
- log.info("开始添加车辆" + map);
- Object alarmPushWorkerId = map.get("alarmPushWorkerId");
- String userId = String.valueOf(map.get("enterpriseId"));
- Object driverWorkerName = map.get("driverWorkerName");
- List carType = (List) map.get("carType");
- List driverWorkerId = (List) map.get("driverWorkerId");
- Integer carModuleType = MapUtils.getString(map, "carModuleType").equals("临时车辆") ? 2 : 3;
- List userIds = (List) map.get("userIds");
- CarInfo carInfo = new CarInfo();
- if(driverWorkerId != null) {
- carInfo.setDriverWorkerId(driverWorkerId.get(0).toString());
- }
- if(driverWorkerName != null) {
- carInfo.setDriverWorkerName(driverWorkerName.toString());
- }
- if (alarmPushWorkerId != null) {
- List alarmPushWorkerIds = (List) alarmPushWorkerId;
- carInfo.setAlarmPushWorkerId(alarmPushWorkerIds.get(0).toString());
- }
- if (userId != null) {
- carInfo.setCreateBy(Long.valueOf(userId));
- Long workerId = systemUserService.getOne(Wrappers.lambdaQuery().eq(SystemUser::getUserId, userId)).getWorkerId();
- carInfo.setEnterpriseId(workerInfoService.getById(workerId).getEnterpriseId());
- }
- carInfo.setCarModuleType(carModuleType);
- Integer entryAndExitPermit = MapUtils.getString(map, "entryAndExitPermit").equals("单次") ? 0 : 1;
- carInfo.setReserveStartTime(DateUtil.parse(map.get("reserveStartTime").toString() + ":00", DatePattern.NORM_DATETIME_FORMAT));
- carInfo.setReserveEndTime(DateUtil.parse(map.get("reserveEndTime").toString() + ":00", DatePattern.NORM_DATETIME_FORMAT));
- carInfo.setEntryAndExitPermit(entryAndExitPermit);
- carInfo.setCarNumber(String.valueOf(map.get("carNumber")));
- Object carColor = map.get("carColor");
- if (carColor != null) {
- carInfo.setCarColor(String.valueOf(carColor));
- }
- carInfo.setCarType(Long.valueOf(carType.get(0).toString()));
- carInfo.setDriverTelephone(String.valueOf(map.get("driverTelephone")));
- List