ソースを参照

船舶基本信息初始化代码

459242451@qq.com 4 年 前
コミット
631b3ba278

+ 160 - 0
king-boot-module-ad/src/main/java/org/king/modules/ad/controller/BaseShipInfoController.java

@@ -0,0 +1,160 @@
+package org.king.modules.ad.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.king.common.api.vo.Result;
+import org.king.common.aspect.annotation.AutoLog;
+import org.king.common.system.base.controller.KingController;
+import org.king.common.system.query.QueryGenerator;
+import org.king.modules.ad.entity.BaseShipInfo;
+import org.king.modules.ad.service.IBaseShipInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+
+/**
+ * @Description: 船舶基本信息
+ * @Author: king-boot
+ * @Date: 2021-06-15
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags = "船舶基本信息")
+@RestController
+@RequestMapping("/ad/baseShipInfo")
+public class BaseShipInfoController extends KingController<BaseShipInfo, IBaseShipInfoService> {
+
+	@Autowired
+	private IBaseShipInfoService baseShipInfoService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param baseShipInfo
+	 * @param pageNo 页码
+	 * @param pageSize 每页条数
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "船舶基本信息-分页列表查询")
+	@ApiOperation(value = "船舶基本信息-分页列表查询", notes = "船舶基本信息-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<?> queryPageList(BaseShipInfo baseShipInfo,
+									  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+									  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+									  HttpServletRequest req) {
+		QueryWrapper<BaseShipInfo> queryWrapper = QueryGenerator.initQueryWrapper(baseShipInfo, req.getParameterMap());
+		Page<BaseShipInfo> page = new Page<>(pageNo, pageSize);
+		IPage<BaseShipInfo> pageList = baseShipInfoService.page(page, queryWrapper);
+		return Result.ok(pageList);
+	}
+	
+	/**
+	 * 添加
+	 *
+	 * @param baseShipInfo
+	 * @return
+	 */
+	@AutoLog(value = "船舶基本信息-添加")
+	@ApiOperation(value = "船舶基本信息-添加", notes = "船舶基本信息-添加")
+	@PostMapping(value = "/add")
+	public Result<?> add(@RequestBody BaseShipInfo baseShipInfo) {
+		baseShipInfoService.save(baseShipInfo);
+        return Result.ok("添加成功!");
+	}
+	
+	/**
+	 * 编辑
+	 *
+	 * @param baseShipInfo
+	 * @return
+	 */
+	@AutoLog(value = "船舶基本信息-编辑")
+	@ApiOperation(value = "船舶基本信息-编辑", notes = "船舶基本信息-编辑")
+	@PutMapping(value = "/edit")
+	public Result<?> edit(@RequestBody BaseShipInfo baseShipInfo) {
+		baseShipInfoService.updateById(baseShipInfo);
+        return Result.ok("编辑成功!");
+	}
+	
+	/**
+	 * 通过id删除
+	 *
+	 * @param id 主键id
+	 * @return
+	 */
+	@AutoLog(value = "船舶基本信息-通过id删除")
+	@ApiOperation(value = "船舶基本信息-通过id删除", notes = "船舶基本信息-通过id删除")
+	@DeleteMapping(value = "/delete")
+	public Result<?> delete(@RequestParam(name="id") String id) {
+		baseShipInfoService.removeById(id);
+        return Result.ok("删除成功!");
+	}
+	
+	/**
+	 * 批量删除
+	 *
+	 * @param ids 主键id集合
+	 * @return
+	 */
+	@AutoLog(value = "船舶基本信息-批量删除")
+	@ApiOperation(value = "船舶基本信息-批量删除", notes = "船舶基本信息-批量删除")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<?> deleteBatch(@RequestParam(name="ids") String ids) {
+		this.baseShipInfoService.removeByIds(Arrays.asList(ids.split(",")));
+        return Result.ok("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id 主键id
+	 * @return
+	 */
+	@AutoLog(value = "船舶基本信息-通过id查询")
+	@ApiOperation(value = "船舶基本信息-通过id查询", notes = "船舶基本信息-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<?> queryById(@RequestParam(name="id") String id) {
+		BaseShipInfo baseShipInfo = baseShipInfoService.getById(id);
+		if (baseShipInfo==null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.ok(baseShipInfo);
+	}
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param baseShipInfo
+     */
+    @AutoLog(value = "船舶基本信息-导出excel")
+    @ApiOperation(value = "船舶基本信息-导出excel", notes = "船舶基本信息-导出excel")
+    @RequestMapping(value = "/exportXls", method = {RequestMethod.GET, RequestMethod.POST})
+    public ModelAndView exportXls(HttpServletRequest request, BaseShipInfo baseShipInfo) {
+        return super.exportXls(request, baseShipInfo, BaseShipInfo.class, "船舶基本信息");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+     @AutoLog(value = "船舶基本信息-通过excel导入数据")
+     @ApiOperation(value = "船舶基本信息-通过excel导入数据", notes = "船舶基本信息-通过excel导入数据")
+     @PostMapping(value = "/importExcel")
+     public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, BaseShipInfo.class);
+     }
+
+}

+ 263 - 0
king-boot-module-ad/src/main/java/org/king/modules/ad/entity/BaseShipInfo.java

@@ -0,0 +1,263 @@
+package org.king.modules.ad.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 船舶基本信息
+ * @Author: king-boot
+ * @Date:   2021-06-15
+ * @Version: V1.0
+ */
+@Data
+@TableName("base_ship_info")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="base_ship_info对象", description="船舶基本信息")
+public class BaseShipInfo implements Serializable {
+    private static final long serialVersionUID = 1L;
+    
+    /**主键*/
+    @Excel(name = "主键", width = 15)
+    @ApiModelProperty(value = "主键")
+    private Integer sbiNo;
+
+    /**原主键*/
+    @Excel(name = "原主键", width = 15)
+    @ApiModelProperty(value = "原主键")
+    private String guid;
+
+    /**船舶所有人联系电话*/
+    @Excel(name = "船舶所有人联系电话", width = 15)
+    @ApiModelProperty(value = "船舶所有人联系电话")
+    private String ownerShipPhone;
+
+    /**船籍港*/
+    @Excel(name = "船籍港", width = 15)
+    @ApiModelProperty(value = "船籍港")
+    private String regportCode;
+
+    /**船舶登记机构*/
+    @Excel(name = "船舶登记机构", width = 15)
+    @ApiModelProperty(value = "船舶登记机构")
+    private String orgCode;
+
+    /**船舶识别号*/
+    @Excel(name = "船舶识别号", width = 15)
+    @ApiModelProperty(value = "船舶识别号")
+    private String shipId;
+
+    /**船舶登记号*/
+    @Excel(name = "船舶登记号", width = 15)
+    @ApiModelProperty(value = "船舶登记号")
+    private String shipRegNo;
+
+    /**船舶初次登记号*/
+    @Excel(name = "船舶初次登记号", width = 15)
+    @ApiModelProperty(value = "船舶初次登记号")
+    private String shipFirstregNo;
+
+    /**Imo编号*/
+    @Excel(name = "Imo编号", width = 15)
+    @ApiModelProperty(value = "Imo编号")
+    private String shipImo;
+
+    /**船舶建造完工日期*/
+    @Excel(name = "船舶建造完工日期", width = 15)
+    @ApiModelProperty(value = "船舶建造完工日期")
+    private Date shipBuiltDate;
+
+    /**船舶重大改件日期*/
+    @Excel(name = "船舶重大改件日期", width = 15)
+    @ApiModelProperty(value = "船舶重大改件日期")
+    private Date shipRebuiltDate;
+
+    /**船舶制造厂*/
+    @Excel(name = "船舶制造厂", width = 15)
+    @ApiModelProperty(value = "船舶制造厂")
+    private String shipyardCn;
+
+    /**船舶改建厂*/
+    @Excel(name = "船舶改建厂", width = 15)
+    @ApiModelProperty(value = "船舶改建厂")
+    private String shipRebuiltAddrCn;
+
+    /**船舶经营人*/
+    @Excel(name = "船舶经营人", width = 15)
+    @ApiModelProperty(value = "船舶经营人")
+    private String compNameCn;
+
+    /**船舶所有人*/
+    @Excel(name = "船舶所有人", width = 15)
+    @ApiModelProperty(value = "船舶所有人")
+    private String shipOwnerCn;
+
+    /**船舶所有人联系电话*/
+    @Excel(name = "船舶所有人联系电话", width = 15)
+    @ApiModelProperty(value = "船舶所有人联系电话")
+    private String ownerContactPhone;
+
+    /**船舶管理公司*/
+    @Excel(name = "船舶管理公司", width = 15)
+    @ApiModelProperty(value = "船舶管理公司")
+    private String shipOwnerCompany;
+
+    /**管理公司联系电话*/
+    @Excel(name = "管理公司联系电话", width = 15)
+    @ApiModelProperty(value = "管理公司联系电话")
+    private String shipOwnerCompanyPhone;
+
+    /**船舶类型字典*/
+    @Excel(name = "船舶类型字典", width = 15)
+    @ApiModelProperty(value = "船舶类型字典")
+    private String shipTypeCode;
+
+    /**船舶对应公司id*/
+    @Excel(name = "船舶对应公司id", width = 15)
+    @ApiModelProperty(value = "船舶对应公司id")
+    private String companyId;
+
+    /**船舶中文名称*/
+    @Excel(name = "船舶中文名称", width = 15)
+    @ApiModelProperty(value = "船舶中文名称")
+    private String shipNameCn;
+
+    /**船舶英文名称*/
+    @Excel(name = "船舶英文名称", width = 15)
+    @ApiModelProperty(value = "船舶英文名称")
+    private String shipNameEn;
+
+    /**船舶对应的国家*/
+    @Excel(name = "船舶对应的国家", width = 15)
+    @ApiModelProperty(value = "船舶对应的国家")
+    private String country;
+
+    /**mmsi编码*/
+    @Excel(name = "mmsi编码", width = 15)
+    @ApiModelProperty(value = "mmsi编码")
+    private String mmsi;
+
+    /**船舶呼号*/
+    @Excel(name = "船舶呼号", width = 15)
+    @ApiModelProperty(value = "船舶呼号")
+    private String shipCallsign;
+
+    /**车船标记 0 船 1车*/
+    @Excel(name = "车船标记 0 船 1车", width = 15)
+    @ApiModelProperty(value = "车船标记 0 船 1车")
+    private String vehicleType;
+
+    /**污染物容量*/
+    @Excel(name = "污染物容量", width = 15)
+    @ApiModelProperty(value = "污染物容量")
+    private String pollutantCapacity;
+
+    /**CN码*/
+    @Excel(name = "CN码", width = 15)
+    @ApiModelProperty(value = "CN码")
+    private String cnCode;
+
+    /**船长*/
+    @Excel(name = "船长", width = 15)
+    @ApiModelProperty(value = "船长")
+    private java.math.BigDecimal length;
+
+    /**船宽*/
+    @Excel(name = "船宽", width = 15)
+    @ApiModelProperty(value = "船宽")
+    private java.math.BigDecimal width;
+
+    /**水下深度*/
+    @Excel(name = "水下深度", width = 15)
+    @ApiModelProperty(value = "水下深度")
+    private java.math.BigDecimal depth;
+
+    /**船舶经营人编号*/
+    @Excel(name = "船舶经营人编号", width = 15)
+    @ApiModelProperty(value = "船舶经营人编号")
+    private Integer compUserId;
+
+    /**是否删除的标志 1为删除*/
+    @Excel(name = "是否删除的标志 1为删除", width = 15)
+    @ApiModelProperty(value = "是否删除的标志 1为删除")
+    private String delFlag;
+
+    /**经营人名称*/
+    @Excel(name = "经营人名称", width = 15)
+    @ApiModelProperty(value = "经营人名称")
+    private String compUser;
+
+    /**applyShipPhone*/
+    @Excel(name = "applyShipPhone", width = 15)
+    @ApiModelProperty(value = "applyShipPhone")
+    private String applyShipPhone;
+
+    /**在船人数*/
+    @Excel(name = "在船人数", width = 15)
+    @ApiModelProperty(value = "在船人数")
+    private Integer peopleOnline;
+
+    /**是否趸船 1是;0否*/
+    @Excel(name = "是否趸船 1是;0否", width = 15)
+    @ApiModelProperty(value = "是否趸船 1是;0否")
+    private Integer pontoonShip;
+
+    /**是否业务船 1是;0否*/
+    @Excel(name = "是否业务船 1是;0否", width = 15)
+    @ApiModelProperty(value = "是否业务船 1是;0否")
+    private Integer businessShip;
+
+    /**是否海巡 1是0非*/
+    @Excel(name = "是否海巡 1是0非", width = 15)
+    @ApiModelProperty(value = "是否海巡 1是0非")
+    private Integer cruisingShip;
+
+    /**所属海事机构*/
+    @Excel(name = "所属海事机构", width = 15)
+    @ApiModelProperty(value = "所属海事机构")
+    private String affiliatedOrg;
+
+    /**建立日期*/
+    @Excel(name = "建立日期", width = 15)
+    @ApiModelProperty(value = "建立日期")
+    private Date firstDtm;
+
+    /**修改日期*/
+    @Excel(name = "修改日期", width = 15)
+    @ApiModelProperty(value = "修改日期")
+    private Date lastDtm;
+
+    /**建立用户*/
+    @Excel(name = "建立用户", width = 15)
+    @ApiModelProperty(value = "建立用户")
+    private String firstUser;
+
+    /**修改用户*/
+    @Excel(name = "修改用户", width = 15)
+    @ApiModelProperty(value = "修改用户")
+    private String lastUser;
+
+    /**是否注册*/
+    @Excel(name = "是否注册", width = 15)
+    @ApiModelProperty(value = "是否注册")
+    private String isloginShip;
+
+    /**配员人数*/
+    @Excel(name = "配员人数", width = 15)
+    @ApiModelProperty(value = "配员人数")
+    private Integer partNumber;
+
+    /**吨位*/
+    @Excel(name = "吨位", width = 15)
+    @ApiModelProperty(value = "吨位")
+    private java.math.BigDecimal gt;
+
+}

