|
@@ -2,6 +2,7 @@ package com.management.platform.controller;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.management.platform.constant.Constant;
|
|
import com.management.platform.constant.Constant;
|
|
import com.management.platform.entity.*;
|
|
import com.management.platform.entity.*;
|
|
import com.management.platform.mapper.*;
|
|
import com.management.platform.mapper.*;
|
|
@@ -17,7 +18,6 @@ import org.springframework.web.bind.annotation.RestController;
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
-import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -49,6 +49,9 @@ public class CompanyController {
|
|
@Resource
|
|
@Resource
|
|
private ExpenseMainTypeService expenseMainTypeService;
|
|
private ExpenseMainTypeService expenseMainTypeService;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private SysFormMapper sysFormMapper;
|
|
|
|
+
|
|
@RequestMapping("/testTimeout")
|
|
@RequestMapping("/testTimeout")
|
|
public HttpRespMsg testTimeout(){
|
|
public HttpRespMsg testTimeout(){
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
@@ -224,5 +227,16 @@ public class CompanyController {
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @RequestMapping("/editCompanyToSimpleAndSysFormConfig")
|
|
|
|
+ public HttpRespMsg editCompanyToSimpleAndSysFormConfig(Integer simpleMode ,String config,HttpServletRequest request){
|
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
|
|
+ String token = request.getHeader("token");
|
|
|
|
+ User user = userMapper.selectById(token);
|
|
|
|
+ Company company = companyMapper.selectById(user.getCompanyId());
|
|
|
|
+ companyMapper.update(null,new UpdateWrapper<Company>().set("is_simple",simpleMode).eq("id",company.getId()));
|
|
|
|
+ sysFormMapper.update(null,new UpdateWrapper<SysForm>().set("config",config).eq("id",company.getId()).eq("code","tasks"));
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|