初次提交
This commit is contained in:
parent
bccfdec337
commit
92528a70c1
|
@ -9,6 +9,7 @@
|
|||
<module name="springbootmybatis" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel target="11" />
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK" />
|
||||
</project>
|
|
@ -5,9 +5,14 @@
|
|||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="af4c07b7-4ec6-4591-87e0-621479a360cc" name="更改" comment="初次提交">
|
||||
<change afterPath="$PROJECT_DIR$/springbootmybatis.iml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/hivekion/baseData/service/impl/TblDataModelServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/hivekion/baseData/service/impl/TblDataModelServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/hivekion/baseData/service/impl/TblShipFuelServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/hivekion/baseData/service/impl/TblShipFuelServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/hivekion/common/encrypt/AESUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/hivekion/common/encrypt/AESUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/hivekion/system/controller/SysAuthorityController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/hivekion/system/controller/SysAuthorityController.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -24,10 +29,10 @@
|
|||
</MavenGeneralSettings>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectColorInfo"><![CDATA[{
|
||||
"customColor": "",
|
||||
"associatedIndex": 2
|
||||
}]]></component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"customColor": "",
|
||||
"associatedIndex": 2
|
||||
}</component>
|
||||
<component name="ProjectId" id="30xEDuypSMTWMYEEfYAu7JmzPDG" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
|
@ -35,18 +40,21 @@
|
|||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"Maven.springbootmybatis [clean].executor": "Run",
|
||||
"Maven.springbootmybatis [compile].executor": "Run",
|
||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"git-widget-placeholder": "master",
|
||||
"Spring Boot.DemoApplication.executor": "Run",
|
||||
"git-widget-placeholder": "main",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"project.structure.last.edited": "模块",
|
||||
"project.structure.last.edited": "项目",
|
||||
"project.structure.proportion": "0.15",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"settings.editor.selected.configurable": "MavenSettings",
|
||||
"settings.editor.selected.configurable": "reference.projectsettings.compiler.javacompiler",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
|
@ -74,7 +82,9 @@
|
|||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1754560710248</updated>
|
||||
<workItem from="1754560714503" duration="2050000" />
|
||||
<workItem from="1754560714503" duration="2195000" />
|
||||
<workItem from="1754563543522" duration="8000" />
|
||||
<workItem from="1754564611042" duration="517000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="初次提交">
|
||||
<option name="closed" value="true" />
|
||||
|
@ -84,7 +94,15 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1754561049395</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="2" />
|
||||
<task id="LOCAL-00002" summary="初次提交">
|
||||
<option name="closed" value="true" />
|
||||
<created>1754562853375</created>
|
||||
<option name="number" value="00002" />
|
||||
<option name="presentableId" value="LOCAL-00002" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1754562853375</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="3" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
@ -94,4 +112,8 @@
|
|||
<MESSAGE value="初次提交" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="初次提交" />
|
||||
</component>
|
||||
<component name="XSLT-Support.FileAssociations.UIState">
|
||||
<expand />
|
||||
<select />
|
||||
</component>
|
||||
</project>
|
4
pom.xml
4
pom.xml
|
@ -16,8 +16,8 @@
|
|||
</parent>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<!--编译时的编码-->
|
||||
|
|
|
@ -20,12 +20,13 @@ import com.hivekion.common.entity.PagedResultVo;
|
|||
import com.hivekion.common.exception.BusinessException;
|
||||
import com.hivekion.dicData.service.IDicDataModelCategoryService;
|
||||
import com.hivekion.dicData.service.IDicOperatorCountryService;
|
||||
import java.util.Base64;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
@ -123,8 +124,8 @@ public class TblDataModelServiceImpl extends ServiceImpl<TblDataModelMapper, Tbl
|
|||
try {
|
||||
String contentType = file.getContentType();
|
||||
byte[] imageBytes = file.getBytes();
|
||||
BASE64Encoder base64Encoder =new BASE64Encoder();
|
||||
imageBaseStr = "data:" + contentType + ";base64," + base64Encoder.encode(imageBytes);
|
||||
|
||||
imageBaseStr = "data:" + contentType + ";base64," + Base64.getEncoder().encodeToString(imageBytes);
|
||||
imageBaseStr = imageBaseStr.replaceAll("[\\s*\t\n\r]", "");
|
||||
return imageBaseStr;
|
||||
} catch (IOException e) {
|
||||
|
|
|
@ -2,13 +2,9 @@ package com.hivekion.baseData.service.impl;
|
|||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hivekion.baseData.domain.TblAircraftFuel;
|
||||
import com.hivekion.baseData.domain.TblAircraftFuelVo.TblAircraftFuelAddInputVo;
|
||||
import com.hivekion.baseData.domain.TblCommVo.TblCommViewVo;
|
||||
import com.hivekion.baseData.domain.TblFuel;
|
||||
import com.hivekion.baseData.domain.TblFuelVo.TblFuelViewVo;
|
||||
import com.hivekion.baseData.domain.TblPropulsionVo.TblPropulsionViewVo;
|
||||
import com.hivekion.baseData.domain.TblShip;
|
||||
import com.hivekion.baseData.domain.TblShipFuel;
|
||||
import com.hivekion.baseData.domain.TblShipVo.TblShipFuelAddInputVo;
|
||||
import com.hivekion.baseData.mapper.TblFuelMapper;
|
||||
|
@ -17,34 +13,35 @@ import com.hivekion.baseData.service.ITblShipFuelService;
|
|||
import com.hivekion.baseData.service.ITblShipPropulsionService;
|
||||
import com.hivekion.common.exception.BusinessException;
|
||||
import com.hivekion.dicData.service.IDicFuelTypeService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.ws.Action;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class TblShipFuelServiceImpl extends ServiceImpl<TblShipFuelMapper, TblShipFuel> implements ITblShipFuelService {
|
||||
public class TblShipFuelServiceImpl extends ServiceImpl<TblShipFuelMapper, TblShipFuel> implements
|
||||
ITblShipFuelService {
|
||||
|
||||
@Autowired
|
||||
private TblFuelMapper fuelMapper;
|
||||
@Autowired
|
||||
private IDicFuelTypeService fuelTypeService;
|
||||
@Autowired
|
||||
private ITblShipPropulsionService propulsionService;
|
||||
|
||||
@Override
|
||||
public List<TblFuelViewVo> getList(String Guid) {
|
||||
LambdaQueryWrapper<TblShipFuel> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TblShipFuel::getGuid,Guid);
|
||||
wrapper.eq(TblShipFuel::getGuid, Guid);
|
||||
List<TblShipFuel> list = this.list(wrapper);
|
||||
List<TblFuelViewVo> result = new ArrayList<>();
|
||||
for (TblShipFuel Fuels : list) {
|
||||
TblFuel tblFuel = fuelMapper.selectById(Fuels.getComponentId());
|
||||
TblFuelViewVo vo = new TblFuelViewVo();
|
||||
BeanUtils.copyProperties(tblFuel,vo);
|
||||
BeanUtils.copyProperties(tblFuel, vo);
|
||||
vo.setType(fuelTypeService.getName(tblFuel.getType()));
|
||||
result.add(vo);
|
||||
}
|
||||
|
@ -52,14 +49,15 @@ public class TblShipFuelServiceImpl extends ServiceImpl<TblShipFuelMapper, TblSh
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(String Guid, String ComponentGuid,Integer status,Integer ComponentNumber) {
|
||||
if(status==0) {
|
||||
public boolean remove(String Guid, String ComponentGuid, Integer status,
|
||||
Integer ComponentNumber) {
|
||||
if (status == 0) {
|
||||
LambdaQueryWrapper<TblShipFuel> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TblShipFuel::getGuid, Guid);
|
||||
wrapper.eq(TblShipFuel::getComponentGuid, ComponentGuid);
|
||||
// wrapper.eq(TblShipFuel::getComponentNumber, ComponentNumber);
|
||||
return this.remove(wrapper);
|
||||
}else{
|
||||
} else {
|
||||
LambdaQueryWrapper<TblShipFuel> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TblShipFuel::getGuid, Guid);
|
||||
return this.remove(wrapper);
|
||||
|
@ -70,19 +68,21 @@ public class TblShipFuelServiceImpl extends ServiceImpl<TblShipFuelMapper, TblSh
|
|||
public boolean add(TblShipFuelAddInputVo vo) {
|
||||
TblShipFuel fuel = new TblShipFuel();
|
||||
LambdaQueryWrapper<TblShipFuel> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(TblShipFuel::getId,vo.getId());
|
||||
BeanUtils.copyProperties(vo,fuel);
|
||||
List<TblShipFuel> list = this.list(wrapper).stream().sorted(Comparator.comparing(TblShipFuel::getComponentNumber)).collect(Collectors.toList());
|
||||
if(list.size()!=0){
|
||||
fuel.setComponentNumber(list.get(list.size()-1).getComponentNumber()+1);
|
||||
}else{
|
||||
wrapper.eq(TblShipFuel::getId, vo.getId());
|
||||
BeanUtils.copyProperties(vo, fuel);
|
||||
List<TblShipFuel> list = this.list(wrapper).stream()
|
||||
.sorted(Comparator.comparing(TblShipFuel::getComponentNumber)).collect(Collectors.toList());
|
||||
if (list.size() != 0) {
|
||||
fuel.setComponentNumber(list.get(list.size() - 1).getComponentNumber() + 1);
|
||||
} else {
|
||||
fuel.setComponentNumber(1);
|
||||
}
|
||||
fuel.setGuid("dataship-"+String.format("%16d", vo.getId()).replace(" ", "0"));
|
||||
fuel.setComponentGuid("datafuel-"+String.format("%16d", vo.getComponentId()).replace(" ", "0"));
|
||||
fuel.setGuid("dataship-" + String.format("%16d", vo.getId()).replace(" ", "0"));
|
||||
fuel.setComponentGuid(
|
||||
"datafuel-" + String.format("%16d", vo.getComponentId()).replace(" ", "0"));
|
||||
List<TblPropulsionViewVo> propulsionList = propulsionService.getList(fuel.getGuid());
|
||||
if(propulsionList==null){
|
||||
throw new BusinessException(500,"请先添加对应的推进系统");
|
||||
if (propulsionList == null) {
|
||||
throw new BusinessException(500, "请先添加对应的推进系统");
|
||||
}
|
||||
|
||||
return this.save(fuel);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.hivekion.common.encrypt;
|
||||
|
||||
import sun.misc.BASE64Decoder;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
|
||||
import java.util.Base64;
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.KeyGenerator;
|
||||
import javax.crypto.SecretKey;
|
||||
|
@ -112,8 +112,8 @@ public class AESUtil {
|
|||
* @return
|
||||
*/
|
||||
public static String byte2Base64(byte[] bytes) {
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
return encoder.encode(bytes);
|
||||
|
||||
return Base64.getEncoder().encodeToString(bytes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -124,7 +124,7 @@ public class AESUtil {
|
|||
* @throws IOException
|
||||
*/
|
||||
public static byte[] base642Byte(String base64Key) throws IOException {
|
||||
BASE64Decoder decoder = new BASE64Decoder();
|
||||
return decoder.decodeBuffer(base64Key);
|
||||
|
||||
return Base64.getDecoder().decode(base64Key);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,23 +3,19 @@ package com.hivekion.system.controller;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.hivekion.common.entity.TreeNode;
|
||||
import com.hivekion.system.domain.SysCsMenu;
|
||||
import com.hivekion.system.domain.SysMenu;
|
||||
import com.hivekion.system.domain.vo.syscsauthority.SysCsMenuListVo;
|
||||
import com.hivekion.system.service.ISysAuthorityService;
|
||||
import com.hivekion.system.service.ISysRoleAuthorityService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.apache.batik.gvt.CompositeGraphicsNode;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
import sun.reflect.generics.tree.Tree;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
/**
|
||||
* @author 薛海宁
|
||||
|
|
Loading…
Reference in New Issue
Block a user