Browse Source

Merge branch 'sprint/S1' into develop

develop
郑贵龙 1 year ago
parent
commit
841bdf74a5
3 changed files with 12 additions and 3 deletions
  1. +5
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/CpsQuestionInfo.java
  2. +5
    -2
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/cps/CpsQuestionGetService.java
  3. +2
    -0
      doc/sql/app-20230630-ddl.sql

+ 5
- 1
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/CpsQuestionInfo.java View File

@ -73,5 +73,9 @@ public class CpsQuestionInfo extends BaseMgrEntity<CpsQuestionInfo> {
private Integer status5 = 1; private Integer status5 = 1;
@SerializedName(value = "status6") @SerializedName(value = "status6")
private Integer status6 = 1; private Integer status6 = 1;
@SerializedName(value = "measures_from")
private String measuresFrom;
@SerializedName(value = "accumulation_from")
private String accumulationFrom;
private String timestamp; private String timestamp;
}
}

+ 5
- 2
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/cps/CpsQuestionGetService.java View File

@ -16,6 +16,7 @@ import com.digiwin.athena.app.infra.service.CpsQuestionInfoService;
import com.digiwin.athena.opt.common.eai.EAIRequest; import com.digiwin.athena.opt.common.eai.EAIRequest;
import com.digiwin.athena.opt.common.eai.EAIUtil; import com.digiwin.athena.opt.common.eai.EAIUtil;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService; import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import com.digiwin.athena.opt.common.security.SecurityUtil;
import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity; import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -52,10 +53,12 @@ public class CpsQuestionGetService extends AbsEAIService {
String option = eaiRequest.getString("option"); String option = eaiRequest.getString("option");
Long tenantSid = SecurityUtil.getUserProfile().getTenantSid();
// 侦测 // 侦测
if (StringUtils.isBlank(option)) { if (StringUtils.isBlank(option)) {
List<CpsQuestionInfo> list = cpsQuestionInfoService.lambdaQuery().eq(CpsQuestionInfo::getStatus, 0).list();
List<CpsQuestionInfo> list = cpsQuestionInfoService.lambdaQuery().eq(CpsQuestionInfo::getStatus, 0).eq(CpsQuestionInfo::getTenantSid,tenantSid).list();
list.forEach(o -> { list.forEach(o -> {
o.setStatus(1); o.setStatus(1);
}); });
@ -71,7 +74,7 @@ public class CpsQuestionGetService extends AbsEAIService {
} }
List<Long> collectIds = questionInfo.stream().map(o -> MapUtils.getLong(o, "id")).collect(Collectors.toList()); List<Long> collectIds = questionInfo.stream().map(o -> MapUtils.getLong(o, "id")).collect(Collectors.toList());
LambdaQueryChainWrapper<CpsQuestionInfo> lambdaQuery = cpsQuestionInfoService.lambdaQuery().in(CpsQuestionInfo::getId, collectIds);
LambdaQueryChainWrapper<CpsQuestionInfo> lambdaQuery = cpsQuestionInfoService.lambdaQuery().eq(CpsQuestionInfo::getTenantSid,tenantSid).in(CpsQuestionInfo::getId, collectIds);
String status = eaiRequest.getString("status"); String status = eaiRequest.getString("status");


+ 2
- 0
doc/sql/app-20230630-ddl.sql View File

@ -19,6 +19,8 @@ CREATE TABLE `cps_question_info`
`completion_time` VARCHAR(520) NULL DEFAULT '' COLLATE 'utf8mb4_general_ci', `completion_time` VARCHAR(520) NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
`control_area` DATETIME NULL DEFAULT NULL, `control_area` DATETIME NULL DEFAULT NULL,
`knowledge_accumulation` VARCHAR(520) NULL DEFAULT '' COLLATE 'utf8mb4_general_ci', `knowledge_accumulation` VARCHAR(520) NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
`measures_from` VARCHAR(520) NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
`accumulation_from` VARCHAR(520) NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
`status` INT(2) NULL DEFAULT '0' COMMENT '状态', `status` INT(2) NULL DEFAULT '0' COMMENT '状态',
`status1` INT(2) NULL DEFAULT '0' COMMENT '状态1', `status1` INT(2) NULL DEFAULT '0' COMMENT '状态1',
`status2` INT(2) NULL DEFAULT '0' COMMENT '状态2', `status2` INT(2) NULL DEFAULT '0' COMMENT '状态2',


Loading…
Cancel
Save