|
@@ -8,6 +8,7 @@ import org.springframework.beans.propertyeditors.CustomBooleanEditor;
|
|
import org.springframework.web.bind.WebDataBinder;
|
|
import org.springframework.web.bind.WebDataBinder;
|
|
import org.springframework.web.bind.annotation.InitBinder;
|
|
import org.springframework.web.bind.annotation.InitBinder;
|
|
|
|
|
|
|
|
+import cn.com.qmth.stmms.common.enums.CheckType;
|
|
import cn.com.qmth.stmms.common.enums.ExamSubjectStatus;
|
|
import cn.com.qmth.stmms.common.enums.ExamSubjectStatus;
|
|
import cn.com.qmth.stmms.common.enums.MarkMode;
|
|
import cn.com.qmth.stmms.common.enums.MarkMode;
|
|
import cn.com.qmth.stmms.common.enums.ScanCheck;
|
|
import cn.com.qmth.stmms.common.enums.ScanCheck;
|
|
@@ -92,6 +93,18 @@ public abstract class BaseController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ //CheckType 类型转换
|
|
|
|
+ binder.registerCustomEditor(CheckType.class, new PropertyEditorSupport() {
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setAsText(String text) {
|
|
|
|
+ try {
|
|
|
|
+ setValue(CheckType.findByValue(Integer.valueOf(text)));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ setValue(null);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
binder.registerCustomEditor(Boolean.class, new CustomBooleanEditor(true));
|
|
binder.registerCustomEditor(Boolean.class, new CustomBooleanEditor(true));
|
|
}
|
|
}
|