|
@@ -2,7 +2,6 @@ package com.qmth.sop.server.api;
|
|
|
|
|
|
|
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
|
-import com.qmth.sop.business.annotation.OperationLog;
|
|
|
import com.qmth.sop.business.bean.params.AutoAllocationParam;
|
|
|
import com.qmth.sop.business.bean.params.UserArchivesAllocationParam;
|
|
|
import com.qmth.sop.business.bean.result.ArchivesSourceResult;
|
|
@@ -11,7 +10,9 @@ import com.qmth.sop.business.bean.result.UserArchivesAllocationResult;
|
|
|
import com.qmth.sop.business.bean.result.UserArchivesAllocationSubTotalResult;
|
|
|
import com.qmth.sop.business.service.TBUserArchivesAllocationService;
|
|
|
import com.qmth.sop.business.service.TBUserArchivesService;
|
|
|
+import com.qmth.sop.common.annotation.OperationLog;
|
|
|
import com.qmth.sop.common.contant.SystemConstant;
|
|
|
+import com.qmth.sop.common.enums.LogTypeEnum;
|
|
|
import com.qmth.sop.common.enums.RoleTypeEnum;
|
|
|
import com.qmth.sop.common.util.Result;
|
|
|
import com.qmth.sop.common.util.ResultUtil;
|
|
@@ -45,7 +46,6 @@ public class TBUserArchivesAllocationController {
|
|
|
@ApiOperation(value = "人员调配管理-分页查询")
|
|
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = UserArchivesAllocationResult.class)})
|
|
|
- @OperationLog
|
|
|
public Result findUserArchivesAllocationPage(@ApiParam(value = "服务单元id") @RequestParam(required = false) String serviceUnitId,
|
|
|
@ApiParam(value = "省") @RequestParam(required = false) String province,
|
|
|
@ApiParam(value = "市") @RequestParam(required = false) String city,
|
|
@@ -61,7 +61,6 @@ public class TBUserArchivesAllocationController {
|
|
|
@ApiOperation(value = "人员调配管理-小计查询")
|
|
|
@RequestMapping(value = "/sub_total", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = UserArchivesAllocationSubTotalResult.class)})
|
|
|
- @OperationLog
|
|
|
public Result findUserArchivesAllocationSubTotal(@ApiParam(value = "服务单元id") @RequestParam(required = false) String serviceUnitId,
|
|
|
@ApiParam(value = "省") @RequestParam(required = false) String province,
|
|
|
@ApiParam(value = "市") @RequestParam(required = false) String city,
|
|
@@ -75,7 +74,6 @@ public class TBUserArchivesAllocationController {
|
|
|
@ApiOperation(value = "人员调配管理-根据派单号查询派单分配信息")
|
|
|
@RequestMapping(value = "/detail_by_crm_no", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = CrmArchivesAllocationResult.class)})
|
|
|
- @OperationLog
|
|
|
public Result findDetailByCrmNo(@ApiParam(value = "派单号", required = true) @RequestParam String crmNo) {
|
|
|
return ResultUtil.ok(tbUserArchivesAllocationService.findAllocationByCrmNo(crmNo));
|
|
|
}
|
|
@@ -83,7 +81,7 @@ public class TBUserArchivesAllocationController {
|
|
|
@ApiOperation(value = "人员调配管理-调配")
|
|
|
@RequestMapping(value = "/edit", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "更新成功", response = Result.class)})
|
|
|
- @OperationLog
|
|
|
+ @OperationLog(logType = LogTypeEnum.EDIT)
|
|
|
public Result edit(@Valid @RequestBody UserArchivesAllocationParam userArchivesAllocationParam, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
|
|
@@ -95,7 +93,7 @@ public class TBUserArchivesAllocationController {
|
|
|
@ApiOperation(value = "人员调配管理-自动调配")
|
|
|
@RequestMapping(value = "/auto_edit", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "更新成功", response = Result.class)})
|
|
|
- @OperationLog
|
|
|
+ @OperationLog(logType = LogTypeEnum.EDIT)
|
|
|
public Result autoEdit(@Valid @RequestBody AutoAllocationParam allocationParam, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
|
|
@@ -107,7 +105,7 @@ public class TBUserArchivesAllocationController {
|
|
|
@ApiOperation(value = "人员调配管理-发布")
|
|
|
@RequestMapping(value = "/publish", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "发布成功", response = Result.class)})
|
|
|
- @OperationLog
|
|
|
+ @OperationLog(logType = LogTypeEnum.UPDATE)
|
|
|
public Result publishCrmSop(@ApiParam(value = "派单号", required = true) @RequestParam String crmNo) throws InterruptedException {
|
|
|
tbUserArchivesAllocationService.publishSop(crmNo);
|
|
|
return ResultUtil.ok();
|
|
@@ -116,7 +114,7 @@ public class TBUserArchivesAllocationController {
|
|
|
@ApiOperation(value = "人员调配管理-撤销发布")
|
|
|
@RequestMapping(value = "/un_publish", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "作废成功", response = Result.class)})
|
|
|
- @OperationLog
|
|
|
+ @OperationLog(logType = LogTypeEnum.UPDATE)
|
|
|
public Result unPublishCrmSop(@ApiParam(value = "派单号", required = true) @RequestParam String crmNo) {
|
|
|
tbUserArchivesAllocationService.unPublishSop(crmNo);
|
|
|
return ResultUtil.ok();
|
|
@@ -125,7 +123,6 @@ public class TBUserArchivesAllocationController {
|
|
|
@ApiOperation(value = "人员调配管理-查询空闲工程师")
|
|
|
@RequestMapping(value = "/free_engineer", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = ArchivesSourceResult.class)})
|
|
|
- @OperationLog
|
|
|
public Result findFreeEngineer(@ApiParam(value = "工程师类型", required = true) @RequestParam RoleTypeEnum roleType,
|
|
|
@ApiParam(value = "派单号") @RequestParam(required = false) String crmNo) {
|
|
|
return ResultUtil.ok(tbUserArchivesService.findFreeEngineerSourceByType(roleType, crmNo));
|
|
@@ -134,7 +131,6 @@ public class TBUserArchivesAllocationController {
|
|
|
@ApiOperation(value = "人员调配管理-查询空闲区域协调人")
|
|
|
@RequestMapping(value = "/free_coordinator", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = ArchivesSourceResult.class)})
|
|
|
- @OperationLog
|
|
|
public Result findFreeCoordinator(@ApiParam(value = "服务单元id", required = true) @RequestParam String serviceUnitId,
|
|
|
@ApiParam(value = "派单号") @RequestParam(required = false) String crmNo) {
|
|
|
return ResultUtil.ok(tbUserArchivesService.findFreeCoordinatorByServiceId(SystemConstant.convertIdToLong(serviceUnitId), crmNo));
|