4 changed files with 117 additions and 30 deletions
-
52src/main/java/com/spring/modules/part/task/InventoryPartTask.java
-
63src/main/java/com/spring/modules/part/task/PartCatalogTask.java
-
29src/main/java/com/spring/modules/part/task/PartRelatedTask.java
-
3src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml
@ -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(); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
@ -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()); |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue