|
|
@@ -971,10 +971,10 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
if (obj == null) {
|
|
|
return R.data(status);
|
|
|
}
|
|
|
- InformationQuery businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getContractId, obj.getContractId()).eq(InformationQuery::getType, 1).last("order by id desc limit 1"));
|
|
|
+ InformationQuery businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getContractId, obj.getContractId()).eq(InformationQuery::getType, 1).last("order by IF(`status` = 3,0,`status`) desc , id desc limit 1"));
|
|
|
if (businessData != null && businessData.getStatus() == 3) {
|
|
|
this.informationQueryService.createNewInformationQueriesByStatusForLock(Collections.singletonList(businessData.getId() + ""));
|
|
|
- InformationQuery businessData1 = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getContractId, obj.getContractId()).eq(InformationQuery::getType, 1).in(InformationQuery::getStatus, 0,1,2).last("order by id desc limit 1"));
|
|
|
+ InformationQuery businessData1 = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getContractId, obj.getContractId()).eq(InformationQuery::getType, 1).in(InformationQuery::getStatus, 0,1,2).last("order by `status` desc , id desc limit 1"));
|
|
|
if (businessData1 != null) {
|
|
|
businessData = businessData1;
|
|
|
}
|
|
|
@@ -1044,10 +1044,10 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
if (obj == null) {
|
|
|
return R.data(status);
|
|
|
}
|
|
|
- InformationQuery businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getContractId, obj.getContractId()).eq(InformationQuery::getType, 1).last("order by id desc limit 1"));
|
|
|
+ InformationQuery businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getContractId, obj.getContractId()).eq(InformationQuery::getType, 1).last("order by IF(`status` = 3,0,`status`) desc , id desc limit 1"));
|
|
|
if (businessData != null && businessData.getStatus() == 3) {
|
|
|
this.informationQueryService.createNewInformationQueriesByStatusForLock(Collections.singletonList(businessData.getId() + ""));
|
|
|
- InformationQuery businessData1 = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getContractId, obj.getContractId()).eq(InformationQuery::getType, 1).in(InformationQuery::getStatus, 0,1,2).last("order by id desc limit 1"));
|
|
|
+ InformationQuery businessData1 = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getContractId, obj.getContractId()).eq(InformationQuery::getType, 1).in(InformationQuery::getStatus, 0,1,2).last("order by `status` desc , id desc limit 1"));
|
|
|
if (businessData1 != null) {
|
|
|
businessData = businessData1;
|
|
|
}
|
|
|
@@ -1121,14 +1121,14 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
InformationQuery businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery()
|
|
|
.eq(InformationQuery::getId, id)
|
|
|
.eq(InformationQuery::getContractId, obj.getContractId())
|
|
|
- .eq(InformationQuery::getType, 3).last("order by id desc limit 1")
|
|
|
+ .eq(InformationQuery::getType, 3).last("order by IF(`status` = 3,0,`status`) desc , id desc limit 1")
|
|
|
);
|
|
|
if (businessData != null && businessData.getStatus() == 3) {
|
|
|
this.informationQueryService.createNewInformationQueriesByStatusForLock(Collections.singletonList(businessData.getId() + ""));
|
|
|
InformationQuery businessData1 = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery()
|
|
|
.eq(InformationQuery::getId, id)
|
|
|
.eq(InformationQuery::getContractId, obj.getContractId()).in(InformationQuery::getStatus, 0,1,2)
|
|
|
- .eq(InformationQuery::getType, 3).last("order by id desc limit 1")
|
|
|
+ .eq(InformationQuery::getType, 3).last("order by `status` desc , id desc limit 1")
|
|
|
);
|
|
|
if (businessData1 != null) {
|
|
|
businessData = businessData1;
|
|
|
@@ -1197,11 +1197,11 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
String status = "1";
|
|
|
//查询填报状态,type=2试验
|
|
|
InformationQuery businessData = this.informationQueryService.getBaseMapper().selectList(Wrappers.<InformationQuery>lambdaQuery()
|
|
|
- .eq(InformationQuery::getWbsId, id).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getType, 2).last("order by id desc limit 1")).stream().findAny().orElse(null);
|
|
|
+ .eq(InformationQuery::getWbsId, id).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getType, 2).last("order by IF(`status` = 3,0,`status`) desc , id desc limit 1")).stream().findAny().orElse(null);
|
|
|
if (businessData != null && businessData.getStatus() == 3) {
|
|
|
this.informationQueryService.createNewInformationQueriesByStatusForLock(Collections.singletonList(businessData.getId() + ""));
|
|
|
InformationQuery businessData1 = this.informationQueryService.getBaseMapper().selectList(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getStatus, 0, 1, 2)
|
|
|
- .eq(InformationQuery::getWbsId, id).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getType, 2).last("order by id desc limit 1")).stream().findAny().orElse(null);
|
|
|
+ .eq(InformationQuery::getWbsId, id).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getType, 2).last("order by `status` desc , id desc limit 1")).stream().findAny().orElse(null);
|
|
|
if (businessData1 != null) {
|
|
|
businessData = businessData1;
|
|
|
}
|
|
|
@@ -1835,6 +1835,7 @@ public R<Object> batchTask(@RequestBody StartTaskVO startTaskVO) {
|
|
|
if (query.getStatus() != null && query.getStatus() == 3) {
|
|
|
query.setId(SnowFlakeUtil.getId());
|
|
|
query.setStatus(0);
|
|
|
+ query.setCreateTime(new Date());
|
|
|
this.informationQueryService.save(query);
|
|
|
}
|
|
|
} else {
|