Преглед изворни кода

git-svn-id: https://192.168.57.71/svn/jsgkj@1658 931142cf-59ea-a443-aa0e-51397b428577

ld_zhoutl пре 8 година
родитељ
комит
d530becc3f

+ 17 - 0
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/ctl/ZyfzsqCtl.java

@@ -20,9 +20,11 @@ import com.xt.js.gkaq.common.DictConsts;
 import com.xt.js.gkaq.frame.model.ComboBoxDto;
 import com.xt.js.gkaq.frame.service.CodeService;
 import com.xt.js.gkaq.web.model.GqModel;
+import com.xt.js.gkaq.web.model.WhxxModel;
 import com.xt.js.gkaq.web.model.ZyfzModel;
 import com.xt.js.gkaq.web.model.ZyfzModelDto;
 import com.xt.js.gkaq.web.service.GqService;
+import com.xt.js.gkaq.web.service.WhxxService;
 import com.xt.js.gkaq.web.service.ZyfzsqService;
 import com.xt.js.gkaq.web.vo.ZyfzsqVo;
 import com.yuanxd.tools.pagehelper.PageHelper;
@@ -41,6 +43,9 @@ public class ZyfzsqCtl extends BaseCtl {
     @Autowired
     private ZyfzsqService zyfzsqService;
     @Autowired
+    /** Σ»õÐÅÏ¢ */
+    private WhxxService whxxService;
+    @Autowired
     private CodeService codeService;
     @Autowired
     private GqService gqService;
@@ -228,4 +233,16 @@ public class ZyfzsqCtl extends BaseCtl {
         }
         return JSONArray.toJSONString(list);
     }
+    
+    /**
+     * »ñȡΣ»õÐÅÏ¢
+     */
+    @RequestMapping("getWhxxByZyId")
+    @ResponseBody
+    public Map<String, List<WhxxModel>> getWhxxByZyId(WhxxModel model) {
+        List<WhxxModel> list = whxxService.findAllByCond(model);
+        Map<String, List<WhxxModel>> map = new HashMap<String, List<WhxxModel>>();
+        map.put("list", list);
+        return map;
+    }
 }

+ 21 - 0
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/mappers/WhxxModelMapper.java

@@ -0,0 +1,21 @@
+package com.xt.js.gkaq.web.mappers;
+
+import java.util.List;
+
+import com.xt.js.gkaq.common.BaseMapper;
+import com.xt.js.gkaq.web.model.WhxxModel;
+
+public interface WhxxModelMapper  extends BaseMapper<WhxxModel> {
+    int deleteByPrimaryKey(String id);
+
+    int insert(WhxxModel record);
+
+    WhxxModel selectByPrimaryKey(String id);
+
+    List<WhxxModel> selectAll();
+
+    int updateByPrimaryKey(WhxxModel record);
+    
+    public List<WhxxModel> selectAllByCond(WhxxModel model);
+    
+}

+ 0 - 16
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/mappers/whxxModelMapper.java

@@ -1,16 +0,0 @@
-package com.xt.js.gkaq.web.mappers;
-
-import com.xt.js.gkaq.web.model.whxxModel;
-import java.util.List;
-
-public interface whxxModelMapper {
-    int deleteByPrimaryKey(String id);
-
-    int insert(whxxModel record);
-
-    whxxModel selectByPrimaryKey(String id);
-
-    List<whxxModel> selectAll();
-
-    int updateByPrimaryKey(whxxModel record);
-}

+ 7 - 61
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/model/whxxModel.java → gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/model/WhxxModel.java

@@ -1,9 +1,13 @@
 package com.xt.js.gkaq.web.model;
 
-import java.util.Date;
+import com.xt.js.gkaq.common.BaseUUIDModel;
 
-public class whxxModel {
-    private String id;
+public class WhxxModel extends BaseUUIDModel{
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
 
     private String zycs;
 
@@ -13,8 +17,6 @@ public class whxxModel {
 
     private String fzzyId;
 
-    private String state;
-
     private String sftb;
 
     private String tbzt;
@@ -39,22 +41,6 @@ public class whxxModel {
 
     private String szd;
 
-    private String createUser;
-
-    private Date createTime;
-
-    private String updateUser;
-
-    private Date updateTime;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id == null ? null : id.trim();
-    }
-
     public String getZycs() {
         return zycs;
     }
@@ -87,14 +73,6 @@ public class whxxModel {
         this.fzzyId = fzzyId == null ? null : fzzyId.trim();
     }
 
-    public String getState() {
-        return state;
-    }
-
-    public void setState(String state) {
-        this.state = state == null ? null : state.trim();
-    }
-
     public String getSftb() {
         return sftb;
     }
@@ -190,36 +168,4 @@ public class whxxModel {
     public void setSzd(String szd) {
         this.szd = szd == null ? null : szd.trim();
     }
-
-    public String getCreateUser() {
-        return createUser;
-    }
-
-    public void setCreateUser(String createUser) {
-        this.createUser = createUser == null ? null : createUser.trim();
-    }
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    public String getUpdateUser() {
-        return updateUser;
-    }
-
-    public void setUpdateUser(String updateUser) {
-        this.updateUser = updateUser == null ? null : updateUser.trim();
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
 }

+ 18 - 0
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/service/WhxxService.java

@@ -0,0 +1,18 @@
+package com.xt.js.gkaq.web.service;
+
+import java.util.List;
+
+import com.xt.js.gkaq.common.BaseUUIDModelService;
+import com.xt.js.gkaq.web.model.WhxxModel;
+
+public interface WhxxService extends BaseUUIDModelService<WhxxModel> {
+    /**
+     * ¸ù¾ÝIDÂß¼­É¾³ý¼Ç¼
+     * 
+     * @param id
+     * @return
+     */
+    int deleteLogicByID(String id);
+    
+    public List<WhxxModel> findAllByCond(WhxxModel model);
+}

+ 28 - 0
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/service/impl/WhxxServiceImpl.java

@@ -0,0 +1,28 @@
+package com.xt.js.gkaq.web.service.impl;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.xt.js.gkaq.common.BaseMapper;
+import com.xt.js.gkaq.common.BaseUUIDModelServiceImpl;
+import com.xt.js.gkaq.web.mappers.WhxxModelMapper;
+import com.xt.js.gkaq.web.model.WhxxModel;
+import com.xt.js.gkaq.web.service.WhxxService;
+
+@Service
+public class WhxxServiceImpl extends BaseUUIDModelServiceImpl<WhxxModel> implements WhxxService {
+    @Autowired
+    private WhxxModelMapper mapper;
+	
+	@Override
+	protected BaseMapper<WhxxModel> getMapper() {
+		return mapper;
+	}
+
+    @Override
+    public List<WhxxModel> findAllByCond(WhxxModel model) {
+        return mapper.selectAllByCond(model);
+    }
+}

+ 15 - 4
gkaqv2/trunk/modules/web/src/main/resources/com/xt/js/gkaq/web/mappers/whxxModelMapper.xml → gkaqv2/trunk/modules/web/src/main/resources/com/xt/js/gkaq/web/mappers/WhxxModelMapper.xml

@@ -1,7 +1,7 @@
 <?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.xt.js.gkaq.web.mappers.whxxModelMapper" >
-  <resultMap id="BaseResultMap" type="com.xt.js.gkaq.web.model.whxxModel" >
+<mapper namespace="com.xt.js.gkaq.web.mappers.WhxxModelMapper" >
+  <resultMap id="BaseResultMap" type="com.xt.js.gkaq.web.model.WhxxModel" >
     <id column="ID" property="id" jdbcType="VARCHAR" />
     <result column="ZYCS" property="zycs" jdbcType="VARCHAR" />
     <result column="FZCSBH" property="fzcsbh" jdbcType="VARCHAR" />
@@ -29,7 +29,7 @@
     delete from AQ_GKWXHWZYFZBL_FZ
     where ID = #{id,jdbcType=VARCHAR}
   </delete>
-  <insert id="insert" parameterType="com.xt.js.gkaq.web.model.whxxModel" >
+  <insert id="insert" parameterType="com.xt.js.gkaq.web.model.WhxxModel" >
     insert into AQ_GKWXHWZYFZBL_FZ (ID, ZYCS, FZCSBH, 
       QYNBBH, FZZY_ID, STATE, 
       SFTB, TBZT, TBDYID, QYLB, 
@@ -47,7 +47,7 @@
       #{createTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}
       )
   </insert>
-  <update id="updateByPrimaryKey" parameterType="com.xt.js.gkaq.web.model.whxxModel" >
+  <update id="updateByPrimaryKey" parameterType="com.xt.js.gkaq.web.model.WhxxModel" >
     update AQ_GKWXHWZYFZBL_FZ
     set ZYCS = #{zycs,jdbcType=VARCHAR},
       FZCSBH = #{fzcsbh,jdbcType=VARCHAR},
@@ -85,4 +85,15 @@
     UPDATE_TIME
     from AQ_GKWXHWZYFZBL_FZ
   </select>
+  <select id="selectAllByCond" resultMap="BaseResultMap" parameterType="com.xt.js.gkaq.web.model.ZyfzModel" >
+		select ID, ZYCS, FZCSBH, QYNBBH, FZZY_ID, STATE, SFTB, TBZT, TBDYID, QYLB, SSQY, 
+	    ORG_CODE, FZHZ, QYNBMC, JYR, WXHWM, WXHWM_BZ, SZD, CREATE_USER, CREATE_TIME, UPDATE_USER, 
+	    UPDATE_TIME
+	    from AQ_GKWXHWZYFZBL_FZ
+    	<where>
+		    <if test="fzzyId != null and fzzyId != ''">
+		        and FZZY_ID = #{fzzyId,jdbcType=VARCHAR}
+		    </if>
+    	</where>
+  	</select>
 </mapper>