Enford vor 5 Jahren
Ursprung
Commit
93c9f9b2ac

+ 6 - 6
src/main/resources/jeeplus.properties

@@ -6,11 +6,11 @@
 jdbc.type=mysql
 jdbc.driver=com.mysql.jdbc.Driver
 db.name=ruihuaoa-activity-data
-jdbc.url=jdbc:mysql://192.168.2.4:3306/total_process_master?useUnicode=true&characterEncoding=utf-8
-#jdbc.url=jdbc:mysql://127.0.0.1:3306/total_process_master?useUnicode=true&characterEncoding=utf-8
+#jdbc.url=jdbc:mysql://192.168.2.4:3306/total_process_master?useUnicode=true&characterEncoding=utf-8
+jdbc.url=jdbc:mysql://127.0.0.1:3306/total_process_master?useUnicode=true&characterEncoding=utf-8
 jdbc.username=root
-#jdbc.password=123456
-jdbc.password=root
+jdbc.password=123456
+#jdbc.password=root
 
 #pool settings
 jdbc.pool.init=20
@@ -32,8 +32,8 @@ jdbc.testSql=SELECT 'x' FROM DUAL
 
 #redis settings
 redis.keyPrefix=jeeplus
-redis.host=192.168.2.4
-#redis.host=127.0.0.1
+#redis.host=192.168.2.4
+redis.host=127.0.0.1
 #redis.port=6380
 redis.port=6379
 redis.timeout = 2000

+ 25 - 0
src/main/resources/mappings/modules/projectclientlinkman/ruralProjectClientLinkmanDao.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectClientLinkmanDao">
+
+	<insert id="batchInsert" parameterType="java.util.Map">
+		INSERT INTO project_client_linkman
+		(project_id ,linkman_id, client_id, is_entrust)
+		VALUES
+		<foreach collection="linkmanList" item="linkman" separator=",">
+			( #{projectId}, #{linkman.id}, #{linkman.clientId.id}, #{isEntrust})
+		</foreach>
+	</insert>
+
+	<delete id="deleteProjectLinkmans">
+		DELETE FROM project_client_linkman
+		WHERE project_id = #{projectId}
+		AND is_entrust = #{isEntrust}
+	</delete>
+
+	<select id="getLinkManByNameAndOffice" parameterType="WorkClientLinkman" resultType="WorkClientLinkman">
+		select *
+		from project_client_linkman
+		where name = #{name} and office = #{office}
+	</select>
+</mapper>

+ 341 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsAlterDao.xml

@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectRecordsAlterDao">
+
+	<sql id="ProjectRecordsAlterColumns">
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.contract_id AS "workContractInfo.id",
+		a.project_id AS "projectId",
+		a.project_name AS "projectName",
+		a.scale_type AS "scaleType",
+		a.scale_unit AS "scaleUnit",
+		a.scale_quantity AS "scaleQuantity",
+		a.area_id AS "area.id",
+		a.project_site AS "projectSite",
+		a.project_desc AS "projectDesc",
+		a.remarks AS "remarks",
+		a.status AS "projectStatus",
+		a.process_instance_id AS "processInstanceId",
+		a.company_id AS "company.id",
+		a.office_id AS "office.id",
+		a.alter_reason AS "alterReason",
+		a.alter_before_id AS "alterBeforeRecords.id",
+		a.alter_project_id AS "alterProjectId",
+		area.name AS "area.name",
+		a.province,
+		a.city,
+		a.area_name AS "areaName",
+		a.project_structure AS "projectStructure",
+		a.on_ground_num AS "onGroundNum",
+		a.under_ground_num AS "underGroundNum",
+		a.building_scale AS "buildingScale",
+		a.measuring_unit AS "measuringUnit",
+		a.project_use AS "projectUse",
+		a.install_fees AS "installFees",
+		a.building_fees AS "buildingFees",
+		a.building_percent AS "buildingPercent",
+		a.install_percent AS "installPercent",
+		a.unit_fees AS "unitFees",
+		a.building_unit_fees AS "buildingUnitFees",
+		a.install_unit_fees AS "installUnitFees",
+		a.total_fees AS "totalFees"
+	</sql>
+	
+	<sql id="ProjectRecordsAlterJoins">
+		LEFT JOIN sys_area area ON area.id = a.area_id
+	</sql>
+	
+    
+	<select id="get" resultType="RuralProjectRecordsAlter" >
+		SELECT
+			<include refid="ProjectRecordsAlterColumns"/>
+        ,su.name AS "createBy.name"
+        ,o.name AS "office.name"
+		FROM rural_project_records_alter a
+		<include refid="ProjectRecordsAlterJoins"/>
+        LEFT JOIN sys_user su ON su.id = a.create_by
+        LEFT JOIN sys_office o ON o.id = a.office_id
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="RuralProjectRecordsAlter" >
+		SELECT DISTINCT
+			<include refid="ProjectRecordsAlterColumns"/>
+		,
+		wci.name AS "workContractInfo.name",
+		wct.id AS "workContractInfo.client.id",
+		wct.name AS "workContractInfo.client.name"
+		FROM rural_project_records_alter a
+		<include refid="ProjectRecordsAlterJoins"/>
+		LEFT JOIN work_project_user w on a.id = w.project_id
+		LEFT JOIN sys_user u on w.user_id = u.id
+		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+		LEFT JOIN work_client_info wct on wci.client_id = wct.id
+        LEFT JOIN sys_office s ON s.id = a.company_id
+        LEFT JOIN sys_office o ON o.id = a.office_id
+		<where>
+			<if test="id != null and id != ''">
+				AND a.id = #{id}
+			</if>
+			<if test="projectName != null and projectName != ''">
+				AND a.project_name like concat(concat('%',#{projectName}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+			</if>
+            <if test="leaderNameStr !=null and leaderNameStr !=''">
+                AND u.name like concat(concat('%',#{leaderNameStr}),'%')
+            </if>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+            AND w.is_master = '1'
+            ${sqlMap.dsf}
+		</where>
+            GROUP BY a.id
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="RuralProjectRecordsAlter" >
+		SELECT 
+			<include refid="ProjectRecordsAlterColumns"/>
+		FROM rural_project_records_alter a
+		<include refid="ProjectRecordsAlterJoins"/>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert">
+		INSERT INTO rural_project_records_alter(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			contract_id,
+			project_id,
+			project_name,
+			scale_type,
+			scale_unit,
+			scale_quantity,
+			area_id,
+			project_site,
+			project_desc,
+			remarks,
+			status,
+			company_id,
+		    office_id,
+		    alter_reason,
+		    alter_before_id,
+		    alter_project_id,
+		    province,
+		    city,
+		    area_name,
+		    project_structure,
+		    on_ground_num,
+		    under_ground_num,
+		    building_scale,
+		    measuring_unit,
+		    project_use,
+		    install_fees,
+		    building_fees,
+		    building_percent,
+		    install_percent,
+		    unit_fees,
+		    building_unit_fees,
+		    install_unit_fees,
+		    total_fees
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{workContractInfo.id},
+			#{projectId},
+			#{projectName},
+			#{scaleType},
+			#{scaleUnit},
+			#{scaleQuantity},
+			#{area.id},
+			#{projectSite},
+			#{projectDesc},
+			#{remarks},
+			#{projectStatus},
+			#{company.id},
+			#{office.id},
+			#{alterReason},
+			#{alterBeforeRecords.id},
+			#{alterProjectId},
+			#{province},
+			#{city},
+			#{county},
+			#{projectStructure},
+			#{onGroundNum},
+			#{underGroundNum},
+			#{buildingScale},
+			#{measuringUnit},
+			#{projectUse},
+			#{installFees},
+			#{buildingFees},
+			#{buildingPercent},
+			#{installPercent},
+			#{unitFees},
+			#{buildingUnitFees},
+			#{installUnitFees},
+			#{totalFees}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE rural_project_records_alter SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			contract_id = #{workContractInfo.id},
+			project_id = #{projectId},
+			project_name = #{projectName},
+			scale_type = #{scaleType},
+			scale_unit = #{scaleUnit},
+			scale_quantity = #{scaleQuantity},
+			area_id = #{area.id},
+			project_site = #{projectSite},
+			project_desc = #{projectDesc},
+			remarks = #{remarks},
+			status = #{projectStatus},
+			company_id = #{company.id},
+			office_id = #{office.id},
+			alter_reason = #{alterReason},
+			alter_before_id = #{alterBeforeRecords.id},
+			alter_project_id = #{alterProjectId},
+			province = #{province},
+		    city = #{city},
+		    area_name = #{county},
+		    project_structure =  #{projectStructure},
+		    on_ground_num = #{onGroundNum},
+		    under_ground_num = #{underGroundNum},
+		    building_scale = #{buildingScale},
+		    measuring_unit =  #{measuringUnit},
+		    project_use =  #{projectUse},
+		    install_fees =  #{installFees},
+		    building_fees =  #{buildingFees},
+		    building_percent =  #{buildingPercent},
+		    install_percent =  #{installPercent},
+		    unit_fees = #{unitFees},
+		    building_unit_fees = #{buildingUnitFees},
+		    install_unit_fees =  #{installUnitFees},
+		    total_fees =  #{totalFees}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM rural_project_records_alter
+		WHERE id = #{id}
+	</update>
+	
+
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="RuralProjectRecordsAlter" statementType="STATEMENT">
+		select
+			<include refid="ProjectRecordsAlterColumns"/>
+		FROM rural_project_records_alter a
+		<include refid="ProjectRecordsAlterJoins"/>
+		where ${propertyName} = '${value}'
+	</select>
+
+    <update id="updateProcessIdAndStatus" >
+        UPDATE  rural_project_records_alter SET
+          process_instance_id = #{processInstanceId},
+          status = #{projectStatus}
+        WHERE id = #{id}
+    </update>
+	
+	<update id="updateSelectiveById">
+		UPDATE  rural_project_records_alter
+		<set>
+			<if test="updateBy!=null and updateBy.id!=null and updateBy.id!=''">
+				update_by = #{updateBy.id},
+			</if>
+			<if test="updateDate!=null">
+				update_date = #{updateDate},
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.id!=null and workContractInfo.id!=''">
+				contract_id = #{workContractInfo.id},
+			</if>
+			<if test="projectId!=null and projectId!=''">
+				project_id = #{projectId},
+			</if>
+			<if test="projectName!=null and projectName!=''">
+				project_name = #{projectName},
+			</if>
+			<if test="scaleType!=null and scaleType!=''">
+				scale_type = #{scaleType},
+			</if>
+			<if test="scaleUnit!=null and scaleUnit!=''">
+				scale_unit = #{scaleUnit},
+			</if>
+			<if test="scaleQuantity !=null and scaleQuantity != ''">
+				scale_quantity = #{scaleQuantity},
+			</if>
+			<if test="area!=null and area.id!=null and area.id!=''">
+				area_id = #{area.id},
+			</if>
+			<if test="projectSite!=null and projectSite!=''">
+				project_site = #{projectSite},
+			</if>
+			<if test="projectDesc!=null and projectDesc!=''">
+				project_desc = #{projectDesc},
+			</if>
+			<if test="remarks!=null and remarks!=''">
+				remarks = #{remarks},
+			</if>
+			<if test="projectStatus !=null and projectStatus != 0">
+				status = #{projectStatus},
+			</if>
+			<if test="company!=null and company.id!=null and company.id!=''">
+				company_id = #{company.id},
+			</if>
+			<if test="office!=null and office.id!=null and office.id!=''">
+				office_id = #{office.id},
+			</if>
+			<if test="alterReason!=null and alterReason!=''">
+				alter_reason = #{alterReason},
+			</if>
+			<if test="alterBeforeRecords!=null and alterBeforeRecords.id!=null and alterBeforeRecords.id!=''">
+				alter_before_id = #{alterBeforeRecords.id},
+			</if>
+			<if test="alterProjectId!=null and alterProjectId!=''">
+                alter_project_id = #{alterProjectId}
+			</if>
+		</set>
+		WHERE id = #{id}
+	</update>
+
+    <select id="countAlter" resultType="int">
+        SELECT count(*) from rural_project_records_alter where project_id = #{projectId}
+    </select>
+</mapper>

+ 629 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml

@@ -0,0 +1,629 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectRecordsDao">
+
+	<sql id="projectRecordsColumns">
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.contract_id AS "workContractInfo.id",
+		a.project_id AS "projectId",
+		a.project_name AS "projectName",
+		a.scale_type AS "scaleType",
+		a.scale_unit AS "scaleUnit",
+		a.scale_quantity AS "scaleQuantity",
+		a.area_id AS "area.id",
+		a.project_site AS "projectSite",
+		a.project_desc AS "projectDesc",
+		a.remarks AS "remarks",
+		a.status AS "projectStatus",
+		a.process_instance_id AS "processInstanceId",
+		a.company_id AS "company.id",
+		a.office_id AS "office.id",
+		a.alter_process_id AS "alterProcessId",
+		area.name AS "area.name",
+		a.province,
+		a.city,
+		a.area_name AS "county",
+		a.project_structure AS "projectStructure",
+		a.on_ground_num AS "onGroundNum",
+		a.under_ground_num AS "underGroundNum",
+		a.building_scale AS "buildingScale",
+		a.measuring_unit AS "measuringUnit",
+		a.project_use AS "projectUse",
+		a.install_fees AS "installFees",
+		a.building_fees AS "buildingFees",
+		a.building_percent AS "buildingPercent",
+		a.install_percent AS "installPercent",
+		a.unit_fees AS "unitFees",
+		a.building_unit_fees AS "buildingUnitFees",
+		a.install_unit_fees AS "installUnitFees",
+		a.total_fees AS "totalFees"
+	</sql>
+	
+	<sql id="projectRecordsJoins">
+		LEFT JOIN sys_area area ON area.id = a.area_id
+	</sql>
+	
+    
+	<select id="get" resultType="RuralProjectRecords" >
+		SELECT
+			<include refid="projectRecordsColumns"/>
+        ,su.name AS "createBy.name"
+        ,o.top_company AS "office.name"
+        FROM rural_project_records a
+        <include refid="projectRecordsJoins"/>
+        LEFT JOIN sys_user su ON su.id = a.create_by
+        LEFT JOIN sys_office o ON o.id = a.office_id
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="RuralProjectRecords" >
+		SELECT
+			<include refid="projectRecordsColumns"/>
+		,
+		wci.name AS "workContractInfo.name",
+		wct.id AS "workContractInfo.client.id",
+		wct.name AS "workContractInfo.client.name",
+		o.top_company AS "office.name"
+		FROM rural_project_records a
+		<include refid="projectRecordsJoins"/>
+
+        <if test="leaderNameStr !=null and leaderNameStr !=''">
+            LEFT JOIN work_project_user w on a.id = w.project_id
+            LEFT JOIN sys_user su on w.user_id = su.id
+        </if>
+        LEFT JOIN work_project_user w1 on a.id = w1.project_id
+		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+		LEFT JOIN work_client_info wct on wci.client_id = wct.id
+        LEFT JOIN sys_office o ON o.id = a.office_id
+		<where>
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id like concat('%',#{projectId},'%')
+			</if>
+			<if test="projectName != null and projectName != ''">
+				AND a.project_name like concat(concat('%',#{projectName}),'%')
+			</if>
+			<if test="scaleType != null and scaleType != ''">
+				AND a.scale_type = #{scaleType}
+			</if>
+			<if test="scaleUnit != null and scaleUnit != ''">
+				AND a.scale_unit = #{scaleUnit}
+			</if>
+			<if test="scaleQuantity != null and scaleQuantity != ''">
+				AND a.scale_quantity = #{scaleQuantity}
+			</if>
+			<if test="projectSite != null and projectSite != ''">
+				AND a.project_site LIKE concat('%',#{projectSite},'%')
+			</if>
+			<if test="remarks != null and remarks != ''">
+				AND a.remarks LIKE concat('%',#{remarks},'%')
+			</if>
+			<if test="projectDesc != null and projectDesc != ''">
+				AND a.project_desc LIKE concat('%',#{projectDesc},'%')
+			</if>
+			<if test="area != null and area.id != null and area.id != ''">
+				AND a.area_id = #{area.id}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractNum !=null and workContractInfo.contractNum !=''">
+				AND wci.contract_num like concat(concat('%',#{workContractInfo.contractNum}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractPrice !=null and workContractInfo.contractPrice !=''">
+				AND wci.contract_price = #{workContractInfo.contractPrice}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractType !=null and workContractInfo.contractType !=''">
+				AND wci.contract_type = #{workContractInfo.contractType}
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+			</if>
+            <if test="leaderNameStr !=null and leaderNameStr !=''">
+                AND su.name like concat(concat('%',#{leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
+            </if>
+            <if test="projectStatus !=null">
+                AND a.status = #{projectStatus}
+            </if>
+            <if test="beginDate !=null">
+                AND a.create_date >= #{beginDate}
+            </if>
+            <if test="endDate !=null">
+                AND a.create_date &lt; #{endDate}
+            </if>
+            AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+            <if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+               AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+            </if>
+		</where>
+            GROUP BY a.id
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+    <select id="queryCount" resultType="int" >
+        SELECT count(DISTINCT a.id)
+        FROM rural_project_records a
+        <if test="leaderNameStr !=null and leaderNameStr !=''">
+            LEFT JOIN work_project_user w on a.id = w.project_id
+            LEFT JOIN sys_user su on w.user_id = su.id
+        </if>
+        LEFT JOIN work_project_user w1 on a.id = w1.project_id
+        <if test="workContractInfo !=null">
+            LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+        </if>
+        <if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+            LEFT JOIN work_client_info wct on wci.client_id = wct.id
+        </if>
+        <where>
+            <if test="projectId != null and projectId != ''">
+                AND a.project_id like concat('%',#{projectId},'%')
+            </if>
+            <if test="projectName != null and projectName != ''">
+                AND a.project_name like concat(concat('%',#{projectName}),'%')
+            </if>
+            <if test="scaleType != null and scaleType != ''">
+                AND a.scale_type = #{scaleType}
+            </if>
+            <if test="scaleUnit != null and scaleUnit != ''">
+                AND a.scale_unit = #{scaleUnit}
+            </if>
+            <if test="scaleQuantity != null and scaleQuantity != ''">
+                AND a.scale_quantity = #{scaleQuantity}
+            </if>
+            <if test="projectSite != null and projectSite != ''">
+                AND a.project_site LIKE concat('%',#{projectSite},'%')
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND a.remarks LIKE concat('%',#{remarks},'%')
+            </if>
+            <if test="projectDesc != null and projectDesc != ''">
+                AND a.project_desc LIKE concat('%',#{projectDesc},'%')
+            </if>
+            <if test="area != null and area.id != null and area.id != ''">
+                AND a.area_id = #{area.id}
+            </if>
+            <if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+                AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+            </if>
+            <if test="workContractInfo !=null and workContractInfo.contractNum !=null and workContractInfo.contractNum !=''">
+                AND wci.contract_num like concat(concat('%',#{workContractInfo.contractNum}),'%')
+            </if>
+            <if test="workContractInfo !=null and workContractInfo.contractPrice !=null and workContractInfo.contractPrice !=''">
+                AND wci.contract_price = #{workContractInfo.contractPrice}
+            </if>
+            <if test="workContractInfo !=null and workContractInfo.contractType !=null and workContractInfo.contractType !=''">
+                AND wci.contract_type = #{workContractInfo.contractType}
+            </if>
+            <if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+                AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+            </if>
+            <if test="leaderNameStr !=null and leaderNameStr !=''">
+                AND su.name like concat(concat('%',#{leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
+            </if>
+            <if test="projectStatus !=null">
+                AND a.status = #{projectStatus}
+            </if>
+            <if test="beginDate !=null">
+                AND a.create_date >= #{beginDate}
+            </if>
+            <if test="endDate !=null">
+                AND a.create_date &lt; #{endDate}
+            </if>
+            AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+            <if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+                AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id})${sqlMap.dsf} )
+            </if>
+        </where>
+    </select>
+
+	<select id="findListByStatus" resultType="RuralProjectRecords" >
+		SELECT
+		<include refid="projectRecordsColumns"/>
+		,
+		wci.name AS "workContractInfo.name",
+		wci.contract_num AS "workContractInfo.contractNum",
+		wct.id AS "workContractInfo.client.id",
+		wct.name AS "workContractInfo.client.name",
+		o.top_company AS "office.name"
+		FROM rural_project_records a
+		<include refid="projectRecordsJoins"/>
+		LEFT JOIN work_project_user w on a.id = w.project_id
+		LEFT JOIN work_project_user w1 on a.id = w1.project_id
+        LEFT JOIN sys_user su on w.user_id = su.id
+        LEFT JOIN sys_user u on a.create_by = u.id
+		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+		LEFT JOIN work_client_info wct on wci.client_id = wct.id
+		LEFT JOIN sys_office s ON s.id = a.company_id
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		<where>
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id like concat('%',#{projectId},'%')
+			</if>
+			<if test="projectName != null and projectName != ''">
+				AND a.project_name like concat(concat('%',#{projectName}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+			</if>
+			<if test="leaderNameStr !=null and leaderNameStr !=''">
+				AND su.name like concat(concat('%',#{leaderNameStr}),'%')
+			</if>
+			AND w.is_master = '1' AND  a.status  = '5' AND a.del_flag='0'
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+                AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND (s.id = #{currentUser.company.id} or find_in_set( #{currentUser.company.id}, s.parent_ids ) ))${sqlMap.dsf} )
+			</if>
+            AND a.del_flag = #{DEL_FLAG_NORMAL}
+		</where>
+		GROUP BY a.id
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+    <select id="queryCountByStatus" resultType="int" >
+        SELECT count(DISTINCT a.id)
+        FROM rural_project_records a
+        LEFT JOIN work_project_user w on a.id = w.project_id
+        LEFT JOIN work_project_user w1 on a.id = w1.project_id
+        LEFT JOIN sys_user su on w.user_id = su.id
+        LEFT JOIN sys_user u on a.create_by = u.id
+        LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+        LEFT JOIN work_client_info wct on wci.client_id = wct.id
+        LEFT JOIN sys_office s ON s.id = a.company_id
+        LEFT JOIN sys_office o ON o.id = a.office_id
+        <where>
+            <if test="projectId != null and projectId != ''">
+                AND a.project_id like concat('%',#{projectId},'%')
+            </if>
+            <if test="projectName != null and projectName != ''">
+                AND a.project_name like concat(concat('%',#{projectName}),'%')
+            </if>
+            <if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+                AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+            </if>
+            <if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+                AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+            </if>
+            <if test="leaderNameStr !=null and leaderNameStr !=''">
+                AND su.name like concat(concat('%',#{leaderNameStr}),'%')
+            </if>
+            AND w.is_master = '1' AND  a.status  = '5' AND a.del_flag='0'
+            <if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+                AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND (s.id = #{currentUser.company.id} or find_in_set( #{currentUser.company.id}, s.parent_ids ) ))${sqlMap.dsf} )
+            </if>
+            AND a.del_flag = #{DEL_FLAG_NORMAL}
+        </where>
+    </select>
+	
+	<select id="findAllList" resultType="RuralProjectRecords" >
+		SELECT 
+			<include refid="projectRecordsColumns"/>
+		FROM rural_project_records a
+		<include refid="projectRecordsJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert">
+		INSERT INTO rural_project_records(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			del_flag,
+			contract_id,
+			project_id,
+			project_name,
+			scale_type,
+			scale_unit,
+			scale_quantity,
+			area_id,
+			project_site,
+			project_desc,
+			remarks,
+			status,
+			company_id,
+		    office_id,
+		    alter_process_id,
+		    province,
+		    city,
+		    area_name,
+		    project_structure,
+		    on_ground_num,
+		    under_ground_num,
+		    building_scale,
+		    measuring_unit,
+		    project_use,
+		    install_fees,
+		    building_fees,
+		    building_percent,
+		    install_percent,
+		    unit_fees,
+		    building_unit_fees,
+		    install_unit_fees,
+		    total_fees
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{delFlag},
+			#{workContractInfo.id},
+			#{projectId},
+			#{projectName},
+			#{scaleType},
+			#{scaleUnit},
+			#{scaleQuantity},
+			#{area.id},
+			#{projectSite},
+			#{projectDesc},
+			#{remarks},
+			#{projectStatus},
+			#{company.id},
+			#{office.id},
+			#{alterProcessId},
+			#{province},
+			#{city},
+			#{county},
+			#{projectStructure},
+			#{onGroundNum},
+			#{underGroundNum},
+			#{buildingScale},
+			#{measuringUnit},
+			#{projectUse},
+			#{installFees},
+			#{buildingFees},
+			#{buildingPercent},
+			#{installPercent},
+			#{unitFees},
+			#{buildingUnitFees},
+			#{installUnitFees},
+			#{totalFees}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE rural_project_records SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			contract_id = #{workContractInfo.id},
+			project_id = #{projectId},
+			project_name = #{projectName},
+			scale_type = #{scaleType},
+			scale_unit = #{scaleUnit},
+			scale_quantity = #{scaleQuantity},
+			area_id = #{area.id},
+			project_site = #{projectSite},
+			project_desc = #{projectDesc},
+			remarks = #{remarks},
+			status = #{projectStatus},
+			company_id = #{company.id},
+			office_id = #{office.id},
+			alter_process_id = #{alterProcessId},
+			province = #{province},
+		    city = #{city},
+		    area_name = #{county},
+		    project_structure =  #{projectStructure},
+		    on_ground_num = #{onGroundNum},
+		    under_ground_num = #{underGroundNum},
+		    building_scale = #{buildingScale},
+		    measuring_unit =  #{measuringUnit},
+		    project_use =  #{projectUse},
+		    install_fees =  #{installFees},
+		    building_fees =  #{buildingFees},
+		    building_percent =  #{buildingPercent},
+		    install_percent =  #{installPercent},
+		    unit_fees = #{unitFees},
+		    building_unit_fees = #{buildingUnitFees},
+		    install_unit_fees =  #{installUnitFees},
+		    total_fees =  #{totalFees}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!--物理删除-->
+	<update id="delete">
+		UPDATE rural_project_records SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+	
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE rural_project_records SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="RuralProjectRecords" statementType="STATEMENT">
+		select
+			<include refid="projectRecordsColumns"/>
+		FROM rural_project_records a
+		<include refid="projectRecordsJoins"/>
+		where ${propertyName} = '${value}'
+	</select>
+
+    <select id="findUseableByProjectId" resultType="RuralProjectRecords">
+        select
+        <include refid="projectRecordsColumns"/>
+        FROM rural_project_records a
+        <include refid="projectRecordsJoins"/>
+        WHERE a.project_id = #{projectId} and a.status != 7
+    </select>
+
+    <update id="updateProcessIdAndStatus" >
+        UPDATE  rural_project_records SET
+          process_instance_id = #{processInstanceId},
+          status = #{projectStatus}
+        WHERE id = #{id}
+    </update>
+	
+	<update id="updateSelectiveById">
+		UPDATE  rural_project_records
+		<set>
+			<if test="updateBy!=null and updateBy.id!=null and updateBy.id!=''">
+				update_by = #{updateBy.id},
+			</if>
+			<if test="updateDate!=null">
+				update_date = #{updateDate},
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.id!=null and workContractInfo.id!=''">
+				contract_id = #{workContractInfo.id},
+			</if>
+			<if test="projectId!=null and projectId!=''">
+				project_id = #{projectId},
+			</if>
+			<if test="projectName!=null and projectName!=''">
+				project_name = #{projectName},
+			</if>
+			<if test="scaleType!=null and scaleType!=''">
+				scale_type = #{scaleType},
+			</if>
+			<if test="scaleUnit!=null and scaleUnit!=''">
+				scale_unit = #{scaleUnit},
+			</if>
+			<if test="scaleQuantity !=null and scaleQuantity != ''">
+				scale_quantity = #{scaleQuantity},
+			</if>
+			<if test="area!=null and area.id!=null and area.id!=''">
+				area_id = #{area.id},
+			</if>
+			<if test="projectSite!=null and projectSite!=''">
+				project_site = #{projectSite},
+			</if>
+			<if test="projectDesc!=null and projectDesc!=''">
+				project_desc = #{projectDesc},
+			</if>
+			<if test="remarks!=null and remarks!=''">
+				remarks = #{remarks},
+			</if>
+			<if test="projectStatus !=null and projectStatus != 0">
+				status = #{projectStatus},
+			</if>
+			<if test="company!=null and company.id!=null and company.id!=''">
+				company_id = #{company.id},
+			</if>
+			<if test="office!=null and office.id!=null and office.id!=''">
+				office_id = #{office.id},
+			</if>
+			<if test="alterProcessId!=null and alterProcessId!=''">
+                alter_process_id = #{alterProcessId}
+			</if>
+		</set>
+		WHERE id = #{id}
+	</update>
+
+	<update id="updateSelectiveByProjectId">
+		UPDATE  rural_project_records
+		<set>
+			<if test="updateBy!=null and updateBy.id!=null and updateBy.id!=''">
+				update_by = #{updateBy.id},
+			</if>
+			<if test="updateDate!=null">
+				update_date = #{updateDate},
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.id!=null and workContractInfo.id!=''">
+				contract_id = #{workContractInfo.id},
+			</if>
+			<if test="projectName!=null and projectName!=''">
+				project_name = #{projectName},
+			</if>
+			<if test="scaleType!=null and scaleType!=''">
+				scale_type = #{scaleType},
+			</if>
+			<if test="scaleUnit!=null and scaleUnit!=''">
+				scale_unit = #{scaleUnit},
+			</if>
+			<if test="scaleQuantity !=null and scaleQuantity != ''">
+				scale_quantity = #{scaleQuantity},
+			</if>
+			<if test="area!=null and area.id!=null and area.id!=''">
+				area_id = #{area.id},
+			</if>
+			<if test="projectSite!=null and projectSite!=''">
+				project_site = #{projectSite},
+			</if>
+			<if test="projectDesc!=null and projectDesc!=''">
+				project_desc = #{projectDesc},
+			</if>
+			<if test="remarks!=null and remarks!=''">
+				remarks = #{remarks},
+			</if>
+			<if test="projectStatus !=null and projectStatus != 0">
+				status = #{projectStatus},
+			</if>
+			<if test="company!=null and company.id!=null and company.id!=''">
+				company_id = #{company.id},
+			</if>
+			<if test="office!=null and office.id!=null and office.id!=''">
+				office_id = #{office.id},
+			</if>
+			<if test="alterProcessId!=null and alterProcessId!=''">
+				alter_process_id = #{alterProcessId}
+			</if>
+		</set>
+		WHERE project_id = #{projectId}
+	</update>
+
+	<select id="findPageByRe" resultType="RuralProjectRecords" >
+		SELECT
+		<include refid="projectRecordsColumns"/>
+		,
+		wci.name AS "workContractInfo.name",
+		wci.contract_num AS "workContractInfo.contractNum",
+		wct.id AS "workContractInfo.client.id",
+		wct.name AS "workContractInfo.client.name",
+		o.name AS "office.name"
+		FROM rural_project_records a
+		<include refid="projectRecordsJoins"/>
+		LEFT JOIN work_project_user w on a.id = w.project_id
+		LEFT JOIN sys_user su on w.user_id = su.id
+		LEFT JOIN sys_user u on a.create_by = u.id
+		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+		LEFT JOIN work_client_info wct on wci.client_id = wct.id
+		LEFT JOIN sys_office s ON s.id = a.company_id
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		where a.status='5'  and a.del_flag='0' and w.user_id=#{userId} and w.del_flag='0'
+		and wci.del_flag='0' and (wci.completion_status!='5' or wci.completion_status is null)
+		GROUP BY a.id
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+</mapper>

+ 39 - 6
src/main/resources/mappings/modules/sys/OfficeDao.xml

@@ -41,7 +41,8 @@
 		p.simple_name AS "parent.simpleName",
 		a.top_company AS "topCompany",
         a.branch_no AS "branchNo",
-		a.is_son AS "isSon"
+		a.is_son AS "isSon",
+		a.wx_office_id AS "wxOfficeId"
 	</sql>
 	
 	<sql id="officeJoins">
@@ -243,8 +244,15 @@
 		ORDER BY a.type,a.code ASC
 	</select>
 
+	<select id= "findByNameWx" resultType="office">
+		select
+		<include refid="officeColumns"/>
+		FROM sys_office a
+		where a.del_flag = "0"
+		AND a.name = #{officeName}
+	</select>
 	
-			<select id="findListByCompanyName" resultType="Office">
+	<select id="findListByCompanyName" resultType="Office">
 		SELECT
 			<include refid="officeColumns"/>
 		FROM sys_office a
@@ -259,7 +267,22 @@
 		<if test="type != null and type != ''">
 				AND a.type = #{type}
 			</if>
-		</select>
+	</select>
+
+	<select id="findListByWxName" resultType="Office">
+		SELECT
+		<include refid="officeColumns"/>
+		FROM sys_office a
+		<include refid="officeJoins"/>
+		WHERE a.del_flag = #{DEL_FLAG_NORMAL}
+		AND a.useable = '1'
+		<if test="wxOfficeId != null and wxOfficeId != ''">
+			AND a.wx_office_id = #{wxOfficeId}
+		</if>
+		<if test="type != null and type != ''">
+			AND a.type = #{type}
+		</if>
+	</select>
 
 	<select id="findListByCompanyNamee" resultType="Office">
 		SELECT
@@ -452,7 +475,8 @@
 			branch_office,
             branch_simple_name,
 			top_company,
-            branch_no
+            branch_no,
+			wx_office_id
 		) VALUES (
 			#{id},
 			#{parent.id},
@@ -488,10 +512,19 @@
             #{branchOffice},
             #{branchSimpleName},
             #{topCompany},
-            #{branchNo}
+            #{branchNo},
+			#{wxOfficeId}
 		)
 	</insert>
-
+	<select id="findWxOfficeId" resultType="String">
+		SELECT MAX(CAST(a.wx_office_id AS SIGNED INTEGER)) FROM  sys_office a WHERE 1 = 1 ORDER BY (a.wx_office_id + 1)
+	</select>
+	<select id="findWxOfficeIdByParentId" resultType="String">
+		SELECT a.wx_office_id FROM sys_office a WHERE a.id = (select b.parent_id from sys_office b where b.id = #{id})
+	</select>
+	<select id="findWxOfficeIdById" resultType="String">
+		select a.wx_office_id FROM sys_office a where a.id = #{id}
+	</select>
 	<update id="update">
 		UPDATE sys_office SET
 			parent_id = #{parent.id},

+ 16 - 2
src/main/resources/mappings/modules/sys/UserDao.xml

@@ -330,6 +330,9 @@
 		</choose>
 	</select>
 
+	<select id="findUserNo" resultType="java.lang.String">
+		select a.no from sys_user a where a.we_chat_id = #{weChatId};
+	</select>
 	<!-- 分页查询用户信息 -->
 	<!--<select id="findListByRoleOffice" resultType="User">
 		SELECT DISTINCT
@@ -498,7 +501,8 @@
 		qrcode,
 		password_remake,
 		del_flag,
-		first_flag
+		first_flag,
+		we_chat_id
 		) VALUES (
 		#{id},
 		#{comId},
@@ -525,7 +529,8 @@
 		#{qrCode},
 		#{passwordRemake},
 		#{delFlag},
-		#{firstFlag}
+		#{firstFlag},
+		#{weChatId}
 		)
 	</insert>
 
@@ -752,6 +757,15 @@
 		LEFT JOIN sys_user_friend p ON p.friendId = a.id
 		WHERE  p.userId = #{id} and p.status = '1'
 	</select>
+	<!--&lt;!&ndash; 根据微信标识查询单位&ndash;&gt;-->
+	<!--<select id="findWxOffice"  resultType="User">-->
+		<!--SELECT-->
+		<!--<include refid="userColumns"/>&lt;!&ndash; ,-->
+			<!--ro.office_id AS "roleList.officeList.id" &ndash;&gt;-->
+		<!--FROM sys_user a-->
+		<!--LEFT JOIN sys_office o ON o.id = a.office_id-->
+		<!--WHERE  p.userId = #{id} and p.status = '1'-->
+	<!--</select>-->
 	<!-- 查询我的待审批列表 -->
 	<select id="findFriendsAudit"  resultType="User">
 		SELECT

+ 81 - 0
src/main/resources/mappings/modules/workProjectUser/RuralWorkProjectUserDao.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.ruralprojectrecords.dao.RuralWorkProjectUserDao">
+
+
+    <insert id="batchInsert" parameterType="java.util.Map">
+        INSERT INTO work_project_user
+        (user_id , project_id , is_master,del_flag)
+        VALUES
+        <foreach collection="memberIds" item="str" separator=",">
+            (#{str} , #{projectId} , #{isMaster}, '0')
+        </foreach>
+    </insert>
+
+    <delete id="deleteProjectMembers">
+        DELETE FROM work_project_user
+        WHERE project_id = #{projectId}
+        AND is_master = #{isMaster}
+    </delete>
+
+    <delete id="deleteProjectMasterMembers">
+        DELETE FROM work_project_user
+        WHERE project_id = #{projectId}
+        <if test="memberIds != null">
+            AND user_id IN <foreach collection="memberIds" item="str" separator="," open="(" close=")">#{str}</foreach>
+        </if>
+       /* AND is_master = '0';*/
+    </delete>
+
+    <update id="deleteUsers">
+        UPDATE work_project_user SET del_flag = #{delFlag}
+        WHERE project_id = #{id}
+        AND user_id = #{userId}
+        AND is_master = '0'
+        AND del_flag ='0'
+    </update>
+    <select id="isDelFalg" resultType="com.jeeplus.modules.sys.entity.User">
+        SELECT u.id AS "id",
+        u.no,
+        u.name,
+        u.email,
+        u.phone,
+        u.mobile,
+        u.office_id AS "office.id",
+        o.top_company AS "office.name",
+        a.del_flag AS "delFlag",
+        j.name as "basicInfo.jobGrade.name"
+        from work_project_user a
+        LEFT JOIN sys_user u ON u.id = a.user_id
+        LEFT JOIN work_staff_achives w ON w.user_id = a.user_id
+        LEFT JOIN work_job_grade j ON j.id = w.job_grade
+        LEFT JOIN sys_office o ON o.id = u.office_id
+        WHERE /*a.is_master = '0' AND*/ a.project_id = #{projectId}
+        <if test="delFlag !=null and delFlag !=''">
+            AND a.del_flag = #{delFlag}
+        </if>
+    </select>
+
+    <insert id="insertUsers">
+        INSERT INTO work_project_user( project_id ,user_id , is_master,del_flag)
+        <foreach collection="users" item="user" separator=" union all ">
+            SELECT #{id}, #{user.id},'0','0' FROM dual
+        </foreach>
+    </insert>
+
+    <select id="queryProjectUsers" resultType="com.jeeplus.modules.sys.entity.User">
+        SELECT u.id,u.name,u.photo from work_project_user a, sys_user u WHERE a.user_id = u.id and a.project_id = #{projectId} and a.is_master = #{isMaster}
+    </select>
+    <select id="projectUsers" resultType="com.jeeplus.modules.sys.entity.User">
+        SELECT u.id,u.name,u.photo from work_project_user a, sys_user u WHERE a.user_id = u.id and a.project_id = #{projectId} and a.del_flag = '0'
+    </select>
+    <select id="queryAllProjectUsers" resultType="com.jeeplus.modules.sys.entity.User">
+        SELECT u.id,u.name,u.photo from work_project_user a, sys_user u WHERE a.user_id = u.id and a.project_id = #{projectId} and a.del_flag = '0'
+    </select>
+
+    <update id="reInsertUser" parameterType="RuralProjectRecords">
+        update work_project_user
+        set del_flag = #{delFlag}
+        where project_id = #{id} and user_id = #{userId}
+    </update>
+</mapper>

+ 8 - 0
src/main/resources/mappings/modules/workstaff/WorkStaffBasicInfoDao.xml

@@ -71,6 +71,14 @@
 		<include refid="workStaffBasicInfoJoins"/>
 		WHERE a.id = #{id}
 	</select>
+
+	<select id="getNo" resultType="WorkStaffBasicInfo" >
+		SELECT
+		<include refid="workStaffBasicInfoColumns"/>
+		FROM work_staff_basic_info a
+		<include refid="workStaffBasicInfoJoins"/>
+		WHERE a.no = #{no}
+	</select>
 	<select id="getByCompany" resultType="java.lang.Integer" >
 		select count(*) FROM work_staff_basic_info
 		where

+ 1 - 0
src/main/resources/spring-context-shiro.xml

@@ -16,6 +16,7 @@
             <value>
                 /static/** = anon
                 /userfiles/** = anon
+                ${adminPath}/weChatCallBack/** = anon
                 ${adminPath}/sys/user/infoCareStatus = anon
                 ${adminPath}/sys/user/validateLoginName = anon
                 ${adminPath}/sys/user/validateMobile = anon