提交 b19c0d14 authored 作者: zjm's avatar zjm

合并分支 'bug' 到 'master'

Bug to master 查看合并请求 !30
......@@ -673,8 +673,6 @@ public class DeviceCheckController {
if (!situation.contains("完成")) {
checkResult = "无";
} else if (areaType == 1) {
checkResult = "无误";
} else if (comSituation == 10) {
// 再判断一下 是2级结构(检查统计)还是3级结构(核查统计)
Integer rootId = taskService.findByTaskId(task.getParentTaskId()).getParentTaskId();
......@@ -942,7 +940,11 @@ public class DeviceCheckController {
Integer initStatusId = 0;
// level = 1 或者2 市省级 否则 就是区级 ,市省级的自查初始状态160,区级的自查初始状态140
if (unit.getLevel() == 1 || unit.getLevel() == 2) {
// type = 2 160 ,tpye = 1 && level = 1 || level = 2 160
boolean directProv = unit.getType() == 2;
boolean normalProv = unit.getType() == 1 && (unit.getLevel() == 1 || unit.getLevel() == 2);
if (directProv || normalProv) {
fatherId = cityExamIdMap.get(unit.getUnitId());
initStatusId = CHECK_DETAIL_CITY_0.id;
if (fatherId == null) {
......@@ -970,9 +972,12 @@ public class DeviceCheckController {
// 3-2 构建被查单位的 自查任务 (根据被查单位的级别来区分是县级状态是市级状态) 这里的父级任务应该是省统计
//处理ownUnit的代码 - 用于处理没有账号的单位的可见性
//处理ownUnit的代码 - 如果省直属有账号发给省直属的,没有账号就发给省做 用于处理没有账号的单位的可见性
Integer ownUnitId = 0;
if (unit.getType() == 2) {
List<User> userList = userService.findAllByUnite(unit.getUnitId());
boolean notHasAccount = userList.size() == 0;
if (unit.getType() == 2 && notHasAccount) {
ownUnitId = 1;
} else {
ownUnitId = unit.getUnitId();
......@@ -1554,8 +1559,12 @@ public class DeviceCheckController {
// 老的stat要去除掉对应areaName的数据
removeDetailFromDcs(detail, dcs);
//4.父级任务变为进行中
fatherTask.setBillStatus(CHECK_EXAM_STAT_1.id);
//4.父级任务变为进行中 如果父级是核查,变成111,如果父级是检查,变成131
if (fatherTask.getCustomInfo().contains("exam")){
fatherTask.setBillStatus(CHECK_EXAM_STAT_1.id);
}else if (fatherTask.getCustomInfo().contains("check")){
fatherTask.setBillStatus(CHECK_STAT_1.id);
}
taskRepo.save(fatherTask.toDo());
return ResponseEntity.ok(new ResultObj<>("回退操作成功!"));
......@@ -1573,6 +1582,7 @@ public class DeviceCheckController {
DeviceCheckDetail detail = detailRepo.findById(id).get();
String updatedString = changeHunds(detail.getCheckDetail(), 2);
detail.setCheckDetail(updatedString);
detail.setUserCId(authenticationUtils.getAuthentication().getCurrentUserInfo().getUserId());
log.info("[核查模块] 审核通过 - 更新后的detailString形如 {}", updatedString.split(",")[0]);
detailRepo.save(detail);
......
package com.tykj.dev.device.library.task;
import com.tykj.dev.device.library.service.DeviceLibraryCacheService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
/**
* @author zjm
* @version 1.0.0
* @ClassName TrainTask.java
* @Description 培训定时任务 主要是 判断报名截止以及培训开始、培训结束
* @createTime 2020年08月17日 23:20:00
*/
@Service
@Slf4j
public class DevideTask {
@Autowired
DeviceLibraryCacheService deviceLibraryCacheService;
@Scheduled(cron = "30 * * * * ? ")
private void signUpDeadline() {
log.info("定时device更新缓存开始");
deviceLibraryCacheService.getAllDeviceLibraryList();
log.info("定时device更新缓存结束");
}
}
......@@ -19,8 +19,13 @@ import com.tykj.dev.device.task.utils.TaskUtils;
import com.tykj.dev.device.user.cache.UserCache;
import com.tykj.dev.device.user.read.service.MessageService;
import com.tykj.dev.device.user.read.subject.bto.MessageBto;
import com.tykj.dev.device.user.subject.dao.UnitsDao;
import com.tykj.dev.device.user.subject.entity.Units;
import com.tykj.dev.device.user.subject.entity.User;
import com.tykj.dev.device.user.subject.service.AreaService;
import com.tykj.dev.device.user.subject.service.UnitsService;
import com.tykj.dev.device.user.subject.service.UserPublicService;
import com.tykj.dev.device.user.subject.service.UserService;
import com.tykj.dev.device.user.util.UserUtils;
import com.tykj.dev.misc.base.BusinessEnum;
import com.tykj.dev.misc.base.CustomOrder;
......@@ -76,6 +81,15 @@ public class TaskServiceImpl implements TaskService {
@Autowired
private MessageService messageService;
@Autowired
AreaService areaService;
@Autowired
UserService userService;
@Autowired
UnitsDao unitsDao;
@Override
public Task deleteById(Task task) {
......@@ -628,6 +642,16 @@ public class TaskServiceImpl implements TaskService {
.filter(taskUserVo -> !Collections.disjoint(idLists, taskUserVo.getInvolveUserIdList())||(taskUserVo.getCreateUserId()!=null&&idLists.contains(taskUserVo.getCreateUserId())))
.collect(Collectors.toList());
}
if (taskSelectVo.getAreaId()!=null){
List<Integer> ids = areaService.findIdQuerySubordinateIds(taskSelectVo.getAreaId());
List<Integer> unitIds = unitsDao.findAllByAreaIdIn(ids).stream().map(Units::getUnitId).collect(Collectors.toList());
List<Integer> userIDs= userService.findUnitsIdInUsers(unitIds).stream().map(User::getUserId).collect(Collectors.toList());
taskUserVos=taskUserVos.stream().filter(taskUserVo -> userIDs.contains(taskUserVo.getCreateUserId())).collect(Collectors.toList());
}else {
List<Integer> userIDs= userService.findAllByUnite(taskSelectVo.getUnitId()).stream().map(User::getUserId).collect(Collectors.toList());
taskUserVos=taskUserVos.stream().filter(taskUserVo -> userIDs.contains(taskUserVo.getCreateUserId())).collect(Collectors.toList());
}
taskUserVos = taskUserVos.stream()
.filter(taskUserVo -> !businesses.contains(taskUserVo.getBusinessType()) || (taskUserVo.getParentTaskId() == null || taskUserVo.getParentTaskId() == 0))
.filter(taskUserVo -> !taskUserVo.getBillStatus().equals(StatusEnum.REVOKEALLOTTASK.id))
......@@ -1256,7 +1280,7 @@ public class TaskServiceImpl implements TaskService {
if (taskSelectVo.getSelectNum() == 3) {
//所有涉及人员所在单位包含当前用户所在单位且指针对应UserId不是当前用户
// List<Integer> status = Arrays.asList(201,333,810,322,722,788,1250,2223,8110,888,140,130,141,111,1002,150);
List<Integer> status = Arrays.asList(201,333,810,322,722,788,1250,2223,8110,888,140,130,141,111,1002,150,101,142,160,161);
List<Integer> status = Arrays.asList(201,333,810,322,722,788,1250,2223,8110,888,140,130,141,111,1002,150,101,142,160,161,1009);
List<TaskBto> taskBtoList = taskBtos.stream()
.filter(taskBto -> {
// boolean unitExists = getUnitsByUsers(taskBto.getInvolveUserIdList()).contains(unitId);
......
......@@ -3,6 +3,7 @@ package com.tykj.dev.device.task.subject.vo;
import com.tykj.dev.misc.base.CustomPage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import java.util.Date;
......@@ -14,20 +15,28 @@ import java.util.List;
@Data
@ApiModel("待办任务查询类")
public class TaskSelectVo extends CustomPage {
@ApiModelProperty(value = "模糊查询关键字", example = "测试")
public String content;
@ApiModelProperty(value = "发起时间", example = "2020-10-10 01:10:10")
public Date startTime;
@ApiModelProperty(value = "结束时间", example = "2020-10-10 01:10:10")
public Date endTime;
@ApiModelProperty(value = "查询方式(0:全部业务,1:我的发起,2:待办业务,3:业务跟踪,4:办结任务,5:封存业务)", example = "0")
private Integer selectNum;
@ApiModelProperty(value = "业务类型id", example = "1")
private List<Integer> businessType;
@ApiModelProperty(value = "待办类型(1:省内待办,2:省外待办)", example = "1")
private Integer type;
@ApiModelProperty(value = "业务状态", example = "1")
private Integer billStatus;
@ApiModelProperty(value = "业务备注", example = "测试")
public List<String> remark;
......@@ -43,4 +52,10 @@ public class TaskSelectVo extends CustomPage {
@ApiModelProperty(value = "待办人模糊查询字段")
private String processingUserDim;
@ApiModelProperty(value = "区域id")
private Integer areaId;
@ApiModelProperty(value = "单位id")
private Integer unitId;
}
......@@ -346,7 +346,10 @@ public class TrainThemeServiceImpl implements TrainThemeService {
predicateBuilder.gt("createTime", conditionsTrainVo.getStartTime());
predicateBuilder.lt("createTime", conditionsTrainVo.getEndTime());
}
predicateBuilder.eq("unitsId",conditionsTrainVo.getUnitId());
Units units= unitsCache.findById(conditionsTrainVo.getUnitId());
if (units.getLevel()!=1){
predicateBuilder.eq("unitsId",conditionsTrainVo.getUnitId());
}
if (conditionsTrainVo.getDimName() != null) {
Class<TrainTheme> trainThemeClass = TrainTheme.class;
Field[] declaredFields = trainThemeClass.getDeclaredFields();
......
......@@ -392,7 +392,7 @@
</div>
<p class="person" style="margin-top: 10px;font-size: 15px;width: 100%;text-align: left;">
<span style="width: 200px;text-align: center;width: 24%;margin: 0;">制表单位:${unit!}</span>
<span style="width: 200px;text-align: center;width: 24%;margin: 0;">制表时间:${time!}</span>
<span style="width: 200px;text-align: center;width: 24%;margin: 0;">制表时间:</span>
<span style="width: 200px;text-align: center;width: 24%;margin: 0;">经办人:</span>
<span style="width: 200px;text-align: center;width: 24%;margin: 0;">审核人:</span>
......
......@@ -498,7 +498,7 @@
</div>
<p class="person" style="margin-top: 20px;font-size: 10px;width: 100%;text-align: left;">
<span style="width: 200px;text-align: center;width: 49%;margin: 0;">制表单位:${unit!}</span>
<span style="width: 200px;text-align: center;width: 49%;margin: 0;">制表时间:${time!}</span>
<span style="width: 200px;text-align: center;width: 49%;margin: 0;">制表时间:</span>
<!--<span style="width: 200px;text-align: center;width: 24%;margin: 0;">经办人:</span>-->
<!--<span style="width: 200px;text-align: center;width: 24%;margin: 0;">审核人:</span>-->
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论