@@ -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); | |||
} | |||
} |
@@ -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); | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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()); |
@@ -42,7 +42,7 @@ | |||
left JOIN th_road rd ON sr.road_id=rd.id | |||
where sr.mark=1 and se.mark=1 and rd.mark=1 | |||
<if test="request.structureName !=null and request.structureName !=''"> and sr.`structure_name` like concat('%',#{request.structureName},'%') </if> | |||
<if test="request.tenantId != null and request.tenantId != ''"> and tenant_id = #{request.tenantId} </if> | |||
<if test="request.tenantId != null and request.tenantId != ''"> and sr.tenant_id = #{request.tenantId} </if> | |||
<if test="request.structureType !=null"> and sr.structure_type = #{request.structureType} </if> | |||
<if test="request.roadId !=null"> and sr.road_id = #{request.roadId} </if> | |||
ORDER BY |