Commit 370e597e authored by KeYong's avatar KeYong

修改钱塘江现场bug

parent 0966861c
......@@ -170,4 +170,7 @@ public class EquipmentSpecific extends BaseEntity {
@TableField("warranty_period")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date warrantyPeriod;
@TableField(exist = false)
private String equipCondition;
}
......@@ -22,6 +22,7 @@ import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.common.vo.EquipmentDate;
import com.yeejoin.equipmanage.dto.ExcelDto;
import com.yeejoin.equipmanage.mapper.EquipmentDetailMapper;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper;
import com.yeejoin.equipmanage.mapper.ManufacturerInfoMapper;
import com.yeejoin.equipmanage.mapper.StockDetailMapper;
import com.yeejoin.equipmanage.service.*;
......@@ -84,6 +85,9 @@ public class EquipmentDetailController extends AbstractBaseController {
@Autowired
IEquipmentSpecificSerivce equipmentSpecificSerivce;
@Autowired
EquipmentSpecificMapper equipmentSpecificMapper;
@Value("${redis_equip_type_count}")
private String equipTypeAndCount;
......@@ -241,7 +245,8 @@ public class EquipmentDetailController extends AbstractBaseController {
public EquipmentDate selectequipmentDateByCode(@RequestParam String code,
@RequestParam(required = false) Long stockDetailId) {
EquipmentDate equipmentDate = new EquipmentDate();
EquipmentSpecific equipmentSpecific = equipmentSpecificSerivce.getBaseMapper().selectOne(new QueryWrapper<EquipmentSpecific>().eq("code",code));
EquipmentSpecific equipmentSpecific = equipmentSpecificMapper.getEquipSpecificEntityByCode(code);
FireFightingSystemEntity fightingSystemEntity = new FireFightingSystemEntity();
if(!ObjectUtils.isEmpty(equipmentSpecific.getSystemId())){
fightingSystemEntity = fireFightingSystemService.getOneById(Long.valueOf(equipmentSpecific.getSystemId()));
......
......@@ -260,4 +260,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
Map<String, Object> getStationCode(@Param("id")Long id);
EquipmentSpecific getEquipSpecificEntityByCode(@Param("code") String code);
}
......@@ -2319,7 +2319,19 @@
<select id="getEquipmentSpecificIotCodeWYB"
resultType="com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo">
select iot_code from wl_equipment_specific where equipment_code = '92010800KAL44' and iot_code is not null
</select>
<select id="getEquipSpecificEntityByCode" resultType="com.yeejoin.equipmanage.common.entity.EquipmentSpecific">
SELECT
*,
IF(SUM( IF ( a.equipment_specific_index_value = 'true', 1, 0 ) ) > 0, '异常', '正常' ) AS equipCondition
FROM
wl_equipment_specific es
LEFT JOIN wl_equipment_specific_alarm a ON a.equipment_specific_id = es.id
<where>
<if test="code != '' and code != null">
AND es.code like CONCAT('%',#{code},'%')
</if>
</where>
</select>
</mapper>
\ No newline at end of file
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