|
|
@ -20,6 +20,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.jeecg.modules.demo.basicsskill.entity.Basicsskill; |
|
|
|
|
|
|
|
import org.jeecg.modules.demo.basicsskill.service.IBasicsskillService; |
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil; |
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil; |
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
|
|
|
import org.jeecgframework.poi.excel.entity.ExportParams; |
|
|
|
import org.jeecgframework.poi.excel.entity.ExportParams; |
|
|
@ -50,6 +52,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
|
public class AlitygroupController extends JeecgController<Alitygroup, IAlitygroupService> { |
|
|
|
public class AlitygroupController extends JeecgController<Alitygroup, IAlitygroupService> { |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private IAlitygroupService alitygroupService; |
|
|
|
private IAlitygroupService alitygroupService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private IBasicsskillService basicsskillService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 分页列表查询 |
|
|
|
* 分页列表查询 |
|
|
@ -97,8 +101,24 @@ public class AlitygroupController extends JeecgController<Alitygroup, IAlitygrou |
|
|
|
@ApiOperation(value="能力分组-编辑", notes="能力分组-编辑") |
|
|
|
@ApiOperation(value="能力分组-编辑", notes="能力分组-编辑") |
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
|
|
|
public Result<String> edit(@RequestBody Alitygroup alitygroup) { |
|
|
|
public Result<String> edit(@RequestBody Alitygroup alitygroup) { |
|
|
|
|
|
|
|
if(alitygroup.getIsopen().equals("Y")) { |
|
|
|
|
|
|
|
alitygroupService.updateById(alitygroup); |
|
|
|
|
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
|
|
|
|
} else if (alitygroup.getIsopen().equals("N")){ |
|
|
|
|
|
|
|
// 使用逗号分割字符串
|
|
|
|
|
|
|
|
String[] numberArray = alitygroup.getAlityid().split(","); |
|
|
|
|
|
|
|
List<String> numberList = Arrays.asList(numberArray); |
|
|
|
|
|
|
|
List<Basicsskill> basicsskillList = basicsskillService.query().in("id",numberList).list(); |
|
|
|
|
|
|
|
for (Basicsskill skill : basicsskillList) { |
|
|
|
|
|
|
|
skill.setStartstop("N"); |
|
|
|
|
|
|
|
basicsskillService.updateById(skill); |
|
|
|
|
|
|
|
} |
|
|
|
alitygroupService.updateById(alitygroup); |
|
|
|
alitygroupService.updateById(alitygroup); |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
return Result.OK("编辑失败!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|