5 次代碼提交 10ea0c8f7e ... 1e9b9ebbc3

作者 SHA1 備註 提交日期
  maliang 1e9b9ebbc3 fix:修改 4 周之前
  yangzhi e324a12082 Merge remote-tracking branch 'origin/dev_hjj_522' 4 周之前
  huang f1d2d1ea2b pda货物录入搜索,打印接口,订单提示修改 4 周之前
  yangzhi e5838f26fc Merge remote-tracking branch 'origin/dev_hjj_522' 4 周之前
  huang e345fa7ede 订单、审核bug修改 4 周之前

+ 9 - 1
jshERP-web/src/views/system/modules/UserModal.vue

@@ -53,7 +53,7 @@
               :dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
               allow-clear
               :treeData="orgaTree"
-              v-decorator="['orgaId']"
+              v-decorator="['orgaId', validatorRules.orgaId]"
               placeholder="请选择机构"
             >
             </a-tree-select>
@@ -140,6 +140,14 @@ export default {
             },
           ],
         },
+        orgaId: {
+          rules: [
+            {
+              required: true,
+              message: '请选择机构!',
+            },
+          ],
+        },
       },
       model: {},
       labelCol: {

+ 1 - 0
jshERP-web/src/views/task/HandledList.vue

@@ -21,6 +21,7 @@
               <a-col :md="6" :sm="24">
                 <a-form-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
                   <a-select v-model="queryParam.auditStatus" allowClear placeholder="请选择状态">
+                    <a-select-option :value="0" :key="0">审批中</a-select-option>
                     <a-select-option :value="1" :key="1">审批完成</a-select-option>
                     <a-select-option :value="2" :key="2">审批未通过</a-select-option>
                   </a-select>

+ 20 - 6
jshERP-web/src/views/task/modules/FlowModal.vue

@@ -47,11 +47,11 @@
               </a-form-model-item>
             </a-col>
             <a-col :span="24 / 2">
-              <a-form-model-item :label="`审核人${index+1}`" :labelCol="labelCol" :wrapperCol="wrapperCol" :prop="`auditNodes[${index}].auditor`" :rules="item.auditorType===1?{
-                required: true,
-                message: '请选择',
+              <a-form-model-item :label="`审核人${index+1}`" :labelCol="labelCol" :wrapperCol="wrapperCol" :prop="`auditNodes[${index}].auditor`" :rules="{
+                required: item.auditorType==1,
                 trigger: 'change',
-              }:{}">
+                validator: (rule, value, callback) => validatorAuditor(rule, value, callback, index)
+              }">
                 <a-select v-model="item.auditor" @change="changeAuditor($event,index)" allowClear placeholder="请选择" :disabled="item.auditorType!=1||isReadOnly" style="width: 100%;">
                   <a-select-option v-for="(item, index) in _userList" :disabled="item.disabled" :key="index" :value="item.id">
                     {{ item.userName }}
@@ -232,7 +232,6 @@ export default {
       })
     },
      changeAuditorType(v,index){
-      // this.$refs.form.clearValidate([`auditNodes[${index}].auditor`])
       this.model.auditNodes[index].auditor = undefined
       this.$forceUpdate()
       this.$nextTick(() => {
@@ -240,8 +239,10 @@ export default {
       })
     },
     changeAuditor(val,index){
-      this.$refs.form.clearValidate([`auditNodes[${index}].auditor`])
       this.$forceUpdate()
+      this.$nextTick(() => {
+        this.$refs.form.validate()
+      })
     },
     validatorAuditorType(rule, value, callback, index){
       if(index === 0){
@@ -258,6 +259,19 @@ export default {
         callback()
       }
     },
+    validatorAuditor(rule, value, callback, index){
+      const auditorType = this.model.auditNodes[index].auditorType
+      const auditor = this.model.auditNodes[index].auditor
+      if(auditorType==1){
+        if(auditor){
+          callback()
+        }else{
+          callback(new Error(`请选择审核人${index+1}`))
+        }
+      }else{
+        callback()
+      }
+    },
     handleOk() {
       const that = this
       // 触发表单验证

+ 14 - 77
src/main/java/com/jsh/erp/controller/DepotItemController.java

@@ -360,93 +360,30 @@ public class DepotItemController {
                     //拓展信息
                     diEx.setMaterialOther(depotItemService.getOtherInfo(mpArr, diEx));
                     //库存
-                    diEx.setStock(materialService.getMaterialStockByMid(diEx.getMaterialId()));
+                    diEx.setStock(materialService.getCurrentStockByMaterialIdAndDepotId(diEx.getMaterialId(), diEx.getDepotId()));
                     //原数量
                     diEx.setPreNumber(diEx.getOperNumber());
                     //完成数量
                     Unit unitInfo = materialService.findUnit(diEx.getMaterialId()); //查询多单位信息
                     String materialUnit = diEx.getMaterialUnit();
                     diEx.setFinishNumber(depotItemService.getFinishNumber(diEx.getMaterialExtendId(), diEx.getId(), diEx.getHeaderId(), unitInfo, materialUnit, linkType));
-                    JSONObject item = new JSONObject();
-                    item.put("id", diEx.getId());
-                    item.put("materialExtendId", diEx.getMaterialExtendId() == null ? "" : diEx.getMaterialExtendId());
-//                    item.put("barCode", diEx.getBarCode());
-                    item.put("name", diEx.getMName());
-                    item.put("standard", diEx.getMStandard());
-                    item.put("model", diEx.getMModel());
-                    item.put("color", diEx.getMColor());
-                    item.put("brand", diEx.getBrand());
-//                    item.put("mfrs", diEx.getMMfrs());
-                    item.put("materialOther", depotItemService.getOtherInfo(mpArr, diEx));
-                    BigDecimal stock;
-                    if(StringUtil.isNotEmpty(diEx.getSku())){
-                        stock = depotItemService.getSkuStockByParam(diEx.getDepotId(),diEx.getMaterialExtendId(),null,null);
-                    } else {
-                        stock = depotItemService.getCurrentStockByParam(diEx.getDepotId(),diEx.getMaterialId());
-                        if (StringUtil.isNotEmpty(unitInfo.getName())) {
-                            stock = unitService.parseStockByUnit(stock, unitInfo, materialUnit);
-                        }
-                    }
-                    item.put("stock", stock);
-                    item.put("unit", diEx.getMaterialUnit());
-                    item.put("snList", diEx.getSnList());
-//                    item.put("batchNumber", diEx.getBatchNumber());
-                    item.put("expirationDate", Tools.parseDateToStr(diEx.getExpirationDate()));
-                    item.put("sku", diEx.getSku());
-                    item.put("enableSerialNumber", diEx.getEnableSerialNumber());
-//                    item.put("enableBatchNumber", diEx.getEnableBatchNumber());
-                    item.put("operNumber", diEx.getOperNumber());
-                    item.put("basicNumber", diEx.getBasicNumber());
-                    item.put("preNumber", diEx.getOperNumber()); //原数量
-                    item.put("finishNumber", depotItemService.getFinishNumber(diEx.getMaterialExtendId(), diEx.getId(), diEx.getHeaderId(), unitInfo, materialUnit, linkType)); //已入库|已出库
-                    item.put("purchaseDecimal", roleService.parseBillPriceByLimit(diEx.getPurchaseDecimal(), billCategory, priceLimit, request));  //采购价
+//                    item.put("purchaseDecimal", roleService.parseBillPriceByLimit(diEx.getPurchaseDecimal(), billCategory, priceLimit, request));  //采购价
                     if("basic".equals(linkType) || "1".equals(isReadOnly)) {
                         //正常情况显示金额,而以销定购的情况不能显示金额
-                        item.put("unitPrice", roleService.parseBillPriceByLimit(diEx.getUnitPrice(), billCategory, priceLimit, request));
-                        item.put("taxUnitPrice", roleService.parseBillPriceByLimit(diEx.getTaxUnitPrice(), billCategory, priceLimit, request));
-                        item.put("allPrice", roleService.parseBillPriceByLimit(diEx.getAllPrice(), billCategory, priceLimit, request));
-                        item.put("taxRate", roleService.parseBillPriceByLimit(diEx.getTaxRate(), billCategory, priceLimit, request));
-                        item.put("taxMoney", roleService.parseBillPriceByLimit(diEx.getTaxMoney(), billCategory, priceLimit, request));
-                        item.put("taxLastMoney", roleService.parseBillPriceByLimit(diEx.getTaxLastMoney(), billCategory, priceLimit, request));
+//                        item.put("unitPrice", roleService.parseBillPriceByLimit(diEx.getUnitPrice(), billCategory, priceLimit, request));
+                        diEx.setUnitPrice(roleService.parseBillPriceByLimit(diEx.getUnitPrice(), billCategory, priceLimit, request));
+//                        item.put("taxUnitPrice", roleService.parseBillPriceByLimit(diEx.getTaxUnitPrice(), billCategory, priceLimit, request));
+                        diEx.setTaxUnitPrice(roleService.parseBillPriceByLimit(diEx.getTaxUnitPrice(), billCategory, priceLimit, request));
+//                        item.put("allPrice", roleService.parseBillPriceByLimit(diEx.getAllPrice(), billCategory, priceLimit, request));
+                        diEx.setAllPrice(roleService.parseBillPriceByLimit(diEx.getAllPrice(), billCategory, priceLimit, request));
+//                        item.put("taxRate", roleService.parseBillPriceByLimit(diEx.getTaxRate(), billCategory, priceLimit, request));
+                        diEx.setTaxRate(roleService.parseBillPriceByLimit(diEx.getTaxRate(), billCategory, priceLimit, request));
+//                        item.put("taxMoney", roleService.parseBillPriceByLimit(diEx.getTaxMoney(), billCategory, priceLimit, request));
+                        diEx.setTaxMoney(roleService.parseBillPriceByLimit(diEx.getTaxMoney(), billCategory, priceLimit, request));
+//                        item.put("taxLastMoney", roleService.parseBillPriceByLimit(diEx.getTaxLastMoney(), billCategory, priceLimit, request));
+                        diEx.setTaxLastMoney(roleService.parseBillPriceByLimit(diEx.getTaxLastMoney(), billCategory, priceLimit, request));
                     }
                     BigDecimal allWeight = diEx.getBasicNumber()==null||diEx.getWeight()==null?BigDecimal.ZERO:diEx.getBasicNumber().multiply(diEx.getWeight());
-                    item.put("weight", allWeight);
-                    item.put("position", diEx.getPosition());
-                    item.put("remark", diEx.getRemark());
-                    item.put("imgName", diEx.getImgName());
-                    if(fileUploadType == 2) {
-                        item.put("imgSmall", "small");
-                        item.put("imgLarge", "large");
-                    } else {
-                        item.put("imgSmall", "");
-                        item.put("imgLarge", "");
-                    }
-                    item.put("linkId", diEx.getLinkId());
-                    item.put("depotId", diEx.getDepotId() == null ? "" : diEx.getDepotId());
-                    item.put("depotName", diEx.getDepotId() == null ? "" : diEx.getDepotName());
-                    item.put("anotherDepotId", diEx.getAnotherDepotId() == null ? "" : diEx.getAnotherDepotId());
-                    item.put("anotherDepotName", diEx.getAnotherDepotId() == null ? "" : diEx.getAnotherDepotName());
-                    item.put("mType", diEx.getMaterialType());
-                    item.put("op", 1);
-                    String productionDate = diEx.getProductionDate() == null ? null : DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",diEx.getProductionDate());
-                    item.put("productionDate",productionDate);
-                    item.put("expiryNum",diEx.getExpiryNum());
-                    item.put("supplierId",diEx.getSupplierId());
-                    item.put("batchNumber",diEx.getBatchNumber());
-                    item.put("inventory",materialService.getMaterialStockByMid(diEx.getMaterialId()));
-                    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());
-                    item.put("warehousingUser",diEx.getWarehousingUser());
-                    item.put("warehousingTime",diEx.getWarehousingTime());
-                    item.put("warehousingUserName",diEx.getWarehousingUserName());
-                    item.put("wholesaleDecimal",diEx.getWholesaleDecimal());
-                    item.put("defaultPurchaseDecimal",diEx.getDefaultPurchaseDecimal());
-                    item.put("defaultWholesaleDecimal",diEx.getDefaultWholesaleDecimal());
                     dataArray.add(diEx);
                     //合计数据汇总
                     totalOperNumber = totalOperNumber.add(diEx.getOperNumber()==null?BigDecimal.ZERO:diEx.getOperNumber());

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

@@ -360,7 +360,7 @@ public class PdaController extends BaseController {
     @ApiOperation("货物录入列表")
     public TableDataInfo goodsInputList(@RequestBody PDAGoodsInputDTO pdaInventoryDTO){
         startPage();
-        List<MaterialInput> list = materialInputService.list(new LambdaQueryWrapperX<MaterialInput>().eq(MaterialInput::getDepotId,pdaInventoryDTO.getDepotId()));
+        List<MaterialInput> list = materialInputService.listBy(pdaInventoryDTO);
         return getDataTable(list);
     }
 

+ 1 - 1
src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapper.java

@@ -38,7 +38,7 @@ public interface DepotItemMapper  extends BaseMapperX<DepotItem>{
      * @param id 单据子表ID
      * @return  PDA打印信息
      */
-    PDAPrintVo pdaPrintMaterial(@Param("id")Long id) ;
+    PDAPrintVo pdaPrintMaterial(@Param("id") Long id) ;
 
     long countByExample(DepotItemExample example);
 

+ 4 - 0
src/main/java/com/jsh/erp/datasource/mappers/MaterialInputMapper.java

@@ -1,8 +1,12 @@
 package com.jsh.erp.datasource.mappers;
 
 import com.jsh.erp.datasource.entities.MaterialInput;
+import com.jsh.erp.datasource.pda.dto.PDAGoodsInputDTO;
+
+import java.util.List;
 
 public interface MaterialInputMapper extends BaseMapperX<MaterialInput> {
 
+    List<MaterialInput> listBy(PDAGoodsInputDTO pdaInventoryDTO);
 
 }

+ 5 - 1
src/main/java/com/jsh/erp/exception/GlobalExceptionHandler.java

@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestControllerAdvice;
 
 import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.Map;
 
 @Slf4j
 @RestControllerAdvice
@@ -34,7 +36,9 @@ public class GlobalExceptionHandler {
         }
 
         status.put(ExceptionConstants.GLOBAL_RETURNS_CODE, ExceptionConstants.SERVICE_SYSTEM_ERROR_CODE);
-        status.put(ExceptionConstants.GLOBAL_RETURNS_DATA, ExceptionConstants.SERVICE_SYSTEM_ERROR_MSG);
+        Map<String, Object> objectMap = new HashMap<>();
+        objectMap.put("message", ExceptionConstants.SERVICE_SYSTEM_ERROR_MSG);
+        status.put(ExceptionConstants.GLOBAL_RETURNS_DATA, objectMap);
         log.error("Global Exception Occured => url : {}, msg : {}", request.getRequestURL(), e.getMessage());
         /**
          * 这里输出完整的堆栈信息,否则有些异常完全不知道哪里出错了。

+ 8 - 0
src/main/java/com/jsh/erp/service/MaterialInputService.java

@@ -3,10 +3,18 @@ package com.jsh.erp.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.jsh.erp.datasource.dto.MaterialInputDto;
 import com.jsh.erp.datasource.entities.MaterialInput;
+import com.jsh.erp.datasource.pda.dto.PDAGoodsInputDTO;
+
+import java.util.List;
 
 public interface MaterialInputService extends IService<MaterialInput> {
 
     /**
+     * PDA货物录入列表
+     */
+    List<MaterialInput> listBy(PDAGoodsInputDTO pdaInventoryDTO);
+
+    /**
      * 添加商品录入信息
      * @param materialInput
      */

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

@@ -14,9 +14,11 @@ import com.jsh.erp.datasource.pda.vo.PDADepotHeadVO;
 import com.jsh.erp.datasource.vo.AuditNodeVo;
 import com.jsh.erp.datasource.vo.AuditVo;
 import com.jsh.erp.exception.BusinessRunTimeException;
+import com.jsh.erp.exception.ServiceException;
 import com.jsh.erp.query.LambdaQueryWrapperX;
 import com.jsh.erp.service.*;
 import com.jsh.erp.utils.PageUtils;
+import com.jsh.erp.utils.StringUtil;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -109,7 +111,7 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
             }
         } catch (Exception e) {
             log.error("创建审核流程失败", e);
-            return false;
+            throw new ServiceException(StringUtil.isEmpty(e.getMessage()) ? "创建审核流程失败" : e.getMessage());
         }
         return true;
     }

+ 10 - 9
src/main/java/com/jsh/erp/service/impl/DepotHeadServiceImpl.java

@@ -16,6 +16,7 @@ import com.jsh.erp.datasource.pda.vo.PDADepotHeadVO;
 import com.jsh.erp.datasource.vo.*;
 import com.jsh.erp.exception.BusinessRunTimeException;
 import com.jsh.erp.exception.JshException;
+import com.jsh.erp.exception.ServiceException;
 import com.jsh.erp.query.LambdaQueryWrapperX;
 import com.jsh.erp.query.QueryWrapperX;
 import com.jsh.erp.service.*;
@@ -175,7 +176,7 @@ public class DepotHeadServiceImpl extends ServiceImpl<DepotHeadMapper, DepotHead
                     .eq("id",pdaDepotHeadDTO.getId()));
         }catch (Exception e){
             logger.info("复核任务设置失败!",e);
-            return false;
+            throw new ServiceException(e.getMessage());
         }
         return true;
     }
@@ -231,10 +232,12 @@ public class DepotHeadServiceImpl extends ServiceImpl<DepotHeadMapper, DepotHead
             Map<Long,String> accountMap = accountService.getAccountMap();
             beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
             endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
-            PageUtils.startPage();
-            list = depotHeadMapperEx.selectByConditionDepotHead(type, subType, creatorArray, hasDebt,
-                    statusArray, purchaseStatusArray, number, linkApply, linkNumber, beginTime, endTime,
-                    materialParam, organId, organArray, creator, depotId, depotArray, accountId, remark);
+            if (null != depotArray && depotArray.length > 0){
+                PageUtils.startPage();
+                list = depotHeadMapperEx.selectByConditionDepotHead(type, subType, creatorArray, hasDebt,
+                        statusArray, purchaseStatusArray, number, linkApply, linkNumber, beginTime, endTime,
+                        materialParam, organId, organArray, creator, depotId, depotArray, accountId, remark);
+            }
             if (null != list) {
                 List<Long> idList = new ArrayList<>();
                 List<String> numberList = new ArrayList<>();
@@ -338,9 +341,7 @@ public class DepotHeadServiceImpl extends ServiceImpl<DepotHeadMapper, DepotHead
     @Override
     public String[] getDepotArray(String subType) throws Exception {
         String [] depotArray = null;
-        if(!BusinessConstants.SUB_TYPE_PURCHASE_APPLY.equals(subType)
-                && !BusinessConstants.SUB_TYPE_PURCHASE_ORDER.equals(subType)
-                && !BusinessConstants.SUB_TYPE_SALES_ORDER.equals(subType)) {
+        if(!BusinessConstants.SUB_TYPE_PURCHASE_APPLY.equals(subType)) {
             String depotIds = depotService.findDepotStrByCurrentUser();
             depotArray = StringUtil.isNotEmpty(depotIds) ? depotIds.split(",") : null;
         }
@@ -2228,7 +2229,7 @@ public class DepotHeadServiceImpl extends ServiceImpl<DepotHeadMapper, DepotHead
                 msg.setMsgContent(String.format("您有一条新的拣货任务(单号:%s)请点击查看并及时处理",depotHead.getNumber()));
             }
             msg.setCreateTime(new Date());
-            msg.setType("复核任务");
+            msg.setType(depotHead.getSubType().equals("采购订单") ? "入库任务" : "拣货任务");
             msg.setUserId(v.getId());
             msg.setStatus(1);
             msgList.add(msg);

+ 5 - 6
src/main/java/com/jsh/erp/service/impl/MaterialBatchServiceImpl.java

@@ -3,14 +3,13 @@ package com.jsh.erp.service.impl;
 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;
 import com.jsh.erp.datasource.entities.*;
 import com.jsh.erp.datasource.mappers.MaterialBatchMapper;
 import com.jsh.erp.datasource.mappers.MaterialExtendMapper;
 import com.jsh.erp.datasource.mappers.MaterialInitialStockMapper;
 import com.jsh.erp.datasource.vo.TaskStocktakingItemVO;
-import com.jsh.erp.exception.BusinessRunTimeException;
 import com.jsh.erp.exception.JshException;
+import com.jsh.erp.exception.ServiceException;
 import com.jsh.erp.query.LambdaQueryWrapperX;
 import com.jsh.erp.service.*;
 import com.jsh.erp.utils.DateUtils;
@@ -119,6 +118,7 @@ public class MaterialBatchServiceImpl extends ServiceImpl<MaterialBatchMapper,Ma
             }
             depotHeadService.update(new UpdateWrapper<DepotHead>().set("status",2).eq("id",dhId));
         }
