Commit 4ddda673 authored by zhangjianqian's avatar zhangjianqian

添加企业分类字段

parent 4a2ff26b
......@@ -11,6 +11,7 @@ import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.framework.config.ServerConfig;
import com.zehong.system.domain.TEnterpriseInfo;
import com.zehong.system.domain.vo.TEnterpriseInfoVO;
import com.zehong.system.service.ITEnterpriseInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
......@@ -71,7 +72,8 @@ public class TEnterpriseInfoController extends BaseController
@GetMapping("/enterpriseInfoList")
public AjaxResult enterpriseInfoList(TEnterpriseInfo tEnterpriseInfo)
{
return AjaxResult.success(tEnterpriseInfoService.enterpriseInfoList(tEnterpriseInfo));
List<TEnterpriseInfoVO> list = tEnterpriseInfoService.enterpriseInfoList(tEnterpriseInfo);
return AjaxResult.success(list);
}
/**
......
......@@ -27,6 +27,9 @@ public class TEnterpriseInfo extends BaseEntity
@Excel(name = "企业名称")
private String enterpriseName;
@Excel(name = "企业分类")
private Integer enterpriseType;
/** 注册地址 */
@Excel(name = "注册地址")
private String registerAddress;
......@@ -73,6 +76,14 @@ public class TEnterpriseInfo extends BaseEntity
/**本地存储图片路径*/
private String burl;
public Integer getEnterpriseType() {
return enterpriseType;
}
public void setEnterpriseType(Integer enterpriseType) {
this.enterpriseType = enterpriseType;
}
public Long getCreateEnterpriseId() {
return createEnterpriseId;
}
......
......@@ -27,6 +27,8 @@ public class TEnterpriseInfoVO extends BaseEntity
/** 企业切换使用 */
private String companyType;
private Integer enterpriseType;
/** 经度 */
private BigDecimal longitude;
......
......@@ -51,7 +51,6 @@ public class TEnterpriseInfoServiceImpl implements ITEnterpriseInfoService
TEnterpriseInfoVO tEnterpriseInfoVO = new TEnterpriseInfoVO();
BeanUtils.copyProperties(info, tEnterpriseInfoVO);
tEnterpriseInfoVO.setCompanyType(info.getEnterpriseId().toString());
list.add(tEnterpriseInfoVO);
}
return list;
......
......@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="enterpriseId" column="enterprise_id" />
<result property="createEnterpriseId" column="create_enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="enterpriseType" column="enterprise_type" />
<result property="registerAddress" column="register_address" />
<result property="legalRepresentative" column="legal_representative" />
<result property="businessArea" column="business_area" />
......@@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTEnterpriseInfoVo">
select enterprise_id, enterprise_name, register_address, legal_representative,
select enterprise_id, enterprise_name, register_address, legal_representative,enterprise_type,
business_area, longitude, latitude, icon_type, license_key, license_validity_time, annual_supervision_inspection,
create_by, create_time, update_by, update_time, remarks,do_business from t_enterprise_info
</sql>
......@@ -41,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="registerAddress != null and registerAddress != ''"> and register_address = #{registerAddress}</if>
<if test="enterpriseType != null">and enterprise_type =#{enterpriseType}</if>
<if test="legalRepresentative != null and legalRepresentative != ''"> and legal_representative = #{legalRepresentative}</if>
<if test="businessArea != null and businessArea != ''"> and business_area = #{businessArea}</if>
<if test="licenseKey != null and licenseKey != ''"> and license_key = #{licenseKey}</if>
......@@ -61,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createEnterpriseId != null">create_enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="enterpriseType!=null">enterprise_type,</if>
<if test="registerAddress != null">register_address,</if>
<if test="legalRepresentative != null">legal_representative,</if>
<if test="businessArea != null">business_area,</if>
......@@ -81,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createEnterpriseId != null">#{createEnterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="enterpriseType != null"> #{enterpriseType},</if>
<if test="registerAddress != null">#{registerAddress},</if>
<if test="legalRepresentative != null">#{legalRepresentative},</if>
<if test="businessArea != null">#{businessArea},</if>
......@@ -104,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_enterprise_info
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="enterpriseType!=null"> enterprise_type = #{enterpriseType}</if>
<if test="registerAddress != null">register_address = #{registerAddress},</if>
<if test="legalRepresentative != null">legal_representative = #{legalRepresentative},</if>
<if test="businessArea != null">business_area = #{businessArea},</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment