Browse Source

阿米巴开发

anderx 3 years ago
parent
commit
8c54875db9

+ 44 - 0
src/main/java/com/goafanti/ambSystem/comtroller/AmbApiController.java

@@ -0,0 +1,44 @@
+package com.goafanti.ambSystem.comtroller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.goafanti.admin.service.AdminService;
+import com.goafanti.ambSystem.service.AmbService;
+import com.goafanti.cognizance.bo.*;
+import com.goafanti.cognizance.service.*;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.enums.*;
+import com.goafanti.common.model.*;
+import com.goafanti.common.utils.*;
+import com.goafanti.copyright.bo.CopyrightInfoDetail;
+import com.goafanti.copyright.service.CopyrightInfoService;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.patent.service.PatentInfoService;
+import com.goafanti.user.bo.*;
+import com.goafanti.user.service.UserService;
+import com.goafanti.user.service.*;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Controller;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.util.*;
+
+@Controller
+@RequestMapping(value = "/api/amb")
+public class AmbApiController extends CertifyApiController {
+	@Autowired
+	private AmbService ambService;
+}

+ 4 - 0
src/main/java/com/goafanti/ambSystem/service/AmbService.java

@@ -0,0 +1,4 @@
+package com.goafanti.ambSystem.service;
+
+public interface AmbService {
+}

+ 8 - 0
src/main/java/com/goafanti/ambSystem/service/Impl/AmbServiceImpl.java

@@ -0,0 +1,8 @@
+package com.goafanti.ambSystem.service.Impl;
+
+import com.goafanti.ambSystem.service.AmbService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class AmbServiceImpl implements AmbService {
+}

+ 17 - 0
src/main/java/com/goafanti/common/dao/AmbSystemMapper.java

@@ -0,0 +1,17 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.AmbSystem;
+
+public interface AmbSystemMapper {
+    int deleteByPrimaryKey(Long id);
+
+    int insert(AmbSystem record);
+
+    int insertSelective(AmbSystem record);
+
+    AmbSystem selectByPrimaryKey(Long id);
+
+    int updateByPrimaryKeySelective(AmbSystem record);
+
+    int updateByPrimaryKey(AmbSystem record);
+}

+ 193 - 0
src/main/java/com/goafanti/common/mapper/AmbSystemMapper.xml

@@ -0,0 +1,193 @@
+<?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.goafanti.common.dao.AmbSystemMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.AmbSystem">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="parent_id" jdbcType="BIGINT" property="parentId" />
+    <result column="ancestors" jdbcType="VARCHAR" property="ancestors" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="order_num" jdbcType="INTEGER" property="orderNum" />
+    <result column="leader" jdbcType="VARCHAR" property="leader" />
+    <result column="status" jdbcType="CHAR" property="status" />
+    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="lvl" jdbcType="INTEGER" property="lvl" />
+    <result column="finance_id" jdbcType="VARCHAR" property="financeId" />
+    <result column="ancestors_names" jdbcType="VARCHAR" property="ancestorsNames" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, parent_id, ancestors, `name`, order_num, leader, `status`, create_by, create_time, 
+    update_by, update_time, lvl, finance_id, ancestors_names
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from amb_system
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from amb_system
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.AmbSystem" useGeneratedKeys="true">
+    insert into amb_system (parent_id, ancestors, `name`, 
+      order_num, leader, `status`, 
+      create_by, create_time, update_by, 
+      update_time, lvl, finance_id, 
+      ancestors_names)
+    values (#{parentId,jdbcType=BIGINT}, #{ancestors,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{orderNum,jdbcType=INTEGER}, #{leader,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, 
+      #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{lvl,jdbcType=INTEGER}, #{financeId,jdbcType=VARCHAR}, 
+      #{ancestorsNames,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.AmbSystem" useGeneratedKeys="true">
+    insert into amb_system
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="parentId != null">
+        parent_id,
+      </if>
+      <if test="ancestors != null">
+        ancestors,
+      </if>
+      <if test="name != null">
+        `name`,
+      </if>
+      <if test="orderNum != null">
+        order_num,
+      </if>
+      <if test="leader != null">
+        leader,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createBy != null">
+        create_by,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateBy != null">
+        update_by,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+      <if test="lvl != null">
+        lvl,
+      </if>
+      <if test="financeId != null">
+        finance_id,
+      </if>
+      <if test="ancestorsNames != null">
+        ancestors_names,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="parentId != null">
+        #{parentId,jdbcType=BIGINT},
+      </if>
+      <if test="ancestors != null">
+        #{ancestors,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="orderNum != null">
+        #{orderNum,jdbcType=INTEGER},
+      </if>
+      <if test="leader != null">
+        #{leader,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=CHAR},
+      </if>
+      <if test="createBy != null">
+        #{createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateBy != null">
+        #{updateBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="lvl != null">
+        #{lvl,jdbcType=INTEGER},
+      </if>
+      <if test="financeId != null">
+        #{financeId,jdbcType=VARCHAR},
+      </if>
+      <if test="ancestorsNames != null">
+        #{ancestorsNames,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.AmbSystem">
+    update amb_system
+    <set>
+      <if test="parentId != null">
+        parent_id = #{parentId,jdbcType=BIGINT},
+      </if>
+      <if test="ancestors != null">
+        ancestors = #{ancestors,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        `name` = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="orderNum != null">
+        order_num = #{orderNum,jdbcType=INTEGER},
+      </if>
+      <if test="leader != null">
+        leader = #{leader,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=CHAR},
+      </if>
+      <if test="createBy != null">
+        create_by = #{createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateBy != null">
+        update_by = #{updateBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="lvl != null">
+        lvl = #{lvl,jdbcType=INTEGER},
+      </if>
+      <if test="financeId != null">
+        finance_id = #{financeId,jdbcType=VARCHAR},
+      </if>
+      <if test="ancestorsNames != null">
+        ancestors_names = #{ancestorsNames,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.AmbSystem">
+    update amb_system
+    set parent_id = #{parentId,jdbcType=BIGINT},
+      ancestors = #{ancestors,jdbcType=VARCHAR},
+      `name` = #{name,jdbcType=VARCHAR},
+      order_num = #{orderNum,jdbcType=INTEGER},
+      leader = #{leader,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=CHAR},
+      create_by = #{createBy,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_by = #{updateBy,jdbcType=VARCHAR},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      lvl = #{lvl,jdbcType=INTEGER},
+      finance_id = #{financeId,jdbcType=VARCHAR},
+      ancestors_names = #{ancestorsNames,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 194 - 0
src/main/java/com/goafanti/common/model/AmbSystem.java

@@ -0,0 +1,194 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * amb_system
+ * @author 
+ */
+public class AmbSystem implements Serializable {
+    /**
+     * 部门id
+     */
+    private Long id;
+
+    /**
+     * 父部门id
+     */
+    private Long parentId;
+
+    /**
+     * 祖级列表
+     */
+    private String ancestors;
+
+    /**
+     * 部门名称
+     */
+    private String name;
+
+    /**
+     * 显示顺序
+     */
+    private Integer orderNum;
+
+    /**
+     * 负责人
+     */
+    private String leader;
+
+    /**
+     * 部门状态(0正常 1停用)
+     */
+    private String status;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新者
+     */
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 层级 0=集团,1=管综经开总,2=大区总,3=区总,4=事业部总,5=战区总,6=巴总
+     */
+    private Integer lvl;
+
+    /**
+     * 财务id
+     */
+    private String financeId;
+
+    /**
+     * 祖级名称
+     */
+    private String ancestorsNames;
+
+    private static final long serialVersionUID = 1L;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
+    public String getAncestors() {
+        return ancestors;
+    }
+
+    public void setAncestors(String ancestors) {
+        this.ancestors = ancestors;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getOrderNum() {
+        return orderNum;
+    }
+
+    public void setOrderNum(Integer orderNum) {
+        this.orderNum = orderNum;
+    }
+
+    public String getLeader() {
+        return leader;
+    }
+
+    public void setLeader(String leader) {
+        this.leader = leader;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Integer getLvl() {
+        return lvl;
+    }
+
+    public void setLvl(Integer lvl) {
+        this.lvl = lvl;
+    }
+
+    public String getFinanceId() {
+        return financeId;
+    }
+
+    public void setFinanceId(String financeId) {
+        this.financeId = financeId;
+    }
+
+    public String getAncestorsNames() {
+        return ancestorsNames;
+    }
+
+    public void setAncestorsNames(String ancestorsNames) {
+        this.ancestorsNames = ancestorsNames;
+    }
+}