guarantee-lsq 2 ヶ月 前
コミット
d83ac9e84d

+ 1 - 5
platform-dao/src/main/java/com/platform/dao/vo/query/store/OutStoreFormVO.java

@@ -3,17 +3,13 @@ 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;
-import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
-import javax.validation.constraints.*;
 import java.io.Serializable;
 import java.math.BigDecimal;
-import java.time.LocalDateTime;
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.util.List;
 
 /**

+ 2 - 41
platform-dao/src/main/resources/mapper/store/OutStoreFormMapper.xml

@@ -104,7 +104,7 @@ outstoreform.process_instance_id,
             and outstoreform.update_user_name = #{updateUserName}
         </if>
         <if test="createdTimeStart != null">
-            and outstoreform.created_time <![CDATA[>=]]>; #{createdTimeStart}
+            and outstoreform.created_time <![CDATA[>=]]> #{createdTimeStart}
         </if>
         <if test="createdTimeEnd != null">
             and outstoreform.created_time <![CDATA[<=]]> #{createdTimeEnd}
@@ -113,7 +113,7 @@ outstoreform.process_instance_id,
             and outstoreform.created_time = #{createdTime}
         </if>
         <if test="updateTimeStart != null">
-            and outstoreform.update_time <![CDATA[>=]]>; #{updateTimeStart}
+            and outstoreform.update_time <![CDATA[>=]]> #{updateTimeStart}
         </if>
         <if test="updateTimeEnd != null">
             and outstoreform.update_time <![CDATA[<=]]> #{updateTimeEnd}
@@ -143,31 +143,12 @@ outstoreform.process_instance_id,
             </foreach>
         </if>
     </sql>
-    <!--<select id="selectList" parameterType="com.platform.dao.dto.store.OutStoreFormDTO"
-            resultType="com.platform.dao.vo.query.store.OutStoreFormVO">
-        select outstoreform.*, store.name storeName
-        from t_out_store_form as outstoreform
-        left join t_store store on store.id = outstoreform.store_id
-        <where>
-            <include refid="List_Condition"/>
-            <if test="useCompany != null and useCompany != ''">
-                and store.use_company = #{useCompany}
-            </if>
-            <if test="useProject != null and useProject != ''">
-                and store.use_project = #{useProject}
-            </if>
-            <if test="userId != null and userId != ''">
-                and store.user_id = #{userId}
-            </if>
-        </where>
-    </select>-->
     <select id="selectList" parameterType="com.platform.dao.dto.store.OutStoreFormDTO"
             resultType="com.platform.dao.vo.query.store.OutStoreFormVO">
         select outstoreform.*,repairForm.no as repairNo
         from t_out_store_form as outstoreform left join t_repair_application_form repairForm on outstoreform.pick_id=repairForm.id
         <where>
         and outstoreform.status!=6
-
             <include refid="List_Condition"/>
             <if test="userId != null and userId != ''">
                 and outstoreform.created_user_id = #{userId}
@@ -175,26 +156,6 @@ outstoreform.process_instance_id,
         </where>
     </select>
 
-    <!--    <select id="selectOutStoreList" parameterType="com.platform.dao.dto.store.OutStoreFormDTO"-->
-    <!--            resultType="com.platform.dao.vo.query.store.OutStoreFormVO">-->
-    <!-- select detail.*,form.status-->
-    <!--        from t_out_store_detail detail-->
-    <!--        left join  t_out_store_form form on form.id = detail.out_id-->
-    <!--    </select>-->
-
-    <!--<select id="selectDetailList"  resultType="com.platform.dao.vo.query.store.OutStoreDetailVO">
-        select detail.*,
-               store.name storeName,
-               spareinfo.name spareName,
-               spareinfo.ggxh ggxh,
-               spareinfo.no,
-               spareinfo.init_no initNo
-        from t_out_store_detail detail
-        left join t_out_store_form form on form.id = detail.out_id
-        left join t_store store on detail.store_id = store.id
-        left join t_spare_part_info spareinfo on spareinfo.id = detail.spare_id
-        where form.id = #{id}
-    </select>-->
     <select id="selectDetailList" resultType="com.platform.dao.vo.query.store.OutStoreDetailVO">
         select detail.*
         from t_out_store_detail detail

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

@@ -2,6 +2,8 @@ package com.platform.rest.controller.store;
 
 import com.platform.common.bean.AbstractPageResultBean;
 import com.platform.common.util.BeanConverterUtil;
+import com.platform.common.util.JsonUtils;
+import com.platform.common.util.ListUtils;
 import com.platform.common.util.R;
 import com.platform.common.validation.group.AddGroup;
 import com.platform.common.validation.group.UpdateGroup;
@@ -13,11 +15,14 @@ import com.platform.rest.log.annotation.SysLog;
 import com.platform.service.store.OutStoreDetailService;
 import com.platform.service.store.OutStoreFormService;
 import lombok.AllArgsConstructor;
+import org.apache.commons.collections.CollectionUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -240,4 +245,22 @@ public class OutStoreFormController {
         return new R<>(outStoreFormService.selectbyRepairForm(id));
     }
 
+    @GetMapping("/supply/in/out")
+    public void supplyInOut(OutStoreFormDTO outStoreFormDTO,HttpServletResponse response) {
+        List<OutStoreFormVO> list = outStoreFormService.selectList(outStoreFormDTO);
+        PrintWriter out = null;
+        try {
+            if(CollectionUtils.isEmpty(list)){
+                list = ListUtils.newArrayList();
+            }
+            out = response.getWriter();
+            out.write(JsonUtils.objectToJson(list));
+            out.flush();
+        } catch ( IOException e) {
+            e.printStackTrace();
+        } finally {
+            out.close();
+        }
+    }
+
 }

+ 1 - 0
platform-rest/src/main/resources/application-dev.yml

@@ -95,6 +95,7 @@ ignore:
     - /sb/infos/**
     - /yongyou/put
     - /merge/merge/**
+    - /store/out-store-forms/supply/in/out
 platform:
   slf4j:
     data: D://xajg

+ 2 - 0
platform-rest/src/main/resources/application-test.yml

@@ -60,6 +60,8 @@ ignore:
     - /operate/customers/*
     - /repair/application-forms/repair/report
     - /websocket/**
+    - /yongyou/spareStore/GetInventoryList/page
+    - /store/out-store-forms/supply/in/out
 
 platform:
   slf4j:

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

@@ -98,4 +98,6 @@ public interface OutStoreFormService extends IBaseService<OutStoreForm, OutStore
      * @param yyId
      */
     void updateModelByIdYongyou(String id, String yyId);
+
+    List<OutStoreFormVO> selectList(OutStoreFormDTO outStoreFormDTO);
 }

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

@@ -24,10 +24,11 @@ import com.platform.dao.entity.upms.SysUserDept;
 import com.platform.dao.enums.*;
 import com.platform.dao.mapper.project.ProjectMapper;
 import com.platform.dao.mapper.repair.RepairApplicationFormMapper;
-import com.platform.dao.mapper.sb.SbInfoMapper;
 import com.platform.dao.mapper.sb.SbModelSpareBomMapper;
-import com.platform.dao.mapper.sb.SbPositionMapper;
-import com.platform.dao.mapper.store.*;
+import com.platform.dao.mapper.store.OutStoreDetailMapper;
+import com.platform.dao.mapper.store.OutStoreFormMapper;
+import com.platform.dao.mapper.store.SparePickFormMapper;
+import com.platform.dao.mapper.store.SpareStoreMapper;
 import com.platform.dao.util.MessageTemplateUtil;
 import com.platform.dao.vo.query.project.ProjectVO;
 import com.platform.dao.vo.query.store.*;
@@ -35,13 +36,11 @@ import com.platform.dao.vo.repair.RepairApplicationFormVO;
 import com.platform.dao.vo.sb.SbModelSpareBomVO;
 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.SysConfigService;
 import com.platform.service.upms.SysUserDeptService;
 import com.platform.service.upms.SysUserRoleService;
-import com.platform.service.yongyou.YongyouService;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -51,6 +50,7 @@ import tk.mybatis.mapper.weekend.Weekend;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -63,23 +63,17 @@ import java.util.stream.Collectors;
 @AllArgsConstructor
 @Service("outStoreFormService")
 public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper, OutStoreForm, OutStoreFormDTO> implements OutStoreFormService {
+    private final OutStoreDetailMapper outStoreDetailMapper;
     private OutStoreDetailMapper detailMapper;
     private StoreService storeService;
     private SpareStoreMapper spareStoreMapper;
-    private SpareStoreSecondMapper spareStoreSecondMapper;
     private SparePickFormMapper sparePickFormMapper;
-    private SparePickDetailMapper sparePickDetailMapper;
-    private InStoreFormServiceImpl inStoreFormServiceImpl;
     private RepairApplicationFormMapper repairApplicationFormMapper;
-    private SbInfoMapper sbInfoMapper;
-    private SbPositionMapper sbPositionMapper;
     private SysUserRoleService sysUserService;
-    private OutStoreDetailService outStoreDetailService;
     private ProjectMapper projectMapper;
     private SbModelSpareBomMapper sbModelSpareBomMapper;
     private SysConfigService sysConfigService;
     private SysUserDeptService sysUserDeptService;
-    private YongyouService yongyouService;
 
     @Override
     public List<OutStoreFormVO> selectbyRepairForm(String id) {
@@ -1051,4 +1045,17 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
         outStoreForm.setUpdateTime(LocalDateTime.now());
         mapper.updateByPrimaryKeySelective(outStoreForm);
     }
+
+    @Override
+    public List<OutStoreFormVO> selectList(OutStoreFormDTO outStoreFormDTO) {
+        List<OutStoreFormVO> list = mapper.selectList(outStoreFormDTO);
+        if(!CollectionUtils.isEmpty(list)){
+            for (OutStoreFormVO outStoreFormVO : list) {
+                OutStoreDetailDTO outStoreDetail = new OutStoreDetailDTO();
+                outStoreDetail.setOutId(outStoreFormVO.getId());
+                outStoreFormVO.setDetailList(outStoreDetailMapper.selectList(outStoreDetail));
+            }
+        }
+        return list;
+    }
 }

+ 1 - 16
platform-service/src/main/java/com/platform/service/yongyou/impl/YongyouServiceImpl.java

@@ -1,5 +1,6 @@
 package com.platform.service.yongyou.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.Page;
 import com.platform.common.bean.AbstractPageResultBean;
@@ -1473,14 +1474,6 @@ public class YongyouServiceImpl implements YongyouService {
         return response.getMsg();
     }
 
-    public static void main(String[] args) {
-        Double d = new Double(12.00);
-        Double dd = MathUtils.formatDouble2(d,4);
-        System.out.println(dd.toString());
-    }
-
-
-
 
     @Override
     public String pushSpare(String id) {
@@ -1834,10 +1827,6 @@ public class YongyouServiceImpl implements YongyouService {
         if (StringUtils.isNotBlank(record.getStoreNo())) {
             whereStr.append(" and cDefWareHouse like '%" + record.getStoreNo() + "%' ");
         }
-        // 仓库名称搜索
-//        if (StringUtils.isNotBlank(record.getStoreName())) {
-//            whereStr.append(" and cWhName like '%" + record.getStoreName() + "%' ");
-//        }
         // 存货编码搜索
         if (StringUtils.isNotBlank(record.getSpareNo())) {
             whereStr.append(" and cInvCode like '%" + record.getSpareNo() + "%' ");
@@ -1850,10 +1839,6 @@ public class YongyouServiceImpl implements YongyouService {
         if (StringUtils.isNotBlank(record.getGgxh())) {
             whereStr.append(" and cInvStd like '%" + record.getGgxh() + "%' ");
         }
-//        if(record.getPurchaseFlag() == null || record.getPurchaseFlag() == 2){
-//            // 非采购请求数据
-//            whereStr.append(" and iQuantity > 0 ");
-//        }
         req.setStrWhere(whereStr.toString());
         handler.setRequest(req);
         String responseStr = handler.handler();

+ 0 - 4
platform-service/src/main/java/handler/yongyou/request/PushOutStoreFormRequest.java

@@ -1,12 +1,8 @@
 package handler.yongyou.request;
 
-import com.alibaba.fastjson.annotation.JSONField;
-import com.platform.dao.entity.store.OutStoreForm;
 import com.platform.dao.vo.query.store.OutStoreFormVO;
 import lombok.Data;
 
-import java.util.List;
-
 @Data
 public class PushOutStoreFormRequest extends BaseRequest {
     private OutStoreFormVO outStoreFormVO;

+ 1 - 1
platform-service/src/main/java/handler/yongyou/response/GetInventoryList.java

@@ -13,7 +13,7 @@ public class GetInventoryList extends BaseResponse {
     private String cInvName; // 存货名称"电源"
     private String cInvStd; // 规格型号 "亿泰鑫 2U/550W/冗余电源/550W-E-102"
     private String cInvAddCode; // 存货代码null
-    private String cInvCCode; // 存货代码null
+    private String cInvCCode; // 存货分类
 
     private Integer fInvCIQExch; // 存货代码null
     private String cGroupCode; // 计量单位组编码