Browse Source

出库领料

2 years ago
parent
commit
bc0a3b254e

+ 1 - 0
platform-dao/src/main/java/com/platform/dao/mapper/store/OutStoreFormMapper.java

@@ -23,6 +23,7 @@ import java.util.List;
  */
 @Component
 public interface OutStoreFormMapper extends MyMapper<OutStoreForm> {
+    OutStoreFormVO selectbyRepairForm(String id);
     List<OutStoreFormVO> selectLists(OutStoreFormDTO dto);
 
     BigDecimal getOutStoreFormCount1(OutStoreFormDTO outStoreFormDTO);

+ 3 - 0
platform-dao/src/main/java/com/platform/dao/vo/query/store/OutStoreFormVO.java

@@ -1,6 +1,7 @@
 package com.platform.dao.vo.query.store;
 
 import com.platform.common.bean.BaseVO;
+import com.platform.dao.entity.store.OutStoreDetail;
 import lombok.Data;
 
 import com.platform.common.bean.BaseDTO;
@@ -26,6 +27,8 @@ import java.util.List;
 @EqualsAndHashCode(callSuper = true)
 public class OutStoreFormVO extends BaseVO implements Serializable {
 
+
+    private List<OutStoreDetail> outStoreDetail;
     private String applyDept;// 申请部门编码和用友oa保持一致
     private String applyUser;
     private String applyUserName;

+ 8 - 0
platform-dao/src/main/resources/mapper/store/OutStoreFormMapper.xml

@@ -295,9 +295,17 @@ outstoreform.process_instance_id,
                     #{item}
                 </foreach>
             </if>
+            <if test="repairFormId!=null and repairFormId!=''">
+                detail.repair_form_id=#{repairFormId}
+            </if>
         </where>
         order by form.id
 
     </select>
+    <select id="selectbyRepairForm" resultType="com.platform.dao.vo.query.store.OutStoreFormVO"
+            parameterType="String">
+        select form.*,detail.* as outStoreDetailVOS from   t_out_store_form form JOIN t_out_store_detail detail ON
+        form.id=detail.`out_id`
+    </select>
 
 </mapper>

+ 11 - 0
platform-rest/src/main/java/com/platform/rest/controller/store/OutStoreFormController.java

@@ -219,4 +219,15 @@ public class OutStoreFormController {
         ExcelUtil.exportResponseDict(response, ExportOutStoreFormVO.class, BeanConverterUtil.copyListProperties(list, ExportOutStoreFormVO.class), "出库登记单");
     }
 
+    /**
+     * 通过维修工单id获取列表
+     *
+     * @param id
+     * @return R
+     */
+    @GetMapping("/repairFormId/{id}")
+    public R queryByRepairFormId(@PathVariable String id) {
+        return new R<>(outStoreFormService.selectbyRepairForm(id));
+    }
+
 }

+ 1 - 0
platform-service/src/main/java/com/platform/service/store/OutStoreFormService.java

@@ -19,6 +19,7 @@ import java.util.List;
  * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
  */
 public interface OutStoreFormService extends IBaseService<OutStoreForm, OutStoreFormDTO> {
+    OutStoreFormVO selectbyRepairForm(String id);
 
     List<OutStoreFormVO> selectLists(OutStoreFormDTO dto);
 

+ 10 - 0
platform-service/src/main/java/com/platform/service/store/impl/OutStoreFormServiceImpl.java

@@ -27,6 +27,7 @@ import com.platform.dao.vo.query.store.StoreCheckJobVO;
 import com.platform.dao.vo.query.store.StoreVO;
 import com.platform.service.base.impl.BaseServiceImpl;
 import com.platform.service.event.WorkplaceBacklogEvent;
+import com.platform.service.store.OutStoreDetailService;
 import com.platform.service.store.OutStoreFormService;
 import com.platform.service.store.StoreService;
 import com.platform.service.upms.SysUserRoleService;
@@ -68,6 +69,15 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
     private SbInfoMapper sbInfoMapper;
     private SbPositionMapper sbPositionMapper;
     private SysUserRoleService sysUserService;
+    private OutStoreDetailService outStoreDetailService;
+
+    @Override
+    public OutStoreFormVO selectbyRepairForm(String id) {
+        List<OutStoreDetail> outStoreDetails = outStoreDetailService.getModelListByDTO(new OutStoreDetailDTO().setRepairFormId(id));
+        OutStoreFormVO vo = new OutStoreFormVO();
+        vo.setId(outStoreDetails.get(0).getOutId());
+        return vo.setOutStoreDetail(outStoreDetails);
+    }
 
     @Override
     public List<OutStoreFormVO> selectLists(OutStoreFormDTO dto) {