Browse Source

Merge branch 'test'

# Conflicts:
#	.idea/free-mybatis-generator-config.xml
anderx 4 years ago
parent
commit
9de72bf574

+ 0 - 8
.idea/.gitignore

@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
-# Editor-based HTTP Client requests
-/httpRequests/

+ 0 - 12
.idea/dataSources.xml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
-    <data-source source="LOCAL" name="aft@localhost" uuid="39934329-c4ea-4447-b3d6-c86e5d689a68">
-      <driver-ref>mysql.8</driver-ref>
-      <synchronize>true</synchronize>
-      <jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
-      <jdbc-url>jdbc:mysql://localhost:3306/aft</jdbc-url>
-      <working-dir>$ProjectFileDir$</working-dir>
-    </data-source>
-  </component>
-</project>

+ 0 - 11
.idea/inspectionProfiles/Project_Default.xml

@@ -1,11 +0,0 @@
-<component name="InspectionProjectProfileManager">
-  <profile version="1.0">
-    <option name="myName" value="Project Default" />
-    <inspection_tool class="MybatisMapperXmlInspection" enabled="false" level="ERROR" enabled_by_default="false" />
-    <inspection_tool class="SqlDialectInspection" enabled="false" level="WARNING" enabled_by_default="false" />
-    <inspection_tool class="SqlGotoInspection" enabled="true" level="WARNING" enabled_by_default="true" />
-    <inspection_tool class="SqlMissingColumnAliasesInspection" enabled="true" level="WARNING" enabled_by_default="true" />
-    <inspection_tool class="SqlNamedArgumentsInspection" enabled="true" level="WARNING" enabled_by_default="true" />
-    <inspection_tool class="SqlNoDataSourceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
-  </profile>
-</component>

+ 2 - 6
kede-server.iml

@@ -17,11 +17,7 @@
       </configuration>
     </facet>
     <facet type="Spring" name="Spring">
-      <configuration>
-        <fileset id="web aft servlet context" name="MVC aft servlet context" removed="true">
-          <file>file://$MODULE_DIR$/src/main/resources/applicationContext.xml</file>
-        </fileset>
-      </configuration>
+      <configuration />
     </facet>
   </component>
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
@@ -29,8 +25,8 @@
     <output-test url="file://$MODULE_DIR$/target/test-classes" />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
       <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
       <excludeFolder url="file://$MODULE_DIR$/target" />
     </content>
     <orderEntry type="inheritedJdk" />

+ 25 - 53
src/main/java/com/goafanti/common/dao/OrganizationIdentityMapper.java

