Commit 4c5cac02 by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

parents 96ca01e1 3b7bd287
......@@ -85,7 +85,7 @@ public class ServiceHPKC003 extends ServiceBase {
// 仓库名称
fKc003.setWhName(HPPZTools.getPz007ByCode(fKc003.getWhCode()).getWhName());
// 存货名称
fKc003.setInventName(HPPZTools.getPz004ByCode(fKc003.getInventCode()).getInventName());
// fKc003.setInventName(HPPZTools.getPz004ByCode(fKc003.getInventCode()).getInventName());
// 生成入库单号
fKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
......@@ -96,10 +96,9 @@ public class ServiceHPKC003 extends ServiceBase {
//同步生产计划
DaoUtils.update("HPSC004.update",this.synchronousPlan(fKc003));
//产品库存更新接口
HPKCTools.updateProdStock(fKc003.getWhCode(),fKc003.getProdNo(),fKc003.getAmount(),fKc003.getWeight());
// 修改库存
HPKCTools.updateStock(fKc003.getWhCode(), fKc003.getInventRecordId(), fKc003.getAmount(),
fKc003.getWeight());
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......
......@@ -45,6 +45,9 @@
</sql>
<sql id="getCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
......
......@@ -49,6 +49,8 @@ public class HPSC005 extends DaoEPBase {
public static final String FIELD_FILE_PATH4 = "filePath4"; /* 文件地址4*/
public static final String FIELD_FILE_PATH5 = "filePath5"; /* 文件地址5*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId";
public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
......@@ -78,6 +80,8 @@ public class HPSC005 extends DaoEPBase {
public static final String COL_FILE_PATH4 = "FILE_PATH4"; /* 文件地址4*/
public static final String COL_FILE_PATH5 = "FILE_PATH5"; /* 文件地址5*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID";
public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String QUERY = "t_hpsc005.query";
public static final String COUNT = "t_hpsc005.count";
......@@ -127,6 +131,8 @@ public class HPSC005 extends DaoEPBase {
private BigDecimal partWidth = new BigDecimal(0.00); /* 宽*/
private BigDecimal partThick = new BigDecimal(0.00); /* 厚*/
private String remark1;
private String factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/
/**
* initialize the metadata.
......@@ -314,6 +320,14 @@ public class HPSC005 extends DaoEPBase {
eiColumn.setFieldLength(10);
eiColumn.setDescName("产品-厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_CODE);
eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn);
}
/**
* get the unitWt - 单重.
......@@ -367,7 +381,21 @@ public class HPSC005 extends DaoEPBase {
public void setPrdtSpec(String prdtSpec) {
this.prdtSpec = prdtSpec;
}
public String getFactoryCode() {
return factoryCode;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryName() {
return factoryName;
}
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* the constructor.
*/
......@@ -935,6 +963,8 @@ public class HPSC005 extends DaoEPBase {
setPartWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("partWidth")), partWidth));
setPartThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("partThick")), partThick));
setUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_WT)), unitWt));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
}
......@@ -984,6 +1014,8 @@ public class HPSC005 extends DaoEPBase {
map.put("partWidth", StringUtils.toString(partWidth, eiMetadata.getMeta("partWidth")));
map.put("partThick", StringUtils.toString(partThick, eiMetadata.getMeta("partThick")));
map.put(FIELD_UNIT_WT, StringUtils.toString(unitWt, eiMetadata.getMeta(FIELD_UNIT_WT)));
map.put(FIELD_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
return map;
}
......
......@@ -195,4 +195,5 @@ public class ServiceHPSC001 extends ServiceBase {
throw new PlatException(outInfo.getMsg());
}
}
}
......@@ -96,6 +96,9 @@ public class ServiceHPSC002 extends ServiceBase {
hppz002.setLv(lv.intValue()+1);
}
DaoUtils.insert("HPSC002.insert", hppz002.toMap());
DaoUtils.insert("HPSC006.insert", hppz002.toMap());
if (!hppz002.getParentId().equals("root")) {
this.checkTreeNodeLeaf(new Long(hppz002.getParentId()));
}
......@@ -241,7 +244,6 @@ public class ServiceHPSC002 extends ServiceBase {
DaoUtils.update("HPSC002.updateTreeNodeLeaf", queryMap);
}
/**
* 提交 撤回.
*/
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.iplat4j.core.ei.EiBlock;
......@@ -129,9 +130,9 @@ public class ServiceHPSC005 extends ServiceBase {
public EiInfo assign(EiInfo eiInfo) {
try {
String ids = eiInfo.get("ids").toString();
String orgId = eiInfo.get("orgId").toString();
String orgId = eiInfo.get("id").toString();
//先找到分派的组织
Map map =(Map) dao.get("XSOG0801.queryByOrgId","orgId", orgId);
HPPZ011 HPPZ011 =(HPPZ011) dao.get("HPPZ011.get","id", orgId);
String [] id = ids.split(",");
for (int i = 0; i < id.length; i++) {
......@@ -139,8 +140,9 @@ public class ServiceHPSC005 extends ServiceBase {
HPSC005 HPSC005 = new HPSC005();
HPSC005.setId(NumberUtils.toLong(id[i]));
HPSC005.setStatus(1);
HPSC005.setOrgNo(map.get("orgId").toString());
HPSC005.setOrgName(map.get("orgCname").toString());
HPSC005.setOrgNo(HPPZ011.getGroupCode());
HPSC005.setFactoryCode(HPPZ011.getFactoryCode());
HPSC005.setFactoryName(HPPZ011.getFactoryName());
DaoUtils.update("HPSC005.updateAssign", HPSC005.toMap());
}
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
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.util.NumberUtils;
import java.util.Map;
/**
*
*/
public class ServiceHPSC005A extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
HPSC005A HPSC005A = new HPSC005A();
EiInfo outInfo = super.initLoad(inInfo, HPSC005A);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPSC005A.eiMetadata);
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPSC005A.query", new HPSC005A());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
HPSC005A HPSC005A = new HPSC005A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC005A.fromMap(map);
DaoUtils.insert("HPSC005A.insert", HPSC005A.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
try {
HPSC005A HPSC005A = new HPSC005A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC005A.fromMap(map);
DaoUtils.update("HPSC005A.update", HPSC005A.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
HPSC005A HPSC005A = new HPSC005A();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC005A.fromMap(map);
this.dao.delete("HPPZ001.delete", HPSC005A.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
/**
* 分派
* @param eiInfo
* @return
*/
public EiInfo assign(EiInfo eiInfo) {
try {
String ids = eiInfo.get("ids").toString();
String orgId = eiInfo.get("id").toString();
//先找到分派的组织
HPPZ011 HPPZ011 =(HPPZ011) dao.get("HPPZ011.get","id", orgId);
String [] id = ids.split(",");
for (int i = 0; i < id.length; i++) {
// 更新HPSC005A的数据
HPSC005A HPSC005A = new HPSC005A();
HPSC005A.setId(NumberUtils.toLong(id[i]));
HPSC005A.setOrgNo(HPPZ011.getGroupCode());
HPSC005A.setFactoryCode(HPPZ011.getFactoryCode());
HPSC005A.setFactoryName(HPPZ011.getFactoryName());
DaoUtils.update("HPSC005A.updateAssign", HPSC005A.toMap());
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("分派成功!");
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("分派失败!原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("分派失败", e.getMessage());
return eiInfo;
}
return query(eiInfo);
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
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.xservices.xs.og.domain.XSOG01;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -23,30 +29,26 @@ public class ServiceHPSC098 extends ServiceBase {
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = new EiInfo();
outInfo.set("inqu_status-0-companyCode", UserSessionUtils.getCompanyCode());
outInfo.set("inqu_status-0-orgCname", inInfo.get("inqu_status-0-orgCname"));
outInfo = super.query(outInfo, "HPPZ011.query", new XSOG01());
EiBlock r3Block = new EiBlock("result");
r3Block.setRows(outInfo.getBlock(EiConstant.resultBlock).getRows());
outInfo.addBlock(r3Block);
return outInfo;
try {
Map queryMap = new HashMap();
queryMap.put("orgType", "dept");
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.ORG_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ011().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
XSOG01 XSOG01 = new XSOG01();
EiInfo outInfo = new EiInfo();
//添加返回到前台的块,块名和前台的对应
EiBlock eiBlock = outInfo.addBlock("result");
HashMap params = new HashMap();
params.put("orgCname",inInfo.get("inqu_status-0-orgCname"));
params.put("companyCode", UserSessionUtils.getCompanyCode());
List list = dao.query("query.query",params,0,-999999);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(XSOG01.eiMetadata);
outInfo.addBlock(EiConstant.resultBlock).addRows(list);
outInfo.getBlock(EiConstant.resultBlock).set("limit", list.size());
return outInfo;
try {
inInfo = super.query(inInfo, HPPZ011.QUERY, new HPPZ011());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
......@@ -150,7 +150,9 @@
PRDT_THICK as "prdtThick", <!-- 厚 -->
PART_LENGTH as "partLength", <!-- 长 -->
PART_WIDTH as "partWidth", <!-- 宽 -->
PART_THICK as "partThick" <!-- 厚 -->
PART_THICK as "partThick", <!-- 厚 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName" <!-- 厂区名称 -->
FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -268,13 +270,14 @@
PRDT_THICK, <!-- 厚 -->
PART_LENGTH, <!-- 长 -->
PART_WIDTH, <!-- 宽 -->
PART_THICK <!-- 厚 -->
)
PART_THICK, <!-- 厚 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME <!-- 厂区名称 --> )
VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#,#inventRecordId#, #prdtType#, #prdtCode#,
#prdtName#, #planCompletionDate#, #num#,#unitWt#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#,
#updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#,
#prdtSpec#,#partType#,#partCode#,#partName#,#partSpec#,#remark1#,
#prdtLength#,#prdtWidth#,#prdtThick#,#partLength#,#partWidth#,#partThick#)
#prdtLength#,#prdtWidth#,#prdtThick#,#partLength#,#partWidth#,#partThick#, #factoryCode#, #factoryName#)
</insert>
<delete id="delete">
......@@ -309,7 +312,9 @@
FILE_PATH2 = #filePath2#, <!-- 文件地址2 -->
FILE_PATH3 = #filePath3#, <!-- 文件地址3 -->
FILE_PATH4 = #filePath4#, <!-- 文件地址4 -->
FILE_PATH5 = #filePath5# <!-- 文件地址5 -->
FILE_PATH5 = #filePath5#, <!-- 文件地址5 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName# <!-- 厂区名称 -->
WHERE
ID = #id#
</update>
......@@ -320,7 +325,8 @@
SET
STATUS = #status#, <!-- 状态 0-未派工,1-已派工 -->
ORG_NO = #orgNo#, <!-- 生产组编码 -->
ORG_NAME = #orgName#, <!-- 生产组名称 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
......
<?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-02-01 10:19:32
Version : 1.0
schema : hpjx
tableName : T_HPSC005A
ID BIGINT NOT NULL primarykey,
PRODUCTION_ORDER_NO VARCHAR,
NUM DECIMAL,
TOTAL_WT DECIMAL,
ORG_NO VARCHAR,
ORG_NAME VARCHAR,
FACTORY_CODE VARCHAR,
FACTORY_NAME VARCHAR,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap namespace="HPSC005A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO = #productionOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="num">
NUM = #num#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgNo">
ORG_NO = #orgNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName">
ORG_NAME = #orgName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC005A">
SELECT
ID as "id",
PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
NUM as "num", <!-- 计划数量 -->
TOTAL_WT as "totalWt", <!-- 计划重量 -->
ORG_NO as "orgNo", <!-- 生产组编码 -->
ORG_NAME as "orgName", <!-- 生产组名称 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM ${hpjxSchema}.T_HPSC005A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC005A WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO = #productionOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="num">
NUM = #num#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgNo">
ORG_NO = #orgNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName">
ORG_NAME = #orgName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC005A (ID,
PRODUCTION_ORDER_NO, <!-- 生产订单号 -->
NUM, <!-- 计划数量 -->
TOTAL_WT, <!-- 计划重量 -->
ORG_NO, <!-- 生产组编码 -->
ORG_NAME, <!-- 生产组名称 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 厂区名称 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME <!-- 更新时间 -->
)
VALUES (#id#, #productionOrderNo#, #num#, #totalWt#, #orgNo#, #orgName#, #factoryCode#, #factoryName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPSC005A WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPSC005A
SET
PRODUCTION_ORDER_NO = #productionOrderNo#, <!-- 生产订单号 -->
NUM = #num#, <!-- 计划数量 -->
TOTAL_WT = #totalWt#, <!-- 计划重量 -->
ORG_NO = #orgNo#, <!-- 生产组编码 -->
ORG_NAME = #orgName#, <!-- 生产组名称 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
......@@ -32,12 +32,11 @@ public class ServiceHPZL001 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
HPZL001 HPZL001 = new HPZL001();
Map map = new HashMap();
map.put("status","1");
EiInfo outInfo = super.initLoad(inInfo, HPZL001);
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID),
new HashMap<String, Object>(1) {{
put("status", "1");
}});
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), map);
return outInfo;
}
......
......@@ -56,6 +56,7 @@
<EF:EFColumn enable="false" ename="planCompletionDate" cname="计划完成日期"/>
<EF:EFColumn enable="false" ename="num" cname="计划数量"/>
<EF:EFColumn enable="false" ename="unitWt" cname="计划单量"/>
<EF:EFColumn enable="false" ename="totalWt" cname="计划重量"/>
<EF:EFColumn enable="false" ename="orgName" cname="生产组"/>
</EF:EFGrid>
......
......@@ -5,15 +5,26 @@ $(function () {
resultGrid.dataSource.page(1);
});
$("#inqu_status-0-orgNo").on("click", function () {
$("#TEAR_ASSIGN").on("click", function () {
//重置全局变量
ids = [];
let rows = resultGrid.getCheckedRows()
if (rows.length != 1) {
message("只能选择一条需要拆单分派的数据");
return;
}
JSColorbox.open({
href: "HPSC098?methodName=initLoad&isInput",
title: "<div style='text-align: center;'>选择组织</div>",
href: "HPSC006?methodName=initLoad",
title: "<div style='text-align: center;'>拆单派工</div>",
width: "40%",
height: "70%",
callbackName: getOrgCallback
callbackName: assignCallback
});
});
})
$("#ASSIGN").on("click", function () {
//重置全局变量
......@@ -77,10 +88,10 @@ function showUploadFile(id) {
height: "80%",
});
}
let assignCallback = function (orgId) {
let assignCallback = function (id) {
var info = new EiInfo()
info.set("ids",ids.join(','));
info.set("orgId",orgId);
info.set("id",id);
EiCommunicator.send("HPSC005","assign",info,{
onSuccess:function(ei){//返回结果集
if (ei["status"] == -1) {
......@@ -101,7 +112,3 @@ let assignCallback = function (orgId) {
}
let getOrgCallback = function (orgId) {
$("#inqu_status-0-orgNo").val(orgId);
JSColorbox.close();
}
\ No newline at end of file
......@@ -59,6 +59,7 @@
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="已派工" value="1"/>
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="factoryName" cname="厂区名称"/>
<EF:EFColumn enable="false" ename="orgName" cname="生产组"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid>
......
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="拆单派工">
<EF:EFRegion id="detail" title="订单详情">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目号" readonly="true"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称" readonly="true"/>
<EF:EFColumn enable="false" ename="planInfoNo" cname="生产计划单号" readonly="true"/>
<EF:EFComboColumn ename="prdtType" cname="部件类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码" readonly="true"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称" readonly="true"/>
<EF:EFColumn hidden="true" enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150"
required='true' readonly="true"/>
<EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" readonly="true"/>
<EF:EFComboColumn enable="false" ename="status" cname="状态">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
</EF:EFComboColumn>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="parentId" cname="父ID" hidden="true"/>
<EF:EFComboColumn ename="prdtType" cname="零件类型" width="90" align="center" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="零件编码"/>
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零件名称"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn enable="false" ename="num" readonly="true" cname="计划数量"/>
<EF:EFColumn enable="false" ename="unitWt" readonly="true" cname="计划重量"/>
<EF:EFColumn ename="planCommentDate" required='true' cname="计划开始时间" editType="date" dateFormat="yyyy/MM/dd" width="150"/>
<EF:EFColumn ename="planCompletionDate" required='true' cname="计划结束时间" editType="date" dateFormat="yyyy/MM/dd" width="150"/>
<EF:EFColumn ename="actualCompletionDate" cname="实际完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
enable="false"/>
<EF:EFColumn enable="false" ename="actualCompletionNum" cname="实际完工数量" readonly="true"/>
<EF:EFColumn enable="false" ename="actualCompletionUnitWt" cname="实际完工重量" readonly="true"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/SC/HPSC005A.js"></script>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="下料清单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect ename="inqu_status-0-prdtType" cname="部件类型" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFSelect>
<EF:EFSelect cname="部件名称" ename="inqu_status-0-prdtCode" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
</EF:EFSelect>
</div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion>
<div id="splitter" class="i-fit-height" style="display: inline">
<div id="left-pane" class="i-fit-height" style="width: 20%;float:left;">
<EF:EFRegion id="projTree" title="BOM结构图" fitHeight="true">
<EF:EFTree id="materialTree"
valueField="label"
textField="text"
hasChildren="leaf"
serviceName="HPSC006"
methodName="queryTreeNode">
</EF:EFTree>
</EF:EFRegion>
</div>
<div id="right-pane" class="i-fit-height" style="width: 80%;float: right">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="no" checkMode="single">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="level" cname="层级" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFComboColumn cname="部件类型" ename="prdtType" width="90" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFComboColumn>
<EF:EFPopupColumn ename="prdtName" cname="部件名称" width="200" popupType="ServiceGrid"
popupTitle="部件信息" serviceName="HPPZ006" methodName="queryPrdtComboBox" resultId="invent_prdt_name_block_id"
columnEnames="param1Field,textField"
columnCnames="部件名称,部件编码"
backFillColumnIds="param1Field,textField"
backFillFieldIds="prdtName,prdtCode"
valueField="param1Field" textField="param1Field"/>
<EF:EFColumn ename="prdtCode" cname="部件编码"/>
<EF:EFColumn ename="length" cname="长" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽" format="{0:N3}"/>
<EF:EFColumn ename="thick" cname="厚" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" />
<EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级部件名称"/>
<EF:EFColumn enable="false" ename="parentPrdtName" cname="上级部件名称"/>
<EF:EFColumn ename="num" required="true" cname="数量"/>
<EF:EFColumn ename="unitWt" required="true" format="{0:N3}" cname="单重"/>
<EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" cname="总重"/>
<EF:EFComboColumn enable="false" ename="status" align="center"
columnTemplate="#=textField#" optionLabel=" "
itemTemplate="#=textField#" textField="textField"
valueField="valueField" cname="提交状态">
<EF:EFOption label="未提交" value="0"></EF:EFOption>
<EF:EFOption label="已提交" value="1"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="operator" cname="操作" width="200" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
</div>
</div>
<%-- EEDM8010页面加载时,不会加载EEDM6000 (lazyload="true") --%>
<EF:EFWindow id="uploadFile" url="${ctx}/web/HPSC099" lazyload="true" refresh="true">
</EF:EFWindow>
</EF:EFPage>
<script>
let ctx="${ctx}";
</script>
<script src="${ctx}/HP/SC/HPSC006.js"></script>
\ No newline at end of file
......@@ -15,8 +15,10 @@ $(function () {
{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="jump(' + item.id + ')" >物料清单</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="jump2(' + item.id + ')" >下料清单</a>';
return template;
}
}
......@@ -28,3 +30,8 @@ function jump(id) {
var herf= ctx + "\\web\\"+ "HPSC002?inqu_status-0-projId=" + id;
window.open(herf);
}
function jump2(id) {
var herf= ctx + "\\web\\"+ "HPSC006?inqu_status-0-projId=" + id;
window.open(herf);
}
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid = {
"result": {
pageable: {
......@@ -24,13 +23,21 @@ $(function () {
let row = rows[0];
let isInput= decodeURI(window.location.href.split("&")[1]);
if(isInput==="isInput"){
parent.JSColorbox.setValueCallback(row.orgId);
parent.JSColorbox.setValueCallback(row.id);
return;
};
JSUtils.confirm("确定分派? ", {
ok: function () {
parent.JSColorbox.setValueCallback(row.orgId);
parent.JSColorbox.setValueCallback(row.id);
}
});
});
});
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
\ No newline at end of file
......@@ -8,16 +8,24 @@
<EF:EFPage title="组织机构">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="factoryCname" cname="厂区名称" blockId="inqu_status" row="0"/>
<EF:EFInput ename="groupName" cname="组织名称" blockId="inqu_status" row="0"/>
<EF:EFInput cname="厂区名称:" ename="factoryName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="生产组名称" ename="groupCode" blockId="inqu_status" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="single,row">
<EF:EFColumn ename="orgId" cname="内码" hidden="true"/>
<EF:EFColumn ename="orgEname" cname="组织编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="orgCname" cname="组织名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="120" align="center"/>
<EF:EFPopupColumn ename="factoryName" cname="厂区名称" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="groupCode" cname="生产组名称" width="120" align="center"
blockName="org_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"
required="true">
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......
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