Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 11 months ago
parent
commit
8a1a8f369c
  1. 2
      hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java
  2. 20
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/BasicScheduledTask.java
  3. 21
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/basic/IImsPresonManagementService.java
  4. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/basic/impl/CertificatetNoticeServiceImpl.java
  5. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/basic/impl/CertificatetServiceImpl.java
  6. 27
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/basic/impl/PresonManagementServiceImpl.java
  7. 0
      hzims-service/hzims-scheduled/src/main/resources/mapper/basic/CertificatetMapper.xml
  8. 0
      hzims-service/hzims-scheduled/src/main/resources/mapper/basic/CertificatetNoticeMapper.xml
  9. 0
      hzims-service/hzims-scheduled/src/main/resources/mapper/basic/PersonManagemetMapper.xml
  10. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java
  11. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

2
hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java

@ -37,6 +37,6 @@ public class VoteChartVo {
@ExcelIgnore
private List<Long> finishIds;
@ApiModelProperty(value = "完成率")
@ExcelProperty(value = "完成率", index = 3)
@ExcelProperty(value = "完成率", index = 4)
private Double finishRate;
}

20
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/basicScheduledTask.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/BasicScheduledTask.java

@ -13,19 +13,22 @@ import com.hnac.hzims.message.fegin.IMessageConfigClient;
import com.hnac.hzims.scheduled.mapper.basic.PersonManagemetMapper;
import com.hnac.hzims.scheduled.service.basic.IImsCertificatetNoticeService;
import com.hnac.hzims.scheduled.service.basic.IImsCertificatetService;
import com.hnac.hzims.scheduled.service.basic.IImsPresonManagementService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.junit.jupiter.api.Test;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User;
import org.springblade.system.user.feign.IUserClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.text.ParseException;
@ -33,7 +36,7 @@ import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import static com.hnac.hzims.operational.main.constant.MainConstants.*;
import static com.hnac.hzims.operational.main.constant.MainConstants.CERTIFICATET_DEAD_LINE_NOTICE;
/**
@ -43,7 +46,7 @@ import static com.hnac.hzims.operational.main.constant.MainConstants.*;
*/
@Slf4j
@Component
public class basicScheduledTask {
public class BasicScheduledTask {
@Autowired
private IImsCertificatetService iImsCertificatetService;
@ -56,7 +59,7 @@ public class basicScheduledTask {
@Autowired
private IMessageClient messageClient;
@Autowired
private PersonManagemetMapper personManagemetMapper;
private IImsPresonManagementService presonManagementService;
@Autowired
private IMessageConfigClient messageConfigClient;
@ -64,10 +67,12 @@ public class basicScheduledTask {
* realId刷新
*/
@XxlJob(CERTIFICATET_DEAD_LINE_NOTICE)
// @Scheduled(cron = "0 */1 * * * ? ")
// @Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> certificatetDeadLineNotice(String param) throws ParseException {
// public ReturnT<String> certificatetDeadLineNotice() throws ParseException {
// String param="";
Date endTime = new Date();
if (Func.isBlank(param)) {
if (StringUtils.isNotBlank(param)) {
endTime = new SimpleDateFormat("yyyy-MM-dd").parse(param);
}
CertificatetNoticeEntity noticeEntity = iImsCertificatetNoticeService.getOne(Wrappers.<CertificatetNoticeEntity>lambdaQuery()
@ -81,7 +86,7 @@ public class basicScheduledTask {
List<String> userList = Arrays.asList(noticeUsers.split(","));
if (CollectionUtil.isNotEmpty(userList) && CollectionUtil.isNotEmpty(list)) {
List<String> personIds = list.stream().map(CertificatetEntity::getPersonId).collect(Collectors.toList());
List<PersonManagemetEntity> personManagemetEntities = personManagemetMapper.selectList(Wrappers.<PersonManagemetEntity>query().lambda().in(PersonManagemetEntity::getId, personIds));
List<PersonManagemetEntity> personManagemetEntities = presonManagementService.list(Wrappers.<PersonManagemetEntity>query().lambda().in(PersonManagemetEntity::getId, personIds));
String personNotice="";
if (CollectionUtil.isNotEmpty(personManagemetEntities)) {
personNotice = personManagemetEntities.stream().map(PersonManagemetEntity::getName).collect(Collectors.joining(","));
@ -93,7 +98,6 @@ public class basicScheduledTask {
}
return new ReturnT<>("SUCCESS");
}
private void sendSmsByUserList(List<String> userList, Date date,String personNotice) {
//区分用户
for (String s : userList) {

21
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/basic/IImsPresonManagementService.java

@ -0,0 +1,21 @@
package com.hnac.hzims.scheduled.service.basic;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.basic.entity.PersonManagemetEntity;
import com.hnac.hzims.basic.vo.PersonManagemetExportVo;
import com.hnac.hzims.basic.vo.PersonManagemetVo;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import java.util.List;
/**
* 服务类
*
* @author Chill
*/
public interface IImsPresonManagementService extends IService<PersonManagemetEntity> {
}

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/basic/impl/CertificatetNoticeServiceImpl.java

@ -1,5 +1,6 @@
package com.hnac.hzims.scheduled.service.basic.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hnac.hzims.basic.entity.CertificatetNoticeEntity;
import com.hnac.hzims.scheduled.mapper.basic.CertificatetNoticeMapper;
import com.hnac.hzims.scheduled.service.basic.IImsCertificatetNoticeService;
@ -17,5 +18,6 @@ import org.springframework.stereotype.Service;
@Service
@Slf4j
@RequiredArgsConstructor
@DS("basic")
public class CertificatetNoticeServiceImpl extends BaseServiceImpl<CertificatetNoticeMapper, CertificatetNoticeEntity> implements IImsCertificatetNoticeService {
}

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/basic/impl/CertificatetServiceImpl.java

@ -1,5 +1,6 @@
package com.hnac.hzims.scheduled.service.basic.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hnac.hzims.basic.entity.CertificatetEntity;
import com.hnac.hzims.scheduled.mapper.basic.CertificatetMapper;
import com.hnac.hzims.scheduled.service.basic.IImsCertificatetService;
@ -17,5 +18,6 @@ import org.springframework.stereotype.Service;
@Service
@Slf4j
@RequiredArgsConstructor
@DS("basic")
public class CertificatetServiceImpl extends BaseServiceImpl<CertificatetMapper, CertificatetEntity> implements IImsCertificatetService {
}

27
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/basic/impl/PresonManagementServiceImpl.java

@ -0,0 +1,27 @@
package com.hnac.hzims.scheduled.service.basic.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hnac.hzims.basic.entity.PersonManagemetEntity;
import com.hnac.hzims.scheduled.mapper.basic.PersonManagemetMapper;
import com.hnac.hzims.scheduled.service.basic.IImsPresonManagementService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* 人员信息实现类
*
* @author ty
*/
@Service
@Slf4j
@RequiredArgsConstructor
@DS("basic")
public class PresonManagementServiceImpl extends BaseServiceImpl<PersonManagemetMapper, PersonManagemetEntity> implements IImsPresonManagementService {
}

0
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/basic/CertificatetMapper.xml → hzims-service/hzims-scheduled/src/main/resources/mapper/basic/CertificatetMapper.xml

0
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/basic/CertificatetNoticeMapper.xml → hzims-service/hzims-scheduled/src/main/resources/mapper/basic/CertificatetNoticeMapper.xml

0
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/basic/PersonManagemetMapper.xml → hzims-service/hzims-scheduled/src/main/resources/mapper/basic/PersonManagemetMapper.xml

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java

@ -1166,7 +1166,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, TaskEntity> imp
if (CollectionUtil.isEmpty(list)||CollectionUtil.isEmpty(undoneIds)){
voteChartVo.setFinishRate(0.00d);
}else {
BigDecimal divide = new BigDecimal(list.size()).divide(new BigDecimal(list.size()),2,BigDecimal.ROUND_UP);
BigDecimal divide = new BigDecimal(finishIds.size()).divide(new BigDecimal(list.size()),2,BigDecimal.ROUND_UP);
voteChartVo.setFinishRate(divide.doubleValue());
}
return voteChartVo;

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

@ -516,7 +516,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
contentService.saveOrUpdateBatch(workTicketContentDtoList);
}
WorkTicketFinish workTicketFinish = workTicketVo.getWorkTicketFinish();
if(CollectionUtil.isNotEmpty(workTicketContentDtoList)) {
if(ObjectUtil.isNotEmpty(workTicketFinish)) {
workTicketFinishService.saveOrUpdate(workTicketFinish);
}
// 推送消息

Loading…
Cancel
Save