|
@@ -0,0 +1,61 @@
|
|
|
+package com.care.bms.service;
|
|
|
+
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.care.common.entity.CareHouse;
|
|
|
+import com.care.common.entity.CareStation;
|
|
|
+import com.care.common.entity.SysDimCode;
|
|
|
+import com.care.common.enums.KeyEscrowTypeEnum;
|
|
|
+import com.care.common.service.CareHouseService;
|
|
|
+import com.care.common.service.CareMemberInfoService;
|
|
|
+import com.care.common.service.CareStationService;
|
|
|
+import com.care.common.service.SysDimCodeService;
|
|
|
+import com.care.common.util.MyBeanUtils;
|
|
|
+import com.care.common.vo.DimCodeVO;
|
|
|
+import com.care.common.vo.PageReqVO;
|
|
|
+import com.care.common.vo.UserLogindConvertVO;
|
|
|
+import com.care.common.vo.device.HouseVO;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Author: lilt
|
|
|
+ * @Date: 2021/7/14
|
|
|
+ * @Desc:
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class DimCodeService {
|
|
|
+ @Resource
|
|
|
+ private SysDimCodeService sysDimCodeService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据typeCode查询编码列表
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<DimCodeVO> queryDimCodeByType(String typeCode){
|
|
|
+ List<DimCodeVO> datas = new ArrayList<>();
|
|
|
+ QueryWrapper<SysDimCode> userQueryWrapper = new QueryWrapper<>();
|
|
|
+ userQueryWrapper.lambda().eq(SysDimCode::getTypeCode,typeCode).eq(SysDimCode::getStatus,"1")
|
|
|
+ .orderByAsc(SysDimCode::getCodeIndex);
|
|
|
+ List<SysDimCode> list = this.sysDimCodeService.list(userQueryWrapper);
|
|
|
+ if (list != null){
|
|
|
+ list.forEach(item -> {
|
|
|
+ DimCodeVO vo = new DimCodeVO();
|
|
|
+ BeanUtil.copyProperties(item,vo);
|
|
|
+ datas.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return datas;
|
|
|
+ }
|
|
|
+}
|