|
|
|
@ -4,6 +4,9 @@ import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
|
import com.glxp.api.annotation.AuthRuleAnnotation;
|
|
|
|
@ -16,6 +19,7 @@ import com.glxp.api.entity.auth.AuthAdmin;
|
|
|
|
|
import com.glxp.api.entity.auth.SysWorkplace;
|
|
|
|
|
import com.glxp.api.entity.auth.WarehouseUserEntity;
|
|
|
|
|
import com.glxp.api.entity.basic.BasicCollectPointEntity;
|
|
|
|
|
import com.glxp.api.entity.basic.SysWorkplaceDocumentEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SystemPDFTemplateEntity;
|
|
|
|
|
import com.glxp.api.exception.JsonException;
|
|
|
|
@ -262,4 +266,24 @@ public class SysWorkplaceController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/udiwms/sysWorkplace/switchWorkplaceStatus")
|
|
|
|
|
public BaseResponse switchWorkplaceStatus(@RequestBody SysWorkplace entity) {
|
|
|
|
|
|
|
|
|
|
Long workplaceId = entity.getWorkplaceId();
|
|
|
|
|
Integer workplaceStatus = entity.getWorkplaceStatus();
|
|
|
|
|
|
|
|
|
|
if (workplaceId == null || workplaceStatus == null){
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.DATA_NOT, "参数错误!");
|
|
|
|
|
}
|
|
|
|
|
UpdateWrapper<SysWorkplace> sysWorkplaceUpdateWrapper = new UpdateWrapper<>();
|
|
|
|
|
sysWorkplaceUpdateWrapper.set("workplaceStatus",workplaceStatus);
|
|
|
|
|
sysWorkplaceUpdateWrapper.eq("workplaceId",workplaceId);
|
|
|
|
|
boolean save = sysWorkplaceService.update(sysWorkplaceUpdateWrapper);
|
|
|
|
|
if (!save) {
|
|
|
|
|
return ResultVOUtils.error("更新失败");
|
|
|
|
|
}
|
|
|
|
|
return ResultVOUtils.success("更新成功");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|