修改企业
This commit is contained in:
parent
f133f96629
commit
0a14c5125f
|
|
@ -1,5 +1,6 @@
|
||||||
package com.rzyc.mapper.ent;
|
package com.rzyc.mapper.ent;
|
||||||
|
|
||||||
|
import com.rzyc.bean.TreeModel;
|
||||||
import com.rzyc.model.ent.BaseInClass;
|
import com.rzyc.model.ent.BaseInClass;
|
||||||
import com.rzyc.model.ent.BaseInClassExample;
|
import com.rzyc.model.ent.BaseInClassExample;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
@ -34,7 +35,7 @@ public interface BaseInClassMapper {
|
||||||
/*企业行业类别*/
|
/*企业行业类别*/
|
||||||
List<BaseInClass> findByName(@Param("name") String name);
|
List<BaseInClass> findByName(@Param("name") String name);
|
||||||
|
|
||||||
List<BaseInClass>findAllTree(@Param("inType") Integer inType);
|
List<TreeModel>findAllTree(@Param("inType") Integer inType);
|
||||||
|
|
||||||
/*查询所有*/
|
/*查询所有*/
|
||||||
List<BaseInClass>findAll();
|
List<BaseInClass>findAll();
|
||||||
|
|
|
||||||
|
|
@ -354,11 +354,8 @@
|
||||||
select t1.*,
|
select t1.*,
|
||||||
t2.BaseInClassId BaseInClassIdChild,t2.ClassCode ClassCodeChild,
|
t2.BaseInClassId BaseInClassIdChild,t2.ClassCode ClassCodeChild,
|
||||||
t2.IndustryClassName IndustryClassNameChild,t2.SuperInId as SuperInIdChild
|
t2.IndustryClassName IndustryClassNameChild,t2.SuperInId as SuperInIdChild
|
||||||
from BaseInClass t1 inner join BaseInClass t2 on t1.BaseInClassId = t2.SuperInId
|
from BaseInClass t1 LEFT join BaseInClass t2 on t1.BaseInClassId = t2.SuperInId
|
||||||
where 1 = 1
|
where t1.SuperInId is null
|
||||||
<if test="null != inType">
|
|
||||||
and t1.in_type = #{inType}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,7 @@ import com.common.utils.jpush.Jpush;
|
||||||
import com.common.utils.orcode.QRCodeUtil;
|
import com.common.utils.orcode.QRCodeUtil;
|
||||||
import com.common.utils.upload.FileUpload;
|
import com.common.utils.upload.FileUpload;
|
||||||
import com.common.utils.jwt.JwtUtil;
|
import com.common.utils.jwt.JwtUtil;
|
||||||
import com.rzyc.bean.FactorDay;
|
import com.rzyc.bean.*;
|
||||||
import com.rzyc.bean.FactorYear;
|
|
||||||
import com.rzyc.bean.OaTaskTime;
|
|
||||||
import com.rzyc.bean.UserDepart;
|
|
||||||
import com.common.utils.model.Pager;
|
import com.common.utils.model.Pager;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.rzyc.bean.bigdata.user.PerformInfo;
|
import com.rzyc.bean.bigdata.user.PerformInfo;
|
||||||
|
|
@ -1638,12 +1635,12 @@ public class BaseController {
|
||||||
/**
|
/**
|
||||||
* 行业类别
|
* 行业类别
|
||||||
* */
|
* */
|
||||||
public List<BaseInClass>baseInClasses(int isTree,Integer type){
|
public List<TreeModel>baseInClasses(int isTree, Integer type){
|
||||||
List<BaseInClass> baseInClasses;
|
List<TreeModel> baseInClasses = baseInClassMapper.findAllTree(type);
|
||||||
if (isTree == 1) {
|
for (TreeModel treeModel : baseInClasses){
|
||||||
baseInClasses = baseInClassMapper.findAllTree(type);
|
if(null == treeModel.getChildren() || 0 == treeModel.getChildren().size()){
|
||||||
}else {
|
treeModel.setChildren(null);
|
||||||
baseInClasses = baseInClassMapper.findByInType(type);
|
}
|
||||||
}
|
}
|
||||||
return baseInClasses;
|
return baseInClasses;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.common.utils.model.MultiResult;
|
||||||
import com.common.utils.model.SingleResult;
|
import com.common.utils.model.SingleResult;
|
||||||
import com.common.utils.verification.Verification;
|
import com.common.utils.verification.Verification;
|
||||||
import com.rzyc.bean.ImportListDetail;
|
import com.rzyc.bean.ImportListDetail;
|
||||||
|
import com.rzyc.bean.TreeModel;
|
||||||
import com.rzyc.bean.ent.IndustryClassDto;
|
import com.rzyc.bean.ent.IndustryClassDto;
|
||||||
import com.rzyc.enums.EntListType;
|
import com.rzyc.enums.EntListType;
|
||||||
import com.rzyc.model.*;
|
import com.rzyc.model.*;
|
||||||
|
|
@ -87,9 +88,9 @@ public class OtherController extends BaseController{
|
||||||
@ApiOperation(value = "获取行业类型", notes = "获取行业类型")
|
@ApiOperation(value = "获取行业类型", notes = "获取行业类型")
|
||||||
@GetMapping("/industryClass")
|
@GetMapping("/industryClass")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public SingleResult<List<BaseInClass>> industryClass(@Valid IndustryClassDto industryClassDto)throws Exception {
|
public SingleResult<List<TreeModel>> industryClass(@Valid IndustryClassDto industryClassDto)throws Exception {
|
||||||
SingleResult singleResult = new SingleResult();
|
SingleResult singleResult = new SingleResult();
|
||||||
List<BaseInClass> list = super.baseInClasses(industryClassDto.getIsTree(),industryClassDto.getType());
|
List<TreeModel> list = super.baseInClasses(industryClassDto.getIsTree(),industryClassDto.getType());
|
||||||
if (list!=null){
|
if (list!=null){
|
||||||
singleResult.setMessage(Message.SUCCESS);
|
singleResult.setMessage(Message.SUCCESS);
|
||||||
singleResult.setCode(Code.SUCCESS.getCode());
|
singleResult.setCode(Code.SUCCESS.getCode());
|
||||||
|
|
@ -129,9 +130,9 @@ public class OtherController extends BaseController{
|
||||||
@ApiOperation(value = "所有行业类型", notes = "所有行业类型")
|
@ApiOperation(value = "所有行业类型", notes = "所有行业类型")
|
||||||
@GetMapping("/allIndustryClass")
|
@GetMapping("/allIndustryClass")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public SingleResult<List<BaseInClass>> allIndustryClass(@Valid IndustryClassDto industryClassDto)throws Exception {
|
public SingleResult<List<TreeModel>> allIndustryClass(@Valid IndustryClassDto industryClassDto)throws Exception {
|
||||||
SingleResult singleResult = new SingleResult();
|
SingleResult singleResult = new SingleResult();
|
||||||
List<BaseInClass> list = super.baseInClasses(industryClassDto.getIsTree(),industryClassDto.getType());
|
List<TreeModel> list = super.baseInClasses(industryClassDto.getIsTree(),industryClassDto.getType());
|
||||||
if (list!=null){
|
if (list!=null){
|
||||||
singleResult.setMessage(Message.SUCCESS);
|
singleResult.setMessage(Message.SUCCESS);
|
||||||
singleResult.setCode(Code.SUCCESS.getCode());
|
singleResult.setCode(Code.SUCCESS.getCode());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user