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
```
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 push -uf origin main
```
## 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
......@@ -46,7 +46,7 @@ Use the built-in continuous integration in GitLab.
# 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
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 {
JSONObject item = new JSONObject();
list1.forEach(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("PART_NAME")+"</div>";
List datalist =new ArrayList();
......
......@@ -4,6 +4,7 @@ import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.enums.OrgTypeEnum;
import com.baosight.hpjx.core.security.UserSessionUtils;
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.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
......@@ -12,6 +13,7 @@ import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.common.ed.domain.TEDCM01;
import com.baosight.iplat4j.core.data.dao.DaoFactory;
import com.baosight.iplat4j.core.ei.EiBlock;
......@@ -304,38 +306,45 @@ public class ServiceXSOG0801 extends ServiceBase {
* @return
*/
public EiInfo insertUserByOrgId(EiInfo inInfo) {
String errorMsg = "";
List insertList = new ArrayList();
List<Map> rows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < rows.size(); ++i) {
Map row = rows.get(i);
Map map = new HashMap();
map.put("userId", row.get("userId"));
List<XSOG02> userResults = dao.query("XSOG02.queryByOrgIdAndUserId", map);
if (userResults.size() > 0) {
errorMsg = errorMsg + "\n添加用户[" + row.get("loginName") + "]失败,选择用户已为其他组织机构成员";
} else {
inInfo.getBlock(EiConstant.resultBlock).setCell(i, "recCreator", UserSession.getLoginName());
insertList.add(inInfo.getBlock(EiConstant.resultBlock).getRow(i));
try {
String errorMsg = "";
List insertList = new ArrayList();
List<Map> rows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < rows.size(); ++i) {
Map row = rows.get(i);
// 厂区工人不能同时存在多个组
Map queryMap = new HashMap();
queryMap.put("userId", row.get("userId"));
List<HPPZ013> dbPz013s = dao.query(HPPZ013.QUERY, queryMap);
if (dbPz013s.size() > 0) {
// 用户是工人时,只能有一个组织
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();
call.set("list", insertList);
call.set(EiConstant.serviceId, "S_XS_90");
EiInfo outInfo = XServiceManager.call(call);
if (!"".equals(errorMsg)) {
if (StringUtils.isNotBlank(errorMsg)) {
outInfo.addMsg(errorMsg);
outInfo.setStatus(0);
outInfo.setStatus(EiConstant.STATUS_DEFAULT);
}
return outInfo;
}catch (Exception e){
LogUtils.setMsg(inInfo, e, "添加失败");
}
return inInfo;
}
/**
......@@ -736,30 +745,34 @@ public class ServiceXSOG0801 extends ServiceBase {
}
public EiInfo queryUserDetailTemplateImpl(EiInfo inInfo) {
Map param = new HashMap();
param.put("codesetCode", inInfo.get("codesetCode"));
param.put("projectName", "XSERVICES");
String gridBlockId = (String) inInfo.get("gridBlockId");
Map attr = inInfo.getBlock(gridBlockId).getAttr();
int limit = (Integer) attr.get("limit");
int offset = (Integer) attr.get("offset");
List result = DaoFactory.getPlatSqlDao().query("EDCM01.query", param, 0, -999999);
int end = offset + limit;
int size = result.size();
int actualEndIndex = Math.min(end, size);
if (offset > size) {
result = new ArrayList();
} else {
result = result.subList(offset, actualEndIndex);
try {
Map param = new HashMap();
param.put("codesetCode", inInfo.get("codesetCode"));
param.put("projectName", "XSERVICES");
String gridBlockId = (String) inInfo.get("gridBlockId");
Map attr = inInfo.getBlock(gridBlockId).getAttr();
int limit = (Integer) attr.get("limit");
int offset = attr.get("offset") == null ? 0 : (Integer) attr.get("offset");
List result = DaoFactory.getPlatSqlDao().query("EDCM01.query", param, 0, -999999);
int end = offset + limit;
int size = result.size();
int actualEndIndex = Math.min(end, size);
if (offset > size) {
result = new ArrayList();
} 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, "查询失败");
}
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;
return inInfo;
}
public EiInfo queryUserMetadataImpl(EiInfo inInfo) {
......
......@@ -117,7 +117,11 @@ $(function () {
let template = '';
if (filePath1) {
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
}
......@@ -137,8 +141,8 @@ $(function () {
let projCode = item.projCode;
let template = '';
if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>';
/* template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>';*/
if (status >= 1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="checkIn(' + filePath1 + ')" >登记</a>';
......@@ -278,12 +282,7 @@ $(function () {
success: function (e) {
let rows = resultGrid.getCheckedRows()[0];
var src = e.response.docUrl;
var className;
if ("run" == projectEnv) {
className = e.response.groupId;
} else {
className = e.response.docTag;
}
var className = e.response.docTag;
var projCode = rows.projCode;
var projName = rows.projName;
var productionOrderNo = rows.prodOrderNo;
......@@ -357,9 +356,9 @@ function reqDetails(projCode) {
height: "90%"
});
}
function showUploadFile(id) {
function showUploadFile(id,type) {
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>",
width: "80%",
height: "80%",
......@@ -375,8 +374,26 @@ function checkIn(id) {
callbackName: checkInCallback
});
}
checkInCallback = function (e) {
detailGrid.setEiInfo(e);
checkInCallback = function () {
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) {
JSColorbox.open({
......
......@@ -45,7 +45,7 @@
<EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFGrid blockId="detail" autoDraw="no">
<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: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