Browse Source

商品编辑子商品空白bug修改

huang 1 tháng trước cách đây
mục cha
commit
1a3cdde780

+ 4 - 0
docs/new_sql.sql

@@ -112,3 +112,7 @@ CREATE TABLE `apk_version` (
     `delete_flag` tinyint DEFAULT NULL COMMENT '是否删除',
     PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
+
+ALTER TABLE jsh_depot_head
+ADD COLUMN depot_id bigint DEFAULT NULL COMMENT '仓库id',
+ADD COLUMN oper_id bigint DEFAULT NULL COMMENT '操作人';

+ 1 - 1
src/main/java/com/jsh/erp/controller/MaterialExtendController.java

@@ -109,7 +109,7 @@ public class MaterialExtendController {
                     item.put("commodityDecimal", md.getCommodityDecimal());
                     item.put("wholesaleDecimal", md.getWholesaleDecimal());
                     item.put("lowDecimal", md.getLowDecimal());
-                    item.put("productionDate", DateUtils.dateTime(md.getProductionDate()));
+                    item.put("productionDate", md.getProductionDate() == null ? "": DateUtils.dateTime(md.getProductionDate()));
                     item.put("expiryNum",md.getExpiryNum());
                     item.put("supplierId",md.getSupplierId());
                     item.put("barCode",md.getBarCode());

+ 2 - 1
src/main/java/com/jsh/erp/datasource/entities/DepotItemVo4WithInfoEx.java

@@ -61,7 +61,6 @@ public class DepotItemVo4WithInfoEx extends DepotItem{
     private String brand;
 
     @ApiModelProperty("生产日期")
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
     private String productionDate;
 
     @ApiModelProperty("保质期天数")
@@ -300,4 +299,6 @@ public class DepotItemVo4WithInfoEx extends DepotItem{
     public void setBrand(String brand) {
         this.brand = brand;
     }
+
+
 }

+ 19 - 1
src/main/resources/mapper_xml/DepotHeadMapper.xml

@@ -277,7 +277,13 @@
         receiver_phone,
       </if>
       <if test="receiverAddress != null">
-        receiver_address
+        receiver_address,
+      </if>
+      <if test="depotId != null">
+        depot_id,
+      </if>
+      <if test="operId != null">
+        oper_id
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -398,6 +404,12 @@
       <if test="receiverAddress != null">
         #{receiverAddress,jdbcType=VARCHAR},
       </if>
+      <if test="depotId != null">
+        #{depotId,jdbcType=INTEGER},
+      </if>
+      <if test="operId != null">
+        #{operId,jdbcType=INTEGER}
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultType="java.lang.Long">
@@ -693,6 +705,12 @@
       <if test="receiverAddress != null">
         receiver_address = #{receiverAddress,jdbcType=VARCHAR},
       </if>
+      <if test="depotId != null">
+        depot_id = #{receiverAddress,jdbcType=VARCHAR},
+      </if>
+      <if test="operId != null">
+        oper_id = #{receiverAddress,jdbcType=VARCHAR}
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>

+ 2 - 2
src/main/resources/mapper_xml/MaterialMapperEx.xml

@@ -792,7 +792,7 @@
     </select>
 
     <select id="getMaterialByBatchNumber" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultType="com.jsh.erp.datasource.entities.MaterialVo4Unit">
-        select m.*,u.name unit_name, me.id meId, me.commodity_unit, me.purchase_decimal, me.commodity_decimal,
+        select m.*,u.name unit_name, me.id meId, me.commodity_unit, me.purchase_decimal, me.commodity_decimal,me.inventory,
         me.wholesale_decimal, me.low_decimal, me.sku,me.production_date, me.expiry_num, me.supplier_id, me.bar_code, me.batch_number, me.depot_id, me.position,d.`name` depotName,s.supplier supplierName
         from jsh_material m
         left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
@@ -851,7 +851,7 @@
 
     <select id="inventoryInquiry" parameterType="com.jsh.erp.datasource.pda.dto.PDAInventoryDTO" resultType="com.jsh.erp.datasource.pda.vo.PDADepotItemVO">
         select m.id materialId,m.name materialName,m.standard materialStandard,u.name unit_name,mc.name categoryName,me.bar_code,me.id meId,me.commodity_unit,me.sku,
-        me.production_date,me.expiry_num,me.supplier_id,me.batch_number,me.depot_id,me.position,d.`name` depotName,s.supplier supplierName
+        me.production_date,me.expiry_num,me.supplier_id,me.batch_number,me.depot_id,me.position,d.`name` depotName,s.supplier supplierName,m.img_name
         from jsh_material m
         left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
         left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1'