+        depotHeadService.sendMsg(dhId);
     }
 
     /**
@@ -155,6 +155,7 @@ public class MaterialBatchServiceImpl extends ServiceImpl<MaterialBatchMapper,Ma
                     BigDecimal inventory = materialBatch.getInventory().subtract(basicNumber);
                     materialBatch.setInventory(inventory);
                     updateInventory("出库",diId,materialBatch);
+                    basicNumber = BigDecimal.ZERO;
                     break;
                 }else {
                     //库存不足,扣除当前批次库存,继续循环
@@ -164,8 +165,7 @@ public class MaterialBatchServiceImpl extends ServiceImpl<MaterialBatchMapper,Ma
                 }
             }
             if (basicNumber.compareTo(BigDecimal.ZERO) > 0){
-                throw new BusinessRunTimeException(ExceptionConstants.SERVICE_SYSTEM_ERROR_CODE,
-                        "商品库存不足");
+                throw new ServiceException("商品库存不足");
             }
         }
     }
@@ -246,8 +246,7 @@ public class MaterialBatchServiceImpl extends ServiceImpl<MaterialBatchMapper,Ma
      */
     @Override
     public List<TaskStocktakingItemVO> getMaterialByBatchNumber(String[] batchNumbers) {
-        List<TaskStocktakingItemVO> list =  materialBatchMapper.getMaterialByBatchNumber(batchNumbers);
-        return list;
+        return materialBatchMapper.getMaterialByBatchNumber(batchNumbers);
     }
 
 }

