TRX 1 рік тому
батько
коміт
e94c5139d8

+ 9 - 0
FullCardClient/src/main/java/com/zhongshu/card/client/model/school/DeviceInfoModel.java

@@ -24,6 +24,15 @@ public class DeviceInfoModel extends SuperModel {
     @Schema(description = "设备类型,如 消费机 门禁机")
     private DeviceType deviceType;
 
+    private String deviceTypeStr;
+
+    public String getDeviceTypeStr() {
+        if (deviceType != null) {
+            return deviceType.getRemark();
+        }
+        return "";
+    }
+
     @Schema(description = "网关号")
     private String gateWayCode;
 

+ 1 - 1
FullCardServer/src/main/java/com/zhongshu/card/server/core/service/org/UserAccountServiceImpl.java

@@ -596,7 +596,7 @@ public class UserAccountServiceImpl extends SuperService implements UserAccountS
             UserCountModel userCountModel = toModel(entity.getUser());
             model.setUser(userCountModel);
 
-            // 职务
+            // 职务 职位
             DictInfoSimpleModel position = dictInfoService.toSimpleModel(entity.getPosition());
             model.setPosition(position);
 

+ 4 - 1
FullCardServer/src/main/java/com/zhongshu/card/server/core/service/school/AreaServiceImpl.java

@@ -88,7 +88,10 @@ public class AreaServiceImpl extends SuperService implements AreaService {
             entity = new Area();
         }
         BeanUtils.copyProperties(param, entity);
-        DictInfo dictInfo = dictInfoDao.findTopById(param.getDictInfoId());
+        DictInfo dictInfo = null;
+        if (StringUtils.isNotEmpty(param.getDictInfoId())) {
+            dictInfo = dictInfoDao.findTopById(param.getDictInfoId());
+        }
         entity.setDictInfo(dictInfo);
         areaDao.save(entity);
         return ResultContent.buildSuccess(entity);

+ 1 - 1
FullCardServer/src/main/java/com/zhongshu/card/server/core/service/school/DeviceInfoServiceImpl.java

@@ -138,7 +138,7 @@ public class DeviceInfoServiceImpl extends SuperService implements DeviceInfoSer
 
     public DeviceInfoModel toModel(DeviceInfo entity) {
         DeviceInfoModel model = null;
-        if (ObjectUtils.isEmpty(entity)) {
+        if (ObjectUtils.isNotEmpty(entity)) {
             model = new DeviceInfoModel();
             BeanUtils.copyProperties(entity, model);
             model.setArea(areaService.toModel(entity.getArea()));