【admin】新增#系统配置管理、设备管理关联客户
parent
c641fc8d37
commit
1d337b77e1
|
@ -0,0 +1,56 @@
|
||||||
|
package com.hcy.admin.controller.configuration;
|
||||||
|
|
||||||
|
import com.hcy.admin.config.aop.Log;
|
||||||
|
import com.hcy.admin.service.configuration.ISystemConfigurationService;
|
||||||
|
import com.hcy.admin.validate.configuration.SystemConfigurationParam;
|
||||||
|
import com.hcy.admin.validate.common.PageParam;
|
||||||
|
import com.hcy.admin.vo.configuration.SystemConfigurationListVo;
|
||||||
|
import com.hcy.admin.vo.configuration.SystemConfigurationDetailVo;
|
||||||
|
import com.hcy.common.core.AjaxResult;
|
||||||
|
import com.hcy.common.core.PageResult;
|
||||||
|
import com.hcy.common.validator.annotation.IDMust;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置管理管理
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("api/configuration")
|
||||||
|
public class SystemConfigurationController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ISystemConfigurationService iSystemConfigurationService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置管理详情
|
||||||
|
*
|
||||||
|
* @author hcy
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
|
@GetMapping("/detail")
|
||||||
|
public Object detail() {
|
||||||
|
SystemConfigurationDetailVo detail = iSystemConfigurationService.detail();
|
||||||
|
return AjaxResult.success(detail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置管理编辑
|
||||||
|
*
|
||||||
|
* @author hcy
|
||||||
|
* @param systemConfigurationParam 参数
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
|
@Log(title = "系统配置管理编辑")
|
||||||
|
@PostMapping("/edit")
|
||||||
|
public Object edit(@RequestBody SystemConfigurationParam systemConfigurationParam) {
|
||||||
|
iSystemConfigurationService.edit(systemConfigurationParam);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -117,8 +117,23 @@ public class EquipmentController {
|
||||||
* @param number
|
* @param number
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@PostMapping("generate/v2")
|
@GetMapping("generate/v2")
|
||||||
public String generateV2(String number) {
|
public String generateV2(String number) {
|
||||||
|
System.out.println(number);
|
||||||
return QRCodeUtil.createQRCodeToOutputStream(number);
|
return QRCodeUtil.createQRCodeToOutputStream(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联客户
|
||||||
|
*
|
||||||
|
* @author hcy
|
||||||
|
* @param equipmentParam 参数
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
|
@Log(title = "关联客户")
|
||||||
|
@PostMapping("/relevancyClient")
|
||||||
|
public Object relevancyClient(@RequestBody EquipmentParam equipmentParam) {
|
||||||
|
iEquipmentService.relevancyClient(equipmentParam);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -121,4 +122,16 @@ public class PlantController {
|
||||||
iPlantService.plantUnbound(plantParam);
|
iPlantService.plantUnbound(plantParam);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取全部工厂
|
||||||
|
*
|
||||||
|
* @author hcy
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
|
@GetMapping("/allList")
|
||||||
|
public Object allList() {
|
||||||
|
List<PlantListVo> plantListVos = iPlantService.allList();
|
||||||
|
return AjaxResult.success(plantListVos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.hcy.admin.service.configuration;
|
||||||
|
|
||||||
|
import com.hcy.admin.validate.common.PageParam;
|
||||||
|
import com.hcy.admin.validate.configuration.SystemConfigurationParam;
|
||||||
|
import com.hcy.admin.vo.configuration.SystemConfigurationListVo;
|
||||||
|
import com.hcy.admin.vo.configuration.SystemConfigurationDetailVo;
|
||||||
|
import com.hcy.common.core.PageResult;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置管理服务接口类
|
||||||
|
*/
|
||||||
|
public interface ISystemConfigurationService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置管理详情
|
||||||
|
*
|
||||||
|
* @author hcy
|
||||||
|
* @return SystemConfiguration
|
||||||
|
*/
|
||||||
|
SystemConfigurationDetailVo detail();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置管理编辑
|
||||||
|
*
|
||||||
|
* @author hcy
|
||||||
|
* @param systemConfigurationParam 参数
|
||||||
|
*/
|
||||||
|
void edit(SystemConfigurationParam systemConfigurationParam);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.hcy.admin.service.configuration.impl;
|
||||||
|
|
||||||
|
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.github.yulichang.query.MPJQueryWrapper;
|
||||||
|
import com.hcy.admin.service.configuration.ISystemConfigurationService;
|
||||||
|
import com.hcy.admin.validate.common.PageParam;
|
||||||
|
import com.hcy.admin.validate.configuration.SystemConfigurationParam;
|
||||||
|
import com.hcy.admin.vo.configuration.SystemConfigurationListVo;
|
||||||
|
import com.hcy.admin.vo.configuration.SystemConfigurationDetailVo;
|
||||||
|
import com.hcy.common.core.PageResult;
|
||||||
|
import com.hcy.common.entity.configuration.SystemConfiguration;
|
||||||
|
import com.hcy.common.mapper.configuration.SystemConfigurationMapper;
|
||||||
|
import com.hcy.common.utils.ArrayUtil;
|
||||||
|
import com.hcy.common.utils.TimeUtil;
|
||||||
|
import com.hcy.common.utils.UrlUtil;
|
||||||
|
import com.hcy.common.config.GlobalConfig;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置管理实现类
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SystemConfigurationServiceImpl implements ISystemConfigurationService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
SystemConfigurationMapper systemConfigurationMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置管理详情
|
||||||
|
*
|
||||||
|
* @author hcy
|
||||||
|
* @return SystemConfiguration
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SystemConfigurationDetailVo detail() {
|
||||||
|
SystemConfiguration model = systemConfigurationMapper.selectOne(
|
||||||
|
new QueryWrapper<SystemConfiguration>()
|
||||||
|
.eq("id", 1)
|
||||||
|
.last("limit 1"));
|
||||||
|
|
||||||
|
SystemConfigurationDetailVo vo = new SystemConfigurationDetailVo();
|
||||||
|
BeanUtils.copyProperties(model, vo);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置管理编辑
|
||||||
|
*
|
||||||
|
* @author hcy
|
||||||
|
* @param systemConfigurationParam 参数
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void edit(SystemConfigurationParam systemConfigurationParam) {
|
||||||
|
SystemConfiguration model = systemConfigurationMapper.selectOne(
|
||||||
|
new QueryWrapper<SystemConfiguration>()
|
||||||
|
.eq("id", 1)
|
||||||
|
.last("limit 1"));
|
||||||
|
|
||||||
|
Assert.notNull(model, "数据不存在!");
|
||||||
|
|
||||||
|
model.setRepairerLocation(systemConfigurationParam.getRepairerLocation());
|
||||||
|
model.setRepairerMaxMileage(systemConfigurationParam.getRepairerMaxMileage());
|
||||||
|
model.setRepairerAutoOrderTime(systemConfigurationParam.getRepairerAutoOrderTime());
|
||||||
|
model.setRepairerRemind(systemConfigurationParam.getRepairerRemind());
|
||||||
|
model.setRepairerCommissionRate(systemConfigurationParam.getRepairerCommissionRate());
|
||||||
|
model.setMaintenanceLocation(systemConfigurationParam.getMaintenanceLocation());
|
||||||
|
model.setMaintenanceMaxMileage(systemConfigurationParam.getMaintenanceMaxMileage());
|
||||||
|
model.setMaintenanceAutoOrderTime(systemConfigurationParam.getMaintenanceAutoOrderTime());
|
||||||
|
model.setMaintenanceRemind(systemConfigurationParam.getMaintenanceRemind());
|
||||||
|
model.setMaintenanceCommissionRate(systemConfigurationParam.getMaintenanceCommissionRate());
|
||||||
|
systemConfigurationMapper.updateById(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -62,4 +62,10 @@ public interface IEquipmentService {
|
||||||
* @param ids
|
* @param ids
|
||||||
*/
|
*/
|
||||||
void stateEdit(List<Integer> ids);
|
void stateEdit(List<Integer> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联客户
|
||||||
|
* @param equipmentParam
|
||||||
|
*/
|
||||||
|
void relevancyClient(EquipmentParam equipmentParam);
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
|
||||||
Assert.notNull(model, "数据不存在!");
|
Assert.notNull(model, "数据不存在!");
|
||||||
|
|
||||||
model.setId(equipmentParam.getId());
|
model.setId(equipmentParam.getId());
|
||||||
model.setUserId(equipmentParam.getUserId());
|
model.setClientId(equipmentParam.getClientId());
|
||||||
model.setModuleId(equipmentParam.getModuleId());
|
model.setModuleId(equipmentParam.getModuleId());
|
||||||
model.setNumber(equipmentParam.getNumber());
|
model.setNumber(equipmentParam.getNumber());
|
||||||
model.setName(equipmentParam.getName());
|
model.setName(equipmentParam.getName());
|
||||||
|
@ -210,4 +210,23 @@ public class EquipmentServiceImpl implements IEquipmentService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联客户
|
||||||
|
*
|
||||||
|
* @param equipmentParam
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void relevancyClient(EquipmentParam equipmentParam) {
|
||||||
|
Equipment model = equipmentMapper.selectOne(
|
||||||
|
new QueryWrapper<Equipment>()
|
||||||
|
.eq("id", equipmentParam.getId())
|
||||||
|
.eq("is_delete", 0)
|
||||||
|
.last("limit 1"));
|
||||||
|
|
||||||
|
Assert.notNull(model, "数据不存在!");
|
||||||
|
model.setClientId(equipmentParam.getClientId());//用户id
|
||||||
|
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||||
|
equipmentMapper.updateById(model);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,4 +68,10 @@ public interface IPlantService {
|
||||||
* @param plantParam
|
* @param plantParam
|
||||||
*/
|
*/
|
||||||
void plantUnbound(PlantParam plantParam);
|
void plantUnbound(PlantParam plantParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取全部工厂
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PlantListVo> allList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,4 +292,26 @@ public class PlantServiceImpl implements IPlantService {
|
||||||
plantMapper.updateById(model);
|
plantMapper.updateById(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取全部工厂
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PlantListVo> allList() {
|
||||||
|
QueryWrapper<Plant> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("is_delete", 0);
|
||||||
|
queryWrapper.orderByDesc(Arrays.asList("sort", "id"));
|
||||||
|
|
||||||
|
List<Plant> plants = plantMapper.selectList(queryWrapper);
|
||||||
|
List<PlantListVo> list = new LinkedList<>();
|
||||||
|
for(Plant item : plants) {
|
||||||
|
PlantListVo vo = new PlantListVo();
|
||||||
|
BeanUtils.copyProperties(item, vo);
|
||||||
|
list.add(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,12 +23,9 @@ public class SettingProtocolServiceImpl implements ISettingProtocolService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Map<String, String>> detail() {
|
public Map<String, Map<String, String>> detail() {
|
||||||
String service = ConfigUtil.get("protocol", "service", "{\"name\":\"\",\"content\":\"\"}");
|
String contract = ConfigUtil.get("protocol", "contract", "{\"name\":\"\",\"content\":\"\"}");
|
||||||
String privacy = ConfigUtil.get("protocol", "privacy", "{\"name\":\"\",\"content\":\"\"}");
|
|
||||||
|
|
||||||
Map<String, Map<String, String>> map = new LinkedHashMap<>();
|
Map<String, Map<String, String>> map = new LinkedHashMap<>();
|
||||||
map.put("service", ToolsUtil.jsonToMap(service));
|
map.put("contract", ToolsUtil.jsonToMap(contract));
|
||||||
map.put("privacy", ToolsUtil.jsonToMap(privacy));
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,8 +37,7 @@ public class SettingProtocolServiceImpl implements ISettingProtocolService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void save(Map<String, Object> params) {
|
public void save(Map<String, Object> params) {
|
||||||
ConfigUtil.set("protocol","service", JSON.toJSONString(params.get("service")));
|
ConfigUtil.set("protocol","contract", JSON.toJSONString(params.get("contract")));
|
||||||
ConfigUtil.set("protocol","privacy", JSON.toJSONString(params.get("privacy")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.github.yulichang.query.MPJQueryWrapper;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.hcy.admin.AdminThreadLocal;
|
import com.hcy.admin.AdminThreadLocal;
|
||||||
import com.hcy.admin.config.AdminConfig;
|
import com.hcy.admin.config.AdminConfig;
|
||||||
|
import com.hcy.admin.service.region.IDevRegionService;
|
||||||
import com.hcy.admin.service.system.ISystemAuthAdminService;
|
import com.hcy.admin.service.system.ISystemAuthAdminService;
|
||||||
import com.hcy.admin.service.system.ISystemAuthPermService;
|
import com.hcy.admin.service.system.ISystemAuthPermService;
|
||||||
import com.hcy.admin.service.system.ISystemAuthRoleService;
|
import com.hcy.admin.service.system.ISystemAuthRoleService;
|
||||||
|
@ -57,6 +58,9 @@ public class SystemAuthAdminServiceImpl implements ISystemAuthAdminService {
|
||||||
@Resource
|
@Resource
|
||||||
PlantMapper plantMapper;
|
PlantMapper plantMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
IDevRegionService regionService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据账号查找管理员
|
* 根据账号查找管理员
|
||||||
*
|
*
|
||||||
|
@ -251,6 +255,19 @@ public class SystemAuthAdminServiceImpl implements ISystemAuthAdminService {
|
||||||
vo.setUpdateTime(TimeUtil.timestampToDate(sysAdmin.getUpdateTime()));
|
vo.setUpdateTime(TimeUtil.timestampToDate(sysAdmin.getUpdateTime()));
|
||||||
vo.setLastLoginTime(TimeUtil.timestampToDate(sysAdmin.getLastLoginTime()));
|
vo.setLastLoginTime(TimeUtil.timestampToDate(sysAdmin.getLastLoginTime()));
|
||||||
|
|
||||||
|
Plant model = plantMapper.selectOne(
|
||||||
|
new QueryWrapper<Plant>()
|
||||||
|
.eq("id", sysAdmin.getPlantId())
|
||||||
|
.eq("is_delete", 0)
|
||||||
|
.last("limit 1"));
|
||||||
|
if(model != null){
|
||||||
|
vo.setPlantName(model.getName()); //工厂名
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<Long, String> regionMap = regionService.getRegionMap();
|
||||||
|
vo.setProvince(regionMap.get(sysAdmin.getProvinceId()));
|
||||||
|
vo.setCity(regionMap.get(sysAdmin.getCityId()));
|
||||||
|
vo.setDistrict(regionMap.get(sysAdmin.getDistrictId()));
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,6 +312,11 @@ public class SystemAuthAdminServiceImpl implements ISystemAuthAdminService {
|
||||||
model.setPassword(pwd);
|
model.setPassword(pwd);
|
||||||
model.setSalt(salt);
|
model.setSalt(salt);
|
||||||
model.setSort(systemAuthAdminParam.getSort());
|
model.setSort(systemAuthAdminParam.getSort());
|
||||||
|
model.setPhone(systemAuthAdminParam.getPhone());
|
||||||
|
model.setPlantId(systemAuthAdminParam.getPlantId());
|
||||||
|
model.setProvinceId(systemAuthAdminParam.getProvinceId());
|
||||||
|
model.setCityId(systemAuthAdminParam.getCityId());
|
||||||
|
model.setDistrictId(systemAuthAdminParam.getDistrictId());
|
||||||
model.setIsMultipoint(systemAuthAdminParam.getIsMultipoint());
|
model.setIsMultipoint(systemAuthAdminParam.getIsMultipoint());
|
||||||
model.setIsDisable(systemAuthAdminParam.getIsDisable());
|
model.setIsDisable(systemAuthAdminParam.getIsDisable());
|
||||||
model.setCreateTime(System.currentTimeMillis() / 1000);
|
model.setCreateTime(System.currentTimeMillis() / 1000);
|
||||||
|
@ -344,6 +366,11 @@ public class SystemAuthAdminServiceImpl implements ISystemAuthAdminService {
|
||||||
model.setAvatar(UrlUtil.toRelativeUrl(systemAuthAdminParam.getAvatar()));
|
model.setAvatar(UrlUtil.toRelativeUrl(systemAuthAdminParam.getAvatar()));
|
||||||
model.setRole(systemAuthAdminParam.getId() == 1 ? 0 : systemAuthAdminParam.getRole());
|
model.setRole(systemAuthAdminParam.getId() == 1 ? 0 : systemAuthAdminParam.getRole());
|
||||||
model.setSort(systemAuthAdminParam.getSort());
|
model.setSort(systemAuthAdminParam.getSort());
|
||||||
|
model.setPhone(systemAuthAdminParam.getPhone());
|
||||||
|
model.setPlantId(systemAuthAdminParam.getPlantId());
|
||||||
|
model.setProvinceId(systemAuthAdminParam.getProvinceId());
|
||||||
|
model.setCityId(systemAuthAdminParam.getCityId());
|
||||||
|
model.setDistrictId(systemAuthAdminParam.getDistrictId());
|
||||||
model.setIsMultipoint(systemAuthAdminParam.getIsMultipoint());
|
model.setIsMultipoint(systemAuthAdminParam.getIsMultipoint());
|
||||||
model.setIsDisable(systemAuthAdminParam.getIsDisable());
|
model.setIsDisable(systemAuthAdminParam.getIsDisable());
|
||||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
package com.hcy.admin.validate.configuration;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置管理参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class SystemConfigurationParam implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public interface create{}
|
||||||
|
public interface update{}
|
||||||
|
public interface delete{}
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@NotNull(message = "repairerLocation参数缺失", groups = {create.class, update.class})
|
||||||
|
@DecimalMin(value = "0", message = "repairerLocation参数值不能少于0", groups = {create.class, update.class})
|
||||||
|
private Integer repairerLocation;
|
||||||
|
|
||||||
|
@NotNull(message = "repairerMaxMileage参数缺失", groups = {create.class, update.class})
|
||||||
|
@DecimalMin(value = "0", message = "repairerMaxMileage参数值不能少于0", groups = {create.class, update.class})
|
||||||
|
private Integer repairerMaxMileage;
|
||||||
|
|
||||||
|
@NotNull(message = "repairerAutoOrderTime参数缺失", groups = {create.class, update.class})
|
||||||
|
@DecimalMin(value = "0", message = "repairerAutoOrderTime参数值不能少于0", groups = {create.class, update.class})
|
||||||
|
private Integer repairerAutoOrderTime;
|
||||||
|
|
||||||
|
@NotNull(message = "repairerRemind参数缺失", groups = {create.class, update.class})
|
||||||
|
@DecimalMin(value = "0", message = "repairerRemind参数值不能少于0", groups = {create.class, update.class})
|
||||||
|
private Integer repairerRemind;
|
||||||
|
|
||||||
|
@NotNull(message = "repairerCommissionRate参数缺失", groups = {create.class, update.class})
|
||||||
|
@DecimalMin(value = "0", message = "repairerCommissionRate参数值不能少于0", groups = {create.class, update.class})
|
||||||
|
private Integer repairerCommissionRate;
|
||||||
|
|
||||||
|
@NotNull(message = "maintenanceLocation参数缺失", groups = {create.class, update.class})
|
||||||
|
@DecimalMin(value = "0", message = "maintenanceLocation参数值不能少于0", groups = {create.class, update.class})
|
||||||
|
private Integer maintenanceLocation;
|
||||||
|
|
||||||
|
@NotNull(message = "maintenanceMaxMileage参数缺失", groups = {create.class, update.class})
|
||||||
|
@DecimalMin(value = "0", message = "maintenanceMaxMileage参数值不能少于0", groups = {create.class, update.class})
|
||||||
|
private Integer maintenanceMaxMileage;
|
||||||
|
|
||||||
|
@NotNull(message = "maintenanceAutoOrderTime参数缺失", groups = {create.class, update.class})
|
||||||
|
@DecimalMin(value = "0", message = "maintenanceAutoOrderTime参数值不能少于0", groups = {create.class, update.class})
|
||||||
|
private Integer maintenanceAutoOrderTime;
|
||||||
|
|
||||||
|
@NotNull(message = "maintenanceRemind参数缺失", groups = {create.class, update.class})
|
||||||
|
@DecimalMin(value = "0", message = "maintenanceRemind参数值不能少于0", groups = {create.class, update.class})
|
||||||
|
private Integer maintenanceRemind;
|
||||||
|
|
||||||
|
@NotNull(message = "maintenanceCommissionRate参数缺失", groups = {create.class, update.class})
|
||||||
|
@DecimalMin(value = "0", message = "maintenanceCommissionRate参数值不能少于0", groups = {create.class, update.class})
|
||||||
|
private Integer maintenanceCommissionRate;
|
||||||
|
|
||||||
|
}
|
|
@ -27,7 +27,7 @@ public class EquipmentParam implements Serializable {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@DecimalMin(value = "0", message = "userId参数值不能少于0", groups = {create.class, update.class})
|
@DecimalMin(value = "0", message = "userId参数值不能少于0", groups = {create.class, update.class})
|
||||||
private Long userId;
|
private Long clientId;
|
||||||
|
|
||||||
@DecimalMin(value = "0", message = "moduleId参数值不能少于0", groups = {create.class, update.class})
|
@DecimalMin(value = "0", message = "moduleId参数值不能少于0", groups = {create.class, update.class})
|
||||||
private Long moduleId;
|
private Long moduleId;
|
||||||
|
|
|
@ -68,4 +68,10 @@ public class SystemAuthAdminParam implements Serializable {
|
||||||
|
|
||||||
private String avatar = "";
|
private String avatar = "";
|
||||||
|
|
||||||
|
private String phone; // 联系电话
|
||||||
|
private Integer plantId; // 管辖工厂
|
||||||
|
private Long provinceId; //省id
|
||||||
|
private Long cityId; //市id
|
||||||
|
private Long districtId; //区id
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.hcy.admin.vo.configuration;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SystemConfigurationVo
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SystemConfigurationDetailVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Long id; // 主键id
|
||||||
|
private Integer repairerLocation; // 检修员位置(每隔几分钟刷新)
|
||||||
|
private Integer repairerMaxMileage; // 检修员自动抢单最大公里数(公里)
|
||||||
|
private Integer repairerAutoOrderTime; // 检修员自动抢单时间(分钟)
|
||||||
|
private Integer repairerRemind; // 检修员系统提醒客服(0=开启,1=关闭)
|
||||||
|
private Integer repairerCommissionRate; // 检修员提成比例
|
||||||
|
private Integer maintenanceLocation; // 维修员位置(每隔几分钟刷新)
|
||||||
|
private Integer maintenanceMaxMileage; // 维修员自动抢单最大公里数(公里)
|
||||||
|
private Integer maintenanceAutoOrderTime; // 维修员自动抢单时间(分钟)
|
||||||
|
private Integer maintenanceRemind; // 维修员系统提现客服(0=开启,1-关闭)
|
||||||
|
private Integer maintenanceCommissionRate; // 维修员提成比例
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.hcy.admin.vo.configuration;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SystemConfigurationVo
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SystemConfigurationListVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Long id; // 主键id
|
||||||
|
private Integer repairerLocation; // 检修员位置(每隔几分钟刷新)
|
||||||
|
private Integer repairerMaxMileage; // 检修员自动抢单最大公里数(公里)
|
||||||
|
private Integer repairerAutoOrderTime; // 检修员自动抢单时间(分钟)
|
||||||
|
private Integer repairerRemind; // 检修员系统提醒客服(0=开启,1=关闭)
|
||||||
|
private Integer repairerCommissionRate; // 检修员提成比例
|
||||||
|
private Integer maintenanceLocation; // 维修员位置(每隔几分钟刷新)
|
||||||
|
private Integer maintenanceMaxMileage; // 维修员自动抢单最大公里数(公里)
|
||||||
|
private Integer maintenanceAutoOrderTime; // 维修员自动抢单时间(分钟)
|
||||||
|
private Integer maintenanceRemind; // 维修员系统提现客服(0=开启,1-关闭)
|
||||||
|
private Integer maintenanceCommissionRate; // 维修员提成比例
|
||||||
|
|
||||||
|
}
|
|
@ -13,7 +13,7 @@ public class EquipmentDetailVo implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private Long id; // 主键id
|
private Long id; // 主键id
|
||||||
private Long userId; // 用户id
|
private Long clientId; // 用户id
|
||||||
private Long moduleId; // 模块id
|
private Long moduleId; // 模块id
|
||||||
private String number; // 设备编号
|
private String number; // 设备编号
|
||||||
private String name; // 设备名称
|
private String name; // 设备名称
|
||||||
|
|
|
@ -13,7 +13,7 @@ public class EquipmentListVo implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private Long id; // 主键id
|
private Long id; // 主键id
|
||||||
private Long userId; // 用户id
|
private Long clientId; // 用户id
|
||||||
private Long moduleId; // 模块id
|
private Long moduleId; // 模块id
|
||||||
private String number; // 设备编号
|
private String number; // 设备编号
|
||||||
private String name; // 设备名称
|
private String name; // 设备名称
|
||||||
|
|
|
@ -20,6 +20,14 @@ public class SystemAuthAdminVo implements Serializable {
|
||||||
private String avatar; // 头像
|
private String avatar; // 头像
|
||||||
private String dept; // 部门
|
private String dept; // 部门
|
||||||
private String role; // 角色
|
private String role; // 角色
|
||||||
|
private String phone; // 联系电话
|
||||||
|
private Integer plantId; // 管辖工厂
|
||||||
|
private Long provinceId; //省id
|
||||||
|
private Long cityId; //市id
|
||||||
|
private Long districtId; //区id
|
||||||
|
private String province; //省
|
||||||
|
private String city; //市
|
||||||
|
private String district; //区
|
||||||
private Integer isMultipoint; // 多端登录: [0=否, 1=是]
|
private Integer isMultipoint; // 多端登录: [0=否, 1=是]
|
||||||
private Integer isDisable; // 是否禁用: [0=否, 1=是]
|
private Integer isDisable; // 是否禁用: [0=否, 1=是]
|
||||||
private String lastLoginIp; // 最后登录IP
|
private String lastLoginIp; // 最后登录IP
|
||||||
|
@ -27,4 +35,6 @@ public class SystemAuthAdminVo implements Serializable {
|
||||||
private String createTime; // 创建时间
|
private String createTime; // 创建时间
|
||||||
private String updateTime; // 更新时间
|
private String updateTime; // 更新时间
|
||||||
|
|
||||||
|
private String plantName; //工厂名
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -263,6 +263,10 @@
|
||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
<version>5.2.5</version>
|
<version>5.2.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tomcat.embed</groupId>
|
||||||
|
<artifactId>tomcat-embed-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.hcy.common.entity.configuration;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置管理实体
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SystemConfiguration implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value="id", type= IdType.AUTO)
|
||||||
|
private Long id; // 主键id
|
||||||
|
private Integer repairerLocation; // 检修员位置(每隔几分钟刷新)
|
||||||
|
private Integer repairerMaxMileage; // 检修员自动抢单最大公里数(公里)
|
||||||
|
private Integer repairerAutoOrderTime; // 检修员自动抢单时间(分钟)
|
||||||
|
private Integer repairerRemind; // 检修员系统提醒客服(0=开启,1=关闭)
|
||||||
|
private Integer repairerCommissionRate; // 检修员提成比例
|
||||||
|
private Integer maintenanceLocation; // 维修员位置(每隔几分钟刷新)
|
||||||
|
private Integer maintenanceMaxMileage; // 维修员自动抢单最大公里数(公里)
|
||||||
|
private Integer maintenanceAutoOrderTime; // 维修员自动抢单时间(分钟)
|
||||||
|
private Integer maintenanceRemind; // 维修员系统提现客服(0=开启,1-关闭)
|
||||||
|
private Integer maintenanceCommissionRate; // 维修员提成比例
|
||||||
|
|
||||||
|
}
|
|
@ -16,7 +16,7 @@ public class Equipment implements Serializable {
|
||||||
|
|
||||||
@TableId(value="id", type= IdType.AUTO)
|
@TableId(value="id", type= IdType.AUTO)
|
||||||
private Long id; // 主键id
|
private Long id; // 主键id
|
||||||
private Long userId; // 用户id
|
private Long clientId; // 用户id
|
||||||
private Long moduleId; // 模块id
|
private Long moduleId; // 模块id
|
||||||
private String number; // 设备编号
|
private String number; // 设备编号
|
||||||
private String name; // 设备名称
|
private String name; // 设备名称
|
||||||
|
|
|
@ -25,6 +25,11 @@ public class SystemAuthAdmin implements Serializable {
|
||||||
private String salt; // 角色主键
|
private String salt; // 角色主键
|
||||||
private Integer role; // 加密盐巴
|
private Integer role; // 加密盐巴
|
||||||
private Integer sort; // 排序编号
|
private Integer sort; // 排序编号
|
||||||
|
private String phone; // 联系电话
|
||||||
|
private Integer plantId; // 管辖工厂
|
||||||
|
private Long provinceId; //省id
|
||||||
|
private Long cityId; //市id
|
||||||
|
private Long districtId; //区id
|
||||||
private Integer isMultipoint; // 多端登录: [0=否, 1=是]
|
private Integer isMultipoint; // 多端登录: [0=否, 1=是]
|
||||||
private Integer isDisable; // 是否禁用: [0=否, 1=是]
|
private Integer isDisable; // 是否禁用: [0=否, 1=是]
|
||||||
private Integer isDelete; // 是否删除: [0=否, 1=是]
|
private Integer isDelete; // 是否删除: [0=否, 1=是]
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hcy.common.mapper.configuration;
|
||||||
|
|
||||||
|
import com.hcy.common.core.basics.IBaseMapper;
|
||||||
|
import com.hcy.common.entity.configuration.SystemConfiguration;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统配置管理Mapper
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface SystemConfigurationMapper extends IBaseMapper<SystemConfiguration> {
|
||||||
|
}
|
|
@ -77,7 +77,6 @@ public class QRCodeUtil {
|
||||||
/**
|
/**
|
||||||
* 生成QRCode并输出到输出流,通常用于输出到网页上进行显示
|
* 生成QRCode并输出到输出流,通常用于输出到网页上进行显示
|
||||||
* @param content 二维码内容
|
* @param content 二维码内容
|
||||||
* @param outputStream 输出流
|
|
||||||
*/
|
*/
|
||||||
public static String createQRCodeToOutputStream(String content) {
|
public static String createQRCodeToOutputStream(String content) {
|
||||||
if (ObjectUtils.isEmpty(content)) {
|
if (ObjectUtils.isEmpty(content)) {
|
||||||
|
|
Loading…
Reference in New Issue