+ 9 - 0
src/main/java/com/jsh/erp/service/impl/MaterialInputServiceImpl.java

@@ -7,6 +7,7 @@ import com.jsh.erp.datasource.entities.MaterialInput;
 import com.jsh.erp.datasource.entities.User;
 import com.jsh.erp.datasource.mappers.AuditProcessMapper;
 import com.jsh.erp.datasource.mappers.MaterialInputMapper;
+import com.jsh.erp.datasource.pda.dto.PDAGoodsInputDTO;
 import com.jsh.erp.exception.ServiceException;
 import com.jsh.erp.query.LambdaQueryWrapperX;
 import com.jsh.erp.service.AuditService;
@@ -19,6 +20,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.Date;
+import java.util.List;
 
 @Service
 @Slf4j
@@ -39,6 +41,13 @@ public class MaterialInputServiceImpl extends ServiceImpl<MaterialInputMapper,Ma
     private UserService userService;
 
 
+    /**
+     * PDA货物录入列表
+     */
+    @Override
+    public List<MaterialInput> listBy(PDAGoodsInputDTO pdaInventoryDTO) {
+        return materialInputMapper.listBy(pdaInventoryDTO);
+    }
 
     /**
      * 添加商品录入信息

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

@@ -644,8 +644,6 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
         if (depotList.size() > 1){
             depotName2 = depotList.get(1).getName();
         }
-//        String nameStr = "名称*,规格,型号,颜色,品牌,类别,基础重量(kg),基本单位*,副单位,比例,多属性," +
-//                "状态*,序列号,系统sku,商品条码,默认采购价,默认销售价,自定义1,自定义2,自定义3,备注";
         String nameStr = "SPU编码(可留空),SKU编码(可留空),商品名称(SPU级)*,品牌,类目*,商品效期," + depotName1 + "*," + depotName2 + ",规格*,默认采购价*,默认销售价*," +
                 "基础单位*,是否启用*,UPC1*,UPC2,UPC3,UPC4,UPC5,单位1,单位1换算关系,单位2,单位2换算关系,单位3,单位3换算关系,单位4,单位4换算关系,单位5,单位5换算关系";
         List<String> nameList = StringUtil.strToStringList(nameStr);

+ 0 - 2
src/main/java/com/jsh/erp/service/impl/TaskStocktakingServiceImpl.java

@@ -36,8 +36,6 @@ import java.util.stream.Collectors;
 @Slf4j
 public class TaskStocktakingServiceImpl extends ServiceImpl<TaskStocktakingMapper, TaskStocktaking> implements TaskStocktakingService {
 
-    private final MaterialExtendMapper materialExtendMapper;
-
     private final UserMapper userMapper;
 
     private final DepotMapper depotMapper;

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

@@ -973,7 +973,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
     public Long getAuditUserIds(Long uid, boolean isParent) {
         Organization organization = orgaUserRelService.getOrganizationByUid(uid);
         Long orgaId = organization.getId();
-        if (isParent){
+        if (isParent && organization.getParentId() != null){
             orgaId = organization.getParentId();
         }
         return userMapper.getAuditUserIds(orgaId);

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

@@ -48,7 +48,7 @@
                 AND u.username LIKE CONCAT('%',#{initiatorName},'%')
             </if>
             <if test="auditStatus != null">
-                AND an.audit_result = #{auditStatus}
+                AND a.audit_status = #{auditStatus}
             </if>
             <if test="beginTime != null">
                 AND an.audit_time >= #{beginTime}

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

@@ -695,7 +695,7 @@
     LEFT JOIN jsh_material m ON di.material_id = m.id
     LEFT JOIN jsh_supplier s ON dh.organ_id = s.id
     LEFT JOIN material_batch mb ON (SELECT id FROM jsh_depot_item WHERE link_id = di.id LIMIT 1) = mb.depot_item_id
-    WHERE di.id = #{depotItemId}
+    WHERE di.id = #{id}
   </select>
 
 

+ 20 - 0
src/main/resources/mapper_xml/MaterialInputMapper.xml

@@ -0,0 +1,20 @@
+<?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.jsh.erp.datasource.mappers.MaterialInputMapper">
+
+    <select id="listBy" parameterType="com.jsh.erp.datasource.pda.dto.PDAGoodsInputDTO" resultType="com.jsh.erp.datasource.entities.MaterialInput">
+        SELECT
+        id,number,`name`,bar_code,standard,production_date,img_name,depot_id,position,create_time
+        FROM
+        material_input
+        WHERE
+        ifnull(delete_flag,'0') !='1'
+        AND depot_id = #{depotId}
+        <if test="keyword != null and keyword !=''">
+            <bind name="bindKey" value="'%'+keyword+'%'"/>
+            and (bar_code like #{bindKey} or name like #{bindKey})
+        </if>
+        ORDER BY create_time DESC
+    </select>
+
+</mapper>

+ 1 - 0
src/main/resources/mapper_xml/UserMapper.xml

@@ -404,6 +404,7 @@
       username AS label
     FROM
       jsh_user
+    WHERE IFNULL(delete_flag,'0') != 1
   </select>
 
   <select id="getAuditUserIds" parameterType="java.lang.Long" resultType="java.lang.Long">