Browse Source

2024-10-31

优化
master
fengyuan_yang 2 years ago
parent
commit
c864cca191
  1. 2
      src/main/java/com/spring/modules/change/entity/TechnicalSpecificationData.java
  2. 1
      src/main/java/com/spring/modules/change/vo/ChangeRequestDetailVo.java
  3. 2
      src/main/java/com/spring/modules/part/mapper/PartInformationMapper.java
  4. 20
      src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java
  5. 14
      src/main/resources/mapper/change/ChangeManagementMapper.xml
  6. 5
      src/main/resources/mapper/part/PartInformationMapper.xml

2
src/main/java/com/spring/modules/change/entity/TechnicalSpecificationData.java

@ -58,4 +58,6 @@ public class TechnicalSpecificationData extends QueryPage {
* ECN地址
*/
private String ecnAddress;
private String oriCodeNo;
}

1
src/main/java/com/spring/modules/change/vo/ChangeRequestDetailVo.java

@ -9,4 +9,5 @@ import java.util.List;
@Data
public class ChangeRequestDetailVo extends ChangeRequestDetailEntity {
private String oriCodeNo;
}

2
src/main/java/com/spring/modules/part/mapper/PartInformationMapper.java

@ -267,4 +267,6 @@ public interface PartInformationMapper extends BaseMapper<PartInformationEntity>
TblBaseDataEntity getTblBaseData(@Param("firstType") String partCatalog);
List<PartIfsCatalogProperty> getMasterPartPropertyList(@Param("partNo") String partNo, @Param("codeNo") String codeNo, @Param("recordType") String ip);
String getNextPartNo2(PartInformationVo data);
}

20
src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java

@ -2384,14 +2384,18 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
*/
@Override
public String getNextPartNo(PartInformationVo data) {
Integer no = partInformationMapper.getNextPartNo(data);
// 如果是 null则默认为 1否则递增
no = (no == null ? 1 : no + 1);
// 使用 String.format 自动填充前导零
String formattedNo = String.format("%05d", no);
return data.getIfsPartNo() + formattedNo;
// Integer no = partInformationMapper.getNextPartNo(data);
//
// // 如果是 null则默认为 1否则递增
// no = (no == null ? 1 : no + 1);
//
// // 使用 String.format 自动填充前导零
// String formattedNo = String.format("%05d", no);
//
// return data.getIfsPartNo() + formattedNo;
String nextPartNo = partInformationMapper.getNextPartNo2(data);
return nextPartNo;
}
/**

14
src/main/resources/mapper/change/ChangeManagementMapper.xml

@ -14,6 +14,7 @@
c.customer_id,
j.customer_desc,
a.code_no,
a.ori_code_no,
a.rev_no,
case when a.ECN_flag = 'Y' then '变更中' else '未发起' end as ecnFlag,
a.ECN_no,
@ -45,8 +46,8 @@
<if test = "query.projectDesc != null and query.projectDesc != ''">
AND c.project_name like #{query.projectDesc}
</if>
<if test = "query.codeNo != null and query.codeNo != ''">
AND a.code_no like #{query.codeNo}
<if test = "query.oriCodeNo != null and query.oriCodeNo != ''">
AND a.ori_code_no like #{query.oriCodeNo}
</if>
</where>
</select>
@ -63,6 +64,7 @@
c.customer_id,
j.customer_desc,
a.code_no,
a.ori_code_no,
a.rev_no,
case when a.ECN_flag = 'Y' then '变更中' else '未发起' end as ecnFlag,
a.ECN_no,
@ -94,8 +96,8 @@
<if test = "projectDesc != null and projectDesc != ''">
AND c.project_name like #{projectDesc}
</if>
<if test = "codeNo != null and codeNo != ''">
AND a.code_no like #{codeNo}
<if test = "oriCodeNo != null and oriCodeNo != ''">
AND a.ori_code_no like #{oriCodeNo}
</if>
</where>
</select>
@ -235,8 +237,10 @@
a.create_date,
a.create_by,
a.update_date,
a.update_by
a.update_by,
b.ori_code_no
FROM plm_change_request_detail a
left join plm_technical_specification_sheet as b on a.site = b.site and a.code_no = b.code_no
where a.site = #{site} and a.change_no = #{changeNo}
</select>

5
src/main/resources/mapper/part/PartInformationMapper.xml

@ -1721,6 +1721,11 @@
where part_no like #{ifsPartNo} + '%' and len(part_no) = 8
</select>
<!-- 下一个物料编码 -->
<select id="getNextPartNo2" resultType="string" parameterType="com.spring.modules.part.vo.PartInformationVo">
select dbo.get_next_part_code(#{ifsPartNo})
</select>
<select id="checkPartLocationType" resultType="com.spring.modules.part.vo.LocationInformationVo" parameterType="com.spring.modules.part.vo.LocationInformationVo">
SELECT
a.site,

Loading…
Cancel
Save