Commit 8ed928b0 authored by chenzhao's avatar chenzhao

修改代码

parent 4d285259
......@@ -170,4 +170,12 @@ public class EquipmentSpecific extends BaseEntity {
@TableField("warranty_period")
@JsonFormat(pattern = "yyyy-MM-dd")
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 {
@Value("${equip.enabled}")
private Boolean enabled;
@Autowired
IEquipmentIndexService equipmentIndexService;
@Value("${iot.code.prefix.have.used:20210003,20210004,20210005}")
private String haveUsedIotPrefix;
......@@ -242,6 +245,10 @@ public class EquipmentDetailController extends AbstractBaseController {
@RequestParam(required = false) Long stockDetailId) {
EquipmentDate equipmentDate = new EquipmentDate();
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();
if(!ObjectUtils.isEmpty(equipmentSpecific.getSystemId())){
fightingSystemEntity = fireFightingSystemService.getOneById(Long.valueOf(equipmentSpecific.getSystemId()));
......
......@@ -191,7 +191,7 @@ public class PointServiceImpl implements IPointService {
// BeanUtils.copyProperties(param, point);
int count = iPointDao.findByPointNo(param.getPointNo(), orgCode);
if (count > 0) {// 该单位已存在该编号的点
continue;
throw new BadRequest(param.getPointNo()+"该编号已存在");
}
if (ObjectUtils.isEmpty(param.getChargePersonId())) {
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