瀏覽代碼

Merge remote-tracking branch 'origin/master'

xs 5 年之前
父節點
當前提交
5e2d3de781

+ 26 - 2
src/main/java/com/jeeplus/modules/sg/audit/information/utils/ImportInformation.java

@@ -12,6 +12,7 @@ import com.jeeplus.modules.sys.utils.UserUtils;
 import org.apache.poi.ss.usermodel.Row;
 import org.springframework.beans.factory.annotation.Autowired;
 
+import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
@@ -74,7 +75,10 @@ public  class ImportInformation {
                 if (price.equals("")) {
                     price = "0.0";
                 }
-                difference = Double.parseDouble(outboundNumber.toString()) - Double.parseDouble(authorizedNumber.toString());
+                BigDecimal b1 = new BigDecimal(Double.parseDouble(outboundNumber.toString()));
+                BigDecimal b2 = new BigDecimal(Double.parseDouble(authorizedNumber.toString()));
+                double v =  b1.subtract(b2).doubleValue();
+                difference =  v;
                 if (difference == 0.0) {
                     isBack = "是";
                     isBackNo = 0;
@@ -305,7 +309,27 @@ public  class ImportInformation {
                 if (projectId.equals("")) {
                     continue;
                 }
-                if (projectType.equals("配网建设改造项目")||projectType.equals("配网专项成本")||projectType.equals("大中型基建项目")){
+                if (projectType.equals("项目类型")
+                    ||projectType.equals("配网建设改造项目")
+                    ||projectType.equals("新建居住区供配电工程")
+                    ||projectType.equals("配网专项成本")
+                    ||projectType.equals("生产辅助大修项目")
+                    ||projectType.equals("电网检修专项")
+                    ||projectType.equals("大中型基建项目")
+                    ||projectType.equals("农电运检项目")
+                    ||projectType.equals("营销专项")
+                    ||projectType.equals("生产修理项目")
+                    ||projectType.equals("通信技改项目")
+                    ||projectType.equals("二次技改项目")
+                    ||projectType.equals("一次技改项目")
+                    ||projectType.equals("营销成本项目")
+                    ||projectType.equals("营销资本项目")
+                    ||projectType.equals("通信修理项目")
+                    ||projectType.equals("调度修理项目")
+                    ||projectType.equals("小型基建项目")
+                    ||projectType.equals("信息运维")
+                    ||projectType.equals("生产辅助技改项目")
+                ){
                     Information inforById = informationService.findListById(projectId.toString());
                     if (inforById != null) {
                         if (inforById.getFirstFinish() != null || inforById.getFirstFinish() != "") {

+ 28 - 4
src/main/java/com/jeeplus/modules/sg/managementcenter/activiti/web/DivideController.java

@@ -325,15 +325,39 @@ public class DivideController extends BaseController {
                     Map<String, Object> vars = Maps.newHashMap();
                     String precondition = d.getPrecondition();
                     Project user = MyActiviUtils.findUser(d.getProcInsId());
+                    //通过页面修改施工交底
                     vars.put("self", false);
-                    if (precondition != null && !"".equals(precondition)) {
+                    //完成施工交底
+                    vars.put("finish", false);
+                    //完成施工交底
+                    vars.put("problem",false);
+                    //前置条件,人工判断
+                    vars.put("pass4",false);
+                    //判断是否有前置条件
+                    if ((precondition != null && !"".equals(precondition))) {
                         vars.put("problem",false);
                         vars.put("pass4", true);
                         vars.put("processer", user.getProjectManageRole());
                     } else {
-                        vars.put("pass4",false);
-                        vars.put("problem", true);
-                        vars.put("processer", user.getProjectManageRole());
+                        //没有前置条件,判断是否为无问题
+                        if (
+                                "无".equals(d.getHiddenDanger()) &&
+                                "否".equals(d.getInfluenceConstruction()) &&
+                                "否".equals(d.getProjectRepetition()) &&
+                                "否".equals(d.getImplemented()) &&
+                                "有".equals(d.getTransformer()) &&
+                                "一致".equals(d.getLineName()) &&
+                                "是".equals(d.getQuantities()) &&
+                                "一致".equals(d.getRodNumber()) &&
+                                "4.无".equals(d.getAdministrationType())
+                        ) {
+                            vars.put("finish", true);
+                        } else {
+                            vars.put("pass4", false);
+                            vars.put("problem", true);
+                            vars.put("processer", user.getProjectManageRole());
+                        }
+
                     }
                     actTaskService.complete(d.getTaskId(), d.getProcInsId(), "系统判断成功,请自行查看", vars);
                 }

+ 79 - 0
src/main/java/com/jeeplus/modules/sg/picking/activiti/entity/Acquisition.java

@@ -0,0 +1,79 @@
+package com.jeeplus.modules.sg.picking.activiti.entity;
+
+import com.jeeplus.core.persistence.ActEntity;
+
+import java.util.Date;
+
+public class Acquisition extends ActEntity<Acquisition> {
+    //项目定义号
+    private String projectId;
+    //项目发起的次数
+    private String theNumber;
+    //模块版本号
+    private String version;
+    //选择的项目及数量
+    private String selectNumber;
+    //是否可以导出erp领料单
+    private Integer exportStatus;
+    //是否开过领料单
+    private Integer exportAfter;
+    //导出erp领料单时间
+    private Date exportTime;
+
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public String getTheNumber() {
+        return theNumber;
+    }
+
+    public void setTheNumber(String theNumber) {
+        this.theNumber = theNumber;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public String getSelectNumber() {
+        return selectNumber;
+    }
+
+    public void setSelectNumber(String selectNumber) {
+        this.selectNumber = selectNumber;
+    }
+
+    public Integer getExportStatus() {
+        return exportStatus;
+    }
+
+    public void setExportStatus(Integer exportStatus) {
+        this.exportStatus = exportStatus;
+    }
+
+    public Integer getExportAfter() {
+        return exportAfter;
+    }
+
+    public void setExportAfter(Integer exportAfter) {
+        this.exportAfter = exportAfter;
+    }
+
+    public Date getExportTime() {
+        return exportTime;
+    }
+
+    public void setExportTime(Date exportTime) {
+        this.exportTime = exportTime;
+    }
+}

+ 6 - 0
src/main/java/com/jeeplus/modules/sg/picking/activiti/mapper/ShowListMapper.java

@@ -6,6 +6,7 @@ package com.jeeplus.modules.sg.picking.activiti.mapper;
 import com.jeeplus.core.persistence.BaseMapper;
 import com.jeeplus.core.persistence.annotation.MyBatisMapper;
 import com.jeeplus.modules.sg.managementcenter.materialInventory.entity.MaterialInventory;
+import com.jeeplus.modules.sg.picking.activiti.entity.Acquisition;
 import com.jeeplus.modules.sg.picking.activiti.entity.PickApplication;
 import com.jeeplus.modules.sg.picking.activiti.entity.PickIng;
 import com.jeeplus.modules.sg.picking.activiti.entity.ShowList;
@@ -79,4 +80,9 @@ public interface ShowListMapper extends BaseMapper<ShowList> {
      *查询在所有在《领料:配网物资专职审核领料单》节点的代码的物料清单
      */
     List<ShowList> processListQuery(List<String> list);
+
+    /**
+     * 所有项目的领料单
+     */
+    List<Acquisition> acquisitionList();
 }

+ 17 - 0
src/main/java/com/jeeplus/modules/sg/picking/activiti/mapper/xml/ShowListMapper.xml

@@ -276,4 +276,21 @@
 		</foreach>
 		)
 	</select>
+
+	<select id="acquisitionList" resultType="com.jeeplus.modules.sg.picking.activiti.entity.Acquisition">
+		select
+		a.id,
+		a.proc_ins_id,
+		b.require_name as projectId,
+		a.version,
+		a.select_number,
+		a.exportStatus,
+		a.exportAfter,
+		a.exportTime
+		from md_acquisition_process as a
+		left join xm_project_details as b
+		on a.project_id = b.project_id
+		where exportStatus = '1'
+		order by exportAfter;
+	</select>
 </mapper>

+ 7 - 0
src/main/java/com/jeeplus/modules/sg/picking/activiti/service/ShowListService.java

@@ -41,6 +41,13 @@ public class ShowListService extends CrudService<ShowListMapper, ShowList> {
 		return page;
 	}
 
+	public Page<Acquisition> acquisitionList(Page<Acquisition> page,Acquisition acquisition){
+		dataRuleFilter(acquisition);
+		acquisition.setPage(page);
+		page.setList(mapper.acquisitionList());
+		return page;
+	}
+
 	public Page<ShowList> inventoryComparisonData(Page<ShowList> page, ShowList showList,List<String> searchList) {
 		dataRuleFilter(showList);
 		showList.setPage(page);

+ 20 - 0
src/main/java/com/jeeplus/modules/sg/picking/activiti/web/PickIngController.java

@@ -192,6 +192,26 @@ public class PickIngController extends BaseController {
         return "modules/sg/picking/activiti/inventoryComparison";
     }
 
+    /**
+     * 导出erp领料单
+     */
+    @RequiresPermissions("picking:activiti:exportErp")
+    @RequestMapping(value = "exportErp")
+    public String exportErp(Acquisition acquisition, Model model) {
+        model.addAttribute("acquisition", acquisition);
+        return "modules/sg/picking/activiti/exportErp";
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "exportData")
+    public Map<String, Object> exportData(Acquisition acquisition, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<Acquisition> page = showListService.acquisitionList(new Page<Acquisition>(request, response), acquisition);
+        List<Acquisition> list = page.getList();
+        for (Acquisition a :list) {
+            a.setTheNumber("第"+a.getTheNumber()+"次领料单");
+        }
+        return getBootstrapData(page);
+    }
 
     //    manager
     @ResponseBody

+ 13 - 0
src/main/webapp/webpage/modules/sg/audit/material/materialList.js

@@ -57,6 +57,9 @@ $(document).ready(function() {
                contextMenu: '#context-menu',
                onClickRow: function(row, $el){
                },
+				onLoadSuccess: function () {  //加载成功时执行
+					getTdValue();
+				},
                	onShowSearch: function () {
 			$("#search-collapse").slideToggle();
 		},
@@ -165,6 +168,16 @@ $(document).ready(function() {
 		}
 	}
 
+	function getTdValue() {
+		var tableId = document.getElementById("informationTable");
+		for(var i = 1;i < tableId.rows.length;i++) {
+			if(tableId.rows[i].cells[4].innerHTML!=0){
+				tableId.rows[i].setAttribute("style","color: red;");
+			}
+		}
+		$("#hiddenSign").val("不是第一次加载")
+	}
+
 
 
 	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端

+ 11 - 7
src/main/webapp/webpage/modules/sg/managementcenter/activiti/divideForm.jsp

@@ -19,6 +19,9 @@
 				var flag7 = false;//代表是否选择了人工判断
 				var flag8 = false;//代表无问题
 				var nValue = $('input[name="favorite"]:checked');
+				if (${pass_construction6=='0'}){
+					$('input[name="favorite"]')
+				}else {
 				$('input[name="favorite"]:checked').each(function(){//遍历每一个名字为interest的复选框,其中选中的执行函数
 					//判断选取的值如果时pass2,flag2为true,代表选择了项目关闭,选取的值不为pass2,flag1为true代表其它类型被选择
 					if ("pass8" == $(this).val()){
@@ -46,6 +49,7 @@
 					}
 					cValue=cValue+";"+($(this).val());//将选中的值添加到数组chk_value中
 				});
+				}
 				if (nValue == null || nValue.size() <= 0) {
 					jp.error("请选择问题类型");
 				} else if(flag1==true&&flag2==true){
@@ -104,13 +108,13 @@
 							<tr>
 								<td class="width-15 active"><label class="pull-right">问题类型:</label></td>
 								<td class="width-35">
-									<input type="checkbox" name="favorite" value="pass8"  <c:if test="${pass_construction7=='0'}">checked="checked"</c:if> onclick="return false"> 无问题 &nbsp;
-									<input type="checkbox" name="favorite" value="pass1" <c:if test="${pass_construction2=='0'}">checked="checked"</c:if> onclick="return false"> 设计变更 &nbsp;
-									<input type="checkbox" name="favorite" value="pass2" <c:if test="${pass_construction1=='0'}">checked="checked"</c:if> onclick="return false"> 项目关闭 &nbsp;
-									<input type="checkbox" name="favorite" value="pass3"  <c:if test="${pass_construction5=='0'}">checked="checked"</c:if> onclick="return false"> 行政政处(城区道路)
-									<input type="checkbox" name="favorite" value="pass5"  <c:if test="${pass_construction3=='0'}">checked="checked"</c:if> onclick="return false"> 农村政处
-									<input type="checkbox" name="favorite" value="pass6"  <c:if test="${pass_construction4=='0'}">checked="checked"</c:if> onclick="return false"> 民事政处/行政政处(公路/水利)
-									<input type="checkbox" name="favorite" value="pass7"  <c:if test="${pass_construction6=='0'}">checked="checked"</c:if> onclick="return false"> 人工判断
+									<input type="checkbox" name="favorite" value="pass8"  <c:if test="${pass_construction7=='0'}">checked="checked"</c:if> onclick="<c:if test="${pass_construction6!='0'}">return false</c:if>"> 无问题 &nbsp;
+									<input type="checkbox" name="favorite" value="pass1" <c:if test="${pass_construction2=='0'}">checked="checked"</c:if> onclick="<c:if test="${pass_construction6!='0'}">return false</c:if>"> 设计变更 &nbsp;
+									<input type="checkbox" name="favorite" value="pass2" <c:if test="${pass_construction1=='0'}">checked="checked"</c:if> onclick="<c:if test="${pass_construction6!='0'}">return false</c:if>"> 项目关闭 &nbsp;
+									<input type="checkbox" name="favorite" value="pass3"  <c:if test="${pass_construction5=='0'}">checked="checked"</c:if> onclick="<c:if test="${pass_construction6!='0'}">return false</c:if>"> 行政政处(城区道路)
+									<input type="checkbox" name="favorite" value="pass5"  <c:if test="${pass_construction3=='0'}">checked="checked"</c:if> onclick="<c:if test="${pass_construction6!='0'}">return false</c:if>"> 农村政处
+									<input type="checkbox" name="favorite" value="pass6"  <c:if test="${pass_construction4=='0'}">checked="checked"</c:if> onclick="<c:if test="${pass_construction6!='0'}">return false</c:if>"> 民事政处/行政政处(公路/水利)
+<%--									<input type="checkbox" name="favorite" value="pass7"  <c:if test="${pass_construction6=='0'}">checked="checked"</c:if> onclick="<c:if test="${pass_construction6!='0'}">return false</c:if>"> 人工判断--%>
 								</td>
 								<td class="width-15 active"><label class="pull-right">项目号:</label></td>
 								<td class="width-35">

+ 133 - 0
src/main/webapp/webpage/modules/sg/picking/activiti/exportErp.js

@@ -0,0 +1,133 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script>
+$(document).ready(function() {
+	var item = "";
+	var procInsId = $("#procInsId").val();
+		console.log(procInsId);
+		//bootstrapTable加载数据
+		$('#informationTable').bootstrapTable({
+			//请求方法
+			method: 'post',
+			//类型json
+			dataType: "json",
+			contentType: "application/x-www-form-urlencoded",
+			//显示检索按钮
+			showSearch: false,
+			//显示刷新按钮
+			showRefresh: false,
+			//显示切换手机试图按钮
+			showToggle: false,
+			//显示 内容列下拉框
+			showColumns: false,
+			//显示到处按钮
+			showExport: false,
+			//显示切换分页按钮
+			showPaginationSwitch: false,
+			//最低显示2行
+			minimumCountColumns: 2,
+			//是否显示行间隔色
+			striped: true,
+			//是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
+			cache: false,
+			//是否显示分页(*)
+			pagination: false,
+			//排序方式
+			sortOrder: "asc",
+			//初始化加载第一页,默认第一页
+			pageNumber: 1,
+			//每页的记录行数(*)
+			pageSize: 10,
+			//可供选择的每页的行数(*)
+			pageList: [10, 25, 50, 100],
+			//这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
+			url: "${ctx}/picking/activiti/exportData",
+			//默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
+			////查询参数,每次调用是会带上这个参数,可自定义
+			queryParams: function (params) {
+				var searchParam = $("#searchForm").serializeJSON();
+				searchParam.pageNo = params.limit === undefined ? "1" : params.offset / params.limit + 1;
+				searchParam.pageSize = params.limit === undefined ? -1 : params.limit;
+				searchParam.orderBy = params.sort === undefined ? "" : params.sort + " " + params.order;
+				return searchParam;
+			},
+			//分页方式:client客户端分页,server服务端分页(*)
+			sidePagination: "server",
+			contextMenuTrigger: "right",//pc端 按右键弹出菜单
+			contextMenuTriggerMobile: "press",//手机端 弹出菜单,click:单击, press:长按。
+			contextMenu: '#context-menu',
+			onClickRow: function (row, $el) {
+			},
+			onShowSearch: function () {
+				$("#search-collapse").slideToggle();
+			},
+			formatNoMatches: function () {
+				return "你的自定义文字说明";
+			},
+			columns: [
+				{
+					checkbox: true
+				},
+				{
+					field: 'materialCode',
+					title: '物料编码',
+				}, {
+					field: 'materialDescription',
+					title: '物料名称',
+				}, {
+					field: 'extensionDescription',
+					title: '扩展描述',
+					width:'200px'
+				}, {
+					field: 'mdUnits',
+					title: '单位',
+				}, {
+					field: 'mdTotalAmount',
+					title: '总量',
+				}, {
+					field: 'availableStockQuantity',
+					title: '可用库存数量',
+				}, {
+					field: 'mdTheParty',
+					title: '甲乙供',
+				}, {
+					field: 'mdText',
+					title: '备注',
+				}
+			]
+		});
+
+	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
+		  $('#informationTable').bootstrapTable("toggleView");
+		}
+
+	$('#informationTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+		'check-all.bs.table uncheck-all.bs.table', function () {
+		$('#remove').prop('disabled', ! $('#informationTable').bootstrapTable('getSelections').length);
+		$('#view,#edit').prop('disabled', $('#informationTable').bootstrapTable('getSelections').length!=1);
+	});
+
+	// 绑定查询按扭
+	$("#search").click("click", function() {
+		$('#informationTable').bootstrapTable('refresh');
+	});
+
+	// 绑定查询重置按扭
+	$("#reset").click("click", function() {
+		$("#searchForm  input").val("");
+		$("#searchForm  select").val("");
+		$('#informationTable').bootstrapTable('refresh');
+	});
+
+});
+
+	function getIdSelections() {
+		return $.map($("#informationTable").bootstrapTable('getSelections'), function (row) {
+			return row.id
+		});
+	}
+	//刷新列表
+	function refresh() {
+		$('#informationTable').bootstrapTable('refresh');
+	}
+
+</script>

+ 25 - 0
src/main/webapp/webpage/modules/sg/picking/activiti/exportErp.jsp

@@ -0,0 +1,25 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>导出erp管理</title>
+	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
+	<meta name="decorator" content="ani"/>
+	<%@ include file="/webpage/include/bootstraptable.jsp"%>
+	<%@include file="exportErp.js" %>
+</head>
+<body>
+	<div class="wrapper wrapper-content">
+	<div class="panel panel-primary">
+	<div class="panel-heading">
+		<h3 class="panel-title">导出erp管理</h3>
+	</div>
+		<form:form id="inputForm" modelAttribute="acquisition" class="form-horizontal">
+			<input type="hidden" id="procInsId" name="procInsId" value="${acquisition.act.procInsId}"/>
+		</form:form>
+			<table id="informationTable"  data-toolbar="#toolbar" class="table"></table>
+		</div>
+	</div>
+	</div>
+</body>
+</html>