fanxw 1 month ago
parent
commit
ded003d854

+ 25 - 0
src/main/java/com/chinaitop/depot/business/controller/BusinessDeliveryStorageNoticeController.java

@@ -26,6 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
26
 import javax.annotation.Resource;
26
 import javax.annotation.Resource;
27
 import javax.servlet.http.HttpServletRequest;
27
 import javax.servlet.http.HttpServletRequest;
28
 import java.io.IOException;
28
 import java.io.IOException;
29
+import java.math.BigDecimal;
29
 import java.util.ArrayList;
30
 import java.util.ArrayList;
30
 import java.util.HashMap;
31
 import java.util.HashMap;
31
 import java.util.List;
32
 import java.util.List;
@@ -822,4 +823,28 @@ public class BusinessDeliveryStorageNoticeController {
822
         }
823
         }
823
         return modelMap;
824
         return modelMap;
824
     }
825
     }
826
+
827
+    @RequestMapping(value="/updateYjssl",produces = MediaType.APPLICATION_JSON_VALUE,  method=RequestMethod.GET)
828
+	@ApiOperation(value="修改通知单已结算数量", notes = "根据id查找")
829
+	@ApiImplicitParams({
830
+		@ApiImplicitParam(name = "tzdid", value = "通知单ID", dataType="int", paramType = "form"),
831
+		@ApiImplicitParam(name = "bcjssl", value = "本次结算数量(吨)", dataType="String", paramType = "form")
832
+	})
833
+    public void updateYjssl(Integer tzdid, String bcjssl) {
834
+        if (tzdid != null) {
835
+        	// 获取当前通知单主数据
836
+        	BusinessDeliveryStorageNotice deliveryStorageNotice = deliveryStorageNoticeService.findById(tzdid);
837
+        	if (null != deliveryStorageNotice) {
838
+        		if (StringUtils.isNotBlank(deliveryStorageNotice.getYjssl())) {
839
+        			BigDecimal y_yjssl = new BigDecimal(deliveryStorageNotice.getYjssl());
840
+        			BigDecimal new_yjssl = y_yjssl.add(new BigDecimal(bcjssl));
841
+        			deliveryStorageNotice.setYjssl(new_yjssl.toString());
842
+        		} else {
843
+        			deliveryStorageNotice.setYjssl(bcjssl);
844
+        		}
845
+        		deliveryStorageNoticeService.update(deliveryStorageNotice, null);
846
+        	}
847
+            
848
+        }
849
+    }
825
 }
850
 }

+ 21 - 6
src/main/java/com/chinaitop/depot/business/mapper/BusinessDeliveryStorageNoticeMapper.xml

@@ -57,6 +57,7 @@
57
     <result column="change_content" property="changeContent" jdbcType="VARCHAR" />
57
     <result column="change_content" property="changeContent" jdbcType="VARCHAR" />
58
     <result column="lqss" property="lqss" jdbcType="VARCHAR" />
58
     <result column="lqss" property="lqss" jdbcType="VARCHAR" />
59
     <result column="is_merge" property="isMerge" jdbcType="VARCHAR" />
59
     <result column="is_merge" property="isMerge" jdbcType="VARCHAR" />
60
+    <result column="yjssl" property="yjssl" jdbcType="VARCHAR" />
60
     
61
     
61
   </resultMap>
62
   </resultMap>
62
   <sql id="Example_Where_Clause" >
63
   <sql id="Example_Where_Clause" >
@@ -126,7 +127,7 @@
126
     warehouse_id, warehouse_name, creater, create_time, create_unit, create_depot, update_time, 
127
     warehouse_id, warehouse_name, creater, create_time, create_unit, create_depot, update_time, 
127
     org_id, in_application, creater_id, root_contract_bid, identification, carNumber, 
128
     org_id, in_application, creater_id, root_contract_bid, identification, carNumber, 
128
     changing, change_record_flag, root_notice_bid, original_notice, original_notice_bid, 
129
     changing, change_record_flag, root_notice_bid, original_notice, original_notice_bid, 
129
-    change_reason, change_time, change_content, lqss, is_merge
130
+    change_reason, change_time, change_content, lqss, is_merge, yjssl
130
   </sql>
131
   </sql>
131
   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample" >
132
   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample" >
132
     select
133
     select
@@ -176,7 +177,7 @@
176
       root_contract_bid, identification, carNumber, 
177
       root_contract_bid, identification, carNumber, 
177
        changing, change_record_flag, 
178
        changing, change_record_flag, 
178
       root_notice_bid, original_notice, original_notice_bid, 
179
       root_notice_bid, original_notice, original_notice_bid, 
179
-      change_reason, change_time, change_content, lqss
180
+      change_reason, change_time, change_content, lqss, yjssl
180
       )
181
       )
181
     values (#{id,jdbcType=INTEGER}, #{billType,jdbcType=VARCHAR}, #{billTypeId,jdbcType=INTEGER}, 
182
     values (#{id,jdbcType=INTEGER}, #{billType,jdbcType=VARCHAR}, #{billTypeId,jdbcType=INTEGER}, 
182
       #{billNumber,jdbcType=VARCHAR}, #{shipingCount,jdbcType=VARCHAR}, #{finishedCount,jdbcType=VARCHAR}, 
183
       #{billNumber,jdbcType=VARCHAR}, #{shipingCount,jdbcType=VARCHAR}, #{finishedCount,jdbcType=VARCHAR}, 
@@ -195,7 +196,8 @@
195
       #{rootContractBid,jdbcType=INTEGER}, #{identification,jdbcType=VARCHAR}, #{carnumber,jdbcType=VARCHAR}, 
196
       #{rootContractBid,jdbcType=INTEGER}, #{identification,jdbcType=VARCHAR}, #{carnumber,jdbcType=VARCHAR}, 
196
        #{changing,jdbcType=VARCHAR}, #{changeRecordFlag,jdbcType=VARCHAR}, 
197
        #{changing,jdbcType=VARCHAR}, #{changeRecordFlag,jdbcType=VARCHAR}, 
197
       #{rootNoticeBid,jdbcType=INTEGER}, #{originalNotice,jdbcType=VARCHAR}, #{originalNoticeBid,jdbcType=INTEGER}, 
198
       #{rootNoticeBid,jdbcType=INTEGER}, #{originalNotice,jdbcType=VARCHAR}, #{originalNoticeBid,jdbcType=INTEGER}, 
198
-      #{changeReason,jdbcType=VARCHAR}, #{changeTime,jdbcType=TIMESTAMP}, #{changeContent,jdbcType=VARCHAR}, #{lqss,jdbcType=VARCHAR}
199
+      #{changeReason,jdbcType=VARCHAR}, #{changeTime,jdbcType=TIMESTAMP}, #{changeContent,jdbcType=VARCHAR}, #{lqss,jdbcType=VARCHAR},
200
+      #{yjssl,jdbcType=VARCHAR}
199
       )
201
       )
200
   </insert>
202
   </insert>
201
   <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNotice" >
203
   <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNotice" >
@@ -366,6 +368,9 @@
366
       <if test="isMerge != null">
368
       <if test="isMerge != null">
367
         is_merge,
369
         is_merge,
368
       </if>
370
       </if>
371
+      <if test="yjssl != null">
372
+        yjssl,
373
+      </if>
369
     </trim>
374
     </trim>
370
     <trim prefix="values (" suffix=")" suffixOverrides="," >
375
     <trim prefix="values (" suffix=")" suffixOverrides="," >
371
       <if test="id != null" >
376
       <if test="id != null" >
@@ -533,6 +538,9 @@
533
       <if test="isMerge != null">
538
       <if test="isMerge != null">
534
         #{isMerge,jdbcType=VARCHAR},
539
         #{isMerge,jdbcType=VARCHAR},
535
       </if>
540
       </if>
541
+      <if test="yjssl != null">
542
+        #{yjssl,jdbcType=VARCHAR},
543
+      </if>
536
     </trim>
544
     </trim>
537
   </insert>
545
   </insert>
538
   <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample" resultType="java.lang.Integer" >
546
   <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample" resultType="java.lang.Integer" >
@@ -709,6 +717,9 @@
709
       <if test="record.isMerge != null">
717
       <if test="record.isMerge != null">
710
         is_merge = #{record.isMerge,jdbcType=VARCHAR},
718
         is_merge = #{record.isMerge,jdbcType=VARCHAR},
711
       </if>
719
       </if>
720
+      <if test="record.yjssl != null">
721
+        yjssl = #{record.yjssl,jdbcType=VARCHAR},
722
+      </if>
712
     </set>
723
     </set>
713
     <if test="_parameter != null" >
724
     <if test="_parameter != null" >
714
       <include refid="Update_By_Example_Where_Clause" />
725
       <include refid="Update_By_Example_Where_Clause" />
@@ -770,7 +781,8 @@
770
       change_time = #{record.changeTime,jdbcType=TIMESTAMP},
781
       change_time = #{record.changeTime,jdbcType=TIMESTAMP},
771
       change_content = #{record.changeContent,jdbcType=VARCHAR},
782
       change_content = #{record.changeContent,jdbcType=VARCHAR},
772
       lqss = #{record.lqss,jdbcType=VARCHAR},
783
       lqss = #{record.lqss,jdbcType=VARCHAR},
773
-      is_merge = #{record.isMerge,jdbcType=VARCHAR}
784
+      is_merge = #{record.isMerge,jdbcType=VARCHAR},
785
+      yjssl = #{record.yjssl,jdbcType=VARCHAR}
774
      
786
      
775
     <if test="_parameter != null" >
787
     <if test="_parameter != null" >
776
       <include refid="Update_By_Example_Where_Clause" />
788
       <include refid="Update_By_Example_Where_Clause" />
@@ -941,6 +953,9 @@
941
       <if test="isMerge != null">
953
       <if test="isMerge != null">
942
         is_merge = #{isMerge,jdbcType=VARCHAR},
954
         is_merge = #{isMerge,jdbcType=VARCHAR},
943
       </if>
955
       </if>
956
+      <if test="yjssl != null">
957
+        yjssl = #{yjssl,jdbcType=VARCHAR},
958
+      </if>
944
     </set>
959
     </set>
945
     where id = #{id,jdbcType=INTEGER}
960
     where id = #{id,jdbcType=INTEGER}
946
   </update>
961
   </update>
@@ -999,8 +1014,8 @@
999
       change_time = #{changeTime,jdbcType=TIMESTAMP},
1014
       change_time = #{changeTime,jdbcType=TIMESTAMP},
1000
       change_content = #{changeContent,jdbcType=VARCHAR},
1015
       change_content = #{changeContent,jdbcType=VARCHAR},
1001
       lqss = #{lqss,jdbcType=VARCHAR},
1016
       lqss = #{lqss,jdbcType=VARCHAR},
1002
-      is_merge = #{isMerge,jdbcType=VARCHAR}
1003
-      
1017
+      is_merge = #{isMerge,jdbcType=VARCHAR},
1018
+      yjssl = #{yjssl,jdbcType=VARCHAR}
1004
     where id = #{id,jdbcType=INTEGER}
1019
     where id = #{id,jdbcType=INTEGER}
1005
   </update>
1020
   </update>
1006
   
1021
   

+ 19 - 0
src/main/java/com/chinaitop/depot/business/model/BusinessDeliveryStorageNotice.java

@@ -20,6 +20,9 @@ public class BusinessDeliveryStorageNotice {
20
     
20
     
21
     //业务字段(是否合并过)
21
     //业务字段(是否合并过)
22
     private String isMerge;
22
     private String isMerge;
23
+
24
+    //本次结算数量
25
+    private String yjssl;
23
     
26
     
24
     /**
27
     /**
25
      * 是否有过合并(0:有过,1:没有)
28
      * 是否有过合并(0:有过,1:没有)
@@ -1764,4 +1767,20 @@ public class BusinessDeliveryStorageNotice {
1764
         this.lqss = lqss == null ? null : lqss.trim();
1767
         this.lqss = lqss == null ? null : lqss.trim();
1765
     }
1768
     }
1766
 
1769
 
1770
+    /**
1771
+     * 已结算数量
1772
+     * @return
1773
+     */
1774
+	public String getYjssl() {
1775
+		return yjssl;
1776
+	}
1777
+
1778
+	/**
1779
+	 * 已结算数量
1780
+	 * @param yjssl
1781
+	 */
1782
+	public void setYjssl(String yjssl) {
1783
+		this.yjssl = yjssl == null ? null : yjssl.trim();
1784
+	}
1785
+
1767
 }
1786
 }