tntdc vor 1 Jahr
Ursprung
Commit
054356974c

+ 1 - 6
adm/pom.xml

@@ -338,11 +338,6 @@
 		    <artifactId>jzlib</artifactId>  
 		    <version>1.0.7</version>  
 		</dependency>  
-		<dependency>
-        <groupId>commons-fileupload</groupId>
-        <artifactId>commons-fileupload</artifactId>
-        <version>1.3.1</version>
-        </dependency>
     <dependency>
 <!--支持插入图片-->
         <groupId>org.docx4j</groupId>
@@ -441,7 +436,7 @@
 		<dependency>
 			<groupId>com.alibaba</groupId>
 			<artifactId>easyexcel</artifactId>
-			<version>3.0.5</version>
+			<version>3.2.1</version>
 		</dependency>
 		<dependency>
 	    	<groupId>com.baomidou</groupId>

+ 16 - 7
adm/src/main/java/com/minpay/guomao/datamanage/action/PriceManageAction.java

@@ -289,10 +289,12 @@ public class PriceManageAction implements IMINAction {
 	public MINActionResult modifyPrice(
 			@MINParam(key ="dates") String dates,
 			@MINParam(key ="specsId") String specsId,
-			@MINParam(key ="cjPrice") String cjPrice,
-			@MINParam(key ="ncPrice") String ncPrice,
 			@MINParam(key ="shPrice") String shPrice,
+			@MINParam(key ="ysstsjPrice") String ysstsjPrice,
+			@MINParam(key ="ncPrice") String ncPrice,
+			@MINParam(key ="glPrice") String glPrice,
 			@MINParam(key ="hlPrice") String hlPrice,
+			@MINParam(key ="cjPrice") String cjPrice,
 			MINSession session
 			) throws Exception {
 		MINActionResult res = new MINActionResult();
@@ -301,8 +303,8 @@ public class PriceManageAction implements IMINAction {
 		//获取操作员信息
 		User user = session.getUser();
 		
-		String[] priceType = {"00", "01", "06", "07"};
-		String[] priceList = {ncPrice, cjPrice, shPrice, hlPrice};
+		String[] priceType = {"00", "01", "06", "07", "08", "09"};
+		String[] priceList = {ncPrice, cjPrice, shPrice, hlPrice, glPrice, ysstsjPrice};
 		for (int i = 0; i < priceType.length; i++) {
 			ApPriceInfExample priceInfExample = new ApPriceInfExample();
 			priceInfExample.createCriteria()
@@ -338,8 +340,8 @@ public class PriceManageAction implements IMINAction {
 			}
 		}
 		// 记录日志
-		String logInfo = "操作员:" + user.getName() + ",编辑"+dates+"的价格,南储价:" + ncPrice + "长江价:" + cjPrice + "上海有色网价:" + shPrice + "沪铝当月结算价:" + hlPrice;
-		Service.lookup(ILogService.class).logging(session, logInfo);
+//		String logInfo = "操作员:" + user.getName() + ",编辑"+dates+"的价格,南储价:" + ncPrice + "长江价:" + cjPrice + "上海有色网价:" + shPrice + "沪铝当月结算价:" + hlPrice;
+//		Service.lookup(ILogService.class).logging(session, logInfo);
 		return res;
 	}
 	
@@ -450,6 +452,7 @@ public class PriceManageAction implements IMINAction {
 			arrType.add("06");
 			arrType.add("07");
 			arrType.add("08");
+			arrType.add("09");
 			ApPriceInfExample apiEx = new ApPriceInfExample();
 			apiEx.createCriteria().andSpecsIdEqualTo(arId).andDateEqualTo(dateTime)
 										.andTypeIn(arrType).andAreaEqualTo("00").andStateEqualTo("00")
@@ -524,6 +527,12 @@ public class PriceManageAction implements IMINAction {
 			aei.setType("08");
 			aei.setPrice(map.get("glPrice"));
 			Service.lookup(IMINDataBaseService.class).getMybatisMapper(ApPriceInfMapper.class).insertSelective(aei);
+			//新增有色升贴水价
+			String ysstsjId = Service.lookup(IPublicService.class).getSequence("AP_PRICE_INF_ID");
+			aei.setId(ysstsjId);
+			aei.setType("09");
+			aei.setPrice(map.get("ysstsjPrice"));
+			Service.lookup(IMINDataBaseService.class).getMybatisMapper(ApPriceInfMapper.class).insertSelective(aei);
 		}
 		return res;
 	}
@@ -550,7 +559,7 @@ public class PriceManageAction implements IMINAction {
 			throw new BusinessCodeException("JINM0501");//文件格式不对,请下载模板后上传
 		}
 		// 获取表格信息
-			String[] titleKey = new String[]{"date","cjPrice","ncPrice","shPrice","hlPrice","glPrice"};
+			String[] titleKey = new String[]{"date","cjPrice","ncPrice","shPrice","hlPrice","glPrice","ysstsjPrice"};
 			list = FilesUtil.readExecleasy(fileItem, titleKey, 2);
 		
 		if (list.size() == 0) {

+ 2 - 1
adm/src/main/resources/com/minpay/db/table/own/mapper/ProductionPlanStatisticMapper.xml

@@ -11,7 +11,8 @@
 		cast(ROUND(SUM(CASE WHEN AEI_TYPE = '01' THEN AEI_PRICE ELSE 0 END),2) as char) 'cjPrice',
 		cast(ROUND(SUM(CASE WHEN AEI_TYPE = '06' THEN AEI_PRICE ELSE 0 END),2) as char) 'shPrice',
 		cast(ROUND(SUM(CASE WHEN AEI_TYPE = '07' THEN AEI_PRICE ELSE 0 END),2) as char) 'hlPrice',
-		cast(ROUND(SUM(CASE WHEN AEI_TYPE = '08' THEN AEI_PRICE ELSE 0 END),2) as char) 'glPrice'
+		cast(ROUND(SUM(CASE WHEN AEI_TYPE = '08' THEN AEI_PRICE ELSE 0 END),2) as char) 'glPrice',
+		cast(ROUND(SUM(CASE WHEN AEI_TYPE = '09' THEN AEI_PRICE ELSE 0 END),2) as char) 'ysstsjPrice'
 		FROM ap_price_inf
 		LEFT JOIN ap_product_spec_rel 
 		ON ASR_SPEC_NO = AEI_SPECS_ID

+ 1 - 1
adm/src/main/webapp/WEB-INF/web.xml

@@ -72,7 +72,7 @@
 		<init-param>
 			<!-- 密码 -->
 			<param-name>loginPassword</param-name>
-			<param-value>admin</param-value>
+			<param-value>guomao@2022</param-value>
 		</init-param>
 	</servlet>
 	<servlet-mapping>

+ 25 - 9
adm/src/main/webapp/admin/priceManage/editPrice.html

@@ -30,21 +30,27 @@
 		
 		<div class="layui-form-item">
 			<div class="layui-inline">
-				<label class="layui-form-label">*长江价(元):</label>
+				<label class="layui-form-label">*上海有色网价(元):</label>
 				<div class="layui-input-inline">
-					<input type="tel" name="cjPrice" maxlength="10" id="cjPrice" lay-verify="price" autocomplete="off" placeholder="请输入长江价" class="layui-input">
+					<input type="tel" name="shPrice" maxlength="10" id="shPrice" lay-verify="price" autocomplete="off" placeholder="请输入上海有色网价" class="layui-input">
+				</div>
+			</div>
+			<div class="layui-inline">
+				<label class="layui-form-label">*有色升贴水(元):</label>
+				<div class="layui-input-inline">
+					<input type="tel" name="ysstsjPrice" maxlength="10" id="ysstsjPrice" lay-verify="price" autocomplete="off" placeholder="请输入有色升贴水" class="layui-input">
 				</div>
 			</div>
 			<div class="layui-inline">
-				<label class="layui-form-label">*南储价(元):</label>
+				<label class="layui-form-label">*南储价均价(元):</label>
 				<div class="layui-input-inline">
 					<input type="tel" name="ncPrice" maxlength="10" id="ncPrice" lay-verify="price" autocomplete="off" placeholder="请输入南储价" class="layui-input">
 				</div>
 			</div>
 			<div class="layui-inline">
-				<label class="layui-form-label">*上海有色网价(元):</label>
+				<label class="layui-form-label">*钢联南储均价(元):</label>
 				<div class="layui-input-inline">
-					<input type="tel" name="shPrice" maxlength="10" id="shPrice" lay-verify="price" autocomplete="off" placeholder="请输入上海有色网价" class="layui-input">
+					<input type="tel" name="glPrice" maxlength="10" id="glPrice" lay-verify="price" autocomplete="off" placeholder="请输入南储价" class="layui-input">
 				</div>
 			</div>
 			<div class="layui-inline">
@@ -53,6 +59,12 @@
 					<input type="tel" name="hlPrice" maxlength="10" id="hlPrice" lay-verify="price" autocomplete="off" placeholder="请输入沪铝结算价" class="layui-input">
 				</div>
 			</div>
+			<div class="layui-inline">
+				<label class="layui-form-label">*长江价(元):</label>
+				<div class="layui-input-inline">
+					<input type="tel" name="cjPrice" maxlength="10" id="cjPrice" lay-verify="price" autocomplete="off" placeholder="请输入长江价" class="layui-input">
+				</div>
+			</div>
 	 	</div>
 			
 	    <div class="layui-form-item box-button">
@@ -69,10 +81,12 @@
           
           $("#date").val(editPriceInf.dates);
           $("#specNo").val(editPriceInf.spValue);
-          $("#cjPrice").val(editPriceInf.cjPrice);
-          $("#ncPrice").val(editPriceInf.ncPrice);
           $("#shPrice").val(editPriceInf.shPrice);
+          $("#ysstsjPrice").val(editPriceInf.ysstsjPrice);
+          $("#ncPrice").val(editPriceInf.ncPrice);
+          $("#glPrice").val(editPriceInf.glPrice);
           $("#hlPrice").val(editPriceInf.hlPrice);
+          $("#cjPrice").val(editPriceInf.cjPrice);
           
           form.verify({
           	price:function(value) {
@@ -86,10 +100,12 @@
           });
           //监听提交
   		form.on('submit(demo1)', function(data) {
-  			editPriceInf.cjPrice = $("#cjPrice").val();
-  			editPriceInf.ncPrice = $("#ncPrice").val();
   			editPriceInf.shPrice = $("#shPrice").val();
+  			editPriceInf.ysstsjPrice = $("#ysstsjPrice").val();
+  			editPriceInf.ncPrice = $("#ncPrice").val();
+  			editPriceInf.glPrice = $("#glPrice").val();
   			editPriceInf.hlPrice = $("#hlPrice").val();
+  			editPriceInf.cjPrice = $("#cjPrice").val();
   			
   			$.request({
   				action : 'PriceManageAction/modifyPrice',

+ 24 - 13
adm/src/main/webapp/admin/priceManage/priceManage.html

@@ -35,9 +35,15 @@
 			
 			<div class="d-dashed" style="margin: 10px 0;"></div> 
 			<div class="layui-inline">
-				<label class="f12-gray4">长江价均价:</label>
+				<label class="f12-gray4">上海有色网价均价:</label>
 				<div class="layui-input-inline">
-					<input type="text" class="layui-input" id="avgCj" name="avgCj" value="0" style="border:none;color: red" disabled="disabled" class="search-select">
+					<input type="text" class="layui-input" id="avgSh" name="avgSh" value="0" style="border:none;color: red" disabled="disabled" class="search-select">
+				</div>
+			</div>
+			<div class="layui-inline">
+				<label class="f12-gray4">有色升贴水:</label>
+				<div class="layui-input-inline">
+					<input type="text" class="layui-input" id="avgYsstsj" name="avgYsstsj" value="0" style="border:none;color: red" disabled="disabled" class="search-select">
 				</div>
 			</div>
 			<div class="layui-inline">
@@ -47,9 +53,9 @@
 				</div>
 			</div>
 			<div class="layui-inline">
-				<label class="f12-gray4">上海有色网价均价:</label>
+				<label class="f12-gray4">钢联南储均价:</label>
 				<div class="layui-input-inline">
-					<input type="text" class="layui-input" id="avgSh" name="avgSh" value="0" style="border:none;color: red" disabled="disabled" class="search-select">
+					<input type="text" class="layui-input" id="avgGl" name="avgGl" value="0" style="border:none;color: red" disabled="disabled" class="search-select">
 				</div>
 			</div>
 			<div class="layui-inline">
@@ -59,9 +65,9 @@
 				</div>
 			</div>
 			<div class="layui-inline">
-				<label class="f12-gray4">钢联南储均价:</label>
+				<label class="f12-gray4">长江价均价:</label>
 				<div class="layui-input-inline">
-					<input type="text" class="layui-input" id="avgGl" name="avgGl" value="0" style="border:none;color: red" disabled="disabled" class="search-select">
+					<input type="text" class="layui-input" id="avgCj" name="avgCj" value="0" style="border:none;color: red" disabled="disabled" class="search-select">
 				</div>
 			</div>
 		</div>
@@ -110,8 +116,8 @@
 		form.render();
 	})
 	
+	
     function getHtYue(){
-		debugger;
 		var date = new Date();
 		var month = (date.getMonth() + 1);
 		var day = date.getDate();
@@ -200,12 +206,13 @@
 		    ,cols: [[ //表头
    		       {type:'numbers',title: '序号',width:"5%"}   
    		      ,{field: 'dates', title: '日期', width:"15%"}
-   		      ,{field: 'cjPrice', title: '长江价',width:"15%"}
-   		      ,{field: 'ncPrice', title: '南储价', width:"15%"}
-   		      ,{field: 'shPrice', title: '上海有色网价',width:"15%"}
-   		      ,{field: 'hlPrice', title: '沪铝结算价',width:"15%"}
-   		   	  ,{field: 'glPrice', title: '钢联南储均价',width:"15%"}
-   		   	  ,{field: 'operate', title: '操作', width:"20%", toolbar: '#barDemo',fixed:'right'}
+   		   	  ,{field: 'shPrice', title: '上海有色网价',width:"10%"}
+   		      ,{field: 'ysstsjPrice', title: '有色升贴水',width:"10%"}
+   		      ,{field: 'ncPrice', title: '南储价', width:"10%"}
+   		      ,{field: 'glPrice', title: '钢联南储均价',width:"10%"}
+   		      ,{field: 'hlPrice', title: '沪铝结算价',width:"10%"}
+   		      ,{field: 'cjPrice', title: '长江价',width:"10%"}
+   		   	  ,{field: 'operate', title: '操作', width:"10%", toolbar: '#barDemo',fixed:'right'}
 		    ]]
 		    ,done: function(res, curr, count){
 		        var avgPriceList = res.avgPriceList;
@@ -215,6 +222,7 @@
 		        var avgSh = "0.00";
 		        var avgHl = "0.00";
 		        var avgGl = "0.00";
+		        var avgYsstsj = "0.00";
 		        for (let o of avgPriceList) {
 		        	if (o.type == '00') {
 		        		avgNc = o.avgPrice;
@@ -226,6 +234,8 @@
 		        		avgHl = o.avgPrice;
 		        	}  else if (o.type == '08') {
 		        		avgGl = o.avgPrice;
+		        	}  else if (o.type == '09') {
+		        		avgYsstsj = o.avgPrice;
 		        	} 
 		        }
 		        $("#avgCj").val(avgCj);
@@ -233,6 +243,7 @@
 		        $("#avgSh").val(avgSh);
 		        $("#avgHl").val(avgHl);
 		        $("#avgGl").val(avgGl);
+		        $("#avgYsstsj").val(avgYsstsj);
 		      }
 		    ,even: true //开启隔行背景
 		  });

+ 12 - 28
adm/src/main/webapp/admin/priceManage/uploadPrice.html

@@ -49,33 +49,15 @@
 			    	<input type="hidden" name="arId" maxlength="30" id ="arId" lay-verify="arId" autocomplete="off" class="layui-input">
 			    </div>
 			</div>
-<!-- 			<div class="layui-inline"> -->
-<!-- 				<label class="layui-form-label">选择日期:</label> -->
-<!-- 				<div class="layui-input-block"> -->
-<!-- 				<input type="text" name="date" id="date" lay-verify="required" autocomplete="off" placeholder="-" class="layui-input"> -->
-<!-- 				</div> -->
-<!-- 			</div> -->
-<!-- 		<div class="layui-inline"> -->
-<!-- 		      <label class="layui-form-label">*日期:</label> -->
-<!-- 		      <div class="layui-input-inline"> -->
-<!-- 		        <input type="text" class="layui-input" id="date" name="date" lay-verify="date" placeholder="请选择日期"> -->
-<!-- 		      </div> -->
-<!-- 	    </div>	 -->
 	    </div>  
     </div> 
   </form>
-	    	<a href="../../excel/jiageguanli.xlsx" download="价格管理.xlsx" id = "changche"><button type="button" class="layui-btn">下载价格管理模板</button></a>
+    	 <a href="../../excel/jiageguanli.xlsx" download="价格管理.xlsx" id = "changche"><button type="button" class="layui-btn">下载价格管理模板</button></a>
 		 <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
 			 <legend>选择文件后再上传</legend>
 		 </fieldset>
 		 <button type="button" class="layui-btn" id="chooseFile"><i class="layui-icon">&#xe654;</i>选择文件</button>
-	    	<button type="button" class="layui-btn" id="upload">开始上传</button>
-<!-- 	    	<div class="layui-inline" id="allStockDiv"> -->
-<!-- 				<label class="f12-gray4">重量合计:</label> -->
-<!-- 				<div class="layui-input-inline"> -->
-<!-- 					<input type="text" class="layui-input" id="allMoney" name="allMoney" style="border:none;color: red" disabled="disabled" class="search-select"> -->
-<!-- 				</div> -->
-<!-- 			</div> -->
+    	<button type="button" class="layui-btn" id="upload">开始上传</button>
     </div> 
     <div style="margin-top: 20px;margin-left: 60px;margin-right: 120px; margin-bottom:95px;"> 
 	<table id="tableTest" lay-filter="tableFilter"></table>
@@ -144,12 +126,13 @@
 		    	,cols : [[ //表头
                	   {type:'numbers',title: '序号',width:"5%"}   
 		  		   ,{field: 'date', title: '日期',width:"13%",edit: 'text'}
-		  		   ,{field: 'cjPrice', title: '长江价(元)',width:"13%",edit: 'text'}
-		  		   ,{field: 'ncPrice', title: '南储价(元)',width:"13%",edit: 'text'}
-		  		   ,{field: 'shPrice', title: '上海有色网价(元)',width:"13%",edit: 'text'}
-		  		   ,{field: 'hlPrice', title: '沪铝结算价(元)',width:"13%",edit: 'text'}
-		  		   ,{field: 'glPrice', title: '钢联南储均价(元)',width:"13%",edit: 'text'}
-				   ,{field : 'operate', title: '操作',fixed:'right', width: "18%", toolbar: '#handle'}	   
+		  		   ,{field: 'cjPrice', title: '长江价(元)',width:"10%",edit: 'text'}
+		  		   ,{field: 'ncPrice', title: '南储价(元)',width:"10%",edit: 'text'}
+		  		   ,{field: 'shPrice', title: '上海有色网价(元)',width:"10%",edit: 'text'}
+		  		   ,{field: 'hlPrice', title: '沪铝结算价(元)',width:"10%",edit: 'text'}
+		  		   ,{field: 'glPrice', title: '钢联南储均价(元)',width:"10%",edit: 'text'}
+		  		   ,{field: 'ysstsjPrice', title: '有色升贴水(元)',width:"10%",edit: 'text'}
+				   ,{field : 'operate', title: '操作',fixed:'right', width: "15%", toolbar: '#handle'}	   
 				]]
 				,page: false
 				,done: function(res, curr, count){
@@ -266,7 +249,7 @@
 	    				for (var i = 1; i < data.length; i++) {
 	    					var dataNew;
 		    				if(!isEmpty(data[i])){
-		    					dataNew = {"trid":"isdecision"+i,"date":data[i].date,"cjPrice":data[i].cjPrice,"ncPrice":data[i].ncPrice,"shPrice":data[i].shPrice,"hlPrice":data[i].hlPrice,"glPrice":data[i].glPrice}; 
+		    					dataNew = {"trid":"isdecision"+i,"date":data[i].date,"cjPrice":data[i].cjPrice,"ncPrice":data[i].ncPrice,"shPrice":data[i].shPrice,"hlPrice":data[i].hlPrice,"glPrice":data[i].glPrice,"ysstsjPrice":data[i].ysstsjPrice}; 
 		    					oldData.push(dataNew);
 		    				}
 	    				}
@@ -279,7 +262,8 @@
 	    		    		var shPrice = oldData[i].shPrice;
 	    		    		var hlPrice = oldData[i].hlPrice;
 	    		    		var glPrice = oldData[i].glPrice;
-	    		    		var inf = date+cjPrice+ncPrice+shPrice+hlPrice+glPrice;
+	    		    		var ysstsjPrice = oldData[i].ysstsjPrice;
+	    		    		var inf = date+cjPrice+ncPrice+shPrice+hlPrice+glPrice+ysstsjPrice;
 	    		    		if(dateList.indexOf(inf)!=-1){
 	    		    			var seq = i+1;
 	    		    			index += seq+",";

BIN
adm/src/main/webapp/excel/jiageguanli.xlsx