2 năm trước cách đây
mục cha
commit
d0b9c6ac33

+ 1 - 0
platform-dao/src/main/java/com/platform/dao/entity/store/OutStoreForm.java

@@ -22,6 +22,7 @@ import javax.persistence.Transient;
 @Accessors(chain = true)
 @Table(name = "t_out_store_form")
 public class OutStoreForm implements Serializable{
+    private String repairFormId;
 
     private String applyDept;// 申请部门编码和用友oa保持一致
     private String applyUser;

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

@@ -19,7 +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> selectbyRepairForm(String id);
 
     List<OutStoreFormVO> selectLists(OutStoreFormDTO dto);
 

+ 13 - 12
platform-service/src/main/java/com/platform/service/store/impl/OutStoreFormServiceImpl.java

@@ -21,10 +21,7 @@ import com.platform.dao.mapper.sb.SbInfoMapper;
 import com.platform.dao.mapper.sb.SbPositionMapper;
 import com.platform.dao.mapper.store.*;
 import com.platform.dao.util.MessageTemplateUtil;
-import com.platform.dao.vo.query.store.OutStoreFormVO;
-import com.platform.dao.vo.query.store.SparePickDetailVO;
-import com.platform.dao.vo.query.store.StoreCheckJobVO;
-import com.platform.dao.vo.query.store.StoreVO;
+import com.platform.dao.vo.query.store.*;
 import com.platform.service.base.impl.BaseServiceImpl;
 import com.platform.service.event.WorkplaceBacklogEvent;
 import com.platform.service.store.OutStoreDetailService;
@@ -72,14 +69,18 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
     private OutStoreDetailService outStoreDetailService;
 
     @Override
-    public OutStoreFormVO selectbyRepairForm(String id) {
-        List<OutStoreDetail> outStoreDetails = outStoreDetailService.getModelListByDTO(new OutStoreDetailDTO().setRepairFormId(id));
-        OutStoreFormVO vo = new OutStoreFormVO();
-        if (outStoreDetails!=null&&outStoreDetails.size()>0) {
-            vo.setId(outStoreDetails.get(0).getOutId());
-            return vo.setOutStoreDetail(outStoreDetails);
-        }
-        return new OutStoreFormVO();
+    public List<OutStoreFormVO> selectbyRepairForm(String id) {
+        List<OutStoreForm> outStoreForms = mapper.select(new OutStoreForm().setRepairFormId(id));
+        List<OutStoreFormVO> outStoreFormVOS = BeanConverterUtil.copyListProperties(outStoreForms,OutStoreFormVO.class);
+        List<OutStoreDetailVO> detailVOS;
+        if (outStoreFormVOS!=null&&outStoreFormVOS.size()>0) {
+            for (OutStoreFormVO vo : outStoreFormVOS) {
+                detailVOS = mapper.selectDetailList(vo.getId());
+                vo.setDetailList(detailVOS);
+            }
+        }
+
+        return outStoreFormVOS;
     }
 
     @Override