@@ -11,68 +11,40 @@ import com.goafanti.user.bo.OrgUnitNames;
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 public interface OrganizationIdentityMapper {
-    /**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
-	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
-	 */
-	int deleteByPrimaryKey(String id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
-	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
-	 */
-	int insert(OrganizationIdentity record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
-	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
-	 */
-	int insertSelective(OrganizationIdentity record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
-	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
-	 */
-	OrganizationIdentity selectByPrimaryKey(String id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
-	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
-	 */
-	int updateByPrimaryKeySelective(OrganizationIdentity record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
-	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
-	 */
-	int updateByPrimaryKeyWithBLOBs(OrganizationIdentity record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
-	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
-	 */
-	int updateByPrimaryKey(OrganizationIdentity record);
-
-	OrganizationIdentity selectOrgIdentityByUserId(String uid);
-    
+    int deleteByPrimaryKey(String id);
+
+    int insert(OrganizationIdentity record);
+
+    int insertSelective(OrganizationIdentity record);
+
+    OrganizationIdentity selectByPrimaryKey(String id);
+
+    int updateByPrimaryKeySelective(OrganizationIdentity record);
+
+    int updateByPrimaryKey(OrganizationIdentity record);
+
+    OrganizationIdentity selectOrgIdentityByUserId(String uid);
+
     OrgBasicInfoBo selectBasicInfo(String uid, int year);
-    
+
     OrgIdentityDetailBo selectOrgIdentityDetailByUserId(String uid);
-    
+
     AuditorOrgIdentityDetailBo selectAuditorOrgIdentityDetailByUserId(@Param("uid")String uid, @Param("year")Integer year);
-    
+
     OrgIdentityBo selectOrgIdentityBoByUserId(String uid);
-    
+
     List<OrgUnitNames> selectManagerUnitNames(String aid);
-    
+
     List<OrgUnitNames> selectAllOrgIndentity(String aid);
-    
+
     List<OrgUnitNames> selectManagerAchievementOrgOwner(@Param("aid")String aid, @Param("name")String name);
-    
+
     List<OrgUnitNames> selectAchievementOrgOwner(@Param("aid")String aid, @Param("name")String name);
 
-	int updateServiceByUid(OrganizationIdentity org);
+    int updateServiceByUid(OrganizationIdentity org);
 
-	void insertBatch(List<InputUserChannel> list);
+    void insertBatch(List<InputUserChannel> list);
 }

+ 1 - 1
src/main/java/com/goafanti/common/mapper/OrganizationContactBookMapper.xml

@@ -488,6 +488,6 @@
   select 
     <include refid="Base_Column_List" />
     from organization_contact_book
-    where uid = #{uid} and aid= #{aid}
+    where uid = #{uid} and aid= #{aid} and major =1 limit 1
   </select>
 </mapper>

+ 113 - 227
src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml

@@ -2,11 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.OrganizationIdentityMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrganizationIdentity">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 04 17:27:08 CST 2021.
-    -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="uid" jdbcType="VARCHAR" property="uid" />
     <result column="contacts" jdbcType="VARCHAR" property="contacts" />
@@ -75,22 +70,11 @@
     <result column="assets" jdbcType="DECIMAL" property="assets" />
     <result column="qualification" jdbcType="VARCHAR" property="qualification" />
     <result column="cooperation_situation" jdbcType="VARCHAR" property="cooperationSituation" />
+    <result column="honor_picture" jdbcType="VARCHAR" property="honorPicture" />
     <result column="sales_target" jdbcType="VARCHAR" property="salesTarget" />
-  </resultMap>
-  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.OrganizationIdentity">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 04 17:27:08 CST 2021.
-    -->
-    <result column="honor_picture" jdbcType="LONGVARCHAR" property="honorPicture" />
+    <result column="intended_project" jdbcType="VARCHAR" property="intendedProject" />
   </resultMap>
   <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 04 17:27:08 CST 2021.
-    -->
     id, `uid`, contacts, contact_mobile, fixed_tel, qq, postal_address, postcode, unit_name, 
     registered_capital, licence_number, licence_province, licence_city, licence_area, 
     licence_scanning_url, org_code, org_code_url, bank_account, banks, bank_branch, bank_card_number, 
@@ -102,105 +86,75 @@
     enterprise_scale, register_type, foreign_investment, field, tax_authority, ratepay_method, 
     high_tech_zone, risk_investment, business_scope, high_tech_name, patent_prory_statement_url, 
     international, review_instructions, investment, year_sales_amount, last_year_research_amount, 
-    assets, qualification, cooperation_situation, sales_target
-  </sql>
-  <sql id="Blob_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 04 17:27:08 CST 2021.
-    -->
-    honor_picture
+    assets, qualification, cooperation_situation, honor_picture, sales_target, intended_project
   </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 04 17:27:08 CST 2021.
-    -->
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     select 
     <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
     from organization_identity
     where id = #{id,jdbcType=VARCHAR}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 04 17:27:08 CST 2021.
-    -->
     delete from organization_identity
     where id = #{id,jdbcType=VARCHAR}
   </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 04 17:27:08 CST 2021.
-    -->
-    insert into organization_identity (id, `uid`, contacts, 
-      contact_mobile, fixed_tel, qq, 
-      postal_address, postcode, unit_name, 
-      registered_capital, licence_number, licence_province, 
-      licence_city, licence_area, licence_scanning_url, 
-      org_code, org_code_url, bank_account, 
-      banks, bank_branch, bank_card_number, 
-      validation_amount, identity_type, location_province, 
-      location_city, location_area, legal_person, 
-      legal_person_id_card, last_year_tax_report_url, 
-      audit_status, `process`, wrong_count, 
-      payment_date, listed, listed_date, 
-      listed_type, stock_code, certificate_number, 
-      issuing_date, cog_contacts, tech_principal, 
-      contacts_fixed_tel, contacts_fax, legal_person_tel, 
-      legal_person_fax, legal_person_email, registration_time, 
-      ratepay_code, industry, enterprise_scale, 
-      register_type, foreign_investment, field, 
-      tax_authority, ratepay_method, high_tech_zone, 
-      risk_investment, business_scope, high_tech_name, 
-      patent_prory_statement_url, international, 
-      review_instructions, investment, year_sales_amount, 
-      last_year_research_amount, assets, qualification, 
-      cooperation_situation, sales_target, honor_picture
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.OrganizationIdentity" useGeneratedKeys="true">
+    insert into organization_identity (id,`uid`, contacts, contact_mobile,
+      fixed_tel, qq, postal_address, 
+      postcode, unit_name, registered_capital, 
+      licence_number, licence_province, licence_city, 
+      licence_area, licence_scanning_url, org_code, 
+      org_code_url, bank_account, banks, 
+      bank_branch, bank_card_number, validation_amount, 
+      identity_type, location_province, location_city, 
+      location_area, legal_person, legal_person_id_card, 
+      last_year_tax_report_url, audit_status, `process`, 
+      wrong_count, payment_date, listed, 
+      listed_date, listed_type, stock_code, 
+      certificate_number, issuing_date, cog_contacts, 
+      tech_principal, contacts_fixed_tel, contacts_fax, 
+      legal_person_tel, legal_person_fax, legal_person_email, 
+      registration_time, ratepay_code, industry, 
+      enterprise_scale, register_type, foreign_investment, 
+      field, tax_authority, ratepay_method, 
+      high_tech_zone, risk_investment, business_scope, 
+      high_tech_name, patent_prory_statement_url, 
+      international, review_instructions, investment, 
+      year_sales_amount, last_year_research_amount, 
+      assets, qualification, cooperation_situation, 
+      honor_picture, sales_target, intended_project
       )
-    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, 
-      #{contactMobile,jdbcType=VARCHAR}, #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, 
-      #{postalAddress,jdbcType=VARCHAR}, #{postcode,jdbcType=VARCHAR}, #{unitName,jdbcType=VARCHAR}, 
-      #{registeredCapital,jdbcType=DECIMAL}, #{licenceNumber,jdbcType=VARCHAR}, #{licenceProvince,jdbcType=INTEGER}, 
-      #{licenceCity,jdbcType=INTEGER}, #{licenceArea,jdbcType=INTEGER}, #{licenceScanningUrl,jdbcType=VARCHAR}, 
-      #{orgCode,jdbcType=VARCHAR}, #{orgCodeUrl,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR}, 
-      #{banks,jdbcType=VARCHAR}, #{bankBranch,jdbcType=VARCHAR}, #{bankCardNumber,jdbcType=VARCHAR}, 
-      #{validationAmount,jdbcType=DECIMAL}, #{identityType,jdbcType=INTEGER}, #{locationProvince,jdbcType=INTEGER}, 
-      #{locationCity,jdbcType=INTEGER}, #{locationArea,jdbcType=INTEGER}, #{legalPerson,jdbcType=VARCHAR}, 
-      #{legalPersonIdCard,jdbcType=VARCHAR}, #{lastYearTaxReportUrl,jdbcType=VARCHAR}, 
-      #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, 
-      #{paymentDate,jdbcType=TIMESTAMP}, #{listed,jdbcType=INTEGER}, #{listedDate,jdbcType=TIMESTAMP}, 
-      #{listedType,jdbcType=INTEGER}, #{stockCode,jdbcType=VARCHAR}, #{certificateNumber,jdbcType=VARCHAR}, 
-      #{issuingDate,jdbcType=TIMESTAMP}, #{cogContacts,jdbcType=INTEGER}, #{techPrincipal,jdbcType=VARCHAR}, 
-      #{contactsFixedTel,jdbcType=VARCHAR}, #{contactsFax,jdbcType=VARCHAR}, #{legalPersonTel,jdbcType=VARCHAR}, 
-      #{legalPersonFax,jdbcType=VARCHAR}, #{legalPersonEmail,jdbcType=VARCHAR}, #{registrationTime,jdbcType=TIMESTAMP}, 
-      #{ratepayCode,jdbcType=VARCHAR}, #{industry,jdbcType=INTEGER}, #{enterpriseScale,jdbcType=VARCHAR}, 
-      #{registerType,jdbcType=VARCHAR}, #{foreignInvestment,jdbcType=VARCHAR}, #{field,jdbcType=VARCHAR}, 
-      #{taxAuthority,jdbcType=INTEGER}, #{ratepayMethod,jdbcType=INTEGER}, #{highTechZone,jdbcType=INTEGER}, 
-      #{riskInvestment,jdbcType=INTEGER}, #{businessScope,jdbcType=VARCHAR}, #{highTechName,jdbcType=VARCHAR}, 
-      #{patentProryStatementUrl,jdbcType=VARCHAR}, #{international,jdbcType=INTEGER}, 
-      #{reviewInstructions,jdbcType=VARCHAR}, #{investment,jdbcType=INTEGER}, #{yearSalesAmount,jdbcType=DECIMAL}, 
-      #{lastYearResearchAmount,jdbcType=DECIMAL}, #{assets,jdbcType=DECIMAL}, #{qualification,jdbcType=VARCHAR}, 
-      #{cooperationSituation,jdbcType=VARCHAR}, #{salesTarget,jdbcType=VARCHAR}, #{honorPicture,jdbcType=LONGVARCHAR}
+    values (#{id,jdbcType=VARCHAR},#{uid,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR},
+      #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR}, 
+      #{postcode,jdbcType=VARCHAR}, #{unitName,jdbcType=VARCHAR}, #{registeredCapital,jdbcType=DECIMAL}, 
+      #{licenceNumber,jdbcType=VARCHAR}, #{licenceProvince,jdbcType=INTEGER}, #{licenceCity,jdbcType=INTEGER}, 
+      #{licenceArea,jdbcType=INTEGER}, #{licenceScanningUrl,jdbcType=VARCHAR}, #{orgCode,jdbcType=VARCHAR}, 
+      #{orgCodeUrl,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR}, #{banks,jdbcType=VARCHAR}, 
+      #{bankBranch,jdbcType=VARCHAR}, #{bankCardNumber,jdbcType=VARCHAR}, #{validationAmount,jdbcType=DECIMAL}, 
+      #{identityType,jdbcType=INTEGER}, #{locationProvince,jdbcType=INTEGER}, #{locationCity,jdbcType=INTEGER}, 
+      #{locationArea,jdbcType=INTEGER}, #{legalPerson,jdbcType=VARCHAR}, #{legalPersonIdCard,jdbcType=VARCHAR}, 
+      #{lastYearTaxReportUrl,jdbcType=VARCHAR}, #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER}, 
+      #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP}, #{listed,jdbcType=INTEGER}, 
+      #{listedDate,jdbcType=TIMESTAMP}, #{listedType,jdbcType=INTEGER}, #{stockCode,jdbcType=VARCHAR}, 
+      #{certificateNumber,jdbcType=VARCHAR}, #{issuingDate,jdbcType=TIMESTAMP}, #{cogContacts,jdbcType=INTEGER}, 
+      #{techPrincipal,jdbcType=VARCHAR}, #{contactsFixedTel,jdbcType=VARCHAR}, #{contactsFax,jdbcType=VARCHAR}, 
+      #{legalPersonTel,jdbcType=VARCHAR}, #{legalPersonFax,jdbcType=VARCHAR}, #{legalPersonEmail,jdbcType=VARCHAR}, 
+      #{registrationTime,jdbcType=TIMESTAMP}, #{ratepayCode,jdbcType=VARCHAR}, #{industry,jdbcType=INTEGER}, 
+      #{enterpriseScale,jdbcType=VARCHAR}, #{registerType,jdbcType=VARCHAR}, #{foreignInvestment,jdbcType=VARCHAR}, 
+      #{field,jdbcType=VARCHAR}, #{taxAuthority,jdbcType=INTEGER}, #{ratepayMethod,jdbcType=INTEGER}, 
+      #{highTechZone,jdbcType=INTEGER}, #{riskInvestment,jdbcType=INTEGER}, #{businessScope,jdbcType=VARCHAR}, 
+      #{highTechName,jdbcType=VARCHAR}, #{patentProryStatementUrl,jdbcType=VARCHAR}, 
+      #{international,jdbcType=INTEGER}, #{reviewInstructions,jdbcType=VARCHAR}, #{investment,jdbcType=INTEGER}, 
+      #{yearSalesAmount,jdbcType=DECIMAL}, #{lastYearResearchAmount,jdbcType=DECIMAL}, 
+      #{assets,jdbcType=DECIMAL}, #{qualification,jdbcType=VARCHAR}, #{cooperationSituation,jdbcType=VARCHAR}, 
+      #{honorPicture,jdbcType=VARCHAR}, #{salesTarget,jdbcType=VARCHAR}, #{intendedProject,jdbcType=VARCHAR}
       )
   </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 04 17:27:08 CST 2021.
-    -->
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.OrganizationIdentity" useGeneratedKeys="true">
     insert into organization_identity
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
-        id,
+        `id`,
       </if>
       <if test="uid != null">
         `uid`,
@@ -403,11 +357,14 @@
       <if test="cooperationSituation != null">
         cooperation_situation,
       </if>
+      <if test="honorPicture != null">
+        honor_picture,
+      </if>
       <if test="salesTarget != null">
         sales_target,
       </if>
-      <if test="honorPicture != null">
-        honor_picture,
+      <if test="intendedProject != null">
+        intended_project,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -615,20 +572,18 @@
       <if test="cooperationSituation != null">
         #{cooperationSituation,jdbcType=VARCHAR},
       </if>
+      <if test="honorPicture != null">
+        #{honorPicture,jdbcType=VARCHAR},
+      </if>
       <if test="salesTarget != null">
         #{salesTarget,jdbcType=VARCHAR},
       </if>
-      <if test="honorPicture != null">
-        #{honorPicture,jdbcType=LONGVARCHAR},
+      <if test="intendedProject != null">
+        #{intendedProject,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 04 17:27:08 CST 2021.
-    -->
     update organization_identity
     <set>
       <if test="uid != null">
@@ -832,99 +787,19 @@
       <if test="cooperationSituation != null">
         cooperation_situation = #{cooperationSituation,jdbcType=VARCHAR},
       </if>
+      <if test="honorPicture != null">
+        honor_picture = #{honorPicture,jdbcType=VARCHAR},
+      </if>
       <if test="salesTarget != null">
         sales_target = #{salesTarget,jdbcType=VARCHAR},
       </if>
-      <if test="honorPicture != null">
-        honor_picture = #{honorPicture,jdbcType=LONGVARCHAR},
+      <if test="intendedProject != null">
+        intended_project = #{intendedProject,jdbcType=VARCHAR},
       </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 04 17:27:08 CST 2021.
-    -->
-    update organization_identity
-    set `uid` = #{uid,jdbcType=VARCHAR},
-      contacts = #{contacts,jdbcType=VARCHAR},
-      contact_mobile = #{contactMobile,jdbcType=VARCHAR},
-      fixed_tel = #{fixedTel,jdbcType=VARCHAR},
-      qq = #{qq,jdbcType=VARCHAR},
-      postal_address = #{postalAddress,jdbcType=VARCHAR},
-      postcode = #{postcode,jdbcType=VARCHAR},
-      unit_name = #{unitName,jdbcType=VARCHAR},
-      registered_capital = #{registeredCapital,jdbcType=DECIMAL},
-      licence_number = #{licenceNumber,jdbcType=VARCHAR},
-      licence_province = #{licenceProvince,jdbcType=INTEGER},
-      licence_city = #{licenceCity,jdbcType=INTEGER},
-      licence_area = #{licenceArea,jdbcType=INTEGER},
-      licence_scanning_url = #{licenceScanningUrl,jdbcType=VARCHAR},
-      org_code = #{orgCode,jdbcType=VARCHAR},
-      org_code_url = #{orgCodeUrl,jdbcType=VARCHAR},
-      bank_account = #{bankAccount,jdbcType=VARCHAR},
-      banks = #{banks,jdbcType=VARCHAR},
-      bank_branch = #{bankBranch,jdbcType=VARCHAR},
-      bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
-      validation_amount = #{validationAmount,jdbcType=DECIMAL},
-      identity_type = #{identityType,jdbcType=INTEGER},
-      location_province = #{locationProvince,jdbcType=INTEGER},
-      location_city = #{locationCity,jdbcType=INTEGER},
-      location_area = #{locationArea,jdbcType=INTEGER},
-      legal_person = #{legalPerson,jdbcType=VARCHAR},
-      legal_person_id_card = #{legalPersonIdCard,jdbcType=VARCHAR},
-      last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR},
-      audit_status = #{auditStatus,jdbcType=INTEGER},
-      `process` = #{process,jdbcType=INTEGER},
-      wrong_count = #{wrongCount,jdbcType=INTEGER},
-      payment_date = #{paymentDate,jdbcType=TIMESTAMP},
-      listed = #{listed,jdbcType=INTEGER},
-      listed_date = #{listedDate,jdbcType=TIMESTAMP},
-      listed_type = #{listedType,jdbcType=INTEGER},
-      stock_code = #{stockCode,jdbcType=VARCHAR},
-      certificate_number = #{certificateNumber,jdbcType=VARCHAR},
-      issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
-      cog_contacts = #{cogContacts,jdbcType=INTEGER},
-      tech_principal = #{techPrincipal,jdbcType=VARCHAR},
-      contacts_fixed_tel = #{contactsFixedTel,jdbcType=VARCHAR},
-      contacts_fax = #{contactsFax,jdbcType=VARCHAR},
-      legal_person_tel = #{legalPersonTel,jdbcType=VARCHAR},
-      legal_person_fax = #{legalPersonFax,jdbcType=VARCHAR},
-      legal_person_email = #{legalPersonEmail,jdbcType=VARCHAR},
-      registration_time = #{registrationTime,jdbcType=TIMESTAMP},
-      ratepay_code = #{ratepayCode,jdbcType=VARCHAR},
-      industry = #{industry,jdbcType=INTEGER},
-      enterprise_scale = #{enterpriseScale,jdbcType=VARCHAR},
-      register_type = #{registerType,jdbcType=VARCHAR},
-      foreign_investment = #{foreignInvestment,jdbcType=VARCHAR},
-      field = #{field,jdbcType=VARCHAR},
-      tax_authority = #{taxAuthority,jdbcType=INTEGER},
-      ratepay_method = #{ratepayMethod,jdbcType=INTEGER},
-      high_tech_zone = #{highTechZone,jdbcType=INTEGER},
-      risk_investment = #{riskInvestment,jdbcType=INTEGER},
-      business_scope = #{businessScope,jdbcType=VARCHAR},
-      high_tech_name = #{highTechName,jdbcType=VARCHAR},
-      patent_prory_statement_url = #{patentProryStatementUrl,jdbcType=VARCHAR},
-      international = #{international,jdbcType=INTEGER},
-      review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
-      investment = #{investment,jdbcType=INTEGER},
-      year_sales_amount = #{yearSalesAmount,jdbcType=DECIMAL},
-      last_year_research_amount = #{lastYearResearchAmount,jdbcType=DECIMAL},
-      assets = #{assets,jdbcType=DECIMAL},
-      qualification = #{qualification,jdbcType=VARCHAR},
-      cooperation_situation = #{cooperationSituation,jdbcType=VARCHAR},
-      sales_target = #{salesTarget,jdbcType=VARCHAR},
-      honor_picture = #{honorPicture,jdbcType=LONGVARCHAR}
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 04 17:27:08 CST 2021.
-    -->
     update organization_identity
     set `uid` = #{uid,jdbcType=VARCHAR},
       contacts = #{contacts,jdbcType=VARCHAR},
@@ -993,7 +868,9 @@
       assets = #{assets,jdbcType=DECIMAL},
       qualification = #{qualification,jdbcType=VARCHAR},
       cooperation_situation = #{cooperationSituation,jdbcType=VARCHAR},
-      sales_target = #{salesTarget,jdbcType=VARCHAR}
+      honor_picture = #{honorPicture,jdbcType=VARCHAR},
+      sales_target = #{salesTarget,jdbcType=VARCHAR},
+      intended_project = #{intendedProject,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
 	<select id="selectOrgIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
@@ -1005,7 +882,7 @@
 
 
 	<select id="selectOrgIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgIdentityBo">
-		select 
+		select
 		t.id,t.uid,t.contacts,t.fixed_tel as fixedTel,
 		t.qq,t.postal_address
 		as postalAddress ,t.postcode,
@@ -1020,7 +897,7 @@
 	<select id="selectAllOrgIndentity" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgUnitNames">
 		select u.id as uid, i.unit_name as unitName
 		from user u INNER JOIN
-		organization_identity i on u.id = i.uid 
+		organization_identity i on u.id = i.uid
 		where
 		i.audit_status = 5
 		 and u.lvl &gt; 0
@@ -1071,24 +948,24 @@
 		on oi.uid = ohr.uid and ohr.year = #{1}
 		where oi.uid = #{0}
 	</select>
-	
+
 	<select id="selectOrgIdentityDetailByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgIdentityDetailBo">
-		select 
+		select
 			id, uid, unit_name as unitName, identity_type as identityType,
 			legal_person as legalPerson, legal_person_id_card as legalPersonIdCard, registration_time as registrationTime,
 			licence_number as licenceNumber, licence_province as licenceProvince, licence_city as licenceCity,
 			licence_area as licenceArea, licence_scanning_url as licenceScanningUrl, org_code as orgCode,
 			org_code_url as orgCodeUrl, banks, bank_branch as bankBranch, bank_card_number as bankCardNumber,
 			location_province as locationProvince, location_city as locationCity, location_area as locationArea,
-			validation_amount as validationAmount, payment_date as paymentDate, audit_status as auditStatus, 
+			validation_amount as validationAmount, payment_date as paymentDate, audit_status as auditStatus,
 			last_year_tax_report_url as lastYearTaxReportUrl
-		from organization_identity 
+		from organization_identity
 		where uid = #{uid,jdbcType=VARCHAR}
 	</select>
-	
-	
+
+
 	<select id="selectAuditorOrgIdentityDetailByUserId" resultType="com.goafanti.user.bo.AuditorOrgIdentityDetailBo">
-		select  
+		select
 			 u.aid, u.mid, u.lvl,
 			 oi.id, oi.uid, oi.unit_name as unitName,  oi.identity_type as identityType,
 			 oi.legal_person as legalPerson,  oi.legal_person_id_card as legalPersonIdCard,  oi.registration_time as registrationTime,
@@ -1099,49 +976,49 @@
 			 oi.validation_amount as validationAmount,  oi.payment_date as paymentDate,  oi.audit_status as auditStatus,
 			 oi.last_year_tax_report_url as lastYearTaxReportUrl, oi.field, oi.registered_capital as registeredCapital,
 			 ratepay.id as ratepayId
-		from user u 
+		from user u
 		LEFT JOIN organization_identity oi on oi.uid = u.id
 		LEFT JOIN org_ratepay ratepay on ratepay.uid = u.id and ratepay.year = #{year,jdbcType=INTEGER} and deleted_sign = 0
 		where u.id = #{uid,jdbcType=VARCHAR}
 	</select>
-	
+
 	<select id="selectManagerUnitNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgUnitNames">
 		select u.id as uid, i.unit_name as unitName
 		from user u INNER JOIN
-		organization_identity i on u.id = i.uid 
+		organization_identity i on u.id = i.uid
 		where u.lvl = 1
 		<if test="_parameter != null">
 			and u.mid = #{aid,jdbcType=VARCHAR}
 		</if>
 	</select>
-	
+
 	<select id="selectManagerAchievementOrgOwner" resultType="com.goafanti.user.bo.OrgUnitNames">
 		select u.id as uid, i.unit_name as unitName
 		from user u INNER JOIN
-		organization_identity i on u.id = i.uid 
+		organization_identity i on u.id = i.uid
 		where u.lvl = 1 and i.unit_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
 		<if test="aid != null">
 			and u.mid = #{aid,jdbcType=VARCHAR}
 		</if>
 	</select>
-	
+
 	<select id="selectAchievementOrgOwner" resultType="com.goafanti.user.bo.OrgUnitNames">
 		select u.id as uid, i.unit_name as unitName
 		from user u INNER JOIN
-		organization_identity i on u.id = i.uid 
+		organization_identity i on u.id = i.uid
 		where u.lvl = 1 and i.unit_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
 		<if test="aid != null">
 			and u.aid = #{aid,jdbcType=VARCHAR}
 		</if>
 	</select>
-	
-	
+
+
 	<select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.portal.bo.OrgSubscriberListBo">
 			SELECT
-				u.id as uid, 
-				oi.unit_name as unitName, 
+				u.id as uid,
+				oi.unit_name as unitName,
 				u.number,
-				oi.id as identityId, 
+				oi.id as identityId,
 				info.logo_url as logoUrl,
 				oi.licence_province as province,
 				adc.achievement_count as achievementNum,
@@ -1155,7 +1032,7 @@
 			WHERE
 				u.type = 1
 			<if test="null != level and level==1 ">
-				AND u.lvl <![CDATA[ >= ]]> 1 
+				AND u.lvl <![CDATA[ >= ]]> 1
 			</if>
 			<if test="null !=level and level==0">
 				AND u.lvl = 0
@@ -1175,14 +1052,14 @@
 			<if test="name != null">
 				AND oi.unit_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
 			</if>
-		ORDER BY u.number 
+		ORDER BY u.number
 		<if test="page_sql!=null">
 			${page_sql}
 		</if>
   </select>
-  
+
   <select id="findSearchSubscriberCount" parameterType="String" resultType="java.lang.Integer">
-	 	SELECT 
+	 	SELECT
 		 	count(1)
 		FROM
 		<![CDATA[ user ]]> u
@@ -1192,7 +1069,7 @@
 			WHERE
 				u.type = 1
 			<if test="null != level and level==1 ">
-				AND u.lvl <![CDATA[ >= ]]> 1 
+				AND u.lvl <![CDATA[ >= ]]> 1
 			</if>
 			<if test="null !=level and level==0">
 				AND u.lvl = 0
@@ -1213,9 +1090,9 @@
 				AND oi.unit_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
 			</if>
   </select>
-  
+
   <update id="updateServiceByUid" parameterType="com.goafanti.common.model.OrganizationIdentity">
-   
+
     update organization_identity
     <set>
       <if test="contacts != null">
@@ -1303,7 +1180,7 @@
         audit_status = #{auditStatus,jdbcType=INTEGER},
       </if>
       <if test="process != null">
-        process = #{process,jdbcType=INTEGER},
+        `process` = #{process,jdbcType=INTEGER},
       </if>
       <if test="wrongCount != null">
         wrong_count = #{wrongCount,jdbcType=INTEGER},
@@ -1416,15 +1293,24 @@
       <if test="cooperationSituation != null">
         cooperation_situation = #{cooperationSituation,jdbcType=VARCHAR},
       </if>
+      <if test="honorPicture != null">
+        honor_picture = #{honorPicture,jdbcType=VARCHAR},
+      </if>
+      <if test="salesTarget != null">
+        sales_target = #{salesTarget,jdbcType=VARCHAR},
+      </if>
+      <if test="intendedProject != null">
+        intended_project = #{intendedProject,jdbcType=VARCHAR},
+      </if>
     </set>
     where uid = #{uid,jdbcType=VARCHAR}
   </update>
-  
+
   <insert id="insertBatch" parameterType="com.goafanti.user.bo.InputUserChannel">
     INSERT INTO organization_identity
 	(id, uid, contacts, contact_mobile,location_province,location_city)VALUES
       <foreach item="item" index="index" collection="list" separator=",">
-      (UUID(), #{item.uid,jdbcType=VARCHAR}, #{item.contacts,jdbcType=VARCHAR}, 
+      (UUID(), #{item.uid,jdbcType=VARCHAR}, #{item.contacts,jdbcType=VARCHAR},
       #{item.contactMobile,jdbcType=VARCHAR}, #{item.province,jdbcType=TIMESTAMP}, #{item.city,jdbcType=TIMESTAMP})
     </foreach>
   </insert>

+ 1 - 1
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1658,7 +1658,7 @@
 
   <select id="selectPrivateOrganizationCustomerList" resultType="com.goafanti.customer.bo.CustomerListOut">
     select a.id uid,a.aid,a.nickname name,a.society_tag societyTag,a.`level`,b.name aName,dg1.name as province,dg2.name as city,
-    a.guidance, dg3.name as area,
+    a.guidance, dg3.name as area,d.intended_project  intendedProject,d.business_scope businessScope,
     date_format(um.last_sign_time,'%Y-%m-%d %H:%i:%S') lastSignTime,
     date_format(a.transfer_time,'%Y-%m-%d %H:%i:%S') as transferTime,
     date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTime,

+ 4 - 1
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -511,6 +511,8 @@
 			dg3.name as area,
 			c.name as industry,
 			a.channel,
+			b.intended_project  intendedProject,
+			b.business_scope businessScope,
 			d.name as adminName
 		from user a
 		left join organization_identity b on a.id = b.uid
@@ -1975,7 +1977,8 @@ inner join(
    select a.id,a.uid,b.nickname userName,a.aid,a.status,date_format(a.distribution_time,'%Y-%m-%d %H:%i:%S')distributionTimes,
    a.distribution_time distributionTime,date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes ,c.contacts ,
    c.contact_mobile contactMobile,e.name channelName,b.society_tag societyTag ,d1.name province,d2.name city,
-   f.name adminName ,b.guidance,a.recovery,a.remarks from user_channel a
+   f.name adminName ,b.guidance,a.recovery,a.remarks,c.intended_project  intendedProject,c.business_scope businessScope
+	from user_channel a
     left join user b on a.uid=b.id  left join organization_identity c on a.uid =c.uid
     left join district_glossory d1 on c.location_province =d1.id
     left join district_glossory d2 on c.location_city =d2.id

File diff suppressed because it is too large
+ 922 - 1704
src/main/java/com/goafanti/common/model/OrganizationIdentity.java


+ 10 - 0
src/main/java/com/goafanti/customer/bo/CustomerListIn.java

@@ -72,6 +72,16 @@ public class CustomerListIn {
 
 	private String businessScope;
 
+	private String intendedProject;
+
+	public String getIntendedProject() {
+		return intendedProject;
+	}
+
+	public void setIntendedProject(String intendedProject) {
+		this.intendedProject = intendedProject;
+	}
+
 	public String getBusinessScope() {
 		return businessScope;
 	}

+ 121 - 0
src/main/java/com/goafanti/customer/bo/InputAddCustomer.java

@@ -0,0 +1,121 @@
+package com.goafanti.customer.bo;
+
+public class InputAddCustomer {
+    private String name;
+    private String contacts;
+    private String contactMobile;
+    private Integer type;
+    private Integer province;
+    private Integer city;
+    private Integer area;
+    private Integer source;
+    private String societyTag;
+    private String position;
+    private Integer industry;
+    private String businessScope;
+    private String intendedProject;
+
+    public String getIntendedProject() {
+        return intendedProject;
+    }
+
+    public void setIntendedProject(String intendedProject) {
+        this.intendedProject = intendedProject;
+    }
+
+    public String getPosition() {
+        return position;
+    }
+
+    public void setPosition(String position) {
+        this.position = position;
+    }
+
+    public Integer getIndustry() {
+        return industry;
+    }
+
+    public void setIndustry(Integer industry) {
+        this.industry = industry;
+    }
+
+    public String getBusinessScope() {
+        return businessScope;
+    }
+
+    public void setBusinessScope(String businessScope) {
+        this.businessScope = businessScope;
+    }
+
+    public String getName() {
+        return name.replace(" ", "");
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getContacts() {
+        return contacts;
+    }
+
+    public void setContacts(String contacts) {
+        this.contacts = contacts;
+    }
+
+    public String getContactMobile() {
+        return contactMobile;
+    }
+
+    public void setContactMobile(String contactMobile) {
+        this.contactMobile = contactMobile;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Integer getProvince() {
+        return province;
+    }
+
+    public void setProvince(Integer province) {
+        this.province = province;
+    }
+
+    public Integer getCity() {
+        return city;
+    }
+
+    public void setCity(Integer city) {
+        this.city = city;
+    }
+
+    public Integer getArea() {
+        return area;
+    }
+
+    public void setArea(Integer area) {
+        this.area = area;
+    }
+
+    public Integer getSource() {
+        return source;
+    }
+
+    public void setSource(Integer source) {
+        this.source = source;
+    }
+
+    public String getSocietyTag() {
+        return societyTag;
+    }
+
+    public void setSocietyTag(String societyTag) {
+        this.societyTag = societyTag;
+    }
+}

+ 16 - 6
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -271,12 +271,13 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * @throws Exception 
 	 * @throws NumberFormatException **/
 	@RequestMapping(value = "/addCustomer", method = RequestMethod.POST)
-	public Result addCustomer(String name,String contacts,String contactMobile,Integer type,
-			 Integer province ,Integer city, Integer area,Integer source,String societyTag) throws Exception{
+	public Result addCustomer(InputAddCustomer in) throws Exception{
 		Result res = new Result();
-		if(StringUtils.isBlank(name) || StringUtils.isBlank(contacts)
-				|| StringUtils.isBlank(contactMobile) || StringUtils.isBlank(societyTag)||null==province||null==city||null==area){
-			res.getError().add(buildError("","客户名称、联系人、联系电话、社会性质、地址不能为空"));
+		if(StringUtils.isBlank(in.getName()) || StringUtils.isBlank(in.getContacts())
+				|| StringUtils.isBlank(in.getContactMobile()) ||null==in.getProvince()||null==in.getCity()||null==in.getArea()
+				|| StringUtils.isBlank(in.getBusinessScope())
+				|| StringUtils.isBlank(in.getIntendedProject())){
+			res.getError().add(buildError("","创建客户参数不全"));
 			return res;
 		}
 		if (customerService.checkMax(TokenManager.getAdminId())) {
@@ -284,7 +285,7 @@ public class AdminCustomerApiController extends BaseApiController{
 			return res;
 		}
 		//将新增客户的空格去除
-		customerService.addCustomer(name.replace(" ", ""), contacts, contactMobile,type,source,societyTag,province,city,area);
+		res.data(customerService.addCustomer(in));
 		return res;
 	}
 	
@@ -1362,6 +1363,15 @@ public class AdminCustomerApiController extends BaseApiController{
 		return res;
 	}
 
+	/** 修改客户关键资料 **/
+	@RequestMapping(value = "/updateUserDate", method = RequestMethod.POST)
+	public Result updateUserDate(String uid,Integer province,Integer city,Integer area,String businessScope,String intendedProject){
+		Result res = new Result();
+
+		res.data(customerService.updateUserDate(uid, province, city, area, businessScope, intendedProject));
+		return res;
+	}
+
 
 	/** 客户名称列表 **/
 	@RequestMapping(value = "/listUserName", method = RequestMethod.GET)

+ 4 - 11
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -111,18 +111,10 @@ public interface CustomerService {
 	int judgeCustomerByName(String name);
 	
 	/**
-	 * 
-	 * @param name 客户名
-	 * @param contacts 联系人
-	 * @param contactMobile 联系电话
-	 * @param type 客户类型
-	 * @param societyTag 社会属性
-	 * @param area 
-	 * @param city 
-	 * @param province 
+	 *
 	 * @return
 	 */
-	int addCustomer(String name,String contacts,String contactMobile,Integer type,Integer source,String societyTag, Integer province, Integer city, Integer area)  throws BusinessException;
+	int addCustomer(InputAddCustomer in)  throws BusinessException;
 	
 	
 	/**
@@ -277,7 +269,6 @@ public interface CustomerService {
 
 	/**
 	 * 查询所有的业务列表
-	 * @param bfb
 	 * @return
 	 */
 	Pagination<BusinessListBo> listAllBusiness(BusinessListBo blo, Integer pageNo, Integer pageSize);
@@ -545,4 +536,6 @@ public interface CustomerService {
 	int updateuserBusinessScope(String id, String businessScope);
 
 	boolean checkData(String uid, String aid);
+
+    int updateUserDate(String uid,Integer province, Integer city, Integer area, String businessScope, String intendedProject);
 }

+ 52 - 29
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -299,68 +299,73 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 	@Override
 	@Transactional
-	public int addCustomer(String name, String contacts, String contactMobile, Integer type, Integer source,
-			String societyTag, Integer province, Integer city, Integer area) throws BusinessException {
+	public int addCustomer(InputAddCustomer in) throws BusinessException {
 		User user = new User();
 		Date now = new Date();
 		String uid = UUID.randomUUID().toString();
 		String identifyId = UUID.randomUUID().toString();
 		user.setId(uid);
 		user.setSource(1);// 客户来源为录入
-		user.setIdentifyName(name);
-		user.setNickname(name);
-		user.setUsername(name);
+		user.setIdentifyName(in.getName());
+		user.setNickname(in.getName());
+		user.setUsername(in.getName());
 		user.setStatus(AFTConstants.USER_STATUS_NORMAL);
 		user.setShareType(AFTConstants.NO);
 		user.setAid(TokenManager.getAdminId());
 //		user.setAid("1");
-		user.setType(type);
+		user.setType(in.getType());
 		user.setLvl(UserLevel.CERTIFIED.getCode());
-		user.setSocietyTag(societyTag);
+//		user.setSocietyTag(in.getSocietyTag());
 		user.setCreateTime(now);
 		user.setTransferTime(now);
 		user.setUpdateTime(now);
-		user.setMobile(contactMobile);
+		user.setMobile(in.getContactMobile());
 		user.setPassword(AFTConstants.INITIALPASSWORD);
 		user.setInformationMaintainer(TokenManager.getAdminId());
 		float f = 0;
 		user.setIntegrity(f);
 //		user.setInformationMaintainer("1");
 		passwordUtil.encryptPassword(user);
-		if (type == UserType.PERSONAL.getCode()) {
-			if (userMapper.checkUser("", "", contactMobile, type, null, null).size() > 0)
-				throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_EXIST, name, ""));
+		if (in.getType() == UserType.PERSONAL.getCode()) {
+			if (userMapper.checkUser("", "", in.getContactMobile(), in.getType(), null, null).size() > 0)
+				throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_EXIST, in.getName(), ""));
 			UserIdentity ui = new UserIdentity();
 			ui.setId(identifyId);
 			ui.setUid(uid);
-			ui.setContacts(contacts);
-			ui.setContactMobile(contactMobile);
-			ui.setUsername(name);
-			ui.setProvince(province);
-			ui.setCity(city);
-			ui.setArea(area);
+			ui.setContacts(in.getContacts());
+			ui.setContactMobile(in.getContactMobile());
+			ui.setUsername(in.getName());
+			ui.setProvince(in.getProvince());
+			ui.setCity(in.getCity());
+			ui.setArea(in.getArea());
 			ui.setExpert(AFTConstants.NO);
 			ui.setCelebrity(AFTConstants.NO);
 			ui.setInternational(AFTConstants.NO);
 			ui.setAuditStatus(IdentityProcess.SUCCESS.getCode());// 认证个人
 			userIdentityMapper.insert(ui);
-		} else if (type == UserType.ORGANIZATION.getCode()) {
-			if (userMapper.checkUser("", name, "", type, null, null).size() > 0)
-				throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_EXIST, name, ""));
+		} else if (in.getType() == UserType.ORGANIZATION.getCode()) {
+			if (userMapper.checkUser("", in.getName(), "", in.getType(), null, null).size() > 0)
+				throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_EXIST, in.getName(), ""));
 			// 创建企业认证信息
 			OrganizationIdentity oi = new OrganizationIdentity();
-			oi.setUnitName(name);
+			oi.setUnitName(in.getName());
 			oi.setId(identifyId);
 			oi.setUid(uid);
-			oi.setContacts(contacts);
-			oi.setContactMobile(contactMobile);
-			oi.setLocationProvince(province);
-			oi.setLocationCity(city);
-			oi.setLocationArea(area);
+			oi.setContacts(in.getContacts());
+			oi.setContactMobile(in.getContactMobile());
+			oi.setLocationProvince(in.getProvince());
+			oi.setLocationCity(in.getCity());
+			oi.setLocationArea(in.getArea());
 			oi.setHighTechZone(AFTConstants.NO);
 			oi.setInternational(AFTConstants.NO);
 			oi.setListed(AFTConstants.NO);
 			oi.setAuditStatus(IdentityProcess.SUCCESS.getCode()); // 实名企业
+			oi.setBusinessScope(in.getBusinessScope());
+			if(in.getBusinessScope()!=null){
+				updateBusinessScope(uid,in.getBusinessScope(),null,now);
+			}
+			oi.setIntendedProject(in.getIntendedProject());
+//			oi.setIndustry(in.getIndustry());
 			organizationIdentityMapper.insert(oi);
 		}
 		userMapper.insert(user);
@@ -373,9 +378,10 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		cob.setAid(TokenManager.getAdminId());
 		cob.setAname(adminMapper.selectByPrimaryKey(TokenManager.getAdminId()).getName());
 		cob.setId(UUID.randomUUID().toString());
+		cob.setPosition(in.getPosition());
 		cob.setUid(uid);
-		cob.setName(contacts);
-		cob.setMobile(contactMobile);
+		cob.setName(in.getContacts());
+		cob.setMobile(in.getContactMobile());
 		cob.setMajor(AFTConstants.YES);
 		organizationContactBookMapper.insert(cob);
 		// 新增锁定数据
@@ -2316,10 +2322,27 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		List<String> list=Arrays.asList(uid.split(","));
 		for (String s : list) {
 			User u=userMapper.selectByPrimaryKey(s);
-			if (u.getInformationMaintainer().equals(aid)){
+			if (!u.getInformationMaintainer().equals(aid)){
 				return true;
 			}
 		}
 	return false;
 	}
+
+	@Override
+	public int updateUserDate(String uid,Integer province, Integer city, Integer area, String businessScope, String intendedProject) {
+		OrganizationIdentity oi =new OrganizationIdentity();
+		oi.setUid(uid);
+		oi.setLocationProvince(province);
+		oi.setLocationCity(city);
+		oi.setLocationArea(area);
+		 if (businessScope!=null){
+			 OrganizationIdentity use=organizationIdentityMapper.selectOrgIdentityByUserId(uid);
+			updateBusinessScope(uid,businessScope,use.getBusinessScope(),new Date());
+		}
+		OrganizationIdentity use=organizationIdentityMapper.selectOrgIdentityByUserId(uid);
+		oi.setBusinessScope(businessScope);
+		oi.setIntendedProject(intendedProject);
+		return organizationIdentityMapper.updateServiceByUid(oi);
+	}
 }

+ 11 - 1
src/main/java/com/goafanti/user/bo/OutUserChannel.java

@@ -95,7 +95,17 @@ public class OutUserChannel  {
 	private Integer status;
 	
 	private Integer days;
-    public String getRemarks() {
+	private String intendedProject;
+
+	public String getIntendedProject() {
+		return intendedProject;
+	}
+
+	public void setIntendedProject(String intendedProject) {
+		this.intendedProject = intendedProject;
+	}
+
+	public String getRemarks() {
 		return remarks;
 	}