Browse Source

Merge remote-tracking branch 'origin/master_liaozeyong'

13660505945 1 month ago
parent
commit
50db7eebf0

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

@@ -9,7 +9,6 @@ import com.jsh.erp.base.AjaxResult;
 import com.jsh.erp.base.BaseController;
 import com.jsh.erp.base.BaseController;
 import com.jsh.erp.base.TableDataInfo;
 import com.jsh.erp.base.TableDataInfo;
 import com.jsh.erp.datasource.entities.DepotHead;
 import com.jsh.erp.datasource.entities.DepotHead;
-import com.jsh.erp.datasource.entities.MaterialVo4Unit;
 import com.jsh.erp.datasource.entities.Supplier;
 import com.jsh.erp.datasource.entities.Supplier;
 import com.jsh.erp.datasource.entities.*;
 import com.jsh.erp.datasource.entities.*;
 import com.jsh.erp.datasource.pda.dto.PDADepotHeadDTO;
 import com.jsh.erp.datasource.pda.dto.PDADepotHeadDTO;
@@ -25,12 +24,9 @@ import com.jsh.erp.datasource.vo.TaskStocktakingVO;
 import com.jsh.erp.datasource.vo.TreeNode;
 import com.jsh.erp.datasource.vo.TreeNode;
 import com.jsh.erp.query.LambdaQueryWrapperX;
 import com.jsh.erp.query.LambdaQueryWrapperX;
 import com.jsh.erp.service.*;
 import com.jsh.erp.service.*;
-import com.jsh.erp.utils.FileUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
@@ -105,6 +101,7 @@ public class PdaController extends BaseController {
     public AjaxResult orderInfo(@PathVariable("id") Long id){
     public AjaxResult orderInfo(@PathVariable("id") Long id){
         DepotHead depotHead = depotHeadService.getOne(new LambdaQueryWrapperX<DepotHead>().eq(DepotHead::getId, 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());
         depotHead.setSupplierName(supplierService.getOne(new LambdaQueryWrapperX<Supplier>().eq(Supplier::getId, depotHead.getOrganId())).getSupplier());
+//        depotHeadService.pdaDetail(id);
         return AjaxResult.success(depotHead);
         return AjaxResult.success(depotHead);
     }
     }
 
 

+ 7 - 0
src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapper.java

@@ -17,6 +17,13 @@ public interface DepotHeadMapper extends BaseMapperX<DepotHead> {
      */
      */
     List<PDADepotHeadVO> pdaList(PDADepotHeadDTO pdaDepotHeadDTO);
     List<PDADepotHeadVO> pdaList(PDADepotHeadDTO pdaDepotHeadDTO);
 
 
+    /**
+     * PDA查询订单详情
+     * @param id 订单id
+     * @return
+     */
+    PDADepotHeadVO pdaDetail(@Param("id")Long id);
+
     long countByExample(DepotHeadExample example);
     long countByExample(DepotHeadExample example);
 
 
     int deleteByExample(DepotHeadExample example);
     int deleteByExample(DepotHeadExample example);

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

@@ -22,4 +22,7 @@ public class PDATaskStocktakingItemDTO {
 
 
     @ApiModelProperty("商品盘点类型:1.未盘,2.盘盈,3.盘亏 4.无差异 其余为全部")
     @ApiModelProperty("商品盘点类型:1.未盘,2.盘盈,3.盘亏 4.无差异 其余为全部")
     private List<String> statusList;
     private List<String> statusList;
+
+    @ApiModelProperty("任务编号")
+    private String number;
 }
 }

+ 4 - 0
src/main/java/com/jsh/erp/datasource/pda/vo/PDADepotHeadVO.java

@@ -23,6 +23,10 @@ public class PDADepotHeadVO {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
     private Date createTime;
 
 
+    @ApiModelProperty("单据时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date operTime;
+
     @ApiModelProperty("商品总数量")
     @ApiModelProperty("商品总数量")
     private int goodsQuantity;
     private int goodsQuantity;
 
 

+ 3 - 0
src/main/java/com/jsh/erp/datasource/pda/vo/PDATaskStocktakingItemVO.java

@@ -51,4 +51,7 @@ public class PDATaskStocktakingItemVO {
     @ApiModelProperty("盘点状态:1.未盘,2.盘盈,3.盘亏 4.无差异 其余为全部")
     @ApiModelProperty("盘点状态:1.未盘,2.盘盈,3.盘亏 4.无差异 其余为全部")
     private Integer status;
     private Integer status;
 
 
+    @ApiModelProperty("图片地址")
+    private String imgName;
+
 }
 }

+ 7 - 0
src/main/java/com/jsh/erp/service/DepotHeadService.java

@@ -28,6 +28,13 @@ public interface DepotHeadService extends IService<DepotHead> {
      */
      */
     List<PDADepotHeadVO> pdaList(PDADepotHeadDTO pdaDepotHeadDTO);
     List<PDADepotHeadVO> pdaList(PDADepotHeadDTO pdaDepotHeadDTO);
 
 
+    /**
+     * PDA查询订单详情
+     * @param id
+     * @return
+     */
+    PDADepotHeadVO pdaDetail(Long id);
+
     DepotHead getDepotHead(long id)throws Exception;
     DepotHead getDepotHead(long id)throws Exception;
 
 
     List<DepotHead> getDepotHead()throws Exception;
     List<DepotHead> getDepotHead()throws Exception;

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

@@ -111,6 +111,11 @@ public class DepotHeadServiceImpl extends ServiceImpl<DepotHeadMapper, DepotHead
     }
     }
 
 
     @Override
     @Override
+    public PDADepotHeadVO pdaDetail(Long id) {
+        return depotHeadMapper.pdaDetail(id);
+    }
+
+    @Override
     public DepotHead getDepotHead(long id)throws Exception {
     public DepotHead getDepotHead(long id)throws Exception {
         DepotHead result=null;
         DepotHead result=null;
         try{
         try{

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

@@ -746,6 +746,7 @@
       dh.create_time,
       dh.create_time,
       dh.goods_quantity,
       dh.goods_quantity,
       dh.goods_type_count,
       dh.goods_type_count,
+      dh.oper_time,
       s.supplier AS supplier_name,
       s.supplier AS supplier_name,
       dh.status
       dh.status
     FROM
     FROM
@@ -766,6 +767,25 @@
       </if>
       </if>
     </where>
     </where>
       GROUP BY dh.id
       GROUP BY dh.id
+      ORDER BY dh.create_time DESC
+  </select>
+
+  <select id="pdaDetail" resultType="com.jsh.erp.datasource.pda.vo.PDADepotHeadVO">
+    SELECT
+      dh.id,
+      dh.number,
+      dh.create_time,
+      dh.goods_quantity,
+      dh.goods_type_count,
+      dh.oper_time,
+      s.supplier AS supplier_name,
+      dh.status
+    FROM
+      jsh_depot_head dh
+      LEFT JOIN jsh_supplier s ON dh.organ_id = s.id
+      LEFT JOIN jsh
+    WHERE
+      dh.id = #{id}
   </select>
   </select>
 
 
   <select id="getDepotLastByMaterialId" resultType="com.jsh.erp.datasource.entities.DepotHead">
   <select id="getDepotLastByMaterialId" resultType="com.jsh.erp.datasource.entities.DepotHead">

+ 6 - 0
src/main/resources/mapper_xml/TaskStocktakingItemMapper.xml

@@ -16,6 +16,7 @@
         me.commodity_unit AS commodity_unit,
         me.commodity_unit AS commodity_unit,
         tsi.new_inventory AS new_inventory,
         tsi.new_inventory AS new_inventory,
         tsi.new_position AS new_position,
         tsi.new_position AS new_position,
+        m.img_name AS img_name,
         tsi.status AS status
         tsi.status AS status
         FROM
         FROM
         task_stocktaking_item tsi
         task_stocktaking_item tsi
@@ -26,6 +27,11 @@
         <where>
         <where>
             tsi.delete_flag = 0
             tsi.delete_flag = 0
             AND tsi.task_stocktaking_id = #{taskId}
             AND tsi.task_stocktaking_id = #{taskId}
+            <if test="number != null and number != ''">
+                m.name LIKE CONCAT('%',#{number},'%')
+                OR me.batch_number LIKE CONCAT('%',#{number},'%')
+                OR m.system_sku LIKE CONCAT('%',#{number},'%')
+            </if>
             <if test="userIdList != null and userIdList.size > 0">
             <if test="userIdList != null and userIdList.size > 0">
                 AND tsi.creator IN
                 AND tsi.creator IN
                 <foreach collection="userIdList" item="item" open="(" separator="," close=")">
                 <foreach collection="userIdList" item="item" open="(" separator="," close=")">