|
|
@@ -5,6 +5,7 @@ import com.ydtech.core.page.HttpResult;
|
|
|
import com.ydtech.modules.admin.model.dto.SysUserLinkPtlAgreementDto;
|
|
|
import com.ydtech.modules.admin.model.vo.SysUserBaseVO;
|
|
|
import com.ydtech.modules.admin.model.vo.SysUserLinkPtlAgreementAddVo;
|
|
|
+import com.ydtech.modules.admin.model.vo.SysUserLinkPtlAgreementIdsVo;
|
|
|
import com.ydtech.modules.admin.model.vo.SysUserLinkPtlAgreementVo;
|
|
|
import com.ydtech.modules.admin.service.SysUserLinkPtlAgreementService;
|
|
|
import com.ydtech.modules.base.controller.BaseController;
|
|
|
@@ -59,13 +60,12 @@ public class SysUserLinkPtlAgreementController extends BaseController {
|
|
|
|
|
|
@PostMapping("delete")
|
|
|
@ApiOperation("后线人员关联协议删除")
|
|
|
- @ApiImplicitParam(name = "ids", value = "关联协议ids数组", required = true)
|
|
|
- public HttpResult<Object> delete(@RequestParam("ids") List<Long> ids) {
|
|
|
- if(ids==null || ids.size()==0){
|
|
|
+ public HttpResult<Object> delete(@RequestBody SysUserLinkPtlAgreementIdsVo idsVo) {
|
|
|
+ if(idsVo.getIds()==null || idsVo.getIds().size()==0){
|
|
|
return HttpResult.error("后线人员关联ids不能为空");
|
|
|
}
|
|
|
try{
|
|
|
- sysUserLinkPtlAgreementService.deleteByIds(ids);
|
|
|
+ sysUserLinkPtlAgreementService.deleteByIds(idsVo.getIds());
|
|
|
return HttpResult.ok("删除成功");
|
|
|
}catch (Exception e){
|
|
|
return HttpResult.error("删除失败"+e.getMessage());
|
|
|
@@ -74,9 +74,10 @@ public class SysUserLinkPtlAgreementController extends BaseController {
|
|
|
|
|
|
@GetMapping("findUserList")
|
|
|
@ApiOperation("查询所有的后线人员列表")
|
|
|
- public HttpResult<Object> findUserList() {
|
|
|
+ @ApiImplicitParam(name = "userId", value = "后线人员工号", required = false)
|
|
|
+ public HttpResult<Object> findUserList(String userId) {
|
|
|
try{
|
|
|
- List<SysUserBaseVO> list= sysUserLinkPtlAgreementService.findUserList();
|
|
|
+ List<SysUserBaseVO> list= sysUserLinkPtlAgreementService.findUserList(userId);
|
|
|
return HttpResult.ok(list);
|
|
|
}catch (Exception e){
|
|
|
return HttpResult.error("操作失败"+e.getMessage());
|
|
|
@@ -102,13 +103,14 @@ public class SysUserLinkPtlAgreementController extends BaseController {
|
|
|
@GetMapping("/findPtlAgreementListByUserId/{userId}")
|
|
|
@ApiOperation(value = "后线人员关联协议列表")
|
|
|
@ApiImplicitParam(name = "userId", value = "后线人员id", required = true)
|
|
|
- public HttpResult<List<SysUserLinkPtlAgreementDto>> findPtlAgreementListByUserId(@PathVariable("userId") String userId) {
|
|
|
+ public HttpResult<List<PtlAgreement>> findPtlAgreementListByUserId(@PathVariable("userId") String userId) {
|
|
|
if(userId==null || "".equals(userId)) {
|
|
|
return HttpResult.error("后线人员id不能为空");
|
|
|
}
|
|
|
try{
|
|
|
- List<SysUserLinkPtlAgreementDto> result = sysUserLinkPtlAgreementService.findPtlAgreementListByUserId(userId);
|
|
|
- return HttpResult.ok(result);
|
|
|
+ //List<SysUserLinkPtlAgreementDto> result = sysUserLinkPtlAgreementService.findPtlAgreementListByUserId(userId);
|
|
|
+ List<PtlAgreement> list= sysUserLinkPtlAgreementService.findAllPtlAgreementListByUserId(userId);
|
|
|
+ return HttpResult.ok(list);
|
|
|
}catch (Exception e){
|
|
|
return HttpResult.error("查询失败"+e.getMessage());
|
|
|
}
|