Browse Source

单位类型修改

luobo 4 years ago
parent
commit
05504f8868

BIN
WebContent/WEB-INF/lib/junit-4.12.jar


+ 58 - 0
WebContent/WEB-INF/view/base/org-type-edit.jsp

@@ -34,10 +34,68 @@
 			<td><span class="star">*</span>名称:</td>
 			<td><input type="text" name="orgName" value='${baseOrgType.orgName!""}' datatype="*" style="width: 60%" ajaxurl="${ctx}/orgType/validateOrgName.do?oldOrgTypeId=${(baseOrgType.orgTypeId)!''}"/></td>
 		</tr>
+		<!--
 		<tr>
 			<td><span class="star">*</span>水价:</td>
 			<td><input type="text" name="waterPrice" value='${baseOrgType.waterPrices!""}' datatype="n|decimal" errormsg="请输入数字!" style="width: 60%"/></td>
 		</tr>
+		-->
+		<tr>
+			<td><span class="star">*</span>一月水价:</td>
+			<td><input type="text" name="janPrice" value='${baseOrgType.janPrice!""}' datatype="n|decimal"
+					   errormsg="请输入数字!" style="width: 40%"/></td>
+		</tr>
+		<tr>
+			<td><span class="star">*</span>二月水价:</td>
+			<td><input type="text" name="febPrice" value='${baseOrgType.febPrice!""}' datatype="n|decimal"
+					   errormsg="请输入数字!" style="width: 40%"/></td>
+		</tr>
+		<tr>
+			<td><span class="star">*</span>三月水价:</td>
+			<td><input type="text" name="marPrice" value='${baseOrgType.marPrice!""}' datatype="n|decimal"
+					   errormsg="请输入数字!" style="width: 40%"/></td>
+		</tr>
+		<tr>
+			<td><span class="star">*</span>四月水价:</td>
+			<td><input type="text" name="aprPrice" value='${baseOrgType.aprPrice!""}' datatype="n|decimal"
+					   errormsg="请输入数字!" style="width: 40%"/></td>
+		</tr>
+		<tr>
+			<td><span class="star">*</span>五月水价:</td>
+			<td><input type="text" name="mayPrice" value='${baseOrgType.mayPrice!""}' datatype="n|decimal" errormsg="请输入数字!" style="width: 40%"/></td>
+		</tr>
+		<tr>
+			<td><span class="star">*</span>六月水价:</td>
+			<td><input type="text" name="junPrice" value='${baseOrgType.junPrice!""}' datatype="n|decimal" errormsg="请输入数字!" style="width: 40%"/></td>
+		</tr>
+		<tr>
+			<td><span class="star">*</span>七月水价:</td>
+			<td><input type="text" name="julPrice" value='${baseOrgType.julPrice!""}' datatype="n|decimal" errormsg="请输入数字!" style="width: 40%"/></td>
+		</tr>
+		<tr>
+			<td><span class="star">*</span>八月水价:</td>
+			<td><input type="text" name="augPrice" value='${baseOrgType.augPrice!""}' datatype="n|decimal" errormsg="请输入数字!" style="width: 40%"/></td>
+		</tr>
+		<tr>
+			<td><span class="star">*</span>九月水价:</td>
+			<td><input type="text" name="septPrice" value='${baseOrgType.septPrice!""}' datatype="n|decimal" errormsg="请输入数字!" style="width: 40%"/></td>
+		</tr>
+		<tr>
+			<td><span class="star">*</span>十月水价:</td>
+			<td><input type="text" name="octPrice" value='${baseOrgType.octPrice!""}' datatype="n|decimal" errormsg="请输入数字!" style="width: 40%"/></td>
+		</tr>
+		<tr>
+			<td><span class="star">*</span>十一月水价:</td>
+			<td><input type="text" name="novPrice" value='${baseOrgType.novPrice!""}' datatype="n|decimal" errormsg="请输入数字!" style="width: 40%"/></td>
+		</tr>
+		<tr>
+			<td><span class="star">*</span>十二月水价:</td>
+			<td><input type="text" name="decPrice" value='${baseOrgType.decPrice!""}' datatype="n|decimal" errormsg="请输入数字!" style="width: 40%"/></td>
+		</tr>
+		<tr>
+			<td><span class="star">*</span>增长比例:</td>
+			<td><input type="text" name="growthRatios" value='${baseOrgType.growthRatios!""}' datatype="n|decimal" errormsg="请输入数字!" style="width: 60%"/>%</td>
+		</tr>
 		<tr>
 			<td>状态:</td>
 			<td>

+ 24 - 7
WebContent/WEB-INF/view/base/org-type-list.jsp

@@ -34,8 +34,21 @@
 			 g = $("#maingrid").quiGrid({
 				 columns: [ 
 	                { display: '名称', name: 'orgName',     align: 'center', width: "8%"},
-	                { display: '水价', name: 'waterPrices',     align: 'center', width: "8%"},
-	                { display: '状态', name: 'status',     align: 'center', width: "8%",
+	                // { display: '水价', name: 'waterPrices',     align: 'center', width: "8%"},
+	                { display: '一月水价', name: 'janPrice',     align: 'center', width: "4%"},
+	                { display: '二月水价', name: 'febPrice',     align: 'center', width: "4%"},
+	                { display: '三月水价', name: 'marPrice',     align: 'center', width: "4%"},
+	                { display: '四月水价', name: 'aprPrice',     align: 'center', width: "4%"},
+	                { display: '五月水价', name: 'mayPrice',     align: 'center', width: "4%"},
+	                { display: '六月水价', name: 'junPrice',     align: 'center', width: "4%"},
+	                { display: '七月水价', name: 'julPrice',     align: 'center', width: "4%"},
+	                { display: '八月水价', name: 'augPrice',     align: 'center', width: "4%"},
+	                { display: '九月水价', name: 'septPrice',     align: 'center', width: "4%"},
+	                { display: '十月水价', name: 'octPrice',     align: 'center', width: "4%"},
+	                { display: '十一月水价', name: 'novPrice',     align: 'center', width: "4%"},
+	                { display: '十二月水价', name: 'decPrice',     align: 'center', width: "4%"},
+	                { display: '增长比例', name: 'growthRatios',     align: 'center', width: "6%"},
+	                { display: '状态', name: 'status',     align: 'center', width: "6%",
 	                	render : function(rowdata, rowindex, value, column){
 	                		 if("0"==value)
 	                			 return "<font color=red>禁用</font>";
@@ -43,10 +56,10 @@
 	                			  return "<font color=blue>启用</font>";
 	                     }	
 	                },
-	                { display: '创建人', name: 'creater',     align: 'center', width: "10%"},
-	                { display: '创建时间', name: 'createTime',     align: 'center', width: "10%"},
-	                { display: '备注', name: 'remark',     align: 'center', width: "20%"},
-	                { display: '操作', isAllowHide: false, align: 'left', width:"15%",
+	                { display: '创建人', name: 'creater',     align: 'center', width: "6%"},
+	                { display: '创建时间', name: 'createTime',     align: 'center', width: "6%"},
+	                { display: '备注', name: 'remark',     align: 'center', width: "6%"},
+	                { display: '操作', isAllowHide: false, align: 'left', width:"10%",
 						 render: function (rowdata, rowindex, value, column){
 	                 	    return '<div class="padding_top4 padding_left20">'
 	                 	   				+'<a href="#"  onclick="onEdit(' + rowdata.orgTypeId +')"><span class="icon_edit">修改</span></a>'
@@ -135,7 +148,7 @@
 			URL : "${ctx}/orgType/edit.do?orgTypeId="+rowId,
 			Title : "编辑单位类别",
 			Width : 500,
-			Height : 320
+			Height : 400
 		});
 	}
 	
@@ -204,6 +217,10 @@
 					<td>
 						<input type="text" id="waterPrice" name="waterPrice" />
 					</td>
+					<td>增长比例:</td>
+					<td>
+						<input type="text" id="growthRatios" name="growthRatios" />%
+					</td>
 					<td><button type="button" onclick="searchHandler()"><span class="icon_find">查询</span></button></td>
 					<td><button type="button" onclick="resetSearch()"><span class="icon_reload">重置</span></button></td>
 				</tr>

+ 1 - 1
src/config/jdbc.properties

@@ -7,7 +7,7 @@ jdbc.url.mysql=jdbc:mysql://39.101.216.213:3306/gxwss?user=root&password=root&us
 hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
 #hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
 jdbc.username=root
-jdbc.password=123456
+jdbc.password=LuoBo@9527!
 
 
 oracledriver=oracle.jdbc.OracleDriver

+ 39 - 0
src/java/com/base/model/BaseOrgType.hbm.xml

@@ -14,6 +14,45 @@
         <property name="waterPrice" type="java.lang.Float">
             <column name="water_price" precision="8" scale="0" />
         </property>
+        <property name="janPrice" type="java.lang.Float">
+            <column name="jan_price" precision="8" scale="0" />
+        </property>
+        <property name="febPrice" type="java.lang.Float">
+            <column name="feb_price" precision="8" scale="0" />
+        </property>
+        <property name="marPrice" type="java.lang.Float">
+            <column name="mar_price" precision="8" scale="0" />
+        </property>
+        <property name="aprPrice" type="java.lang.Float">
+            <column name="apr_price" precision="8" scale="0" />
+        </property>
+        <property name="mayPrice" type="java.lang.Float">
+            <column name="may_price" precision="8" scale="0" />
+        </property>
+        <property name="junPrice" type="java.lang.Float">
+            <column name="jun_price" precision="8" scale="0" />
+        </property>
+        <property name="julPrice" type="java.lang.Float">
+            <column name="jul_price" precision="8" scale="0" />
+        </property>
+        <property name="augPrice" type="java.lang.Float">
+            <column name="aug_price" precision="8" scale="0" />
+        </property>
+        <property name="septPrice" type="java.lang.Float">
+            <column name="sept_price" precision="8" scale="0" />
+        </property>
+        <property name="octPrice" type="java.lang.Float">
+            <column name="oct_price" precision="8" scale="0" />
+        </property>
+        <property name="novPrice" type="java.lang.Float">
+            <column name="nov_price" precision="8" scale="0" />
+        </property>
+        <property name="decPrice" type="java.lang.Float">
+            <column name="dec_price" precision="8" scale="0" />
+        </property>
+        <property name="growthRatio" type="java.lang.Float">
+            <column name="growth_ratio" precision="8" scale="4" ></column>
+        </property>
         <property name="status" type="string">
             <column name="status" length="10" />
         </property>

+ 136 - 1
src/java/com/base/model/BaseOrgType.java

@@ -17,6 +17,8 @@ public class BaseOrgType{
 	private String orgName;
 	/**水价**/
 	private Float waterPrice;
+	/**增加比例 luobo**/
+	private Float  growthRatio;
 	/**状态**/
 	private String status;
 	/**备注**/
@@ -25,11 +27,28 @@ public class BaseOrgType{
 	private String creater;
 	/**创建时间**/
 	private String createTime;
+
+	private Float janPrice;
+	private Float febPrice;
+	private Float marPrice;
+	private Float aprPrice;
+	private Float mayPrice;
+	private Float junPrice;
+	private Float julPrice;
+	private Float augPrice;
+	private Float septPrice;
+	private Float octPrice;
+	private Float novPrice;
+	private Float decPrice;
+
+
 	/**单位基本信息**/
 	private Set<BusOrg> busOrg;
 	
 	//方便页面显示水价
 	private String waterPrices;
+	/**方便页面显示增长比例**/
+	private String growthRatios;
 	
 	
 	/**
@@ -49,7 +68,20 @@ public class BaseOrgType{
 		this.waterPrices = waterPrices;
 	}
 
-	
+	public String getGrowthRatios() {
+		String str="";
+		if(this.growthRatio!= null){
+			DecimalFormat df=new DecimalFormat("##0.00");
+			str=df.format(growthRatio);
+		}
+		return str;
+	}
+
+	public void setGrowthRatios(String growthRatios) {
+
+		this.growthRatios = growthRatios;
+	}
+
 	public Long getOrgTypeId() {
 		return orgTypeId;
 	}
@@ -74,6 +106,14 @@ public class BaseOrgType{
 		this.waterPrice = waterPrice;
 	}
 
+	public Float getGrowthRatio() {
+		return growthRatio;
+	}
+
+	public void setGrowthRatio(Float growthRatio) {
+		this.growthRatio = growthRatio;
+	}
+
 	public String getStatus() {
 		return this.status;
 	}
@@ -115,4 +155,99 @@ public class BaseOrgType{
 	}
 
 
+	public Float getJanPrice() {
+		return janPrice;
+	}
+
+	public void setJanPrice(Float janPrice) {
+		this.janPrice = janPrice;
+	}
+
+	public Float getFebPrice() {
+		return febPrice;
+	}
+
+	public void setFebPrice(Float febPrice) {
+		this.febPrice = febPrice;
+	}
+
+	public Float getMarPrice() {
+		return marPrice;
+	}
+
+	public void setMarPrice(Float marPrice) {
+		this.marPrice = marPrice;
+	}
+
+	public Float getAprPrice() {
+		return aprPrice;
+	}
+
+	public void setAprPrice(Float aprPrice) {
+		this.aprPrice = aprPrice;
+	}
+
+	public Float getMayPrice() {
+		return mayPrice;
+	}
+
+	public void setMayPrice(Float mayPrice) {
+		this.mayPrice = mayPrice;
+	}
+
+	public Float getJunPrice() {
+		return junPrice;
+	}
+
+	public void setJunPrice(Float junPrice) {
+		this.junPrice = junPrice;
+	}
+
+	public Float getJulPrice() {
+		return julPrice;
+	}
+
+	public void setJulPrice(Float julPrice) {
+		this.julPrice = julPrice;
+	}
+
+	public Float getAugPrice() {
+		return augPrice;
+	}
+
+	public void setAugPrice(Float augPrice) {
+		this.augPrice = augPrice;
+	}
+
+	public Float getSeptPrice() {
+		return septPrice;
+	}
+
+	public void setSeptPrice(Float septPrice) {
+		this.septPrice = septPrice;
+	}
+
+	public Float getOctPrice() {
+		return octPrice;
+	}
+
+	public void setOctPrice(Float octPrice) {
+		this.octPrice = octPrice;
+	}
+
+	public Float getNovPrice() {
+		return novPrice;
+	}
+
+	public void setNovPrice(Float novPrice) {
+		this.novPrice = novPrice;
+	}
+
+	public Float getDecPrice() {
+		return decPrice;
+	}
+
+	public void setDecPrice(Float decPrice) {
+		this.decPrice = decPrice;
+	}
 }

+ 14 - 1
src/java/com/base/model/temp/BaseOrgTypeTempRowMap.java

@@ -23,7 +23,20 @@ public class BaseOrgTypeTempRowMap implements
 		bot.setOrgTypeId(rs.getLong("org_type_id"));
 		bot.setOrgName(rs.getString("org_name"));
 		bot.setWaterPrice(rs.getFloat("water_price"));
-		bot.setWaterPrices(rs.getString("water_price"));
+		bot.setJanPrice(rs.getFloat("jan_price"));
+		bot.setFebPrice(rs.getFloat("feb_price"));
+		bot.setMarPrice(rs.getFloat("mar_price"));
+		bot.setAprPrice(rs.getFloat("apr_price"));
+		bot.setMayPrice(rs.getFloat("may_price"));
+		bot.setJunPrice(rs.getFloat("jun_price"));
+		bot.setJulPrice(rs.getFloat("jul_price"));
+		bot.setAugPrice(rs.getFloat("aug_price"));
+		bot.setSeptPrice(rs.getFloat("sept_price"));
+		bot.setOctPrice(rs.getFloat("oct_price"));
+		bot.setNovPrice(rs.getFloat("nov_price"));
+		bot.setDecPrice(rs.getFloat("dec_price"));
+		bot.setGrowthRatio(rs.getFloat("growth_ratio"));
+		bot.setGrowthRatios(rs.getString("growth_ratio"));
 		bot.setStatus(rs.getString("status"));
 		bot.setRemark(rs.getString("remark"));
 		bot.setCreater(rs.getString("creater"));

+ 1 - 1
src/java/com/base/service/impl/BaseOrgTypeServiceImpl.java

@@ -30,7 +30,7 @@ public class BaseOrgTypeServiceImpl extends
 	@Override
 	public Page getOrgType(String orgName, Float waterPrice, int pageNo,
 			int pageSize) {
-		String sql = "SELECT bot.org_type_id,bot.org_name,bot.water_price,bot.`status`,bot.remark,bot.creater,bot.create_time FROM base_org_type bot ";
+		String sql = "SELECT bot.* FROM base_org_type bot ";
 		if (orgName != null && !orgName.trim().equals(""))
 			sql += "where bot.org_name like '%" + orgName + "%'";
 		if (waterPrice != null) {