|
@@ -1,7 +1,7 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?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">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.jeeplus.modules.workcontractinfo.dao.WorkContractInfoDao">
|
|
<mapper namespace="com.jeeplus.modules.workcontractinfo.dao.WorkContractInfoDao">
|
|
-
|
|
|
|
|
|
+
|
|
<sql id="workContractInfoColumns">
|
|
<sql id="workContractInfoColumns">
|
|
a.id AS "id",
|
|
a.id AS "id",
|
|
a.create_by AS "createBy.id",
|
|
a.create_by AS "createBy.id",
|
|
@@ -64,7 +64,7 @@
|
|
(select count(1) from work_contract_info c where c.total_contract_id = a.id) cnt,
|
|
(select count(1) from work_contract_info c where c.total_contract_id = a.id) cnt,
|
|
a.contract_information AS "contractInformation"
|
|
a.contract_information AS "contractInformation"
|
|
</sql>
|
|
</sql>
|
|
-
|
|
|
|
|
|
+
|
|
<sql id="workContractInfoJoins">
|
|
<sql id="workContractInfoJoins">
|
|
LEFT JOIN work_client_info client ON client.id = a.client_id
|
|
LEFT JOIN work_client_info client ON client.id = a.client_id
|
|
LEFT JOIN sys_user u on u.id = a.create_by
|
|
LEFT JOIN sys_user u on u.id = a.create_by
|
|
@@ -72,8 +72,8 @@
|
|
LEFT JOIN work_bid_project p ON p.id = a.project_id
|
|
LEFT JOIN work_bid_project p ON p.id = a.project_id
|
|
LEFT JOIN sys_office s ON s.id = a.company_id
|
|
LEFT JOIN sys_office s ON s.id = a.company_id
|
|
</sql>
|
|
</sql>
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
<select id="get" resultType="WorkContractInfo" >
|
|
<select id="get" resultType="WorkContractInfo" >
|
|
SELECT
|
|
SELECT
|
|
a.id AS "id",
|
|
a.id AS "id",
|
|
@@ -279,7 +279,7 @@
|
|
AND a.contract_date BETWEEN #{beginContractDate} AND #{endContractDate}
|
|
AND a.contract_date BETWEEN #{beginContractDate} AND #{endContractDate}
|
|
</if>
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
<if test="name != null and name != ''">
|
|
- AND a.name LIKE
|
|
|
|
|
|
+ AND a.name LIKE
|
|
<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
|
|
<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
|
|
@@ -837,7 +837,7 @@
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="findAllList" resultType="WorkContractInfo" >
|
|
<select id="findAllList" resultType="WorkContractInfo" >
|
|
SELECT
|
|
SELECT
|
|
<include refid="workContractInfoColumns"/>
|
|
<include refid="workContractInfoColumns"/>
|
|
@@ -845,7 +845,7 @@
|
|
<include refid="workContractInfoJoins"/>
|
|
<include refid="workContractInfoJoins"/>
|
|
<where>
|
|
<where>
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
- </where>
|
|
|
|
|
|
+ </where>
|
|
<choose>
|
|
<choose>
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
ORDER BY ${page.orderBy}
|
|
ORDER BY ${page.orderBy}
|
|
@@ -855,7 +855,7 @@
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insert">
|
|
<insert id="insert">
|
|
INSERT INTO work_contract_info(
|
|
INSERT INTO work_contract_info(
|
|
id,
|
|
id,
|
|
@@ -975,9 +975,9 @@
|
|
#{contractInformation}
|
|
#{contractInformation}
|
|
)
|
|
)
|
|
</insert>
|
|
</insert>
|
|
-
|
|
|
|
|
|
+
|
|
<update id="update">
|
|
<update id="update">
|
|
- UPDATE work_contract_info SET
|
|
|
|
|
|
+ UPDATE work_contract_info SET
|
|
update_by = #{updateBy.id},
|
|
update_by = #{updateBy.id},
|
|
project_id = #{project.id},
|
|
project_id = #{project.id},
|
|
project_name = #{projectName},
|
|
project_name = #{projectName},
|
|
@@ -1051,10 +1051,10 @@
|
|
contract_state = 7
|
|
contract_state = 7
|
|
WHERE id = #{id}
|
|
WHERE id = #{id}
|
|
</update>
|
|
</update>
|
|
-
|
|
|
|
|
|
+
|
|
<!--逻辑删除-->
|
|
<!--逻辑删除-->
|
|
<update id="deleteByLogic">
|
|
<update id="deleteByLogic">
|
|
- UPDATE work_contract_info SET
|
|
|
|
|
|
+ UPDATE work_contract_info SET
|
|
del_flag = #{DEL_FLAG_DELETE}
|
|
del_flag = #{DEL_FLAG_DELETE}
|
|
WHERE id = #{id}
|
|
WHERE id = #{id}
|
|
</update>
|
|
</update>
|
|
@@ -1081,15 +1081,15 @@
|
|
</foreach>
|
|
</foreach>
|
|
|
|
|
|
</insert>
|
|
</insert>
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
|
|
<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
|
|
<select id="findUniqueByProperty" resultType="WorkContractInfo" statementType="STATEMENT">
|
|
<select id="findUniqueByProperty" resultType="WorkContractInfo" statementType="STATEMENT">
|
|
select * FROM work_contract_info where ${propertyName} = '${value}'
|
|
select * FROM work_contract_info where ${propertyName} = '${value}'
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="findListByclient" resultType="WorkClientInfo">
|
|
<select id="findListByclient" resultType="WorkClientInfo">
|
|
- SELECT
|
|
|
|
|
|
+ SELECT
|
|
a.*
|
|
a.*
|
|
FROM work_client_info a
|
|
FROM work_client_info a
|
|
LEFT JOIN work_client_linkman b on a.id = b.client_id
|
|
LEFT JOIN work_client_linkman b on a.id = b.client_id
|
|
@@ -1313,4 +1313,11 @@
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
-</mapper>
|
|
|
|
|
|
+ <select id="getUserByRole" resultType="com.jeeplus.modules.sys.entity.User">
|
|
|
|
+ select * from sys_user su
|
|
|
|
+ left join sys_user_role sur on sur.user_id = su.id
|
|
|
|
+ left join sys_role sr on sr.id = sur.role_id
|
|
|
|
+ where sr.name = #{roleName}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+</mapper>
|