Commit 8ed928b0 authored by chenzhao's avatar chenzhao

修改代码

parent 4d285259
...@@ -170,4 +170,12 @@ public class EquipmentSpecific extends BaseEntity { ...@@ -170,4 +170,12 @@ public class EquipmentSpecific extends BaseEntity {
@TableField("warranty_period") @TableField("warranty_period")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date warrantyPeriod; private Date warrantyPeriod;
@ApiModelProperty(value = "是否遥测")
@TableField(exist = false)
private Boolean isTrend;
@ApiModelProperty(value = "指标单位")
@TableField(exist = false)
private String unit;
} }
...@@ -113,6 +113,9 @@ public class EquipmentDetailController extends AbstractBaseController { ...@@ -113,6 +113,9 @@ public class EquipmentDetailController extends AbstractBaseController {
@Value("${equip.enabled}") @Value("${equip.enabled}")
private Boolean enabled; private Boolean enabled;
@Autowired
IEquipmentIndexService equipmentIndexService;
@Value("${iot.code.prefix.have.used:20210003,20210004,20210005}") @Value("${iot.code.prefix.have.used:20210003,20210004,20210005}")
private String haveUsedIotPrefix; private String haveUsedIotPrefix;
...@@ -242,6 +245,10 @@ public class EquipmentDetailController extends AbstractBaseController { ...@@ -242,6 +245,10 @@ public class EquipmentDetailController extends AbstractBaseController {
@RequestParam(required = false) Long stockDetailId) { @RequestParam(required = false) Long stockDetailId) {
EquipmentDate equipmentDate = new EquipmentDate(); EquipmentDate equipmentDate = new EquipmentDate();
EquipmentSpecific equipmentSpecific = equipmentSpecificSerivce.getBaseMapper().selectOne(new QueryWrapper<EquipmentSpecific>().eq("code",code)); EquipmentSpecific equipmentSpecific = equipmentSpecificSerivce.getBaseMapper().selectOne(new QueryWrapper<EquipmentSpecific>().eq("code",code));
EquipmentIndex equipmentIndex = equipmentIndexService.getById(equipmentSpecific.getRealtimeIotIndexId());
equipmentSpecific.setIsTrend(equipmentIndex.getIsTrend());
equipmentSpecific.setUnit(equipmentIndex.getUnit());
FireFightingSystemEntity fightingSystemEntity = new FireFightingSystemEntity(); FireFightingSystemEntity fightingSystemEntity = new FireFightingSystemEntity();
if(!ObjectUtils.isEmpty(equipmentSpecific.getSystemId())){ if(!ObjectUtils.isEmpty(equipmentSpecific.getSystemId())){
fightingSystemEntity = fireFightingSystemService.getOneById(Long.valueOf(equipmentSpecific.getSystemId())); fightingSystemEntity = fireFightingSystemService.getOneById(Long.valueOf(equipmentSpecific.getSystemId()));
......
...@@ -191,7 +191,7 @@ public class PointServiceImpl implements IPointService { ...@@ -191,7 +191,7 @@ public class PointServiceImpl implements IPointService {
// BeanUtils.copyProperties(param, point); // BeanUtils.copyProperties(param, point);
int count = iPointDao.findByPointNo(param.getPointNo(), orgCode); int count = iPointDao.findByPointNo(param.getPointNo(), orgCode);
if (count > 0) {// 该单位已存在该编号的点 if (count > 0) {// 该单位已存在该编号的点
continue; throw new BadRequest(param.getPointNo()+"该编号已存在");
} }
if (ObjectUtils.isEmpty(param.getChargePersonId())) { if (ObjectUtils.isEmpty(param.getChargePersonId())) {
throw new BadRequest("责任人不能为空"); throw new BadRequest("责任人不能为空");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment