Browse Source

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

QuietShadow 3 years ago
parent
commit
79acd9fd58
44 changed files with 1013 additions and 11 deletions
  1. 1 1
      pom.xml
  2. 1 1
      src/main/java/com/steerinfo/ems/emsprodplanmonth/mapper/EmsProdplanMonthMapper.xml
  3. 111 0
      src/main/java/com/steerinfo/ems/emsprodplanroundweight/controller/EmsProdplanRoundWeightController.java
  4. 9 0
      src/main/java/com/steerinfo/ems/emsprodplanroundweight/mapper/EmsProdplanRoundWeightMapper.java
  5. 264 0
      src/main/java/com/steerinfo/ems/emsprodplanroundweight/mapper/EmsProdplanRoundWeightMapper.xml
  6. 138 0
      src/main/java/com/steerinfo/ems/emsprodplanroundweight/model/EmsProdplanRoundWeight.java
  7. 24 0
      src/main/java/com/steerinfo/ems/emsprodplanroundweight/service/IEmsProdplanRoundWeightService.java
  8. 76 0
      src/main/java/com/steerinfo/ems/emsprodplanroundweight/service/impl/EmsProdplanRoundWeightServiceImpl.java
  9. 1 3
      src/main/java/com/steerinfo/ems/trmactitem/controller/TRmActItemController.java
  10. 6 0
      src/main/java/com/steerinfo/ems/trmactitem/mapper/TRmActItemMapper.java
  11. 5 3
      src/main/java/com/steerinfo/ems/trmactitem/mapper/TRmActItemMapper.xml
  12. 4 0
      src/main/java/com/steerinfo/ems/trmactitem/service/ITRmActItemService.java
  13. 7 1
      src/main/java/com/steerinfo/ems/trmactitem/service/impl/TRmActItemServiceImpl.java
  14. 1 0
      src/main/java/com/steerinfo/ems/trmbalancevalue/controller/TRmBalanceValueController.java
  15. 15 0
      src/main/java/com/steerinfo/ems/trmmaterial/controller/TRmMaterialController.java
  16. 3 0
      src/main/java/com/steerinfo/ems/trmmaterial/mapper/TRmMaterialMapper.java
  17. 8 0
      src/main/java/com/steerinfo/ems/trmmaterial/mapper/TRmMaterialMapper.xml
  18. 4 0
      src/main/java/com/steerinfo/ems/trmmaterial/service/ITRmMaterialService.java
  19. 7 0
      src/main/java/com/steerinfo/ems/trmmaterial/service/impl/TRmMaterialServiceImpl.java
  20. 14 0
      src/main/java/com/steerinfo/ems/trmproduct/controller/TRmProductController.java
  21. 4 0
      src/main/java/com/steerinfo/ems/trmproduct/mapper/TRmProductMapper.java
  22. 8 1
      src/main/java/com/steerinfo/ems/trmproduct/mapper/TRmProductMapper.xml
  23. 4 0
      src/main/java/com/steerinfo/ems/trmproduct/service/ITRmProductService.java
  24. 6 0
      src/main/java/com/steerinfo/ems/trmproduct/service/impl/TRmProductServiceImpl.java
  25. 14 0
      src/main/java/com/steerinfo/ems/trmworkproc/controller/TRmWorkprocController.java
  26. 3 0
      src/main/java/com/steerinfo/ems/trmworkproc/mapper/TRmWorkprocMapper.java
  27. 8 0
      src/main/java/com/steerinfo/ems/trmworkproc/mapper/TRmWorkprocMapper.xml
  28. 3 0
      src/main/java/com/steerinfo/ems/trmworkproc/service/ITRmWorkprocService.java
  29. 7 0
      src/main/java/com/steerinfo/ems/trmworkproc/service/impl/TRmWorkprocServiceImpl.java
  30. 37 1
      src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/controller/TRmWorkprocMaterialValueController.java
  31. 5 0
      src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/mapper/TRmWorkprocMaterialValueMapper.java
  32. 49 0
      src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/mapper/TRmWorkprocMaterialValueMapper.xml
  33. 11 0
      src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/model/TRmWorkprocMaterialValue.java
  34. 6 0
      src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/service/ITRmWorkprocMaterialValueService.java
  35. 6 0
      src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/service/impl/TRmWorkprocMaterialValueServiceImpl.java
  36. 39 0
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/controller/TRmWorkprocProductValueController.java
  37. 5 0
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/mapper/TRmWorkprocProductValueMapper.java
  38. 48 0
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/mapper/TRmWorkprocProductValueMapper.xml
  39. 14 0
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/model/TRmWorkprocProductValue.java
  40. 5 0
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/service/ITRmWorkprocProductValueService.java
  41. 7 0
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/service/impl/TRmWorkprocProductValueServiceImpl.java
  42. 9 0
      src/main/java/com/steerinfo/feigen/model/LgWeight.java
  43. 2 0
      src/main/java/com/steerinfo/feigen/service/LgWeightFeigenService.java
  44. 14 0
      src/main/java/com/steerinfo/task/SpringCronTask.java

+ 1 - 1
pom.xml

@@ -234,7 +234,7 @@
 <!--				</executions>-->
 <!--			  </plugin>-->
 		</plugins>
-		
+
 		<pluginManagement>
 			<plugins>
 				<!-- This plugin's configuration is used to store Eclipse m2e settings 

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

@@ -77,7 +77,7 @@
        and  MAY  between  to_date(#{startTime},'yyyy-mm-dd') and to_date(#{endTime},'yyyy-mm-dd')
       </if>
     </where>
-    ORDER  BY SQNO
+    ORDER  BY WORKPROCID,MAY
   </sql>
   <sql id="whereLike">
     <where> 

+ 111 - 0
src/main/java/com/steerinfo/ems/emsprodplanroundweight/controller/EmsProdplanRoundWeightController.java

@@ -0,0 +1,111 @@
+package com.steerinfo.ems.emsprodplanroundweight.controller;
+
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.ems.emsprodplanroundweight.model.EmsProdplanRoundWeight;
+import com.steerinfo.ems.emsprodplanroundweight.service.IEmsProdplanRoundWeightService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.text.ParseException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * EmsProdplanRoundWeight RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-01 04:14
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-01
+ * 作者:generator
+ * 参考:
+ * 描述:EmsProdplanRoundWeight RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/emsprodplanroundweights")
+public class EmsProdplanRoundWeightController extends BaseRESTfulController {
+
+    @Autowired
+    IEmsProdplanRoundWeightService emsProdplanRoundWeightService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emsprodplanroundweight:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsProdplanRoundWeight> list = emsProdplanRoundWeightService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emsprodplanroundweight:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsProdplanRoundWeight> list = emsProdplanRoundWeightService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据EmsProdplanRoundWeight对象创建")
+    @ApiImplicitParam(name = "emsProdplanRoundWeight", value = "详细实体emsProdplanRoundWeight", required = true, dataType = "EmsProdplanRoundWeight")
+    //@RequiresPermissions("emsprodplanroundweight:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute EmsProdplanRoundWeight model){
+        EmsProdplanRoundWeight emsProdplanRoundWeight = emsProdplanRoundWeightService.add(model);
+        return success(emsProdplanRoundWeight);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("emsprodplanroundweight:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        EmsProdplanRoundWeight emsProdplanRoundWeight = emsProdplanRoundWeightService.getById(id);
+        return success(emsProdplanRoundWeight);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsProdplanRoundWeight信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "emsProdplanRoundWeight", value = "详细实体emsProdplanRoundWeight", required = true, dataType = "EmsProdplanRoundWeight")
+    })
+    //@RequiresPermissions("emsprodplanroundweight:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody EmsProdplanRoundWeight model){
+        model.setId(id);
+        EmsProdplanRoundWeight emsProdplanRoundWeight = emsProdplanRoundWeightService.modify(model);
+        return success(emsProdplanRoundWeight);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("emsprodplanroundweight:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  emsProdplanRoundWeightService.delete(ids);
+    	}
+      return success();
+    }
+    @GetMapping("/aaa")
+    public void aaa() throws ParseException {
+        emsProdplanRoundWeightService.getWeightForLg();
+    }
+}

+ 9 - 0
src/main/java/com/steerinfo/ems/emsprodplanroundweight/mapper/EmsProdplanRoundWeightMapper.java

@@ -0,0 +1,9 @@
+package com.steerinfo.ems.emsprodplanroundweight.mapper;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.ems.emsprodplanroundweight.model.EmsProdplanRoundWeight;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface EmsProdplanRoundWeightMapper extends IBaseMapper<EmsProdplanRoundWeight, String> {
+}

+ 264 - 0
src/main/java/com/steerinfo/ems/emsprodplanroundweight/mapper/EmsProdplanRoundWeightMapper.xml

@@ -0,0 +1,264 @@
+<?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.ems.emsprodplanroundweight.mapper.EmsProdplanRoundWeightMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.emsprodplanroundweight.model.EmsProdplanRoundWeight">
+    <id column="FID" jdbcType="VARCHAR" property="fid" />
+    <result column="PRODATE" jdbcType="VARCHAR" property="prodate" />
+    <result column="MATERIALCODE" jdbcType="VARCHAR" property="materialcode" />
+    <result column="MATERIALNAME" jdbcType="VARCHAR" property="materialname" />
+    <result column="QTY" jdbcType="DECIMAL" property="qty" />
+    <result column="UNIT" jdbcType="VARCHAR" property="unit" />
+    <result column="LC_ID" jdbcType="VARCHAR" property="lcId" />
+  </resultMap>
+  <sql id="columns">
+    FID, PRODATE, MATERIALCODE, MATERIALNAME, QTY, UNIT, LC_ID
+  </sql>
+  <sql id="columns_alias">
+    t.FID, t.PRODATE, t.MATERIALCODE, t.MATERIALNAME, t.QTY, t.UNIT, t.LC_ID
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM EMS_PRODPLAN_ROUND_WEIGHT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM EMS_PRODPLAN_ROUND_WEIGHT t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="fid != null and fid != ''">
+        and FID = #{fid}
+      </if>
+      <if test="prodate != null and prodate != ''">
+        and PRODATE = #{prodate}
+      </if>
+      <if test="materialcode != null and materialcode != ''">
+        and MATERIALCODE = #{materialcode}
+      </if>
+      <if test="materialname != null and materialname != ''">
+        and MATERIALNAME = #{materialname}
+      </if>
+      <if test="qty != null">
+        and QTY = #{qty}
+      </if>
+      <if test="unit != null and unit != ''">
+        and UNIT = #{unit}
+      </if>
+      <if test="lcId != null and lcId != ''">
+        and LC_ID = #{lcId}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="fid != null and fid != ''">
+        and FID LIKE '%${fid}%'
+      </if>
+      <if test="prodate != null and prodate != ''">
+        and PRODATE LIKE '%${prodate}%'
+      </if>
+      <if test="materialcode != null and materialcode != ''">
+        and MATERIALCODE LIKE '%${materialcode}%'
+      </if>
+      <if test="materialname != null and materialname != ''">
+        and MATERIALNAME LIKE '%${materialname}%'
+      </if>
+      <if test="qty != null">
+        and QTY = #{qty}
+      </if>
+      <if test="unit != null and unit != ''">
+        and UNIT LIKE '%${unit}%'
+      </if>
+      <if test="lcId != null and lcId != ''">
+        and LC_ID LIKE '%${lcId}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from EMS_PRODPLAN_ROUND_WEIGHT
+    where FID = #{fid,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from EMS_PRODPLAN_ROUND_WEIGHT
+    where 1!=1 
+      <if test="prodate != null and prodate != ''">
+        or PRODATE = #{prodate}
+      </if>
+      <if test="materialcode != null and materialcode != ''">
+        or MATERIALCODE = #{materialcode}
+      </if>
+      <if test="materialname != null and materialname != ''">
+        or MATERIALNAME = #{materialname}
+      </if>
+      <if test="qty != null">
+        or QTY = #{qty}
+      </if>
+      <if test="unit != null and unit != ''">
+        or UNIT = #{unit}
+      </if>
+      <if test="lcId != null and lcId != ''">
+        or LC_ID = #{lcId}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.emsprodplanroundweight.model.EmsProdplanRoundWeight">
+    insert into EMS_PRODPLAN_ROUND_WEIGHT (FID, PRODATE, MATERIALCODE, 
+      MATERIALNAME, QTY, UNIT, 
+      LC_ID)
+    values (#{fid,jdbcType=VARCHAR}, #{prodate,jdbcType=VARCHAR}, #{materialcode,jdbcType=VARCHAR}, 
+      #{materialname,jdbcType=VARCHAR}, #{qty,jdbcType=DECIMAL}, #{unit,jdbcType=VARCHAR}, 
+      #{lcId,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.emsprodplanroundweight.model.EmsProdplanRoundWeight">
+    insert into EMS_PRODPLAN_ROUND_WEIGHT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="fid != null">
+        FID,
+      </if>
+      <if test="prodate != null">
+        PRODATE,
+      </if>
+      <if test="materialcode != null">
+        MATERIALCODE,
+      </if>
+      <if test="materialname != null">
+        MATERIALNAME,
+      </if>
+      <if test="qty != null">
+        QTY,
+      </if>
+      <if test="unit != null">
+        UNIT,
+      </if>
+      <if test="lcId != null">
+        LC_ID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="fid != null">
+        #{fid,jdbcType=VARCHAR},
+      </if>
+      <if test="prodate != null">
+        #{prodate,jdbcType=VARCHAR},
+      </if>
+      <if test="materialcode != null">
+        #{materialcode,jdbcType=VARCHAR},
+      </if>
+      <if test="materialname != null">
+        #{materialname,jdbcType=VARCHAR},
+      </if>
+      <if test="qty != null">
+        #{qty,jdbcType=DECIMAL},
+      </if>
+      <if test="unit != null">
+        #{unit,jdbcType=VARCHAR},
+      </if>
+      <if test="lcId != null">
+        #{lcId,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emsprodplanroundweight.model.EmsProdplanRoundWeight">
+    update EMS_PRODPLAN_ROUND_WEIGHT
+    set PRODATE = #{prodate,jdbcType=VARCHAR},
+      MATERIALCODE = #{materialcode,jdbcType=VARCHAR},
+      MATERIALNAME = #{materialname,jdbcType=VARCHAR},
+      QTY = #{qty,jdbcType=DECIMAL},
+      UNIT = #{unit,jdbcType=VARCHAR},
+      LC_ID = #{lcId,jdbcType=VARCHAR}
+    where FID = #{fid,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emsprodplanroundweight.model.EmsProdplanRoundWeight">
+    update EMS_PRODPLAN_ROUND_WEIGHT
+    <set>
+      <if test="prodate != null">
+        PRODATE = #{prodate,jdbcType=VARCHAR},
+      </if>
+      <if test="materialcode != null">
+        MATERIALCODE = #{materialcode,jdbcType=VARCHAR},
+      </if>
+      <if test="materialname != null">
+        MATERIALNAME = #{materialname,jdbcType=VARCHAR},
+      </if>
+      <if test="qty != null">
+        QTY = #{qty,jdbcType=DECIMAL},
+      </if>
+      <if test="unit != null">
+        UNIT = #{unit,jdbcType=VARCHAR},
+      </if>
+      <if test="lcId != null">
+        LC_ID = #{lcId,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where FID = #{fid,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where FID = #{fid,jdbcType=VARCHAR}
+  </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 EMS_PRODPLAN_ROUND_WEIGHT 
+      (FID, 
+      PRODATE, MATERIALCODE, MATERIALNAME, 
+      QTY, UNIT, LC_ID
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.fid,jdbcType=VARCHAR}, 
+      #{item.prodate,jdbcType=VARCHAR}, #{item.materialcode,jdbcType=VARCHAR}, #{item.materialname,jdbcType=VARCHAR}, 
+      #{item.qty,jdbcType=DECIMAL}, #{item.unit,jdbcType=VARCHAR}, #{item.lcId,jdbcType=VARCHAR}
+       from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update EMS_PRODPLAN_ROUND_WEIGHT
+     set
+       FID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case FID" close="end">
+          when #{item.fid,jdbcType=VARCHAR} then #{item.fid,jdbcType=VARCHAR}
+       </foreach>
+       ,PRODATE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case FID" close="end">
+          when #{item.fid,jdbcType=VARCHAR} then #{item.prodate,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIALCODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case FID" close="end">
+          when #{item.fid,jdbcType=VARCHAR} then #{item.materialcode,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIALNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case FID" close="end">
+          when #{item.fid,jdbcType=VARCHAR} then #{item.materialname,jdbcType=VARCHAR}
+       </foreach>
+       ,QTY=
+       <foreach collection="list" item="item" index="index" separator=" " open="case FID" close="end">
+          when #{item.fid,jdbcType=VARCHAR} then #{item.qty,jdbcType=DECIMAL}
+       </foreach>
+       ,UNIT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case FID" close="end">
+          when #{item.fid,jdbcType=VARCHAR} then #{item.unit,jdbcType=VARCHAR}
+       </foreach>
+       ,LC_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case FID" close="end">
+          when #{item.fid,jdbcType=VARCHAR} then #{item.lcId,jdbcType=VARCHAR}
+       </foreach>
+     where FID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.fid,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from EMS_PRODPLAN_ROUND_WEIGHT
+    where FID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 138 - 0
src/main/java/com/steerinfo/ems/emsprodplanroundweight/model/EmsProdplanRoundWeight.java

@@ -0,0 +1,138 @@
+package com.steerinfo.ems.emsprodplanroundweight.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+@ApiModel(value="null")
+public class EmsProdplanRoundWeight implements IBasePO<String> {
+    /**
+     * ID(FID,VARCHAR,100)
+     */
+    @ApiModelProperty(value="ID",required=true)
+    private String fid;
+
+    /**
+     * 时间(PRODATE,VARCHAR,100)
+     */
+    @ApiModelProperty(value="时间",required=false)
+    private String prodate;
+
+    /**
+     * 物料编码(MATERIALCODE,VARCHAR,100)
+     */
+    @ApiModelProperty(value="物料编码",required=false)
+    private String materialcode;
+
+    /**
+     * 物料名称(MATERIALNAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="物料名称",required=false)
+    private String materialname;
+
+    /**
+     * 完工量(QTY,DECIMAL,0)
+     */
+    @ApiModelProperty(value="完工量",required=false)
+    private BigDecimal qty;
+
+    /**
+     * 单位(UNIT,VARCHAR,2)
+     */
+    @ApiModelProperty(value="单位",required=false)
+    private String unit;
+
+    /**
+     * 轮次id(LC_ID,VARCHAR,100)
+     */
+    @ApiModelProperty(value="轮次id",required=false)
+    private String lcId;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.fid;
+    }
+
+    @Override
+    public void setId(String fid) {
+        this.fid = fid == null ? null : fid.trim();
+    }
+
+    public String getFid() {
+        return fid;
+    }
+
+    public void setFid(String fid) {
+        this.fid = fid == null ? null : fid.trim();
+    }
+
+    public String getProdate() {
+        return prodate;
+    }
+
+    public void setProdate(String prodate) {
+        this.prodate = prodate == null ? null : prodate.trim();
+    }
+
+    public String getMaterialcode() {
+        return materialcode;
+    }
+
+    public void setMaterialcode(String materialcode) {
+        this.materialcode = materialcode == null ? null : materialcode.trim();
+    }
+
+    public String getMaterialname() {
+        return materialname;
+    }
+
+    public void setMaterialname(String materialname) {
+        this.materialname = materialname == null ? null : materialname.trim();
+    }
+
+    public BigDecimal getQty() {
+        return qty;
+    }
+
+    public void setQty(BigDecimal qty) {
+        this.qty = qty;
+    }
+
+    public String getUnit() {
+        return unit;
+    }
+
+    public void setUnit(String unit) {
+        this.unit = unit == null ? null : unit.trim();
+    }
+
+    public String getLcId() {
+        return lcId;
+    }
+
+    public void setLcId(String lcId) {
+        this.lcId = lcId == null ? null : lcId.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", fid=").append(fid);
+        sb.append(", prodate=").append(prodate);
+        sb.append(", materialcode=").append(materialcode);
+        sb.append(", materialname=").append(materialname);
+        sb.append(", qty=").append(qty);
+        sb.append(", unit=").append(unit);
+        sb.append(", lcId=").append(lcId);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 24 - 0
src/main/java/com/steerinfo/ems/emsprodplanroundweight/service/IEmsProdplanRoundWeightService.java

@@ -0,0 +1,24 @@
+package com.steerinfo.ems.emsprodplanroundweight.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.ems.emsprodplanroundweight.model.EmsProdplanRoundWeight;
+
+import java.text.ParseException;
+
+/**
+ * EmsProdplanRoundWeight服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-01 04:14
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-01
+ * 作者:generator
+ * 参考:
+ * 描述:EmsProdplanRoundWeight服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IEmsProdplanRoundWeightService extends IBaseService<EmsProdplanRoundWeight, String>{
+    public void getWeightForLg() throws ParseException;
+
+}

+ 76 - 0
src/main/java/com/steerinfo/ems/emsprodplanroundweight/service/impl/EmsProdplanRoundWeightServiceImpl.java

@@ -0,0 +1,76 @@
+package com.steerinfo.ems.emsprodplanroundweight.service.impl;
+
+import com.steerinfo.ems.Utils.DateUtils;
+import com.steerinfo.feigen.model.LgWeight;
+import com.steerinfo.feigen.service.LgWeightFeigenService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ems.emsprodplanroundweight.model.EmsProdplanRoundWeight;
+import com.steerinfo.ems.emsprodplanroundweight.mapper.EmsProdplanRoundWeightMapper;
+import com.steerinfo.ems.emsprodplanroundweight.service.IEmsProdplanRoundWeightService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * EmsProdplanRoundWeight服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-01 04:14
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-01
+ * 作者:generator
+ * 参考:
+ * 描述:EmsProdplanRoundWeight服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "emsProdplanRoundWeightService")
+public class EmsProdplanRoundWeightServiceImpl extends BaseServiceImpl<EmsProdplanRoundWeight, String> implements IEmsProdplanRoundWeightService {
+
+    @Autowired
+    private EmsProdplanRoundWeightMapper emsProdplanRoundWeightMapper;
+    @Autowired
+    private LgWeightFeigenService lgWeightFeigenService;
+
+    @Override
+    protected IBaseMapper<EmsProdplanRoundWeight, String> getMapper() {
+        return emsProdplanRoundWeightMapper;
+    }
+
+    //获取炼钢计划的重量
+    public void getWeightForLg() throws ParseException {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Date dt = sdf.parse(DateUtils.dateStr(new Date(), "yyyy-MM-dd"));
+        Calendar rightNow = Calendar.getInstance();
+        rightNow.setTime(dt);
+        rightNow.add(Calendar.DAY_OF_MONTH, -7);
+        Date dt1 = rightNow.getTime();
+        String reStr = sdf.format(dt1);
+        List<LgWeight> lgWeights = lgWeightFeigenService.QueryWeightforRound(reStr, DateUtils.dateStr(new Date(), "yyyy-MM-dd"));
+        lgWeights.forEach(item -> {
+            EmsProdplanRoundWeight model = new EmsProdplanRoundWeight();
+            model.setFid(item.getFid());
+            model.setLcId(item.getRoundid());
+            model.setQty(item.getWeight());
+            model.setMaterialcode(item.getMaterialcode());
+            model.setMaterialname(item.getMaterialname());
+            model.setProdate(model.getProdate());
+            model.setUnit(model.getUnit());
+            EmsProdplanRoundWeight emsProdplanRoundWeight = emsProdplanRoundWeightMapper.selectByPrimaryKey(model.getFid());
+            if(emsProdplanRoundWeight !=  null){
+                emsProdplanRoundWeightMapper.updateByPrimaryKeySelective(emsProdplanRoundWeight);
+            }
+            else {
+                emsProdplanRoundWeightMapper.insert(model);
+            }
+        });
+
+    }
+}

+ 1 - 3
src/main/java/com/steerinfo/ems/trmactitem/controller/TRmActItemController.java

@@ -77,7 +77,6 @@ public class TRmActItemController extends BaseRESTfulController {
             @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
             @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
     })
-
     //@RequiresPermissions("trmactitem:view")
     @GetMapping(value = "/")
     public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
@@ -198,7 +197,7 @@ public class TRmActItemController extends BaseRESTfulController {
         tRmActItem.setUserid(JwtUtil.getUseridByToken());
         tRmActItem.setState(maps.get("state")==null?"":maps.get("state").toString());
         tRmActItem.setIsup(maps.get("isup")==null?"0":maps.get("isup").toString());
-        tRmActItem.setShowno(maps.get("showno")==null || maps.get("showno").toString().trim().isEmpty() ?null:Integer.valueOf(maps.get("showno").toString()));
+        tRmActItem.setShowno(tRmActItemService.MaxSeq(itemtypeName));
         tRmActItem.setAssociateid(maps.get("associateid")==null?"":maps.get("associateid").toString());
         tRmActItem.setClock(DateUtils.dateStr(new Date(), "yyyy-MM-dd HH:mm:ss"));
         tRmActItem.setFid(maps.get("fid")==null?"":maps.get("fid").toString());
@@ -770,5 +769,4 @@ public class TRmActItemController extends BaseRESTfulController {
     		return success();
     	}
     }
-
 }

+ 6 - 0
src/main/java/com/steerinfo/ems/trmactitem/mapper/TRmActItemMapper.java

@@ -90,4 +90,10 @@ public interface TRmActItemMapper extends IBaseMapper<TRmActItem, String> {
 	 */
 	List<Map<String, Object>> listpv(HashMap<String, Object> parmas);
 
+	/**
+	 * 根据项目类型 进行排序
+	 */
+
+	Integer MaxSeq(@Param("type") String type);
+
 }

+ 5 - 3
src/main/java/com/steerinfo/ems/trmactitem/mapper/TRmActItemMapper.xml

@@ -539,7 +539,7 @@
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     <include refid="select"/>
     <include refid="whereLike"/>
-	order by showno
+	order by showno,energyid
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
     insert into T_RM_ACT_ITEM 
@@ -732,7 +732,6 @@
       			(select id from FORMULA where sourcecode like '%[${measureid}]%' and code = t.itemid)
       		</if>
         </where>
-        order by t.clock desc,t.seqno
     </select>
 
     <!--查询计划项目维护结果区-->
@@ -899,7 +898,6 @@
                 (select id from FORMULA where sourcecode like '%[${measureid}]%' and code = t.itemid)
             </if>
         </where>
-        order by t.clock desc,t.seqno
     </select>
     
     <select id="queryLikew" parameterType="java.util.HashMap" resultMap="BaseResultMap">
@@ -972,4 +970,8 @@
 	    </if>
         order by clock desc,p.workprocid
     </select>
+  <!--根据项目类型排序-->
+  <select id="MaxSeq" parameterType="java.lang.String" resultType="Integer">
+    select nvl(Max(SHOWNO)+1,1) from T_RM_ACT_ITEM where ITEMTYPE =#{type}
+  </select>
 </mapper>

+ 4 - 0
src/main/java/com/steerinfo/ems/trmactitem/service/ITRmActItemService.java

@@ -96,4 +96,8 @@ public interface ITRmActItemService extends IBaseService<TRmActItem, String>{
 	 */
 	List<Map<String, Object>> listpv(HashMap<String, Object> parmas);
 
+	/**
+	 * 获取类型最大的序号
+	 */
+	Integer MaxSeq(@Param("type") String type);
 }

+ 7 - 1
src/main/java/com/steerinfo/ems/trmactitem/service/impl/TRmActItemServiceImpl.java

@@ -108,8 +108,14 @@ public class TRmActItemServiceImpl extends BaseServiceImpl<TRmActItem, String> i
 		return list;
 	}
 
-	@Override
+    @Override
+    public Integer MaxSeq(String type) {
+        return tRmActItemMapper.MaxSeq(type);
+    }
+
+    @Override
 	public List<Map<String, Object>> getProItems() {
 		return tRmActItemMapper.getProItems();
 	}
+
 }

+ 1 - 0
src/main/java/com/steerinfo/ems/trmbalancevalue/controller/TRmBalanceValueController.java

@@ -265,6 +265,7 @@ public class TRmBalanceValueController extends BaseRESTfulController {
     	List<Map<String, Object>> item = tRmBalanceValueService.getItem(parmas);
     	return success(item);
     }
+
     @GetMapping("/aaaa")
     public RESTfulResult aaa() {
         tRmBalanceValueService.state();

+ 15 - 0
src/main/java/com/steerinfo/ems/trmmaterial/controller/TRmMaterialController.java

@@ -3,6 +3,7 @@ package com.steerinfo.ems.trmmaterial.controller;
 import com.steerinfo.auth.utils.JwtUtil;
 import com.steerinfo.ems.trmmaterial.model.TRmMaterial;
 import com.steerinfo.ems.trmmaterial.service.ITRmMaterialService;
+import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
 import com.steerinfo.ems.trmworkprocmaterial.service.ITRmWorkprocMaterialService;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
@@ -173,4 +174,18 @@ public class TRmMaterialController extends BaseRESTfulController {
         }
         return success();
     }
+
+    @ApiOperation(value="查询", notes="盘库查询页面")
+    @GetMapping("/getDataForPk")
+    public RESTfulResult getDataForPk(@RequestParam HashMap<String,Object> parmas){
+        if(parmas.get("materialid") != null && !parmas.get("materialid").toString().isEmpty()){
+            String materialid = parmas.get("materialid").toString();
+            if(!materialid.startsWith("'")){
+                materialid = "'" + materialid.replaceAll(",", "','").replaceAll(",", "','") + "'";
+            }
+            parmas.put("materialid", materialid);
+        }
+        List<TRmWorkproc> dataForPk = tRmMaterialService.getDataForPk(parmas);
+        return success(dataForPk);
+    }
 }

+ 3 - 0
src/main/java/com/steerinfo/ems/trmmaterial/mapper/TRmMaterialMapper.java

@@ -1,10 +1,12 @@
 package com.steerinfo.ems.trmmaterial.mapper;
 
 import com.steerinfo.ems.trmmaterial.model.TRmMaterial;
+import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Set;
 
@@ -29,4 +31,5 @@ public interface TRmMaterialMapper extends IBaseMapper<TRmMaterial, String> {
      */
     String getMaxNo();
 
+    List<TRmWorkproc> getDataForPk(HashMap<String, Object> params);
 }

+ 8 - 0
src/main/java/com/steerinfo/ems/trmmaterial/mapper/TRmMaterialMapper.xml

@@ -335,4 +335,12 @@
          select max(to_number(SEQNO)) from T_RM_MATERIAL
     </select>
 
+  <select id="getDataForPk" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    SELECT ID,NAME FROM T_RM_MATERIAL
+    <where>
+      <if test="materialid != null and  materialid != ''">
+        and ID in  (${materialid})
+      </if>
+    </where>
+  </select>
 </mapper>

+ 4 - 0
src/main/java/com/steerinfo/ems/trmmaterial/service/ITRmMaterialService.java

@@ -1,10 +1,12 @@
 package com.steerinfo.ems.trmmaterial.service;
 
 import com.steerinfo.ems.trmmaterial.mapper.TRmMaterialMapper;
+import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.ems.trmmaterial.model.TRmMaterial;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Set;
 
@@ -40,4 +42,6 @@ public interface ITRmMaterialService extends IBaseService<TRmMaterial, String>{
      * 获取最大序列
      */
     String getMaxNo();
+
+    List<TRmWorkproc> getDataForPk(HashMap<String, Object> params);
 }

+ 7 - 0
src/main/java/com/steerinfo/ems/trmmaterial/service/impl/TRmMaterialServiceImpl.java

@@ -1,5 +1,6 @@
 package com.steerinfo.ems.trmmaterial.service.impl;
 
+import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import com.steerinfo.ems.trmmaterial.model.TRmMaterial;
@@ -8,6 +9,7 @@ import com.steerinfo.ems.trmmaterial.service.ITRmMaterialService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Set;
 
@@ -55,5 +57,10 @@ public class TRmMaterialServiceImpl extends BaseServiceImpl<TRmMaterial, String>
         return tRmMaterialMapper.getMaxNo();
     }
 
+    @Override
+    public List<TRmWorkproc> getDataForPk(HashMap<String, Object> params) {
+        return tRmMaterialMapper.getDataForPk(params);
+    }
+
 
 }

+ 14 - 0
src/main/java/com/steerinfo/ems/trmproduct/controller/TRmProductController.java

@@ -174,4 +174,18 @@ public class TRmProductController extends BaseRESTfulController {
         return success(idAndName);
     }
 
+    @ApiOperation(value="查询", notes="盘库查询页面")
+    @GetMapping("/getDataForPk")
+    public RESTfulResult getDataForPk(@RequestParam HashMap<String,Object> parmas){
+        if(parmas.get("productid") != null && !parmas.get("productid").toString().isEmpty()){
+            String productid = parmas.get("productid").toString();
+            if(!productid.startsWith("'")){
+                productid = "'" + productid.replaceAll(",", "','").replaceAll(",", "','") + "'";
+            }
+            parmas.put("productid", productid);
+        }
+        List<TRmProduct> idAndName = tRmProductService.getDataForPk(parmas);
+        return success(idAndName);
+    }
+
 }

+ 4 - 0
src/main/java/com/steerinfo/ems/trmproduct/mapper/TRmProductMapper.java

@@ -5,6 +5,7 @@ import com.steerinfo.framework.mapper.IBaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -43,5 +44,8 @@ public interface TRmProductMapper extends IBaseMapper<TRmProduct, String> {
      */
     Set<String> getBcode(@Param("productid") String productid);
 
+    //获取指定的产品
+    List<TRmProduct> getDataForPk(HashMap<String, Object> params);
+
 
 }

+ 8 - 1
src/main/java/com/steerinfo/ems/trmproduct/mapper/TRmProductMapper.xml

@@ -381,5 +381,12 @@
     <select id="getBcode" parameterType="string" resultType="string">
         select t1.bcode from T_RM_PRODUCT t1 where t1.id=#{productid}
     </select>
-
+  <select id="getDataForPk" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    SELECT ID,NAME FROM  T_RM_PRODUCT
+    <where>
+      <if test="productid != null and  productid != ''">
+        and ID in  (${productid})
+      </if>
+    </where>
+  </select>
 </mapper>

+ 4 - 0
src/main/java/com/steerinfo/ems/trmproduct/service/ITRmProductService.java

@@ -4,6 +4,7 @@ import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.ems.trmproduct.model.TRmProduct;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Set;
 
@@ -53,4 +54,7 @@ public interface ITRmProductService extends IBaseService<TRmProduct, String>{
      */
     Set<String> getBcode(@Param("productid") String productid);
 
+    //获取指定的产品
+    List<TRmProduct> getDataForPk(HashMap<String, Object> params);
+
 }

+ 6 - 0
src/main/java/com/steerinfo/ems/trmproduct/service/impl/TRmProductServiceImpl.java

@@ -8,6 +8,7 @@ import com.steerinfo.ems.trmproduct.service.ITRmProductService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Set;
 
@@ -64,4 +65,9 @@ public class TRmProductServiceImpl extends BaseServiceImpl<TRmProduct, String> i
     public Set<String> getBcode(String productid) {
         return tRmProductMapper.getBcode(productid);
     }
+
+    @Override
+    public List<TRmProduct> getDataForPk(HashMap<String, Object> params) {
+        return tRmProductMapper.getDataForPk(params);
+    }
 }

+ 14 - 0
src/main/java/com/steerinfo/ems/trmworkproc/controller/TRmWorkprocController.java

@@ -3,6 +3,7 @@ package com.steerinfo.ems.trmworkproc.controller;
 import com.steerinfo.auth.utils.JwtUtil;
 import com.steerinfo.ems.Utils.TreeUtils;
 import com.steerinfo.ems.trmactitem.service.ITRmActItemService;
+import com.steerinfo.ems.trmproduct.model.TRmProduct;
 import com.steerinfo.ems.trmworkproc.mapper.TRmWorkprocMapper;
 import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
 import com.steerinfo.ems.trmworkproc.service.ITRmWorkprocService;
@@ -235,4 +236,17 @@ public class TRmWorkprocController extends BaseRESTfulController {
         }
         return success();
     }
+    @ApiOperation(value="查询", notes="盘库查询页面")
+    @GetMapping("/getDataForPk")
+    public RESTfulResult getDataForPk(@RequestParam HashMap<String,Object> parmas){
+        if(parmas.get("workprocid") != null && !parmas.get("workprocid").toString().isEmpty()){
+            String workprocid = parmas.get("workprocid").toString();
+            if(!workprocid.startsWith("'")){
+                workprocid = "'" + workprocid.replaceAll(",", "','").replaceAll(",", "','") + "'";
+            }
+            parmas.put("workprocid", workprocid);
+        }
+        List<TRmWorkproc> dataForPk = tRmWorkprocService.getDataForPk(parmas);
+        return success(dataForPk);
+    }
 }

+ 3 - 0
src/main/java/com/steerinfo/ems/trmworkproc/mapper/TRmWorkprocMapper.java

@@ -1,5 +1,6 @@
 package com.steerinfo.ems.trmworkproc.mapper;
 
+import com.steerinfo.ems.trmproduct.model.TRmProduct;
 import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import org.apache.ibatis.annotations.Mapper;
@@ -34,4 +35,6 @@ public interface TRmWorkprocMapper extends IBaseMapper<TRmWorkproc, String> {
      */
 	List<TRmWorkproc> queryPlanMoth();
 
+    List<TRmWorkproc> getDataForPk(HashMap<String, Object> params);
+
 }

+ 8 - 0
src/main/java/com/steerinfo/ems/trmworkproc/mapper/TRmWorkprocMapper.xml

@@ -558,4 +558,12 @@
       (select workprocid from EMS_PRODPLAN_MONTH where 1=1)
       ORDER BY NAME
   </select>
+  <select id="getDataForPk" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    SELECT ID,NAME,NODE FROM T_RM_WORKPROC
+    <where>
+      <if test="workprocid != null and  workprocid != ''">
+        and ID in  (${workprocid})
+      </if>
+    </where>
+  </select>
 </mapper>

+ 3 - 0
src/main/java/com/steerinfo/ems/trmworkproc/service/ITRmWorkprocService.java

@@ -4,6 +4,7 @@ import com.steerinfo.ems.trmworkproc.mapper.TRmWorkprocMapper;
 import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
 import com.steerinfo.framework.service.IBaseService;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -29,4 +30,6 @@ public interface ITRmWorkprocService extends IBaseService<TRmWorkproc, String>{
     List<TRmWorkprocMapper> getIdAndName(Map<String, Object> parameters);
 
     Integer getMaxSeqNo();
+
+    List<TRmWorkproc> getDataForPk(HashMap<String, Object> params);
 }

+ 7 - 0
src/main/java/com/steerinfo/ems/trmworkproc/service/impl/TRmWorkprocServiceImpl.java

@@ -7,7 +7,9 @@ import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import sun.security.krb5.internal.PAData;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -55,4 +57,9 @@ public class TRmWorkprocServiceImpl extends BaseServiceImpl<TRmWorkproc, String>
         return tRmWorkprocMapper.getMaxSeqNo();
     }
 
+    @Override
+    public List<TRmWorkproc> getDataForPk(HashMap<String, Object> params) {
+        return tRmWorkprocMapper.getDataForPk(params);
+    }
+
 }

+ 37 - 1
src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/controller/TRmWorkprocMaterialValueController.java

@@ -4,6 +4,7 @@ import com.steerinfo.ems.formula.service.IFormulaService;
 import com.steerinfo.ems.ifmesemsswapfile.service.IIfMesEmsSwapfileService;
 import com.steerinfo.ems.trmworkprocmaterial.mapper.TRmWorkprocMaterialMapper;
 import com.steerinfo.ems.trmworkprocmaterial.model.TRmWorkprocMaterial;
+import com.steerinfo.ems.trmworkprocmaterialvalue.mapper.TRmWorkprocMaterialValueMapper;
 import com.steerinfo.ems.trmworkprocmaterialvalue.model.TRmWorkprocMaterialValue;
 import com.steerinfo.ems.trmworkprocmaterialvalue.service.ITRmWorkprocMaterialValueService;
 import com.steerinfo.framework.controller.BaseRESTfulController;
@@ -42,7 +43,9 @@ public class TRmWorkprocMaterialValueController extends BaseRESTfulController {
     
     @Autowired
     private TRmWorkprocMaterialMapper tRmWorkprocMaterialMapper;
-    
+
+    @Autowired
+    private TRmWorkprocMaterialValueMapper tRmWorkprocMaterialValueMapper;
     @Autowired
     IIfMesEmsSwapfileService ifMesEmsSwapfileService;
     
@@ -272,4 +275,37 @@ public class TRmWorkprocMaterialValueController extends BaseRESTfulController {
     	}
     	return success();
     }
+    @ApiOperation(value="盘库消耗查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("trmworkprocmaterialvalue:view")
+    @GetMapping(value = "/getpkdata")
+    public RESTfulResult list(@RequestParam HashMap parmas){
+        if(parmas.get("clock") == null || parmas.get("clock").equals("")){
+            return failed(null,"请选择月份");
+        }
+        PageList<TRmWorkprocMaterialValue> list = tRmWorkprocMaterialValueService.getpkdata(parmas);
+        return success(list);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据主键(itemid, clock, timegranid)来指定更新对象,并根据传过来的tRmWorkprocMaterialValue信息来更新详细信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tRmWorkprocMaterialValue", value = "详细实体tRmWorkprocMaterialValue", required = true, dataType = "TRmWorkprocMaterialValue")
+    })
+    @PutMapping(value = "/updatexh", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult updatexh(@RequestBody TRmWorkprocMaterialValue[] models){
+        HashMap<String, Object> m = new HashMap<String, Object>();
+        for (TRmWorkprocMaterialValue model : models) {
+            m.put("clock", model.getClock());
+            m.put("timegranid", model.getTimegranid());
+            m.put("itemid", model.getItemid());
+            model.setId(m);
+            TRmWorkprocMaterialValue tRmWorkprocMaterialValue = tRmWorkprocMaterialValueService.getById(m);
+            tRmWorkprocMaterialValue.setJtz(model.getJtz());
+            tRmWorkprocMaterialValueMapper.updateByPrimaryKeySelective(tRmWorkprocMaterialValue);
+        }
+        return  success();
+    }
 }

+ 5 - 0
src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/mapper/TRmWorkprocMaterialValueMapper.java

@@ -78,4 +78,9 @@ public interface TRmWorkprocMaterialValueMapper extends IBaseMapper<TRmWorkprocM
      * @return
      */
     List<TRmWorkprocMaterialValue> getMaterialValue(HashMap<String, Object> params);
+
+     /**
+     * 盘库消耗查询
+     */
+    List<Map<String,Object>> getpkdata(Map<String,Object> params);
 }

+ 49 - 0
src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/mapper/TRmWorkprocMaterialValueMapper.xml

@@ -18,6 +18,8 @@
     <result column="UPMAN" jdbcType="VARCHAR" property="upman" />
     <result column="UPDATETIME" jdbcType="VARCHAR" property="updatetime" />
     <result column="USERID" jdbcType="VARCHAR" property="userid" />
+    <result column="JTZ" jdbcType="DECIMAL" property="jtz"/>
+    <result column="PKL" jdbcType="DECIMAL" property="pkl"/>
   </resultMap>
   <delete id="deleteByPrimaryKey" parameterType="map">
     delete from T_RM_WORKPROC_MATERIAL_VALUE
@@ -269,6 +271,9 @@
       <if test="sumucvalue != null">
         SUMUCVALUE = #{sumucvalue,jdbcType=DECIMAL},
       </if>
+      <if test="jtz != null">
+        JTZ = #{jtz,jdbcType=DECIMAL},
+      </if>
       <if test="bz != null">
         BZ = #{bz,jdbcType=VARCHAR},
       </if>
@@ -635,4 +640,48 @@
     SELECT TO_CHAR(DATES,'yyyy-MM-dd') AS CLOCK,ES_JF AS ACTUALVALUE,(100-ES_JFSF)/100*ES_JF AS APPORTVALUE,'AT2010Y0380R' AS ITEMID FROM EMS_SCQK_SJ WHERE TO_CHAR(DATES,'yyyy-MM-dd')&gt;=#{clock,jdbcType=VARCHAR} AND TO_CHAR(DATES,'yyyy-MM-dd')&lt;=#{clocke,jdbcType=VARCHAR} AND ES_JF IS NOT NULL UNION ALL
     SELECT TO_CHAR(DATES,'yyyy-MM-dd') AS CLOCK,JMXH AS ACTUALVALUE,(100-JM_SF)/100*JMXH AS APPORTVALUE,'AT2017Y0025R' AS ITEMID FROM EMS_SCQK_JJ WHERE TO_CHAR(DATES,'yyyy-MM-dd')&gt;=#{clock,jdbcType=VARCHAR} AND TO_CHAR(DATES,'yyyy-MM-dd')&lt;=#{clocke,jdbcType=VARCHAR} AND JMXH IS NOT NULL) WHERE ACTUALVALUE IS NOT NULL AND APPORTVALUE IS NOT NULL
   </select>
+  <select id="getpkdata" parameterType="java.util.HashMap" resultType="Map">
+            SELECT *
+            FROM (SELECT T.TIMEGRANID,
+            T.SUMVALUE,
+            T.BZ,
+            T.ISLOCK,
+            T.LOCKID,
+            T.CLOCK,
+            T.ITEMID,
+            T.ACTUALVALUE,
+            T.CORRECTVALUE,
+            T.APPORTVALUE,
+            T.JTZ,
+            T.UCVALUE,
+            T.SUMUCVALUE,
+            T1.WORKPROCID,
+            T1.MATERIALID,
+            T1.SEQNO,
+            T1.USEFLAG,
+            T1.PRIORITY,
+            T1.UNITID,
+            T1.ITEMTYPE,
+            T2.NAME         AS MATERIALNAME,
+            T3.NAME         AS WORKPROCNAME
+            FROM t_rm_workproc_material_value T
+            LEFT JOIN T_RM_WORKPROC_MATERIAL T1
+            ON T.ITEMID = T1.ITEMID
+            LEFT JOIN T_RM_MATERIAL T2
+            ON T1.MATERIALID = T2.ID
+            LEFT JOIN T_RM_WORKPROC T3
+            ON T1.WORKPROCID = T3.ID
+            WHERE T.TIMEGRANID = 'DAY') T
+            <where>
+              <if test="clock != null and clock != ''">
+               AND to_char(to_date(T.CLOCK, 'yyyy-mm-dd'),'yyyy-mm') = #{clock}
+              </if>
+              <if test="workprocid != null and workprocid != ''">
+                AND T.WORKPROCID =#{workprocid}
+              </if>
+              <if test="materialid != null and materialid != ''">
+                AND T.MATERIALID =#{materialid}
+              </if>
+            </where>
+  </select>
 </mapper>

+ 11 - 0
src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/model/TRmWorkprocMaterialValue.java

@@ -132,6 +132,17 @@ public class TRmWorkprocMaterialValue implements IBasePO<HashMap<String, Object>
     @ApiModelProperty(value="创建时间",required=true)
     private String updatetime;
 
+    @ApiModelProperty(value = "均摊值",required = true)
+    private BigDecimal jtz;
+
+    public BigDecimal getJtz() {
+        return jtz;
+    }
+
+    public void setJtz(BigDecimal jtz) {
+        this.jtz = jtz;
+    }
+
     private static final long serialVersionUID = 1L;
 
     public String getClock() {

+ 6 - 0
src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/service/ITRmWorkprocMaterialValueService.java

@@ -119,4 +119,10 @@ public interface ITRmWorkprocMaterialValueService extends IBaseService<TRmWorkpr
 	 * @return
 	 */
 	void getMaterialValue(HashMap<String, Object> params);
+
+	/**
+	 * 盘库消耗查询
+	 */
+	PageList<Map<String, Object>> getpkdata(Map<String, Object> parameters);
+
 }

+ 6 - 0
src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/service/impl/TRmWorkprocMaterialValueServiceImpl.java

@@ -1082,6 +1082,12 @@ public class TRmWorkprocMaterialValueServiceImpl extends BaseServiceImpl<TRmWork
 		}
 	}
 
+	@Override
+	public PageList<Map<String, Object>> getpkdata(Map<String, Object> parameters) {
+		List<Map<String, Object>> rows = tRmWorkprocMaterialValueMapper.getpkdata(parameters);
+		PageList<Map<String, Object>> pageInfo = new PageList<Map<String, Object>>(rows);
+		return pageInfo;
+	}
 	@Override
 	public void getMaterialValue(HashMap<String, Object> params) {
 		List<TRmWorkprocMaterialValue> trmlist= tRmWorkprocMaterialValueMapper.getMaterialValue(params);

+ 39 - 0
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/controller/TRmWorkprocProductValueController.java

@@ -4,9 +4,11 @@ import com.steerinfo.auth.utils.JwtUtil;
 import com.steerinfo.ems.Utils.DateUtils;
 import com.steerinfo.ems.formula.service.IFormulaService;
 import com.steerinfo.ems.ifmesemsswapfile.service.IIfMesEmsSwapfileService;
+import com.steerinfo.ems.trmworkprocmaterialvalue.model.TRmWorkprocMaterialValue;
 import com.steerinfo.ems.trmworkprocproduct.mapper.TRmWorkprocProductMapper;
 import com.steerinfo.ems.trmworkprocproduct.model.TRmWorkprocProduct;
 import com.steerinfo.ems.trmworkprocproduct.service.ITRmWorkprocProductService;
+import com.steerinfo.ems.trmworkprocproductvalue.mapper.TRmWorkprocProductValueMapper;
 import com.steerinfo.ems.trmworkprocproductvalue.model.TRmWorkprocProductValue;
 import com.steerinfo.ems.trmworkprocproductvalue.service.ITRmWorkprocProductValueService;
 import com.steerinfo.framework.controller.BaseRESTfulController;
@@ -50,6 +52,9 @@ public class TRmWorkprocProductValueController extends BaseRESTfulController {
     
     @Autowired
     private TRmWorkprocProductMapper tRmWorkprocProductMapper;
+
+    @Autowired
+    private TRmWorkprocProductValueMapper tRmWorkprocProductValueMapper;
     
     @Autowired
     IFormulaService formulaService;
@@ -457,4 +462,38 @@ public class TRmWorkprocProductValueController extends BaseRESTfulController {
     	}
     	return success();
     }
+    @ApiOperation(value="盘库产出查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("trmworkprocmaterialvalue:view")
+    @GetMapping(value = "/getpkdata")
+    public RESTfulResult list(@RequestParam HashMap parmas){
+        if(parmas.get("clock") == null || parmas.get("clock").equals("")){
+            return failed(null,"请选择月份");
+        }
+        PageList<TRmWorkprocProductValue> list = tRmWorkprocProductValueService.getpkdata(parmas);
+        return success(list);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据主键(itemid, clock, timegranid)来指定更新对象,并根据传过来的tRmWorkprocMaterialValue信息来更新详细信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tRmWorkprocMaterialValue", value = "详细实体tRmWorkprocMaterialValue", required = true, dataType = "TRmWorkprocMaterialValue")
+    })
+    @PutMapping(value = "/updatecc", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult updatech(@RequestBody TRmWorkprocProductValue[] models){
+        HashMap<String, Object> m = new HashMap<String, Object>();
+        for (TRmWorkprocProductValue model : models) {
+            m.put("clock", model.getClock());
+            m.put("timegranid", model.getTimegranid());
+            m.put("itemid", model.getItemid());
+            m.put("itemtype", "R");
+            model.setId(m);
+            TRmWorkprocProductValue tRmWorkprocProductValue = tRmWorkprocProductValueService.getById(m);
+            tRmWorkprocProductValue.setJtz(model.getJtz());
+            tRmWorkprocProductValueMapper.updateByPrimaryKeySelective(tRmWorkprocProductValue);
+        }
+        return  success();
+    }
 }

+ 5 - 0
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/mapper/TRmWorkprocProductValueMapper.java

@@ -148,4 +148,9 @@ public interface TRmWorkprocProductValueMapper extends IBaseMapper<TRmWorkprocPr
 	 * @return
 	 */
 	List<TRmWorkprocProductValue> getProductValue(HashMap<String, Object> params);
+	/**
+	 * 盘库消耗查询
+	 */
+	List<Map<String,Object>> getpkdata(Map<String,Object> params);
+
 }

+ 48 - 0
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/mapper/TRmWorkprocProductValueMapper.xml

@@ -21,6 +21,7 @@
     <result column="QRMAN" jdbcType="VARCHAR" property="qrman" />
     <result column="QRTIME" jdbcType="VARCHAR" property="qrtime" />
     <result column="RTPVALUE" jdbcType="DECIMAL" property="rtpvalue" />
+    <result column="JTZ" jdbcType="DECIMAL" property="jtz"/>
   </resultMap>
   <delete id="deleteByPrimaryKey" parameterType="map">
     delete from T_RM_WORKPROC_PRODUCT_VALUE
@@ -261,6 +262,9 @@
       <if test="actualvalue != null">
         ACTUALVALUE = #{actualvalue,jdbcType=DECIMAL},
       </if>
+      <if test="jtz != null ">
+        JTZ = #{jtz,jdbcType=DECIMAL},
+      </if>
       <if test="correctvalue != null">
         CORRECTVALUE = #{correctvalue,jdbcType=DECIMAL},
       </if>
@@ -824,4 +828,48 @@ FROM
     SELECT TO_CHAR(DATES,'yyyy-MM-dd') AS CLOCK,YXPGP AS ACTUALVALUE,YXPGP AS APPORTVALUE,'AT3018CP003R' AS ITEMID FROM EMS_SCQK_LG WHERE TO_CHAR(DATES,'yyyy-MM-dd')&gt;=#{clock,jdbcType=VARCHAR} AND TO_CHAR(DATES,'yyyy-MM-dd')&lt;=#{clocke,jdbcType=VARCHAR} AND PGGS IS NOT NULL
     )  WHERE ACTUALVALUE IS NOT NULL AND APPORTVALUE IS NOT NULL
   </select>
+
+  <!--盘库查询-->
+  <select id="getpkdata" parameterType="java.util.HashMap" resultType="Map">
+      SELECT *
+      FROM (SELECT
+      T.TIMEGRANID,
+      T.SUMVALUE,
+      T.BZ,
+      T.ISLOCK,
+      T.LOCKID,
+      T.CLOCK,
+      T.ITEMID,
+      T.ACTUALVALUE,
+      T.CORRECTVALUE,
+      T.APPORTVALUE,
+      T.JTZ,
+      T1.WORKPROCID,
+      T1.PRODUCTID,
+      T1.SEQNO,
+      T1.USEFLAG,
+      T1.UNITID,
+      T1.ITEMTYPE,
+      T2.NAME     AS PRODUCTNAME,
+      T3.NAME     AS WORKPROCNAME
+      FROM T_RM_WORKPROC_PRODUCT_VALUE T
+      LEFT JOIN T_RM_WORKPROC_PRODUCT T1
+      ON T.ITEMID = T1.ITEMID
+      LEFT JOIN T_RM_PRODUCT T2
+      ON T1.PRODUCTID = T2.ID
+      LEFT JOIN T_RM_WORKPROC T3
+      ON T1.WORKPROCID = T3.ID
+      WHERE T.TIMEGRANID = 'DAY') T
+    <where>
+      <if test="clock != null and clock != ''">
+        and substr(t.CLOCK, 0, 7) = #{clock}
+      </if>
+      <if test="workprocid != null and workprocid != ''">
+        AND T.WORKPROCID =#{workprocid}
+      </if>
+      <if test="productid != null and productid != ''">
+        AND T.PRODUCTID =#{productid}
+      </if>
+    </where>
+  </select>
 </mapper>

+ 14 - 0
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/model/TRmWorkprocProductValue.java

@@ -2,6 +2,8 @@ package com.steerinfo.ems.trmworkprocproductvalue.model;
 
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModelProperty;
+import org.springframework.beans.factory.annotation.Autowired;
+
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.HashMap;
@@ -113,7 +115,19 @@ public class TRmWorkprocProductValue implements IBasePO<HashMap<String, Object>>
      */
     @ApiModelProperty(value = "上报产量", required = true)
     private BigDecimal rtpvalue;
+    /**
+     * 盘库值
+     */
+    @ApiModelProperty(value = "均摊值", required = true)
+    private BigDecimal jtz;
 
+    public BigDecimal getJtz() {
+        return jtz;
+    }
+
+    public void setJtz(BigDecimal jtz) {
+        this.jtz = jtz;
+    }
     private static final long serialVersionUID = 1L;
 
     public String getItemid() {

+ 5 - 0
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/service/ITRmWorkprocProductValueService.java

@@ -163,4 +163,9 @@ public interface ITRmWorkprocProductValueService extends IBaseService<TRmWorkpro
      * @return
      */
     void getReportProductValue(HashMap<String, Object> params);
+
+    /**
+     * 盘库消耗查询
+     */
+    PageList<Map<String, Object>> getpkdata(Map<String, Object> parameters);
 }

+ 7 - 0
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/service/impl/TRmWorkprocProductValueServiceImpl.java

@@ -1197,4 +1197,11 @@ public class TRmWorkprocProductValueServiceImpl extends BaseServiceImpl<TRmWorkp
 			};
 		}
 	}
+
+	@Override
+	public PageList<Map<String, Object>> getpkdata(Map<String, Object> parameters) {
+		List<Map<String, Object>> rows = tRmWorkprocProductValueMapper.getpkdata(parameters);
+		PageList<Map<String, Object>> pageInfo = new PageList<Map<String, Object>>(rows);
+		return pageInfo;
+	}
 }

+ 9 - 0
src/main/java/com/steerinfo/feigen/model/LgWeight.java

@@ -20,6 +20,15 @@ public class LgWeight {
     private String unit;
     private String materialname;
     private String fid;
+    private String roundid;
+
+    public String getRoundid() {
+        return roundid;
+    }
+
+    public void setRoundid(String roundid) {
+        this.roundid = roundid;
+    }
 
     public String getFid() {
         return fid;

+ 2 - 0
src/main/java/com/steerinfo/feigen/service/LgWeightFeigenService.java

@@ -22,4 +22,6 @@ public interface LgWeightFeigenService {
     @GetMapping("v1/lgweight/queryWeightByTime2")
     public List<LgWeight> QueryWeightByTime2(@RequestParam("startTime")String startTime,@RequestParam("endTime")String endTime);
 
+    @GetMapping("v1/lgweight/QueryWeightforRound")
+    public List<LgWeight> QueryWeightforRound(@RequestParam("startTime")String startTime,@RequestParam("endTime")String endTime);
 }

+ 14 - 0
src/main/java/com/steerinfo/task/SpringCronTask.java

@@ -5,6 +5,9 @@ import com.steerinfo.ems.bfhyd.service.IBfhydService;
 import com.steerinfo.ems.dzmaterialsf.service.IDzMaterialSfService;
 import com.steerinfo.ems.emsetiming.service.IEmsETimingService;
 import com.steerinfo.ems.emsgmpcjh.service.IEmsGmPcJhService;
+import com.steerinfo.ems.emsprodplanroundweight.model.EmsProdplanRoundWeight;
+import com.steerinfo.ems.emsprodplanroundweight.service.IEmsProdplanRoundWeightService;
+import com.steerinfo.ems.emsprodplanroundweight.service.impl.EmsProdplanRoundWeightServiceImpl;
 import com.steerinfo.ems.emsscqklg.service.IEmsScqkLgService;
 import com.steerinfo.ems.emsscqklg.service.ILgRealService;
 import com.steerinfo.ems.emswaterrealtime.service.IEmsWaterRealtimeService;
@@ -124,6 +127,8 @@ public class SpringCronTask implements SchedulingConfigurer{
 	ILgRealService lgRealService;
 	@Autowired
 	IFoldTheValuesService foldTheValuesService;
+	@Autowired
+	IEmsProdplanRoundWeightService emsProdplanRoundWeightService;
 	/**
 	 * SchedulingConfigurer接口的方法实现,加载后自动运行
 	 */
@@ -336,6 +341,15 @@ public class SpringCronTask implements SchedulingConfigurer{
 						 e.printStackTrace();
 					 }
 					 logger.info("定时任务"+taskId+"执行时长:" + (System.currentTimeMillis() - start)/1000 + "秒");
+				 }
+				 else  if(taskId.equalsIgnoreCase("127")){
+					 long start = System.currentTimeMillis();
+					 try {
+						 emsProdplanRoundWeightService.getWeightForLg();
+					 } catch (Exception e) {
+						 e.printStackTrace();
+					 }
+					 logger.info("定时任务"+taskId+"执行时长:" + (System.currentTimeMillis() - start)/1000 + "秒");
 				 }//				 else if (taskId.equalsIgnoreCase("106")) {
 //					// 获取MES水质监测数据
 //					long start = System.currentTimeMillis();