|
|
|
|
@ -17,18 +17,11 @@ |
|
|
|
|
package org.springblade.file.service.impl; |
|
|
|
|
|
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
|
import org.springblade.file.entity.EquipVerification; |
|
|
|
|
import org.springblade.file.entity.EquipVerificationLog; |
|
|
|
|
import org.springblade.file.enums.EquipVerificationEnum; |
|
|
|
|
import org.springblade.file.mapper.EquipVerificationLogMapper; |
|
|
|
|
import org.springblade.file.mapper.EquipVerificationMapper; |
|
|
|
|
import org.springblade.file.service.IEquipVerificationLogService; |
|
|
|
|
import org.springblade.file.service.IEquipVerificationService; |
|
|
|
|
import org.springblade.file.vo.EquipVerificationVO; |
|
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
|
import org.springblade.system.user.feign.IUserClient; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
@ -38,8 +31,6 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
import java.time.LocalDate; |
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
import java.time.temporal.ChronoUnit; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Optional; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 仪器检定管理 服务实现类 |
|
|
|
|
@ -79,6 +70,7 @@ public class EquipVerificationLogServiceImpl extends BaseServiceImpl<EquipVerifi |
|
|
|
|
log.setVerificationUser(e.getVerificationUser()); |
|
|
|
|
User userR = userClient.userInfoById(e.getVerificationUser()).getData(); |
|
|
|
|
log.setVerificationUserName(userR.getName()); |
|
|
|
|
log.setManufacturerOrBrand(e.getManufacturerOrBrand()); |
|
|
|
|
|
|
|
|
|
//当前日期
|
|
|
|
|
LocalDate localDate = LocalDate.now(); |
|
|
|
|
@ -100,7 +92,7 @@ public class EquipVerificationLogServiceImpl extends BaseServiceImpl<EquipVerifi |
|
|
|
|
}else{ |
|
|
|
|
verificationDay = enableDate.plusDays(((between / e.getCycle())) * e.getCycle()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
e.setStatus(1); |
|
|
|
|
e.setLastVerificationTime(verificationDay.atTime(0, 0,0)); |
|
|
|
|
equipVerificationMapper.updateById(e); |
|
|
|
|
} |
|
|
|
|
|