Commit 2c5aceac authored by suhuiguang's avatar suhuiguang

设备二维码变色

parent 14f84aa3
......@@ -64,5 +64,6 @@ public class OtherInfo extends AbstractEquipBaseEntity {
@TableField(value ="\"SUPERVISORY_CODE\"")
private String supervisoryCode;
@TableField(value ="\"STATUS\"")
private String status;
}
......@@ -19,7 +19,6 @@ import com.yeejoin.amos.boot.module.app.api.dto.*;
import com.yeejoin.amos.boot.module.app.api.entity.*;
import com.yeejoin.amos.boot.module.app.api.enums.EquipmentCategoryEnum;
import com.yeejoin.amos.boot.module.app.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.app.api.mapper.AppCommonMapper;
import com.yeejoin.amos.boot.module.app.api.mapper.CategoryOtherInfoMapper;
import com.yeejoin.amos.boot.module.app.api.mapper.EquipmentCategoryMapper;
import com.yeejoin.amos.boot.module.app.biz.utils.HttpUtils;
......@@ -254,7 +253,7 @@ public class TzsAppService {
otherJsonObject.put("tabValue", otherList);
jsonArray.add(otherJsonObject);
map.put("tab", jsonArray);
map.put("color", this.getQrCodeColor(record));
return map;
}
......@@ -409,9 +408,19 @@ public class TzsAppService {
jsonArray.add(constructionJsonObject);
map.put("tab", jsonArray);
}
map.put("color", this.getQrCodeColor(record));
return map;
}
private String getQrCodeColor(String record) {
// 二维码颜色赋值逻辑
OtherInfo otherInfo = otherInfoService.getOne(new LambdaQueryWrapper<OtherInfo>().eq(OtherInfo::getRecord, record));
if (otherInfo != null) {
return "0".equals(otherInfo.getStatus()) ? "#ff0000" : "#00ff00";
}
return "#f2f2f2";
}
public void getGroupList(HashMap putMap, String record, Class entity, Class dto, BaseService service, List list, boolean isOne, List<DataDictionary> dictionaryList, List<EquipmentCategory> equipmentCategories) {
TableInfoHelper.initTableInfo(new MapperBuilderAssistant(new MybatisConfiguration(), ""), entity);
QueryWrapper wrapper = new QueryWrapper();
......
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