|
@@ -1,8 +1,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">
|
|
|
<mapper namespace="com.jeeplus.modules.sg.materialmodule.activiti.mapper.MaterialModuleMapper">
|
|
|
-
|
|
|
- <sql id="materialColumns">
|
|
|
+
|
|
|
+ <sql id="materialColumns">
|
|
|
a.id AS "id",
|
|
|
a.create_by AS "createBy.id",
|
|
|
a.create_date AS "createDate",
|
|
@@ -16,34 +16,34 @@
|
|
|
a.project_name AS "projectName",
|
|
|
a.project_type AS "projectType"
|
|
|
</sql>
|
|
|
-
|
|
|
- <select id="get" resultType="MaterialModule" >
|
|
|
- SELECT
|
|
|
- <include refid="materialColumns"/>
|
|
|
- FROM sg_construction_process a
|
|
|
- WHERE a.proc_ins_id = #{procInsId}
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findList" resultType="MaterialModule" >
|
|
|
- SELECT
|
|
|
- <include refid="materialColumns"/>
|
|
|
- FROM sg_construction_process a
|
|
|
- <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>
|
|
|
|
|
|
-<!-- 修改提前施工状态0未提前施工,1提前施工
|
|
|
- <update id="updatePreConstruction">
|
|
|
- update xm_project_details set preConstruction = #{preConstruction} where id = #{id};
|
|
|
- </update>-->
|
|
|
+ <select id="get" resultType="MaterialModule">
|
|
|
+ SELECT
|
|
|
+ <include refid="materialColumns"/>
|
|
|
+ FROM sg_construction_process a
|
|
|
+ WHERE a.proc_ins_id = #{procInsId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findList" resultType="MaterialModule">
|
|
|
+ SELECT
|
|
|
+ <include refid="materialColumns"/>
|
|
|
+ FROM sg_construction_process a
|
|
|
+ <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">
|
|
|
+ <!-- 修改提前施工状态0未提前施工,1提前施工
|
|
|
+ <update id="updatePreConstruction">
|
|
|
+ update xm_project_details set preConstruction = #{preConstruction} where id = #{id};
|
|
|
+ </update>-->
|
|
|
+
|
|
|
+ <insert id="insert">
|
|
|
insert into sg_construction_process (
|
|
|
id,
|
|
|
create_by,
|
|
@@ -82,29 +82,30 @@
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
|
- <update id="updateConstructionStatus">
|
|
|
+ <update id="updateConstructionStatus">
|
|
|
update xm_project_details set construction_status = '1' where id=#{projectId}
|
|
|
</update>
|
|
|
|
|
|
- <select id="findProjectName" resultType="string">
|
|
|
+ <select id="findProjectName" resultType="string">
|
|
|
select project_name from sg_construction_process where proc_ins_id = #{procInsId};
|
|
|
</select>
|
|
|
|
|
|
- <select id="findSpecificTime" resultType="java.util.Date">
|
|
|
+ <select id="findSpecificTime" resultType="java.util.Date">
|
|
|
select specificTime from ms_construction_project where projectName = #{projectName};
|
|
|
</select>
|
|
|
|
|
|
- <select id="findUserId" parameterType="java.util.List" resultType="java.lang.String">
|
|
|
- select id from sys_user
|
|
|
- where name in
|
|
|
- (
|
|
|
- <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- )
|
|
|
- </select>
|
|
|
+ <select id="findUserId" parameterType="java.util.List" resultType="java.lang.String">
|
|
|
+ select id from sys_user
|
|
|
+ where name in
|
|
|
+ (
|
|
|
+ <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </select>
|
|
|
|
|
|
- <select id="findProject" resultType="com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject">
|
|
|
+ <select id="findProject"
|
|
|
+ resultType="com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject">
|
|
|
select id
|
|
|
, create_by
|
|
|
, create_date
|
|
@@ -138,7 +139,7 @@
|
|
|
where projectName = #{projectName}
|
|
|
</select>
|
|
|
|
|
|
- <insert id="conProject">
|
|
|
+ <insert id="conProject">
|
|
|
INSERT INTO ms_construction_project(
|
|
|
id,
|
|
|
create_by,
|
|
@@ -205,28 +206,46 @@
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
|
- <select id="findMonthProject" resultType="com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject">
|
|
|
+ <select id="findMonthProject"
|
|
|
+ resultType="com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject">
|
|
|
select projectName,endFlag from ms_construction_project where DATE_FORMAT( arrangeTime, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' )
|
|
|
</select>
|
|
|
|
|
|
- <select id="findMaterialProject" resultType="com.jeeplus.modules.sg.materialmodule.activiti.entity.MaterialModule">
|
|
|
- select id,proc_ins_id, user_name, project_id, project_name, project_type from sg_construction_process where project_name
|
|
|
- (
|
|
|
- <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
|
|
|
- #{item.projectName}
|
|
|
- </foreach>
|
|
|
- )
|
|
|
- </select>
|
|
|
+ <select id="findMaterialProject" resultType="com.jeeplus.modules.sg.materialmodule.activiti.entity.MaterialModule">
|
|
|
+ select id,proc_ins_id, user_name, project_id, project_name, project_type from sg_construction_process where
|
|
|
+ project_name
|
|
|
+ (
|
|
|
+ <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item.projectName}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </select>
|
|
|
|
|
|
- <update id="updateEndFlag">
|
|
|
+ <update id="updateEndFlag">
|
|
|
update ms_construction_project set endFlag = 1 where projectName = #{projectName};
|
|
|
</update>
|
|
|
|
|
|
- <select id="getModuleById" resultType="com.jeeplus.modules.sg.materialmodule.activiti.entity.MaterialModule">
|
|
|
+ <select id="getModuleById" resultType="com.jeeplus.modules.sg.materialmodule.activiti.entity.MaterialModule">
|
|
|
select project_name,proc_ins_id,now_project_name,frequency from sg_construction_process where proc_ins_id = #{procInsId};
|
|
|
</select>
|
|
|
|
|
|
- <update id="updateModuleById">
|
|
|
+ <update id="updateModuleById">
|
|
|
update sg_construction_process set frequency = #{frequency},now_project_name=#{nowProjectName} where proc_ins_id = #{procInsId};
|
|
|
</update>
|
|
|
+
|
|
|
+ <update id="updateNonPower">
|
|
|
+ update sg_construction_process set nonPower = 0 where proc_ins_id = #{procInsId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="updateElectrical">
|
|
|
+ update sg_construction_process set electrical = 0 where proc_ins_id = #{procInsId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="updatePower">
|
|
|
+ update sg_construction_process set power = 0 where proc_ins_id = #{procInsId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="findByProcInsId" resultType="com.jeeplus.modules.sg.materialmodule.activiti.entity.MaterialModule">
|
|
|
+ select project_name,proc_ins_id,nonPower,electrical,power from sg_construction_process where proc_ins_id = #{procInsId};
|
|
|
+ </select>
|
|
|
</mapper>
|