소스 검색

客户选择组件

lizhenhao 2 년 전
부모
커밋
dee54be797

+ 20 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workClientInfo/controller/WorkClientController.java

@@ -135,4 +135,24 @@ public class WorkClientController {
     public Integer isExist(@RequestParam String param) {
         return workClientService.isExist(param);
     }
+
+    /**
+     * 客户信息列表-组件使用
+     */
+    @ApiOperation(value = "客户信息列表-组件使用")
+    @GetMapping(value = "componentList")
+    public ResponseEntity<IPage<WorkClientInfo>> componentList(WorkClientInfo workClientInfo, Page<WorkClientInfo> page) throws Exception {
+        QueryWrapper<WorkClientInfo> workClientInfoQueryWrapper = QueryWrapperGenerator.buildQueryCondition(workClientInfo, WorkClientInfo.class);
+        IPage<WorkClientInfo> list = workClientService.componentList(page,workClientInfoQueryWrapper);
+        return ResponseEntity.ok (list);
+    }
+
+    /**
+     * 客户信息查询-组件使用
+     */
+    @ApiOperation(value = "客户信息查询-组件使用")
+    @GetMapping(value = "componentById")
+    public WorkClientInfo componentById(@RequestParam String id) {
+        return workClientService.componentById(id);
+    }
 }

+ 6 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workClientInfo/domain/WorkClientInfo.java

@@ -65,6 +65,12 @@ public class WorkClientInfo extends BaseEntity {
     private String areaId;
 
     /**
+     * 地区名称
+     */
+    @TableField(exist = false)
+    private String areaName;
+
+    /**
      * 邮政编码
      */
     private String zipCode;

+ 2 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workClientInfo/mapper/WorkClientInfoMapper.java

@@ -13,4 +13,6 @@ public interface WorkClientInfoMapper extends BaseMapper<WorkClientInfo> {
     IPage<WorkClientInfo> findPageList(Page<WorkClientInfo> page, @Param(Constants.WRAPPER)QueryWrapper queryWrapper);
 
     Integer isExist(@Param("value") String value);
+
+    IPage<WorkClientInfo> componentList(Page<WorkClientInfo> page, @Param(Constants.WRAPPER)QueryWrapper queryWrapper);
 }

+ 73 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workClientInfo/mapper/xml/WorkClientInfoMapper.xml

@@ -2,6 +2,79 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jeeplus.test.workClientInfo.mapper.WorkClientInfoMapper">
 
+	<sql id="Base_Column_List">
+        a.id,
+        a.create_by,
+        a.create_date,
+        a.update_by,
+        a.update_date,
+        a.del_flag,
+        a.name,
+        a.lawer_presint,
+        a.or_unicode,
+        a.company_type,
+        a.company_industry,
+        a.client_type,
+        a.credit_rank,
+        a.area_id,
+        a.zip_code,
+        a.fax,
+        a.tax_id,
+        a.email,
+        a.address,
+        a.register_address,
+        a.company_url,
+        a.remarks,
+        a.company_id,
+        a.office_id,
+        a.area_parent_ids,
+        a.telephone,
+        a.has_uscc,
+        a.usc_code,
+        a.number
+    </sql>
+	<resultMap id="BaseResultMap" type="com.jeeplus.test.workClientInfo.domain.WorkClientInfo">
+		<id property="id" column="id" jdbcType="VARCHAR"/>
+		<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+		<result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
+		<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
+		<result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
+		<result property="delFlag" column="del_flag" jdbcType="CHAR"/>
+		<result property="name" column="name" jdbcType="VARCHAR"/>
+		<result property="lawerPresint" column="lawer_presint" jdbcType="VARCHAR"/>
+		<result property="orUnicode" column="or_unicode" jdbcType="VARCHAR"/>
+		<result property="companyType" column="company_type" jdbcType="VARCHAR"/>
+		<result property="companyIndustry" column="company_industry" jdbcType="VARCHAR"/>
+		<result property="clientType" column="client_type" jdbcType="VARCHAR"/>
+		<result property="creditRank" column="credit_rank" jdbcType="VARCHAR"/>
+		<result property="areaId" column="area_id" jdbcType="VARCHAR"/>
+		<result property="zipCode" column="zip_code" jdbcType="VARCHAR"/>
+		<result property="fax" column="fax" jdbcType="VARCHAR"/>
+		<result property="taxId" column="tax_id" jdbcType="VARCHAR"/>
+		<result property="email" column="email" jdbcType="VARCHAR"/>
+		<result property="address" column="address" jdbcType="VARCHAR"/>
+		<result property="registerAddress" column="register_address" jdbcType="VARCHAR"/>
+		<result property="companyUrl" column="company_url" jdbcType="VARCHAR"/>
+		<result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+		<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
+		<result property="officeId" column="office_id" jdbcType="VARCHAR"/>
+		<result property="areaParentIds" column="area_parent_ids" jdbcType="VARCHAR"/>
+		<result property="telephone" column="telephone" jdbcType="VARCHAR"/>
+		<result property="hasUscc" column="has_uscc" jdbcType="TINYINT"/>
+		<result property="uscCode" column="usc_code" jdbcType="VARCHAR"/>
+		<result property="number" column="number" jdbcType="VARCHAR"/>
+		<result property="areaName" column="sa_name" jdbcType="VARCHAR"/>
+
+	</resultMap>
+	<select id="componentList" resultMap="BaseResultMap">
+		select
+		<include refid="Base_Column_List"></include>,
+		sa.name sa_name
+		from work_client_info a
+		left join sys_area sa on sa.id = a.area_id and sa.del_flag = '0'
+		${ew.customSqlSegment}
+		order by a.update_date desc
+	</select>
 	<select id="findPageList" resultType="com.jeeplus.test.workClientInfo.domain.WorkClientInfo">
 		SELECT
 			a.id,

+ 21 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workClientInfo/service/WorkClientService.java

@@ -299,4 +299,25 @@ public class WorkClientService {
     public Integer isExist(String param) {
         return workClientInfoMapper.isExist(param);
     }
+
+    /**
+     * 客户信息列表-组件使用
+     * @param
+     * @return
+     */
+    public IPage<WorkClientInfo> componentList(Page<WorkClientInfo> page, QueryWrapper<WorkClientInfo> queryWrapper) {
+        queryWrapper.eq("a.del_flag","0");
+        IPage<WorkClientInfo> pageList = workClientInfoMapper.componentList(page, queryWrapper);
+        return pageList;
+    }
+
+    /**
+     * 客户信息查询-组件使用
+     * @param id
+     * @return
+     */
+    public WorkClientInfo componentById (String id) {
+        WorkClientInfo workClientInfo = workClientInfoMapper.selectById(id);
+        return workClientInfo;
+    }
 }