Merge remote-tracking branch 'origin/guoshengxiong' into guoshengxiong

This commit is contained in:
guoshengxiong 2024-05-06 18:47:50 +08:00
commit 1c1d5a22f4
7 changed files with 50 additions and 12 deletions

View File

@ -816,7 +816,7 @@
<dependency> <dependency>
<groupId>org.example</groupId> <groupId>org.example</groupId>
<artifactId>wflow-server1</artifactId> <artifactId>wflow-server</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<scope>system</scope> <scope>system</scope>
<systemPath>${basedir}/src/main/resources/lib/wflow-server-1.0-SNAPSHOT.jar</systemPath> <systemPath>${basedir}/src/main/resources/lib/wflow-server-1.0-SNAPSHOT.jar</systemPath>

View File

@ -900,6 +900,11 @@ public class HikvisionCall {
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) { if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, "24"); noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, "24");
} }
if (carInfo.getUserIds() != null && carInfo.getUserIds().size() > 0) {
for (String userId : carInfo.getUserIds()) {
noticeService.addUserNotice(Long.valueOf(userId), msg, title, "24");
}
}
} }
private void sendNoticeForOrg(String title, String rs, String orgName) { private void sendNoticeForOrg(String title, String rs, String orgName) {

View File

@ -4,11 +4,16 @@ import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zhgd.annotation.OperLog; import com.zhgd.annotation.OperLog;
import com.zhgd.jeecg.common.api.vo.Result; import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.mybatis.EntityMap; import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
import com.zhgd.xmgl.modules.car.entity.CarInfo; import com.zhgd.xmgl.modules.car.entity.CarInfo;
import com.zhgd.xmgl.modules.car.service.ICarInfoService; 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 com.zhgd.xmgl.util.MessageUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
@ -44,6 +49,12 @@ public class CarInfoController {
@Autowired @Autowired
private ICarInfoService carInfoService; private ICarInfoService carInfoService;
@Autowired
private ISystemUserService systemUserService;
@Autowired
private IWorkerInfoService workerInfoService;
/** /**
* 分页列表查询 * 分页列表查询
* @return * @return
@ -84,12 +95,12 @@ public class CarInfoController {
@PostMapping(value = "/save") @PostMapping(value = "/save")
public Result<CarInfo> save(@RequestBody Map<String, Object> map) { public Result<CarInfo> save(@RequestBody Map<String, Object> map) {
Object alarmPushWorkerId = map.get("alarmPushWorkerId"); Object alarmPushWorkerId = map.get("alarmPushWorkerId");
Object enterpriseId = map.get("enterpriseId"); String userId = map.get("enterpriseId").toString();
Object driverWorkerName = map.get("driverWorkerName"); Object driverWorkerName = map.get("driverWorkerName");
List<String> carType = (List<String>) map.get("carType"); List<String> carType = (List<String>) map.get("carType");
List<String> driverWorkerId = (List<String>) map.get("driverWorkerId"); List<String> driverWorkerId = (List<String>) map.get("driverWorkerId");
Integer carModuleType = MapUtils.getString(map, "carModuleType").equals("临时车辆") ? 2 : 3; Integer carModuleType = MapUtils.getString(map, "carModuleType").equals("临时车辆") ? 2 : 3;
List<String> userIds = (List<String>) map.get("userIds");
CarInfo carInfo = new CarInfo(); CarInfo carInfo = new CarInfo();
if(driverWorkerId != null) { if(driverWorkerId != null) {
carInfo.setDriverWorkerId(driverWorkerId.get(0).toString()); carInfo.setDriverWorkerId(driverWorkerId.get(0).toString());
@ -101,12 +112,9 @@ public class CarInfoController {
List<String> alarmPushWorkerIds = (List<String>) alarmPushWorkerId; List<String> alarmPushWorkerIds = (List<String>) alarmPushWorkerId;
carInfo.setAlarmPushWorkerId(alarmPushWorkerIds.get(0).toString()); carInfo.setAlarmPushWorkerId(alarmPushWorkerIds.get(0).toString());
} }
if (enterpriseId != null) { if (userId != null) {
List<String> enterpriseIds = (List<String>) enterpriseId; Long workerId = systemUserService.getOne(Wrappers.<SystemUser>lambdaQuery().eq(SystemUser::getUserId, userId)).getWorkerId();
String string = enterpriseIds.get(0).toString(); carInfo.setEnterpriseId(workerInfoService.getById(workerId).getEnterpriseId());
if (StringUtils.isNotBlank(string)) {
carInfo.setEnterpriseId(Long.valueOf(string));
}
} }
carInfo.setCarModuleType(carModuleType); carInfo.setCarModuleType(carModuleType);
Integer entryAndExitPermit = MapUtils.getString(map, "entryAndExitPermit").equals("单次") ? 0 : 1; Integer entryAndExitPermit = MapUtils.getString(map, "entryAndExitPermit").equals("单次") ? 0 : 1;
@ -174,6 +182,7 @@ public class CarInfoController {
carInfo.setOtherProve(JSON.toJSONString(otherProveList)); carInfo.setOtherProve(JSON.toJSONString(otherProveList));
carInfo.setProjectSn(map.get("projectSn").toString()); carInfo.setProjectSn(map.get("projectSn").toString());
carInfo.setIsBlack(MapUtils.getInteger(map, "isBlack")); carInfo.setIsBlack(MapUtils.getInteger(map, "isBlack"));
carInfo.setUserIds(userIds);
carInfoService.addCarInfo(carInfo); carInfoService.addCarInfo(carInfo);
return Result.ok(); return Result.ok();
} }

View File

@ -14,6 +14,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* @Description: 车辆黑白名单管理 * @Description: 车辆黑白名单管理
@ -131,4 +132,8 @@ public class CarInfo implements Serializable {
@ApiModelProperty(value = "企业名称") @ApiModelProperty(value = "企业名称")
private String enterpriseName; private String enterpriseName;
@TableField(exist = false)
@ApiModelProperty(value = "流程参与人")
private List<String> userIds;
} }

View File

@ -6,10 +6,13 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zhgd.annotation.OperLog; import com.zhgd.annotation.OperLog;
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
import com.zhgd.xmgl.modules.project.entity.ProjectEnterprise; import com.zhgd.xmgl.modules.project.entity.ProjectEnterprise;
import com.zhgd.xmgl.modules.project.service.IProjectEnterpriseService; import com.zhgd.xmgl.modules.project.service.IProjectEnterpriseService;
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo; import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
import com.zhgd.xmgl.modules.worker.service.IEnterpriseInfoService; import com.zhgd.xmgl.modules.worker.service.IEnterpriseInfoService;
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
import com.zhgd.xmgl.modules.xz.entity.XzMaterialDetail; import com.zhgd.xmgl.modules.xz.entity.XzMaterialDetail;
import com.zhgd.xmgl.util.PageUtil; import com.zhgd.xmgl.util.PageUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -67,6 +70,12 @@ public class XzMaterialController {
@Autowired @Autowired
private IXzMaterialService xzMaterialService; private IXzMaterialService xzMaterialService;
@Autowired
private ISystemUserService systemUserService;
@Autowired
private IWorkerInfoService workerInfoService;
@Autowired @Autowired
private IEnterpriseInfoService enterpriseInfoService; private IEnterpriseInfoService enterpriseInfoService;
@ -164,11 +173,14 @@ public class XzMaterialController {
@PostMapping(value = "/save") @PostMapping(value = "/save")
public Result<Object> save(@RequestBody JSONObject obj) { public Result<Object> save(@RequestBody JSONObject obj) {
log.info("添加材料信息" + JSON.toJSONString(obj)); log.info("添加材料信息" + JSON.toJSONString(obj));
List<String> enterpriseIds = (List<String>) obj.get("enterpriseId"); String userId = obj.get("enterpriseId").toString();
Integer type = Integer.parseInt(obj.get("type").toString());
XzMaterial xzMaterial = new XzMaterial(); XzMaterial xzMaterial = new XzMaterial();
xzMaterial.setType(type);
String [] param = {"name", "model", "specifications", "unit", "num", "remark"}; String [] param = {"name", "model", "specifications", "unit", "num", "remark"};
List<XzMaterialDetail> list = new ArrayList<>(); List<XzMaterialDetail> list = new ArrayList<>();
XzMaterial exist = xzMaterialService.getOne(Wrappers.<XzMaterial>lambdaQuery() XzMaterial exist = xzMaterialService.getOne(Wrappers.<XzMaterial>lambdaQuery()
.eq(XzMaterial::getType, type)
.like(XzMaterial::getName, DateUtil.today()) .like(XzMaterial::getName, DateUtil.today())
.orderByDesc(XzMaterial::getCreateTime).last("limit 1")); .orderByDesc(XzMaterial::getCreateTime).last("limit 1"));
if (exist == null) { if (exist == null) {
@ -200,8 +212,9 @@ public class XzMaterialController {
} }
} }
xzMaterial.setProjectSn(obj.getString("projectSn")); xzMaterial.setProjectSn(obj.getString("projectSn"));
if (enterpriseIds != null && enterpriseIds.size() > 0) { if (userId != null ) {
xzMaterial.setEnterpriseId(enterpriseIds.get(0)); Long workerId = systemUserService.getOne(Wrappers.<SystemUser>lambdaQuery().eq(SystemUser::getUserId, userId)).getWorkerId();
xzMaterial.setEnterpriseId(workerInfoService.getById(workerId).getEnterpriseId().toString());
} }
xzMaterial.setXzMaterialList(list); xzMaterial.setXzMaterialList(list);
xzMaterial.setCreateTime(new Date()); xzMaterial.setCreateTime(new Date());

View File

@ -45,6 +45,12 @@ public class XzMaterial implements Serializable {
@Excel(name = "批次数量", width = 15) @Excel(name = "批次数量", width = 15)
@ApiModelProperty(value = "批次数量") @ApiModelProperty(value = "批次数量")
private Integer num; private Integer num;
/**
* 进出场标识(1入场2出厂;)
*/
@Excel(name = "进出场标识(1入场2出厂;)", width = 15)
@ApiModelProperty(value = "进出场标识(1入场2出厂;)")
private Integer type;
/** /**
* 入场时间 * 入场时间
*/ */