|
|
@ -15,11 +15,9 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; |
|
|
|
|
|
|
|
import com.epmet.plugin.power.dto.axis.PowerAxisStructDTO; |
|
|
|
import com.epmet.plugin.power.dto.axis.form.PowerAxisStructLeaderFormDTO; |
|
|
|
import com.epmet.plugin.power.dto.axis.result.PowerAxisStructLeaderResultDTO; |
|
|
|
import com.epmet.plugin.power.dto.axis.result.*; |
|
|
|
import com.epmet.plugin.power.dto.axis.form.PowerAxisStructAddFormDTO; |
|
|
|
import com.epmet.plugin.power.dto.axis.form.PowerAxisStructFormDTO; |
|
|
|
import com.epmet.plugin.power.dto.axis.result.PowerAxisStructListResultDTO; |
|
|
|
import com.epmet.plugin.power.dto.axis.result.PowerAxisStructResultDTO; |
|
|
|
import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity; |
|
|
|
import com.epmet.plugin.power.modules.axis.excel.PowerAxisStructExcel; |
|
|
|
import com.epmet.plugin.power.modules.axis.service.PowerAxisStructService; |
|
|
@ -122,10 +120,63 @@ public class PowerAxisStructController { |
|
|
|
* 添加组织 |
|
|
|
*/ |
|
|
|
@PostMapping("/addOrg") |
|
|
|
public Result addOrg(@RequestBody PowerAxisStructAddFormDTO form){ |
|
|
|
public Result addOrg(@RequestBody PowerAxisStructEntity form){ |
|
|
|
int i = powerAxisStructService.addOrg(form); |
|
|
|
System.out.println("1111111111"); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
/** |
|
|
|
* 修改组织 |
|
|
|
*/ |
|
|
|
@PostMapping("/modifyOrg") |
|
|
|
public Result modifyOrg(@RequestBody PowerAxisStructEntity form){ |
|
|
|
int i = powerAxisStructService.modifyRog(form); |
|
|
|
if(i == 0){ |
|
|
|
return new Result().error(1,"不能所属自己"); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据id删除 |
|
|
|
*/ |
|
|
|
@PostMapping("/deleteById/{id}") |
|
|
|
public Result deleteById(@PathVariable String id){ |
|
|
|
powerAxisStructService.delete(id); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
/** |
|
|
|
* 获取上级网格党支部 |
|
|
|
*/ |
|
|
|
@PostMapping("/GridPartyBranchList") |
|
|
|
public Result<List<PowerAxisStructGridPartyBranchResultDTO>> getGridPartyBranchList(){ |
|
|
|
List<PowerAxisStructGridPartyBranchResultDTO> list = powerAxisStructService.getGridPartyBranchList(); |
|
|
|
return new Result<List<PowerAxisStructGridPartyBranchResultDTO>>().ok(list); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取上级组织 |
|
|
|
*/ |
|
|
|
@PostMapping("/getPartyCommList") |
|
|
|
public Result<List<PowerAxisStructPartyCommResultDTO>> getPartyCommList(){ |
|
|
|
List<PowerAxisStructPartyCommResultDTO> list = powerAxisStructService.getPartyCommList(); |
|
|
|
return new Result<List<PowerAxisStructPartyCommResultDTO>>().ok(list); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询父id |
|
|
|
*/ |
|
|
|
@PostMapping("/getPid") |
|
|
|
public Result<List<String>> getPid(){ |
|
|
|
List<String> pid = powerAxisStructService.getPid(); |
|
|
|
return new Result<List<String>>().ok(pid); |
|
|
|
} |
|
|
|
/** |
|
|
|
* 根据id查询修改表单数据 |
|
|
|
*/ |
|
|
|
@PostMapping("/queryModifyById/{id}") |
|
|
|
public Result<PowerAxisStructEntity> queryModifyById(@PathVariable String id){ |
|
|
|
PowerAxisStructEntity power = powerAxisStructService.queryModifyById(id); |
|
|
|
return new Result<PowerAxisStructEntity>().ok(power); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|