Przeglądaj źródła

修改问题类型状态属接口的属性参数

tags/v1.0.0^2
chengwang 1 rok temu
rodzic
commit
2bcb3f9ebb
4 zmienionych plików z 15 dodań i 15 usunięć
  1. +4
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionFileController.java
  2. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/IInspectionFileService.java
  3. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/InspectionFileServiceImpl.java
  4. +6
    -6
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/update/UpdateInspectionFileQuestionTypeService.java

+ 4
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionFileController.java Wyświetl plik

@@ -119,9 +119,9 @@ public class InspectionFileController {
/**
* 修改巡检任务问题类型
*/
@PutMapping("/edit/question/{id}/{questionName}")
public JsonResult editQuestionTyppe(@PathVariable("id") String id, @PathVariable("questionName") Integer questionName) {
log.info("进入修改问题类型接口, id={}, questionName={}", id, questionName);
return iInspectionFileService.editQuestionTyppe(id, questionName);
@PutMapping("/edit/question/{id}/{questionCode}")
public JsonResult editQuestionTyppe(@PathVariable("id") String id, @PathVariable("questionCode") String questionCode) {
log.info("进入修改问题类型接口, id={}, questionCode={}", id, questionCode);
return iInspectionFileService.editQuestionTyppe(id, questionCode);
}
}

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/IInspectionFileService.java Wyświetl plik

@@ -93,9 +93,9 @@ public interface IInspectionFileService {
* 修改巡检任务问题类型
*
* @param id
* @param questionName
* @param questionCode
*
* @return
*/
JsonResult editQuestionTyppe(String id, Integer questionName);
JsonResult editQuestionTyppe(String id, String questionCode);
}

+ 3
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/InspectionFileServiceImpl.java Wyświetl plik

@@ -414,12 +414,12 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
* 修改巡检任务问题类型
*
* @param id
* @param questionName
* @param questionCode
*
* @return
*/
@Override
public JsonResult editQuestionTyppe(String id, Integer questionName) {
return updateInspectionFileQuestionTypeService.update(id, questionName);
public JsonResult editQuestionTyppe(String id, String questionCode) {
return updateInspectionFileQuestionTypeService.update(id, questionCode);
}
}

+ 6
- 6
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/update/UpdateInspectionFileQuestionTypeService.java Wyświetl plik

@@ -37,10 +37,10 @@ public class UpdateInspectionFileQuestionTypeService {
*
* @return
*/
public JsonResult update(String id, Integer questionName) {
public JsonResult update(String id, String questionCode) {
log.info("进入修改任务问题类型业务接口");
String userId = CurrentUserUtil.getUserId();
JsonResult result = this.check(id, questionName);
JsonResult result = this.check(id, questionCode);
if (0 != result.getCode()) {
log.info("修改任务问题类型业务接口:校验失败:{}", result.getMsg());
return result;
@@ -63,15 +63,15 @@ public class UpdateInspectionFileQuestionTypeService {
* 检查参数
*
* @param id
* @param questionName
* @param questionCode
* @return
*/
private JsonResult check(String id, Integer questionName) {
private JsonResult check(String id, String questionCode) {
if (StringUtils.isEmpty(id)) {
return JsonResult.error(EditInspectionFileQuestionTypeCodeEnum.ID_IS_NULL.getCode(), EditInspectionFileQuestionTypeCodeEnum.ID_IS_NULL.getMsg());
}

if (ObjectUtil.isNull(questionName)) {
if (ObjectUtil.isNull(questionCode)) {
return JsonResult.error(EditInspectionFileQuestionTypeCodeEnum.QUESTION_NAME_IS_NULL.getCode(), EditInspectionFileQuestionTypeCodeEnum.QUESTION_NAME_IS_NULL.getMsg());
}

@@ -84,7 +84,7 @@ public class UpdateInspectionFileQuestionTypeService {
}

QuestionType questionType = questionTypeMapper.selectOne(Wrappers.<QuestionType>lambdaQuery()
.eq(QuestionType::getName, questionName)
.eq(QuestionType::getCode, questionCode)
.eq(QuestionType::getMark, 1));
if (ObjectUtil.isNull(questionType)) {
return JsonResult.error(EditInspectionFileQuestionTypeCodeEnum.QUESTION_TYPE_IS_NOT_EXIST.getCode(), EditInspectionFileQuestionTypeCodeEnum.QUESTION_TYPE_IS_NOT_EXIST.getMsg());

Ładowanie…
Anuluj
Zapisz