luobang 2 年之前
父节点
当前提交
3f8736436d

+ 4 - 4
pom.xml

@@ -105,13 +105,13 @@
                 <artifactId>generator-maven-plugin</artifactId>
                 <version>3.0</version>
                 <configuration>
-                    <connUrl>jdbc:oracle:thin:@172.16.33.163:1521:ilsdbpri</connUrl>
-                    <user>dil</user>
-                    <password>Dil123789</password>
+                    <connUrl>jdbc:oracle:thin:@172.16.33.63:1521:ORCL</connUrl>
+                    <user>dzgt</user>
+                    <password>bigdata</password>
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-                        <param>BMSSHIP_CONTRACT_PRICE</param>
+                        <param>TB_PRODUCT_SUMMARY_DG</param>
                     </tables>
                 </configuration>
                 <executions>

+ 16 - 0
src/main/java/com/steerinfo/dil/controller/RmsReportController.java

@@ -0,0 +1,16 @@
+package com.steerinfo.dil.controller;
+
+
+import com.steerinfo.dil.service.IDsjReportServiceImpl;
+import com.steerinfo.dil.util.BaseRESTfulController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping("/${api.version}/rmsPortYard")
+public class RmsReportController extends BaseRESTfulController {
+
+
+}

+ 10 - 0
src/main/java/com/steerinfo/dil/mapper/TbProductSummaryDgMapper.java

@@ -0,0 +1,10 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TbProductSummaryDg;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface TbProductSummaryDgMapper extends IBaseMapper<TbProductSummaryDg, BigDecimal> {
+}

+ 243 - 0
src/main/java/com/steerinfo/dil/model/TbProductSummaryDg.java

@@ -0,0 +1,243 @@
+package com.steerinfo.dil.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="null")
+public class TbProductSummaryDg implements IBasePO<BigDecimal> {
+    /**
+     * 项目ID(ITEM_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="项目ID",required=true)
+    private BigDecimal itemId;
+
+    /**
+     * 项目名称(ITEM_NAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="项目名称",required=false)
+    private String itemName;
+
+    /**
+     * 日入库量(IN_STORAGE_DAILY,DECIMAL,15)
+     */
+    @ApiModelProperty(value="日入库量",required=false)
+    private BigDecimal inStorageDaily;
+
+    /**
+     * 月累入库量(IN_STORAGE_MONTH,DECIMAL,15)
+     */
+    @ApiModelProperty(value="月累入库量",required=false)
+    private BigDecimal inStorageMonth;
+
+    /**
+     * 日销量(SALES_DAILY,DECIMAL,15)
+     */
+    @ApiModelProperty(value="日销量",required=false)
+    private BigDecimal salesDaily;
+
+    /**
+     * 月累计销量(SALES_MONTH,DECIMAL,15)
+     */
+    @ApiModelProperty(value="月累计销量",required=false)
+    private BigDecimal salesMonth;
+
+    /**
+     * 当前库存量(INVENTORY_CURRENT,DECIMAL,15)
+     */
+    @ApiModelProperty(value="当前库存量",required=false)
+    private BigDecimal inventoryCurrent;
+
+    /**
+     * 期初库存(INVENTORY_START,DECIMAL,15)
+     */
+    @ApiModelProperty(value="期初库存",required=false)
+    private BigDecimal inventoryStart;
+
+    /**
+     * 库存变化(INVENTORY_CHANGE,DECIMAL,15)
+     */
+    @ApiModelProperty(value="库存变化",required=false)
+    private BigDecimal inventoryChange;
+
+    /**
+     * 月计划销量(SALES_PLAN_MONTH,DECIMAL,15)
+     */
+    @ApiModelProperty(value="月计划销量",required=false)
+    private BigDecimal salesPlanMonth;
+
+    /**
+     * 月度超欠进度计划(SCHEDULE_PLAN_MONTH,DECIMAL,15)
+     */
+    @ApiModelProperty(value="月度超欠进度计划",required=false)
+    private BigDecimal schedulePlanMonth;
+
+    /**
+     * 报表日期(DATES,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="报表日期",required=false)
+    private Date dates;
+
+    /**
+     * 公司名称(COMPANY_NAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="公司名称",required=false)
+    private String companyName;
+
+    /**
+     * 是否有效(IS_VALID,CHAR,1)
+     */
+    @ApiModelProperty(value="是否有效",required=false)
+    private String isValid;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.itemId;
+    }
+
+    @Override
+    public void setId(BigDecimal itemId) {
+        this.itemId = itemId;
+    }
+
+    public BigDecimal getItemId() {
+        return itemId;
+    }
+
+    public void setItemId(BigDecimal itemId) {
+        this.itemId = itemId;
+    }
+
+    public String getItemName() {
+        return itemName;
+    }
+
+    public void setItemName(String itemName) {
+        this.itemName = itemName == null ? null : itemName.trim();
+    }
+
+    public BigDecimal getInStorageDaily() {
+        return inStorageDaily;
+    }
+
+    public void setInStorageDaily(BigDecimal inStorageDaily) {
+        this.inStorageDaily = inStorageDaily;
+    }
+
+    public BigDecimal getInStorageMonth() {
+        return inStorageMonth;
+    }
+
+    public void setInStorageMonth(BigDecimal inStorageMonth) {
+        this.inStorageMonth = inStorageMonth;
+    }
+
+    public BigDecimal getSalesDaily() {
+        return salesDaily;
+    }
+
+    public void setSalesDaily(BigDecimal salesDaily) {
+        this.salesDaily = salesDaily;
+    }
+
+    public BigDecimal getSalesMonth() {
+        return salesMonth;
+    }
+
+    public void setSalesMonth(BigDecimal salesMonth) {
+        this.salesMonth = salesMonth;
+    }
+
+    public BigDecimal getInventoryCurrent() {
+        return inventoryCurrent;
+    }
+
+    public void setInventoryCurrent(BigDecimal inventoryCurrent) {
+        this.inventoryCurrent = inventoryCurrent;
+    }
+
+    public BigDecimal getInventoryStart() {
+        return inventoryStart;
+    }
+
+    public void setInventoryStart(BigDecimal inventoryStart) {
+        this.inventoryStart = inventoryStart;
+    }
+
+    public BigDecimal getInventoryChange() {
+        return inventoryChange;
+    }
+
+    public void setInventoryChange(BigDecimal inventoryChange) {
+        this.inventoryChange = inventoryChange;
+    }
+
+    public BigDecimal getSalesPlanMonth() {
+        return salesPlanMonth;
+    }
+
+    public void setSalesPlanMonth(BigDecimal salesPlanMonth) {
+        this.salesPlanMonth = salesPlanMonth;
+    }
+
+    public BigDecimal getSchedulePlanMonth() {
+        return schedulePlanMonth;
+    }
+
+    public void setSchedulePlanMonth(BigDecimal schedulePlanMonth) {
+        this.schedulePlanMonth = schedulePlanMonth;
+    }
+
+    public Date getDates() {
+        return dates;
+    }
+
+    public void setDates(Date dates) {
+        this.dates = dates;
+    }
+
+    public String getCompanyName() {
+        return companyName;
+    }
+
+    public void setCompanyName(String companyName) {
+        this.companyName = companyName == null ? null : companyName.trim();
+    }
+
+    public String getIsValid() {
+        return isValid;
+    }
+
+    public void setIsValid(String isValid) {
+        this.isValid = isValid == null ? null : isValid.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", itemId=").append(itemId);
+        sb.append(", itemName=").append(itemName);
+        sb.append(", inStorageDaily=").append(inStorageDaily);
+        sb.append(", inStorageMonth=").append(inStorageMonth);
+        sb.append(", salesDaily=").append(salesDaily);
+        sb.append(", salesMonth=").append(salesMonth);
+        sb.append(", inventoryCurrent=").append(inventoryCurrent);
+        sb.append(", inventoryStart=").append(inventoryStart);
+        sb.append(", inventoryChange=").append(inventoryChange);
+        sb.append(", salesPlanMonth=").append(salesPlanMonth);
+        sb.append(", schedulePlanMonth=").append(schedulePlanMonth);
+        sb.append(", dates=").append(dates);
+        sb.append(", companyName=").append(companyName);
+        sb.append(", isValid=").append(isValid);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 4 - 0
src/main/java/com/steerinfo/dil/service/IDsjReportServiceImpl.java

@@ -0,0 +1,4 @@
+package com.steerinfo.dil.service;
+
+public interface IDsjReportServiceImpl {
+}

+ 26 - 0
src/main/java/com/steerinfo/dil/service/impl/dsjReportServiceImpl.java

@@ -0,0 +1,26 @@
+package com.steerinfo.dil.service.impl;
+
+
+import com.steerinfo.dil.mapper.TbProductSummaryDgMapper;
+import com.steerinfo.dil.service.IDsjReportServiceImpl;
+import com.steerinfo.framework.datasource.DataSourceKey;
+import com.steerinfo.framework.datasource.TargetDataSource;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+@Service("dsjReportServiceImpl")
+public class dsjReportServiceImpl implements IDsjReportServiceImpl {
+
+
+    @Resource
+    TbProductSummaryDgMapper tbProductSummaryDgMapper;
+
+
+    //
+    //@TargetDataSource(dataSourceKey = DataSourceKey.DB_OTHER)
+    //@Override
+    //public int getProduct() {
+    //    return tbProductSummaryDgMapper
+    //}
+}

+ 12 - 0
src/main/resources/application-prod.yml

@@ -4,6 +4,18 @@ spring:
     password: Dil123789
     username: dil
     driver-class-name: oracle.jdbc.OracleDriver
+  multiple:
+    datasource:
+      master:
+        url: jdbc:oracle:thin:@172.16.33.163:1521:ilsdbpri
+        password: Dil123789
+        username: dil
+        driver-class-name: oracle.jdbc.OracleDriver
+      other:
+        url: jdbc:oracle:thin:@172.16.33.63:1521:ORCL
+        password: bigdata
+        username: dzgt
+        driver-class-name: oracle.jdbc.OracleDriver
   application:
     name: dal-dazhou-rms-api
 

+ 1 - 1
src/main/resources/com/steerinfo/dil/mapper/RmsCapacityMapper.xml

@@ -918,7 +918,7 @@
   <update id="updatecapacityTel">
      update RMS_CAPACITY RC
      set RC.CAPACITY_TEL=#{capacityTel},
-         RC.CAPACITY_VIP=#{capacityVip},RC.CAPACITY_GPS=#{capacityGps}
+         RC.CAPACITY_VIP=#{capacityVip}
      where RC.CAPACITY_NUMBER=#{capacityNumber} and
            CARRIER_ID in (select RC.CARRIER_ID FROM  RMS_CAPACITY_CARRIER RCC
                           LEFT JOIN RMS_CAPACITY RC

+ 446 - 0
src/main/resources/com/steerinfo/dil/mapper/TbProductSummaryDgMapper.xml

@@ -0,0 +1,446 @@
+<?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.steerinfo.dil.mapper.TbProductSummaryDgMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TbProductSummaryDg">
+    <id column="ITEM_ID" jdbcType="DECIMAL" property="itemId" />
+    <result column="ITEM_NAME" jdbcType="VARCHAR" property="itemName" />
+    <result column="IN_STORAGE_DAILY" jdbcType="DECIMAL" property="inStorageDaily" />
+    <result column="IN_STORAGE_MONTH" jdbcType="DECIMAL" property="inStorageMonth" />
+    <result column="SALES_DAILY" jdbcType="DECIMAL" property="salesDaily" />
+    <result column="SALES_MONTH" jdbcType="DECIMAL" property="salesMonth" />
+    <result column="INVENTORY_CURRENT" jdbcType="DECIMAL" property="inventoryCurrent" />
+    <result column="INVENTORY_START" jdbcType="DECIMAL" property="inventoryStart" />
+    <result column="INVENTORY_CHANGE" jdbcType="DECIMAL" property="inventoryChange" />
+    <result column="SALES_PLAN_MONTH" jdbcType="DECIMAL" property="salesPlanMonth" />
+    <result column="SCHEDULE_PLAN_MONTH" jdbcType="DECIMAL" property="schedulePlanMonth" />
+    <result column="DATES" jdbcType="TIMESTAMP" property="dates" />
+    <result column="COMPANY_NAME" jdbcType="VARCHAR" property="companyName" />
+    <result column="IS_VALID" jdbcType="CHAR" property="isValid" />
+  </resultMap>
+  <sql id="columns">
+    ITEM_ID, ITEM_NAME, IN_STORAGE_DAILY, IN_STORAGE_MONTH, SALES_DAILY, SALES_MONTH, 
+    INVENTORY_CURRENT, INVENTORY_START, INVENTORY_CHANGE, SALES_PLAN_MONTH, SCHEDULE_PLAN_MONTH, 
+    DATES, COMPANY_NAME, IS_VALID
+  </sql>
+  <sql id="columns_alias">
+    t.ITEM_ID, t.ITEM_NAME, t.IN_STORAGE_DAILY, t.IN_STORAGE_MONTH, t.SALES_DAILY, t.SALES_MONTH, 
+    t.INVENTORY_CURRENT, t.INVENTORY_START, t.INVENTORY_CHANGE, t.SALES_PLAN_MONTH, t.SCHEDULE_PLAN_MONTH, 
+    t.DATES, t.COMPANY_NAME, t.IS_VALID
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM TB_PRODUCT_SUMMARY_DG
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM TB_PRODUCT_SUMMARY_DG t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="itemId != null">
+        and ITEM_ID = #{itemId}
+      </if>
+      <if test="itemName != null and itemName != ''">
+        and ITEM_NAME = #{itemName}
+      </if>
+      <if test="inStorageDaily != null">
+        and IN_STORAGE_DAILY = #{inStorageDaily}
+      </if>
+      <if test="inStorageMonth != null">
+        and IN_STORAGE_MONTH = #{inStorageMonth}
+      </if>
+      <if test="salesDaily != null">
+        and SALES_DAILY = #{salesDaily}
+      </if>
+      <if test="salesMonth != null">
+        and SALES_MONTH = #{salesMonth}
+      </if>
+      <if test="inventoryCurrent != null">
+        and INVENTORY_CURRENT = #{inventoryCurrent}
+      </if>
+      <if test="inventoryStart != null">
+        and INVENTORY_START = #{inventoryStart}
+      </if>
+      <if test="inventoryChange != null">
+        and INVENTORY_CHANGE = #{inventoryChange}
+      </if>
+      <if test="salesPlanMonth != null">
+        and SALES_PLAN_MONTH = #{salesPlanMonth}
+      </if>
+      <if test="schedulePlanMonth != null">
+        and SCHEDULE_PLAN_MONTH = #{schedulePlanMonth}
+      </if>
+      <if test="dates != null">
+        and TO_CHAR(DATES,'yyyy-MM-dd') = #{dates}
+      </if>
+      <if test="companyName != null and companyName != ''">
+        and COMPANY_NAME = #{companyName}
+      </if>
+      <if test="isValid != null">
+        and IS_VALID = #{isValid}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="itemId != null">
+        and ITEM_ID = #{itemId}
+      </if>
+      <if test="itemName != null and itemName != ''">
+        and ITEM_NAME LIKE '%${itemName}%'
+      </if>
+      <if test="inStorageDaily != null">
+        and IN_STORAGE_DAILY = #{inStorageDaily}
+      </if>
+      <if test="inStorageMonth != null">
+        and IN_STORAGE_MONTH = #{inStorageMonth}
+      </if>
+      <if test="salesDaily != null">
+        and SALES_DAILY = #{salesDaily}
+      </if>
+      <if test="salesMonth != null">
+        and SALES_MONTH = #{salesMonth}
+      </if>
+      <if test="inventoryCurrent != null">
+        and INVENTORY_CURRENT = #{inventoryCurrent}
+      </if>
+      <if test="inventoryStart != null">
+        and INVENTORY_START = #{inventoryStart}
+      </if>
+      <if test="inventoryChange != null">
+        and INVENTORY_CHANGE = #{inventoryChange}
+      </if>
+      <if test="salesPlanMonth != null">
+        and SALES_PLAN_MONTH = #{salesPlanMonth}
+      </if>
+      <if test="schedulePlanMonth != null">
+        and SCHEDULE_PLAN_MONTH = #{schedulePlanMonth}
+      </if>
+      <if test="dates != null">
+        and TO_CHAR(DATES,'yyyy-MM-dd') = #{dates}
+      </if>
+      <if test="companyName != null and companyName != ''">
+        and COMPANY_NAME LIKE '%${companyName}%'
+      </if>
+      <if test="isValid != null">
+        and IS_VALID = #{isValid}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
+    delete from TB_PRODUCT_SUMMARY_DG
+    where ITEM_ID = #{itemId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from TB_PRODUCT_SUMMARY_DG
+    where 1!=1 
+      <if test="itemName != null and itemName != ''">
+        or ITEM_NAME = #{itemName}
+      </if>
+      <if test="inStorageDaily != null">
+        or IN_STORAGE_DAILY = #{inStorageDaily}
+      </if>
+      <if test="inStorageMonth != null">
+        or IN_STORAGE_MONTH = #{inStorageMonth}
+      </if>
+      <if test="salesDaily != null">
+        or SALES_DAILY = #{salesDaily}
+      </if>
+      <if test="salesMonth != null">
+        or SALES_MONTH = #{salesMonth}
+      </if>
+      <if test="inventoryCurrent != null">
+        or INVENTORY_CURRENT = #{inventoryCurrent}
+      </if>
+      <if test="inventoryStart != null">
+        or INVENTORY_START = #{inventoryStart}
+      </if>
+      <if test="inventoryChange != null">
+        or INVENTORY_CHANGE = #{inventoryChange}
+      </if>
+      <if test="salesPlanMonth != null">
+        or SALES_PLAN_MONTH = #{salesPlanMonth}
+      </if>
+      <if test="schedulePlanMonth != null">
+        or SCHEDULE_PLAN_MONTH = #{schedulePlanMonth}
+      </if>
+      <if test="dates != null">
+        or TO_CHAR(DATES,'yyyy-MM-dd') = '#{dates}'
+      </if>
+      <if test="companyName != null and companyName != ''">
+        or COMPANY_NAME = #{companyName}
+      </if>
+      <if test="isValid != null">
+        or IS_VALID = #{isValid}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.TbProductSummaryDg">
+    insert into TB_PRODUCT_SUMMARY_DG (ITEM_ID, ITEM_NAME, IN_STORAGE_DAILY, 
+      IN_STORAGE_MONTH, SALES_DAILY, SALES_MONTH, 
+      INVENTORY_CURRENT, INVENTORY_START, INVENTORY_CHANGE, 
+      SALES_PLAN_MONTH, SCHEDULE_PLAN_MONTH, DATES, 
+      COMPANY_NAME, IS_VALID)
+    values (#{itemId,jdbcType=DECIMAL}, #{itemName,jdbcType=VARCHAR}, #{inStorageDaily,jdbcType=DECIMAL}, 
+      #{inStorageMonth,jdbcType=DECIMAL}, #{salesDaily,jdbcType=DECIMAL}, #{salesMonth,jdbcType=DECIMAL}, 
+      #{inventoryCurrent,jdbcType=DECIMAL}, #{inventoryStart,jdbcType=DECIMAL}, #{inventoryChange,jdbcType=DECIMAL}, 
+      #{salesPlanMonth,jdbcType=DECIMAL}, #{schedulePlanMonth,jdbcType=DECIMAL}, #{dates,jdbcType=TIMESTAMP}, 
+      #{companyName,jdbcType=VARCHAR}, #{isValid,jdbcType=CHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TbProductSummaryDg">
+    insert into TB_PRODUCT_SUMMARY_DG
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="itemId != null">
+        ITEM_ID,
+      </if>
+      <if test="itemName != null">
+        ITEM_NAME,
+      </if>
+      <if test="inStorageDaily != null">
+        IN_STORAGE_DAILY,
+      </if>
+      <if test="inStorageMonth != null">
+        IN_STORAGE_MONTH,
+      </if>
+      <if test="salesDaily != null">
+        SALES_DAILY,
+      </if>
+      <if test="salesMonth != null">
+        SALES_MONTH,
+      </if>
+      <if test="inventoryCurrent != null">
+        INVENTORY_CURRENT,
+      </if>
+      <if test="inventoryStart != null">
+        INVENTORY_START,
+      </if>
+      <if test="inventoryChange != null">
+        INVENTORY_CHANGE,
+      </if>
+      <if test="salesPlanMonth != null">
+        SALES_PLAN_MONTH,
+      </if>
+      <if test="schedulePlanMonth != null">
+        SCHEDULE_PLAN_MONTH,
+      </if>
+      <if test="dates != null">
+        DATES,
+      </if>
+      <if test="companyName != null">
+        COMPANY_NAME,
+      </if>
+      <if test="isValid != null">
+        IS_VALID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="itemId != null">
+        #{itemId,jdbcType=DECIMAL},
+      </if>
+      <if test="itemName != null">
+        #{itemName,jdbcType=VARCHAR},
+      </if>
+      <if test="inStorageDaily != null">
+        #{inStorageDaily,jdbcType=DECIMAL},
+      </if>
+      <if test="inStorageMonth != null">
+        #{inStorageMonth,jdbcType=DECIMAL},
+      </if>
+      <if test="salesDaily != null">
+        #{salesDaily,jdbcType=DECIMAL},
+      </if>
+      <if test="salesMonth != null">
+        #{salesMonth,jdbcType=DECIMAL},
+      </if>
+      <if test="inventoryCurrent != null">
+        #{inventoryCurrent,jdbcType=DECIMAL},
+      </if>
+      <if test="inventoryStart != null">
+        #{inventoryStart,jdbcType=DECIMAL},
+      </if>
+      <if test="inventoryChange != null">
+        #{inventoryChange,jdbcType=DECIMAL},
+      </if>
+      <if test="salesPlanMonth != null">
+        #{salesPlanMonth,jdbcType=DECIMAL},
+      </if>
+      <if test="schedulePlanMonth != null">
+        #{schedulePlanMonth,jdbcType=DECIMAL},
+      </if>
+      <if test="dates != null">
+        #{dates,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyName != null">
+        #{companyName,jdbcType=VARCHAR},
+      </if>
+      <if test="isValid != null">
+        #{isValid,jdbcType=CHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TbProductSummaryDg">
+    update TB_PRODUCT_SUMMARY_DG
+    set ITEM_NAME = #{itemName,jdbcType=VARCHAR},
+      IN_STORAGE_DAILY = #{inStorageDaily,jdbcType=DECIMAL},
+      IN_STORAGE_MONTH = #{inStorageMonth,jdbcType=DECIMAL},
+      SALES_DAILY = #{salesDaily,jdbcType=DECIMAL},
+      SALES_MONTH = #{salesMonth,jdbcType=DECIMAL},
+      INVENTORY_CURRENT = #{inventoryCurrent,jdbcType=DECIMAL},
+      INVENTORY_START = #{inventoryStart,jdbcType=DECIMAL},
+      INVENTORY_CHANGE = #{inventoryChange,jdbcType=DECIMAL},
+      SALES_PLAN_MONTH = #{salesPlanMonth,jdbcType=DECIMAL},
+      SCHEDULE_PLAN_MONTH = #{schedulePlanMonth,jdbcType=DECIMAL},
+      DATES = #{dates,jdbcType=TIMESTAMP},
+      COMPANY_NAME = #{companyName,jdbcType=VARCHAR},
+      IS_VALID = #{isValid,jdbcType=CHAR}
+    where ITEM_ID = #{itemId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TbProductSummaryDg">
+    update TB_PRODUCT_SUMMARY_DG
+    <set>
+      <if test="itemName != null">
+        ITEM_NAME = #{itemName,jdbcType=VARCHAR},
+      </if>
+      <if test="inStorageDaily != null">
+        IN_STORAGE_DAILY = #{inStorageDaily,jdbcType=DECIMAL},
+      </if>
+      <if test="inStorageMonth != null">
+        IN_STORAGE_MONTH = #{inStorageMonth,jdbcType=DECIMAL},
+      </if>
+      <if test="salesDaily != null">
+        SALES_DAILY = #{salesDaily,jdbcType=DECIMAL},
+      </if>
+      <if test="salesMonth != null">
+        SALES_MONTH = #{salesMonth,jdbcType=DECIMAL},
+      </if>
+      <if test="inventoryCurrent != null">
+        INVENTORY_CURRENT = #{inventoryCurrent,jdbcType=DECIMAL},
+      </if>
+      <if test="inventoryStart != null">
+        INVENTORY_START = #{inventoryStart,jdbcType=DECIMAL},
+      </if>
+      <if test="inventoryChange != null">
+        INVENTORY_CHANGE = #{inventoryChange,jdbcType=DECIMAL},
+      </if>
+      <if test="salesPlanMonth != null">
+        SALES_PLAN_MONTH = #{salesPlanMonth,jdbcType=DECIMAL},
+      </if>
+      <if test="schedulePlanMonth != null">
+        SCHEDULE_PLAN_MONTH = #{schedulePlanMonth,jdbcType=DECIMAL},
+      </if>
+      <if test="dates != null">
+        DATES = #{dates,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyName != null">
+        COMPANY_NAME = #{companyName,jdbcType=VARCHAR},
+      </if>
+      <if test="isValid != null">
+        IS_VALID = #{isValid,jdbcType=CHAR},
+      </if>
+    </set>
+    where ITEM_ID = #{itemId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ITEM_ID = #{itemId,jdbcType=DECIMAL}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into TB_PRODUCT_SUMMARY_DG 
+      (ITEM_ID, 
+      ITEM_NAME, IN_STORAGE_DAILY, IN_STORAGE_MONTH, 
+      SALES_DAILY, SALES_MONTH, INVENTORY_CURRENT, 
+      INVENTORY_START, INVENTORY_CHANGE, 
+      SALES_PLAN_MONTH, SCHEDULE_PLAN_MONTH, 
+      DATES, COMPANY_NAME, IS_VALID
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.itemId,jdbcType=DECIMAL}, 
+      #{item.itemName,jdbcType=VARCHAR}, #{item.inStorageDaily,jdbcType=DECIMAL}, #{item.inStorageMonth,jdbcType=DECIMAL}, 
+      #{item.salesDaily,jdbcType=DECIMAL}, #{item.salesMonth,jdbcType=DECIMAL}, #{item.inventoryCurrent,jdbcType=DECIMAL}, 
+      #{item.inventoryStart,jdbcType=DECIMAL}, #{item.inventoryChange,jdbcType=DECIMAL}, 
+      #{item.salesPlanMonth,jdbcType=DECIMAL}, #{item.schedulePlanMonth,jdbcType=DECIMAL}, 
+      #{item.dates,jdbcType=TIMESTAMP}, #{item.companyName,jdbcType=VARCHAR}, #{item.isValid,jdbcType=CHAR}
+       from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update TB_PRODUCT_SUMMARY_DG
+     set
+       ITEM_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.itemId,jdbcType=DECIMAL}
+       </foreach>
+       ,ITEM_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.itemName,jdbcType=VARCHAR}
+       </foreach>
+       ,IN_STORAGE_DAILY=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.inStorageDaily,jdbcType=DECIMAL}
+       </foreach>
+       ,IN_STORAGE_MONTH=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.inStorageMonth,jdbcType=DECIMAL}
+       </foreach>
+       ,SALES_DAILY=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.salesDaily,jdbcType=DECIMAL}
+       </foreach>
+       ,SALES_MONTH=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.salesMonth,jdbcType=DECIMAL}
+       </foreach>
+       ,INVENTORY_CURRENT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.inventoryCurrent,jdbcType=DECIMAL}
+       </foreach>
+       ,INVENTORY_START=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.inventoryStart,jdbcType=DECIMAL}
+       </foreach>
+       ,INVENTORY_CHANGE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.inventoryChange,jdbcType=DECIMAL}
+       </foreach>
+       ,SALES_PLAN_MONTH=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.salesPlanMonth,jdbcType=DECIMAL}
+       </foreach>
+       ,SCHEDULE_PLAN_MONTH=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.schedulePlanMonth,jdbcType=DECIMAL}
+       </foreach>
+       ,DATES=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.dates,jdbcType=TIMESTAMP}
+       </foreach>
+       ,COMPANY_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.companyName,jdbcType=VARCHAR}
+       </foreach>
+       ,IS_VALID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
+          when #{item.itemId,jdbcType=DECIMAL} then #{item.isValid,jdbcType=CHAR}
+       </foreach>
+     where ITEM_ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.itemId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from TB_PRODUCT_SUMMARY_DG
+    where ITEM_ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 1 - 1
src/main/resources/log4j.properties

@@ -1,5 +1,5 @@
 ## LOG4J配置
-log4j.rootCategory=INFO, stdout,file, RUNNING,errorfile
+log4j.rootCategory=INFO,file, RUNNING,errorfile
 ## 控制台输出
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout