Kaynağa Gözat

上传避雷器检查表相关功能

wuhonghao 4 yıl önce
ebeveyn
işleme
3ee859a8a3

+ 18 - 3
railway-admin/src/main/java/com/railway/web/controller/business/catenary/BusJcbFdfxjyqController.java

@@ -121,9 +121,24 @@ public class BusJcbFdfxjyqController extends BaseController {
         WordUtils wordUtil=new WordUtils();
         //填充变量
         Map<String, Object> params = new HashMap<String, Object>();
-        params.put("${fdh}", "测试分段号");
-        params.put("${qj}", "测试区间");
-        params.put("${wd}", "85");
+        params.put("${fdh}", info.getFcd());
+        params.put("${qj}", info.getQj());
+        params.put("${jcrq}", info.getJcrq());
+        params.put("${wd}", info.getWd());
+        params.put("${jcr}", info.getJcr());
+        params.put("${pointB}", info.getPointB());
+        params.put("${pointG}", info.getPointG());
+        params.put("${fcd}", info.getFcd());
+        params.put("${fddmpsd}", info.getFddmpsd());
+        params.put("${jybjFdjyqzjyzt}", info.getJybjFdjyqzjyzt().equals("0")?"√":"×");
+        params.put("${jybjClsjyzzt}", info.getJybjClsjyzzt().equals("0")?"√":"×");
+        params.put("${lbjztLs}", info.getLbjztLs().equals("0")?"√":"×");
+        params.put("${lbjztXdx}", info.getLbjztXdx().equals("0")?"√":"×");
+        params.put("${lbjztPhzj}", info.getLbjztPhzj().equals("0")?"√":"×");
+        params.put("${lbjztJcxjt}", info.getLbjztJcxjt().equals("0")?"√":"×");
+        params.put("${lbjztXhj}", info.getLbjztXhj().equals("0")?"√":"×");
+        params.put("${sbzt}", info.getSbzt().equals("0")?"√":"×");
+
         try{
             //填充图片信息
             Map<String,Object> header = new HashMap<String, Object>();

+ 28 - 8
railway-business/src/main/resources/mapper/business/BusZzdzxxMapper.xml

@@ -78,6 +78,7 @@
                 <result column="create_time" property="createTime"/>
                 <result column="update_by" property="updateBy"/>
                 <result column="update_time" property="updateTime"/>
+                <result column="station_id" property="stationId"/>
     </resultMap>
 
     <sql id="Base_Column_List">
@@ -154,13 +155,11 @@
                 create_by,
                 create_time,
                 update_by,
-                update_time
+                update_time,
+                station_id
     </sql>
 
     <insert id="insert" parameterType="com.railway.business.catenary.domain.BusZzdzxx">
-        <selectKey keyProperty="id" order="BEFORE" resultType="String">
-            select replace(uuid(), '-', '') from dual
-        </selectKey>
         INSERT INTO bus_zzdzxx
         <trim prefix="(" suffix=")" suffixOverrides=",">
                     <if test ='null != db'>
@@ -380,7 +379,10 @@
                     update_by,
                     </if>
                     <if test ='null != updateTime'>
-                    update_time
+                    update_time,
+                    </if>
+                    <if test ='null != stationId'>
+                        station_id
                     </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -601,7 +603,10 @@
                     #{updateBy},
                     </if>
                     <if test ='null != updateTime'>
-                    #{updateTime}
+                    #{updateTime},
+                    </if>
+                    <if test ='null != stationId'>
+                    #{stationId}
                     </if>
         </trim>
     </insert>
@@ -688,6 +693,7 @@
                     <if test ='null != createTime'>create_time = #{createTime},</if>
                     <if test ='null != updateBy'>update_by = #{updateBy},</if>
                     <if test ='null != updateTime'>update_time = #{updateTime}</if>
+                    <if test ='null != stationId'>station_id = #{stationId}</if>
         </set>
         WHERE id = #{id}
     </update>
@@ -704,9 +710,23 @@
     <select id="getList" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM bus_zzdzxx
+        FROM bus_zzdzxx a
+        left join bus_station b
+        on a.station_id = b.station_id
         <where>
-            del_flag='0'
+            a.del_flag='0'
+                <if test="stationId!=null and stationId!=''">
+                    and b.station_id=#{stationId}
+                </if>
+                <if test="deptId!=null and deptId!=''">
+                    and b.deppt_id=#{deptId}
+                </if>
+                <if test="lineId!=null and lineId!=''">
+                    and b.line_id=#{lineId}
+                </if>
+                <if test="db!=null and db!=''">
+                    and db=#{db}
+                </if>
                 <if test="db!=null and db!=''">
                     and db=#{db}
                 </if>

BIN
railway-business/src/main/resources/word/template/DXF分段绝缘器手册.docx