11 コミット aa5d2f4c5a ... 9ffaa58711

作者 SHA1 メッセージ 日付
  liushuang 9ffaa58711 Merge branch 'master_liushuang' of pengyue/jsh_erp into master 4 週間 前
  huang 2fe7d8d8c5 Merge branch 'master' of http://121.40.253.172:3000/pengyue/jsh_erp into master_huangjunjie 4 週間 前
  huang 0616ea42f9 pda库存修改 4 週間 前
  廖泽勇 59e2f94fc7 Merge branch 'master' of http://121.40.253.172:3000/pengyue/jsh_erp into master_liaozeyong 4 週間 前
  廖泽勇 8db63574a6 bug调整 4 週間 前
  13660505945 1fdc2db4a7 Merge remote-tracking branch 'origin/dev_ml' 4 週間 前
  maliang ae31062341 fix:商品信息模版、列设置 4 週間 前
  huang 96007c7c5e 订单实际入库数量为空处理 1 ヶ月 前
  huang e9c0f10022 Merge branch 'master' of http://121.40.253.172:3000/pengyue/jsh_erp into master_huangjunjie 1 ヶ月 前
  huang ec513b3968 pda订单数量0bug修改,付款金额由实际入库数量计算 1 ヶ月 前
  huang 37d68d748b Merge branch 'xq' of http://121.40.253.172:3000/pengyue/jsh_erp into master_huangjunjie 1 ヶ月 前

BIN
jshERP-web/public/doc/goods_template.xls


+ 3 - 3
jshERP-web/src/views/material/MaterialList.vue

@@ -367,8 +367,8 @@ export default {
           },
         },
         { title: '基础重量', dataIndex: 'weight', width: 80 },
-        { title: '保质期', dataIndex: 'expiryNum', width: 60 },
-        { title: '制造商', dataIndex: 'mfrs', width: 120, ellipsis: true },
+        // { title: '保质期', dataIndex: 'expiryNum', width: 60 },
+        // { title: '制造商', dataIndex: 'mfrs', width: 120, ellipsis: true },
         {
           title: '初始库存',
           dataIndex: 'initialStock',
@@ -380,7 +380,7 @@ export default {
         { title: '零售价', dataIndex: 'commodityDecimal', width: 80 },
         { title: '销售价', dataIndex: 'wholesaleDecimal', width: 80 },
         { title: '最低售价', dataIndex: 'lowDecimal', width: 80 },
-        { title: '仓位货架', dataIndex: 'position', width: 80 },
+        // { title: '仓位货架', dataIndex: 'position', width: 80 },
         { title: '备注', dataIndex: 'remark', width: 80 },
         {
           title: '状态',

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

@@ -281,6 +281,7 @@ public class DepotItemController {
                     item.put("supplierName",diEx.getSupplierName());
                     item.put("unitId",diEx.getUnitId());
                     item.put("unitList",diEx.getUnitId() == null ? null : unitService.getUnitListByID(diEx.getUnitId()));
+                    item.put("unitName", diEx.getUnitName());
                     item.put("actualQuantityInStorage",diEx.getActualQuantityInStorage());
                     item.put("warehousingVariance",diEx.getWarehousingVariance());
                     item.put("reasonOfDifference",diEx.getReasonOfDifference());

+ 50 - 0
src/main/java/com/jsh/erp/controller/apkVersion/apkVersionController.java

@@ -0,0 +1,50 @@
+package com.jsh.erp.controller.apkVersion;
+
+
+import com.jsh.erp.base.AjaxResult;
+import com.jsh.erp.base.BaseController;
+import com.jsh.erp.base.TableDataInfo;
+import com.jsh.erp.datasource.dto.TaskStocktakingDTO;
+import com.jsh.erp.datasource.dto.TaskStocktakingQueryDTO;
+import com.jsh.erp.datasource.entities.ApkVersion;
+import com.jsh.erp.datasource.vo.TaskStocktakingVO;
+import com.jsh.erp.service.ApkVersionService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+@RestController
+@RequestMapping(value = "/apkVersion")
+@Api(tags = {"apk版本管理接口"})
+public class apkVersionController extends BaseController {
+
+    @Resource
+    private ApkVersionService apkVersionService;
+
+    @ApiOperation("apk版本列表")
+    @PostMapping("/list")
+    public TableDataInfo list(){
+        startPage();
+        List<ApkVersion> list = apkVersionService.list();
+        return getDataTable(list);
+    }
+
+    @ApiOperation("新增apk版本")
+    @PostMapping("/add")
+    public AjaxResult add(@RequestBody ApkVersion apkVersion) {
+        apkVersion.setCreateTime(new Date());
+        boolean b = apkVersionService.save(apkVersion);
+        if (!b){
+            return AjaxResult.error("创建失败,请联系系统管理员");
+        }
+        return AjaxResult.success();
+    }
+
+}

+ 20 - 4
src/main/java/com/jsh/erp/controller/pda/PdaController.java

@@ -27,6 +27,9 @@ import com.jsh.erp.service.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -34,6 +37,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.math.BigDecimal;
+import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Date;
@@ -103,8 +107,15 @@ public class PdaController extends BaseController {
     @GetMapping("/orderInfo/{id}")
     public AjaxResult orderInfo(@PathVariable("id") Long id){
         DepotHead depotHead = depotHeadService.getOne(new LambdaQueryWrapperX<DepotHead>().eq(DepotHead::getId, id));
-        depotHead.setSupplierName(supplierService.getOne(new LambdaQueryWrapperX<Supplier>().eq(Supplier::getId, depotHead.getOrganId())).getSupplier());
-//        depotHeadService.pdaDetail(id);
+        if (depotHead.getOrganId() != null) {
+            depotHead.setSupplierName(supplierService.getOne(new LambdaQueryWrapperX<Supplier>().eq(Supplier::getId, depotHead.getOrganId())).getSupplier());
+        }
+        if (depotHead.getCreator() != null) {
+            depotHead.setCreateName(userService.getOne(new LambdaQueryWrapperX<User>().eq(User::getId, depotHead.getCreator())).getUsername());
+        }
+        if (depotHead.getOperId() != null) {
+            depotHead.setOperName(userService.getOne(new LambdaQueryWrapperX<User>().eq(User::getId, depotHead.getOperId())).getUsername());
+        }
         return AjaxResult.success(depotHead);
     }
 
@@ -293,14 +304,16 @@ public class PdaController extends BaseController {
 
     @ApiOperation("下载安装包")
     @PostMapping("/downloadApk")
-    public void downloadApk(@RequestBody ApkVersion apkVersion, HttpServletRequest request, HttpServletResponse response) throws Exception {
+    public ResponseEntity downloadApk(@RequestBody ApkVersion apkVersion, HttpServletRequest request, HttpServletResponse response) throws Exception {
         // 将文件路径转换为 Path 对象
         Path path = Paths.get(apkVersion.getUrl()).toAbsolutePath().normalize();
         File file = path.toFile();
         String fileUrl = apkVersion.getUrl();
+        long size = Files.size(path);
+        response.setHeader("Content-Length",size+"");
         // 检查文件是否存在
         if (!file.exists() || !file.isFile()) {
-            return;
+            return null;
         }
         InputStream inputStream = null;
         OutputStream outputStream = null;
@@ -326,6 +339,9 @@ public class PdaController extends BaseController {
                 logger.error(e.getMessage(), e);
             }
         }
+        HttpHeaders headers = new HttpHeaders();
+        headers.setContentLength(size); // 手动设置Content-Length为13字节
+        return new ResponseEntity<>(null, headers, HttpStatus.OK);
     }
 
     @ApiOperation("查询版本信息")

+ 11 - 0
src/main/java/com/jsh/erp/datasource/entities/DepotHead.java

@@ -127,6 +127,14 @@ public class DepotHead {
     @ApiModelProperty("供应商名称")
     private String supplierName;
 
+    @TableField(exist = false)
+    @ApiModelProperty("供应商名称")
+    private String operName;
+
+    @TableField(exist = false)
+    @ApiModelProperty("供应商名称")
+    private String createName;
+
     @ApiModelProperty("集采订单编号")
     private String linkTesco;
 
@@ -139,6 +147,9 @@ public class DepotHead {
     @ApiModelProperty("收货人地址")
     private String receiverAddress;
 
+    @ApiModelProperty("仓库id")
+    private Long depotId;
+
     @ApiModelProperty("操作人")
     private Long operId;
 

+ 3 - 0
src/main/java/com/jsh/erp/datasource/entities/DepotItem.java

@@ -105,6 +105,9 @@ public class DepotItem {
     @ApiModelProperty("出入库时间")
     private String warehousingTime;
 
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
     public Long getId() {
         return id;
     }

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

@@ -1,9 +1,7 @@
 package com.jsh.erp.datasource.entities;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
 

+ 3 - 0
src/main/java/com/jsh/erp/datasource/pda/dto/PDATaskStocktakingItemDTO.java

@@ -25,4 +25,7 @@ public class PDATaskStocktakingItemDTO {
 
     @ApiModelProperty("任务编号")
     private String number;
+
+    @ApiModelProperty("库位")
+    private String position;
 }

+ 1 - 0
src/main/java/com/jsh/erp/datasource/pda/vo/PDADepotItemVO.java

@@ -66,6 +66,7 @@ public class PDADepotItemVO{
     private String imgName;
 
     @ApiModelProperty("出入库时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date warehousingTime;
 
 

+ 5 - 0
src/main/java/com/jsh/erp/datasource/vo/MaterialExcelVo.java

@@ -0,0 +1,5 @@
+package com.jsh.erp.datasource.vo;
+
+
+public class MaterialExcelVo {
+}

+ 0 - 1
src/main/java/com/jsh/erp/service/SyncTescoSystemService.java

@@ -36,7 +36,6 @@ import java.util.Map;
 import java.util.stream.Collectors;
 
 /**
- * @Description TODO
  * @Author MS.BLUE
  * @Date 2025-04-12
  */

+ 38 - 0
src/main/java/com/jsh/erp/service/impl/DepotHeadServiceImpl.java

@@ -1198,6 +1198,8 @@ public class DepotHeadServiceImpl extends ServiceImpl<DepotHeadMapper, DepotHead
             Long headId = list.get(0).getId();
             /**入库和出库处理单据子表信息*/
             depotItemService.saveDetials(rows,headId, "add",request);
+            if (!list.get(0).getSubType().equals("其它") || !list.get(0).getSubType().equals("零售"))
+            updateTotalPriceById(list.get(0));
         }
         logService.insertLog("单据",
                 new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ADD).append(depotHead.getNumber()).toString(),
@@ -1315,6 +1317,7 @@ public class DepotHeadServiceImpl extends ServiceImpl<DepotHeadMapper, DepotHead
         }
         /**入库和出库处理单据子表信息*/
         depotItemService.saveDetials(rows,depotHead.getId(), "update",request);
+        updateTotalPriceById(depotHead);
         logService.insertLog("单据",
                 new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(depotHead.getNumber()).toString(),
                 ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
@@ -2021,14 +2024,49 @@ public class DepotHeadServiceImpl extends ServiceImpl<DepotHeadMapper, DepotHead
                 }
             }
             depotItem.setWarehousingUser(user.getId());
+            if(BusinessConstants.DEPOTHEAD_TYPE_IN.equals(depotHead.getType())){
+                //表单入库,修改商品库存
+                materialExtend.setInventory(materialExtend.getInventory().add(depotItem.getBasicNumber()));
+                materialExtendService.updateInventory("单据",depotItem.getId(),materialExtend);
+            }else if(BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType())){
+                //表单入库,修改商品库存
+                materialExtend.setInventory(materialExtend.getInventory().subtract(depotItem.getBasicNumber()));
+                materialExtendService.updateInventory("单据",depotItem.getId(),materialExtend);
+            }
+            //基本单位数量*单价
+            depotItem.setAllPrice(depotItem.getBasicNumber().multiply(depotItem.getUnitPrice()));
+            //单价总额 + 税额
+            depotItem.setTaxLastMoney(depotItem.getAllPrice().add(depotItem.getTaxMoney()));
             //添加单据子表
             depotItemService.insertDepotItemWithObj(depotItem);
+            //更新当前库存
+            depotItemService.updateCurrentStock(depotItem);
+            //更新当前成本价
+            depotItemService.updateCurrentUnitPrice(depotItem);
             //修改商品生产日期
             materialExtendService.update(new UpdateWrapper<MaterialExtend>().set("production_date",materialMap.get(batchNumber).getProductionDate()).eq("id", materialExtend.getId()));
+            updateTotalPriceById(depotHead);
         }
         //修改采购订单状态完成
         this.update(new UpdateWrapper<DepotHead>().set("status", "2").eq("id", pdaDepotHeadDTO.getId()));
         return true;
     }
 
+    /**
+     * 修改订单总额
+     */
+    private void updateTotalPriceById(DepotHead depotHead) throws Exception {
+        BigDecimal sum = BigDecimal.ZERO;
+        //获取单据子表
+        List<DepotItem> list = depotItemService.getListByHeaderId(depotHead.getId());
+        for (DepotItem depotItem : list) {
+            sum = sum.add(depotItem.getTaxLastMoney());
+        }
+        BigDecimal totalPrice = sum;
+        if (depotHead.getTotalPrice().compareTo(BigDecimal.ZERO) < 0){
+            totalPrice = totalPrice.negate();
+        }
+        update(new UpdateWrapper<DepotHead>().set("total_price",totalPrice).set("change_amount",totalPrice).set("discount_last_money",sum).eq("id",list.get(0).getId()));
+    }
+
 }

+ 39 - 4
src/main/java/com/jsh/erp/service/impl/DepotItemServiceImpl.java

@@ -2,6 +2,7 @@ package com.jsh.erp.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jsh.erp.constants.BusinessConstants;
 import com.jsh.erp.constants.ExceptionConstants;
@@ -75,6 +76,9 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
     @Resource
     private MaterialExtendMapper materialExtendMapper;
 
+    @Resource
+    private SyncTescoSystemService syncTescoSystemService;
+
     /**
      * pda根据订单信息查询商品列表
      * @return
@@ -260,6 +264,7 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
     @Transactional(value = "transactionManager", rollbackFor = Exception.class)
     public int insertDepotItemWithObj(DepotItem depotItem)throws Exception {
         User user = userService.getCurrentUser();
+        depotItem.setCreateTime(new Date());
         depotItem.setTenantId(user.getId());
         int result =0;
         try{
@@ -597,7 +602,8 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
                     depotItem.setOperNumber(rowObj.getBigDecimal("operNumber"));
                     //获取子表单商品单位
                     String unit = rowObj.get("unit") == null ? "" :rowObj.get("unit").toString();
-                    BigDecimal oNumber = rowObj.getBigDecimal("operNumber");
+                    //获取实际出入库数量
+                    BigDecimal oNumber = rowObj.getBigDecimal("actualQuantityInStorage");
                     if (StringUtil.isNotEmpty(unitInfo.getName())) {
                         String basicUnit = unitInfo.getBasicUnit(); //基本单位
                         if (unit.equals(basicUnit)) { //如果等于基本单位
@@ -680,11 +686,18 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
                         depotItem.setPurchaseUnitPrice(getDepotItemByBatchNumber(depotItem.getMaterialExtendId(),depotItem.getBatchNumber()).getUnitPrice());
                     }
                 }
+                //含税单价
                 if (StringUtil.isExist(rowObj.get("taxUnitPrice"))) {
                     depotItem.setTaxUnitPrice(rowObj.getBigDecimal("taxUnitPrice"));
                 }
+                //总金额,不含税
                 if (StringUtil.isExist(rowObj.get("allPrice"))) {
-                    depotItem.setAllPrice(rowObj.getBigDecimal("allPrice"));
+                    if (depotItem.getActualQuantityInStorage() == null || depotItem.getActualQuantityInStorage().equals(BigDecimal.ZERO)){
+                        depotItem.setAllPrice(rowObj.getBigDecimal("allPrice"));
+                    }else {
+                        //基本单位数量*单价
+                        depotItem.setAllPrice(depotItem.getBasicNumber().multiply(depotItem.getUnitPrice()));
+                    }
                 }
                 if (StringUtil.isExist(rowObj.get("depotId"))) {
                     depotItem.setDepotId(rowObj.getLong("depotId"));
@@ -709,14 +722,24 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
                                 String.format(ExceptionConstants.DEPOT_HEAD_ANOTHER_DEPOT_FAILED_MSG));
                     }
                 }
+                //税率
                 if (StringUtil.isExist(rowObj.get("taxRate"))) {
                     depotItem.setTaxRate(rowObj.getBigDecimal("taxRate"));
                 }
+                //税额
                 if (StringUtil.isExist(rowObj.get("taxMoney"))) {
-                    depotItem.setTaxMoney(rowObj.getBigDecimal("taxMoney"));
+                    if (depotItem.getActualQuantityInStorage() == null || depotItem.getActualQuantityInStorage().equals(BigDecimal.ZERO)){
+                        depotItem.setTaxMoney(rowObj.getBigDecimal("taxMoney"));
+                    }else {
+                        //单价总金额*税率
+                        depotItem.setTaxMoney(depotItem.getAllPrice().multiply(depotItem.getTaxRate()));
+                    }
                 }
+                //价税合计
                 if (StringUtil.isExist(rowObj.get("taxLastMoney"))) {
-                    depotItem.setTaxLastMoney(rowObj.getBigDecimal("taxLastMoney"));
+                    //单价总额 + 税额
+                    depotItem.setTaxLastMoney(depotItem.getAllPrice().add(depotItem.getTaxMoney()));
+                    //depotItem.setTaxLastMoney(rowObj.getBigDecimal("taxLastMoney"));
                 }
                 if (StringUtil.isExist(rowObj.get("mType"))) {
                     depotItem.setMaterialType(rowObj.getString("mType"));
@@ -1328,6 +1351,7 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
                 //当前库存信息不存在,新增当前库存信息
                 materialCurrentStockMapper.insertSelective(materialCurrentStock);
 //            }
+            syncTescoSystemService.sycnTescoStock(mId);
         }
     }
 
@@ -1647,4 +1671,15 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
         return materialOther;
     }
 
+    //删除前回复库存
+    private void ReplyInventoryByHeadId(Long id) throws Exception {
+        DepotHead depotHead = depotHeadService.getDepotHead(id);
+        List<DepotItem> list = getListByHeaderId(id);
+        for (DepotItem depotItem : list) {
+            if (depotHead.getType().equals("入库")){
+
+            }
+        }
+    }
+
 }

+ 3 - 1
src/main/java/com/jsh/erp/service/impl/MaterialExtendServiceImpl.java

@@ -50,6 +50,8 @@ public class MaterialExtendServiceImpl extends ServiceImpl<MaterialExtendMapper,
     private DepotItemService depotItemService;
     @Resource
     private InventoryLogService inventoryLogService;
+    @Resource
+    private SyncTescoSystemService syncTescoSystemService;
 
     @Override
     public MaterialExtend getMaterialExtend(long id)throws Exception {
@@ -509,7 +511,7 @@ public class MaterialExtendServiceImpl extends ServiceImpl<MaterialExtendMapper,
             log.setItemId(id);
             log.setType(type);
             inventoryLogService.save(log);
-            update(new UpdateWrapper<MaterialExtend>().set("inventory",materialExtend.getInventory()).set("position",materialExtend.getPosition()).eq("id",materialExtend.getId()));;
+            update(new UpdateWrapper<MaterialExtend>().set("inventory",materialExtend.getInventory()).set("position",materialExtend.getPosition()).eq("id",materialExtend.getId()));
         }
     }
     /**

+ 2 - 19
src/main/java/com/jsh/erp/service/impl/MaterialServiceImpl.java

@@ -1941,16 +1941,6 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
                 } else {
                     m.setEnableSerialNumber("0");
                 }
-                //批号去掉
-//                if(StringUtil.isNotEmpty(enableBatchNumber) && "1".equals(enableBatchNumber)) {
-//                    m.setEnableBatchNumber("1");
-//                } else {
-//                    m.setEnableBatchNumber("0");
-//                }
-//                if("1".equals(enableSerialNumber) && "1".equals(enableBatchNumber)) {
-//                    throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_ENABLE_MUST_ONE_CODE,
-//                            String.format(ExceptionConstants.MATERIAL_ENABLE_MUST_ONE_MSG, barCode));
-//                }
                 //设置库存
                 m.setStockMap(getStockMapCache(src, depotCount, depotMap, i));
                 mList.add(m);
@@ -1974,15 +1964,6 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
                     materialExtendService.insertMaterialExtend(materialExtend);
                 }
             }
-            //批量更新库存,先删除后新增
-//            if(insertInitialStockMaterialList.size()>0) {
-//                batchDeleteInitialStockByMaterialList(deleteInitialStockMaterialIdList);
-//                materialInitialStockMapperEx.batchInsert(insertInitialStockMaterialList);
-//            }
-//            if(insertCurrentStockMaterialList.size()>0) {
-//                batchDeleteCurrentStockByMaterialList(deleteCurrentStockMaterialIdList);
-//                materialCurrentStockMapperEx.batchInsert(insertCurrentStockMaterialList);
-//            }
             //添加日志
             logService.insertLog("商品",
                     new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_IMPORT).append(mList.size()).append(BusinessConstants.LOG_DATA_UNIT).toString(),
@@ -2082,6 +2063,8 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
                 material.setMnemonic(m.getMnemonic());
                 //颜色
                 material.setColor(m.getColor());
+                //商品类别
+                material.setCategoryId(m.getCategoryId());
                 //单位-单个
                 material.setUnit(m.getUnit());
                 //计量单位Id

+ 6 - 3
src/main/resources/mapper_xml/DepotHeadMapper.xml

@@ -514,10 +514,10 @@
       <if test="record.voucherPicture != null">
         voucher_picture = #{record.voucherPicture,jdbcType=VARCHAR},
       </if>
-      <if test="record.goodsQuantity != null">
+      <if test="record.goodsQuantity != null and record.goodsQuantity != 0">
         goods_quantity = #{record.goodsQuantity,jdbcType=INTEGER},
       </if>
-      <if test="record.goodsTypeCount != null">
+      <if test="record.goodsTypeCount != null and record.goodsTypeCount != 0">
         goods_type_count = #{record.goodsTypeCount,jdbcType=INTEGER},
       </if>
       <if test="record.linkTesco != null">
@@ -699,8 +699,11 @@
       <if test="receiverAddress != null">
         receiver_address = #{receiverAddress,jdbcType=VARCHAR},
       </if>
+      <if test="depotId != null">
+        depot_id = #{depotId,jdbcType=BIGINT},
+      </if>
       <if test="operId != null">
-        oper_id = #{operId,jdbcType=VARCHAR}
+        oper_id = #{operId,jdbcType=BIGINT}
       </if>
     </set>
     where id = #{id,jdbcType=BIGINT}

+ 8 - 1
src/main/resources/mapper_xml/DepotItemMapper.xml

@@ -243,6 +243,9 @@
       <if test="warehousingTime != null and warehousingTime != ''">
         warehousing_time,
       </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -335,6 +338,9 @@
       <if test="warehousingTime != null and warehousingTime != ''">
         #{warehousingTime,jdbcType=DATE},
       </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=DATE},
+      </if>
     </trim>
   </insert>
     <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultType="java.lang.Long">
@@ -621,7 +627,7 @@
       d.name AS depot_name,
       m.standard AS material_standard,
       di.actual_quantity_in_storage AS actual_quantity_in_storage,
-      di.warehousing_time AS warehousing_time,
+      dh.create_time AS warehousing_time,
       me.commodity_unit AS commodity_unit,
       m.img_name AS img_name
     FROM
@@ -632,6 +638,7 @@
       LEFT JOIN jsh_depot d ON di.depot_id = d.id
     WHERE
       di.delete_flag = '0'
+      AND dh.delete_flag = '0'
       AND dh.status in ('2','3')
       AND dh.type = #{type}
       AND di.material_id = #{materialId}

+ 2 - 1
src/main/resources/mapper_xml/DepotItemMapperEx.xml

@@ -322,13 +322,14 @@
         select di.*,m.name MName,m.model MModel,m.color MColor,m.unit_id,m.standard MStandard,m.weight, m.img_name,
         m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,m.enable_serial_number, m.enable_batch_number,
         m.brand, dp1.name DepotName,dp2.name AnotherDepotName, me.purchase_decimal,
-        me.production_date, me.expiry_num, me.supplier_id, me.bar_code, me.batch_number, me.position,s.supplier supplierName
+        me.production_date, me.expiry_num, me.supplier_id, me.bar_code, me.batch_number, me.position,s.supplier supplierName,u.name unit_name
         from jsh_depot_item di
         left join jsh_material m on di.material_id=m.id  and ifnull(m.delete_flag,'0') !='1'
         left join jsh_material_extend me on me.id=di.material_extend_id  and ifnull(me.delete_Flag,'0') !='1'
         left join jsh_depot dp1 on di.depot_id=dp1.id and ifnull(dp1.delete_Flag,'0') !='1'
         left join jsh_depot dp2 on di.another_depot_id=dp2.id and ifnull(dp2.delete_Flag,'0') !='1'
         left JOIN jsh_supplier s on me.supplier_id = s.id and ifnull(s.delete_Flag,'0') !='1'
+        left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1'
         where di.header_id = #{headerId}
         and ifnull(di.delete_flag,'0') !='1'
         order by di.id asc

+ 1 - 1
src/main/resources/mapper_xml/DepotMapper.xml

@@ -339,7 +339,7 @@
   <select id="depotSpinnerList" resultType="com.jsh.erp.datasource.vo.SpinnerVO">
     SELECT
       id AS value,
-      bane AS label
+      name AS label
     FROM
       jsh_depot
     WHERE