Commit 35dba29f by liulei

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

# Conflicts:
#	README.md
#	src/main/java/com/baosight/hpjx/hp/bi/service/ServiceHPBI002.java
#	src/main/java/com/baosight/xservices/xs/og/service/ServiceXSOG0801.java
#	src/main/webapp/HP/PZ/HPPZ013.jsp
#	src/main/webapp/HP/SC/HPSC006.js
#	src/main/webapp/HP/SC/HPSC006.jsp
parents 2026dc0d bb4fb13f
# hp-smart # Hp Smart
...@@ -15,14 +15,14 @@ Already a pro? Just edit this README.md and make it your own. Want to make it ea ...@@ -15,14 +15,14 @@ Already a pro? Just edit this README.md and make it your own. Want to make it ea
``` ```
cd existing_repo cd existing_repo
git remote add origin https://gitlab.baocloud.cn/bggf/smart/hp-smart.git git remote add origin http://git.pseer.com/platform/hp-smart.git
git branch -M main git branch -M main
git push -uf origin main git push -uf origin main
``` ```
## Integrate with your tools ## Integrate with your tools
- [ ] [Set up project integrations](http://gitlab.baocloud.cn/bggf/smart/hp-smart/-/settings/integrations) - [ ] [Set up project integrations](http://git.pseer.com/platform/hp-smart/-/settings/integrations)
## Collaborate with your team ## Collaborate with your team
...@@ -46,7 +46,7 @@ Use the built-in continuous integration in GitLab. ...@@ -46,7 +46,7 @@ Use the built-in continuous integration in GitLab.
# Editing this README # Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README ## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
......
...@@ -526,7 +526,7 @@ public class ServiceHPBI002 extends ServiceBase { ...@@ -526,7 +526,7 @@ public class ServiceHPBI002 extends ServiceBase {
JSONObject item = new JSONObject(); JSONObject item = new JSONObject();
list1.forEach(obj -> { list1.forEach(obj -> {
// 处理obj // 处理obj
String DIVLIST = "<div style=\"width: 400px; height: 50px;color:#FFFFFF;font-weight: bold;text-align: left;font-size: 24px;\">" String DIVLIST = "<div style=\"width: 400px; height: 50px;color:#FACC14;font-weight: bold;text-align: left;font-size: 20px;\">"
+obj.get("GROUP_NAME")+"</div><div style=\"width: 400px; height: 50px;color:#FFFFFF;text-align: left;font-size: 20px;\">" +obj.get("GROUP_NAME")+"</div><div style=\"width: 400px; height: 50px;color:#FFFFFF;text-align: left;font-size: 20px;\">"
+obj.get("PART_NAME")+"</div>"; +obj.get("PART_NAME")+"</div>";
List datalist =new ArrayList(); List datalist =new ArrayList();
......
...@@ -4,6 +4,7 @@ import com.baosight.hpjx.core.constant.CommonConstant; ...@@ -4,6 +4,7 @@ import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.enums.OrgTypeEnum; import com.baosight.hpjx.core.enums.OrgTypeEnum;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ013;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC005B; import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.tools.HPSCTools; import com.baosight.hpjx.hp.sc.tools.HPSCTools;
...@@ -12,6 +13,7 @@ import com.baosight.hpjx.hp.xs.tools.HPXSTools; ...@@ -12,6 +13,7 @@ import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils; import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.common.ed.domain.TEDCM01; import com.baosight.iplat4j.common.ed.domain.TEDCM01;
import com.baosight.iplat4j.core.data.dao.DaoFactory; import com.baosight.iplat4j.core.data.dao.DaoFactory;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
...@@ -304,38 +306,45 @@ public class ServiceXSOG0801 extends ServiceBase { ...@@ -304,38 +306,45 @@ public class ServiceXSOG0801 extends ServiceBase {
* @return * @return
*/ */
public EiInfo insertUserByOrgId(EiInfo inInfo) { public EiInfo insertUserByOrgId(EiInfo inInfo) {
String errorMsg = ""; try {
List insertList = new ArrayList(); String errorMsg = "";
List<Map> rows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List insertList = new ArrayList();
for (int i = 0; i < rows.size(); ++i) { List<Map> rows = inInfo.getBlock(EiConstant.resultBlock).getRows();
Map row = rows.get(i); for (int i = 0; i < rows.size(); ++i) {
Map map = new HashMap(); Map row = rows.get(i);
map.put("userId", row.get("userId")); // 厂区工人不能同时存在多个组
List<XSOG02> userResults = dao.query("XSOG02.queryByOrgIdAndUserId", map); Map queryMap = new HashMap();
if (userResults.size() > 0) { queryMap.put("userId", row.get("userId"));
errorMsg = errorMsg + "\n添加用户[" + row.get("loginName") + "]失败,选择用户已为其他组织机构成员"; List<HPPZ013> dbPz013s = dao.query(HPPZ013.QUERY, queryMap);
} else { if (dbPz013s.size() > 0) {
inInfo.getBlock(EiConstant.resultBlock).setCell(i, "recCreator", UserSession.getLoginName()); // 用户是工人时,只能有一个组织
insertList.add(inInfo.getBlock(EiConstant.resultBlock).getRow(i)); List<XSOG02> userResults = dao.query("XSOG02.queryByOrgIdAndUserId", queryMap);
if (userResults.size() > 0) {
errorMsg = errorMsg + "\n添加用户[" + row.get("loginName") + "]失败,选择用户已为其他组织机构成员";
continue;
}
}
row.put("recCreator", UserSession.getLoginName());
insertList.add(row);
}
if (insertList.size() == 0) {
inInfo.setMsg(errorMsg);
inInfo.setStatus(EiConstant.STATUS_FAILURE);
return inInfo;
} }
}
if (insertList.size() == 0) {
inInfo.setMsg(errorMsg);
inInfo.setStatus(-1);
return inInfo;
} else {
EiInfo call = new EiInfo(); EiInfo call = new EiInfo();
call.set("list", insertList); call.set("list", insertList);
call.set(EiConstant.serviceId, "S_XS_90"); call.set(EiConstant.serviceId, "S_XS_90");
EiInfo outInfo = XServiceManager.call(call); EiInfo outInfo = XServiceManager.call(call);
if (!"".equals(errorMsg)) { if (StringUtils.isNotBlank(errorMsg)) {
outInfo.addMsg(errorMsg); outInfo.addMsg(errorMsg);
outInfo.setStatus(0); outInfo.setStatus(EiConstant.STATUS_DEFAULT);
} }
return outInfo; return outInfo;
}catch (Exception e){
LogUtils.setMsg(inInfo, e, "添加失败");
} }
return inInfo;
} }
/** /**
...@@ -736,30 +745,34 @@ public class ServiceXSOG0801 extends ServiceBase { ...@@ -736,30 +745,34 @@ public class ServiceXSOG0801 extends ServiceBase {
} }
public EiInfo queryUserDetailTemplateImpl(EiInfo inInfo) { public EiInfo queryUserDetailTemplateImpl(EiInfo inInfo) {
Map param = new HashMap(); try {
param.put("codesetCode", inInfo.get("codesetCode")); Map param = new HashMap();
param.put("projectName", "XSERVICES"); param.put("codesetCode", inInfo.get("codesetCode"));
String gridBlockId = (String) inInfo.get("gridBlockId"); param.put("projectName", "XSERVICES");
Map attr = inInfo.getBlock(gridBlockId).getAttr(); String gridBlockId = (String) inInfo.get("gridBlockId");
int limit = (Integer) attr.get("limit"); Map attr = inInfo.getBlock(gridBlockId).getAttr();
int offset = (Integer) attr.get("offset"); int limit = (Integer) attr.get("limit");
List result = DaoFactory.getPlatSqlDao().query("EDCM01.query", param, 0, -999999); int offset = attr.get("offset") == null ? 0 : (Integer) attr.get("offset");
int end = offset + limit; List result = DaoFactory.getPlatSqlDao().query("EDCM01.query", param, 0, -999999);
int size = result.size(); int end = offset + limit;
int actualEndIndex = Math.min(end, size); int size = result.size();
if (offset > size) { int actualEndIndex = Math.min(end, size);
result = new ArrayList(); if (offset > size) {
} else { result = new ArrayList();
result = result.subList(offset, actualEndIndex); } else {
result = result.subList(offset, actualEndIndex);
}
EiInfo outInfo = new EiInfo();
outInfo.setMsg("查询成功,共" + result.size() + "条记录");
outInfo.addBlock((String) inInfo.get("gridBlockId")).setRows(result);
attr.put("count", size);
outInfo.getBlock((String) inInfo.get("gridBlockId")).setAttr(attr);
outInfo.getBlock((String) inInfo.get("gridBlockId")).setBlockMeta((new TEDCM01()).eiMetadata);
return outInfo;
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询失败");
} }
return inInfo;
EiInfo outInfo = new EiInfo();
outInfo.setMsg("查询成功,共" + result.size() + "条记录");
outInfo.addBlock((String) inInfo.get("gridBlockId")).setRows(result);
attr.put("count", size);
outInfo.getBlock((String) inInfo.get("gridBlockId")).setAttr(attr);
outInfo.getBlock((String) inInfo.get("gridBlockId")).setBlockMeta((new TEDCM01()).eiMetadata);
return outInfo;
} }
public EiInfo queryUserMetadataImpl(EiInfo inInfo) { public EiInfo queryUserMetadataImpl(EiInfo inInfo) {
......
...@@ -117,7 +117,11 @@ $(function () { ...@@ -117,7 +117,11 @@ $(function () {
let template = ''; let template = '';
if (filePath1) { if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>'; + 'onclick="showUploadFile(' + filePath1 + ',\'WL\')" >物料附件清单</a>';
}
if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ',\'XL\')" >下料附件清单</a>';
} }
return template return template
} }
...@@ -137,8 +141,8 @@ $(function () { ...@@ -137,8 +141,8 @@ $(function () {
let projCode = item.projCode; let projCode = item.projCode;
let template = ''; let template = '';
if (filePath1) { if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' /* template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>'; + 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>';*/
if (status >= 1) { if (status >= 1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="checkIn(' + filePath1 + ')" >登记</a>'; + 'onclick="checkIn(' + filePath1 + ')" >登记</a>';
...@@ -278,12 +282,7 @@ $(function () { ...@@ -278,12 +282,7 @@ $(function () {
success: function (e) { success: function (e) {
let rows = resultGrid.getCheckedRows()[0]; let rows = resultGrid.getCheckedRows()[0];
var src = e.response.docUrl; var src = e.response.docUrl;
var className; var className = e.response.docTag;
if ("run" == projectEnv) {
className = e.response.groupId;
} else {
className = e.response.docTag;
}
var projCode = rows.projCode; var projCode = rows.projCode;
var projName = rows.projName; var projName = rows.projName;
var productionOrderNo = rows.prodOrderNo; var productionOrderNo = rows.prodOrderNo;
...@@ -357,9 +356,9 @@ function reqDetails(projCode) { ...@@ -357,9 +356,9 @@ function reqDetails(projCode) {
height: "90%" height: "90%"
}); });
} }
function showUploadFile(id) { function showUploadFile(id,type) {
JSColorbox.open({ JSColorbox.open({
href: "HPSC002A?methodName=initLoad&inqu_status-0-bizType=XL&inqu_status-0-id=" + id, href: "HPSC002A?methodName=initLoad&inqu_status-0-bizType="+type+"&inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>", title: "<div style='text-align: center;'>附件清单</div>",
width: "80%", width: "80%",
height: "80%", height: "80%",
...@@ -375,8 +374,26 @@ function checkIn(id) { ...@@ -375,8 +374,26 @@ function checkIn(id) {
callbackName: checkInCallback callbackName: checkInCallback
}); });
} }
checkInCallback = function (e) { checkInCallback = function () {
detailGrid.setEiInfo(e); var block = detailGrid.getEiBlock();
var result = resultGrid.getCheckedRows()
if (rows.length < 1) {
message("请选择数据");
return;
}
if (block != null) {
block.setRows([]);
detailGrid.setEiBlock(block);
}
var info = new EiInfo()
var productionOrderNo = result[0]['prodOrderNo'];
info.set("productionOrderNo",productionOrderNo);
EiCommunicator.send("HPSC006","queryDetail",info,{
onSuccess:function(ei){//返回结果集
detailGrid.setEiInfo(ei);
},onFail:function(ei){}
},{async:false});
} }
let selectStock = function (id) { let selectStock = function (id) {
JSColorbox.open({ JSColorbox.open({
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<EF:EFInput ename="productionOrderNo" type="hidden"/> <EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFGrid blockId="detail" autoDraw="no"> <EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" width="200" enable="false" readonly="false"/> <EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
<EF:EFColumn enable="false" ename="reqNum" cname="领料记录" width="80" align="center" readonly="true"/> <EF:EFColumn enable="false" ename="reqNum" cname="领料记录" width="80" align="center" readonly="true"/>
<%-- <EF:EFComboColumn cname="材料类型" ename="inventType" width="80" align="center" required="true" >--%> <%-- <EF:EFComboColumn cname="材料类型" ename="inventType" width="80" align="center" required="true" >--%>
......
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