Commit 85eb30cd by liuyang

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

parents f5855b27 7fed8a5a
package com.baosight.hpjx.core.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.iplat4j.common.ed.domain.TEDFA00;
import com.baosight.iplat4j.core.exception.PlatException;
import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* ED工具类
*
* @author:songx
* @date:2022/8/10,13:55
*/
public class EDTools {
/**
* 页面工具类
*
* @author:songx
* @date:2024/2/6,16:26
*/
public static class EdFa00 {
/**
* 查询页面信息
*
* @param ename
* @return
*/
public static TEDFA00 query(String ename) {
AssertUtils.isNull(ename, "页面英文名称不能为空!");
Map<String, String> paramMap = new HashMap();
paramMap.put("form_ename", ename);
List<TEDFA00> results = DaoBase.getInstance().query("tedfa00.query", paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
}
/**
* 小代码工具类
*
* @author:songx
* @date:2024/2/6,16:25
*/
public static class EdCm01 {
/**
* 查询小代码明细
*
* @param codeSetCode
* @return
*/
public static List<Map<String, Object>> list(String codeSetCode) {
AssertUtils.isNull(codeSetCode, "代码分类编码不能为空!");
Map<String, String> paramMap = new HashMap();
paramMap.put("codesetCode", codeSetCode);
List<Map<String, Object>> results = DaoBase.getInstance().query("EDCM01.queryDetail", paramMap);
if (CollectionUtils.isEmpty(results)) {
throw new PlatException("分类编码[" + codeSetCode + "]未配置代码明细!");
}
return results;
}
}
}
...@@ -15,6 +15,7 @@ import com.baosight.iplat4j.core.ei.EiConstant; ...@@ -15,6 +15,7 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
...@@ -71,12 +72,34 @@ public class ServiceHPBI001 extends ServiceBase { ...@@ -71,12 +72,34 @@ public class ServiceHPBI001 extends ServiceBase {
outInfo = super.query(inInfo,"HPBI001.querySum",new HPBI001()); outInfo = super.query(inInfo,"HPBI001.querySum",new HPBI001());
//每日数据 //每日数据
List mrsj= super.dao.query("HPBI001.queryDay", params); List mrsj= super.dao.query("HPBI001.queryDay", params);
//生产月报
List scyb= super.dao.query("HPBI001.queryMon", params);
outInfo.set("mrsj",mrsj); outInfo.set("mrsj",mrsj);
outInfo.set("scyb",scyb);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
return outInfo; return outInfo;
} }
/**
* 查询操作
*
* @param inInfo
* @return
*/
public EiInfo queryCompanyCode(EiInfo inInfo) {
EiInfo outInfo = new EiInfo();
try {
Map params = new HashMap();
params.put("loginName", UserSession.getUserId());
//params.put("loginName", "QY000019");
//汇总数据
List company_code = super.dao.query("HPBI001.queryCompanyCode",params);
outInfo.set("company_code",company_code.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return outInfo;
}
} }
...@@ -115,4 +115,70 @@ ...@@ -115,4 +115,70 @@
</dynamic> </dynamic>
</select> </select>
<select id="queryMon" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT
INDCODE,
SERIES,
X,
VAULE
FROM (
select 'sccl' as INDCODE, '生产产量(吨)' as SERIES,'1月' as X,100 as VAULE from dual
union all
select 'scrs' as INDCODE, '生产人数(个)' as SERIES,'1月' as X,100 as VAULE from dual
union all
select 'rjcl' as INDCODE, '人均产量(kg)' as SERIES,'1月' as X,100 as VAULE from dual
union all
select 'sccl' as INDCODE, '生产产量(吨)' as SERIES,'2月' as X,110 as VAULE from dual
union all
select 'scrs' as INDCODE, '生产人数(个)' as SERIES,'2月' as X,110 as VAULE from dual
union all
select 'rjcl' as INDCODE, '人均产量(kg)' as SERIES,'2月' as X,110 as VAULE from dual
union all
select 'sccl' as INDCODE, '生产产量(吨)' as SERIES,'3月' as X,120 as VAULE from dual
union all
select 'scrs' as INDCODE, '生产人数(个)' as SERIES,'3月' as X,120 as VAULE from dual
union all
select 'rjcl' as INDCODE, '人均产量(kg)' as SERIES,'3月' as X,120 as VAULE from dual
union all
select 'sccl' as INDCODE, '生产产量(吨)' as SERIES,'4月' as X,130 as VAULE from dual
union all
select 'scrs' as INDCODE, '生产人数(个)' as SERIES,'4月' as X,130 as VAULE from dual
union all
select 'rjcl' as INDCODE, '人均产量(kg)' as SERIES,'4月' as X,130 as VAULE from dual
union all
select 'sccl' as INDCODE, '生产产量(吨)' as SERIES,'5月' as X,140 as VAULE from dual
union all
select 'scrs' as INDCODE, '生产人数(个)' as SERIES,'5月' as X,140 as VAULE from dual
union all
select 'rjcl' as INDCODE, '人均产量(kg)' as SERIES,'5月' as X,140 as VAULE from dual
union all
select 'sccl' as INDCODE, '生产产量(吨)' as SERIES,'6月' as X,150 as VAULE from dual
union all
select 'scrs' as INDCODE, '生产人数(个)' as SERIES,'6月' as X,150 as VAULE from dual
union all
select 'rjcl' as INDCODE, '人均产量(kg)' as SERIES,'6月' as X,150 as VAULE from dual
) A
WHERE 1=1
<!-- <isNotEmpty prepend=" AND " property="factory">
FACTORY LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="date">
DATE = #date#
</isNotEmpty>-->
<dynamic prepend="ORDER BY">
<isEmpty property="orderBy">
X asc
</isEmpty>
</dynamic>
</select>
<select id="queryCompanyCode" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
select COMPANY_CODE from iplat.XS_USER where 1=1
<isNotEmpty prepend=" AND " property="loginName">
LOGIN_NAME = #loginName#
</isNotEmpty>
</select>
</sqlMap> </sqlMap>
\ No newline at end of file
...@@ -48,10 +48,8 @@ public class HPConstant { ...@@ -48,10 +48,8 @@ public class HPConstant {
public static final String OTHER_ENTER_NO = "OTHER_ENTER_NO"; public static final String OTHER_ENTER_NO = "OTHER_ENTER_NO";
// 其他出库单号 // 其他出库单号
public static final String OTHER_OUTER_NO = "OTHER_OUTER_NO"; public static final String OTHER_OUTER_NO = "OTHER_OUTER_NO";
//生产计划单 //生产计划单
public static final String HPSC003_PROD_NO = "HPSC003_PROD_NO"; public static final String HPSC003_PROD_NO = "HPSC003_PROD_NO";
//生产订单 //生产订单
public static final String HPSC005_PROD_NO = "HPSC005_PROD_NO"; public static final String HPSC005_PROD_NO = "HPSC005_PROD_NO";
//生产任务订单 //生产任务订单
......
...@@ -166,7 +166,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -166,7 +166,7 @@ public class ServiceHPKC001 extends ServiceBase {
HPKC001 fKc001 = new HPKC001(); HPKC001 fKc001 = new HPKC001();
fKc001.fromMap(resultRows.get(i)); fKc001.fromMap(resultRows.get(i));
AssertUtils.isEmpty(fKc001.getWhCode(), "仓库名称不能为空"); AssertUtils.isEmpty(fKc001.getWhCode(), "仓库名称不能为空");
AssertUtils.isNull(fKc001.getInventCode(), "存货名称不能为空"); AssertUtils.isEmpty(fKc001.getInventCode(), "存货名称不能为空");
AssertUtils.isNull(fKc001.getInventRecordId(), "规格不能为空"); AssertUtils.isNull(fKc001.getInventRecordId(), "规格不能为空");
AssertUtils.isGt(BigDecimal.ZERO, fKc001.getAmount(), "数量必须大于0"); AssertUtils.isGt(BigDecimal.ZERO, fKc001.getAmount(), "数量必须大于0");
AssertUtils.isGt(BigDecimal.ZERO, fKc001.getWeight(), "重量必须大于0"); AssertUtils.isGt(BigDecimal.ZERO, fKc001.getWeight(), "重量必须大于0");
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.common.ProdOrderStatusEnum; import com.baosight.hpjx.common.ProdOrderStatusEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
...@@ -40,6 +41,8 @@ import java.util.Map; ...@@ -40,6 +41,8 @@ import java.util.Map;
*/ */
public class ServiceHPKC003A extends ServiceEPBase { public class ServiceHPKC003A extends ServiceEPBase {
private final Integer[] DEFAULT_INVENT_TYPE = {InventTypeEnum.SEMI_FINISHED_PRODUCT.getCode()};
/** /**
* 初始化 * 初始化
* *
...@@ -49,7 +52,9 @@ public class ServiceHPKC003A extends ServiceEPBase { ...@@ -49,7 +52,9 @@ public class ServiceHPKC003A extends ServiceEPBase {
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null, false); Map queryMap = new HashMap();
queryMap.put("inventTypes", DEFAULT_INVENT_TYPE);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -182,7 +182,7 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -182,7 +182,7 @@ public class ServiceHPKC006 extends ServiceBase {
HPKC006 fKc006 = new HPKC006(); HPKC006 fKc006 = new HPKC006();
fKc006.fromMap(resultRows.get(i)); fKc006.fromMap(resultRows.get(i));
AssertUtils.isEmpty(fKc006.getWhCode(), "仓库名称不能为空"); AssertUtils.isEmpty(fKc006.getWhCode(), "仓库名称不能为空");
AssertUtils.isNull(fKc006.getInventName(), "存货名称不能为空"); AssertUtils.isEmpty(fKc006.getInventName(), "存货名称不能为空");
//AssertUtils.isNull(fKc006.getInventRecordId(), "规格不能为空"); //AssertUtils.isNull(fKc006.getInventRecordId(), "规格不能为空");
AssertUtils.isGt(BigDecimal.ZERO, fKc006.getAmount(), "数量必须大于0"); AssertUtils.isGt(BigDecimal.ZERO, fKc006.getAmount(), "数量必须大于0");
AssertUtils.isGt(BigDecimal.ZERO, fKc006.getWeight(), "重量必须大于0"); AssertUtils.isGt(BigDecimal.ZERO, fKc006.getWeight(), "重量必须大于0");
......
...@@ -8,6 +8,7 @@ import com.baosight.hpjx.hp.kc.domain.HPKC011; ...@@ -8,6 +8,7 @@ import com.baosight.hpjx.hp.kc.domain.HPKC011;
import com.baosight.hpjx.hp.pz.domain.HPPZ006; import com.baosight.hpjx.hp.pz.domain.HPPZ006;
import com.baosight.hpjx.hp.pz.domain.HPPZ007; import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -180,13 +181,7 @@ public class ServiceHPKC011 extends ServiceBase { ...@@ -180,13 +181,7 @@ public class ServiceHPKC011 extends ServiceBase {
throw new PlatException("仓库编码异常,找不到对应的仓库档案!"); throw new PlatException("仓库编码异常,找不到对应的仓库档案!");
} }
try { try {
inInfo.setRows(EiConstant.queryBlock,new ArrayList(){{add(new HashMap<String,Object>(){{put("prodNo",hpkc011.getProdNo());}});}}); HPSC005 hpsc005 = HPSCTools.HpSc005.get(hpkc011.getProdNo());
inInfo.set(EiConstant.serviceName, "HPSC005");
inInfo.set(EiConstant.methodName, "query");
EiInfo outInfo = XLocalManager.call(inInfo);
HPSC005 hpsc005 = new HPSC005();
List<Map> inventList = outInfo.getBlock(EiConstant.resultBlock).getRows();
hpsc005.fromMap(inventList.get(0));
hpkc011.setProjCode(hpsc005.getProjCode()); hpkc011.setProjCode(hpsc005.getProjCode());
hpkc011.setProjName(hpsc005.getProjName()); hpkc011.setProjName(hpsc005.getProjName());
hpkc011.setInventCode(hpsc005.getPrdtCode()); hpkc011.setInventCode(hpsc005.getPrdtCode());
......
...@@ -15,12 +15,12 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -15,12 +15,12 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-01-22 14:36:36 create * @history 2024-02-06 15:01:45 create
*/ */
public class HPPZ004 extends DaoEPBase { public class HPPZ004 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/ public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
...@@ -34,7 +34,8 @@ public class HPPZ004 extends DaoEPBase { ...@@ -34,7 +34,8 @@ public class HPPZ004 extends DaoEPBase {
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/ public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/ public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
...@@ -48,96 +49,104 @@ public class HPPZ004 extends DaoEPBase { ...@@ -48,96 +49,104 @@ public class HPPZ004 extends DaoEPBase {
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/ public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/ public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String QUERY = "HPPZ004.query"; public static final String QUERY = "HPPZ004.query";
public static final String COUNT = "HPPZ004.count"; public static final String COUNT = "HPPZ004.count";
public static final String INSERT = "HPPZ004.insert"; public static final String INSERT = "HPPZ004.insert";
public static final String UPDATE = "HPPZ004.update"; public static final String UPDATE = "HPPZ004.update";
public static final String DELETE = "HPPZ004.delete"; public static final String DELETE = "HPPZ004.delete";
public static final String DELETE_BACK = "HPPZ004.deleteBack";
private Long id = null; private Long id;
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private Integer inventType = null; /* 存货类型*/ private Integer inventType; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/ private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/ private String inventName = " "; /* 存货名称*/
private Integer status = 1; /* 状态 0未启用 1启用*/ private Integer status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/ private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/ private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/ private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag; /* 是否删除0.否1.是*/
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
public void initMetaData() { public void initMetaData() {
EiColumn eiColumn; EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID); eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true); eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" "); eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE); eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留"); eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE); eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码"); eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE); eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型"); eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE); eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码"); eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME); eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称"); eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS); eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0未启用 1启用"); eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY); eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人"); eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME); eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称"); eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME); eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间"); eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY); eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人"); eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME); eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称"); eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME); eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间"); eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
} }
/** /**
* the constructor. * the constructor.
*/ */
public HPPZ004() { public HPPZ004() {
initMetaData(); initMetaData();
} }
/** /**
* get the id . * get the id .
* @return the id * @return the id
...@@ -145,7 +154,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -145,7 +154,7 @@ public class HPPZ004 extends DaoEPBase {
public Long getId() { public Long getId() {
return this.id; return this.id;
} }
/** /**
* set the id . * set the id .
* *
...@@ -161,7 +170,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -161,7 +170,7 @@ public class HPPZ004 extends DaoEPBase {
public String getCompanyCode() { public String getCompanyCode() {
return this.companyCode; return this.companyCode;
} }
/** /**
* set the companyCode - 企业编码 预留. * set the companyCode - 企业编码 预留.
* *
...@@ -177,7 +186,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -177,7 +186,7 @@ public class HPPZ004 extends DaoEPBase {
public String getDepCode() { public String getDepCode() {
return this.depCode; return this.depCode;
} }
/** /**
* set the depCode - 部门编码. * set the depCode - 部门编码.
* *
...@@ -193,7 +202,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -193,7 +202,7 @@ public class HPPZ004 extends DaoEPBase {
public Integer getInventType() { public Integer getInventType() {
return this.inventType; return this.inventType;
} }
/** /**
* set the inventType - 存货类型. * set the inventType - 存货类型.
* *
...@@ -209,7 +218,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -209,7 +218,7 @@ public class HPPZ004 extends DaoEPBase {
public String getInventCode() { public String getInventCode() {
return this.inventCode; return this.inventCode;
} }
/** /**
* set the inventCode - 存货编码. * set the inventCode - 存货编码.
* *
...@@ -225,7 +234,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -225,7 +234,7 @@ public class HPPZ004 extends DaoEPBase {
public String getInventName() { public String getInventName() {
return this.inventName; return this.inventName;
} }
/** /**
* set the inventName - 存货名称. * set the inventName - 存货名称.
* *
...@@ -241,7 +250,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -241,7 +250,7 @@ public class HPPZ004 extends DaoEPBase {
public Integer getStatus() { public Integer getStatus() {
return this.status; return this.status;
} }
/** /**
* set the status - 状态 0未启用 1启用. * set the status - 状态 0未启用 1启用.
* *
...@@ -257,7 +266,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -257,7 +266,7 @@ public class HPPZ004 extends DaoEPBase {
public String getCreatedBy() { public String getCreatedBy() {
return this.createdBy; return this.createdBy;
} }
/** /**
* set the createdBy - 创建人. * set the createdBy - 创建人.
* *
...@@ -273,7 +282,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -273,7 +282,7 @@ public class HPPZ004 extends DaoEPBase {
public String getCreatedName() { public String getCreatedName() {
return this.createdName; return this.createdName;
} }
/** /**
* set the createdName - 创建人名称. * set the createdName - 创建人名称.
* *
...@@ -289,7 +298,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -289,7 +298,7 @@ public class HPPZ004 extends DaoEPBase {
public String getCreatedTime() { public String getCreatedTime() {
return this.createdTime; return this.createdTime;
} }
/** /**
* set the createdTime - 创建时间. * set the createdTime - 创建时间.
* *
...@@ -305,7 +314,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -305,7 +314,7 @@ public class HPPZ004 extends DaoEPBase {
public String getUpdatedBy() { public String getUpdatedBy() {
return this.updatedBy; return this.updatedBy;
} }
/** /**
* set the updatedBy - 更新人. * set the updatedBy - 更新人.
* *
...@@ -321,7 +330,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -321,7 +330,7 @@ public class HPPZ004 extends DaoEPBase {
public String getUpdatedName() { public String getUpdatedName() {
return this.updatedName; return this.updatedName;
} }
/** /**
* set the updatedName - 更新人名称. * set the updatedName - 更新人名称.
* *
...@@ -337,7 +346,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -337,7 +346,7 @@ public class HPPZ004 extends DaoEPBase {
public String getUpdatedTime() { public String getUpdatedTime() {
return this.updatedTime; return this.updatedTime;
} }
/** /**
* set the updatedTime - 更新时间. * set the updatedTime - 更新时间.
* *
...@@ -347,13 +356,29 @@ public class HPPZ004 extends DaoEPBase { ...@@ -347,13 +356,29 @@ public class HPPZ004 extends DaoEPBase {
this.updatedTime = updatedTime; this.updatedTime = updatedTime;
} }
/** /**
* get the deleteFlag - 是否删除0.否1.是.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除0.否1.是.
*
* @param deleteFlag - 是否删除0.否1.是
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the value from Map. * get the value from Map.
* *
* @param map - source data map * @param map - source data map
*/ */
@Override @Override
public void fromMap(Map map) { public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id)); setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode)); setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
...@@ -367,14 +392,15 @@ public class HPPZ004 extends DaoEPBase { ...@@ -367,14 +392,15 @@ public class HPPZ004 extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
} }
/** /**
* set the value to Map. * set the value to Map.
*/ */
@Override @Override
public Map toMap() { public Map toMap() {
Map map = new HashMap(); Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID))); map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE))); map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
...@@ -389,7 +415,8 @@ public class HPPZ004 extends DaoEPBase { ...@@ -389,7 +415,8 @@ public class HPPZ004 extends DaoEPBase {
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY))); map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME))); map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
return map; return map;
} }
} }
...@@ -127,6 +127,10 @@ public class ServiceHPPZ004 extends ServiceBase { ...@@ -127,6 +127,10 @@ public class ServiceHPPZ004 extends ServiceBase {
HPPZ004 hppz004 = new HPPZ004(); HPPZ004 hppz004 = new HPPZ004();
if(CollectionUtils.isNotEmpty(list)){ if(CollectionUtils.isNotEmpty(list)){
hppz004.fromMap(list.get(0)); hppz004.fromMap(list.get(0));
if(hppz004.getDeleteFlag()== CommonConstant.YesNo.YES_1) {
hppz004.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.update(HPPZ004.DELETE_BACK, hppz004);
}
}else{ }else{
// 生成编码 // 生成编码
hppz004.setInventCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.INVENT_CODE)); hppz004.setInventCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.INVENT_CODE));
......
...@@ -100,7 +100,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -100,7 +100,7 @@ public class ServiceHPPZ006 extends ServiceBase {
HPPZ006 fPz006 = new HPPZ006(); HPPZ006 fPz006 = new HPPZ006();
fPz006.fromMap(resultRows.get(i)); fPz006.fromMap(resultRows.get(i));
AssertUtils.isNull(fPz006.getInventType(), "存货类型不能为空"); AssertUtils.isNull(fPz006.getInventType(), "存货类型不能为空");
AssertUtils.isNull(fPz006.getInventCode(), "存货名称不能为空"); AssertUtils.isEmpty(fPz006.getInventCode(), "存货名称不能为空");
// 去除空格 // 去除空格
fPz006.setSpec(StringUtils.trimToEmpty(fPz006.getSpec())); fPz006.setSpec(StringUtils.trimToEmpty(fPz006.getSpec()));
// 重复校验 // 重复校验
......
...@@ -184,5 +184,20 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -184,5 +184,20 @@ public class ServiceHPPZ011 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/**
* @param inInfo
* @return
*/
public EiInfo queryGroupComboBox(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.GROUP_RECORD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, new HashMap<>(), false);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询组失败");
}
return inInfo;
}
} }
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag" <!-- 更新时间 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -54,10 +55,10 @@ ...@@ -54,10 +55,10 @@
<sql id="order"> <sql id="order">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="order">
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="order">
ID DESC ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -118,6 +119,11 @@ ...@@ -118,6 +119,11 @@
UPDATE hpjx.T_HPPZ004 SET DELETE_FLAG = 1 WHERE ID = #id# UPDATE hpjx.T_HPPZ004 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<!-- 逻辑删除 -->
<delete id="deleteBack">
UPDATE hpjx.T_HPPZ004 SET DELETE_FLAG = 0 WHERE ID = #id#
</delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz004 UPDATE hpjx.t_hppz004
SET SET
......
...@@ -23,7 +23,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -23,7 +23,7 @@ public class HPSC003 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/ public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_PROJ_TYPE = "projType"; /* 项目类型*/ public static final String FIELD_PROJ_TYPE = "projType"; /* 项目类型*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/ public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
...@@ -45,7 +45,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -45,7 +45,7 @@ public class HPSC003 extends DaoEPBase {
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; public static final String FIELD_INVENT_RECORD_ID = "inventRecordId";
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_PROJ_TYPE = "PROJ_TYPE"; /* 项目类型*/ public static final String COL_PROJ_TYPE = "PROJ_TYPE"; /* 项目类型*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/ public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
...@@ -64,13 +64,13 @@ public class HPSC003 extends DaoEPBase { ...@@ -64,13 +64,13 @@ public class HPSC003 extends DaoEPBase {
public static final String COL_REMARK = "REMARK"; /* 备注*/ public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID";
public static final String QUERY = "t_hpsc003.query"; public static final String QUERY = "HPSC003.query";
public static final String COUNT = "t_hpsc003.count"; public static final String COUNT = "HPSC003.count";
public static final String INSERT = "t_hpsc003.insert"; public static final String INSERT = "HPSC003.insert";
public static final String UPDATE = "t_hpsc003.update"; public static final String UPDATE = "HPSC003.update";
public static final String DELETE = "t_hpsc003.delete"; public static final String DELETE = "HPSC003.delete";
private Long id = new Long(0); private Long id = new Long(0);
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private Integer projType = new Integer(0); /* 项目类型*/ private Integer projType = new Integer(0); /* 项目类型*/
private String projCode = " "; /* 项目编码*/ private String projCode = " "; /* 项目编码*/
...@@ -233,7 +233,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -233,7 +233,7 @@ public class HPSC003 extends DaoEPBase {
/** /**
* set the id . * set the id .
* *
* @param id * @param id
*/ */
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
......
...@@ -27,12 +27,16 @@ public class HPSC005B extends HPSC005 { ...@@ -27,12 +27,16 @@ public class HPSC005B extends HPSC005 {
public static final String FIELD_PROD_TASK_NO = "prodTaskNo"; public static final String FIELD_PROD_TASK_NO = "prodTaskNo";
public static final String FIELD_PROD_ORDER_NO = "prodOrderNo"; public static final String FIELD_PROD_ORDER_NO = "prodOrderNo";
public static final String FIELD_COMPLETE_NUM = "completeNum"; /* 已完成数量*/ public static final String FIELD_COMPLETE_NUM = "completeNum"; /* 已完成数量*/
public static final String FIELD_ZL_PROD_TASK_NO = "zlprodTaskNo"; /* 质检单任务号*/
public static final String COL_CHILD_ID = "CHILD_ID"; public static final String COL_CHILD_ID = "CHILD_ID";
public static final String COL_PROD_TASK_NO = "PROD_TASK_NO"; public static final String COL_PROD_TASK_NO = "PROD_TASK_NO";
public static final String COL_PROD_ORDER_NO = "PROD_ORDER_NO"; public static final String COL_PROD_ORDER_NO = "PROD_ORDER_NO";
public static final String COL_COMPLETE_NUM = "COMPLETE_NUM"; /* 已完成数量*/ public static final String COL_COMPLETE_NUM = "COMPLETE_NUM"; /* 已完成数量*/
public static final String COL_ZL_PROD_TASK_NO = "ZL_PROD_TASK_NO"; /* 质检单任务号*/
public static final String QUERY = "HPSC005B.query"; public static final String QUERY = "HPSC005B.query";
public static final String COUNT = "HPSC005B.count"; public static final String COUNT = "HPSC005B.count";
public static final String INSERT = "HPSC005B.insert"; public static final String INSERT = "HPSC005B.insert";
...@@ -43,7 +47,8 @@ public class HPSC005B extends HPSC005 { ...@@ -43,7 +47,8 @@ public class HPSC005B extends HPSC005 {
private String prodTaskNo = " "; private String prodTaskNo = " ";
private String prodOrderNo = " "; private String prodOrderNo = " ";
private BigDecimal completeNum = new BigDecimal(0.000); /* 已完成数量*/ private BigDecimal completeNum = new BigDecimal(0.000); /* 已完成数量*/
private String zlprodTaskNo = " ";
/** /**
* the constructor. * the constructor.
*/ */
...@@ -76,6 +81,10 @@ public class HPSC005B extends HPSC005 { ...@@ -76,6 +81,10 @@ public class HPSC005B extends HPSC005 {
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("已完成数量"); eiColumn.setDescName("已完成数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ZL_PROD_TASK_NO);
eiColumn.setDescName("质检单任务号");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -128,6 +137,14 @@ public class HPSC005B extends HPSC005 { ...@@ -128,6 +137,14 @@ public class HPSC005B extends HPSC005 {
public void setCompleteNum(BigDecimal completeNum) { public void setCompleteNum(BigDecimal completeNum) {
this.completeNum = completeNum; this.completeNum = completeNum;
} }
public String getZlProdTaskNo() {
return zlprodTaskNo;
}
public void setZlProdTaskNo(String zlprodTaskNo) {
this.zlprodTaskNo = zlprodTaskNo;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -140,6 +157,7 @@ public class HPSC005B extends HPSC005 { ...@@ -140,6 +157,7 @@ public class HPSC005B extends HPSC005 {
setProdTaskNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_TASK_NO)), prodTaskNo)); setProdTaskNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_TASK_NO)), prodTaskNo));
setProdOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_ORDER_NO)), prodOrderNo)); setProdOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_ORDER_NO)), prodOrderNo));
setCompleteNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COMPLETE_NUM)), completeNum)); setCompleteNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COMPLETE_NUM)), completeNum));
setZlProdTaskNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ZL_PROD_TASK_NO)), zlprodTaskNo));
} }
/** /**
...@@ -153,7 +171,7 @@ public class HPSC005B extends HPSC005 { ...@@ -153,7 +171,7 @@ public class HPSC005B extends HPSC005 {
map.put(FIELD_PROD_TASK_NO, StringUtils.toString(prodTaskNo, eiMetadata.getMeta(FIELD_PROD_TASK_NO))); map.put(FIELD_PROD_TASK_NO, StringUtils.toString(prodTaskNo, eiMetadata.getMeta(FIELD_PROD_TASK_NO)));
map.put(FIELD_PROD_ORDER_NO, StringUtils.toString(prodOrderNo, eiMetadata.getMeta(FIELD_PROD_ORDER_NO))); map.put(FIELD_PROD_ORDER_NO, StringUtils.toString(prodOrderNo, eiMetadata.getMeta(FIELD_PROD_ORDER_NO)));
map.put(FIELD_COMPLETE_NUM, StringUtils.toString(completeNum, eiMetadata.getMeta(FIELD_COMPLETE_NUM))); map.put(FIELD_COMPLETE_NUM, StringUtils.toString(completeNum, eiMetadata.getMeta(FIELD_COMPLETE_NUM)));
map.put(FIELD_ZL_PROD_TASK_NO, StringUtils.toString(zlprodTaskNo, eiMetadata.getMeta(FIELD_ZL_PROD_TASK_NO)));
return map; return map;
} }
} }
...@@ -40,6 +40,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -40,6 +40,7 @@ public class HPSC006 extends DaoEPBase {
public static final String FIELD_TOTAL_WT = "totalWt"; /* 计划重量*/ public static final String FIELD_TOTAL_WT = "totalWt"; /* 计划重量*/
public static final String FIELD_ACTUAL_COMPLETION_DATE = "actualCompletionDate"; /* 实际完工日期*/ public static final String FIELD_ACTUAL_COMPLETION_DATE = "actualCompletionDate"; /* 实际完工日期*/
public static final String FIELD_ACTUAL_COMPLETION_NUM = "actualCompletionNum"; /* 实际完工数量*/ public static final String FIELD_ACTUAL_COMPLETION_NUM = "actualCompletionNum"; /* 实际完工数量*/
public static final String FIELD_ACTUAL_COMPLETION_TOTAL_WT = "actualCompletionTotalWt"; /* 实际完工重量*/
public static final String FIELD_STATUS = "status"; /* 状态 0-计划中,1-生产中,2-已完成*/ public static final String FIELD_STATUS = "status"; /* 状态 0-计划中,1-生产中,2-已完成*/
public static final String FIELD_ORG_NO = "orgNo"; /* 生产组编码*/ public static final String FIELD_ORG_NO = "orgNo"; /* 生产组编码*/
public static final String FIELD_ORG_NAME = "orgName"; /* 生产组名称*/ public static final String FIELD_ORG_NAME = "orgName"; /* 生产组名称*/
...@@ -53,6 +54,8 @@ public class HPSC006 extends DaoEPBase { ...@@ -53,6 +54,8 @@ public class HPSC006 extends DaoEPBase {
public static final String FIELD_REMARK = "remark"; /* 备注*/ public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_FILE_PATH1 = "filePath1"; /* 文件地址1*/ public static final String FIELD_FILE_PATH1 = "filePath1"; /* 文件地址1*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/ public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String FIELD_MATERIAL = "material"; /* 材质*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
...@@ -72,6 +75,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -72,6 +75,7 @@ public class HPSC006 extends DaoEPBase {
public static final String COL_TOTAL_WT = "TOTAL_WT"; /* 计划重量*/ public static final String COL_TOTAL_WT = "TOTAL_WT"; /* 计划重量*/
public static final String COL_ACTUAL_COMPLETION_DATE = "ACTUAL_COMPLETION_DATE"; /* 实际完工日期*/ public static final String COL_ACTUAL_COMPLETION_DATE = "ACTUAL_COMPLETION_DATE"; /* 实际完工日期*/
public static final String COL_ACTUAL_COMPLETION_NUM = "ACTUAL_COMPLETION_NUM"; /* 实际完工数量*/ public static final String COL_ACTUAL_COMPLETION_NUM = "ACTUAL_COMPLETION_NUM"; /* 实际完工数量*/
public static final String COL_ACTUAL_COMPLETION_TOTAL_WT = "ACTUAL_COMPLETION_TOTAL_WT"; /* 实际完工重量*/
public static final String COL_STATUS = "STATUS"; /* 状态 0-计划中,1-生产中,2-已完成*/ public static final String COL_STATUS = "STATUS"; /* 状态 0-计划中,1-生产中,2-已完成*/
public static final String COL_ORG_NO = "ORG_NO"; /* 生产组编码*/ public static final String COL_ORG_NO = "ORG_NO"; /* 生产组编码*/
public static final String COL_ORG_NAME = "ORG_NAME"; /* 生产组名称*/ public static final String COL_ORG_NAME = "ORG_NAME"; /* 生产组名称*/
...@@ -85,12 +89,14 @@ public class HPSC006 extends DaoEPBase { ...@@ -85,12 +89,14 @@ public class HPSC006 extends DaoEPBase {
public static final String COL_REMARK = "REMARK"; /* 备注*/ public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String COL_FILE_PATH1 = "FILE_PATH1"; /* 文件地址1*/ public static final String COL_FILE_PATH1 = "FILE_PATH1"; /* 文件地址1*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/ public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/
public static final String COL_MATERIAL = "MATERIAL"; /* 材质*/
public static final String QUERY = "t_hpsc006.query"; public static final String QUERY = "HPSC006.query";
public static final String COUNT = "t_hpsc006.count"; public static final String COUNT = "HPSC006.count";
public static final String INSERT = "t_hpsc006.insert"; public static final String INSERT = "HPSC006.insert";
public static final String UPDATE = "t_hpsc006.update"; public static final String UPDATE = "HPSC006.update";
public static final String DELETE = "t_hpsc006.delete"; public static final String DELETE = "HPSC006.delete";
private Long id = new Long(0); private Long id = new Long(0);
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
...@@ -110,6 +116,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -110,6 +116,7 @@ public class HPSC006 extends DaoEPBase {
private BigDecimal totalWt = new BigDecimal(0.000); /* 计划重量*/ private BigDecimal totalWt = new BigDecimal(0.000); /* 计划重量*/
private String actualCompletionDate = " "; /* 实际完工日期*/ private String actualCompletionDate = " "; /* 实际完工日期*/
private BigDecimal actualCompletionNum = new BigDecimal("0"); /* 实际完工数量*/ private BigDecimal actualCompletionNum = new BigDecimal("0"); /* 实际完工数量*/
private BigDecimal actualCompletionTotalWt = new BigDecimal(0.000); /* 实际完工重量*/
private Integer status = new Integer(0); /* 状态 0-计划中,1-生产中,2-已完成*/ private Integer status = new Integer(0); /* 状态 0-计划中,1-生产中,2-已完成*/
private String orgNo = " "; /* 生产组编码*/ private String orgNo = " "; /* 生产组编码*/
private String orgName = " "; /* 生产组名称*/ private String orgName = " "; /* 生产组名称*/
...@@ -123,6 +130,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -123,6 +130,7 @@ public class HPSC006 extends DaoEPBase {
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private String filePath1 = " "; /* 文件地址1*/ private String filePath1 = " "; /* 文件地址1*/
private Integer inventRecordId = new Integer(0); /* 存货档案ID*/ private Integer inventRecordId = new Integer(0); /* 存货档案ID*/
private String material = " "; /* 材质*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -276,6 +284,10 @@ public class HPSC006 extends DaoEPBase { ...@@ -276,6 +284,10 @@ public class HPSC006 extends DaoEPBase {
eiColumn.setDescName("存货档案ID"); eiColumn.setDescName("存货档案ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MATERIAL);
eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn);
} }
...@@ -575,6 +587,22 @@ public class HPSC006 extends DaoEPBase { ...@@ -575,6 +587,22 @@ public class HPSC006 extends DaoEPBase {
this.actualCompletionNum = actualCompletionNum; this.actualCompletionNum = actualCompletionNum;
} }
/** /**
* get the actualCompletionTotalWt - 实际完工重量.
* @return the actualCompletionTotalWt
*/
public BigDecimal getactualCompletionTotalWt() {
return this.actualCompletionTotalWt;
}
/**
* set the actualCompletionTotalWt - 实际完工重量.
*
* @param actualCompletionTotalWt - 实际完工重量
*/
public void setactualCompletionTotalWt(BigDecimal actualCompletionTotalWt) {
this.actualCompletionTotalWt = actualCompletionTotalWt;
}
/**
* get the status - 状态 0-计划中,1-生产中,2-已完成. * get the status - 状态 0-计划中,1-生产中,2-已完成.
* @return the status * @return the status
*/ */
...@@ -783,6 +811,22 @@ public class HPSC006 extends DaoEPBase { ...@@ -783,6 +811,22 @@ public class HPSC006 extends DaoEPBase {
this.inventRecordId = inventRecordId; this.inventRecordId = inventRecordId;
} }
/** /**
* get the material - 材质.
* @return the material
*/
public String getMaterial() {
return this.material;
}
/**
* set the material - 材质.
*
* @param material - 材质
*/
public void setMaterial(String material) {
this.material = material;
}
/**
* get the value from Map. * get the value from Map.
* *
* @param map - source data map * @param map - source data map
...@@ -808,6 +852,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -808,6 +852,7 @@ public class HPSC006 extends DaoEPBase {
setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_WT)), totalWt)); setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_WT)), totalWt));
setActualCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_DATE)), actualCompletionDate)); setActualCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_DATE)), actualCompletionDate));
setActualCompletionNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_NUM)), actualCompletionNum)); setActualCompletionNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_NUM)), actualCompletionNum));
setactualCompletionTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_TOTAL_WT)), actualCompletionTotalWt));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status)); setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo)); setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo));
setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NAME)), orgName)); setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NAME)), orgName));
...@@ -821,6 +866,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -821,6 +866,7 @@ public class HPSC006 extends DaoEPBase {
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setFilePath1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH1)), filePath1)); setFilePath1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH1)), filePath1));
setInventRecordId(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId)); setInventRecordId(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material));
} }
/** /**
...@@ -848,6 +894,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -848,6 +894,7 @@ public class HPSC006 extends DaoEPBase {
map.put(FIELD_TOTAL_WT, StringUtils.toString(totalWt, eiMetadata.getMeta(FIELD_TOTAL_WT))); map.put(FIELD_TOTAL_WT, StringUtils.toString(totalWt, eiMetadata.getMeta(FIELD_TOTAL_WT)));
map.put(FIELD_ACTUAL_COMPLETION_DATE, StringUtils.toString(actualCompletionDate, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_DATE))); map.put(FIELD_ACTUAL_COMPLETION_DATE, StringUtils.toString(actualCompletionDate, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_DATE)));
map.put(FIELD_ACTUAL_COMPLETION_NUM, StringUtils.toString(actualCompletionNum, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_NUM))); map.put(FIELD_ACTUAL_COMPLETION_NUM, StringUtils.toString(actualCompletionNum, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_NUM)));
map.put(FIELD_ACTUAL_COMPLETION_TOTAL_WT, StringUtils.toString(actualCompletionTotalWt, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_TOTAL_WT)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS))); map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_ORG_NO, StringUtils.toString(orgNo, eiMetadata.getMeta(FIELD_ORG_NO))); map.put(FIELD_ORG_NO, StringUtils.toString(orgNo, eiMetadata.getMeta(FIELD_ORG_NO)));
map.put(FIELD_ORG_NAME, StringUtils.toString(orgName, eiMetadata.getMeta(FIELD_ORG_NAME))); map.put(FIELD_ORG_NAME, StringUtils.toString(orgName, eiMetadata.getMeta(FIELD_ORG_NAME)));
...@@ -861,6 +908,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -861,6 +908,7 @@ public class HPSC006 extends DaoEPBase {
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK))); map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_FILE_PATH1, StringUtils.toString(filePath1, eiMetadata.getMeta(FIELD_FILE_PATH1))); map.put(FIELD_FILE_PATH1, StringUtils.toString(filePath1, eiMetadata.getMeta(FIELD_FILE_PATH1)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID))); map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL)));
return map; return map;
} }
......
package com.baosight.hpjx.hp.sc.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THpsc007.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-02-06 15:50:11 create
*/
public class HPSC007 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_HPSC006_ID = "hpsc006Id"; /* 生产下料ID*/
public static final String FIELD_ACTUAL_COMPLETION_DATE = "actualCompletionDate"; /* 实际完工日期*/
public static final String FIELD_ACTUAL_COMPLETION_NUM = "actualCompletionNum"; /* 实际完工数量*/
public static final String FIELD_ACTUAL_COMPLETION_TOTAL_WT = "actualCompletionTotalWt"; /* 实际完工重量*/
public static final String FIELD_USER_ID = "userId"; /* 完成人ID*/
public static final String FIELD_USER_NAME = "userName"; /* 完成人姓名*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_HPSC006_ID = "HPSC006_ID"; /* 生产下料ID*/
public static final String COL_ACTUAL_COMPLETION_DATE = "ACTUAL_COMPLETION_DATE"; /* 实际完工日期*/
public static final String COL_ACTUAL_COMPLETION_NUM = "ACTUAL_COMPLETION_NUM"; /* 实际完工数量*/
public static final String COL_ACTUAL_COMPLETION_TOTAL_WT = "ACTUAL_COMPLETION_TOTAL_WT"; /* 实际完工重量*/
public static final String COL_USER_ID = "USER_ID"; /* 完成人ID*/
public static final String COL_USER_NAME = "USER_NAME"; /* 完成人姓名*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String QUERY = "t_hpsc007.query";
public static final String COUNT = "t_hpsc007.count";
public static final String INSERT = "t_hpsc007.insert";
public static final String UPDATE = "t_hpsc007.update";
public static final String DELETE = "t_hpsc007.delete";
private Long id = new Long(0);
private String companyCode = " "; /* 企业编码 预留*/
private Long hpsc006Id = new Long(0); /* 生产下料ID*/
private String actualCompletionDate = " "; /* 实际完工日期*/
private BigDecimal actualCompletionNum = new BigDecimal("0"); /* 实际完工数量*/
private BigDecimal actualCompletionTotalWt = new BigDecimal("0"); /* 实际完工重量*/
private String userId = " "; /* 完成人ID*/
private String userName = " "; /* 完成人姓名*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
private String remark = " "; /* 备注*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_HPSC006_ID);
eiColumn.setDescName("生产下料ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACTUAL_COMPLETION_DATE);
eiColumn.setDescName("实际完工日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACTUAL_COMPLETION_NUM);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("实际完工数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACTUAL_COMPLETION_TOTAL_WT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("实际完工重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_USER_ID);
eiColumn.setDescName("完成人ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_USER_NAME);
eiColumn.setDescName("完成人姓名");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARK);
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPSC007() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the hpsc006Id - 生产下料ID.
* @return the hpsc006Id
*/
public Long getHpsc006Id() {
return this.hpsc006Id;
}
/**
* set the hpsc006Id - 生产下料ID.
*
* @param hpsc006Id - 生产下料ID
*/
public void setHpsc006Id(Long hpsc006Id) {
this.hpsc006Id = hpsc006Id;
}
/**
* get the actualCompletionDate - 实际完工日期.
* @return the actualCompletionDate
*/
public String getActualCompletionDate() {
return this.actualCompletionDate;
}
/**
* set the actualCompletionDate - 实际完工日期.
*
* @param actualCompletionDate - 实际完工日期
*/
public void setActualCompletionDate(String actualCompletionDate) {
this.actualCompletionDate = actualCompletionDate;
}
/**
* get the actualCompletionNum - 实际完工数量.
* @return the actualCompletionNum
*/
public BigDecimal getActualCompletionNum() {
return this.actualCompletionNum;
}
/**
* set the actualCompletionNum - 实际完工数量.
*
* @param actualCompletionNum - 实际完工数量
*/
public void setActualCompletionNum(BigDecimal actualCompletionNum) {
this.actualCompletionNum = actualCompletionNum;
}
/**
* get the actualCompletionTotalWt - 实际完工重量.
* @return the actualCompletionTotalWt
*/
public BigDecimal getactualCompletionTotalWt() {
return this.actualCompletionTotalWt;
}
/**
* set the actualCompletionTotalWt - 实际完工重量.
*
* @param actualCompletionTotalWt - 实际完工重量
*/
public void setactualCompletionTotalWt(BigDecimal actualCompletionTotalWt) {
this.actualCompletionTotalWt = actualCompletionTotalWt;
}
/**
* get the userId - 完成人ID.
* @return the userId
*/
public String getUserId() {
return this.userId;
}
/**
* set the userId - 完成人ID.
*
* @param userId - 完成人ID
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
* get the userName - 完成人姓名.
* @return the userName
*/
public String getUserName() {
return this.userName;
}
/**
* set the userName - 完成人姓名.
*
* @param userName - 完成人姓名
*/
public void setUserName(String userName) {
this.userName = userName;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the remark - 备注.
* @return the remark
*/
public String getRemark() {
return this.remark;
}
/**
* set the remark - 备注.
*
* @param remark - 备注
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setHpsc006Id(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_HPSC006_ID)), hpsc006Id));
setActualCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_DATE)), actualCompletionDate));
setActualCompletionNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_NUM)), actualCompletionNum));
setactualCompletionTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_TOTAL_WT)), actualCompletionTotalWt));
setUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USER_ID)), userId));
setUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USER_NAME)), userName));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_HPSC006_ID, StringUtils.toString(hpsc006Id, eiMetadata.getMeta(FIELD_HPSC006_ID)));
map.put(FIELD_ACTUAL_COMPLETION_DATE, StringUtils.toString(actualCompletionDate, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_DATE)));
map.put(FIELD_ACTUAL_COMPLETION_NUM, StringUtils.toString(actualCompletionNum, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_NUM)));
map.put(FIELD_ACTUAL_COMPLETION_TOTAL_WT, StringUtils.toString(actualCompletionTotalWt, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_TOTAL_WT)));
map.put(FIELD_USER_ID, StringUtils.toString(userId, eiMetadata.getMeta(FIELD_USER_ID)));
map.put(FIELD_USER_NAME, StringUtils.toString(userName, eiMetadata.getMeta(FIELD_USER_NAME)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
return map;
}
}
...@@ -118,7 +118,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -118,7 +118,7 @@ public class ServiceHPSC001 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hpsc001.fromMap(map); hpsc001.fromMap(map);
this.dao.delete("HPPZ001.delete", hpsc001.toMap()); this.dao.delete("HPSC001.delete", hpsc001.toMap());
} }
} catch (PlatException e) { } catch (PlatException e) {
......
...@@ -10,6 +10,7 @@ import com.baosight.hpjx.hp.sc.domain.HPSC003; ...@@ -10,6 +10,7 @@ import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004; import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC001; import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.sc.domain.HPSC002; import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
...@@ -19,6 +20,7 @@ import com.baosight.iplat4j.core.exception.PlatException; ...@@ -19,6 +20,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -359,62 +361,72 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -359,62 +361,72 @@ public class ServiceHPSC002 extends ServiceBase {
*/ */
public void autoPlanInfo(String id) { public void autoPlanInfo(String id) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
HPSC002 THPSC002 = (HPSC002) dao.get("HPSC002.queryEntityByParentPrtdCode","id",id); HPSC002 dbSc002 = (HPSC002) dao.get("HPSC002.queryEntityByParentPrtdCode","id",id);
String SCJHD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC003_PROD_NO); String SCJHD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC003_PROD_NO);
//生成生产计划t_hpsc003 // 生成生产计划t_hpsc003,如果已存在就不新增
HPSC003 HPSC003 = new HPSC003(); Map queryMap = new HashMap();
HPSC003.setCompanyCode(""); queryMap.put("matId", dbSc002.getId());
HPSC003.setProjType(null); List<HPSC003> dbSc003s = dao.query(HPSC003.QUERY, queryMap);
HPSC003.setProjCode(THPSC002.getProjCode()); if (CollectionUtils.isEmpty(dbSc003s)) {
HPSC003.setProjName(THPSC002.getProjName()); HPSC003 HPSC003 = new HPSC003();
HPSC003.setPlanInfoNo(SCJHD); HPSC003.setCompanyCode("");
HPSC003.setInventRecordId(THPSC002.getInventRecordId()); HPSC003.setProjType(null);
HPSC003.setPrdtType(THPSC002.getPrdtType()); HPSC003.setProjCode(dbSc002.getProjCode());
HPSC003.setPrdtCode(THPSC002.getPrdtCode()); HPSC003.setProjName(dbSc002.getProjName());
HPSC003.setPrdtName(THPSC002.getPrdtName()); HPSC003.setPlanInfoNo(SCJHD);
HPSC003.setSpec(THPSC002.getSpec()); HPSC003.setInventRecordId(dbSc002.getInventRecordId());
HPSC003.setLength(THPSC002.getLength()); HPSC003.setPrdtType(dbSc002.getPrdtType());
HPSC003.setWidth(THPSC002.getWidth()); HPSC003.setPrdtCode(dbSc002.getPrdtCode());
HPSC003.setThick(THPSC002.getThick()); HPSC003.setPrdtName(dbSc002.getPrdtName());
HPSC003.setRemark(THPSC002.getRemark()); HPSC003.setSpec(dbSc002.getSpec());
HPSC003.setPlanCompletionDate(""); HPSC003.setLength(dbSc002.getLength());
HPSC003.setStatus(0); HPSC003.setWidth(dbSc002.getWidth());
HPSC003.setMatId(THPSC002.getId()); HPSC003.setThick(dbSc002.getThick());
DaoUtils.insert("HPSC003.insert", HPSC003.toMap()); HPSC003.setRemark(dbSc002.getRemark());
HPSC003.setPlanCompletionDate("");
//生产计划详情 HPSC003.setStatus(0);
Map queryMap = new HashMap(); HPSC003.setMatId(dbSc002.getId());
DaoUtils.insert("HPSC003.insert", HPSC003.toMap());
}
// 生产计划详情
queryMap = new HashMap();
queryMap.put("parentId", id); queryMap.put("parentId", id);
List<HPSC002> rows = this.dao.query("HPSC002.queryEntityByParentPrtdCode", queryMap); List<HPSC002> rows = this.dao.query("HPSC002.queryEntityByParentPrtdCode", queryMap);
for (int i = 0; i < rows.size(); i++) { for (int i = 0; i < rows.size(); i++) {
HPSC002 HPSC002 = rows.get(i); HPSC002 dbSc002Child = rows.get(i);
// 明细已存在就不在新增
queryMap = new HashMap();
queryMap.put("filePath1", dbSc002Child.getId());
List<HPSC004> dbSc004s = dao.query(HPSC004.QUERY, queryMap);
if (CollectionUtils.isNotEmpty(dbSc004s)) {
continue;
}
HPSC004 HPSC004 = new HPSC004(); HPSC004 HPSC004 = new HPSC004();
HPSC004.setCompanyCode(""); HPSC004.setCompanyCode("");
HPSC004.setDeptCode(""); HPSC004.setDeptCode("");
HPSC004.setProjCode(HPSC002.getProjCode()); HPSC004.setProjCode(dbSc002Child.getProjCode());
HPSC004.setProjName(HPSC002.getProjName()); HPSC004.setProjName(dbSc002Child.getProjName());
HPSC004.setParentId(SCJHD); HPSC004.setParentId(SCJHD);
HPSC004.setParentPrdtName(HPSC002.getParentPrdtName()); HPSC004.setParentPrdtName(dbSc002Child.getParentPrdtName());
HPSC004.setInventRecordId(HPSC002.getInventRecordId()); HPSC004.setInventRecordId(dbSc002Child.getInventRecordId());
HPSC004.setPrdtType(HPSC002.getPrdtType()); HPSC004.setPrdtType(dbSc002Child.getPrdtType());
HPSC004.setPrdtCode(HPSC002.getPrdtCode()); HPSC004.setPrdtCode(dbSc002Child.getPrdtCode());
HPSC004.setPrdtName(HPSC002.getPrdtName()); HPSC004.setPrdtName(dbSc002Child.getPrdtName());
HPSC004.setSpec(HPSC002.getSpec()); HPSC004.setSpec(dbSc002Child.getSpec());
HPSC004.setLength(HPSC002.getLength()); HPSC004.setLength(dbSc002Child.getLength());
HPSC004.setWidth(HPSC002.getWidth()); HPSC004.setWidth(dbSc002Child.getWidth());
HPSC004.setThick(HPSC002.getThick()); HPSC004.setThick(dbSc002Child.getThick());
HPSC004.setRemark(HPSC002.getRemark()); HPSC004.setRemark(dbSc002Child.getRemark());
HPSC004.setNum(HPSC002.getNum()); HPSC004.setNum(dbSc002Child.getNum());
HPSC004.setUnitWt(HPSC002.getUnitWt()); HPSC004.setUnitWt(dbSc002Child.getUnitWt());
HPSC004.setTotalWt(HPSC002.getTotalWt()); HPSC004.setTotalWt(dbSc002Child.getTotalWt());
HPSC004.setFilePath1(HPSC002.getId().toString()); HPSC004.setFilePath1(dbSc002Child.getId().toString());
HPSC004.setPlanCommentDate(""); HPSC004.setPlanCommentDate("");
HPSC004.setPlanCompletionDate(""); HPSC004.setPlanCompletionDate("");
HPSC004.setActualCompletionNum(NumberUtils.toBigDecimal(0.00)); HPSC004.setActualCompletionNum(NumberUtils.toBigDecimal(0.00));
HPSC004.setActualCompletionUnitWt(NumberUtils.toBigDecimal(0.00)); HPSC004.setActualCompletionUnitWt(NumberUtils.toBigDecimal(0.00));
HPSC004.setActualCompletionDate(""); HPSC004.setActualCompletionDate("");
HPSC004.setDelStatus(1); HPSC004.setDelStatus(0);
DaoUtils.insert("HPSC004.insert", HPSC004.toMap()); DaoUtils.insert("HPSC004.insert", HPSC004.toMap());
} }
} }
......
...@@ -227,7 +227,7 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -227,7 +227,7 @@ public class ServiceHPSC003 extends ServiceBase {
for (int i = 0; i < list.size(); i ++) { for (int i = 0; i < list.size(); i ++) {
HPSC004 HPSC004 = (HPSC004) list.get(i); HPSC004 HPSC004 = (HPSC004) list.get(i);
HPSC005 HPSC005 = new HPSC005(); HPSC005 HPSC005 = new HPSC005();
String SCDD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC003_PROD_NO); String SCDD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC005_PROD_NO);
HPSC005.setProjCode(HPSC003.getProjCode()); HPSC005.setProjCode(HPSC003.getProjCode());
HPSC005.setProjName(HPSC003.getProjName()); HPSC005.setProjName(HPSC003.getProjName());
HPSC005.setProductionOrderNo(SCDD); HPSC005.setProductionOrderNo(SCDD);
......
...@@ -110,7 +110,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -110,7 +110,7 @@ public class ServiceHPSC005A extends ServiceBase {
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
// 刷新主订单信息 // 刷新主订单信息
inInfo = this.refreshOrderInfo(inInfo); inInfo = this.refreshOrderInfo(inInfo, prodOrderNo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据操作成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据操作成功!");
} catch (Exception e) { } catch (Exception e) {
...@@ -167,6 +167,8 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -167,6 +167,8 @@ public class ServiceHPSC005A extends ServiceBase {
*/ */
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail");
String prodOrderNo = MapUtils.getString(detailMap, "productionOrderNo");
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPSC005A fSc005a = new HPSC005A(); HPSC005A fSc005a = new HPSC005A();
...@@ -181,7 +183,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -181,7 +183,7 @@ public class ServiceHPSC005A extends ServiceBase {
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
// 刷新主订单信息 // 刷新主订单信息
inInfo = this.refreshOrderInfo(inInfo); inInfo = this.refreshOrderInfo(inInfo, prodOrderNo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) { } catch (Exception e) {
...@@ -196,12 +198,9 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -196,12 +198,9 @@ public class ServiceHPSC005A extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
private EiInfo refreshOrderInfo(EiInfo inInfo) { private EiInfo refreshOrderInfo(EiInfo inInfo, String prodOrderNo) {
Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail");
String prodOrderNo = MapUtils.getString(detailMap, "productionOrderNo");
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo); HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
inInfo.getBlock("detail").getRows().clear(); inInfo.addBlock("detail").addRow(dbSc005);
inInfo.getBlock("detail").addRow(dbSc005);
return inInfo; return inInfo;
} }
......
...@@ -229,6 +229,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -229,6 +229,7 @@ public class ServiceHPSC006 extends ServiceBase {
HPSC006.setId(NumberUtils.toLong(id[i])); HPSC006.setId(NumberUtils.toLong(id[i]));
HPSC006.setStatus(1); HPSC006.setStatus(1);
HPSC006.setOrgNo(HPPZ011.getGroupCode()); HPSC006.setOrgNo(HPPZ011.getGroupCode());
HPSC006.setOrgName(HPPZ011.getGroupName());
HPSC006.setFactoryCode(HPPZ011.getFactoryCode()); HPSC006.setFactoryCode(HPPZ011.getFactoryCode());
HPSC006.setFactoryName(HPPZ011.getFactoryName()); HPSC006.setFactoryName(HPPZ011.getFactoryName());
DaoUtils.update("HPSC006.updateAssign", HPSC006.toMap()); DaoUtils.update("HPSC006.updateAssign", HPSC006.toMap());
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.sc.domain.HPSC007;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
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.iplat4j.core.service.soa.XLocalManager;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.*;
/**
*
*/
public class ServiceHPSC007 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HPSC007.query", new HPSC007());
Map map = new HashMap();
map.put("companyCode", UserSessionUtils.getCompanyCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), map,true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPSC007.query", new HPSC007());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
HPSC007 HPSC007 = new HPSC007();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC007.fromMap(map);
DaoUtils.insert("HPSC007.insert",HPSC007);
}
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 {
HPSC007 HPSC007 = new HPSC007();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC007.fromMap(map);
DaoUtils.update("HPSC007.update",HPSC007);
}
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) {
HPSC007 HPSC007 = new HPSC007();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC007.fromMap(map);
this.dao.delete("HPSC007.delete", HPSC007.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;
}
}
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NO ELSE A.ORG_NO END) AS "orgNo", (CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NO ELSE A.ORG_NO END) AS "orgNo",
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NAME ELSE A.ORG_NAME END) AS "orgName" (CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NAME ELSE A.ORG_NAME END) AS "orgName"
FROM HPJX.T_HPSC005 A FROM HPJX.T_HPSC005 A
LEFT JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PRODUCTION_ORDER_NO LEFT JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PROD_ORDER_NO
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode# A.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
B.FACTORY_CODE as "factoryCode", <!-- 厂区编码 --> B.FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
B.FACTORY_NAME as "factoryName", <!-- 厂区名称 --> B.FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
B.ORG_NO as "orgNo", B.ORG_NO as "orgNo",
B.ORG_NAME as "orgName" B.ORG_NAME as "orgName",
C.PROD_TASK_NO as "zlprodTaskNo"
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -112,6 +113,9 @@ ...@@ -112,6 +113,9 @@
<include refid="column"/> <include refid="column"/>
FROM HPJX.T_HPSC005 A FROM HPJX.T_HPSC005 A
INNER JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PROD_ORDER_NO INNER JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PROD_ORDER_NO
LEFT JOIN ( SELECT
DISTINCT PROD_TASK_NO
FROM HPJX.T_HPZL001 WHERE 1=1 AND DELETE_FLAG = 0 AND STATUS = 0) C ON B.PROD_TASK_NO = C.PROD_TASK_NO
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
......
...@@ -50,12 +50,14 @@ ...@@ -50,12 +50,14 @@
INVENT_WIDTH as "inventWidth", <!-- 物料-宽 --> INVENT_WIDTH as "inventWidth", <!-- 物料-宽 -->
INVENT_THICK as "inventThick", <!-- 物料-厚 --> INVENT_THICK as "inventThick", <!-- 物料-厚 -->
INVENT_SPEC as "inventSpec", <!-- 物料规格 --> INVENT_SPEC as "inventSpec", <!-- 物料规格 -->
MATERIAL as "material",
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 --> PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
NUM as "num", <!-- 计划数量 --> NUM as "num", <!-- 计划数量 -->
UNIT_WT as "unitWt", <!-- 计划单重 --> UNIT_WT as "unitWt", <!-- 计划单重 -->
TOTAL_WT as "totalWt", <!-- 计划重量 --> TOTAL_WT as "totalWt", <!-- 计划重量 -->
ACTUAL_COMPLETION_DATE as "actualCompletionDate", <!-- 实际完工日期 --> ACTUAL_COMPLETION_DATE as "actualCompletionDate", <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM as "actualCompletionNum", <!-- 实际完工数量 --> ACTUAL_COMPLETION_NUM as "actualCompletionNum", <!-- 实际完工数量 -->
ACTUAL_COMPLETION_TOTAL_WT as "actualCompletionTotalWt",
STATUS as "status", <!-- 状态 0-计划中,1-生产中,2-已完成 --> STATUS as "status", <!-- 状态 0-计划中,1-生产中,2-已完成 -->
ORG_NO as "orgNo", <!-- 生产组编码 --> ORG_NO as "orgNo", <!-- 生产组编码 -->
ORG_NAME as "orgName", <!-- 生产组名称 --> ORG_NAME as "orgName", <!-- 生产组名称 -->
...@@ -108,6 +110,9 @@ ...@@ -108,6 +110,9 @@
<isNotEmpty prepend=" AND " property="inventSpec"> <isNotEmpty prepend=" AND " property="inventSpec">
INVENT_SPEC = #inventSpec# INVENT_SPEC = #inventSpec#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate"> <isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate# PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty> </isNotEmpty>
...@@ -214,12 +219,14 @@ ...@@ -214,12 +219,14 @@
INVENT_WIDTH, <!-- 物料-宽 --> INVENT_WIDTH, <!-- 物料-宽 -->
INVENT_THICK, <!-- 物料-厚 --> INVENT_THICK, <!-- 物料-厚 -->
INVENT_SPEC, <!-- 物料规格 --> INVENT_SPEC, <!-- 物料规格 -->
MATERIAL,
PLAN_COMPLETION_DATE, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE, <!-- 计划完成日期 -->
NUM, <!-- 计划数量 --> NUM, <!-- 计划数量 -->
UNIT_WT, <!-- 计划单重 --> UNIT_WT, <!-- 计划单重 -->
TOTAL_WT, <!-- 计划重量 --> TOTAL_WT, <!-- 计划重量 -->
ACTUAL_COMPLETION_DATE, <!-- 实际完工日期 --> ACTUAL_COMPLETION_DATE, <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM, <!-- 实际完工数量 --> ACTUAL_COMPLETION_NUM, <!-- 实际完工数量 -->
ACTUAL_COMPLETION_TOTAL_WT,
STATUS, <!-- 状态 0-计划中,1-生产中,2-已完成 --> STATUS, <!-- 状态 0-计划中,1-生产中,2-已完成 -->
ORG_NO, <!-- 生产组编码 --> ORG_NO, <!-- 生产组编码 -->
ORG_NAME, <!-- 生产组名称 --> ORG_NAME, <!-- 生产组名称 -->
...@@ -234,7 +241,11 @@ ...@@ -234,7 +241,11 @@
FILE_PATH1, <!-- 文件地址1 --> FILE_PATH1, <!-- 文件地址1 -->
INVENT_RECORD_ID <!-- 存货档案ID --> INVENT_RECORD_ID <!-- 存货档案ID -->
) )
VALUES (#companyCode#, #projCode#, #projName#, #productionOrderNo#, #inventType#, #inventCode#, #inventName#, #inventLength#, #inventWidth#, #inventThick#, #inventSpec#, #planCompletionDate#, #num#, #unitWt#, #totalWt#, #actualCompletionDate#, #actualCompletionNum#, #status#, #orgNo#, #orgName#, #factoryCode#, #factoryName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #inventRecordId#) VALUES (#companyCode#, #projCode#, #projName#, #productionOrderNo#, #inventType#, #inventCode#,
#inventName#, #inventLength#, #inventWidth#, #inventThick#, #inventSpec#, #material#, #planCompletionDate#,
#num#, #unitWt#, #totalWt#, #actualCompletionDate#, #actualCompletionNum#, #actualCompletionTotalWt#,#status#, #orgNo#,
#orgName#, #factoryCode#, #factoryName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#,
#depCode#, #remark#, #filePath1#, #inventRecordId#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -256,12 +267,14 @@ ...@@ -256,12 +267,14 @@
INVENT_WIDTH = #inventWidth#, <!-- 物料-宽 --> INVENT_WIDTH = #inventWidth#, <!-- 物料-宽 -->
INVENT_THICK = #inventThick#, <!-- 物料-厚 --> INVENT_THICK = #inventThick#, <!-- 物料-厚 -->
INVENT_SPEC = #inventSpec#, <!-- 物料规格 --> INVENT_SPEC = #inventSpec#, <!-- 物料规格 -->
MATERIAL = #material#,
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
NUM = #num#, <!-- 计划数量 --> NUM = #num#, <!-- 计划数量 -->
UNIT_WT = #unitWt#, <!-- 计划单重 --> UNIT_WT = #unitWt#, <!-- 计划单重 -->
TOTAL_WT = #totalWt#, <!-- 计划重量 --> TOTAL_WT = #totalWt#, <!-- 计划重量 -->
ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 --> ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 --> ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 -->
ACTUAL_COMPLETION_TOTAL_WT = #actualCompletionTotalWt#,
STATUS = #status#, <!-- 状态 0-计划中,1-生产中,2-已完成 --> STATUS = #status#, <!-- 状态 0-计划中,1-生产中,2-已完成 -->
ORG_NO = #orgNo#, <!-- 生产组编码 --> ORG_NO = #orgNo#, <!-- 生产组编码 -->
ORG_NAME = #orgName#, <!-- 生产组名称 --> ORG_NAME = #orgName#, <!-- 生产组名称 -->
......
<?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-06 15:50:11
Version : 1.0
schema : hpjx
tableName : T_HPSC007
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
HPSC006_ID VARCHAR,
ACTUAL_COMPLETION_DATE VARCHAR,
ACTUAL_COMPLETION_NUM DECIMAL,
ACTUAL_COMPLETION_TOTAL_WT DECIMAL,
USER_ID VARCHAR,
USER_NAME VARCHAR,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR,
DEP_CODE VARCHAR,
REMARK VARCHAR
-->
<sqlMap namespace="HPSC007">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="hpsc006Id">
HPSC006_ID = #hpsc006Id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionDate">
ACTUAL_COMPLETION_DATE = #actualCompletionDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionNum">
ACTUAL_COMPLETION_NUM = #actualCompletionNum#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionTotalWt">
ACTUAL_COMPLETION_TOTAL_WT = #actualCompletionTotalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userId">
USER_ID = #userId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userName">
USER_NAME = #userName#
</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>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC007">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
HPSC006_ID as "hpsc006Id", <!-- 生产下料ID -->
ACTUAL_COMPLETION_DATE as "actualCompletionDate", <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM as "actualCompletionNum", <!-- 实际完工数量 -->
ACTUAL_COMPLETION_TOTAL_WT as "actualCompletionTotalWt", <!-- 实际完工重量 -->
USER_ID as "userId", <!-- 完成人ID -->
USER_NAME as "userName", <!-- 完成人姓名 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark" <!-- 备注 -->
FROM ${hpjxSchema}.T_HPSC007 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_HPSC007 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="hpsc006Id">
HPSC006_ID = #hpsc006Id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionDate">
ACTUAL_COMPLETION_DATE = #actualCompletionDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionNum">
ACTUAL_COMPLETION_NUM = #actualCompletionNum#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionTotalWt">
ACTUAL_COMPLETION_TOTAL_WT = #actualCompletionTotalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userId">
USER_ID = #userId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userName">
USER_NAME = #userName#
</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>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC007 (ID,
COMPANY_CODE, <!-- 企业编码 预留 -->
HPSC006_ID, <!-- 生产下料ID -->
ACTUAL_COMPLETION_DATE, <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM, <!-- 实际完工数量 -->
ACTUAL_COMPLETION_TOTAL_WT, <!-- 实际完工重量 -->
USER_ID, <!-- 完成人ID -->
USER_NAME, <!-- 完成人姓名 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE, <!-- 部门编码 -->
REMARK <!-- 备注 -->
)
VALUES (#id#, #companyCode#, #hpsc006Id#, #actualCompletionDate#, #actualCompletionNum#, #actualCompletionTotalWt#, #userId#, #userName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPSC007 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPSC007
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
HPSC006_ID = #hpsc006Id#, <!-- 生产下料ID -->
ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 -->
ACTUAL_COMPLETION_TOTAL_WT = #actualCompletionTotalWt#, <!-- 实际完工重量 -->
USER_ID = #userId#, <!-- 完成人ID -->
USER_NAME = #userName#, <!-- 完成人姓名 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
REMARK = #remark# <!-- 备注 -->
WHERE
ID = #id#
</update>
</sqlMap>
...@@ -10,6 +10,7 @@ import com.baosight.hpjx.hp.kc.domain.HPKC010; ...@@ -10,6 +10,7 @@ import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.hp.pz.domain.HPPZ004; import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.sc.domain.HPSC001; import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.sc.domain.HPSC002; import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004; import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A; import com.baosight.hpjx.hp.sc.domain.HPSC005A;
...@@ -146,6 +147,30 @@ public class HPSCTools { ...@@ -146,6 +147,30 @@ public class HPSCTools {
} }
/** /**
* HPSC003公共DAO定义
*
* @author:songx
* @date:2024/2/4,10:17
*/
public static class HpSc003 {
/**
* 查询
*
* @param id
* @return
*/
public static HPSC003 get(Long id) {
AssertUtils.isNull(id, "部件编码不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HPSC003> results = DaoBase.getInstance().query(HPSC003.QUERY, queryMap);
AssertUtils.isNull(results, String.format("物料ID[%s]信息不存在", id));
return results.get(0);
}
}
/**
* HPSC005公共DAO定义 * HPSC005公共DAO定义
* *
* @author:songx * @author:songx
...@@ -190,7 +215,7 @@ public class HPSCTools { ...@@ -190,7 +215,7 @@ public class HPSCTools {
* @return * @return
*/ */
public static HPSC004 get(String prodOrderNo) { public static HPSC004 get(String prodOrderNo) {
AssertUtils.isNull(prodOrderNo, "生产订单号不能为空"); AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("productionOrderNo", prodOrderNo); queryMap.put("productionOrderNo", prodOrderNo);
List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap); List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap);
...@@ -305,7 +330,7 @@ public class HPSCTools { ...@@ -305,7 +330,7 @@ public class HPSCTools {
* @return * @return
*/ */
public static HPSC005 get(String prodOrderNo) { public static HPSC005 get(String prodOrderNo) {
AssertUtils.isNull(prodOrderNo, "生产订单号不能为空"); AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("productionOrderNo", prodOrderNo); queryMap.put("productionOrderNo", prodOrderNo);
List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap); List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap);
......
...@@ -17,6 +17,7 @@ $(function () { ...@@ -17,6 +17,7 @@ $(function () {
onSuccess: function(response){ onSuccess: function(response){
$('#mrsj').empty(); $('#mrsj').empty();
var mrsj = response.get('mrsj'); var mrsj = response.get('mrsj');
var scyb = response.get('scyb');
$.each(mrsj, function(index, item) { $.each(mrsj, function(index, item) {
str = str =
'<tr>' + '<tr>' +
...@@ -25,7 +26,7 @@ $(function () { ...@@ -25,7 +26,7 @@ $(function () {
'</tr>'; '</tr>';
$('#mrsj').append(str); $('#mrsj').append(str);
}) })
buildOption("scrb"); buildOption("scrb",scyb);
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
}, },
// 服务调用失败后的回调函数 onFail // 服务调用失败后的回调函数 onFail
...@@ -67,7 +68,21 @@ function check(id, auditStatus) { ...@@ -67,7 +68,21 @@ function check(id, auditStatus) {
); );
} }
function buildOption(vid){ function buildOption(vid,data){
var x_data = [];
var y_data1 = [];
var y_data2 = [];
var y_data3 = [];
$.each(data, function(index, item) {
if(item.INDCODE == 'sccl'){
x_data.push(item.X);
y_data1.push(item.VAULE);
}else if(item.INDCODE == 'scrs'){
y_data2.push(item.VAULE);
}else if(item.INDCODE == 'rjcl'){
y_data3.push(item.VAULE);
}
})
var myChart = echarts.init(document.getElementById(vid)); var myChart = echarts.init(document.getElementById(vid));
var colors = ['#5470C6', '#91CC75', '#EE6666']; var colors = ['#5470C6', '#91CC75', '#EE6666'];
var option = { var option = {
...@@ -90,7 +105,7 @@ function buildOption(vid){ ...@@ -90,7 +105,7 @@ function buildOption(vid){
xAxis: { xAxis: {
type: 'category', type: 'category',
//boundaryGap: false, //boundaryGap: false,
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] data: x_data/*['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']*/
}, },
yAxis: [ yAxis: [
{ {
...@@ -111,7 +126,7 @@ function buildOption(vid){ ...@@ -111,7 +126,7 @@ function buildOption(vid){
color: '#4874CB', color: '#4874CB',
yAxisIndex: 0, yAxisIndex: 0,
barWidth: 15, barWidth: 15,
data: [120, 200, 150, 80, 70, 110, 130,120, 200, 150, 80, 70] data: y_data1/*[120, 200, 150, 80, 70, 110, 130,120, 200, 150, 80, 70]*/
}, },
{ {
name: '生产人数(吨)', name: '生产人数(吨)',
...@@ -119,14 +134,14 @@ function buildOption(vid){ ...@@ -119,14 +134,14 @@ function buildOption(vid){
color: '#EE822F', color: '#EE822F',
yAxisIndex: 0, yAxisIndex: 0,
barWidth: 15, barWidth: 15,
data: [130, 120, 200, 160, 80, 70, 140,130, 120, 200, 160, 80] data: y_data2/*[130, 120, 200, 160, 80, 70, 140,130, 120, 200, 160, 80]*/
}, },
{ {
name: '人均产量(kg)', name: '人均产量(kg)',
type: 'line', type: 'line',
color:'#F2BA03', color:'#F2BA03',
yAxisIndex: 1, // 指定该系列在y轴上的位置,默认是0,可选为:0 | 1 | 2 | ... | n (正整数) yAxisIndex: 1, // 指定该系列在y轴上的位置,默认是0,可选为:0 | 1 | 2 | ... | n (正整数)
data: [130, 120, 200, 160, 80, 70, 140,130, 120, 200, 160, 80] data: y_data3/*[130, 120, 200, 160, 80, 70, 140,130, 120, 200, 160, 80]*/
} }
] ]
}; };
......
...@@ -42,9 +42,14 @@ let select = function () { ...@@ -42,9 +42,14 @@ let select = function () {
return; return;
} }
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
let whCode = rows[i]['whCode'];
let applyNum = rows[i]['applyNum']; let applyNum = rows[i]['applyNum'];
let num = rows[i]['num']; let num = rows[i]['num'];
let completeNum = rows[i]['completeNum']; let completeNum = rows[i]['completeNum'];
if (isBlank(whCode)) {
message("第" + (i + 1) + "行请选择仓库名称");
return;
}
if (isBlank(applyNum) || !isNumber(applyNum) || !(applyNum > 0)) { if (isBlank(applyNum) || !isNumber(applyNum) || !(applyNum > 0)) {
message("第" + (i + 1) + "行申请数量必须大于0"); message("第" + (i + 1) + "行申请数量必须大于0");
return; return;
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="生产订单ID" enable="false" width="90" align="center" hidden="true"/> <EF:EFColumn ename="id" cname="生产订单ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="childId" cname="生产任务ID" enable="false" width="90" align="center" hidden="true"/> <EF:EFColumn ename="childId" cname="生产任务ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partName" cname="零部件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="partName" cname="零部件名称" enable="false" width="120" align="center"/>
...@@ -42,12 +41,13 @@ ...@@ -42,12 +41,13 @@
<EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" width="150" align="center"/> <EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" width="150" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/> <EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零部件编码" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="partCode" cname="零部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="150" hidden="true"/> <EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="150" hidden="true"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="150" hidden="true"/> <EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="150" hidden="true"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
...@@ -15,12 +15,8 @@ ...@@ -15,12 +15,8 @@
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput cname="部件编码" ename="inventCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="部件名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零部件编码" ename="subInventCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零部件名称" ename="subInventName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="零部件名称" ename="subInventName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFSelect cname="是否打印" ename="isPrint" blockId="inqu_status" row="0" colWidth="3" defaultValue=""> <EF:EFSelect cname="是否打印" ename="isPrint" blockId="inqu_status" row="0" colWidth="3" defaultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.isPrint"/> <EF:EFCodeOption codeName="hpjx.hpjx.isPrint"/>
...@@ -29,6 +25,8 @@ ...@@ -29,6 +25,8 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/> <EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect> </EF:EFSelect>
</div>
<div class="row">
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" startName="createdDateFrom" endName="createdDateTo" <EF:EFDateSpan startCname="创建日期(从)" endCname="至" startName="createdDateFrom" endName="createdDateTo"
blockId="inqu_status" row="0" role="date" format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" blockId="inqu_status" row="0" role="date" format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8"
endRatio="4:8" readonly="true"> endRatio="4:8" readonly="true">
...@@ -61,11 +59,11 @@ ...@@ -61,11 +59,11 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="100" align="center"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="100" align="center"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/> <EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="inventCode" cname="部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subInventCode" cname="零部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="prodNo" cname="生产订单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="prodNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="saleNo" cname="销售单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="saleNo" cname="销售单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="oldSaleNo" cname="原销售单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="oldSaleNo" cname="原销售单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="inventCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="subInventCode" cname="零部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="120" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="120" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
......
...@@ -30,10 +30,8 @@ ...@@ -30,10 +30,8 @@
<EF:EFColumn ename="subInventName" cname="零部件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="subInventName" cname="零部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N3}" required="true"/> <EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="applyRemark" cname="说明" width="150" editType="textarea" copy="true"/> <EF:EFColumn ename="applyRemark" cname="说明" width="150" editType="textarea" copy="true"/>
<EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N3}" <EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N3}"/>
sumType="all"/> <EF:EFColumn ename="weight" cname="库存重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="库存重量" enable="false" width="120" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="whCode" cname="仓库编码" enable="false" width="140" align="center"/> <EF:EFColumn ename="whCode" cname="仓库编码" enable="false" width="140" align="center"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/> <EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="otherEnterNo" cname="入库单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="otherEnterNo" cname="入库单号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd" <EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd"
parseFormats="['yyyyMMdd']" width="90" align="center" required="true" readonly="true"/> parseFormats="['yyyyMMdd']" width="90" align="center" required="true" readonly="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true" readonly="true"> <EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true" readonly="true">
......
...@@ -5,7 +5,7 @@ $(function () { ...@@ -5,7 +5,7 @@ $(function () {
field: "operator", field: "operator",
template: function (item) { template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM06.jsp?docId=' + item.filePath + 'href="' + IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM06.jsp?docId=' + item.docId
+ '" >附件下载</a>'; + '" >附件下载</a>';
return template; return template;
} }
......
...@@ -10,11 +10,17 @@ $(function () { ...@@ -10,11 +10,17 @@ $(function () {
field: "operator", field: "operator",
template: function (item) { template: function (item) {
let filePath1 = item.filePath1; let filePath1 = item.filePath1;
let zlprodTaskNo = item.zlprodTaskNo;
let prodTaskNo = item.prodTaskNo;
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>&nbsp;'; + 'onclick="showUploadFile(' + filePath1 + ')" >附件</a>&nbsp;';
} }
if (zlprodTaskNo) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showZlDetail(\'' + prodTaskNo + '\')" >质检单</a>&nbsp;';
}
return template return template
} }
}] }]
...@@ -55,3 +61,7 @@ function showUploadFile(id) { ...@@ -55,3 +61,7 @@ function showUploadFile(id) {
height: "80%", height: "80%",
}); });
} }
function showZlDetail(prodTaskNo) {
window.open("HPZL001?methodName=initLoad&inqu_status-0-prodTaskNo=" + prodTaskNo)
}
\ No newline at end of file
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<EF:EFGrid blockId="result" autoDraw="override"> <EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="childId" cname="主键" hidden="true"/> <EF:EFColumn ename="childId" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="110" align="center"/> <EF:EFColumn ename="operator" cname="操作" enable="false" width="150" align="center"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/> <EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="140" align="center"/> <EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/> <EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center"/> <EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center"/> <EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
...@@ -8,7 +8,7 @@ $(function () { ...@@ -8,7 +8,7 @@ $(function () {
$("#ASSIGN").on("click", function () { $("#ASSIGN").on("click", function () {
//重置全局变量 //重置全局变量
ids = []; ids = [];
let rows = resultGrid.getCheckedRows() let rows = detailGrid.getCheckedRows()
if (rows.length < 1) { if (rows.length < 1) {
message("请至少选择一条需要分派的数据"); message("请至少选择一条需要分派的数据");
return; return;
......
...@@ -29,33 +29,18 @@ ...@@ -29,33 +29,18 @@
<EF:EFRegion id="result" title="生产任务集"> <EF:EFRegion id="result" title="生产任务集">
<EF:EFGrid blockId="result" autoDraw="no"> <EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目号" /> <EF:EFColumn enable="false" ename="projCode" cname="项目号" />
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/> <EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFColumn enable="false" ename="productionOrderNo" cname="生产订单号"/> <EF:EFColumn enable="false" ename="productionOrderNo" cname="生产订单号"/>
<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="部件编码"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称"/> <EF:EFColumn enable="false" ename="prdtName" cname="部件名称"/>
<EF:EFColumn enable="false" ename="remark" cname="部件备注"/>
<EF:EFComboColumn ename="partType" cname="零件类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="partCode" cname="零件编码"/>
<EF:EFColumn enable="false" ename="partName" cname="零件名称"/> <EF:EFColumn enable="false" ename="partName" cname="零件名称"/>
<EF:EFColumn enable="false" ename="partSpec" cname="零件规格"/>
<EF:EFColumn enable="false" ename="remark1" cname="零件备注"/>
<EF:EFColumn enable="false" ename="planCompletionDate" cname="计划完成日期"/> <EF:EFColumn enable="false" ename="planCompletionDate" cname="计划完成日期"/>
<EF:EFColumn enable="false" ename="num" cname="计划数量"/>
<EF:EFColumn enable="false" ename="totalWt" cname="计划重量"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/> <EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="detail" title="料清单"> <EF:EFRegion id="detail" title="料清单">
<EF:EFInput ename="projCode" type="hidden"/> <EF:EFInput ename="projCode" type="hidden"/>
<EF:EFInput ename="projName" type="hidden"/> <EF:EFInput ename="projName" type="hidden"/>
<EF:EFInput ename="productionOrderNo" type="hidden"/> <EF:EFInput ename="productionOrderNo" type="hidden"/>
...@@ -75,6 +60,7 @@ ...@@ -75,6 +60,7 @@
<EF:EFColumn ename="inventLength" cname="长" format="{0:N3}"/> <EF:EFColumn ename="inventLength" cname="长" format="{0:N3}"/>
<EF:EFColumn ename="inventWidth" cname="宽" format="{0:N3}"/> <EF:EFColumn ename="inventWidth" cname="宽" format="{0:N3}"/>
<EF:EFColumn ename="inventThick" cname="厚" format="{0:N3}"/> <EF:EFColumn ename="inventThick" cname="厚" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" />
<EF:EFColumn ename="remark" cname="备注" /> <EF:EFColumn ename="remark" cname="备注" />
<EF:EFColumn ename="num" cname="计划数量"/> <EF:EFColumn ename="num" cname="计划数量"/>
<EF:EFColumn ename="unitWt" format="{0:N3}" cname="计划单重"/> <EF:EFColumn ename="unitWt" format="{0:N3}" cname="计划单重"/>
...@@ -83,6 +69,7 @@ ...@@ -83,6 +69,7 @@
<EF:EFColumn ename="actualCompletionDate" cname="实际完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150" <EF:EFColumn ename="actualCompletionDate" cname="实际完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
enable="false"/> enable="false"/>
<EF:EFColumn enable="false" ename="actualCompletionNum" cname="实际完工数量" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionNum" cname="实际完工数量" readonly="true"/>
<EF:EFColumn enable="false" ename="actualCompletionUnitWt" cname="实际完工重量" readonly="true"/>
<EF:EFComboColumn enable="false" align="center" ename="status" cname="状态"> <EF:EFComboColumn enable="false" align="center" ename="status" cname="状态">
<EF:EFOption label="计划中" value="0"/> <EF:EFOption label="计划中" value="0"/>
<EF:EFOption label="生产中" value="1"/> <EF:EFOption label="生产中" value="1"/>
......
$(function () {
IPLATUI.EFGrid = {
"result" : {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "factoryName",
attributes: {
class: "i-input-readonly"
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
e.preventDefault();
deleteFunc();
}
}
}
$("#QUERY").on("click", query);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC005A", "save", true);
}
});
}
/**
* 删除
*/
let deleteFunc = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC005A", "delete", true);
}
});
}
<!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}"/>
<EF:EFPage title="下料登记">
<EF:EFRegion id="inqu" title="订单详情">
<div class="row">
<EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partName" cname="零部件名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-inventName" cname="材料名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="计划数量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-unitWt" cname="单重" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="计划重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-actualCompletionNum" cname="完工数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-actualCompletionUnitWt" cname="完工重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-planCompletionDate" cname="计划完成日期" colWidth="4" readonly="true"/>
<EF:EFSelect ename="detail-0-status" cname="状态" colWidth="4" readonly="true">
<EF:EFOption label="下料中" value="0"/>
<EF:EFOption label="完工" value="1"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="actualCompletionDate" cname="完成日期" enable="false" hidden="true"/>
<EF:EFColumn ename="userId" cname="完成人" enable="false" align="center"/>
<EF:EFColumn ename="actualCompletionNum" cname="完成数量" format="{0:N3}" />
<EF:EFColumn ename="totalWt" cname="分派重量" enable="false" format="{0:N3}"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="处理状态" ename="status" blockId="inqu_status" row="0" colWidth="3"> <EF:EFSelect cname="处理状态" ename="status" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOption label="1-已处理" value="1"></EF:EFOption> <EF:EFOption label="已处理" value="1"></EF:EFOption>
<EF:EFOption label="0-未处理" value="0"></EF:EFOption> <EF:EFOption label="未处理" value="0"></EF:EFOption>
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
required="true"/> required="true"/>
<EF:EFColumn ename="checkNo" cname="检查单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="checkNo" cname="检查单号" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center"> <EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center">
<EF:EFOption label="1-已处理" value="1"></EF:EFOption> <EF:EFOption label="已处理" value="1"></EF:EFOption>
<EF:EFOption label="0-未处理" value="0"></EF:EFOption> <EF:EFOption label="未处理" value="0"></EF:EFOption>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="receiptDate" cname="单据日期" enable="false" width="120" align="center" editType="date" <EF:EFColumn ename="receiptDate" cname="单据日期" enable="false" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> 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