* @return
*/
@RequestMapping(params = "checkType")
@ResponseBody
public ValidForm checkType(HttpServletRequest request) {
ValidForm v = new ValidForm();
String typecode=oConvertUtils.getString(request.getParameter("param"));
String code=oConvertUtils.getString(request.getParameter("code"));
String typeGroupCode=oConvertUtils.getString(request.getParameter("typeGroupCode"));
StringBuilder hql = new StringBuilder("FROM ").append(TSType.class.getName()).append(" AS entity WHERE 1=1 ");
hql.append(" AND entity.TSTypegroup.typegroupcode = '").append(typeGroupCode).append("'");
hql.append(" AND entity.typecode = '").append(typecode).append("'");
List<Object> types = this.systemService.findByQueryString(hql.toString());
if(types.size()>0&&!code.equals(typecode))
{
v.setInfo("类型已存在");
v.setStatus("n");
}
return v;
}