+ 17 - 0
king-boot-module-ad/src/main/java/org/king/modules/ad/mapper/BaseShipInfoMapper.java

@@ -0,0 +1,17 @@
+package org.king.modules.ad.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.king.modules.ad.entity.BaseShipInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 船舶基本信息
+ * @Author: king-boot
+ * @Date: 2021-06-15
+ * @Version: V1.0
+ */
+public interface BaseShipInfoMapper extends BaseMapper<BaseShipInfo> {
+
+}

+ 5 - 0
king-boot-module-ad/src/main/java/org/king/modules/ad/mapper/xml/BaseShipInfoMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.king.modules.ad.mapper.BaseShipInfoMapper">
+
+</mapper>

+ 14 - 0
king-boot-module-ad/src/main/java/org/king/modules/ad/service/IBaseShipInfoService.java

@@ -0,0 +1,14 @@
+package org.king.modules.ad.service;
+
+import org.king.modules.ad.entity.BaseShipInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 船舶基本信息
+ * @Author: king-boot
+ * @Date: 2021-06-15
+ * @Version: V1.0
+ */
+public interface IBaseShipInfoService extends IService<BaseShipInfo> {
+
+}

+ 19 - 0
king-boot-module-ad/src/main/java/org/king/modules/ad/service/impl/BaseShipInfoServiceImpl.java

@@ -0,0 +1,19 @@
+package org.king.modules.ad.service.impl;
+
+import org.king.modules.ad.entity.BaseShipInfo;
+import org.king.modules.ad.mapper.BaseShipInfoMapper;
+import org.king.modules.ad.service.IBaseShipInfoService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 船舶基本信息
+ * @Author: king-boot
+ * @Date: 2021-06-15
+ * @Version: V1.0
+ */
+@Service
+public class BaseShipInfoServiceImpl extends ServiceImpl<BaseShipInfoMapper, BaseShipInfo> implements IBaseShipInfoService {
+
+}

+ 3 - 3
king-boot-module-system/pom.xml

@@ -3,7 +3,7 @@
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<artifactId>king-boot-module-system</artifactId>
-	<packaging>war</packaging>
+	<packaging>jar</packaging>
 
 	<parent>
 		<groupId>org.kingframework.boot</groupId>
@@ -43,12 +43,12 @@
 	</dependencies>
 
 	<!-- 打war时,不需要此插件 -->
-	<!--<build>
+	<build>
 		<plugins>
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
 			</plugin>
 		</plugins>
-	</build>-->
+	</build>
 </project>

+ 2 - 3
king-boot-module-system/src/main/java/org/king/KingApplication.java

@@ -5,7 +5,6 @@ import org.apache.catalina.Context;
 import org.apache.tomcat.util.scan.StandardJarScanner;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.builder.SpringApplicationBuilder;
 import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
 import org.springframework.context.ConfigurableApplicationContext;
@@ -19,10 +18,10 @@ import java.net.UnknownHostException;
 @SpringBootApplication
 public class KingApplication extends SpringBootServletInitializer {
 
-    @Override
+    /*@Override
     protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
         return application.sources(KingApplication.class);
-    }
+    }*/
 
     public static void main(String[] args) throws UnknownHostException {
         //System.setProperty("spring.devtools.restart.enabled", "true");

+ 1 - 1
pom.xml

@@ -379,7 +379,7 @@
         </dependencies>
     </dependencyManagement>
     <build>
-        <finalName>king</finalName>
+        <finalName>ad_serve</finalName>
         <plugins>
             <!--指定JDK编译版本 -->
             <plugin>