Browse Source

2024-08-16 ifs接口更新

master
fengyuan_yang 1 year ago
parent
commit
c18e3a1f44
  1. 6
      src/main/java/com/spring/modules/part/mapper/RoutingManagementMapper.java
  2. 9
      src/main/java/com/spring/modules/part/service/impl/RoutingManagementServiceImpl.java
  3. 18
      src/main/resources/mapper/part/RoutingManagementMapper.xml

6
src/main/java/com/spring/modules/part/mapper/RoutingManagementMapper.java

@ -180,4 +180,10 @@ public interface RoutingManagementMapper extends BaseMapper<RoutingHeaderEntity>
void syncUpdateWorkCenter(List<WorkCenter> toUpdate); void syncUpdateWorkCenter(List<WorkCenter> toUpdate);
RoutingComponentEntity getRoutingComponentRowKeyAndVersion(@Param("operationId") Integer operationId); RoutingComponentEntity getRoutingComponentRowKeyAndVersion(@Param("operationId") Integer operationId);
String getMaxLocationRowVersion();
String getMaxLaborClassRowVersion();
String getMaxWorkCenterRowVersion();
} }

9
src/main/java/com/spring/modules/part/service/impl/RoutingManagementServiceImpl.java

@ -1298,6 +1298,9 @@ public class RoutingManagementServiceImpl extends ServiceImpl<RoutingManagementM
@Override @Override
@Transactional @Transactional
public void syncLocationToPLM(LocationInformationVo data) { public void syncLocationToPLM(LocationInformationVo data) {
// 查出最大的 rowVersion
String rowVersion = routingManagementMapper.getMaxLocationRowVersion();
data.setIfsRowVersion(rowVersion);
// 调用接口获得IFS数据 // 调用接口获得IFS数据
String getIfsLocationsURL = apiUrl + "/base/ifs/getIfsLocations"; String getIfsLocationsURL = apiUrl + "/base/ifs/getIfsLocations";
ResponseData getIfsLocationsResponse = HttpClientUtil.doPostByRawWithPLM(getIfsLocationsURL, data); ResponseData getIfsLocationsResponse = HttpClientUtil.doPostByRawWithPLM(getIfsLocationsURL, data);
@ -1364,6 +1367,9 @@ public class RoutingManagementServiceImpl extends ServiceImpl<RoutingManagementM
@Override @Override
@Transactional @Transactional
public void syncLaborClassToPLM(PersonnelLevelVo data) { public void syncLaborClassToPLM(PersonnelLevelVo data) {
// 查出最大的 rowVersion
String rowVersion = routingManagementMapper.getMaxLaborClassRowVersion();
data.setIfsRowVersion(rowVersion);
// 调用接口获得IFS数据 // 调用接口获得IFS数据
String getIfsLaborClasssURL = apiUrl + "/base/ifs/getIfsLaborClasss"; String getIfsLaborClasssURL = apiUrl + "/base/ifs/getIfsLaborClasss";
ResponseData getIfsLaborClasssResponse = HttpClientUtil.doPostByRawWithPLM(getIfsLaborClasssURL, data); ResponseData getIfsLaborClasssResponse = HttpClientUtil.doPostByRawWithPLM(getIfsLaborClasssURL, data);
@ -1430,6 +1436,9 @@ public class RoutingManagementServiceImpl extends ServiceImpl<RoutingManagementM
@Override @Override
@Transactional @Transactional
public void syncWorkCenterToPLM(WorkCenterVo data) { public void syncWorkCenterToPLM(WorkCenterVo data) {
// 查出最大的 rowVersion
String rowVersion = routingManagementMapper.getMaxWorkCenterRowVersion();
data.setIfsRowVersion(rowVersion);
// 调用接口获得IFS数据 // 调用接口获得IFS数据
String getIfsWorkCentersURL = apiUrl + "/base/ifs/getIfsWorkCenterNos"; String getIfsWorkCentersURL = apiUrl + "/base/ifs/getIfsWorkCenterNos";
ResponseData getIfsWorkCentersResponse = HttpClientUtil.doPostByRawWithPLM(getIfsWorkCentersURL, data); ResponseData getIfsWorkCentersResponse = HttpClientUtil.doPostByRawWithPLM(getIfsWorkCentersURL, data);

18
src/main/resources/mapper/part/RoutingManagementMapper.xml

@ -1273,4 +1273,22 @@
from plm_routing_component from plm_routing_component
where operation_id = #{operationId} where operation_id = #{operationId}
</select> </select>
<select id="getMaxLocationRowVersion" resultType="java.lang.String">
select
isnull(max(ifs_row_version),'')
from location
</select>
<select id="getMaxLaborClassRowVersion" resultType="java.lang.String">
select
isnull(max(ifs_row_version),'')
from labor_class
</select>
<select id="getMaxWorkCenterRowVersion" resultType="java.lang.String">
select
isnull(max(ifs_row_version),'')
from work_center
</select>
</mapper> </mapper>
Loading…
Cancel
Save