wangchangsheng 3 년 전
부모
커밋
d131d8a8cb

+ 1 - 1
pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>2.4.3</version>
+        <version>2.3.7.RELEASE</version>
         <relativePath/> <!-- lookup parent from repository -->
     </parent>
     <groupId>com.gyee</groupId>

+ 52 - 0
src/main/java/com/gyee/viewticket/controller/viewticket/CompaniesController.java

@@ -0,0 +1,52 @@
+package com.gyee.viewticket.controller.viewticket;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gyee.viewticket.comm.domain.AjaxResult;
+import com.gyee.viewticket.service.ticket.CompaniesService;
+import com.gyee.viewticket.service.ticket.PolineService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author admin
+ * @since 2021-07-17
+ */
+@RestController
+@RequestMapping("/companies")
+public class CompaniesController {
+
+
+
+    @Autowired
+    CompaniesService companiesService;
+
+    /**
+     * 查询
+     * @return
+     */
+    // @CrossOrigin(origins = "*",maxAge = 3600)
+    @GetMapping(value = "list")
+    public AjaxResult getCompaniesList(){
+        try {
+            List<Map> list = companiesService.getCompaniesList();
+            return AjaxResult.successData(list);
+        } catch (Exception e) {
+            return AjaxResult.error();
+        }
+    }
+
+}
+

+ 8 - 4
src/main/java/com/gyee/viewticket/controller/viewticket/EquoperationrecordController.java

@@ -48,10 +48,14 @@ public class EquoperationrecordController {
             @RequestParam(value = "wtid",required = false)String wtid,
             @RequestParam(value = "type",required = false)String type)
      {
-        Page page = new Page(pageNum, pageSize);
-        IPage<Map> list = equoperationrecordService.getEquoperationrecordPageList(page,startTime,endTime,wtid,type);
-        return AjaxResult.successData(list);
-    }
+         try {
+             Page page = new Page(pageNum, pageSize);
+             IPage<Map> list = equoperationrecordService.getEquoperationrecordPageList(page,startTime,endTime,wtid,type);
+             return AjaxResult.successData(list);
+         } catch (Exception e) {
+             return AjaxResult.error();
+         }
+     }
 
 }
 

+ 7 - 3
src/main/java/com/gyee/viewticket/controller/viewticket/PolineController.java

@@ -48,9 +48,13 @@ public class PolineController {
             @RequestParam(value = "starttime", required = false) String starttime,
             @RequestParam(value = "endtime", required = false) String endtime
     ){
-        Page page = new Page(pageNum, pageSize);
-        IPage<Map> list = polineService.getPolinePageList(page,vendor,warehouse,ponum,starttime,endtime);
-        return AjaxResult.successData(list);
+        try {
+            Page page = new Page(pageNum, pageSize);
+            IPage<Map> list = polineService.getPolinePageList(page,vendor,warehouse,ponum,starttime,endtime);
+            return AjaxResult.successData(list);
+        } catch (Exception e) {
+            return AjaxResult.error();
+        }
     }
 
 

+ 47 - 0
src/main/java/com/gyee/viewticket/controller/viewticket/WarehouseController.java

@@ -0,0 +1,47 @@
+package com.gyee.viewticket.controller.viewticket;
+
+
+import com.gyee.viewticket.comm.domain.AjaxResult;
+import com.gyee.viewticket.service.ticket.WarehouseService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author admin
+ * @since 2021-07-17
+ */
+@RestController
+@RequestMapping("/warehouse")
+public class WarehouseController {
+
+
+    @Autowired
+    WarehouseService warehouseService;
+
+    /**
+     * 查询
+     * @return
+     */
+    // @CrossOrigin(origins = "*",maxAge = 3600)
+    @GetMapping(value = "list")
+    public AjaxResult getWarehouseList(){
+        try {
+            List<Map> list = warehouseService.getwarehouseList();
+            return AjaxResult.successData(list);
+        } catch (Exception e) {
+            return AjaxResult.error();
+        }
+    }
+
+}
+

+ 6 - 2
src/main/java/com/gyee/viewticket/controller/viewticket/WindturbineController.java

@@ -47,8 +47,12 @@ public class WindturbineController {
     @GetMapping(value = "list")
     public AjaxResult getWindturbineid(
             @RequestParam(value = "wtid",required = false)String wtid) {
-        List<Map> list = windturbineService.getWindturbinePageList(wtid);
-        return AjaxResult.successData(list);
+        try {
+            List<Map> list = windturbineService.getWindturbinePageList(wtid);
+            return AjaxResult.successData(list);
+        } catch (Exception e) {
+            return AjaxResult.error();
+        }
 
 
     }

+ 6 - 2
src/main/java/com/gyee/viewticket/controller/viewticket/WorkticketController.java

@@ -62,8 +62,12 @@ public class WorkticketController {
     //@CrossOrigin(origins = "*",maxAge = 3600)
     @GetMapping(value = "list")
     public AjaxResult getWorkTypeList() {
-        List<Map> list =workriskpoolService.getWorkriskpoolList();
-        return  AjaxResult.successData(list);
+        try {
+            List<Map> list =workriskpoolService.getWorkriskpoolList();
+            return  AjaxResult.successData(list);
+        } catch (Exception e) {
+            return AjaxResult.error();
+        }
     }
 
 

+ 25 - 0
src/main/java/com/gyee/viewticket/mapper/ticket/CompaniesMapper.java

@@ -0,0 +1,25 @@
+package com.gyee.viewticket.mapper.ticket;
+
+import com.gyee.viewticket.model.ticket.Companies;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author admin
+ * @since 2021-07-17
+ */
+@Repository
+@Mapper
+public interface CompaniesMapper extends BaseMapper<Companies> {
+
+    List<Map> selectCompaniesList();
+
+}

+ 25 - 0
src/main/java/com/gyee/viewticket/mapper/ticket/WarehouseMapper.java

@@ -0,0 +1,25 @@
+package com.gyee.viewticket.mapper.ticket;
+
+import com.gyee.viewticket.model.ticket.Warehouse;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author admin
+ * @since 2021-07-17
+ */
+@Repository
+@Mapper
+public interface WarehouseMapper extends BaseMapper<Warehouse> {
+
+    List<Map> selectwarehouseList();
+
+}

+ 150 - 0
src/main/java/com/gyee/viewticket/model/ticket/Companies.java

@@ -0,0 +1,150 @@
+package com.gyee.viewticket.model.ticket;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author admin
+ * @since 2021-07-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("COMPANIES")
+public class Companies extends Model<Companies> {
+
+    private static final long serialVersionUID=1L;
+
+      @TableId("ID")
+    private Double id;
+
+    @TableField("COMPANY")
+    private String company;
+
+    @TableField("PARENT")
+    private String parent;
+
+    @TableField("TYPE")
+    private String type;
+
+    @TableField("REGFUND")
+    private String regfund;
+
+    @TableField("COMPTYPE")
+    private String comptype;
+
+    @TableField("DELEGATE")
+    private String delegate;
+
+    @TableField("REGNUM")
+    private String regnum;
+
+    @TableField("TAXNUM")
+    private String taxnum;
+
+    @TableField("MAINPROD")
+    private String mainprod;
+
+    @TableField("DEALIN")
+    private String dealin;
+
+    @TableField("ADDRESS")
+    private String address;
+
+    @TableField("POSTNUM")
+    private String postnum;
+
+    @TableField("PROVINCE")
+    private String province;
+
+    @TableField("CITY")
+    private String city;
+
+    @TableField("CONTACT")
+    private String contact;
+
+    @TableField("PHONE")
+    private String phone;
+
+    @TableField("FAX")
+    private String fax;
+
+    @TableField("CONTACTMP")
+    private String contactmp;
+
+    @TableField("CONTACTMAIL")
+    private String contactmail;
+
+    @TableField("FOB")
+    private String fob;
+
+    @TableField("FREIGHTTERMS")
+    private String freightterms;
+
+    @TableField("SHIPVIA")
+    private String shipvia;
+
+    @TableField("PAYMENTTERMS")
+    private String paymentterms;
+
+    @TableField("EBSNUM")
+    private String ebsnum;
+
+    @TableField("EBSISSYNC")
+    private String ebsissync;
+
+    @TableField("CHANGEBY")
+    private String changeby;
+
+    @TableField("CHANGEDATE")
+    private LocalDateTime changedate;
+
+    @TableField("PAYVENDOR")
+    private String payvendor;
+
+    @TableField("BANKNAME")
+    private String bankname;
+
+    @TableField("BANKACCOUNT")
+    private String bankaccount;
+
+    @TableField("DISABLED")
+    private String disabled;
+
+    @TableField("REMITADDR")
+    private String remitaddr;
+
+    @TableField("REMITPOSTNUM")
+    private String remitpostnum;
+
+    @TableField("REMITPHONE")
+    private String remitphone;
+
+    @TableField("REMITTO")
+    private String remitto;
+
+    @TableField("HOMEPAGE")
+    private String homepage;
+
+    @TableField("DEFWAREHOUSE")
+    private String defwarehouse;
+
+    @TableField("DESCRIPTION")
+    private String description;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 59 - 0
src/main/java/com/gyee/viewticket/model/ticket/Warehouse.java

@@ -0,0 +1,59 @@
+package com.gyee.viewticket.model.ticket;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author admin
+ * @since 2021-07-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("WAREHOUSE")
+public class Warehouse extends Model<Warehouse> {
+
+    private static final long serialVersionUID=1L;
+
+      @TableId("ID")
+    private Double id;
+
+    @TableField("WAREHOUSE")
+    private String warehouse;
+
+    @TableField("DESCRIPTION")
+    private String description;
+
+    @TableField("WAREHOUSEADMIN")
+    private String warehouseadmin;
+
+    @TableField("SHIPTOADDR")
+    private String shiptoaddr;
+
+    @TableField("SHIPTOLABOR")
+    private String shiptolabor;
+
+    @TableField("SHIPTOINVLABOR")
+    private String shiptoinvlabor;
+
+    @TableField("SITENUM")
+    private String sitenum;
+
+    @TableField("CORPNUM")
+    private String corpnum;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 31 - 0
src/main/java/com/gyee/viewticket/service/impl/ticket/CompaniesServiceImpl.java

@@ -0,0 +1,31 @@
+package com.gyee.viewticket.service.impl.ticket;
+
+import com.gyee.viewticket.model.ticket.Companies;
+import com.gyee.viewticket.mapper.ticket.CompaniesMapper;
+import com.gyee.viewticket.service.ticket.CompaniesService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author admin
+ * @since 2021-07-17
+ */
+@Service
+public class CompaniesServiceImpl extends ServiceImpl<CompaniesMapper, Companies> implements CompaniesService {
+
+    @Autowired
+    CompaniesMapper companiesMapper;
+    @Override
+    public List<Map> getCompaniesList() {
+        List<Map> map =  companiesMapper.selectCompaniesList();
+        return map;
+    }
+}

+ 32 - 0
src/main/java/com/gyee/viewticket/service/impl/ticket/WarehouseServiceImpl.java

@@ -0,0 +1,32 @@
+package com.gyee.viewticket.service.impl.ticket;
+
+import com.gyee.viewticket.model.ticket.Warehouse;
+import com.gyee.viewticket.mapper.ticket.WarehouseMapper;
+import com.gyee.viewticket.service.ticket.WarehouseService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author admin
+ * @since 2021-07-17
+ */
+@Service
+public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper, Warehouse> implements WarehouseService {
+
+
+    @Autowired
+    WarehouseMapper warehouseMapper;
+    @Override
+    public List<Map> getwarehouseList() {
+        List<Map> map = warehouseMapper.selectwarehouseList();
+        return map;
+    }
+}

+ 23 - 0
src/main/java/com/gyee/viewticket/service/ticket/CompaniesService.java

@@ -0,0 +1,23 @@
+package com.gyee.viewticket.service.ticket;
+
+import com.gyee.viewticket.model.ticket.Companies;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author admin
+ * @since 2021-07-17
+ */
+@Service
+public interface CompaniesService extends IService<Companies> {
+
+    List<Map> getCompaniesList();
+
+}

+ 24 - 0
src/main/java/com/gyee/viewticket/service/ticket/WarehouseService.java

@@ -0,0 +1,24 @@
+package com.gyee.viewticket.service.ticket;
+
+import com.gyee.viewticket.model.ticket.Warehouse;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author admin
+ * @since 2021-07-17
+ */
+@Service
+public interface WarehouseService extends IService<Warehouse> {
+
+
+    List<Map> getwarehouseList();
+
+}

+ 57 - 0
src/main/resources/mapper/ticket/CompaniesMapper.xml

@@ -0,0 +1,57 @@
+<?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="com.gyee.viewticket.mapper.ticket.CompaniesMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.gyee.viewticket.model.ticket.Companies">
+        <id column="ID" property="id" />
+        <result column="COMPANY" property="company" />
+        <result column="PARENT" property="parent" />
+        <result column="TYPE" property="type" />
+        <result column="REGFUND" property="regfund" />
+        <result column="COMPTYPE" property="comptype" />
+        <result column="DELEGATE" property="delegate" />
+        <result column="REGNUM" property="regnum" />
+        <result column="TAXNUM" property="taxnum" />
+        <result column="MAINPROD" property="mainprod" />
+        <result column="DEALIN" property="dealin" />
+        <result column="ADDRESS" property="address" />
+        <result column="POSTNUM" property="postnum" />
+        <result column="PROVINCE" property="province" />
+        <result column="CITY" property="city" />
+        <result column="CONTACT" property="contact" />
+        <result column="PHONE" property="phone" />
+        <result column="FAX" property="fax" />
+        <result column="CONTACTMP" property="contactmp" />
+        <result column="CONTACTMAIL" property="contactmail" />
+        <result column="FOB" property="fob" />
+        <result column="FREIGHTTERMS" property="freightterms" />
+        <result column="SHIPVIA" property="shipvia" />
+        <result column="PAYMENTTERMS" property="paymentterms" />
+        <result column="EBSNUM" property="ebsnum" />
+        <result column="EBSISSYNC" property="ebsissync" />
+        <result column="CHANGEBY" property="changeby" />
+        <result column="CHANGEDATE" property="changedate" />
+        <result column="PAYVENDOR" property="payvendor" />
+        <result column="BANKNAME" property="bankname" />
+        <result column="BANKACCOUNT" property="bankaccount" />
+        <result column="DISABLED" property="disabled" />
+        <result column="REMITADDR" property="remitaddr" />
+        <result column="REMITPOSTNUM" property="remitpostnum" />
+        <result column="REMITPHONE" property="remitphone" />
+        <result column="REMITTO" property="remitto" />
+        <result column="HOMEPAGE" property="homepage" />
+        <result column="DEFWAREHOUSE" property="defwarehouse" />
+        <result column="DESCRIPTION" property="description" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        ID, COMPANY, PARENT, TYPE, REGFUND, COMPTYPE, DELEGATE, REGNUM, TAXNUM, MAINPROD, DEALIN, ADDRESS, POSTNUM, PROVINCE, CITY, CONTACT, PHONE, FAX, CONTACTMP, CONTACTMAIL, FOB, FREIGHTTERMS, SHIPVIA, PAYMENTTERMS, EBSNUM, EBSISSYNC, CHANGEBY, CHANGEDATE, PAYVENDOR, BANKNAME, BANKACCOUNT, DISABLED, REMITADDR, REMITPOSTNUM, REMITPHONE, REMITTO, HOMEPAGE, DEFWAREHOUSE, DESCRIPTION
+    </sql>
+    <select id="selectCompaniesList" resultType="java.util.Map">
+
+        select id,company from companies where type = '供应商'
+    </select>
+
+</mapper>

+ 26 - 0
src/main/resources/mapper/ticket/WarehouseMapper.xml

@@ -0,0 +1,26 @@
+<?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="com.gyee.viewticket.mapper.ticket.WarehouseMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.gyee.viewticket.model.ticket.Warehouse">
+        <id column="ID" property="id" />
+        <result column="WAREHOUSE" property="warehouse" />
+        <result column="DESCRIPTION" property="description" />
+        <result column="WAREHOUSEADMIN" property="warehouseadmin" />
+        <result column="SHIPTOADDR" property="shiptoaddr" />
+        <result column="SHIPTOLABOR" property="shiptolabor" />
+        <result column="SHIPTOINVLABOR" property="shiptoinvlabor" />
+        <result column="SITENUM" property="sitenum" />
+        <result column="CORPNUM" property="corpnum" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        ID, WAREHOUSE, DESCRIPTION, WAREHOUSEADMIN, SHIPTOADDR, SHIPTOLABOR, SHIPTOINVLABOR, SITENUM, CORPNUM
+    </sql>
+    <select id="selectwarehouseList" resultType="java.util.Map">
+        select id,warehouse from Warehouse
+    </select>
+
+</mapper>