Commit 8808e50b by yukang

Merge branch 'dev' of https://gitlab.baocloud.cn/bggf/smart/hp-smart into dev

parents c09f82df a6284edf
......@@ -340,6 +340,11 @@ public class HPSqlConstant {
// 已处理
public static final String DO_PROCESS = "HPZL001.doProcess";
// 已处理
public static final String DO_PROCESS2 = "HPZL001.doProcess2";
}
}
......@@ -14,10 +14,7 @@ import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.*;
import com.baosight.iplat4j.config.AdminFactoryConfig;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -27,6 +24,7 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import java.text.SimpleDateFormat;
import java.util.*;
/**
......@@ -153,10 +151,12 @@ public class ServiceHPMT002 extends ServiceBase {
if (StrUtil.isEmpty(companyCode)) {
inInfo.setMsg("账号异常");
}
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
EiInfo outInfo = new EiInfo();
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.ORG_PROD_BLOCK_ID), null, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.ORG_PROD_BLOCK_ID), sqlMap, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), sqlMap, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID), sqlMap, false);
return outInfo;
}
......@@ -180,28 +180,31 @@ public class ServiceHPMT002 extends ServiceBase {
sqlMap.put("companyCode", companyCode);
sqlMap.put("projCode", projCode);
sqlMap.put("prodOrderNo", prodOrderNo);
HPSC005 HPSC005 =(HPSC005) dao.query("HPSC005.query",sqlMap );
List<HPSC005> HPSC005 = dao.query("HPSC005.query", sqlMap);
HPZL001 fZl001 = new HPZL001();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
fZl001.fromMap(queryMap);
fZl001.setProjName(HPSC005.getProjName());
fZl001.setOrgName(HPSC005.getOrgName());
fZl001.setInventName(HPSC005.getPrdtName());
fZl001.setSubInventName(HPSC005.getPartName());
// 去除日期字符串中的-
fZl001.setReceiptDate(StringUtil.removeHorizontalLine(fZl001.getReceiptDate()));
fZl001.setProjName(HPSC005.get(0).getProjName());
fZl001.setOrgName(HPSC005.get(0).getOrgName());
fZl001.setInventName(HPSC005.get(0).getPrdtName());
fZl001.setSubInventName(HPSC005.get(0).getPartName());
fZl001.setCreatedTime(sdf.format(new Date()));
fZl001.setReceiptDate(DateUtils.shortDate());
// 生成单据号
fZl001.setCheckNo(SequenceGenerator.getNextSequence(
HPConstant.SequenceId.HPZL001_NUMBER));
fZl001.setDeleteFlag(CommonConstant.YesNo.NO_0);
fZl001.setStatus(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPZL001.INSERT, fZl001);
//处理文件
Map fZl0012 = new HashMap();
fZl0012.put("checkNo", fZl001.getCheckNo());
HPZL001 HPZL001 =(HPZL001) dao.query("HPZL001.query",fZl0012);
//绑定文件
if(!fZl001.getCheckNo().equals(" ")) {
Map fZl0012 = new HashMap();
fZl0012.put("checkNo", fZl001.getCheckNo());
HPZL001 HPZL001 = (HPZL001) dao.query("HPZL001.query", fZl0012);
//绑定文件
String[] docIds = docId.split(",");
int num=0;
while (num<=docIds.length){
int num = 0;
while (num <= docIds.length) {
HPSC002A HPSC002A = new HPSC002A();
HPSC002A.setBizType(CommonConstant.YesNo.NO_0.toString());
HPSC002A.setDocId(docIds[num]);
......@@ -210,6 +213,7 @@ public class ServiceHPMT002 extends ServiceBase {
DaoUtils.insert(HPSC002A.INSERT, HPSC002A);
num++;
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("新增成功!");
} catch (Exception e) {
......@@ -237,24 +241,25 @@ public class ServiceHPMT002 extends ServiceBase {
fZl001.fromMap(queryMap);
// 去除日期字符串中的-
fZl001.setReceiptDate(StringUtil.removeHorizontalLine(fZl001.getReceiptDate()));
fZl001.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPSqlConstant.HPZL001.DO_PROCESS, fZl001);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
fZl001.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPSqlConstant.HPZL001.DO_PROCESS2, fZl001);
//绑定文件
String[] docIds = docId.split(",");
int num=0;
while (num<=docIds.length){
HPSC002A HPSC002A = new HPSC002A();
HPSC002A.setBizType(CommonConstant.YesNo.NO_0.toString());
HPSC002A.setDocId(docIds[num]);
HPSC002A.setMatId(fZl001.getId());
HPSC002A.setCompanyCode(companyCode);
DaoUtils.insert(HPSC002A.INSERT, HPSC002A);
num++;
if(!docId.equals(" ")) {
String[] docIds = docId.split(",");
int num = 0;
while (num <= docIds.length) {
HPSC002A HPSC002A = new HPSC002A();
HPSC002A.setBizType(CommonConstant.YesNo.NO_0.toString());
HPSC002A.setDocId(docIds[num]);
HPSC002A.setMatId(fZl001.getId());
HPSC002A.setCompanyCode(companyCode);
DaoUtils.insert(HPSC002A.INSERT, HPSC002A);
num++;
}
}
inInfo.setMsg("新增成功!");
inInfo.setMsg("处理成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
LogUtils.setDetailMsg(inInfo, e, "处理失败");
}
return inInfo;
}
......
......@@ -7,6 +7,7 @@ import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.RsaUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -14,6 +15,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.service.soa.XLocalManager;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import com.baosight.xservices.xs.constants.LoginConstants;
......@@ -120,7 +122,11 @@ public class ServiceHPPZ009 extends ServiceBase {
// 生成企业编码
fPz009.setCompanyCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.COMPANY_CODE));
fPz009.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPPZ009.INSERT, fPz009);
fPz009.setCreatedBy(UserSession.getLoginName());
fPz009.setCreatedName(UserSession.getLoginCName());
fPz009.setCreatedTime(DateUtils.shortDateTime());
// 此处不能使用DaoUtils方法insert
dao.insert(HPPZ009.INSERT, fPz009);
// 默认新增企业管理员账号
this.initUser(fPz009);
// 关联企业管理员角色
......
......@@ -188,6 +188,17 @@
WHERE ID = #id#
</update>
<!-- 移动端已处理 -->
<update id="doProcess2">
UPDATE hpjx.t_hpzl001
SET
STATUS = #status#,
CHECK_USER = #checkUser#, <!-- 检查人 -->
CHECK_USER_NAME = #checkUserName#, <!-- 检查人名称 -->
<include refid="updateRevise"/>
WHERE CHECK_NO = #checkNo#
</update>
<!-- 更新附件信息 -->
<update id="updateAffix">
UPDATE hpjx.t_hpzl001
......
......@@ -563,6 +563,7 @@ function deleteFunc() {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC002", "delete", true);
updateTree();
}
});
}
......@@ -611,10 +612,22 @@ function saveFunc() {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC002", "save", true);
updateTree();
}
});
}
}
//更新树
function updateTree() {
var tree = $("#materialTree").data("kendoTreeView");
var inInfo = new EiInfo();
EiCommunicator.send("HPSC002", "queryTreeNode", inInfo, {//传入参数
onSuccess: function (inInfo) {
tree.reload("root");//更新树
}
});
}
......@@ -60,7 +60,7 @@
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="零件编码" hidden = "true"/>
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零件名称"/>
<EF:EFColumn enable="false" ename="spec" cname="规格(MM)" align="center" readonly="true"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" align="center" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn enable="false" ename="num" readonly="true" width="80" align="right" cname="数量" format="{0:N0}"/>
<EF:EFColumn enable="false" ename="unitWt" readonly="true" width="80" align="right" cname="单重(T)"/>
......
......@@ -38,7 +38,7 @@
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<%--<EF:EFColumn ename="prdtSpec" cname="部件规格" enable="false" width="120" align="center"/>--%>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格(MM)" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="assignedNum" cname="派工数量" enable="false" width="80" align="right" format="{0:N0}"/>
......
......@@ -35,7 +35,7 @@
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格(MM)" enable="false" width="100" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="100" align="center"/>
<%--<EF:EFColumn ename="remark1" cname="零件备注"/>--%>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
......
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