Commit f7c3c1a1 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

 Conflicts:
	src/main/resources/application.properties
parents afd0ada7 73e51cc1
......@@ -115,7 +115,7 @@ public class HGCG001 extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String planDate = " "; /* 计划日期*/
......
......@@ -103,7 +103,7 @@ public class HGCG001A extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String planDate = " "; /* 计划日期*/
......
......@@ -132,7 +132,7 @@ public class HGCG002 extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String contractDate = " "; /* 合同日期*/
......
......@@ -118,7 +118,7 @@ public class HGCG002B extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String inventType = " "; /* 存货类型*/
......
......@@ -120,7 +120,7 @@ public class HGCG003 extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String receiveDate = " "; /* 收货日期*/
......
......@@ -122,7 +122,7 @@ public class HGCG003B extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String receiveDate = " "; /* 收货日期*/
......
......@@ -120,7 +120,7 @@ public class HGKC001 extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String depositDate = " "; /* 入库日期*/
......
......@@ -108,7 +108,7 @@ public class HGKC002 extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String receiptDate = " "; /* 单据日期*/
......
......@@ -135,7 +135,7 @@ public class HGKC003 extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String depositDate = " "; /* 入库日期*/
......
......@@ -100,7 +100,7 @@ public class HGKC010 extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String whCode = " "; /* 仓库编码*/
......
......@@ -105,7 +105,7 @@ public class HGKC010A extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String whCode = " "; /* 仓库编码*/
......
......@@ -102,7 +102,7 @@ public class HGKC011 extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String whCode = " "; /* 仓库编码*/
......
......@@ -180,5 +180,21 @@ public class ServiceHGSC009 extends ServiceEPBase {
});
}
@OperationLogAnnotation(operModul = "材料计划",operType = "导入",operDesc = "导入操作")
public EiInfo importDate(EiInfo inInfo) {
try {
Map<String, Object> params = new HashMap<>(10);
String fileName = inInfo.getString("fileName");
params.put(HGSC009A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
//解析文件,将文件中数据传入到inInfo中
ExcelUtils.importFromExcel(inInfo, fileName, params, new HGSC009A());
}catch (Exception e){
inInfo.setStatus(EiConstant.STATUS_FAILURE);
LogUtils.setDetailMsg(inInfo, e, "导入失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.AssignStatusEnum;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cb.domain.HGCB001;
import com.baosight.hggp.hg.cb.tools.HGCBTools;
import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.cg.domain.HGCG001A;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.domain.HGKC004;
import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-29 16:14:52
Version : 1.0
schema : hggp
tableName : HGSC008A
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PLAN_MATERIAL_CODE VARCHAR,
PLAN_MATERIAL_NAME VARCHAR,
INVENT_CODE VARCHAR,
INVENT_NAME VARCHAR,
SPEC VARCHAR,
MATERIAL VARCHAR,
LENGTH DECIMAL,
WIDTH DECIMAL,
THICK DECIMAL,
QUANTITY DECIMAL,
SINGLE_WEIGHT DECIMAL,
GROSS_AMOUNT DECIMAL,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR
-->
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGSC009A">
<sql id="condition">
......
......@@ -1259,6 +1259,13 @@ public class HGSCTools {
AssertUtils.isEmpty(results,"材料明细不能为空!");
return results;
}
public static void add(List<Map> arrayList) {
for (Map map:arrayList) {
HGSC009A hgsc009A = new HGSC009A();
hgsc009A.fromMap(map);
}
}
}
}
......@@ -99,7 +99,7 @@ public class HGYX001C extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String whCode = " "; /* 仓库编码*/
......
......@@ -103,7 +103,7 @@ public class HGZL001 extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String receiptDate = " "; /* 单据日期*/
......
......@@ -66,7 +66,7 @@ public class HGZL001A extends DaoEPBase {
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private Integer docType; /* 附件类型*/
private Long checkId = new Long(0); /* 质量单ID*/
private String docId = " "; /* 文件ID*/
......
......@@ -4,6 +4,7 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.hg.sj.tools.HGSJTools;
import com.baosight.hggp.util.importer.Importer;
......@@ -246,6 +247,11 @@ public class ExcelUtils {
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("导入成功" + arrayList.size() + "条");
break;
case "HGSC009":
HGSCTools.THGSC009.add(arrayList);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("导入成功" + arrayList.size() + "条");
break;
default:
}
......
......@@ -36,9 +36,9 @@ datasource.type=dbcp
jdbc.driverClassName=com.mysql.jdbc.Driver
#jdbc.url=jdbc:mysql://127.0.0.1:3306/iplat?useSSL=false&useUnicode=true&characterEncoding=utf-8
jdbc.url=jdbc:mysql://129.211.46.84:3306/iplat_hggp?useSSL=false&useUnicode=true&characterEncoding=utf-8
jdbc.username=root
jdbc.username=hggp
#jdbc.username=root
jdbc.password=Whxz@2019
jdbc.password=hggp123!@#
#jdbc.password=123456
jdbc.maxActive=20
jdbc.validationQuery=SELECT 1 FROM ${platSchema}.TEDFA00
......
......@@ -36,7 +36,7 @@ $(function () {
}
}, {
field: "companyCode",
title: "公司名称",
title: "公司编码",
template: function (dataItem) {
for (let i = 0; i < companyCodeBox.length; i++) {
if (companyCodeBox[i]['companyCode'] === dataItem['companyCode']) {
......@@ -97,6 +97,12 @@ $(function () {
],
beforeEdit: function (e) {
let item = e.model;
if(item.status != '0'){
e.preventDefault();
}
},
loadComplete: function (grid) {
$("#INSERTCG").on("click", INSERTCG);
......@@ -168,6 +174,50 @@ $(function () {
};
grush.openImportBox();
IPLATUI.EFUpload = {
fileUpload: {
showFileList: false,
upload: function (e) {
openFileWindow.close();
IPLAT.progress($("body"), true);
},
success: function (e) {
var src = e.response.docUrl;
var eiInfo = new EiInfo();
let notIsExcelFile = isExcelFile(src);
eiInfo.set("fileName", src);
EiCommunicator.send("HGSC009", "importDate", eiInfo, {
onSuccess(ei) {
if (notIsExcelFile) {
NotificationUtil("请导入xls或xlsx文件", "error");
return;
}
if (ei.status == "-1") {
NotificationUtil(
{msg: ei.msg, detailMsg: ei.detailMsg}, "error");
} else {
NotificationUtil(ei.msg);
query();
}
},
onFail(ei) {
NotificationUtil("调用失败,原因[" + ei + "]", "error");
}
},
{
async: false
});
IPLAT.progress($("body"), false);
},
fail(e) {
IPLAT.NotificationUtil('导入失败!', "error");
}
}
}
grush.downloadFile(`${ctx}\\common\\template\\SC\\HGSC009A_材料计划.xls`);
});
let query = function () {
......@@ -182,12 +232,12 @@ function showUploadFile(companyCode,companyName,projCode,projName,planMaterialCo
JSColorbox.open({
href: "HGSC009A?methodName=initLoad&" +
"inqu_status-0-companyCode=" + companyCode +
"&inqu_status-0-companyName=" + companyName +
"&inqu_status-0-status=" + status+
"&inqu_status-0-planMaterialCode=" + planMaterialCode +
"&inqu_status-0-planMaterialName="+ planMaterialName +
"&inqu_status-0-projCode=" + projCode +
"&inqu_status-0-projName=" + projName +
"&inqu_status-0-status=" + status ,
"&inqu_status-0-companyName=" + companyName +
"&inqu_status-0-planMaterialName="+ planMaterialName +
"&inqu_status-0-projName=" + projName ,
title: "<div style='text-align: center;'>材料计划清单</div>",
width: "80%",
height: "80%",
......
......@@ -11,7 +11,9 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="材料计划">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
......@@ -56,5 +58,10 @@
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFWindow id="openFile">
<EF:EFRegion id="upload" title="文件导入区">
<div id="button"></div>
<EF:EFUpload ename="fileUpload" cname="导入" docTag="HGSC009" path="sc"/>
</EF:EFRegion>
</EF:EFWindow>
</EF:EFPage>
......@@ -51,6 +51,13 @@ $(function () {
});
}
}],
beforeEdit: function (e) {
var status = $("#inqu_status-0-status").val();
//如果提交了,则不能修改
if(status && status === "1"){
e.preventDefault();
}
},
loadComplete: function (grid) {
// 此grid对象
grid.dataSource.bind("change", function (e) {
......@@ -110,6 +117,7 @@ $(window).load(function () {
$(".k-grid-cancel-changes").hide();
$(".k-grid-delete").hide();
}
});
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment