Kaynağa Gözat

aps-技术评审自动匹配技术要求新需求

sucheng 3 ay önce
ebeveyn
işleme
4cf4eabff7

+ 2 - 1
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/ApsProductDetailDao.java

@@ -8,6 +8,7 @@ import com.rongwei.bsentity.vo.GetOldTechnicalRequirementRes;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 public interface ApsProductDetailDao extends BaseMapper<ApsProductDetailDo> {
@@ -64,7 +65,7 @@ public interface ApsProductDetailDao extends BaseMapper<ApsProductDetailDo> {
 
     void publishCancel(@Param("productionOrderIds") List<String> productionOrderIds);
 
-    GetOldTechnicalRequirementRes selectMyList(@Param("technicalRequirementId") String technicalRequirementId, @Param("id") String id, @Param("alloy") String alloy, @Param("alloystatus") String alloystatus, @Param("orderProductTypeId") String orderProductTypeId, @Param("customId") String customId);
+    GetOldTechnicalRequirementRes selectMyList(@Param("technicalRequirementId") String technicalRequirementId, @Param("id") String id, @Param("alloy") String alloy, @Param("alloystatus") String alloystatus, @Param("orderProductTypeId") String orderProductTypeId, @Param("customId") String customId, @Param("thickness") BigDecimal thickness);
 
     List<GetOldTechnicalRequirementRes> selectMyList1(@Param("technicalRequirementId") String technicalRequirementId, @Param("id") String id, @Param("customId") String customId, @Param("alloy") String alloy);
 

+ 2 - 1
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProductDetailServiceImpl.java

@@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.RequestBody;
 
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -630,7 +631,7 @@ public class ApsProductDetailServiceImpl extends ServiceImpl<ApsProductDetailDao
         String alloy = orderDetail.getAlloy();
         String alloystatus = orderDetail.getAlloystatus();
 
-        GetOldTechnicalRequirementRes apsProductDetailDo = this.baseMapper.selectMyList(technicalRequirementId, orderDetail.getId(), alloy, alloystatus, orderProductTypeId, customId);
+        GetOldTechnicalRequirementRes apsProductDetailDo = this.baseMapper.selectMyList(technicalRequirementId, orderDetail.getId(), alloy, alloystatus, orderProductTypeId, customId, orderDetail.getThickness());
 //        List<GetOldTechnicalRequirementRes> list1 = this.baseMapper.selectMyList1(technicalRequirementId, orderDetail.getId(), customId, alloy);
 //        List<GetOldTechnicalRequirementRes> list2 = this.baseMapper.selectMyList2(technicalRequirementId, orderDetail.getId(), customId, alloystatus);
 //        List<GetOldTechnicalRequirementRes> list3 = this.baseMapper.selectMyList3(technicalRequirementId, orderDetail.getId(), customId, orderProductTypeId);

+ 4 - 1
cx-aps/cx-aps-common/src/main/resources/mybatis/ApsProductDetailDao.xml

@@ -144,7 +144,10 @@
             apd.PRODUCTTYPEID AS 'producttypeid',
             apd.PRODUCTTYPE AS 'producttype',
             aptr.*,
-            IF(apd.ALLOY = #{alloy},10,0)+IF(apd.ALLOYSTATUS = #{alloystatus},1,0)+IF(aptr.ORDERPRODUCTTYPEID = #{orderProductTypeId},100,0) AS 'core'
+            IF(apd.ALLOY = #{alloy},50,0)
+                +IF(apd.ALLOYSTATUS = #{alloystatus},30,0)
+                +IF(aptr.ORDERPRODUCTTYPEID = #{orderProductTypeId},100,0)
+                +IF(aptr.BLAMKTHICKNESS = #{thickness},10,0) AS 'core'
         from
             aps_production_order apo
                 LEFT JOIN aps_product_detail apd ON apo.ID = apd.MAINID