move equip po
This commit is contained in:
parent
9313ef050e
commit
ab59198455
|
|
@ -1,305 +0,0 @@
|
|||
package com.bonus.zlpt.common.core.domain;
|
||||
|
||||
|
||||
public class MaDevInfo {
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private long maId;
|
||||
/**
|
||||
* 系统编码
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 类型id
|
||||
*/
|
||||
private long typeId;
|
||||
/**
|
||||
* 设备状态(自有,待上架,上架,在租,下架)考虑数据字典
|
||||
*/
|
||||
private String maStatus;
|
||||
/**
|
||||
* 租赁范围
|
||||
*/
|
||||
private long leaseScope;
|
||||
/**
|
||||
* 设备所在地
|
||||
*/
|
||||
private String location;
|
||||
/**
|
||||
* 设备品牌
|
||||
*/
|
||||
private String brand;
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
private String modelName;
|
||||
/**
|
||||
* 出厂日期
|
||||
*/
|
||||
private String productionDate;
|
||||
/**
|
||||
* 工作时长
|
||||
*/
|
||||
private String workingHours;
|
||||
/**
|
||||
* 整机序列号
|
||||
*/
|
||||
private String serialNumber;
|
||||
/**
|
||||
* 设备月租价
|
||||
*/
|
||||
private String monthLeasePrice;
|
||||
/**
|
||||
* 设备天租价
|
||||
*/
|
||||
private String dayLeasePrice;
|
||||
/**
|
||||
* 设备主照片
|
||||
*/
|
||||
private String picUrl;
|
||||
/**
|
||||
* 机手月租金
|
||||
*/
|
||||
private String jsMonthPrice;
|
||||
/**
|
||||
* 机手天租金
|
||||
*/
|
||||
private String jsDayPrice;
|
||||
/**
|
||||
* 详细描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* gps编号
|
||||
*/
|
||||
private String gpsCode;
|
||||
/**
|
||||
* 设备所属公司
|
||||
*/
|
||||
private long ownCo;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private long creator;
|
||||
/**
|
||||
* 订金
|
||||
*/
|
||||
private double deposit;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String isActive;
|
||||
|
||||
|
||||
public long getMaId() {
|
||||
return maId;
|
||||
}
|
||||
|
||||
public void setMaId(long maId) {
|
||||
this.maId = maId;
|
||||
}
|
||||
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
|
||||
public long getTypeId() {
|
||||
return typeId;
|
||||
}
|
||||
|
||||
public void setTypeId(long typeId) {
|
||||
this.typeId = typeId;
|
||||
}
|
||||
|
||||
|
||||
public String getMaStatus() {
|
||||
return maStatus;
|
||||
}
|
||||
|
||||
public void setMaStatus(String maStatus) {
|
||||
this.maStatus = maStatus;
|
||||
}
|
||||
|
||||
|
||||
public long getLeaseScope() {
|
||||
return leaseScope;
|
||||
}
|
||||
|
||||
public void setLeaseScope(long leaseScope) {
|
||||
this.leaseScope = leaseScope;
|
||||
}
|
||||
|
||||
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
|
||||
public String getBrand() {
|
||||
return brand;
|
||||
}
|
||||
|
||||
public void setBrand(String brand) {
|
||||
this.brand = brand;
|
||||
}
|
||||
|
||||
|
||||
public String getModelName() {
|
||||
return modelName;
|
||||
}
|
||||
|
||||
public void setModelName(String modelName) {
|
||||
this.modelName = modelName;
|
||||
}
|
||||
|
||||
|
||||
public String getProductionDate() {
|
||||
return productionDate;
|
||||
}
|
||||
|
||||
public void setProductionDate(String productionDate) {
|
||||
this.productionDate = productionDate;
|
||||
}
|
||||
|
||||
|
||||
public String getWorkingHours() {
|
||||
return workingHours;
|
||||
}
|
||||
|
||||
public void setWorkingHours(String workingHours) {
|
||||
this.workingHours = workingHours;
|
||||
}
|
||||
|
||||
|
||||
public String getSerialNumber() {
|
||||
return serialNumber;
|
||||
}
|
||||
|
||||
public void setSerialNumber(String serialNumber) {
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
|
||||
public String getMonthLeasePrice() {
|
||||
return monthLeasePrice;
|
||||
}
|
||||
|
||||
public void setMonthLeasePrice(String monthLeasePrice) {
|
||||
this.monthLeasePrice = monthLeasePrice;
|
||||
}
|
||||
|
||||
|
||||
public String getDayLeasePrice() {
|
||||
return dayLeasePrice;
|
||||
}
|
||||
|
||||
public void setDayLeasePrice(String dayLeasePrice) {
|
||||
this.dayLeasePrice = dayLeasePrice;
|
||||
}
|
||||
|
||||
|
||||
public String getPicUrl() {
|
||||
return picUrl;
|
||||
}
|
||||
|
||||
public void setPicUrl(String picUrl) {
|
||||
this.picUrl = picUrl;
|
||||
}
|
||||
|
||||
|
||||
public String getJsMonthPrice() {
|
||||
return jsMonthPrice;
|
||||
}
|
||||
|
||||
public void setJsMonthPrice(String jsMonthPrice) {
|
||||
this.jsMonthPrice = jsMonthPrice;
|
||||
}
|
||||
|
||||
|
||||
public String getJsDayPrice() {
|
||||
return jsDayPrice;
|
||||
}
|
||||
|
||||
public void setJsDayPrice(String jsDayPrice) {
|
||||
this.jsDayPrice = jsDayPrice;
|
||||
}
|
||||
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
|
||||
public String getGpsCode() {
|
||||
return gpsCode;
|
||||
}
|
||||
|
||||
public void setGpsCode(String gpsCode) {
|
||||
this.gpsCode = gpsCode;
|
||||
}
|
||||
|
||||
|
||||
public long getOwnCo() {
|
||||
return ownCo;
|
||||
}
|
||||
|
||||
public void setOwnCo(long ownCo) {
|
||||
this.ownCo = ownCo;
|
||||
}
|
||||
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
|
||||
public long getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(long creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
|
||||
public double getDeposit() {
|
||||
return deposit;
|
||||
}
|
||||
|
||||
public void setDeposit(double deposit) {
|
||||
this.deposit = deposit;
|
||||
}
|
||||
|
||||
|
||||
public String getIsActive() {
|
||||
return isActive;
|
||||
}
|
||||
|
||||
public void setIsActive(String isActive) {
|
||||
this.isActive = isActive;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
package com.bonus.zlpt.common.core.domain;
|
||||
|
||||
|
||||
public class MaHotSearch {
|
||||
|
||||
private long id;
|
||||
private long maId;
|
||||
private long searchNum;
|
||||
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public long getMaId() {
|
||||
return maId;
|
||||
}
|
||||
|
||||
public void setMaId(long maId) {
|
||||
this.maId = maId;
|
||||
}
|
||||
|
||||
|
||||
public long getSearchNum() {
|
||||
return searchNum;
|
||||
}
|
||||
|
||||
public void setSearchNum(long searchNum) {
|
||||
this.searchNum = searchNum;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
package com.bonus.zlpt.common.core.domain;
|
||||
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MaTypeInfo {
|
||||
|
||||
|
||||
/**
|
||||
* 类型id
|
||||
*/
|
||||
private long typeId;
|
||||
/**
|
||||
* 父级id
|
||||
*/
|
||||
private long parentId;
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
private String typeName;
|
||||
/**
|
||||
* 层级
|
||||
*/
|
||||
private String level;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private String sort;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String isActive;
|
||||
|
||||
/** 父部门名称 */
|
||||
private String parentName;
|
||||
|
||||
/** 子部门 */
|
||||
private List<MaTypeInfo> children = new ArrayList<MaTypeInfo>();
|
||||
|
||||
|
||||
public long getTypeId() {
|
||||
return typeId;
|
||||
}
|
||||
|
||||
public void setTypeId(long typeId) {
|
||||
this.typeId = typeId;
|
||||
}
|
||||
|
||||
|
||||
public long getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
public void setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(String level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(String sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
|
||||
public String getIsActive() {
|
||||
return isActive;
|
||||
}
|
||||
|
||||
public void setIsActive(String isActive) {
|
||||
this.isActive = isActive;
|
||||
}
|
||||
|
||||
public String getParentName() {
|
||||
return parentName;
|
||||
}
|
||||
|
||||
public void setParentName(String parentName) {
|
||||
this.parentName = parentName;
|
||||
}
|
||||
|
||||
public List<MaTypeInfo> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<MaTypeInfo> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,9 @@ import com.bonus.zlpt.common.core.web.domain.BaseEntity;
|
|||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备类型对象 ma_type_info
|
||||
*
|
||||
|
|
@ -45,4 +48,10 @@ public class TypeInfo extends BaseEntity
|
|||
@Excel(name = "是否删除")
|
||||
private String isActive;
|
||||
|
||||
/** 父部门名称 */
|
||||
private String parentName;
|
||||
|
||||
/** 子部门 */
|
||||
private List<TypeInfo> children = new ArrayList<TypeInfo>();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
package com.bonus.zlpt.common.core.domain.equip.vo;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.equip.DevInfo;
|
||||
|
||||
public class DevInfoVo extends DevInfo {
|
||||
|
||||
private long parentId;
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
package com.bonus.zlpt.common.core.domain.vo;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.MaDevInfo;
|
||||
|
||||
public class MaDevInfoVo extends MaDevInfo {
|
||||
|
||||
private long parentId;
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
package com.bonus.zlpt.company.controller;
|
||||
import com.bonus.zlpt.common.core.domain.MaTypeInfo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.TypeInfo;
|
||||
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
||||
import com.bonus.zlpt.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.zlpt.common.core.web.page.TableDataInfo;
|
||||
|
|
@ -98,7 +98,7 @@ public class MaUpOffController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/getEquipmentType")
|
||||
public TableDataInfo getEquipmentType() {
|
||||
List<MaTypeInfo> list = maTypeInfoSevice.getMaTypeInfoList();
|
||||
List<TypeInfo> list = maTypeInfoSevice.getMaTypeInfoList();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package com.bonus.zlpt.home.controller;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.MaDevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.vo.MaDevInfoVo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.DevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
|
||||
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
||||
import com.bonus.zlpt.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.zlpt.home.service.MaDevInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
|
@ -29,8 +28,8 @@ public class MaDevInfoController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/getEquipmentList")
|
||||
public TableDataInfo getEquipmentList(@Validated @RequestBody MaDevInfo maDevInfo) {
|
||||
List<MaDevInfoVo> list = maDevInfoService.getEquipmentList(maDevInfo);
|
||||
public TableDataInfo getEquipmentList(@Validated @RequestBody DevInfo maDevInfo) {
|
||||
List<DevInfoVo> list = maDevInfoService.getEquipmentList(maDevInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
package com.bonus.zlpt.home.controller;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.MaDevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.MaTypeInfo;
|
||||
import com.bonus.zlpt.common.core.domain.vo.MaDevInfoVo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
|
||||
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
||||
import com.bonus.zlpt.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.zlpt.home.service.MaHotSearchService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
|
@ -31,11 +28,11 @@ public class MaHotSearchController extends BaseController {
|
|||
public TableDataInfo getHotEquipList(@Validated @RequestBody String more) {
|
||||
//获取更多
|
||||
if (more!=null && more != ""){
|
||||
List<MaDevInfoVo> list = maHotSearchService.getHotEquipList();
|
||||
List<DevInfoVo> list = maHotSearchService.getHotEquipList();
|
||||
return getDataTable(list);
|
||||
}
|
||||
//获取热搜前四的装备
|
||||
List<MaDevInfoVo> list = maHotSearchService.getHotEquipFourList();
|
||||
List<DevInfoVo> list = maHotSearchService.getHotEquipFourList();
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,10 @@
|
|||
package com.bonus.zlpt.home.controller;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.MaDevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.MaTypeInfo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.TypeInfo;
|
||||
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
||||
import com.bonus.zlpt.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.zlpt.home.service.MaTypeInfoSevice;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
|
@ -28,7 +24,7 @@ public class MaTypeInfoController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/getEquipmentType")
|
||||
public TableDataInfo getEquipmentType() {
|
||||
List<MaTypeInfo> list = maTypeInfoSevice.getMaTypeInfoList();
|
||||
List<TypeInfo> list = maTypeInfoSevice.getMaTypeInfoList();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package com.bonus.zlpt.home.mapper;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.MaDevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.vo.MaDevInfoVo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.DevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaDevInfoMapper {
|
||||
public List<MaDevInfoVo> getEquipmentList(MaDevInfo maDevInfo);
|
||||
public List<DevInfoVo> getEquipmentList(DevInfo maDevInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package com.bonus.zlpt.home.mapper;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.vo.MaDevInfoVo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaHotSearchMapper {
|
||||
public List<MaDevInfoVo> getHotEquipList();
|
||||
public List<DevInfoVo> getHotEquipList();
|
||||
|
||||
public List<MaDevInfoVo> getHotEquipFourList();
|
||||
public List<DevInfoVo> getHotEquipFourList();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package com.bonus.zlpt.home.mapper;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.MaTypeInfo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.TypeInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaTypeInfoMapper {
|
||||
public List<MaTypeInfo> getMaTypeInfoList() ;
|
||||
public List<TypeInfo> getMaTypeInfoList() ;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package com.bonus.zlpt.home.service;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.MaDevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.vo.MaDevInfoVo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.DevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaDevInfoService {
|
||||
public List<MaDevInfoVo> getEquipmentList(MaDevInfo maDevInfo);
|
||||
public List<DevInfoVo> getEquipmentList(DevInfo maDevInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package com.bonus.zlpt.home.service;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.vo.MaDevInfoVo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaHotSearchService {
|
||||
public List<MaDevInfoVo> getHotEquipList();
|
||||
public List<DevInfoVo> getHotEquipList();
|
||||
|
||||
public List<MaDevInfoVo> getHotEquipFourList();
|
||||
public List<DevInfoVo> getHotEquipFourList();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package com.bonus.zlpt.home.service;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.MaDevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.MaTypeInfo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.TypeInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaTypeInfoSevice {
|
||||
public List<MaTypeInfo> getMaTypeInfoList();
|
||||
public List<TypeInfo> getMaTypeInfoList();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
package com.bonus.zlpt.home.service.impl;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.MaDevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.vo.MaDevInfoVo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.DevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
|
||||
import com.bonus.zlpt.home.mapper.MaDevInfoMapper;
|
||||
import com.bonus.zlpt.home.service.MaDevInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -16,7 +15,7 @@ public class MaDevInfoServiceImpl implements MaDevInfoService {
|
|||
@Resource
|
||||
private MaDevInfoMapper maDevInfoMapper;
|
||||
@Override
|
||||
public List<MaDevInfoVo> getEquipmentList(MaDevInfo maDevInfo) {
|
||||
public List<DevInfoVo> getEquipmentList(DevInfo maDevInfo) {
|
||||
return maDevInfoMapper.getEquipmentList(maDevInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
package com.bonus.zlpt.home.service.impl;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.vo.MaDevInfoVo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
|
||||
import com.bonus.zlpt.home.mapper.MaHotSearchMapper;
|
||||
import com.bonus.zlpt.home.service.MaHotSearchService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -17,12 +16,12 @@ public class MaHotSearchServiceImpl implements MaHotSearchService {
|
|||
|
||||
|
||||
@Override
|
||||
public List<MaDevInfoVo> getHotEquipList() {
|
||||
public List<DevInfoVo> getHotEquipList() {
|
||||
return maHotSearchMapper.getHotEquipList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MaDevInfoVo> getHotEquipFourList() {
|
||||
public List<DevInfoVo> getHotEquipFourList() {
|
||||
return maHotSearchMapper.getHotEquipFourList();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
package com.bonus.zlpt.home.service.impl;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.MaDevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.MaTypeInfo;
|
||||
import com.bonus.zlpt.home.mapper.MaDevInfoMapper;
|
||||
import com.bonus.zlpt.common.core.domain.equip.TypeInfo;
|
||||
import com.bonus.zlpt.home.mapper.MaTypeInfoMapper;
|
||||
import com.bonus.zlpt.home.service.MaTypeInfoSevice;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -22,10 +19,10 @@ public class MaTypeInfoServiceImpl implements MaTypeInfoSevice {
|
|||
|
||||
|
||||
@Override
|
||||
public List<MaTypeInfo> getMaTypeInfoList() {
|
||||
List<MaTypeInfo> maTypeInfoList = maTypeInfoMapper.getMaTypeInfoList();
|
||||
public List<TypeInfo> getMaTypeInfoList() {
|
||||
List<TypeInfo> maTypeInfoList = maTypeInfoMapper.getMaTypeInfoList();
|
||||
|
||||
List<MaTypeInfo> menuTree = buildMenuTree(maTypeInfoList);
|
||||
List<TypeInfo> menuTree = buildMenuTree(maTypeInfoList);
|
||||
return menuTree;
|
||||
}
|
||||
|
||||
|
|
@ -35,13 +32,13 @@ public class MaTypeInfoServiceImpl implements MaTypeInfoSevice {
|
|||
* @param
|
||||
* @return
|
||||
*/
|
||||
private List<MaTypeInfo> buildMenuTree(List<MaTypeInfo> maTypeInfoList) {
|
||||
private List<TypeInfo> buildMenuTree(List<TypeInfo> maTypeInfoList) {
|
||||
//用于存放根菜单
|
||||
List<MaTypeInfo> rootMenus = new ArrayList<>();
|
||||
Map<Long, List<MaTypeInfo>> menuMap = new HashMap<>();
|
||||
List<TypeInfo> rootMenus = new ArrayList<>();
|
||||
Map<Long, List<TypeInfo>> menuMap = new HashMap<>();
|
||||
|
||||
// 将菜单按照父菜单ID分组,放在menuMap中
|
||||
for (MaTypeInfo maTypeInfo : maTypeInfoList) {
|
||||
for (TypeInfo maTypeInfo : maTypeInfoList) {
|
||||
Long parentId = maTypeInfo.getParentId() != ' ' ? maTypeInfo.getParentId() : 0;
|
||||
if (!menuMap.containsKey(parentId)) {
|
||||
menuMap.put(parentId, new ArrayList<>());
|
||||
|
|
@ -52,7 +49,7 @@ public class MaTypeInfoServiceImpl implements MaTypeInfoSevice {
|
|||
// 从根菜单开始,构建菜单树
|
||||
rootMenus.addAll(menuMap.getOrDefault(0, new ArrayList<>()));
|
||||
System.out.println("rootMenus: "+rootMenus);
|
||||
for (MaTypeInfo maTypeInfo : rootMenus) {
|
||||
for (TypeInfo maTypeInfo : rootMenus) {
|
||||
buildSubMenuTree(maTypeInfo, menuMap);
|
||||
}
|
||||
|
||||
|
|
@ -64,12 +61,12 @@ public class MaTypeInfoServiceImpl implements MaTypeInfoSevice {
|
|||
* @param maTypeInfo
|
||||
* @param menuMap
|
||||
*/
|
||||
private void buildSubMenuTree(MaTypeInfo maTypeInfo, Map<Long, List<MaTypeInfo>> menuMap) {
|
||||
private void buildSubMenuTree(TypeInfo maTypeInfo, Map<Long, List<TypeInfo>> menuMap) {
|
||||
//获取根菜单的子节点列表
|
||||
List<MaTypeInfo> children = menuMap.getOrDefault(maTypeInfo.getTypeId(), new ArrayList<>());
|
||||
List<TypeInfo> children = menuMap.getOrDefault(maTypeInfo.getTypeId(), new ArrayList<>());
|
||||
//Collections.sort(children);
|
||||
maTypeInfo.setChildren(children);
|
||||
for (MaTypeInfo maTypeInfoChildren : children) {
|
||||
for (TypeInfo maTypeInfoChildren : children) {
|
||||
buildSubMenuTree(maTypeInfoChildren, menuMap);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.zlpt.home.mapper.MaDevInfoMapper">
|
||||
|
||||
<resultMap type="com.bonus.zlpt.common.core.domain.MaDevInfo" id="MaDevInfoResult">
|
||||
<resultMap type="com.bonus.zlpt.common.core.domain.equip.DevInfo" id="MaDevInfoResult">
|
||||
<id property="maId" column="ma_id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="typeId" column="type_id" />
|
||||
|
|
@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
|
||||
<select id="getEquipmentList" resultType="com.bonus.zlpt.common.core.domain.vo.MaDevInfoVo">
|
||||
<select id="getEquipmentList" resultType="com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo">
|
||||
select d.ma_id, d.code, d.type_id, d.ma_status, d.lease_scope, d.location, d.brand, d.model_name,
|
||||
d.production_date, d.working_hours, d.serial_number, d.month_lease_price, d.day_lease_price,
|
||||
d.pic_url, d.js_month_price, d.js_day_price, d.description, d.gps_code, d.own_co, d.create_time,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.zlpt.home.mapper.MaHotSearchMapper">
|
||||
|
||||
<resultMap type="com.bonus.zlpt.common.core.domain.vo.MaDevInfoVo" id="MaDevInfoResult">
|
||||
<resultMap type="com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo" id="MaDevInfoResult">
|
||||
<id property="maId" column="ma_id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="typeId" column="type_id" />
|
||||
|
|
@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
|
||||
<select id="getHotEquipList" resultType="com.bonus.zlpt.common.core.domain.vo.MaDevInfoVo">
|
||||
<select id="getHotEquipList" resultType="com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo">
|
||||
select d.ma_id, d.code, d.type_id, d.ma_status, d.lease_scope, d.location, d.brand, d.model_name,
|
||||
d.production_date, d.working_hours, d.serial_number, d.month_lease_price, d.day_lease_price,
|
||||
d.pic_url, d.js_month_price, d.js_day_price, d.description, d.gps_code, d.own_co, d.create_time,
|
||||
|
|
@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
</select>
|
||||
|
||||
<select id="getHotEquipFourList" resultType="com.bonus.zlpt.common.core.domain.vo.MaDevInfoVo">
|
||||
<select id="getHotEquipFourList" resultType="com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo">
|
||||
select d.ma_id, d.code, d.type_id, d.ma_status, d.lease_scope, d.location, d.brand, d.model_name,
|
||||
d.production_date, d.working_hours, d.serial_number, d.month_lease_price, d.day_lease_price,
|
||||
d.pic_url, d.js_month_price, d.js_day_price, d.description, d.gps_code, d.own_co, d.create_time,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.zlpt.home.mapper.MaDevInfoMapper">
|
||||
|
||||
<resultMap type="com.bonus.zlpt.common.core.domain.MaDevInfo" id="MaDevInfoResult">
|
||||
<resultMap type="com.bonus.zlpt.common.core.domain.equip.DevInfo" id="MaDevInfoResult">
|
||||
|
||||
<id property="typeId" column="type_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
|
|
@ -19,12 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from ma_type_info
|
||||
</sql>
|
||||
|
||||
<select id="getMaTypeInfoList" resultType="com.bonus.zlpt.common.core.domain.MaDevInfo">
|
||||
<select id="getMaTypeInfoList" resultType="com.bonus.zlpt.common.core.domain.equip.DevInfo">
|
||||
select type_id, parent_id, type_name, level, sort, is_active
|
||||
from ma_type_info
|
||||
</select>
|
||||
|
||||
<select id="getProjectInfo" parameterType="com.bonus.zlpt.common.core.domain.MaDevInfo" resultMap="MaDevInfoResult">
|
||||
<select id="getProjectInfo" parameterType="com.bonus.zlpt.common.core.domain.equip.DevInfo" resultMap="MaDevInfoResult">
|
||||
select pro_id, pro_name, status, type_id, link_man, telphone, dept_id, del_flag, create_by, create_time,
|
||||
update_by, update_time, remark, company_id
|
||||
from bm_project_info
|
||||
|
|
@ -76,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
|
||||
|
||||
<insert id="projectInfoAdd" parameterType="com.bonus.zlpt.common.core.domain.MaDevInfo">
|
||||
<insert id="projectInfoAdd" parameterType="com.bonus.zlpt.common.core.domain.equip.DevInfo">
|
||||
insert into bm_project_info (
|
||||
<if test="proName != null and proName != '' ">pro_name,</if>
|
||||
<if test="status != null and status != '' ">status,</if>
|
||||
|
|
@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateBmProjectInfo" parameterType="com.bonus.zlpt.common.core.domain.MaDevInfo">
|
||||
<update id="updateBmProjectInfo" parameterType="com.bonus.zlpt.common.core.domain.equip.DevInfo">
|
||||
update bm_project_info
|
||||
<set>
|
||||
<if test="proName != null and proName != ''">pro_name = #{proName},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue