Ver código fonte

Merge branch 'master' of https://git.steerinfo.com/XTEMS/xt-ems-api

QuietShadow 3 anos atrás
pai
commit
fa9803a91f

+ 9 - 5
src/main/java/com/steerinfo/ems/emsprodplanmonth/controller/EmsProdplanMonthController.java

@@ -7,6 +7,7 @@ import com.steerinfo.ems.emsprodplanround.service.IEmsProdplanRoundService;
 import com.steerinfo.ems.emsprodplanyear.model.EmsProdplanYear;
 import com.steerinfo.ems.trmworkproc.mapper.TRmWorkprocMapper;
 import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
+import com.steerinfo.ems.trmworkproc.service.ITRmWorkprocService;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
@@ -63,6 +64,13 @@ public class EmsProdplanMonthController extends BaseRESTfulController {
     //@RequiresPermissions("emsprodplanmonth:view")
     @GetMapping(value = "/")
     public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        if(parmas.containsKey("workprocid") && parmas.get("workprocid") != null && !"".equals(parmas.get("workprocid").toString())){
+        String  workprocid =  parmas.get("workprocid").toString();
+        if(!workprocid.startsWith(",")){
+            workprocid = "'"+workprocid.replaceAll(",", "','").replaceAll(",", "','")+"'";
+        }
+            parmas.put("workprocid",workprocid);
+        }
         PageList<EmsProdplanMonth> list = emsProdplanMonthService.queryForPage(parmas, pageNum, pageSize);
         return success(list);
     }
@@ -195,9 +203,8 @@ public class EmsProdplanMonthController extends BaseRESTfulController {
                 map.put("parentid",m.getId());
                 List query = emsProdplanRoundService.query(map);
                 if(query.size()>0){
-                    return  failed(null,"该工序在当前月已有轮次计划,无法删除"+m.getId());
+                    return  failed(null,"序号为'"+m.getSqno()+"'在当前月已有轮次计划,无法删除");
                 }
-
                 EmsProdplanMonth tv = emsProdplanMonthService.getById(m.getId());
                 if (tv == null){
                     return failed(null, "数据已经删除,请重新查询数据");
@@ -225,9 +232,6 @@ public class EmsProdplanMonthController extends BaseRESTfulController {
     })
     @GetMapping(value = "/getDates")
     public RESTfulResult getDates(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
-         if(parmas.get("workprocid") != null && parmas.get("workprocid") != ""){
-             parmas.put("type","");
-         }
         PageList dateLc = emsProdplanMonthService.getDateLc(parmas, pageNum, pageSize);
         return success(dateLc);
     }

+ 2 - 0
src/main/java/com/steerinfo/ems/emsprodplanmonth/mapper/EmsProdplanMonthMapper.java

@@ -1,6 +1,8 @@
 package com.steerinfo.ems.emsprodplanmonth.mapper;
 
 import com.steerinfo.ems.emsprodplanmonth.model.EmsProdplanMonth;
+import com.steerinfo.framework.datasource.DataSourceKey;
+import com.steerinfo.framework.datasource.TargetDataSource;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import java.util.HashMap;
 import java.util.List;

+ 2 - 2
src/main/java/com/steerinfo/ems/emsprodplanmonth/mapper/EmsProdplanMonthMapper.xml

@@ -44,7 +44,7 @@
       </if>
 
       <if test="workprocid != null and workprocid != ''">
-        and WORKPROCID in  (#{workprocid})
+        and WORKPROCID in  (${workprocid})
       </if>
       <if test="weightMonth != null">
         and WEIGHT_MONTH = #{weightMonth}
@@ -77,7 +77,7 @@
        and  trunc(MAY) = to_date(#{may},'yyyy-mm')
       </if>
     </where>
-    ORDER  BY WORKPROCID
+    ORDER  BY SQNO
   </sql>
   <sql id="whereLike">
     <where> 

+ 16 - 13
src/main/java/com/steerinfo/ems/emsprodplanmonth/model/EmsProdplanMonth.java

@@ -1,9 +1,13 @@
 package com.steerinfo.ems.emsprodplanmonth.model;
 
 import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 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="月计划编制表")
@@ -37,13 +41,13 @@ public class EmsProdplanMonth implements IBasePO<String> {
      * 目标计划量(月)(WEIGHT_MONTH,DECIMAL,0)
      */
     @ApiModelProperty(value="目标计划量(月)",required=false)
-    private Long weightMonth;
+    private BigDecimal weightMonth;
 
     /**
      * 目标计划量(日)(WEIGHT_DAY,DECIMAL,0)
      */
     @ApiModelProperty(value="目标计划量(日)",required=false)
-    private Long weightDay;
+    private BigDecimal weightDay;
 
     /**
      * 单位名称(UNIT,VARCHAR,10)
@@ -91,9 +95,9 @@ public class EmsProdplanMonth implements IBasePO<String> {
     private String state;
 
     @ApiModelProperty(value = "已下发量",required = false)
-    private Long yxf_weight;
+    private BigDecimal yxf_weight;
     @ApiModelProperty(value = "可下发量",required = false)
-    private Long kxf_weight;
+    private BigDecimal kxf_weight;
     @ApiModelProperty(value = "序号",required = false)
     private Long sqno;
 
@@ -105,23 +109,22 @@ public class EmsProdplanMonth implements IBasePO<String> {
         this.sqno = sqno;
     }
 
-    public Long getYxf_weight() {
+    public BigDecimal getYxf_weight() {
         return yxf_weight;
     }
 
-    public void setYxf_weight(Long yxf_weight) {
+    public void setYxf_weight(BigDecimal yxf_weight) {
         this.yxf_weight = yxf_weight;
     }
 
-    public Long getKxf_weight() {
+    public BigDecimal getKxf_weight() {
         return kxf_weight;
     }
 
-    public void setKxf_weight(Long kxf_weight) {
+    public void setKxf_weight(BigDecimal kxf_weight) {
         this.kxf_weight = kxf_weight;
     }
 
-
     public String getState() {
         return state;
     }
@@ -193,19 +196,19 @@ public class EmsProdplanMonth implements IBasePO<String> {
         this.may = may;
     }
 
-    public Long getWeightMonth() {
+    public BigDecimal getWeightMonth() {
         return weightMonth;
     }
 
-    public void setWeightMonth(Long weightMonth) {
+    public void setWeightMonth(BigDecimal weightMonth) {
         this.weightMonth = weightMonth;
     }
 
-    public Long getWeightDay() {
+    public BigDecimal getWeightDay() {
         return weightDay;
     }
 
-    public void setWeightDay(Long weightDay) {
+    public void setWeightDay(BigDecimal weightDay) {
         this.weightDay = weightDay;
     }
 

+ 2 - 0
src/main/java/com/steerinfo/ems/emsprodplanmonth/service/IEmsProdplanMonthService.java

@@ -1,5 +1,7 @@
 package com.steerinfo.ems.emsprodplanmonth.service;
 
+import com.steerinfo.framework.datasource.DataSourceKey;
+import com.steerinfo.framework.datasource.TargetDataSource;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.ems.emsprodplanmonth.model.EmsProdplanMonth;
 import com.steerinfo.framework.service.pagehelper.PageList;

+ 3 - 0
src/main/java/com/steerinfo/ems/emsprodplanmonth/service/impl/EmsProdplanMonthServiceImpl.java

@@ -1,6 +1,8 @@
 package com.steerinfo.ems.emsprodplanmonth.service.impl;
 
 import com.github.pagehelper.Page;
+import com.steerinfo.framework.datasource.DataSourceKey;
+import com.steerinfo.framework.datasource.TargetDataSource;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import com.steerinfo.ems.emsprodplanmonth.model.EmsProdplanMonth;
@@ -49,6 +51,7 @@ public class EmsProdplanMonthServiceImpl extends BaseServiceImpl<EmsProdplanMont
         return pageInfo;
     }
 
+
     @Override
     public PageList<Map<String, Object>> getDateLc(HashMap<String, Object> parmas, Integer pageNum, Integer pageSize) {
         PageHelper.startPage(pageNum,pageSize);

+ 44 - 22
src/main/java/com/steerinfo/ems/emsprodplanround/controller/EmsProdplanRoundController.java

@@ -17,6 +17,7 @@ import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import java.text.SimpleDateFormat;
@@ -87,7 +88,7 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
         map.put("may",sdf.format(model.getMay()));
         EmsProdplanMonth emsProdplanMonth = emsProdplanMonthMapper.getBymayAndWorkprocid(map);
         if(emsProdplanMonth == null){
-            return  failed(null,"工序无法找到"+sdf.format(model.getMay())+"月数据");
+            return  failed(null,"工序无法找到"+sdf.format(model.getMay())+"月数据");
         }
         map.put("parentid",emsProdplanMonth.getId());
         EmsProdplanRound getbeyondWeight = emsProdplanRoundService.getbeyondWeight(map);
@@ -102,8 +103,8 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
         model.setCreateman(userId);
         model.setWorkprocType(map.get("workprocid").toString());
         EmsProdplanRound emsProdplanRound = emsProdplanRoundService.add(model);
-        if(getbeyondWeight.getPlanWeight()>emsProdplanMonth.getWeightMonth()){
-            return success(emsProdplanRound,"新增成功,但是轮次计划重量已超出!!!");
+        if(getbeyondWeight.getPlanWeight().compareTo(emsProdplanMonth.getWeightMonth()) == 1){
+            return success(null,"新增成功,但是轮次计划重量已超出!!!");
         }
         return success();
     }
@@ -176,46 +177,64 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
     	}
       return success();
     }
-    @ApiOperation(value="修改", notes="根据models修改对象")
+    @ApiOperation(value="下发", notes="根据models修改对象")
     @ApiImplicitParam(name = "emsProdplanRounds", value = "", required = true, dataType = "EmsProdplanRounds")
     @PostMapping(value = "/issue")
+    @Transactional
     public RESTfulResult issue(@RequestBody EmsProdplanRound [] models){
         List id = new ArrayList();
         String monthid = "";
-        String state  ="";
         for (int i = 0; i < models.length; i++) {
             EmsProdplanRound model = models[i];
             id.add(model.getId());
             monthid = model.getParentid();
             model.setIssuedTime(new Date());
-            model.getIsxf() ;
-            if(model.getIsxf().equals("1")){
-                model.setState("1");
+            if(model.getState().equals("1")){
+                return  failed(null,"存在已下发的计划,无法再次做下发");
             }
-            state = model.getIsxf();
+            model.setState("1");
+            emsProdplanRoundMapper.updateByPrimaryKey(model);
+        }
+        EmsProdplanRound sumPlanWeight = emsProdplanRoundService.getSumPlanWeight(id);
+        EmsProdplanMonth emsProdplanMonth = emsProdplanMonthMapper.selectByPrimaryKey(monthid);
+        emsProdplanMonth.setKxf_weight(emsProdplanMonth.getWeightMonth().subtract(emsProdplanMonth.getYxf_weight().add(sumPlanWeight.getPlanWeight())));
+        emsProdplanMonth.setYxf_weight(emsProdplanMonth.getYxf_weight().add(sumPlanWeight.getPlanWeight()));
+        emsProdplanMonthMapper.updateByPrimaryKey(emsProdplanMonth);
+        return  success();
+    }
+    @ApiOperation(value="取消下发", notes="根据models修改对象")
+    @ApiImplicitParam(name = "emsProdplanRounds", value = "", required = true, dataType = "EmsProdplanRounds")
+    @PostMapping(value = "/offissue")
+    @Transactional
+    public RESTfulResult offissue(@RequestBody EmsProdplanRound [] models){
+        List id = new ArrayList();
+        String monthid = "";
+        String state  ="";
+        for (int i = 0; i < models.length; i++) {
+            EmsProdplanRound model = models[i];
+            id.add(model.getId());
+            monthid = model.getParentid();
+            model.setIssuedTime(new Date());
             if(model.getState().equals("0")){
                 return  failed(null,"没有下发过的轮次计划无法做取消下发操作");
             }
-            if(model.getIsxf().equals("0")){
-                model.setState("0");
+            EmsProdplanRound emsProdplanRound = emsProdplanRoundMapper.selectByPrimaryKey(model.getId());
+            if(emsProdplanRound.getState().equals("2")){
+                return failed(null,"存在已经接收的计划,无法做取消下发操作,请重新刷新页面");
             }
+            model.setState("0");
             emsProdplanRoundMapper.updateByPrimaryKey(model);
         }
         EmsProdplanRound sumPlanWeight = emsProdplanRoundService.getSumPlanWeight(id);
         EmsProdplanMonth emsProdplanMonth = emsProdplanMonthMapper.selectByPrimaryKey(monthid);
-        if(state.equals("1")){
-            emsProdplanMonth.setKxf_weight(emsProdplanMonth.getWeightMonth()-(emsProdplanMonth.getYxf_weight()+sumPlanWeight.getPlanWeight()));
-            emsProdplanMonth.setYxf_weight(emsProdplanMonth.getYxf_weight()+sumPlanWeight.getPlanWeight());
-        }
-        else {
-            emsProdplanMonth.setKxf_weight(emsProdplanMonth.getKxf_weight()+sumPlanWeight.getPlanWeight());
-            emsProdplanMonth.setYxf_weight(emsProdplanMonth.getYxf_weight()-sumPlanWeight.getPlanWeight());
-        }
-            emsProdplanMonthMapper.updateByPrimaryKey(emsProdplanMonth);
-            return  success();
+        // 取消下发操作
+        emsProdplanMonth.setKxf_weight(emsProdplanMonth.getKxf_weight().add(sumPlanWeight.getPlanWeight()));
+        emsProdplanMonth.setYxf_weight(emsProdplanMonth.getYxf_weight().subtract(sumPlanWeight.getPlanWeight()));
+        emsProdplanMonthMapper.updateByPrimaryKey(emsProdplanMonth);
+        return  success();
     }
 
-    @ApiOperation(value="删除", notes="根据models删除对象")
+
     @ApiImplicitParam(name = "emsProdplanRounds", value = "", required = true, dataType = "EmsProdplanRounds")
     @PostMapping(value = "/delete")
     public RESTfulResult delete(@RequestBody EmsProdplanRound [] models){
@@ -228,4 +247,7 @@ public class EmsProdplanRoundController extends BaseRESTfulController {
         }
         return  success();
     }
+
+
+
 }

+ 27 - 6
src/main/java/com/steerinfo/ems/emsprodplanround/mapper/EmsProdplanRoundMapper.xml

@@ -26,17 +26,24 @@
     <result column="MSG_FLAG" jdbcType="VARCHAR" property="msgFlag" />
     <result column="READ_FLAG" jdbcType="VARCHAR" property="readFlag" />
     <result column="PARENTID" jdbcType="VARCHAR" property="parentid"/>
+    <result column="IATERAL_AREA" jdbcType="VARCHAR" property="iateralArea"/>
+    <result column="LENGTH_TIMES_WIDTH" jdbcType="VARCHAR" property="lengthTimesWidth"/>
+    <result column="DIMENSION" jdbcType="VARCHAR" property="dimension"/>
+    <result column="STATUS" jdbcType="VARCHAR" property="status"/>
+    <result column="ERR_MSG" jdbcType="VARCHAR" property="err_msg"/>
+    <result column="GOINFO" jdbcType="VARCHAR" property="goinfo"/>
+    <result column="FETCH_PLAN_WEIGHT" jdbcType="DECIMAL" property="fetchPlanWeight"/>
   </resultMap>
   <sql id="columns">
     ID, MAY, SQNO, UNITID, DESCRIBE, STATE, GRADES, PLAN_WEIGHT, SPECIFICATIONS, LENGTHS, 
     CHEMICAL_STANDARD, SURFACE_STANDARD, MEMO, ISSUED_TIME, CREATEMAN, CREATETIME, UPDATEMAN, 
-    UPDATETIME, TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE, MSG_FLAG, READ_FLAG,PARENTID
+    UPDATETIME, TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE, MSG_FLAG, READ_FLAG,PARENTID,IATERAL_AREA,LENGTH_TIMES_WIDTH,DIMENSION,STATUS,ERR_MSG,GOINFO,FETCH_PLAN_WEIGHT
   </sql>
   <sql id="columns_alias">
     t.ID, t.MAY, t.SQNO, t.UNITID, t.DESCRIBE, t.STATE, t.GRADES, t.PLAN_WEIGHT, t.SPECIFICATIONS, 
     t.LENGTHS, t.CHEMICAL_STANDARD, t.SURFACE_STANDARD, t.MEMO, t.ISSUED_TIME, t.CREATEMAN, 
     t.CREATETIME, t.UPDATEMAN, t.UPDATETIME, t.TRANSPORT_TYPE, t.PURPOSE, t.WORKPROC_TYPE, 
-    t.MSG_FLAG, t.READ_FLAG,t.PARENTID
+    t.MSG_FLAG, t.READ_FLAG,t.PARENTID,GOINFO,FETCH_PLAN_WEIGHT
   </sql>
   <sql id="select">
     SELECT <include refid="columns"/> FROM EMS_PRODPLAN_ROUND
@@ -274,8 +281,8 @@
       LENGTHS, CHEMICAL_STANDARD, SURFACE_STANDARD, 
       MEMO, ISSUED_TIME, CREATEMAN, 
       CREATETIME, UPDATEMAN, UPDATETIME, 
-      TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE, 
-      MSG_FLAG, READ_FLAG,PARENTID)
+      TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE,
+      MSG_FLAG, READ_FLAG,PARENTID,IATERAL_AREA,LENGTH_TIMES_WIDTH,DIMENSION,GOINFO)
     values (#{id,jdbcType=VARCHAR}, #{may,jdbcType=TIMESTAMP}, #{sqno,jdbcType=DECIMAL},
       #{unitid,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR}, #{state,jdbcType=VARCHAR}, 
       #{grades,jdbcType=VARCHAR}, #{planWeight,jdbcType=DECIMAL}, #{specifications,jdbcType=VARCHAR}, 
@@ -283,7 +290,7 @@
       #{memo,jdbcType=VARCHAR}, #{issuedTime,jdbcType=TIMESTAMP}, #{createman,jdbcType=VARCHAR}, 
       #{createtime,jdbcType=TIMESTAMP}, #{updateman,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}, 
       #{transportType,jdbcType=VARCHAR}, #{purpose,jdbcType=VARCHAR}, #{workprocType,jdbcType=VARCHAR}, 
-      #{msgFlag,jdbcType=VARCHAR}, #{readFlag,jdbcType=VARCHAR},#{parentid,jdbcType=VARCHAR})
+      #{msgFlag,jdbcType=VARCHAR}, #{readFlag,jdbcType=VARCHAR},#{parentid,jdbcType=VARCHAR},#{iateralArea,jdbcType=VARCHAR},#{lengthTimesWidth,jdbcType=VARCHAR},#{dimension,jdbcType=VARCHAR},#{goinfo,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
     insert into EMS_PRODPLAN_ROUND
@@ -428,6 +435,12 @@
       <if test="readFlag != null">
         #{readFlag,jdbcType=VARCHAR},
       </if>
+      <if test="goinfo != null and goinfo ! = ''">
+        #{goinfo,jdbcType=VARCHAR}
+      </if>
+      <if test="fetchPlanWeight != null ">
+        #{fetchPlanWeight,jdbcType=DECIMAL}
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
@@ -451,7 +464,12 @@
       UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
       TRANSPORT_TYPE = #{transportType,jdbcType=VARCHAR},
       PURPOSE = #{purpose,jdbcType=VARCHAR},
-      WORKPROC_TYPE = #{workprocType,jdbcType=VARCHAR}
+      WORKPROC_TYPE = #{workprocType,jdbcType=VARCHAR},
+      PARENTID = #{parentid,jdbcType=VARCHAR},
+      IATERAL_AREA = #{iateralArea,jdbcType=VARCHAR},
+      LENGTH_TIMES_WIDTH = #{lengthTimesWidth,jdbcType=VARCHAR},
+      DIMENSION = #{dimension,jdbcType=VARCHAR},
+      GOINFO = #{goinfo,jdbcType=VARCHAR}
     where ID = #{id,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
@@ -523,6 +541,9 @@
       <if test="readFlag != null">
         READ_FLAG = #{readFlag,jdbcType=VARCHAR},
       </if>
+      <if test="parentid != null and parentid != ''">
+       PARENTID = #{parentid,jdbcType=VARCHAR}
+      </if>
     </set>
     where ID = #{id,jdbcType=VARCHAR}
   </update>

+ 82 - 4
src/main/java/com/steerinfo/ems/emsprodplanround/model/EmsProdplanRound.java

@@ -4,6 +4,8 @@ import com.alibaba.fastjson.annotation.JSONField;
 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="轮次计划表")
@@ -55,7 +57,7 @@ public class EmsProdplanRound implements IBasePO<String> {
      * 计划量(PLAN_WEIGHT,DECIMAL,0)
      */
     @ApiModelProperty(value="计划量",required=false)
-    private Long planWeight;
+    private BigDecimal planWeight;
 
     /**
      * 规格(SPECIFICATIONS,VARCHAR,100)
@@ -153,6 +155,81 @@ public class EmsProdplanRound implements IBasePO<String> {
     public String getParentid() {
         return parentid;
     }
+    @ApiModelProperty(value = "高度乘以宽度",required = true)
+
+    private String iateralArea;
+    @ApiModelProperty(value = "断面",required = true)
+
+    private String lengthTimesWidth;
+    @ApiModelProperty(value = "截面尺寸",required = true)
+    private String dimension;
+
+    @ApiModelProperty(value = "处理状态",required = true)
+    private String status;
+
+    @ApiModelProperty(value = "错误信息",required = true)
+    private  String err_msg;
+
+    @ApiModelProperty(value = "去向", required =  true)
+    private String goinfo;
+    @ApiModelProperty
+    private BigDecimal  fetchPlanWeight;
+
+    public String getGoinfo() {
+        return goinfo;
+    }
+
+    public void setGoinfo(String goinfo) {
+        this.goinfo = goinfo;
+    }
+
+    public BigDecimal getFetchPlanWeight() {
+        return fetchPlanWeight;
+    }
+
+    public void setFetchPlanWeight(BigDecimal fetchPlanWeight) {
+        this.fetchPlanWeight = fetchPlanWeight;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getErr_msg() {
+        return err_msg;
+    }
+
+    public void setErr_msg(String err_msg) {
+        this.err_msg = err_msg;
+    }
+
+    public String getIateralArea() {
+        return iateralArea;
+    }
+
+    public void setIateralArea(String iateralArea) {
+        this.iateralArea = iateralArea;
+    }
+
+    public String getLengthTimesWidth() {
+        return lengthTimesWidth;
+    }
+
+    public void setLengthTimesWidth(String lengthTimesWidth) {
+        this.lengthTimesWidth = lengthTimesWidth;
+    }
+
+    public String getDimension() {
+        return dimension;
+    }
+
+    public void setDimension(String dimension) {
+        this.dimension = dimension;
+    }
 
     public void setParentid(String parentid) {
         this.parentid = parentid;
@@ -216,11 +293,12 @@ public class EmsProdplanRound implements IBasePO<String> {
         this.grades = grades == null ? null : grades.trim();
     }
 
-    public Long getPlanWeight() {
+
+    public BigDecimal getPlanWeight() {
         return planWeight;
     }
 
-    public void setPlanWeight(Long planWeight) {
+    public void setPlanWeight(BigDecimal planWeight) {
         this.planWeight = planWeight;
     }
 
@@ -237,7 +315,7 @@ public class EmsProdplanRound implements IBasePO<String> {
     }
 
     public void setLengths(String lengths) {
-        this.lengths = lengths == null ? null : lengths.trim();
+        this.lengths = lengths;
     }
 
     public String getChemicalStandard() {

+ 1 - 1
src/main/java/com/steerinfo/ems/trmstation/mapper/TRmStationMapper.xml

@@ -217,6 +217,6 @@
     select ID, NAME from T_RM_STATION order by NAME
   </select>
   <select id="getMaxSortSeq" resultType="java.lang.Long">
-    SELECT MAX(SORTSEQ) from T_RM_STATION
+    SELECT nvl(max(SORTSEQ+1),0) from T_RM_STATION
   </select>
 </mapper>

+ 1 - 0
src/main/java/com/steerinfo/ems/trmstation/service/ITRmStationService.java

@@ -1,6 +1,7 @@
 package com.steerinfo.ems.trmstation.service;
 
 import com.steerinfo.ems.trmstation.model.TRmStation;
+import com.steerinfo.framework.datasource.TargetDataSource;
 import com.steerinfo.framework.service.IBaseService;
 
 import java.util.List;

+ 1 - 0
src/main/java/com/steerinfo/ems/trmunit/controller/TRmUnitController.java

@@ -196,6 +196,7 @@ public class TRmUnitController extends BaseRESTfulController {
         return success();
     }
 
+
     @ApiOperation(value = "获取Id 和 Name",notes = "获取下拉框得值(可传参数isstd(是否标准单位))")
     @GetMapping(value = "/getIdAndName")
     public RESTfulResult getIdAndName(@RequestParam HashMap params){

+ 3 - 0
src/main/java/com/steerinfo/ems/trmunit/mapper/TRmUnitMapper.java

@@ -1,6 +1,8 @@
 package com.steerinfo.ems.trmunit.mapper;
 
 import com.steerinfo.ems.trmunit.model.TRmUnit;
+import com.steerinfo.framework.datasource.DataSourceKey;
+import com.steerinfo.framework.datasource.TargetDataSource;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 
@@ -12,5 +14,6 @@ import java.util.Set;
 public interface TRmUnitMapper extends IBaseMapper<TRmUnit, String> {
 
     List<TRmUnit> getIdAndName(Map<String, Object> parameters);
+
     String getMaxId();
 }

+ 3 - 4
src/main/java/com/steerinfo/ems/trmunit/service/impl/TRmUnitServiceImpl.java

@@ -4,6 +4,8 @@ import com.steerinfo.ems.trmunit.controller.TRmUnitController;
 import com.steerinfo.ems.trmunit.mapper.TRmUnitMapper;
 import com.steerinfo.ems.trmunit.model.TRmUnit;
 import com.steerinfo.ems.trmunit.service.ITRmUnitService;
+import com.steerinfo.framework.datasource.DataSourceKey;
+import com.steerinfo.framework.datasource.TargetDataSource;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import org.slf4j.Logger;
@@ -41,6 +43,7 @@ public class TRmUnitServiceImpl extends BaseServiceImpl<TRmUnit, String> impleme
         return tRmUnitMapper;
     }
 
+
     public List<TRmUnit> getIdAndName(Map<String, Object> parameters) {
         return tRmUnitMapper.getIdAndName(parameters);
     }
@@ -66,8 +69,4 @@ public class TRmUnitServiceImpl extends BaseServiceImpl<TRmUnit, String> impleme
         }
         return changeexp/exp;
     }
-
-    public static void main(String[] args) {
-        //System.out.println(TRmUnitServiceImpl.getchangerate());
-    }
 }