Browse Source

2025/7/6

master
Aoi_Tori 8 months ago
parent
commit
513d139cba
  1. 9
      src/main/java/com/spring/modules/sampleManagement/data/PlmTechnicalSpecificationSheetData.java
  2. 8
      src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java
  3. 22
      src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml

9
src/main/java/com/spring/modules/sampleManagement/data/PlmTechnicalSpecificationSheetData.java

@ -90,6 +90,7 @@ public class PlmTechnicalSpecificationSheetData extends PlmTechnicalSpecificatio
private String dimensionTolerance; private String dimensionTolerance;
private String p2cTolerance; private String p2cTolerance;
private String slittingTolerance; private String slittingTolerance;
private String directCustomer;
public String getLabelLength() { public String getLabelLength() {
return labelLength; return labelLength;
@ -704,4 +705,12 @@ public class PlmTechnicalSpecificationSheetData extends PlmTechnicalSpecificatio
public void setDccList(List<String> dccList) { public void setDccList(List<String> dccList) {
this.dccList = dccList; this.dccList = dccList;
} }
public String getDirectCustomer() {
return directCustomer;
}
public void setDirectCustomer(String directCustomer) {
this.directCustomer = directCustomer;
}
} }

8
src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java

@ -2077,15 +2077,17 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification
String buNoSymbol = symbolTrans(symbolMap.get("buNo")); String buNoSymbol = symbolTrans(symbolMap.get("buNo"));
String customerDescSymbol = symbolTrans(symbolMap.get("customerDesc")); String customerDescSymbol = symbolTrans(symbolMap.get("customerDesc"));
String cutterNumber = null; String cutterNumber = null;
boolean buNoFlag = false;
for (int i = 0; i < whereConditionArr.length; i++) { for (int i = 0; i < whereConditionArr.length; i++) {
if (whereConditionArr[i].contains("status_desc")) { if (whereConditionArr[i].contains("status_desc")) {
whereConditionArr[i] = "a.status != 'death' AND a.status " + statusSymbol + filteredList.get(i).getFormula(); whereConditionArr[i] = "a.status != 'death' AND a.status " + statusSymbol + filteredList.get(i).getFormula();
} }
if (whereConditionArr[i].contains("test_part_no")) { if (whereConditionArr[i].contains("test_part_no")) {
if (testPartNoSymbol.equals("like")){
whereConditionArr[i] = "(a.test_part_no like '%" + filteredList.get(i).getFormula() + "%' or b.final_part_no like '%" + filteredList.get(i).getFormula() + "%' or a.relevance_part_no like '%" + filteredList.get(i).getFormula() + "%' or pcpi.customer_part_no like '%" + filteredList.get(i).getFormula() + "%')";
}else {
whereConditionArr[i] = "(a.test_part_no "+ testPartNoSymbol + "'" + filteredList.get(i).getFormula() + "' or b.final_part_no "+ testPartNoSymbol + "'" + filteredList.get(i).getFormula() + "' or a.relevance_part_no "+ testPartNoSymbol + "'" + filteredList.get(i).getFormula() + "' or pcpi.customer_part_no "+ testPartNoSymbol + "'" + filteredList.get(i).getFormula() + "')"; whereConditionArr[i] = "(a.test_part_no "+ testPartNoSymbol + "'" + filteredList.get(i).getFormula() + "' or b.final_part_no "+ testPartNoSymbol + "'" + filteredList.get(i).getFormula() + "' or a.relevance_part_no "+ testPartNoSymbol + "'" + filteredList.get(i).getFormula() + "' or pcpi.customer_part_no "+ testPartNoSymbol + "'" + filteredList.get(i).getFormula() + "')";
} }
if (whereConditionArr[i].contains("bu_no")) {
whereConditionArr[i] = "b.bu_no in (select bu_No from dbo.Get_Now_BU_chooseAble('" + querySavedVo.getSite() + "', '" + querySavedVo.getUserName() + "')) AND b.bu_no " + buNoSymbol + "'" + filteredList.get(i).getFormula() + "'";
} }
if (whereConditionArr[i].contains("customer_desc")){ if (whereConditionArr[i].contains("customer_desc")){
whereConditionArr[i] = "(dbo.plm_get_customer_desc(c.site, c.customer_id) " + customerDescSymbol + "'" + filteredList.get(i).getFormula() + "' or dbo.plm_get_dictDataLabel('finalCustomer', c.final_customer_id, c.site) " + customerDescSymbol + "'" + filteredList.get(i).getFormula()+"')"; whereConditionArr[i] = "(dbo.plm_get_customer_desc(c.site, c.customer_id) " + customerDescSymbol + "'" + filteredList.get(i).getFormula() + "' or dbo.plm_get_dictDataLabel('finalCustomer', c.final_customer_id, c.site) " + customerDescSymbol + "'" + filteredList.get(i).getFormula()+"')";
@ -2103,7 +2105,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification
} }
} }
whereClause = String.join(" AND ", validConditions); whereClause = String.join(" AND ", validConditions);
whereClause = (whereClause.isEmpty() ? "a.site = '" + querySavedVo.getSite() + "'" : whereClause + " AND a.site = '" + querySavedVo.getSite() + "'").trim();
whereClause = (whereClause.isEmpty() ? "a.site = '" + querySavedVo.getSite() + "' and a.status != 'death' and b.bu_no in (select bu_No from dbo.Get_Now_BU_chooseAble('" + querySavedVo.getSite() + "', '" + querySavedVo.getUserName() + "'))" : whereClause + " AND a.site = '" + querySavedVo.getSite() + "' and a.status != 'death' and b.bu_no in (select bu_No from dbo.Get_Now_BU_chooseAble('" + querySavedVo.getSite() + "', '" + querySavedVo.getUserName() + "'))").trim();
orderClause = orderClause.trim(); orderClause = orderClause.trim();
cutterNumber = cutterNumber == null ? "" : cutterNumber.trim(); cutterNumber = cutterNumber == null ? "" : cutterNumber.trim();
Map<String, String> params = new HashMap<>(); Map<String, String> params = new HashMap<>();

22
src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml

@ -537,7 +537,8 @@
a.customerRemark, a.customerRemark,
a.projectRemark, a.projectRemark,
b.project_id, b.project_id,
pcpi.customer_part_no
pcpi.customer_part_no,
a.direct_customer
from plm_technical_specification_sheet a from plm_technical_specification_sheet a
left join plm_project_info b on a.site = b.site and a.project_id = b.project_id left join plm_project_info b on a.site = b.site and a.project_id = b.project_id
left join view_Project_final_Part c on a.site = c.site and a.test_part_no = c.test_part_no and a.project_id = c.project_id left join view_Project_final_Part c on a.site = c.site and a.test_part_no = c.test_part_no and a.project_id = c.project_id
@ -558,7 +559,8 @@
customerRevNo=#{customerRevNo}, customerRevNo=#{customerRevNo},
materialNumber=#{materialNumber}, materialNumber=#{materialNumber},
customerRemark=#{customerRemark}, customerRemark=#{customerRemark},
projectRemark=#{projectRemark}
projectRemark=#{projectRemark},
direct_customer=#{directCustomer}
where site = #{site} where site = #{site}
and code_no = #{codeNo} and code_no = #{codeNo}
</update> </update>
@ -2505,10 +2507,10 @@
</if> </if>
<if test="testPartNo != null and testPartNo != ''"> <if test="testPartNo != null and testPartNo != ''">
AND ( AND (
a.test_part_no like #{testPartNo} or
b.final_part_no like #{testPartNo} or
a.relevance_part_no like #{testPartNo} or
pcpi.customer_part_no like #{testPartNo}
a.test_part_no like '%'+#{testPartNo}+'%' or
b.final_part_no like '%'+#{testPartNo}+'%' or
a.relevance_part_no like '%'+#{testPartNo}+'%' or
pcpi.customer_part_no like '%'+#{testPartNo}+'%'
) )
</if> </if>
<if test="customerDesc != null and customerDesc != ''"> <if test="customerDesc != null and customerDesc != ''">
@ -2578,10 +2580,10 @@
</if> </if>
<if test="testPartNo != null and testPartNo != ''"> <if test="testPartNo != null and testPartNo != ''">
AND ( AND (
a.test_part_no like #{testPartNo} or
b.final_part_no like #{testPartNo} or
a.relevance_part_no like #{testPartNo} or
pcpi.customer_part_no like #{testPartNo}
a.test_part_no like '%'+#{testPartNo}+'%' or
b.final_part_no like '%'+#{testPartNo}+'%' or
a.relevance_part_no like '%'+#{testPartNo}+'%' or
pcpi.customer_part_no like '%'+#{testPartNo}+'%'
) )
</if> </if>
<if test="customerDesc != null and customerDesc != ''"> <if test="customerDesc != null and customerDesc != ''">

Loading…
Cancel
Save