diff --git a/src/main/java/com/spring/modules/part/task/InventoryPartTask.java b/src/main/java/com/spring/modules/part/task/InventoryPartTask.java new file mode 100644 index 00000000..9b22f2d8 --- /dev/null +++ b/src/main/java/com/spring/modules/part/task/InventoryPartTask.java @@ -0,0 +1,52 @@ +package com.spring.modules.part.task; + +import com.spring.common.utils.DateUtils; +import com.spring.modules.base.vo.PersonnelLevelVo; +import com.spring.modules.base.vo.WorkCenterCostVo; +import com.spring.modules.part.service.PartInformationService; +import com.spring.modules.part.service.PartService; +import com.spring.modules.part.service.RoutingManagementService; +import com.spring.modules.part.vo.LocationInformationVo; +import com.spring.modules.part.vo.WorkCenterVo; +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +@Component +@Configuration +@EnableScheduling +@Slf4j +public class InventoryPartTask { + + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private PartInformationService partInformationService; + + @Scheduled(cron = "${task.data.syncInventoryPartToPlm}") + public void syncInventoryPartToPlm() { + // 同步库存件 + partInformationService.syncInventoryPartToPlm(); + } +} + + + + + + + + + + + + + + + diff --git a/src/main/java/com/spring/modules/part/task/PartCatalogTask.java b/src/main/java/com/spring/modules/part/task/PartCatalogTask.java new file mode 100644 index 00000000..3f1189b2 --- /dev/null +++ b/src/main/java/com/spring/modules/part/task/PartCatalogTask.java @@ -0,0 +1,63 @@ +package com.spring.modules.part.task; + +import com.spring.common.utils.DateUtils; +import com.spring.modules.base.vo.PersonnelLevelVo; +import com.spring.modules.base.vo.WorkCenterCostVo; +import com.spring.modules.part.service.PartInformationService; +import com.spring.modules.part.service.PartService; +import com.spring.modules.part.service.RoutingManagementService; +import com.spring.modules.part.vo.LocationInformationVo; +import com.spring.modules.part.vo.WorkCenterVo; +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +@Component +@Configuration +@EnableScheduling +@Slf4j +public class PartCatalogTask { + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private PartService partService; + + /** + * @description: 刷新物料件的方法 + * @author LR + * @date 2024/9/23 10:15 + * @version 1.0 + */ + @Scheduled(cron = "${task.data.sync_part_catalog_to_plm}") + public void syncPartCatalogToPlm(){ + try { + //获取处理的文件数 + logger.info("同步物料件的操作 的开始时间:"+ DateUtils.getStringNow()); + partService.syncPartCatalogToPlm(); + logger.info("同步物料件的操作 的结束时间:"+DateUtils.getStringNow()); + } catch (Exception e) { + logger.error("异常时间:"+DateUtils.getStringNow()+",同步物料件的操作 ,错误信息为:"+e.getMessage()); + } + } +} + + + + + + + + + + + + + + + diff --git a/src/main/java/com/spring/modules/part/task/PartRelatedTask.java b/src/main/java/com/spring/modules/part/task/PartRelatedTask.java index 454caa37..4eddc6fd 100644 --- a/src/main/java/com/spring/modules/part/task/PartRelatedTask.java +++ b/src/main/java/com/spring/modules/part/task/PartRelatedTask.java @@ -31,10 +31,6 @@ public class PartRelatedTask { @Autowired private RoutingManagementService routingManagementService; - @Autowired - private PartService partService; - @Autowired - private PartInformationService partInformationService; @Scheduled(cron = "${task.data.syncDataToPLM}") public void executeDeviceCollect() { @@ -83,31 +79,6 @@ public class PartRelatedTask { routingManagementService.syncLocationToPLM(locationVo); } - @Scheduled(cron = "${task.data.syncInventoryPartToPlm}") - public void syncInventoryPartToPlm() { - // 同步库存件 - partInformationService.syncInventoryPartToPlm(); - } - - - /** - * @description: 刷新物料件的方法 - * @author LR - * @date 2024/9/23 10:15 - * @version 1.0 - */ - @Scheduled(cron = "${task.data.sync_part_catalog_to_plm}") - public void syncPartCatalogToPlm(){ - try { - //获取处理的文件数 - logger.info("同步物料件的操作 的开始时间:"+ DateUtils.getStringNow()); - partService.syncPartCatalogToPlm(); - logger.info("同步物料件的操作 的结束时间:"+DateUtils.getStringNow()); - } catch (Exception e) { - logger.error("异常时间:"+DateUtils.getStringNow()+",同步物料件的操作 ,错误信息为:"+e.getMessage()); - } - } - public static String convertToSQLString(String input) { if (input == null || input.isEmpty()) { return "()"; diff --git a/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml b/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml index 40b306b0..f77bd71a 100644 --- a/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml +++ b/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml @@ -3284,7 +3284,8 @@ a.resource_no, a.speed, a.show_order, - a.operation_no + a.operation_no, + a.remark from plm_bm_silkScreenColor as a left join part as p on a.site = p.site and a.inkCode = p.part_no where a.site = #{site} and a.codeNo = #{codeNo} and a.operation_no = #{operationNo}