Ver código fonte

施工交底,项目经理组织交底修改项目交底结论,修改页面,选取框回显变更

yue 5 anos atrás
pai
commit
2df33e1416

+ 13 - 3
src/main/java/com/jeeplus/modules/sg/picking/activiti/entity/Acquisition.java

@@ -17,11 +17,13 @@ public class Acquisition extends ActEntity<Acquisition> {
     //是否可以导出erp领料单
     private Integer exportStatus;
     //是否开过领料单
-    private Integer exportAfter;
+    private String exportAfter;
     //导出erp领料单时间
     private Date exportTime;
     //审核通过时间
     private Date managerTime;
+    //项目类型
+    private String itemType;
 
     public String getProjectId() {
         return projectId;
@@ -63,11 +65,11 @@ public class Acquisition extends ActEntity<Acquisition> {
         this.exportStatus = exportStatus;
     }
 
-    public Integer getExportAfter() {
+    public String getExportAfter() {
         return exportAfter;
     }
 
-    public void setExportAfter(Integer exportAfter) {
+    public void setExportAfter(String exportAfter) {
         this.exportAfter = exportAfter;
     }
 
@@ -90,4 +92,12 @@ public class Acquisition extends ActEntity<Acquisition> {
     public void setManagerTime(Date managerTime) {
         this.managerTime = managerTime;
     }
+
+    public String getItemType() {
+        return itemType;
+    }
+
+    public void setItemType(String itemType) {
+        this.itemType = itemType;
+    }
 }

+ 242 - 0
src/main/java/com/jeeplus/modules/sg/picking/activiti/entity/CapitalExport.java

@@ -0,0 +1,242 @@
+package com.jeeplus.modules.sg.picking.activiti.entity;
+
+/**
+ * 导出实体类
+ */
+public class CapitalExport {
+    //编号
+    private String erpNumber;
+    //wbs
+    private String projectWbsNumber;
+    //单体工程名称
+    private String projectName;
+    //WBS元素编码
+    private String wbsNumber;
+    //WBS描述
+    private String wbsDescription;
+    //设备序号
+    private String deviceSerialNumber;
+    //非安装设备标识
+    private String identification;
+    //建筑及线路资产标识
+    private String buildLines;
+    //建筑及设备名称
+    private String nameOfBuilding;
+    //型号规格
+    private String modelSpecification;
+    //设备类型
+    private String equipmentType;
+    //SAP物料编码
+    private String sapMaterialCode;
+    //SAP物料扩展编码
+    private String sapExtensionCode;
+    //单位
+    private String company;
+    //数量
+    private String number;
+    //概算价格
+    private String estimatedPrice;
+    //需求日期
+    private String demandDate;
+    //交货地点及交货方式
+    private String deliveryPlace;
+    //需求计划备注
+    private String demandPlan;
+    //需求部门
+    private String demandDepartment;
+    //申请人
+    private String applicant;
+    //电话号码
+    private String phoneNumber;
+    //前期厂家
+    private String previousManufacturers;
+    //自行采购标识
+    private String selfPurchaseIdentification;
+    //特殊采购标识
+    private String specialPurchaseIdentification;
+    //使用环境
+    private String useEnvironment;
+    //合同草稿号
+    private String contractNo;
+    //合同草稿行项目号
+    private String itemNo;
+    //电商平台技术规范书ID
+    private String idOfCommerce;
+
+
+    public String getErpNumber() {
+        return erpNumber;
+    }
+
+    public void setErpNumber(String erpNumber) {
+        this.erpNumber = erpNumber;
+    }
+
+    public String getProjectWbsNumber() {
+        return projectWbsNumber;
+    }
+
+    public void setProjectWbsNumber(String projectWbsNumber) {
+        this.projectWbsNumber = projectWbsNumber;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public String getWbsNumber() {
+        return wbsNumber;
+    }
+
+    public void setWbsNumber(String wbsNumber) {
+        this.wbsNumber = wbsNumber;
+    }
+
+    public String getWbsDescription() {
+        return wbsDescription;
+    }
+
+    public void setWbsDescription(String wbsDescription) {
+        this.wbsDescription = wbsDescription;
+    }
+
+    public String getDeviceSerialNumber() {
+        return deviceSerialNumber;
+    }
+
+    public void setDeviceSerialNumber(String deviceSerialNumber) {
+        this.deviceSerialNumber = deviceSerialNumber;
+    }
+
+    public String getIdentification() {
+        return identification;
+    }
+
+    public void setIdentification(String identification) {
+        this.identification = identification;
+    }
+
+    public String getBuildLines() {
+        return buildLines;
+    }
+
+    public void setBuildLines(String buildLines) {
+        this.buildLines = buildLines;
+    }
+
+    public String getNameOfBuilding() {
+        return nameOfBuilding;
+    }
+
+    public void setNameOfBuilding(String nameOfBuilding) {
+        this.nameOfBuilding = nameOfBuilding;
+    }
+
+    public String getModelSpecification() {
+        return modelSpecification;
+    }
+
+    public void setModelSpecification(String modelSpecification) {
+        this.modelSpecification = modelSpecification;
+    }
+
+    public String getEquipmentType() {
+        return equipmentType;
+    }
+
+    public void setEquipmentType(String equipmentType) {
+        this.equipmentType = equipmentType;
+    }
+
+    public String getSapMaterialCode() {
+        return sapMaterialCode;
+    }
+
+    public void setSapMaterialCode(String sapMaterialCode) {
+        this.sapMaterialCode = sapMaterialCode;
+    }
+
+    public String getSapExtensionCode() {
+        return sapExtensionCode;
+    }
+
+    public void setSapExtensionCode(String sapExtensionCode) {
+        this.sapExtensionCode = sapExtensionCode;
+    }
+
+    public String getCompany() {
+        return company;
+    }
+
+    public void setCompany(String company) {
+        this.company = company;
+    }
+
+    public String getNumber() {
+        return number;
+    }
+
+    public void setNumber(String number) {
+        this.number = number;
+    }
+
+    public String getEstimatedPrice() {
+        return estimatedPrice;
+    }
+
+    public void setEstimatedPrice(String estimatedPrice) {
+        this.estimatedPrice = estimatedPrice;
+    }
+
+    public String getDemandDate() {
+        return demandDate;
+    }
+
+    public void setDemandDate(String demandDate) {
+        this.demandDate = demandDate;
+    }
+
+    public String getDeliveryPlace() {
+        return deliveryPlace;
+    }
+
+    public void setDeliveryPlace(String deliveryPlace) {
+        this.deliveryPlace = deliveryPlace;
+    }
+
+    public String getDemandPlan() {
+        return demandPlan;
+    }
+
+    public void setDemandPlan(String demandPlan) {
+        this.demandPlan = demandPlan;
+    }
+
+    public String getDemandDepartment() {
+        return demandDepartment;
+    }
+
+    public void setDemandDepartment(String demandDepartment) {
+        this.demandDepartment = demandDepartment;
+    }
+
+    public String getApplicant() {
+        return applicant;
+    }
+
+    public void setApplicant(String applicant) {
+        this.applicant = applicant;
+    }
+
+    public String getPhoneNumber() {
+        return phoneNumber;
+    }
+
+    public void setPhoneNumber(String phoneNumber) {
+        this.phoneNumber = phoneNumber;
+    }
+}

+ 6 - 0
src/main/java/com/jeeplus/modules/sg/picking/activiti/entity/CostDerivation.java

@@ -0,0 +1,6 @@
+package com.jeeplus.modules.sg.picking.activiti.entity;
+/**
+ * 成本项目导出类
+ * */
+public class CostDerivation {
+}

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

@@ -7,6 +7,7 @@ import com.jeeplus.core.persistence.BaseMapper;
 import com.jeeplus.core.persistence.annotation.MyBatisMapper;
 import com.jeeplus.modules.sg.audit.information.entity.Information;
 import com.jeeplus.modules.sg.managementcenter.activiti.entity.Construction;
+import com.jeeplus.modules.sg.picking.activiti.entity.Acquisition;
 import com.jeeplus.modules.sg.picking.activiti.entity.PickIng;
 import com.jeeplus.modules.sg.picking.activiti.entity.ProjectNumber;
 import com.jeeplus.modules.sg.picking.activiti.entity.ShowList;
@@ -40,4 +41,9 @@ public interface PickIngMapper extends BaseMapper<PickIng> {
      * 插入领料清单
      * */
     void processList(@Param("showList")List<ShowList> showList);
+
+    /**
+     * 获取选择项目的流程实例id与类型
+     * */
+    List<Acquisition> findErpType(List<String> list);
 }

+ 13 - 1
src/main/java/com/jeeplus/modules/sg/picking/activiti/mapper/xml/PickIngMapper.xml

@@ -162,5 +162,17 @@
 		</foreach>
 	</insert>
 
-
+	<select id="findErpType" resultType="com.jeeplus.modules.sg.picking.activiti.entity.Acquisition">
+		select a.id,a.proc_ins_id,b.item_type
+		from md_acquisition_process as a
+		LEFT JOIN xm_project_details as b
+		on a.project_id = b.id where a.id
+		in(
+		(
+		<foreach collection="list" item="item" separator=",">
+			#{item}
+		</foreach>
+		)
+		)
+	</select>
 </mapper>

+ 4 - 0
src/main/java/com/jeeplus/modules/sg/picking/activiti/service/PickIngService.java

@@ -156,4 +156,8 @@ public class PickIngService extends CrudService<PickIngMapper, PickIng> {
 	public void processList(List<ShowList> showList) {
 		pickIngMapper.processList(showList);
 	}
+
+	public List<Acquisition> findErpType(List<String> list) {
+		return pickIngMapper.findErpType(list);
+	}
 }

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

@@ -4,10 +4,12 @@ import com.google.common.collect.Maps;
 import com.jeeplus.common.json.AjaxJson;
 import com.jeeplus.common.utils.DateUtils;
 import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ImportExcel;
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.web.BaseController;
 import com.jeeplus.modules.act.service.ActProcessService;
 import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.sg.audit.information.entity.Information;
 import com.jeeplus.modules.sg.managementcenter.activiti.entity.FindTask;
 import com.jeeplus.modules.sg.managementcenter.activiti.service.ConstructionService;
 import com.jeeplus.modules.sg.managementcenter.activiti.utils.MyActiviUtils;
@@ -489,5 +491,36 @@ public class PickIngController extends BaseController {
         }
         return j;
     }
+
+    @ResponseBody
+    @RequestMapping(value = "exportErpData")
+    public AjaxJson exportErpData(String id, HttpServletRequest request, HttpServletResponse response) {
+        AjaxJson j = new AjaxJson();
+        String[] split = id.split(",");
+        List<String> beforeId = new ArrayList<>();
+        for (String a : split) {
+            beforeId.add(a);
+        }
+        //获取选择的id查询出属于什么项目
+        List<Acquisition> erpType = pickIngService.findErpType(beforeId);
+        //资本项目列表
+        List<Acquisition> zbList = new ArrayList<>();
+        //成本项目列表
+        List<Acquisition> cbList = new ArrayList<>();
+        //循环数据,根据类型分组
+        for (Acquisition acquisition:erpType) {
+            String itemType = acquisition.getItemType();
+            if ("资本项目".equals(itemType)) {
+                zbList.add(acquisition);
+            }
+            if ("成本项目".equals(itemType)) {
+                cbList.add(acquisition);
+            }
+        }
+        //根据不同类型导出不同的文件
+
+        //需改导出状态及导出时间
+        return j;
+    }
 }
 

+ 10 - 2
src/main/webapp/webpage/modules/sg/picking/activiti/exportErp.js

@@ -2,8 +2,6 @@
 <script>
 $(document).ready(function() {
 	var item = "";
-	var procInsId = $("#procInsId").val();
-		console.log(procInsId);
 		//bootstrapTable加载数据
 		$('#informationTable').bootstrapTable({
 			//请求方法
@@ -78,6 +76,9 @@ $(document).ready(function() {
 					title: '第几次领料',
 					width:'200px'
 				}, {
+					field: 'exportAfter',
+					title: '是否开过领料单',
+				}, {
 					field: 'exportTime',
 					title: '导出erp领料单时间',
 				}, {
@@ -102,6 +103,7 @@ $(document).ready(function() {
 	$('#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);
+		$('#exportErp').prop('disabled', ! $('#informationTable').bootstrapTable('getSelections').length);
 		$('#view,#edit').prop('disabled', $('#informationTable').bootstrapTable('getSelections').length!=1);
 	});
 
@@ -129,4 +131,10 @@ $(document).ready(function() {
 		$('#informationTable').bootstrapTable('refresh');
 	}
 
+	function exportErp(id){
+		if(id == undefined){
+			id = getIdSelections();
+		}
+		jp.downloadFile('${ctx}/picking/activiti/exportErpData?id=' + id);
+	}
 </script>

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

@@ -14,6 +14,9 @@
 			<div class="panel-heading">
 				<h3 class="panel-title">导出erp管理</h3>
 			</div>
+				<button id="exportErp" class="btn btn-warning" onclick="exportErp()">
+					<i class="fa fa-file-excel-o"></i>导出erp
+				</button>
 			<table id="informationTable"  data-toolbar="#toolbar" class="table"></table>
 		</div>
 	</div>