Commit 46c4433b by liuyang

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

 Conflicts:
	src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC003.xml
	src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC004.xml
parents 3be74e0c 68e5cd86
......@@ -101,8 +101,8 @@ public enum DdynamicEnum {
MAT_CODE_BLOCK_ID("mat_code_block_id","matCode","matCode","HPPZ007.queryMatCodeComboBox"),
/**
* 模块:存货编码
* 用途:存货编码下拉框
* 模块:用户
* 用途:用户下拉框
* 编写:yk
*/
USER_BLOCK_ID("user_block_id","loginName","userName","HPXSUser.queryComboBox"),
......@@ -133,6 +133,36 @@ public enum DdynamicEnum {
*/
PROJ_RECORD_BLOCK_ID("proj_record_block_id","projCode","projName","HPSC001.queryComboBox"),
/**
* 模块:部件档案
* 用途:项目档案下拉框
* 编写:wwl
*/
INVENT_RECORD_BLOCK_ID("invent_record_block_id","prdtCode","prdtName","HPSC003.queryInventComboBox"),
/**
* 模块:零部件档案
* 用途:项目档案下拉框
* 编写:wwl
*/
SUB_INVENT_RECORD_BLOCK_ID("sub_invent_record_block_id","prdtCode","prdtName","HPSC004.queryInventComboBox"),
/**
* 模块:生产组
* 用途:项目档案下拉框
* 编写:wwl
*/
ORG_PROD_BLOCK_ID("org_prod_block_id","orgNo","orgName","HPSC005.queryOrgComboBox"),
/**
* 模块:项目档案(生产中)
* 用途:项目档案下拉框
* 编写:wwl
*/
PROJ_PROD_BLOCK_ID("proj_prod_block_id","projCode","projName","HPSC005.queryProjComboBox"),
//------------------------------------用户管理-----------------------------------
/**
......
......@@ -9,12 +9,13 @@ import java.util.*;
* @Date 2024/1/10 14:29
*/
public enum InventTypeEnum {
MATERIAL(1,"原材料"),
RAW(1,"原料"),
CONSUMABLE(2,"耗材"),
SEMI_FINISHED_PRODUCT(3,"零部件"),
FINISHED_PRODUCT(4,"部件"),
WASTE(5,"废料"),
OTHER(6,"其他");
OTHER(6,"其他"),
MATERIAL(7,"材料");
private Integer code;
......
package com.baosight.hpjx.core.dao;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.xs.tools.HPXSUserTools;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.iplat4j.core.data.DaoEPBase;
......@@ -119,7 +119,7 @@ public class DaoUtils {
}
// 创建人部门编码
try {
BeanUtils.setProperty(bean, "depCode", HPXSUserTools.getOrgId());
BeanUtils.setProperty(bean, "depCode", HPXSTools.getOrgId());
} catch (Exception e) {
log.warn("写入创建人企业编码失败", e);
}
......@@ -175,7 +175,7 @@ public class DaoUtils {
}
// 创建人部门编码
try {
map.put("depCode", HPXSUserTools.getOrgId());
map.put("depCode", HPXSTools.getOrgId());
} catch (Exception e) {
log.warn("写入创建人企业编码失败", e);
}
......
package com.baosight.hpjx.core.security;
import com.baosight.hpjx.hp.xs.domain.User;
import com.baosight.hpjx.hp.xs.tools.HPXSUserTools;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
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.soa.XLocalManager;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang.StringUtils;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
......@@ -80,7 +79,7 @@ public class UserSessionUtils extends UserSession {
}
String depCode = MapUtils.getString(depMap, loginName);
if (depCode == null) {
depCode = HPXSUserTools.getOrgId();
depCode = HPXSTools.getOrgId();
depCode = depCode == null ? "" : depCode.trim();
depMap.put(loginName, depCode);
}
......
package com.baosight.hpjx.hp.bi.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:THPBI001.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-22 13:46:10 create
*/
public class HPBI001 extends DaoEPBase {
private static final long serialVersionUoctValue = 1L;
public static final String INDNAME = "indNmae"; /* 企业编码 预留*/
public static final String DAYVALUE = "dayValue"; /* 部门编码*/
public static final String MONVALUE = "monValue"; /* 供应商类型 1 国企 : 2 民营*/
public static final String YEARVALUE = "yearValue"; /* 供应商编码*/
public static final String JANVALUE = "janValue"; /* 供应商名称*/
public static final String FEBVALUE = "febValue"; /* 地址*/
public static final String MARVLAUE = "marValue"; /* 状态 0禁用 1启用*/
public static final String APRVALUE = "aprValue"; /* 创建人*/
public static final String MAYVALUE = "mayValue"; /* 创建人名称*/
public static final String JUNVALUE = "junValue"; /* 创建时间*/
public static final String JULVALUE = "julValue"; /* 更新人*/
public static final String AUGVALUE = "augValue"; /* 更新人名称*/
public static final String SEPVALUE = "sepValue"; /* 更新时间*/
public static final String OCTVALUE = "octValue";
public static final String NOVVALUE = "novValue"; /* 企业编码 预留*/
public static final String DECVALUE = "decValue"; /* 部门编码*/
public static final String COL_febValue = "febValue"; /* 地址*/
public static final String COL_marValue = "marValue"; /* 状态 0禁用 1启用*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String QUERY = "HPBI001.query";
public static final String COUNT = "HPBI001.count";
public static final String INSERT = "HPBI001.insert";
public static final String UPDATE = "HPBI001.update";
public static final String DELETE = "HPBI001.delete";
private String indNmae = " "; /* 企业编码 预留*/
private String dayValue = " "; /* 部门编码*/
private String monValue = " "; /* 供应商类型 1 国企 : 2 民营*/
private String yearValue = " "; /* 供应商编码*/
private String janValue = " "; /* 供应商名称*/
private String febValue = " "; /* 地址*/
private Integer marValue = 1; /* 状态 0禁用 1启用*/
private String aprValue = " "; /* 创建人*/
private String mayValue = " "; /* 创建人名称*/
private String junValue = " "; /* 创建时间*/
private String julValue = " "; /* 更新人*/
private String augValue = " "; /* 更新人名称*/
private String sepValue = " "; /* 更新时间*/
private String octValue = " ";
private String novValue = " ";
private String decValue = " ";
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(INDNAME);
eiColumn.setDescName("指标名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(DAYVALUE);
eiColumn.setDescName("日");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(MONVALUE);
eiColumn.setDescName("月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(YEARVALUE);
eiColumn.setDescName("年");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(JANVALUE);
eiColumn.setDescName("1月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FEBVALUE);
eiColumn.setDescName("2月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(MARVLAUE);
eiColumn.setDescName("3月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(APRVALUE);
eiColumn.setDescName("4月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(MAYVALUE);
eiColumn.setDescName("5月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(JUNVALUE);
eiColumn.setDescName("6月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(JULVALUE);
eiColumn.setDescName("7月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(AUGVALUE);
eiColumn.setDescName("8月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(SEPVALUE);
eiColumn.setDescName("9月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(OCTVALUE);
eiColumn.setDescName("10月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(NOVVALUE);
eiColumn.setDescName("11月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(DECVALUE);
eiColumn.setDescName("12月");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPBI001() {
initMetaData();
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getindNmae() {
return this.indNmae;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setindNmae(String companyCode) {
this.indNmae = companyCode;
}
/**
* get the dayValue - 部门编码.
* @return the dayValue
*/
public String getdayValue() {
return this.dayValue;
}
/**
* set the dayValue - 部门编码.
*
* @param dayValue - 部门编码
*/
public void setdayValue(String dayValue) {
this.dayValue = dayValue;
}
/**
* get the monValue - 供应商类型 1 国企 : 2 民营.
* @return the monValue
*/
public String getmonValue() {
return this.monValue;
}
/**
* set the monValue - 供应商类型 1 国企 : 2 民营.
*
* @param monValue - 供应商类型 1 国企 : 2 民营
*/
public void setmonValue(String monValue) {
this.monValue = monValue;
}
/**
* get the yearValue - 供应商编码.
* @return the yearValue
*/
public String getyearValue() {
return this.yearValue;
}
/**
* set the yearValue - 供应商编码.
*
* @param yearValue - 供应商编码
*/
public void setyearValue(String yearValue) {
this.yearValue = yearValue;
}
/**
* get the janValue - 供应商名称.
* @return the janValue
*/
public String getjanValue() {
return this.janValue;
}
/**
* set the janValue - 供应商名称.
*
* @param janValue - 供应商名称
*/
public void setjanValue(String janValue) {
this.janValue = janValue;
}
/**
* get the febValue - 地址.
* @return the febValue
*/
public String getfebValue() {
return this.febValue;
}
/**
* set the febValue - 地址.
*
* @param febValue - 地址
*/
public void setfebValue(String febValue) {
this.febValue = febValue;
}
/**
* get the marValue - 状态 0禁用 1启用.
* @return the marValue
*/
public Integer getmarValue() {
return this.marValue;
}
/**
* set the marValue - 状态 0禁用 1启用.
*
* @param marValue - 状态 0禁用 1启用
*/
public void setmarValue(Integer marValue) {
this.marValue = marValue;
}
/**
* get the aprValue - 创建人.
* @return the aprValue
*/
public String getaprValue() {
return this.aprValue;
}
/**
* set the aprValue - 创建人.
*
* @param aprValue - 创建人
*/
public void setaprValue(String aprValue) {
this.aprValue = aprValue;
}
/**
* get the mayValue - 创建人名称.
* @return the mayValue
*/
public String getmayValue() {
return this.mayValue;
}
/**
* set the mayValue - 创建人名称.
*
* @param mayValue - 创建人名称
*/
public void setmayValue(String mayValue) {
this.mayValue = mayValue;
}
/**
* get the junValue - 创建时间.
* @return the junValue
*/
public String getjunValue() {
return this.junValue;
}
/**
* set the junValue - 创建时间.
*
* @param junValue - 创建时间
*/
public void setjunValue(String junValue) {
this.junValue = junValue;
}
/**
* get the julValue - 更新人.
* @return the julValue
*/
public String getjulValue() {
return this.julValue;
}
/**
* set the julValue - 更新人.
*
* @param julValue - 更新人
*/
public void setjulValue(String julValue) {
this.julValue = julValue;
}
/**
* get the augValue - 更新人名称.
* @return the augValue
*/
public String getaugValue() {
return this.augValue;
}
/**
* set the augValue - 更新人名称.
*
* @param augValue - 更新人名称
*/
public void setaugValue(String augValue) {
this.augValue = augValue;
}
/**
* get the sepValue - 更新时间.
* @return the sepValue
*/
public String getsepValue() {
return this.sepValue;
}
/**
* set the sepValue - 更新时间.
*
* @param sepValue - 更新时间
*/
public void setsepValue(String sepValue) {
this.sepValue = sepValue;
}
/**
* get the octValue .
* @return the octValue
*/
public String getoctValue() {
return this.octValue;
}
/**
* set the octValue .
*
* @param octValue
*/
public void setoctValue(String octValue) {
this.octValue = octValue;
}
/**
* get the novValue .
* @return the novValue
*/
public String getnovValue() {
return this.novValue;
}
/**
* set the octValue .
*
* @param novValue
*/
public void setnovValue(String novValue) {
this.octValue = novValue;
}
/**
* get the decValue .
* @return the decValue
*/
public String getdecValue() {
return this.decValue;
}
/**
* set the octValue .
*
* @param decValue
*/
public void setdecValue(String decValue) {
this.octValue = decValue;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setindNmae(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(INDNAME)), indNmae));
setdayValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(DAYVALUE)), dayValue));
setmonValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(MONVALUE)), monValue));
setyearValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(YEARVALUE)), yearValue));
setjanValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(JANVALUE)), janValue));
setfebValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FEBVALUE)), febValue));
setmarValue(NumberUtils.toInteger(StringUtils.toString(map.get(MARVLAUE)), marValue));
setaprValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(APRVALUE)), aprValue));
setmayValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(MAYVALUE)), mayValue));
setjunValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(JUNVALUE)), junValue));
setjulValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(JULVALUE)), julValue));
setaugValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(AUGVALUE)), augValue));
setsepValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(SEPVALUE)), sepValue));
setoctValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(OCTVALUE)), octValue));
setnovValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(NOVVALUE)), novValue));
setdecValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(DECVALUE)), decValue));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(INDNAME, StringUtils.toString(indNmae, eiMetadata.getMeta(INDNAME)));
map.put(DAYVALUE, StringUtils.toString(dayValue, eiMetadata.getMeta(DAYVALUE)));
map.put(MONVALUE, StringUtils.toString(monValue, eiMetadata.getMeta(MONVALUE)));
map.put(YEARVALUE, StringUtils.toString(yearValue, eiMetadata.getMeta(YEARVALUE)));
map.put(JANVALUE, StringUtils.toString(janValue, eiMetadata.getMeta(JANVALUE)));
map.put(FEBVALUE, StringUtils.toString(febValue, eiMetadata.getMeta(FEBVALUE)));
map.put(MARVLAUE, StringUtils.toString(marValue, eiMetadata.getMeta(MARVLAUE)));
map.put(APRVALUE, StringUtils.toString(aprValue, eiMetadata.getMeta(APRVALUE)));
map.put(MAYVALUE, StringUtils.toString(mayValue, eiMetadata.getMeta(MAYVALUE)));
map.put(JUNVALUE, StringUtils.toString(junValue, eiMetadata.getMeta(JUNVALUE)));
map.put(JULVALUE, StringUtils.toString(julValue, eiMetadata.getMeta(JULVALUE)));
map.put(AUGVALUE, StringUtils.toString(augValue, eiMetadata.getMeta(AUGVALUE)));
map.put(SEPVALUE, StringUtils.toString(sepValue, eiMetadata.getMeta(SEPVALUE)));
map.put(OCTVALUE, StringUtils.toString(octValue, eiMetadata.getMeta(OCTVALUE)));
map.put(NOVVALUE, StringUtils.toString(novValue, eiMetadata.getMeta(NOVVALUE)));
map.put(DECVALUE, StringUtils.toString(decValue, eiMetadata.getMeta(DECVALUE)));
return map;
}
}
package com.baosight.hpjx.hp.bi.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.bi.domain.HPBI001;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.*;
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.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author wancheng
* @date 2024年02月01日 17:18
*/
public class ServiceHPBI001 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode()};
/**
* 画面初始化
*
* @param inInfo
* @return
*/
/* public EiInfo initLoad(EiInfo inInfo) {
return query(inInfo);
}*/
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
EiInfo outInfo = new EiInfo();
try {
Map params = new HashMap();
params.put("factory", inInfo.getCellStr(EiConstant.queryBlock, 0, "factory"));
params.put("date", inInfo.getCellStr(EiConstant.queryBlock, 0, "date"));
//汇总数据
outInfo = super.query(inInfo,"HPBI001.querySum",new HPBI001());
//每日数据
List mrsj= super.dao.query("HPBI001.queryDay", params);
outInfo.set("mrsj",mrsj);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return outInfo;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPBI001">
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz001 WHERE 1=1
<isNotEmpty prepend=" AND " property="factory">
FACTORY LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="date">
DATE = #date#
</isNotEmpty>
</select>
<select id="querySum" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.bi.domain.HPBI001">
SELECT
INDNAME AS "indNmae",
DAYVALUE AS "dayValue",
MONVALUE AS "monValue",
YEARVALUE AS "yearValue",
JANVALUE AS "janValue",
FEBVALUE AS "febValue",
MARVLAUE AS "marValue",
APRVALUE AS "aprValue",
MAYVALUE AS "mayValue",
JUNVALUE AS "junValue",
JULVALUE AS "julValue",
AUGVALUE AS "augValue",
SEPVALUE AS "sepValue",
OCTVALUE AS "octValue",
NOVVALUE AS "novValue",
DECVALUE AS "decValue"
FROM (
SELECT '生产产量(吨)' AS INDNAME,121 AS DAYVALUE,
12 AS MONVALUE, 12 AS YEARVALUE,
12 AS JANVALUE, 12 AS FEBVALUE,
12 AS MARVLAUE, 12 AS APRVALUE,
12 AS MAYVALUE, 12 AS JUNVALUE,
12 AS JULVALUE, 12 AS AUGVALUE,
12 AS SEPVALUE, 12 AS OCTVALUE,
12 AS NOVVALUE, 12 AS DECVALUE,
'黄陂' AS FACTORY,
'' AS DATE
FROM DUAL
UNION ALL
SELECT '生产人数(人)' AS INDNAME,123 AS DAYVALUE,
13 AS MONVALUE, 13 AS YEARVALUE,
13 AS JANVALUE, 13 AS FEBVALUE,
13 AS MARVLAUE, 13 AS APRVALUE,
13 AS MAYVALUE, 13 AS JUNVALUE,
13 AS JULVALUE, 13 AS AUGVALUE,
13 AS SEPVALUE, 13 AS OCTVALUE,
13 AS NOVVALUE, 13 AS DECVALUE,
'黄陂' AS FACTORY,
'' AS DATE
FROM DUAL
UNION ALL
SELECT '人均产量(kg)' AS INDNAME,'' AS DAYVALUE,
14 AS MONVALUE, 14 AS YEARVALUE,
14 AS JANVALUE, 14 AS FEBVALUE,
14 AS MARVLAUE, 14 AS APRVALUE,
14 AS MAYVALUE, 14 AS JUNVALUE,
14 AS JULVALUE, 14 AS AUGVALUE,
14 AS SEPVALUE, 14 AS OCTVALUE,
14 AS NOVVALUE, 14 AS DECVALUE,
'黄陂' AS FACTORY,
'' AS DATE
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">
INDNAME desc
</isEmpty>
</dynamic>
</select>
<select id="queryDay" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT
SERIES,
VALUE
FROM (
SELECT '工厂' AS SERIES,'黄陂' AS VALUE,NULL AS FACTORY,NULL AS DATE, 1 AS SORT FROM DUAL
UNION ALL
SELECT '生产项目' AS SERIES,CONCAT('横沥10墩底模、沪宁合空心墩') AS VALUE,NULL AS FACTORY,NULL AS DATE, 2 AS SORT FROM DUAL
UNION ALL
SELECT '生产产量' AS SERIES,'组拼 :14.730吨 综合 :15.220吨 加焊 :15.710吨' AS VALUE,NULL AS FACTORY,NULL AS DATE, 3 AS SORT FROM DUAL
UNION ALL
SELECT '生产人数' AS SERIES,'26人' AS VALUE,NULL AS FACTORY,NULL AS DATE, 4 AS SORT FROM DUAL
UNION ALL
SELECT '人均日产' AS SERIES,'585kg' AS VALUE,NULL AS FACTORY,NULL AS DATE, 5 AS SORT 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">
SORT asc
</isEmpty>
</dynamic>
</select>
</sqlMap>
\ No newline at end of file
......@@ -209,4 +209,16 @@ public class HPSqlConstant {
public static final String UPDATE_ASSIGN_NUM = "HPSC005.updateAssignNum";
}
/**
* 质量巡检单
*
* @author:songx
* @date:2024/2/2,14:23
*/
public class HPZL001 {
// 已处理
public static final String DO_PROCESS = "HPZL001.doProcess";
}
}
......@@ -44,7 +44,7 @@ public class HPKC001 extends DaoEPBase {
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String FIELD_AMOUNT = "amount"; /* 数量*/
public static final String FIELD_WEIGHT = "weight"; /* 重量*/
public static final String FIELD_REMARKS = "remarks"; /* 备注*/
public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String COL_ID = "ID"; /* 主键id*/
......@@ -66,7 +66,7 @@ public class HPKC001 extends DaoEPBase {
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/
public static final String COL_AMOUNT = "AMOUNT"; /* 数量*/
public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/
public static final String COL_REMARKS = "REMARKS"; /* 备注*/
public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String QUERY = "HPKC001.query";
......@@ -95,7 +95,7 @@ public class HPKC001 extends DaoEPBase {
private Long inventRecordId = new Long(0); /* 存货档案ID*/
private BigDecimal amount = new BigDecimal("0"); /* 数量*/
private BigDecimal weight = new BigDecimal("0"); /* 重量*/
private String remarks = " "; /* 备注*/
private String remark = " "; /* 备注*/
private Integer deleteFlag; /* 是否删除0.否1.是*/
/**
......@@ -191,7 +191,7 @@ public class HPKC001 extends DaoEPBase {
eiColumn.setDescName("重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARKS);
eiColumn = new EiColumn(FIELD_REMARK);
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
......@@ -531,20 +531,20 @@ public class HPKC001 extends DaoEPBase {
this.weight = weight;
}
/**
* get the remarks - 备注.
* @return the remarks
* get the remark - 备注.
* @return the remark
*/
public String getRemarks() {
return this.remarks;
public String getRemark() {
return this.remark;
}
/**
* set the remarks - 备注.
* set the remark - 备注.
*
* @param remarks - 备注
* @param remark - 备注
*/
public void setRemarks(String remarks) {
this.remarks = remarks;
public void setRemark(String remark) {
this.remark = remark;
}
/**
* get the deleteFlag - 是否删除0.否1.是.
......@@ -590,7 +590,7 @@ public class HPKC001 extends DaoEPBase {
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARKS)), remarks));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
}
......@@ -621,7 +621,7 @@ public class HPKC001 extends DaoEPBase {
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_REMARKS, StringUtils.toString(remarks, eiMetadata.getMeta(FIELD_REMARKS)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
return map;
......
......@@ -36,7 +36,7 @@ public class ServiceHPKC001 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode()};
/**
......
......@@ -32,7 +32,7 @@ import java.util.Map;
public class ServiceHPKC002 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode()};
/**
......
......@@ -36,7 +36,7 @@ import java.util.Map;
public class ServiceHPKC002A extends ServiceEPBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode()};
/**
......
package com.baosight.hpjx.hp.kc.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.hp.constant.HPConstant;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.hp.zl.tools.HPZLTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
......@@ -77,6 +82,18 @@ public class ServiceHPKC003 extends ServiceBase {
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据校验
for (Map resultRow : resultRows) {
HPKC003 fKc003 = new HPKC003();
fKc003.fromMap(resultRow);
// 校验是否存在巡检单
Map queryMap = new HashMap();
queryMap.put("prodNo", fKc003.getProductionOrderNo());
queryMap.put("status", CommonConstant.YesNo.NO_0);
List<HPZL001> dbZl001s = dao.query(HPZL001.QUERY, queryMap);
AssertUtils.isNotEmpty(dbZl001s, String.format("入库失败,生产订单号[%s]有未处理的巡检单,请先处理巡检单",
fKc003.getProductionOrderNo()));
}
// 数据写入
for (int i = 0; i < resultRows.size(); i++) {
HPKC003 fKc003 = new HPKC003();
......
......@@ -31,7 +31,7 @@ import java.util.Map;
public class ServiceHPKC004 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode(), InventTypeEnum.SEMI_FINISHED_PRODUCT.getCode(),
InventTypeEnum.FINISHED_PRODUCT.getCode()};
......
......@@ -40,7 +40,7 @@ import java.util.Map;
public class ServiceHPKC006 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode(), InventTypeEnum.WASTE.getCode()};
/**
......
......@@ -38,7 +38,7 @@ import java.util.Map;
public class ServiceHPKC007 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode(), InventTypeEnum.WASTE.getCode()};
/**
......
......@@ -35,7 +35,7 @@ import java.util.Map;
public class ServiceHPKC007A extends ServiceEPBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode(), InventTypeEnum.WASTE.getCode()};
/**
......
......@@ -23,7 +23,7 @@
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
REMARKS as "remarks", <!-- 备注 -->
REMARK as "remark", <!-- 备注 -->
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
</sql>
......@@ -85,8 +85,8 @@
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remarks">
REMARKS = #remarks#
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
......@@ -153,13 +153,13 @@
INVENT_RECORD_ID, <!-- 存货档案ID -->
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
REMARKS, <!-- 备注 -->
REMARK, <!-- 备注 -->
DELETE_FLAG <!-- 是否删除0.否1.是 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#oldPurchaseNo#,#purchaseNo#, #receiptDate#, #whCode#, #whName#, #inventType#,
#purchaseNo#,#oldPurchaseNo#, #receiptDate#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#,
#remarks#, #deleteFlag#
#remark#, #deleteFlag#
)
</insert>
......@@ -189,7 +189,7 @@
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID -->
AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
REMARKS = #remarks# <!-- 备注 -->
REMARK = #remark# <!-- 备注 -->
WHERE ID = #id#
</update>
......
......@@ -127,14 +127,16 @@
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
CREATED_NAME, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
UPDATED_NAME, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
VERSION
) VALUES (
#companyCode#, #depCode#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#,
#createdBy#, #createdTime#, #updatedBy#,
#createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #version#
)
</insert>
......
......@@ -38,7 +38,7 @@ public class ServiceHPPZ006 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null,false);
inInfo.setBlock(InitiateModeEnum.generatorEiBlock());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ006().eiMetadata);
} catch (PlatException e) {
......@@ -78,6 +78,7 @@ public class ServiceHPPZ006 extends ServiceBase {
fPz006.fromMap(resultRows.get(i));
// 存货名称
fPz006.setInventName(HPPZTools.getPz004ByCode(fPz006.getInventCode()).getInventName());
fPz006.setSpec(HPPZTools.jointSpec(fPz006.getLength(),fPz006.getWidth(),fPz006.getThick()));
DaoUtils.insert(HPPZ006.INSERT, fPz006);
}
inInfo = this.query(inInfo);
......@@ -126,6 +127,7 @@ public class ServiceHPPZ006 extends ServiceBase {
fPz006.fromMap(resultRows.get(i));
// 存货名称
fPz006.setInventName(HPPZTools.getPz004ByCode(fPz006.getInventCode()).getInventName());
fPz006.setSpec(HPPZTools.jointSpec(fPz006.getLength(),fPz006.getWidth(),fPz006.getThick()));
DaoUtils.update(HPPZ006.UPDATE, fPz006);
}
inInfo = this.query(inInfo);
......
......@@ -33,7 +33,7 @@ public class ServiceHPPZ007 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null,true);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ007().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
package com.baosight.hpjx.hp.pz.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.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.xs.tools.HPXSUserTools;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.RsaUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -21,7 +18,6 @@ import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import com.baosight.xservices.xs.constants.LoginConstants;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -257,7 +253,7 @@ public class ServiceHPPZ009 extends ServiceBase {
HPPZ009 fPz009 = new HPPZ009();
fPz009.fromMap(resultRows.get(i));
// 校验企业下是否存在用户
int count = HPXSUserTools.countByCompany(fPz009.getCompanyCode());
int count = HPXSTools.countByCompany(fPz009.getCompanyCode());
if (count > 0) {
throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户",
fPz009.getCompanyName()));
......
......@@ -5,7 +5,7 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.HPPZ010;
import com.baosight.hpjx.hp.xs.tools.HPXSUserTools;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.RsaUtils;
......@@ -248,7 +248,7 @@ public class ServiceHPPZ010 extends ServiceBase {
HPPZ009 fPz009 = new HPPZ009();
fPz009.fromMap(resultRows.get(i));
// 校验企业下是否存在用户
int count = HPXSUserTools.countByCompany(fPz009.getCompanyCode());
int count = HPXSTools.countByCompany(fPz009.getCompanyCode());
if (count > 0) {
throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户",
fPz009.getCompanyName()));
......
......@@ -22,7 +22,7 @@ public class HPSC005 extends DaoEPBase {
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_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
......@@ -52,7 +52,7 @@ public class HPSC005 extends DaoEPBase {
public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String COL_ID = "ID";
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
......@@ -83,13 +83,13 @@ public class HPSC005 extends DaoEPBase {
public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String QUERY = "t_hpsc005.query";
public static final String COUNT = "t_hpsc005.count";
public static final String INSERT = "t_hpsc005.insert";
public static final String UPDATE = "t_hpsc005.update";
public static final String DELETE = "t_hpsc005.delete";
public static final String QUERY = "HPSC005.query";
public static final String COUNT = "HPSC005.count";
public static final String INSERT = "HPSC005.insert";
public static final String UPDATE = "HPSC005.update";
public static final String DELETE = "HPSC005.delete";
private Long id = new Long(0);
private Long id = new Long(0);
private String companyCode = " "; /* 企业编码 预留*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
......@@ -489,7 +489,7 @@ public class HPSC005 extends DaoEPBase {
/**
* set the id .
*
* @param id
* @param id
*/
public void setId(Long id) {
this.id = id;
......
package com.baosight.hpjx.hp.sc.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:THpsc005.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-22 15:35:04 create
*/
public class HPSC005B extends HPSC005 {
private static final long serialVersionUID = 1L;
public static final String FIELD_CHILD_ID = "childId";
public static final String COL_CHILD_ID = "CHILD_ID";
public static final String QUERY = "HPSC005B.query";
public static final String COUNT = "HPSC005B.count";
public static final String INSERT = "HPSC005B.insert";
public static final String UPDATE = "HPSC005B.update";
public static final String DELETE = "HPSC005B.delete";
private Long childId;
/**
* the constructor.
*/
public HPSC005B() {
super.initMetaData();
initMetaData();
}
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_CHILD_ID);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
}
/**
* get the childId .
*
* @return the childId
*/
public Long getChildId() {
return this.childId;
}
/**
* set the childId .
*
* @param childId
*/
public void setChildId(Long childId) {
this.childId = childId;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
super.fromMap(map);
setChildId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_CHILD_ID)), childId));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = super.toMap();
map.put(FIELD_CHILD_ID, StringUtils.toString(childId, eiMetadata.getMeta(FIELD_CHILD_ID)));
return map;
}
}
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.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;
......@@ -30,11 +32,11 @@ public class ServiceHPSC001 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
Map map = new HashMap();
map.put("companyCode", UserSessionUtils.getCompanyCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), map);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), map,true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC001().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
......@@ -64,6 +66,7 @@ public class ServiceHPSC001 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpsc001.fromMap(map);
hpsc001.setStatus(CommonConstant.YesNo.NO_0);
hpsc001.setProjCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PROJ_NUMBER));
DaoUtils.insert("HPSC001.insert",hpsc001);
}
......@@ -195,5 +198,17 @@ public class ServiceHPSC001 extends ServiceBase {
throw new PlatException(outInfo.getMsg());
}
}
/**
* 项目下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.PROJ_RECORD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo));
return inInfo;
}
}
......@@ -8,6 +8,7 @@ import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -18,6 +19,7 @@ import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
......@@ -248,5 +250,18 @@ public class ServiceHPSC003 extends ServiceBase {
eiInfo.setMsg("提交成功!");
return eiInfo;
}
/**
* 部件下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryInventComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_RECORD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo));
return inInfo;
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -166,4 +169,17 @@ public class ServiceHPSC004 extends ServiceBase {
eiInfo.set("list",list);
return eiInfo;
}
/**
* 部件下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryInventComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.SUB_INVENT_RECORD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo));
return inInfo;
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -157,5 +160,30 @@ public class ServiceHPSC005 extends ServiceBase {
}
return query(eiInfo);
}
/**
* 项目下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryProjComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.PROJ_PROD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo));
return inInfo;
}
/**
* 生产组下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryOrgComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.ORG_PROD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo));
return inInfo;
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
......@@ -22,7 +23,11 @@ public class ServiceHPSC011 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
inInfo.setCell(EiConstant.queryBlock, 0, "status", 1);
inInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
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);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC001().eiMetadata);
} catch (PlatException e) {
......
......@@ -36,6 +36,7 @@
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark", <!-- 备注 -->
MATERIAL_STATUS as "materialStatus"
FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
......@@ -158,9 +159,10 @@
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE <!-- 部门编码 -->
DEP_CODE, <!-- 部门编码 -->
REMARK
)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #status#, 0, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #status#, 0, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#)
</insert>
<delete id="delete">
......@@ -183,8 +185,9 @@
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
WHERE
DEP_CODE = #depCode#, <!-- 部门编码 -->
REMARK = #remark# <!-- 备注 -->
WHERE
ID = #id#
</update>
......@@ -227,7 +230,8 @@
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
......
......@@ -80,7 +80,7 @@
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC003">
SELECT
ID as "id",
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_TYPE as "projType", <!-- 项目类型 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
......@@ -237,6 +237,22 @@
ID = #id#
</update>
<!-- 部件下拉框 -->
<select id="queryInventComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
PRDT_CODE as "prdtCode",
PRDT_NAME as "prdtName"
FROM ${hpjxSchema}.T_HPSC003
WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
ORDER BY PROJ_CODE
</select>
<!--计划完成时间回写-->
<update id="updateDate">
UPDATE hpjx.T_HPSC003
......
<?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-01-17 10:33:53
Version : 1.0
schema : hpjx
tableName : T_HPSC004
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEPT_CODE VARCHAR NOT NULL,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PARENT_ID VARCHAR,
PARENT_PRDT_NAME VARCHAR,
TYPE VARCHAR NOT NULL,
LEAF VARCHAR NOT NULL,
SORT VARCHAR NOT NULL,
ICON VARCHAR NOT NULL,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
NUM INTEGER NOT NULL,
UNIT_WT DECIMAL NOT NULL,
TOTAL_WT DECIMAL NOT NULL,
FILE_PATH1 VARCHAR,
FILE_PATH2 VARCHAR,
FILE_PATH3 VARCHAR,
FILE_PATH4 VARCHAR,
FILE_PATH5 VARCHAR,
PLAN_COMMENT_DATE VARCHAR,
PLAN_COMPLETION_DATE VARCHAR,
ACTUAL_COMPLETION_DATE VARCHAR,
ACTUAL_COMPLETION_NUM INTEGER,
ACTUAL_COMPLETION_UNIT_WT DECIMAL,
STATUS TINYINT,
DEL_STATUS TINYINT,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME,
REMARK VARCHAR
-->
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC004">
<sql id="condition">
......@@ -484,7 +446,24 @@
WHERE
ID = #id#
</update>
<!-- 零部件下拉框 -->
<select id="queryInventComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
A.PRDT_CODE as "prdtCode",
B.PRDT_NAME as "prdtName"
FROM ${hpjxSchema}.T_HPSC004 A, ${hpjxSchema}.T_HPSC003 B
WHERE 1=1
AND A.PARENT_ID = B.PLAN_INFO_NO
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtCode">
B.PRDT_CODE = #parentPrdtCode#
</isNotEmpty>
ORDER BY A.PROJ_CODE
</select>
<select id="queryDate" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004">
SELECT
MAX(PLAN_COMPLETION_DATE) as "planCompletionDate" <!-- 计划结束时间 -->
......
<?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">
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC005">
<sql id="column">
ID as "id",
......@@ -334,4 +334,41 @@
PRODUCTION_ORDER_NO like CONCAT('%', #productionOrderNo#, '%')
</isNotEmpty>
</select>
<!-- 项目下拉框 -->
<select id="queryProjComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
PROJ_CODE as "projCode",
PROJ_NAME as "projName"
FROM ${hpjxSchema}.T_HPSC005
WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="statuses">
STATUS IN <iterate close=")" open="(" conjunction="," property="statuses">#statuses[]#</iterate>
</isNotEmpty>
ORDER BY PROJ_CODE
</select>
<!-- 生产组下拉框 -->
<select id="queryOrgComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
(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"
FROM HPJX.T_HPSC005 A
LEFT JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PRODUCTION_ORDER_NO
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partCode">
A.PART_CODE = #partCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="statuses">
STATUS IN <iterate close=")" open="(" conjunction="," property="statuses">#statuses[]#</iterate>
</isNotEmpty>
</select>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC005B">
<sql id="column">
A.ID as "id",
B.ID as "childId",
A.PROJ_CODE as "projCode", <!-- 项目编码 -->
A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
A.PRDT_CODE as "prdtCode", <!-- 部件编码 -->
A.PRDT_NAME as "prdtName", <!-- 部件名称 -->
A.PRDT_SPEC as "prdtSpec",
A.PART_CODE as "partCode",
A.PART_NAME as "partName",
A.PART_SPEC as "partSpec",
A.PRDT_LENGTH as "prdtLength", <!-- 长 -->
A.PRDT_WIDTH as "prdtWidth", <!-- 宽 -->
A.PRDT_THICK as "prdtThick", <!-- 厚 -->
A.PART_LENGTH as "partLength", <!-- 长 -->
A.PART_WIDTH as "partWidth", <!-- 宽 -->
A.PART_THICK as "partThick", <!-- 厚 -->
A.FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
A.FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
A.STATUS as "status", <!-- 状态 -->
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.NUM ELSE A.NUM END) AS "num",
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.TOTAL_WT ELSE A.TOTAL_WT END) AS "totalWt",
(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"
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="childId">
B.ID = #childId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo">
A.PRODUCTION_ORDER_NO LIKE CONCAT('%', #productionOrderNo#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
A.PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
A.PRDT_NAME LIKE CONCAT('%', #prdtName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partCode">
A.PART_CODE = #partCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partName">
A.PART_NAME LIKE CONCAT('%', #partName#, '%')
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="ids">
A.ID IN <iterate close=")" open="(" conjunction="," property="statuses">#statuses[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="statuses">
A.STATUS IN <iterate close=")" open="(" conjunction="," property="statuses">#statuses[]#</iterate>
</isNotEmpty>
</sql>
<!-- 选择生产任务 -->
<select id="query" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC005B">
SELECT
<include refid="column"/>
FROM HPJX.T_HPSC005 A
LEFT JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PRODUCTION_ORDER_NO
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
</select>
</sqlMap>
......@@ -2,9 +2,15 @@ package com.baosight.hpjx.hp.sc.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.iplat4j.core.exception.PlatException;
import org.apache.commons.collections.CollectionUtils;
......@@ -12,6 +18,7 @@ import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
public class HPSCTools {
......@@ -44,13 +51,133 @@ public class HPSCTools {
map.put("unassignedNum", new BigDecimal(0.000));
map.put("status","2");
} else {
//子单的数量小于母单
map.put("assignedNum",num);
map.put("unassignedNum", jhNum.subtract(num));
map.put("status","1");
//子单的数量小于母单
map.put("assignedNum", num);
map.put("unassignedNum", jhNum.subtract(num));
map.put("status", "1");
}
DaoBase.getInstance().update(HPSqlConstant.HPSC005.UPDATE_ASSIGN_NUM, map);
DaoBase.getInstance().update(HPSqlConstant.HPSC005.UPDATE_ASSIGN_NUM, map);
}
}
/**
* HPSC001公共DAO定义
*
* @author:songx
* @date:2024/2/4,10:17
*/
public static class HpSc001 {
/**
* 查询
*
* @param projCode
* @return
*/
public static HPSC001 get(String projCode) {
AssertUtils.isEmpty(projCode, "项目编码不能为空");
Map queryMap = new HashMap();
queryMap.put("projCode", projCode);
List<HPSC001> results = DaoBase.getInstance().query("HPSC001.query", queryMap);
AssertUtils.isNull(results, String.format("项目编码[%s]信息不存在", projCode));
return results.get(0);
}
}
/**
* HPSC002公共DAO定义
*
* @author:songx
* @date:2024/2/4,10:17
*/
public static class HpSc002 {
/**
* 查询
*
* @param prdtCode
* @return
*/
public static HPSC002 get(String prdtCode) {
AssertUtils.isEmpty(prdtCode, "部件编码不能为空");
Map queryMap = new HashMap();
queryMap.put("prdtCode", prdtCode);
List<HPSC002> results = DaoBase.getInstance().query("HPSC002.query", queryMap);
AssertUtils.isNull(results, String.format("部件编码[%s]信息不存在", prdtCode));
return results.get(0);
}
}
/**
* HPSC005公共DAO定义
*
* @author:songx
* @date:2024/2/4,10:17
*/
public static class HpSc005 {
/**
* 查询
*
* @param id
* @return
*/
public static HPSC005 getById(Long id) {
AssertUtils.isNull(id, "生产任务ID不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HPSC005> results = DaoBase.getInstance().query("HPSC005.query", queryMap);
AssertUtils.isNull(results, String.format("生产任务ID[%s]信息不存在", id));
return results.get(0);
}
/**
* 查询
*
* @param id
* @param childId
* @return
*/
public static HPSC005B getById(Long id, Long childId) {
AssertUtils.isNull(id, "生产任务ID不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
queryMap.put("childId", childId);
List<HPSC005B> results = DaoBase.getInstance().query(HPSC005B.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产任务ID[%s]信息不存在", id));
return results.get(0);
}
/**
* 查询其他入库信息
*
* @param ids
* @return
*/
public static List<HPSC005> listById(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("ids", ids);
return DaoBase.getInstance().query(HPSC005.QUERY, queryMap);
}
/**
* 查询其他入库信息
*
* @param ids
* @return
*/
public static Map<Long, HPSC005> mapById(List<Long> ids) {
List<HPSC005> results = listById(ids);
if (org.springframework.util.CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HPSC005::getId, item -> item));
}
}
}
package com.baosight.hpjx.hp.xs.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.xs.domain.User;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
......@@ -56,7 +57,26 @@ public class ServiceHPXSUser extends ServiceBase {
}
/**
* 查询用户的一页下拉框
* 查询用户下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryComboBox(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put("companyCode", UserSessionUtils.getCompanyCode());
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.USER_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, queryMap);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询企业失败");
}
return inInfo;
}
/**
* 查询用户的企业下拉框
*
* @param inInfo
* @return
......
package com.baosight.hpjx.hp.xs.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.xs.domain.Org;
import com.baosight.hpjx.hp.xs.domain.User;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import org.springframework.util.CollectionUtils;
......@@ -12,7 +15,7 @@ import java.util.Map;
* @author:songx
* @date:2024/1/15,15:23
*/
public class HPXSUserTools {
public class HPXSTools {
/**
* 统计企业下的用户数量
......@@ -39,4 +42,44 @@ public class HPXSUserTools {
return CollectionUtils.isEmpty(results) ? "" : results.get(0).get("orgId").toString();
}
/**
* @author:songx
* @date:2024/2/4,10:35
*/
public static class XsUser {
/**
* 查询组织机构
*
* @return
*/
public static User get(String loginName) {
AssertUtils.isEmpty(loginName, "用户登录名不能为空");
Map paramMap = new HashMap();
paramMap.put("loginName", loginName);
List<User> results = DaoBase.getInstance().query("HPXSUser.query", paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
}
/**
* @author:songx
* @date:2024/2/4,10:35
*/
public static class XsOrg {
/**
* 查询组织机构
*
* @return
*/
public static Org get(String orgId) {
AssertUtils.isEmpty(orgId, "组织编码不能为空");
Map paramMap = new HashMap();
paramMap.put("orgId", orgId);
List<Org> results = DaoBase.getInstance().query("HPXSOrg.query", paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
}
}
/**
* Generate time : 2024-01-10 14:47:08
* Version : 1.0
*/
package com.baosight.hpjx.hp.zl.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
......@@ -11,378 +8,704 @@ import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* THpzl001
*
*/
* Project: <br>
* Title:THpzl001.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-02-02 14:09:26 create
*/
public class HPZL001 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private String receiptDate = " "; /* 单据日期*/
private String chkBillno = " "; /* 检查单号*/
private String itemCode = " "; /* 项目号*/
private String itemName = " "; /* 项目名称*/
private String unit = " "; /* 生产组*/
private String notes = " "; /* 质量问题描述*/
private String princ = " "; /* 检查人*/
private int status; /* 单据状态 0待提交 1已提交*/
private String affix = " "; /* 附件*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("receiptDate");
eiColumn.setDescName("单据日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("chkBillno");
eiColumn.setDescName("检查单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("itemCode");
eiColumn.setDescName("项目号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("itemName");
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("unit");
eiColumn.setDescName("生产组");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("notes");
eiColumn.setDescName("质量问题描述");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("princ");
eiColumn.setDescName("检查人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("单据状态 0待提交 1已提交");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("affix");
eiColumn.setDescName("附件");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("depCode");
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public HPZL001() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the receiptDate - 单据日期
* @return the receiptDate
*/
public String getReceiptDate() {
return this.receiptDate;
}
/**
* set the receiptDate - 单据日期
*/
public void setReceiptDate(String receiptDate) {
this.receiptDate = receiptDate;
}
/**
* get the chkBillno - 检查单号
* @return the chkBillno
*/
public String getChkBillno() {
return this.chkBillno;
}
/**
* set the chkBillno - 检查单号
*/
public void setChkBillno(String chkBillno) {
this.chkBillno = chkBillno;
}
/**
* get the itemCode - 项目号
* @return the itemCode
*/
public String getItemCode() {
return this.itemCode;
}
/**
* set the itemCode - 项目号
*/
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
/**
* get the itemName - 项目名称
* @return the itemName
*/
public String getItemName() {
return this.itemName;
}
/**
* set the itemName - 项目名称
*/
public void setItemName(String itemName) {
this.itemName = itemName;
}
/**
* get the unit - 生产组
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 生产组
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* get the notes - 质量问题描述
* @return the notes
*/
public String getnotes() {
return this.notes;
}
/**
* set the notes - 质量问题描述
*/
public void setnotes(String notes) {
this.notes = notes;
}
/**
* get the princ - 检查人
* @return the princ
*/
public String getPrinc() {
return this.princ;
}
/**
* set the princ - 检查人
*/
public void setPrinc(String princ) {
this.princ = princ;
}
/**
* get the status - 单据状态 0待提交 1已提交
* @return the status
*/
public int getStatus() {
return this.status;
}
/**
* set the status - 单据状态 0待提交 1已提交
*/
public void setStatus(int status) {
this.status = status;
}
/**
* get the affix - 附件
* @return the affix
*/
public String getAffix() {
return this.affix;
}
/**
* set the affix - 附件
*/
public void setAffix(String affix) {
this.affix = affix;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the depCode - 部门编码
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setReceiptDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("receiptDate")), receiptDate));
setChkBillno(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("chkBillno")), chkBillno));
setItemCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("itemCode")), itemCode));
setItemName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("itemName")), itemName));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("unit")), unit));
setnotes(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("notes")), notes));
setPrinc(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("princ")), princ));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setAffix(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("affix")), affix));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id",StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode",StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("receiptDate",StringUtils.toString(receiptDate, eiMetadata.getMeta("receiptDate")));
map.put("chkBillno",StringUtils.toString(chkBillno, eiMetadata.getMeta("chkBillno")));
map.put("itemCode",StringUtils.toString(itemCode, eiMetadata.getMeta("itemCode")));
map.put("itemName",StringUtils.toString(itemName, eiMetadata.getMeta("itemName")));
map.put("unit",StringUtils.toString(unit, eiMetadata.getMeta("unit")));
map.put("notes",StringUtils.toString(notes, eiMetadata.getMeta("notes")));
map.put("princ",StringUtils.toString(princ, eiMetadata.getMeta("princ")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("affix",StringUtils.toString(affix, eiMetadata.getMeta("affix")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
return map;
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_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期*/
public static final String FIELD_CHECK_NO = "checkNo"; /* 检查单号*/
public static final String FIELD_PROD_NO = "prodNo"; /* 生产任务号*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目号*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 部件编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 部件名称*/
public static final String FIELD_SUB_INVENT_CODE = "subInventCode"; /* 零部件编码*/
public static final String FIELD_SUB_INVENT_NAME = "subInventName"; /* 零部件名称*/
public static final String FIELD_ORG_NO = "orgNo"; /* 生产组编码*/
public static final String FIELD_ORG_NAME = "orgName"; /* 生产组名称*/
public static final String FIELD_POOR_TYPE = "poorType"; /* 不良品类*/
public static final String FIELD_PROBLEM_DESC = "problemDesc"; /* 质量问题描述*/
public static final String FIELD_CHECK_USER = "checkUser"; /* 检查人*/
public static final String FIELD_CHECK_USER_NAME = "checkUserName"; /* 检查人名称*/
public static final String FIELD_STATUS = "status"; /* 单据状态 0未处理 1已处理*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除:1.是,0.否*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期*/
public static final String COL_CHECK_NO = "CHECK_NO"; /* 检查单号*/
public static final String COL_PROD_NO = "PROD_NO"; /* 生产任务号*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目号*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 部件编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 部件名称*/
public static final String COL_SUB_INVENT_CODE = "SUB_INVENT_CODE"; /* 零部件编码*/
public static final String COL_SUB_INVENT_NAME = "SUB_INVENT_NAME"; /* 零部件名称*/
public static final String COL_ORG_NO = "ORG_NO"; /* 生产组编码*/
public static final String COL_ORG_NAME = "ORG_NAME"; /* 生产组名称*/
public static final String COL_POOR_TYPE = "POOR_TYPE"; /* 不良品类*/
public static final String COL_PROBLEM_DESC = "PROBLEM_DESC"; /* 质量问题描述*/
public static final String COL_CHECK_USER = "CHECK_USER"; /* 检查人*/
public static final String COL_CHECK_USER_NAME = "CHECK_USER_NAME"; /* 检查人名称*/
public static final String COL_STATUS = "STATUS"; /* 单据状态 0未处理 1已处理*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除:1.是,0.否*/
public static final String QUERY = "HPZL001.query";
public static final String COUNT = "HPZL001.count";
public static final String INSERT = "HPZL001.insert";
public static final String UPDATE = "HPZL001.update";
public static final String DELETE = "HPZL001.delete";
private Long id;
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private String receiptDate = " "; /* 单据日期*/
private String checkNo = " "; /* 检查单号*/
private String prodNo = " "; /* 生产任务号*/
private String projCode = " "; /* 项目号*/
private String projName = " "; /* 项目名称*/
private String inventCode = " "; /* 部件编码*/
private String inventName = " "; /* 部件名称*/
private String subInventCode = " "; /* 零部件编码*/
private String subInventName = " "; /* 零部件名称*/
private String orgNo = " "; /* 生产组编码*/
private String orgName = " "; /* 生产组名称*/
private Integer poorType; /* 不良品类*/
private String problemDesc = " "; /* 质量问题描述*/
private String checkUser = " "; /* 检查人*/
private String checkUserName = " "; /* 检查人名称*/
private Integer status; /* 单据状态 0未处理 1已处理*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag; /* 是否删除:1.是,0.否*/
/**
* 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_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIPT_DATE);
eiColumn.setDescName("单据日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CHECK_NO);
eiColumn.setDescName("检查单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_NO);
eiColumn.setDescName("生产任务号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("部件编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("部件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_CODE);
eiColumn.setDescName("零部件编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_NAME);
eiColumn.setDescName("零部件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ORG_NO);
eiColumn.setDescName("生产组编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ORG_NAME);
eiColumn.setDescName("生产组名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_POOR_TYPE);
eiColumn.setDescName("不良品类");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROBLEM_DESC);
eiColumn.setDescName("质量问题描述");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CHECK_USER);
eiColumn.setDescName("检查人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CHECK_USER_NAME);
eiColumn.setDescName("检查人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("单据状态 0未处理 1已处理");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
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_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除:1.是,0.否");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPZL001() {
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 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 receiptDate - 单据日期.
* @return the receiptDate
*/
public String getReceiptDate() {
return this.receiptDate;
}
/**
* set the receiptDate - 单据日期.
*
* @param receiptDate - 单据日期
*/
public void setReceiptDate(String receiptDate) {
this.receiptDate = receiptDate;
}
/**
* get the checkNo - 检查单号.
* @return the checkNo
*/
public String getCheckNo() {
return this.checkNo;
}
/**
* set the checkNo - 检查单号.
*
* @param checkNo - 检查单号
*/
public void setCheckNo(String checkNo) {
this.checkNo = checkNo;
}
public String getProdNo() {
return prodNo;
}
public void setProdNo(String prodNo) {
this.prodNo = prodNo;
}
/**
* get the projCode - 项目号.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目号.
*
* @param projCode - 项目号
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the inventCode - 部件编码.
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 部件编码.
*
* @param inventCode - 部件编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 部件名称.
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 部件名称.
*
* @param inventName - 部件名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the subInventCode - 零部件编码.
* @return the subInventCode
*/
public String getSubInventCode() {
return this.subInventCode;
}
/**
* set the subInventCode - 零部件编码.
*
* @param subInventCode - 零部件编码
*/
public void setSubInventCode(String subInventCode) {
this.subInventCode = subInventCode;
}
/**
* get the subInventName - 零部件名称.
* @return the subInventName
*/
public String getSubInventName() {
return this.subInventName;
}
/**
* set the subInventName - 零部件名称.
*
* @param subInventName - 零部件名称
*/
public void setSubInventName(String subInventName) {
this.subInventName = subInventName;
}
/**
* get the orgNo - 生产组编码.
* @return the orgNo
*/
public String getOrgNo() {
return this.orgNo;
}
/**
* set the orgNo - 生产组编码.
*
* @param orgNo - 生产组编码
*/
public void setOrgNo(String orgNo) {
this.orgNo = orgNo;
}
/**
* get the orgName - 生产组名称.
* @return the orgName
*/
public String getOrgName() {
return this.orgName;
}
/**
* set the orgName - 生产组名称.
*
* @param orgName - 生产组名称
*/
public void setOrgName(String orgName) {
this.orgName = orgName;
}
/**
* get the poorType - 不良品类.
* @return the poorType
*/
public Integer getPoorType() {
return this.poorType;
}
/**
* set the poorType - 不良品类.
*
* @param poorType - 不良品类
*/
public void setPoorType(Integer poorType) {
this.poorType = poorType;
}
/**
* get the problemDesc - 质量问题描述.
* @return the problemDesc
*/
public String getProblemDesc() {
return this.problemDesc;
}
/**
* set the problemDesc - 质量问题描述.
*
* @param problemDesc - 质量问题描述
*/
public void setProblemDesc(String problemDesc) {
this.problemDesc = problemDesc;
}
/**
* get the checkUser - 检查人.
* @return the checkUser
*/
public String getCheckUser() {
return this.checkUser;
}
/**
* set the checkUser - 检查人.
*
* @param checkUser - 检查人
*/
public void setCheckUser(String checkUser) {
this.checkUser = checkUser;
}
/**
* get the checkUserName - 检查人名称.
* @return the checkUserName
*/
public String getCheckUserName() {
return this.checkUserName;
}
/**
* set the checkUserName - 检查人名称.
*
* @param checkUserName - 检查人名称
*/
public void setCheckUserName(String checkUserName) {
this.checkUserName = checkUserName;
}
/**
* get the status - 单据状态 0未处理 1已处理.
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 单据状态 0未处理 1已处理.
*
* @param status - 单据状态 0未处理 1已处理
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* 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 createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* 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 updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* 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 deleteFlag - 是否删除:1.是,0.否.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除:1.是,0.否.
*
* @param deleteFlag - 是否删除:1.是,0.否
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* 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));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setReceiptDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIPT_DATE)), receiptDate));
setCheckNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHECK_NO)), checkNo));
setProdNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_NO)), prodNo));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setSubInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SUB_INVENT_CODE)), subInventCode));
setSubInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SUB_INVENT_NAME)), subInventName));
setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo));
setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NAME)), orgName));
setPoorType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_POOR_TYPE)), poorType));
setProblemDesc(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROBLEM_DESC)), problemDesc));
setCheckUser(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHECK_USER)), checkUser));
setCheckUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHECK_USER_NAME)), checkUserName));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
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.
*/
@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_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_RECEIPT_DATE, StringUtils.toString(receiptDate, eiMetadata.getMeta(FIELD_RECEIPT_DATE)));
map.put(FIELD_CHECK_NO, StringUtils.toString(checkNo, eiMetadata.getMeta(FIELD_CHECK_NO)));
map.put(FIELD_PROD_NO, StringUtils.toString(prodNo, eiMetadata.getMeta(FIELD_PROD_NO)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_SUB_INVENT_CODE, StringUtils.toString(subInventCode, eiMetadata.getMeta(FIELD_SUB_INVENT_CODE)));
map.put(FIELD_SUB_INVENT_NAME, StringUtils.toString(subInventName, eiMetadata.getMeta(FIELD_SUB_INVENT_NAME)));
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_POOR_TYPE, StringUtils.toString(poorType, eiMetadata.getMeta(FIELD_POOR_TYPE)));
map.put(FIELD_PROBLEM_DESC, StringUtils.toString(problemDesc, eiMetadata.getMeta(FIELD_PROBLEM_DESC)));
map.put(FIELD_CHECK_USER, StringUtils.toString(checkUser, eiMetadata.getMeta(FIELD_CHECK_USER)));
map.put(FIELD_CHECK_USER_NAME, StringUtils.toString(checkUserName, eiMetadata.getMeta(FIELD_CHECK_USER_NAME)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
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_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_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
return map;
}
}
}
\ No newline at end of file
package com.baosight.hpjx.hp.zl.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:THpzl001a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-02-02 16:50:31 create
*/
public class HPZL001A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键ID*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEPT_CODE = "deptCode"; /* 部门编码 预留*/
public static final String FIELD_DOC_TYPE = "docType"; /* 附件类型*/
public static final String FIELD_CHECK_ID = "checkId"; /* 质量巡检单ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 修改人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 修改人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 修改时间*/
public static final String COL_ID = "ID"; /* 主键ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEPT_CODE = "DEPT_CODE"; /* 部门编码 预留*/
public static final String COL_DOC_TYPE = "DOC_TYPE"; /* 附件类型*/
public static final String COL_CHECK_ID = "CHECK_ID"; /* 质量巡检单ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件文件*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 修改人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 修改人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 修改时间*/
public static final String QUERY = "HPZL001A.query";
public static final String COUNT = "HPZL001A.count";
public static final String INSERT = "HPZL001A.insert";
public static final String UPDATE = "HPZL001A.update";
public static final String DELETE = "HPZL001A.delete";
private Long id; /* 主键ID*/
private String companyCode = " "; /* 企业编码 预留*/
private String deptCode = " "; /* 部门编码 预留*/
private Integer docType; /* 附件类型*/
private Long checkId; /* 质量巡检单ID*/
private String docId = " "; /* 文件ID*/
private String docName = " "; /* 文件名称*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPT_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_TYPE);
eiColumn.setDescName("附件类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CHECK_ID);
eiColumn.setDescName("质量巡检单ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("文件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
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_NAME);
eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("修改时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPZL001A() {
initMetaData();
}
/**
* get the id - 主键ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键ID.
*
* @param id - 主键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 deptCode - 部门编码 预留.
* @return the deptCode
*/
public String getDeptCode() {
return this.deptCode;
}
/**
* set the deptCode - 部门编码 预留.
*
* @param deptCode - 部门编码 预留
*/
public void setDeptCode(String deptCode) {
this.deptCode = deptCode;
}
/**
* get the docType - 附件类型.
* @return the docType
*/
public Integer getDocType() {
return this.docType;
}
/**
* set the docType - 附件类型.
*
* @param docType - 附件类型
*/
public void setDocType(Integer docType) {
this.docType = docType;
}
/**
* get the checkId - 质量巡检单ID.
* @return the checkId
*/
public Long getCheckId() {
return this.checkId;
}
/**
* set the checkId - 质量巡检单ID.
*
* @param checkId - 质量巡检单ID
*/
public void setCheckId(Long checkId) {
this.checkId = checkId;
}
/**
* get the docId - 文件ID.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* get the docName - 文件名称.
* @return the docName
*/
public String getDocName() {
return this.getDocName();
}
/**
* set the docName - 文件名称.
*
* @param docName - 文件名称
*/
public void setDocName(String docName) {
this.docName = docName;
}
/**
* 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 createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* 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 updatedName - 修改人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 修改人名称.
*
* @param updatedName - 修改人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* 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 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));
setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEPT_CODE)), deptCode));
setDocType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOC_TYPE)), docType));
setCheckId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_CHECK_ID)), checkId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
}
/**
* 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_DEPT_CODE, StringUtils.toString(deptCode, eiMetadata.getMeta(FIELD_DEPT_CODE)));
map.put(FIELD_DOC_TYPE, StringUtils.toString(docType, eiMetadata.getMeta(FIELD_DOC_TYPE)));
map.put(FIELD_CHECK_ID, StringUtils.toString(checkId, eiMetadata.getMeta(FIELD_CHECK_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
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_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
return map;
}
}
package com.baosight.hpjx.hp.zl.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.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC008;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
......@@ -13,11 +16,11 @@ import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -26,186 +29,176 @@ import java.util.Map;
* @date 2024年01月09日 10:18
*/
public class ServiceHPZL001 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
HPZL001 HPZL001 = new HPZL001();
Map map = new HashMap();
map.put("status","1");
EiInfo outInfo = super.initLoad(inInfo, HPZL001);
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), map);
return outInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String receiptDate = MapUtils.getString(queryMap, "receiptDate");
queryMap.put("receiptDate", StringUtil.removeSpecifiedCharacter(receiptDate,
StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED));
inInfo = super.query(inInfo, "HPZL001.query", new HPKC008());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPZL001 fZl001 = new HPZL001();
fZl001.fromMap(resultRows.get(i));
// 去除日期字符串中的-
fZl001.setReceiptDate(StringUtil.removeHorizontalLine(fZl001.getReceiptDate()));
// 项目名称
Map params1 = new HashMap<>();
params1.put("itemCode", fZl001.getItemCode());
List<HPSC001> query1 = dao.query("HPSC001.query", params1);
fZl001.setItemName(query1.get(0).getProjName());
// 生成单据号
fZl001.setChkBillno(SequenceGenerator.getNextSequence(
HPConstant.SequenceId.HPZL001_NUMBER));
DaoUtils.insert("HPZL001.insert", fZl001);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUB_INVENT_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.ORG_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPZL001().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 修改操作
* 查询操作
*
* @param inInfo
* @return
*/
public EiInfo update(EiInfo inInfo) {
@Override
public EiInfo query(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPZL001 fZl001 = new HPZL001();
fZl001.fromMap(resultRows.get(i));
// 去除日期字符串中的-
fZl001.setReceiptDate(StringUtil.removeHorizontalLine(fZl001.getReceiptDate()));
// 项目名称
Map params1 = new HashMap<>();
params1.put("itemCode", fZl001.getItemCode());
List<HPSC001> query1 = dao.query("HPSC001.query", params1);
fZl001.setItemName(query1.get(0).getProjName());
DaoUtils.update("HPZL001.update", fZl001);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String receiptDate = MapUtils.getString(queryMap, "receiptDate");
queryMap.put("receiptDate", StringUtil.removeSpecifiedCharacter(receiptDate,
StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED));
inInfo = super.query(inInfo, HPZL001.QUERY, new HPZL001());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除操作
* 新增操作
*
* @param inInfo
* @return
*/
public EiInfo delete(EiInfo inInfo) {
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HPZL001.delete", resultRows.get(i));
HPZL001 fZl001 = new HPZL001();
fZl001.fromMap(resultRows.get(i));
// 去除日期字符串中的-
fZl001.setReceiptDate(StringUtil.removeHorizontalLine(fZl001.getReceiptDate()));
// 设置基础信息
this.setBaseInfo(fZl001);
// 生成单据号
fZl001.setCheckNo(SequenceGenerator.getNextSequence(
HPConstant.SequenceId.HPZL001_NUMBER));
fZl001.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPZL001.INSERT, fZl001);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 提交操作
* 修改操作
*
* @param inInfo
* @return
*/
public EiInfo audit(EiInfo inInfo) {
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPZL001 fZl001 = new HPZL001();
fZl001.fromMap(resultRows.get(i));
fZl001.setStatus(1);
DaoUtils.update("HPZL001.operator", fZl001);
AssertUtils.isTrue(CommonConstant.YesNo.YES_1.equals(fZl001.getStatus()),
String.format("单号[%s]的状态为\"已处理\"不允许修改", fZl001.getCheckNo()));
// 去除日期字符串中的-
fZl001.setReceiptDate(StringUtil.removeHorizontalLine(fZl001.getReceiptDate()));
// 设置基础信息
this.setBaseInfo(fZl001);
DaoUtils.update(HPZL001.UPDATE, fZl001);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!");
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "提交失败");
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 撤回操作
* 设置基础信息
*
* @param fZl001
*/
private void setBaseInfo(HPZL001 fZl001) {
// 项目名称
// fZl001.setProjName(HPSCTools.HpSc001.get(fZl001.getProjCode()).getProjName());
// 部件名称
// fZl001.setInventName(HPSCTools.HpSc002.get(fZl001.getInventCode()).getPrdtName());
// 零部件名称
// fZl001.setSubInventName(HPSCTools.HpSc002.get(fZl001.getSubInventCode()).getPrdtName());
// 生产组名称
// fZl001.setOrgName(HPXSTools.XsOrg.get(fZl001.getOrgNo()).getOrgCname());
// 检查人名称
// fZl001.setCheckUser(UserSession.getLoginName());
// fZl001.setCheckUserName(UserSession.getLoginCName());
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
public EiInfo unAudit(EiInfo inInfo) {
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPZL001 fZl001 = new HPZL001();
fZl001.fromMap(resultRows.get(i));
fZl001.setStatus(0);
DaoUtils.update("HPZL001.operator", fZl001);
AssertUtils.isTrue(CommonConstant.YesNo.YES_1.equals(fZl001.getStatus()),
String.format("单号[%s]的状态为\"已处理\"不允许删除", fZl001.getCheckNo()));
DaoUtils.update(HPZL001.DELETE, resultRows.get(i));
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据撤回成功!");
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "提交失败");
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 上传附件
* 已处理
*
* @param inInfo
* @return
*/
public EiInfo bindDocIdById(EiInfo inInfo) {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
public EiInfo doProcess(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
Map resultRow = resultRows.get(i);
DaoUtils.update("HPZL001.updateAffix", resultRow);
HPZL001 fZl001 = new HPZL001();
fZl001.fromMap(resultRows.get(i));
fZl001.setCheckUser(UserSession.getLoginName());
fZl001.setCheckUserName(UserSession.getLoginCName());
fZl001.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPSqlConstant.HPZL001.DO_PROCESS, fZl001);
}
inInfo.setMsg("更新附件成功!");
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据处理成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "更新附件信息失败");
LogUtils.setDetailMsg(inInfo, e, "提交失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.zl.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.hp.zl.domain.HPZL001A;
import com.baosight.hpjx.hp.zl.tools.HPZLTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
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.ServiceEPBase;
import org.apache.commons.collections.CollectionUtils;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHPZL001A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
// 查询物料ID所对应的项目名称和部件名称
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put("id", queryMap.get("checkId"));
List<HPZL001> dbZl001s = dao.query(HPZL001.QUERY, queryMap);
if (CollectionUtils.isNotEmpty(dbZl001s)) {
inInfo.addBlock("detail").addRow(dbZl001s.get(0));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPZL001A().eiMetadata);
}
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPZL001A.QUERY, new HPZL001A());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPZL001A fZl001A = new HPZL001A();
fZl001A.fromMap(resultRows.get(i));
// 校验质检单是否已处理
HPZL001 dbZl001 = HPZLTools.getById(fZl001A.getCheckId());
AssertUtils.isTrue(CommonConstant.YesNo.YES_1.equals(dbZl001.getStatus()),
String.format("质检单[%s]状态为\"已处理\",不能上传附件", dbZl001.getCheckNo()));
DaoUtils.insert(HPZL001A.INSERT, fZl001A);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPZL001A fZl001A = new HPZL001A();
fZl001A.fromMap(resultRows.get(i));
// 校验质检单是否已处理
HPZL001 dbZl001 = HPZLTools.getById(fZl001A.getCheckId());
AssertUtils.isTrue(CommonConstant.YesNo.YES_1.equals(dbZl001.getStatus()),
String.format("质检单[%s]状态为\"已处理\",不能删除附件"));
DaoUtils.update(HPZL001A.DELETE, fZl001A);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.zl.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC004;
import com.baosight.hpjx.hp.kc.domain.HPKC011;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.BeanUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 选择生产任务
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPZL001B extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
// 1.部分派工,2.全部派工
queryMap.put("statuses", new Integer[]{1, 2});
inInfo = super.query(inInfo, HPSC005B.QUERY, new HPSC005B());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 生成巡检单
*
* @param inInfo
* @return
*/
public EiInfo select(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String, HPSC005B> dbSc005bMap = new HashMap<>();
// 数据校验
for (Map row : resultRows) {
HPSC005B fSc005b = new HPSC005B();
fSc005b.fromMap(row);
HPSC005B dbSc005b = HPSCTools.HpSc005.getById(fSc005b.getId(), fSc005b.getChildId());
AssertUtils.isTrue(dbSc005b.getStatus() != 1 && dbSc005b.getStatus() != 2,
String.format("生产任务ID[%s]状态不是已分派,不允许操作", fSc005b.getId()));
dbSc005bMap.put(dbSc005b.getId() + "@#@" + dbSc005b.getChildId(), dbSc005b);
}
// 生成巡检单
for (Map row : resultRows) {
HPSC005B fSc005b = new HPSC005B();
fSc005b.fromMap(row);
HPSC005 dbSc005 = dbSc005bMap.get(fSc005b.getId() + "@#@" + fSc005b.getChildId());
HPZL001 newZl001 = BeanUtils.copy(dbSc005, HPZL001.class);
newZl001.setCheckNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPZL001_NUMBER));
newZl001.setReceiptDate(DateUtils.shortDate());
newZl001.setStatus(CommonConstant.YesNo.NO_0);
newZl001.setInventCode(dbSc005.getPrdtCode());
newZl001.setInventName(dbSc005.getPrdtName());
newZl001.setSubInventCode(dbSc005.getPartCode());
newZl001.setSubInventName(dbSc005.getPartName());
newZl001.setProdNo(dbSc005.getProductionOrderNo());
newZl001.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPZL001.INSERT, newZl001);
}
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "生成出库单失败");
}
return inInfo;
}
}
......@@ -2,105 +2,184 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPZL001">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
CHECK_NO as "checkNo", <!-- 检查单号 -->
PROD_NO as "prodNo", <!-- 生产任务号 -->
PROJ_CODE as "projCode", <!-- 项目号 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
INVENT_CODE as "inventCode", <!-- 部件编码 -->
INVENT_NAME as "inventName", <!-- 部件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零部件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零部件名称 -->
ORG_NO as "orgNo", <!-- 生产组编码 -->
ORG_NAME as "orgName", <!-- 生产组名称 -->
POOR_TYPE as "poorType", <!-- 不良品类 -->
PROBLEM_DESC as "problemDesc", <!-- 质量问题描述 -->
CHECK_USER as "checkUser", <!-- 检查人 -->
CHECK_USER_NAME as "checkUserName", <!-- 检查人名称 -->
STATUS as "status", <!-- 单据状态 0未处理 1已处理 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkNo">
CHECK_NO = #checkNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodNo">
PROD_NO = #prodNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subInventCode">
SUB_INVENT_CODE = #subInventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subInventName">
SUB_INVENT_NAME LIKE CONCAT('%', #subInventName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgNo">
ORG_NO = #orgNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName">
ORG_NAME LIKE CONCAT('%', #orgName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="poorType">
POOR_TYPE = #poorType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkUser">
CHECK_USER = #checkUser#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkUserName">
CHECK_USER_NAME LIKE CONCAT('%', #checkUserName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql id="updateRevise">
UPDATED_BY = #updatedBy#,
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$orderBy$
</isNotEmpty>
<isEmpty property="order">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
CHK_BILLNO as "chkBillno", <!-- 检查单号 -->
ITEM_CODE as "itemCode", <!-- 项目号 -->
ITEM_NAME as "itemName", <!-- 项目名称 -->
UNIT as "unit", <!-- 生产组 -->
NOTES as "notes", <!-- 质量问题描述 -->
PRINC as "princ", <!-- 检查人 -->
STATUS as "status", <!-- 单据状态 0待提交 1已提交 -->
AFFIX as "affix", <!-- 附件 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM hpjx.t_hpzl001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemCode">
ITEM_CODE = #itemCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ">
PRINC = #princ#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
SELECT
<include refid="column"/>
FROM hpjx.t_hpzl001 WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpzl001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpzl001 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO hpjx.t_hpzl001 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
RECEIPT_DATE, <!-- 单据日期 -->
CHK_BILLNO, <!-- 检查单号 -->
ITEM_CODE, <!-- 项目号 -->
ITEM_NAME, <!-- 项目名称 -->
UNIT, <!-- 生产组 -->
NOTES, <!-- 质量问题描述 -->
PRINC, <!-- 检查人 -->
STATUS, <!-- 单据状态 0待提交 1已提交 -->
AFFIX, <!-- 附件 -->
CHECK_NO, <!-- 检查单号 -->
PROD_NO, <!-- 生产任务号 -->
PROJ_CODE, <!-- 项目号 -->
PROJ_NAME, <!-- 项目名称 -->
INVENT_CODE, <!-- 部件编码 -->
INVENT_NAME, <!-- 部件名称 -->
SUB_INVENT_CODE, <!-- 零部件编码 -->
SUB_INVENT_NAME, <!-- 零部件名称 -->
ORG_NO, <!-- 生产组编码 -->
ORG_NAME, <!-- 生产组名称 -->
POOR_TYPE, <!-- 不良品类 -->
PROBLEM_DESC, <!-- 质量问题描述 -->
CHECK_USER, <!-- 检查人 -->
CHECK_USER_NAME, <!-- 检查人名称 -->
STATUS, <!-- 单据状态 0未处理 1已处理 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME <!-- 创建时间 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG
) VALUES (
#companyCode#, #receiptDate#, #chkBillno#, #itemCode#, #itemName#, #unit#,
#notes#, #createdBy#, #status#, #affix#, #createdBy#, #createdTime#
#companyCode#, #depCode#, #receiptDate#, #checkNo#, #prodNo#, #projCode#, #projName#,
#inventCode#, #inventName#, #subInventCode#, #subInventName#, #orgNo#, #orgName#,
#poorType#, #problemDesc#, #checkUser#, #checkUserName#, #status#, #createdBy#,
#createdName#, #createdTime#, #deleteFlag#
)
</insert>
</insert>
<!-- 逻辑删除-->
<delete id="delete">
DELETE FROM hpjx.t_hpzl001 WHERE ID = #id#
UPDATE hpjx.t_hpzl001
SET DELETE_FLAG = 1,
<include refid="updateRevise"/>
WHERE ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpzl001
SET
RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
CHK_BILLNO = #chkBillno#, <!-- 检查单号 -->
ITEM_CODE = #itemCode#, <!-- 项目号 -->
ITEM_NAME = #itemName#, <!-- 项目名称 -->
UNIT = #unit#, <!-- 生产组 -->
NOTES = #notes#, <!-- 质量问题描述 -->
PRINC = #princ#, <!-- 检查人 -->
STATUS = #status#, <!-- 单据状态 0待提交 1已提交 -->
AFFIX = #affix#, <!-- 附件 -->
POOR_TYPE = #poorType#, <!-- 不良品类 -->
PROBLEM_DESC = #problemDesc#, <!-- 质量问题描述 -->
CHECK_USER = #checkUser#, <!-- 检查人 -->
CHECK_USER_NAME = #checkUserName#, <!-- 检查人名称 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
</update>
<!-- 提交操作 -->
<update id="operator">
<!-- 已处理 -->
<update id="doProcess">
UPDATE hpjx.t_hpzl001
SET
STATUS = #status#, <!-- 单据状态 0待提交 1已提交 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
STATUS = #status#,
CHECK_USER = #checkUser#, <!-- 检查人 -->
CHECK_USER_NAME = #checkUserName#, <!-- 检查人名称 -->
<include refid="updateRevise"/>
WHERE ID = #id#
</update>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPZL001A">
<sql id="column">
A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
A.CHECK_ID as "checkId", <!-- 检查单ID -->
A.DOC_TYPE as "docType", <!-- 文件类型 -->
A.DOC_ID as "docId", <!-- 文件ID -->
B.DOC_NAME as "docName", <!-- 文件名称 -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime" <!-- 修改时间 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deptCode">
A.DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkId">
A.CHECK_ID = #checkId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docType">
A.DOC_TYPE = #docType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
A.DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.UPDATED_TIME = #updatedTime#
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$orderBy$
</isNotEmpty>
<isEmpty property="order">
A.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001A">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPZL001A A, ${platSchema}.TEUDM02 B
WHERE 1=1
AND A.DOC_ID = B.DOC_ID
<include refid="condition"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPZL001A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPZL001A (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEPT_CODE, <!-- 部门编码 预留 -->
CHECK_ID, <!-- 巡检单ID -->
DOC_TYPE, <!-- 文件类型 -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #deptCode#, #checkId#, #docType#, #docId#, #createdBy#,
#createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPZL001A WHERE ID = #id#
</delete>
</sqlMap>
package com.baosight.hpjx.hp.zl.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.util.AssertUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/2/4,11:23
*/
public class HPZLTools {
/**
* 查询
*
* @param id
* @return
*/
public static HPZL001 getById(Long id) {
AssertUtils.isNull(id, "质检单号不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HPZL001> results = DaoBase.getInstance().query(HPZL001.QUERY, queryMap);
AssertUtils.isNull(results, String.format("质检单[%s]信息不存在", id));
return results.get(0);
}
/**
* 查询
*
* @param checkNo
* @return
*/
public static HPZL001 get(String checkNo) {
AssertUtils.isEmpty(checkNo, "质检单号不能为空");
Map queryMap = new HashMap();
queryMap.put("checkNo", checkNo);
List<HPZL001> results = DaoBase.getInstance().query(HPZL001.QUERY, queryMap);
AssertUtils.isNull(results, String.format("质检单号[%s]信息不存在", checkNo));
return results.get(0);
}
}
......@@ -32,7 +32,7 @@ public class CommonMethod {
* 公用下拉方法
*/
public static void initBlock(EiInfo inInfo, List<DdynamicEnum> tableParams, Map<String, Object> selectParams){
initBlock(inInfo, tableParams, selectParams,true);
initBlock(inInfo, tableParams, selectParams,false);
}
/**
......
$(function () {
// 登录页加载完成时,进行浏览器版本检测
window.onload = function () {
var BROWSER_VERSION = 9;
var browser = (function () {
var ua = navigator.userAgent, tem,
M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
if (/trident/i.test(M[1])) {
tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
return 'IE ' + (tem[1] || '');
}
if (M[1] === 'Chrome') {
tem = ua.match(/\b(OPR|Edge)\/(\d+)/);
if (tem != null) return tem.slice(1).join(' ').replace('OPR', 'Opera');
}
M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];
if ((tem = ua.match(/version\/(\d+)/i)) != null) M.splice(1, 1, tem[1]);
return M.join(' ');
})();
var BrowserVersion = browser.split(" ");
if ((/^(MS)?( )?IE/).test(browser) && BrowserVersion[1] < BROWSER_VERSION) {
$(".warning-window").css("display", "block");
$(".i-overlay").css("display", "block");
}
if ((/^(MS)?( )?IE/).test(browser) && BrowserVersion[1] < BROWSER_VERSION - 1) {
$("#login").attr("disabled", true);
}
};
$(".i-close").on("click", function () {
$(".warning-window").css("display", "none");
$(".i-overlay").css("display", "none");
});
//放大镜
$(".i-zoom-close").on("click", function () {
$(".zoom-window").css("display", "none");
$(".i-overlay").css("display", "none");
});
$(".info-detail").on("click", function () {
$(".zoom-window").css("display", "block");
$(".i-overlay").css("display", "block");
});
$.fn.textScroll = function (options) {
var defaults = {
duration: 8000,//滚动总时长控制
mode: 'normal',//滚动模式:普通normal;逐行line
perDistance: 18//line模式下每次滚动距离
},
that = this,
scrollInterval,
content = this.find(".text-content");
var items = $.extend({}, defaults, options);
//添加占位元素,处理无法滚动到底的情况
function addHoldDiv(stage, textContent) {
if (items.mode === 'no-gap') {
that.append(content.clone().addClass("second-text"));
} else {
var holdDiv = "<div class='hold-scroll'></div>";
stage.append(holdDiv);
var divHeight = stage.height() + textContent.height();
$(".hold-scroll").css({"width": "100%", "height": divHeight, "color": "transparent"});
}
}
//根据不同模式添加动画
function addAnimate() {
if (items.mode === 'normal' || items.mode === 'no-gap') {
var scrollPercent = that.scrollTop() / content.outerHeight(true);
if (that.scrollTop() === 0) {
that.animate({scrollTop: '0'}, 1000);
}
that.animate({scrollTop: content.outerHeight(true)}, Math.round(items.duration * (1 - scrollPercent)), "linear");
that.animate({scrollTop: '0'}, 0, arguments.callee);
} else if (items.mode === 'line') {
var times = Math.ceil(content.outerHeight(true) / items.perDistance);
scrollInterval = setInterval(function () {
if (content.outerHeight(true) - that.scrollTop() <= 0) {
that.animate({scrollTop: 0}, 0);
} else {
that.animate({scrollTop: that.scrollTop() + items.perDistance}, 0);
}
}, Math.round(items.duration / times));
}
}
addHoldDiv(that, content);
that.niceScroll({
'autohidemode': 'false'
});
that.mouseenter(function () {
if (items.mode === 'normal' || items.mode === 'no-gap') {
that.stop(true);
} else if (items.mode === 'line') {
clearInterval(scrollInterval);
}
that.getNiceScroll().show();
});
that.mouseleave(function (e) {
var targetElement = $(e.toElement);
if (targetElement.hasClass("nicescroll-rails-vr") || targetElement.hasClass("nicescroll-cursors")) {
targetElement.one("mouseleave", function (e) {
if ($(e.toElement) !== that && !$(e.toElement).hasClass("nicescroll-rails-vr")) {
that.getNiceScroll().hide();
addAnimate();
}
});
} else if (!targetElement.hasClass("nicescroll-rails-vr") && !targetElement.hasClass("nicescroll-cursors")) {
that.getNiceScroll().hide();
addAnimate();
}
});
that.mouseleave();
};
loginClick = function () {
var loginForm = document.getElementsByTagName("form")[0];
var urlParam = location.href.substr(location.href.indexOf("?") + 1);
if (urlParam.indexOf("p_redirect") !== -1) {
var keyString = urlParam.split('=')[0];
var valueString =urlParam.split('=')[1];
if (keyString === "p_redirect") {
var tmpInput = document.createElement("input");
tmpInput.type = "hidden";
tmpInput.name = "p_redirect";
tmpInput.value = valueString;
loginForm.appendChild(tmpInput);
}
}
loginForm.submit();
// 将密码框的值修改为加密后的值
var loginPublicKey = $("#__LOGIN_PUBLICKEY__").val();
if(isAvailable(loginPublicKey)){
var encrypt = new JSEncrypt();
encrypt.setPublicKey(loginPublicKey);
var encryptedUsername = encrypt.encrypt($("input[name='p_username1']").val());
$("input[name='p_username']").val(encryptedUsername);
var encryptedPassword = encrypt.encrypt($("input[name='p_password1']").val());
$("input[name='p_password']").val(encryptedPassword);
}
};
//判断是否值能获取的方法
function isAvailable(obj) {
if (obj === undefined) {
return false;
}
if (obj === null) {
return false;
}
if (obj === "null") {
return false;
}
return obj !== "";
}
function getParameterByName(name, url) {
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) {
return null;
}
if (!results[2]) {
return null;
}
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
});
function downloadChrome() {
downloadUrl = ctx + "/EU/DM/EUDM31.jsp";
href = downloadUrl;
window.location.href = href;
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.baosight.iplat4j.core.FrameworkInfo" %>
<%@ page import="com.baosight.iplat4j.core.license.LicenseStub" %>
<%@ page import="com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext" %>
<%@ page import="com.baosight.iplat4j.core.util.StringUtils" %>
<%@ page import="java.net.URLDecoder" %>
<%@ page import="com.baosight.iplat4j.common.constant.RSAConstants" %>
<%@ page import="com.baosight.iplat4j.ed.service.PlatApplicationDynamicContext" %>
<%@ page import="com.baosight.iplat4j.core.ei.EiInfo" %>
<%@ page import="com.baosight.iplat4j.core.ei.EiConstant" %>
<%@ page import="com.baosight.iplat4j.core.service.soa.XLocalManager" %>
<%@ page import="com.baosight.iplat4j.core.log.LoggerFactory" %>
<%@ page import="com.baosight.iplat4j.core.log.Logger" %>
<%@ page import="java.util.Map" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%
org.springframework.security.core.context.SecurityContextHolder.clearContext();
LicenseStub.setLicenseDir(application.getRealPath("/WEB-INF"));
String[] ret = LicenseStub.checkLicense2();
boolean valid = "true".equals(ret[0]); //LicenseStub.checkLicense2();
int days = 0;
if (!"".equals(ret[2]) && !"0".equals(ret[2])) {
days = Integer.parseInt(ret[2]);
}
String licMsg = valid ? (("false".equals(ret[3]) && days >= -10 && days < 0) ? "<div style='color:#ee9933;font-weight:bold;font-size:18px'>许可证还有[" + (-days) + "]天将过期!</div>" : "")
: "<div style='color:red;font-weight:bold;font-size:22px'>许可证非法!</div>";
Exception exp = (Exception) request.getAttribute("AuthenticationException");
String user = (String) request.getAttribute("AuthenticationUser");
if (!org.springframework.util.StringUtils.isEmpty(request.getParameter("expmsg"))) {
String expmsg = request.getParameter("expmsg");
exp = new Exception(URLDecoder.decode("Exception:" + expmsg));
}
String loginErrTag = "0";
if (!org.springframework.util.StringUtils.isEmpty(request.getParameter("login_error"))) {
loginErrTag = request.getParameter("login_error");
}
String username = "";
String password = "";
String captcha = "";
if (exp != null) {
username = user;
}
String usrHeader = request.getHeader("user-agent");
String projectCname = FrameworkInfo.getProjectCname();
String projectTypeDesc = FrameworkInfo.getProjectTypeDesc();
// 获取iPlatUI静态资源地址
String iPlatStaticURL = FrameworkInfo.getPlatStaticURL(request);
String theme = "ant";
// 获取Context根路径,考虑到分布式部署的场景,不能直接使用WebContext
String iPlatContext = FrameworkInfo.getPlatWebContext(request);
//读取加密配置,以及公钥
String loginPublicKey = "";
if ("on".equals(RSAConstants.cryptoPasswordEnable)) {
loginPublicKey = RSAConstants.loginRsaPublicKey;
}
final Logger logger = LoggerFactory.getLogger("index");
String LoginLogo = "default";
String LoginSystemName = "";
try {
EiInfo setInfo = new EiInfo();
setInfo.set(EiConstant.serviceName, "EDPR10");
setInfo.set(EiConstant.methodName, "getLoginConfig");
logger.info("调用EDPR10.getLoginConfig!");
EiInfo getInfo = XLocalManager.call(setInfo);
int status = getInfo.getStatus();
if(status < 0){
logger.error("配置首页获取失败:调用EDPR10.getLoginConfig失败!" + getInfo.getMsg());
}else{
Map configs= (Map) getInfo.get("configs");
if (configs != null){
String enableStatus=configs.get("enableStatus")==null ?"0":configs.get("enableStatus").toString();
if (!enableStatus.equals("0")) {
String logoName=configs.get("logoName").toString();
LoginSystemName=configs.get("systemName").toString();
if (!logoName.isEmpty()){
LoginLogo=iPlatContext+"/lessees/logoFile/"+logoName;
}
}
}
}
}catch (Exception e) {
logger.error("配置首页获取图片和系统名称失败!" + e.getMessage(), e);
}
%>
<c:set var="ctx" value="<%=iPlatContext%>"/>
<c:set var="iPlatStaticURL" value="<%=iPlatStaticURL%>"/>
<c:set var="loginExp" value="<%=exp%>"/>
<c:set var="theme" value="<%=theme%>" scope="session"/>
<c:set var="LoginLogo" value="<%=LoginLogo%>"/>
<c:set var="LoginSystemName" value="<%=LoginLogo%>"/>
<html class="i-theme-blue">
<head>
<meta charset="utf-8"/>
<meta name="robots" content="noindex, nofollow"/>
<meta name="description" content="登录界面"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<% if (StringUtils.isNotEmpty(projectCname) && StringUtils.isNotEmpty(projectTypeDesc)) { %>
<title><%=projectCname%>[<%=projectTypeDesc%>]登录界面</title>
<% } else { %>
<title>登录界面</title>
<% } %>
<link rel="shortcut icon" href="iplat.ico" type="image/x-icon">
<link rel="stylesheet" id="css-main" href="${iPlatStaticURL}/iplatui/assets/css/iplat.ui.bootstrap.min.css">
<link href="${iPlatStaticURL}/iPlatV6-login.css" rel="stylesheet" type="text/css"/>
<%--<link rel="stylesheet" type="text/css" href="${iPlatStaticURL}/iplatui/css/iplat.ui.ued.login.css">&lt;%&ndash;ued亮色样式&ndash;%&gt;--%>
<script src="${iPlatStaticURL}/kendoui/js/jquery.min.js"></script>
<!--[if lte IE 8]>
<link href="${iPlatStaticURL}/iPlatV6-login-ie.css" rel="stylesheet" type="text/css"/>
<script src="${iPlatStaticURL}/iplatui/assets/js/polyfills/iplat.ui.ie8.polyfills.min.js"></script>
<![endif]-->
<script src="${iPlatStaticURL}/iPlatV6-login.js"></script>
<%--引入RSA加密js--%>
<script src="${iPlatStaticURL}/iplatui/js/jsencrypt.js"></script>
<%
String domain = FrameworkInfo.getProjectAppTopDomain();
if (domain != null && domain.startsWith(".")) {
domain = domain.substring(1);
%>
<script type="text/javascript">
try {
document.domain = '<%=domain%>';
} catch (ex) {
alert('model not valid[<%=domain%>]');
}
</script>
<%
}
%>
</head>
<body class="i-theme-${theme}">
<div class="main">
<div class="wrapper">
<div class="content overflow-hidden">
<div class="row">
<%--公钥参数--%>
<input id="__LOGIN_PUBLICKEY__" inline="true" type="hidden" value="<%=loginPublicKey%>"/>
<div class="col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3">
<div class="login-block <c:if test="${not empty loginExp}"> animated shake</c:if>">
<div class="form-header">
<c:choose>
<c:when test="${LoginLogo == 'default'}">
<div class="logodefault">
<div style="color: #004B9D;margin-left: 63%"><%=LoginSystemName%></div>
</div>
</c:when>
<c:otherwise>
<div class="logo">
<img src="<%=LoginLogo%>" style="float: left;height: 43px">
<div style=" width: 2px;height: 43px;background-color: rgba(28, 29, 35, 0.04);float: left;margin-left: 10px;margin-right: 10px"></div>
<img src="iplatui/img/login/bld_logo.png" style="float: left;width: 90px;height: 43px;">
<div style="color: #004B9D;margin-left: 58%"><%=LoginSystemName%></div>
</div>
</c:otherwise>
</c:choose>
<p>用户登录</p>
<p class="text-danger">
<c:if test="${not empty loginExp}">
<%
String loginError = exp.getMessage();
int index = loginError.indexOf("Exception:");
if (index >= 0) {
loginError = loginError.substring(index + 10);
}
if (!"1".equals(loginErrTag)&&
(request.getAttribute("AuthenticationUser") == null || request.getAttribute("AuthenticationUser") == "")) {
loginError = "请输入用户名";
}
%>
<%=loginError%>
</c:if>
</p>
</div>
<form autocomplete="off" class="form-horizontal push-10-t push-10" action="${ctx}/login"
method="post" onsubmit="javascript:return loginClick();">
<div class="form-group">
<div class="col-xs-12">
<input class="form-input" type="text"
<%-- value="<%=encoder.encodeForHTMLAttribute(username)%>" id="p_username"--%>
name="p_username1"
placeholder="用户名"/>
</div>
</div>
<div class="form-group password">
<div class="col-xs-12">
<input class="form-input" type="password"
<%-- value="<%=encoder.encodeForHTMLAttribute(password)%>" id="p_password"--%>
name="p_password1"
autocomplete="off"
placeholder="密码"/>
</div>
</div>
<input class="form-input" type="text"
name="p_username"
placeholder="用户名" style="display: none"/>
<input class="form-input" type="password"
name="p_password"
autocomplete="off"
placeholder="密码" style="display: none"/>
<div class="form-group remember">
<div class="col-xs-6">
<%--<label class="css-input">--%>
<%--<input type="checkbox" id="login-remember-me" value="false"--%>
<%--name="remember-me"/><span class="i-icon"></span>--%>
<%--2周内免登录--%>
<%--</label>--%>
<%--<a href="${ctx}/web/XS0102">注册账号</a>--%>
</div>
<div class="col-xs-6" style="text-align: right">
<%--<a href="${ctx}/web/XS0102" style="margin-right: 6px">注册</a>--%>
<a href="${ctx}/web/XS0106">忘记密码?</a>
</div>
</div>
<div class="form-group log-in">
<div class="col-xs-12">
<button id="login" class="login-btn" type="submit">登录
</button>
</div>
</div>
</form>
</div>
</div>
<div class="col-lg-6 col-lg-offset-3 col-sm-8 col-sm-offset-2">
<div class="warning-window" style="margin-top: -354px; height: 354px;">
<div class="i-region-header">警告<span class="i-icon i-close"></span>
</div>
<div class="i-region-content">
<div class="col-md-12">
<span class="warning-msg">请使用IE8或Chrome v35及以上浏览器访问</span>
</div>
<div class="col-lg-6 col-lg-offset-3 col-sm-8 col-sm-offset-2" style="padding: 0">
<div class="browser-icon col-md-12" style="padding: 0">
<div class="col-xs-5">
<img src="${iPlatStaticURL}/iplatui/img/icon_ie.png" width="104" height="101">
</div>
<div class="col-xs-5 col-xs-offset-2">
<img src="${iPlatStaticURL}/iplatui/img/icon_chrome.png" width="101" height="101">
</div>
</div>
<div class="browser-name col-md-12" style="padding: 0">
<div class="col-xs-5">
<span class="ie-name">IE</span>
</div>
<div class="col-xs-5 col-xs-offset-2">
<span class="chrome-name">Chrome</span>
</div>
</div>
<div class="download-browser col-md-12" style="padding: 0">
<div class="col-xs-5">
<input class="download-ie download-btn" type="button" value="点击下载"
onclick="window.open('https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads')"/>
</div>
<div class="col-xs-5 col-xs-offset-2">
<input class="download-chrome download-btn" type="button" value="点击下载"
onclick="window.open('https://www.google.com/chrome/browser/desktop/index.html')"/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="info">
<div class="row">
<div class="footer-center col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3">
<div class="phone-number">
&emsp;
<%-- <span>运维平台热线 8008200220、4008210860、26646708、26642410</span>--%>
</div>
<div class="copyright-info">
<span>©上海宝信软件股份有限公司 Copyright ©2020 BAOSIGHT Corporation. All Rights Reserved</span>
</div>
</div>
<div class="footer-right col-sm-2 col-md-3">
<%-- <div class="footer-logo">--%>
<%-- <img src="${iPlatStaticURL}/iplatui/img/icon_ie.png" width="51"--%>
<%-- onclick="window.open('https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads')">--%>
<%-- </div>--%>
<div class="footer-logo">
<img src="${iPlatStaticURL}/iplatui/img/icon_chrome.png" width="51"
onclick="downloadChrome()">
</div>
</div>
</div>
</div>
</div>
<div class="i-overlay"></div>
</body>
<script type="text/javascript">
var ctx = "${ctx}";
</script>
</html>
$(function () {
/* $("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
buildOption("scrb");
});*/
$("#QUERY").on("click", function (e) {
//resultGrid.dataSource.page(1);
var inInfo = new EiInfo();
EiCommunicator.send("HPBI001","query", inInfo, {
// 服务调用成功后的回调函数 onSuccess
onSuccess: function(response){
$('#mrsj').empty();
var mrsj = response.get('mrsj');
$.each(mrsj, function(index, item) {
str =
'<tr>' +
'<td width=\"30%\">' + item.SERIES + '</td>' +
'<td width=\"70%\">' + item.VALUE + '</td>' +
'</tr>';
$('#mrsj').append(str);
})
buildOption("scrb");
},
// 服务调用失败后的回调函数 onFail
onFail: function(errorMsg, status, e) {
; // 调用发生异常
console.log(errorMsg)
}
}, {async: true});
resultGrid.dataSource.page(1);
buildOption("scrb");
});
// 导出
$("#EXPORT").on("click", function () {
//$(".k-item k-menu-item k-first k-last").click();
//k-link k-menu-link
//$("a[tabindex='0']")[0].click();
$(".k-menu-link").click();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
{
field: "operator",
template: function (item) {
let auditStatus = item.status;
let template = '';
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',1)" >提交</a>';
}
// else if (auditStatus == 1) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
// 'onclick="check(' + item.id + ',0)" >撤回</a>';
// }
return template;
}
}
],
}
});
function check(id, auditStatus) {
const inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-status", auditStatus);
EiCommunicator.send('HPSC001', 'check', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
},
{
async: false
}
);
}
function buildOption(vid){
var myChart = echarts.init(document.getElementById(vid));
var colors = ['#5470C6', '#91CC75', '#EE6666'];
var option = {
title: {
text: '柱状图与折线图'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
legend: {
orient: 'horizontal',
left: 'center',
top: 'bottom', // 放置在底部
data: ['生产产量(吨)', '生产人数(吨)', '人均产量(kg)']
},
xAxis: {
type: 'category',
//boundaryGap: false,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: [
{
type: 'value',
//name: 'Y轴1',
// 配置项1...
},
{
type: 'value',
//name: 'Y轴2',
// 配置项2...
}
],
series: [
{
name: '生产产量(吨)',
type: 'bar',
color: '#4874CB',
yAxisIndex: 0,
barWidth: 15,
data: [120, 200, 150, 80, 70, 110, 130]
},
{
name: '生产人数(吨)',
type: 'bar',
color: '#EE822F',
yAxisIndex: 0,
barWidth: 15,
data: [130, 120, 200, 160, 80, 70, 140]
},
{
name: '人均产量(kg)',
type: 'line',
color:'#F2BA03',
yAxisIndex: 1, // 指定该系列在y轴上的位置,默认是0,可选为:0 | 1 | 2 | ... | n (正整数)
data: [130, 120, 200, 160, 80, 70, 140]
}
]
};
myChart.setOption(option, true);
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<script type="text/javascript" src="../HP/BI/js/echarts.js"></script>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="报表管理">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect cname="工厂" defaultValue="0" ename="inqu_status-0-factory" colWidth="3">
<EF:EFOption label="黄陂" value="黄陂"/>
<EF:EFOption label="红安" value="红安"/>
</EF:EFSelect>
<EF:EFDatePicker ename="inqu_status-date" colWidth="3" cname="日期:"
format="yyyy-MM-dd"/>
</div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion>
<EF:EFRegion id="result1" title="每日数据">
<div style="height:200px;width:50%">
<table id = 'mrsj' style="text-align: center;height:100%;width:100%;border: 0">
</table>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="汇总数据">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="indNmae" cname="指标名称" readonly="true"/>
<EF:EFColumn ename="dayValue" cname="日" readonly="true"/>
<EF:EFColumn ename="monValue" cname="月" readonly="true"/>
<EF:EFColumn ename="yearValue" cname="年" readonly="true"/>
<EF:EFColumn ename="janValue" cname="1月" readonly="true"/>
<EF:EFColumn ename="febValue" cname="2月" readonly="true"/>
<EF:EFColumn ename="marValue" cname="3月" readonly="true"/>
<EF:EFColumn ename="aprValue" cname="4月" readonly="true"/>
<EF:EFColumn ename="mayValue" cname="5月" readonly="true"/>
<EF:EFColumn ename="junValue" cname="6月" readonly="true"/>
<EF:EFColumn ename="julValue" cname="7月" readonly="true"/>
<EF:EFColumn ename="augValue" cname="8月" readonly="true"/>
<EF:EFColumn ename="sepValue" cname="9月" readonly="true"/>
<EF:EFColumn ename="octValue" cname="10月" readonly="true"/>
<EF:EFColumn ename="novValue" cname="11月" readonly="true"/>
<EF:EFColumn ename="decValue" cname="12月" readonly="true"/>
</EF:EFGrid>
<div class="row">
<div id="scrb" style="height:300px;width: 50%"></div>
</div>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/BI/HPBI001.js"></script>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -70,6 +70,16 @@ $(function() {
refreshSelect(container, inInfo);
}
}, {
field: "material",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['param1Field'];
}
}
return "";
}
}, {
field: "unit",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
......
......@@ -48,8 +48,8 @@
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="purchaseNo" cname="采购单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="90" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true">
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
......@@ -57,8 +57,8 @@
<EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center"/>
<EF:EFColumn ename="material" cname="材质" width="120" align="center" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" width="120" align="center" enable="false"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right" readonly="true"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" readonly="true"/>
<EF:EFColumn ename="oldPurchaseNo" cname="原采购单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
......
......@@ -79,7 +79,7 @@ let exportPrint = function () {
if (projCodeTemp == null) {
projCodeTemp = projCode;
} else if (projCodeTemp != projCode) {
message("第" + (i + 1) + "行项目不一致,请选择同一个项目的数据");
message("第" + (i + 1) + "行项目不一致,请选择同一个项目的数据");
return;
}
saleIds.push(rows[i]['id']);
......
......@@ -31,20 +31,20 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="inventRecordId" cname="存货档案ID" hidden="true"/>
<EF:EFComboColumn ename="whCode" cname="仓库编码" width="120" columnTemplate="#=textField#"
itemTemplate="#=textField#" blockName="wh_record_block_id"
textField="textField" valueField="valueField"
align="center" filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true">
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center"/>
<EF:EFColumn ename="material" cname="材质" width="120" align="center"/>
<EF:EFColumn ename="unit" cname="单位" width="120" align="center"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称" width="120" columnTemplate="#=textField#"
itemTemplate="#=textField#" blockName="wh_record_block_id"
textField="textField" valueField="valueField"
align="center" filter="contains" enable="false">
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" enable="false"/>
<EF:EFColumn ename="material" cname="材质" width="120" align="center" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" width="120" align="center" enable="false"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
......
......@@ -31,23 +31,23 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="prodNo" cname="生产单号" width="120" align="center" required="true"/>
<EF:EFColumn ename="prodNo" cname="生产单号" width="120" align="center" required="true" enable="false"/>
<EF:EFComboColumn ename="whCode" cname="仓库编码" width="120" columnTemplate="#=textField#"
itemTemplate="#=textField#" blockName="wh_record_block_id"
textField="textField" valueField="valueField"
align="center" filter="contains" required="true">
align="center" filter="contains" required="true" enable="false">
</EF:EFComboColumn>
<EF:EFColumn ename="projCode" cname="项目编号" width="120" align="center" required="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="inventCode" cname="部件名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="subInventCode" cname="零部件名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="length" cname="长" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="width" cname="宽" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="thich" cname="厚" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right" required="true"/>
<EF:EFColumn ename="unitWeight" cname="单重" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="remark" cname="备注" width="120" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编号" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="inventCode" cname="部件名称" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="subInventCode" cname="零部件名称" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="length" cname="长" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="width" cname="宽" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="thich" cname="厚" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right" required="true" enable="false"/>
<EF:EFColumn ename="unitWeight" cname="单重" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="remark" cname="备注" width="120" align="center" enable="false"/>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
......
......@@ -10,7 +10,7 @@
<div class="row">
<EF:EFSelect ename="inqu_status-0-custType" cname="供应商类型" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_type_block_id" textField="textField" valueField="valueField"/>
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-custName" cname="供应商名称" colWidth="3" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="3">
......@@ -24,12 +24,10 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="custCode" cname="供应商编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="custName" cname="供应商名称" width="100" required="true"/>
<EF:EFComboColumn ename="custType" cname="供应商类型" width="100" align="center"
blockName="company_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"
optionLabel=" " required="true">
<EF:EFComboColumn ename="custType" cname="供应商类型" width="100" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="custName" cname="供应商名称" width="100" required="true"/>
<EF:EFColumn ename="address" cname="地址" width="120" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
......
......@@ -8,10 +8,9 @@
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput cname="客户名称" ename="custName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-custType" cname="客户类型" colWidth="3">
<EF:EFSelect ename="custType" blockId="inqu_status" cname="客户类型" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_type_block_id" textField="textField" valueField="valueField"/>
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="3">
<EF:EFOption label="全部" value=""/>
......@@ -24,9 +23,8 @@
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="custCode" cname="客户编码" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center"
blockName="company_type_block_id" textField="textField" valueField="valueField"
required="true">
<EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="custName" cname="客户名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="address" cname="地址" width="150" align="center" required="true"/>
......
......@@ -17,12 +17,12 @@ $(function() {
}, {
field: "width",
template: function (options) {
return options.length == 0 ? "-" : options.length;
return options.width == 0 ? "-" : options.width;
}
}, {
field: "thick",
template: function (options) {
return options.length == 0 ? "-" : options.length;
return options.thick == 0 ? "-" : options.thick;
}
}, {
field: "createdName",
......
......@@ -30,12 +30,12 @@
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" requird="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" maxLength="50"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" maxLength="50" enable="false"/>
<EF:EFColumn ename="length" cname="长" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="material" cname="材质" width="100" align="center" required="true"/>
<EF:EFColumn ename="coefficient" cname="系数" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="coefficient" cname="系数" width="100" align="right" format="{0:N2}" maxLength="10" defaultValue="1"/>
<EF:EFColumn ename="unit" cname="单位" width="100" align="center" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
......
......@@ -12,13 +12,13 @@
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-projType" cname="项目类型" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect cname="单据状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
......@@ -38,27 +38,27 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projCode" enable="false" cname="项目编码" readonly="true"/>
<EF:EFComboColumn ename="projType" cname="项目类型" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="projCode" enable="false" cname="项目编码" readonly="true"/>
<EF:EFColumn required="true" ename="projName" cname="项目名称" readonly="true"/>
<EF:EFComboColumn ename="princ1" cname="本公司项目负责人" width="120" align="center" required="true"
<EF:EFComboColumn ename="princ1" cname="项目负责人" width="120" align="center" required="true"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="princ2" cname="客户项目负责人" width="120" align="center" required="true"
<EF:EFComboColumn ename="princ2" cname="客户负责人" width="120" align="center" required="true"
blockName="customer_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注" />
<EF:EFComboColumn enable="false" align="center" ename="status" cname="状态" readonly="true">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
</EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -16,13 +16,13 @@
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-projType" cname="项目类型" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect cname="物料提交状态" optionLabel="全部" ename="inqu_status-0-materialStatus" colWidth="3">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="部分提交" value="1"/>
......@@ -43,29 +43,28 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFComboColumn ename="projType" cname="项目类型" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#">
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFComboColumn ename="princ1" cname="本公司项目负责人" width="120" align="center" required="true"
<EF:EFComboColumn ename="princ1" cname="项目负责人" width="120" align="center" required="true"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="princ2" cname="客户项目负责人" width="120" align="center" required="true"
<EF:EFComboColumn ename="princ2" cname="客户负责人" width="120" align="center" required="true"
blockName="customer_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn required="true" align="center" ename="materialStatus" cname="物料提交状态" defaultValue="0">
<EF:EFColumn enable="false" ename="remark" cname="备注"/>
<EF:EFComboColumn align="center" ename="materialStatus" cname="物料提交状态" defaultValue="0">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="部分提交" value="1"/>
<EF:EFOption label="全部提交" value="2"/>
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="remark" cname="备注"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
......
$(function() {
let projNameGlobalData = [];
let inventNameGlobalData = [];
let subInventNameGlobalData = [];
let orgNameGlobalData = [];
$(function () {
// 查询
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
});
IPLATUI.EFGrid = {
"result": {
pageable: {
input: true,
numeric: false,
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "receiptDate",
attributes: {
class: "i-input-readonly"
}
}, {
field: "operator",
template: function (item) {
let status = item.status;
if (status === "0") {
return '<a style="cursor: pointer;display: flex;justify-content: center;" ' +
'onclick="doProcess(' + item.id + ', \'' + item.checkNo + '\')" >处理</a>';
} else {
return "";
}
}
}, {
field: "problemPhoto",
template: function (item) {
let status = item.status;
if (!isBlank(item.checkNo)) {
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ', 1)" >附件清单</a>';
} else {
return "";
}
}
}, {
field: "processPhoto",
template: function (item) {
let status = item.status;
if (!isBlank(item.checkNo)) {
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ', 2)" >附件清单</a>';
} else {
return "";
}
}
},
// {
// field: "projCode",
// template: function (dataItem) {
// for (let i = 0; i < projNameGlobalData.length; i++) {
// if (projNameGlobalData[i]['valueField'] === dataItem['projCode']) {
// return projNameGlobalData[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let inInfo = new EiInfo();
// // 1.部分分派,2.全部分派
// inInfo.set("inqu_status-0-statuses", [1, 2]);
// inInfo.set("serviceName", "HPSC005");
// inInfo.set("methodName", "queryProjComboBox");
// inInfo.set("blockId", "proj_prod_block_id");
// inInfo.set("field", options.field);
// refreshSelect(container, inInfo);
// }
// }, {
// field: "inventCode",
// template: function (dataItem) {
// for (let i = 0; i < inventNameGlobalData.length; i++) {
// if (inventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
// return inventNameGlobalData[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let projCode = options.model["projCode"];
// let inInfo = new EiInfo();
// inInfo.set("inqu_status-0-projCode", isBlank(projCode) ? " " : projCode);
// inInfo.set("serviceName", "HPSC003");
// inInfo.set("methodName", "queryInventComboBox");
// inInfo.set("blockId", "invent_record_block_id");
// inInfo.set("field", options.field);
// refreshSelect(container, inInfo);
// }
// }, {
// field: "subInventCode",
// template: function (dataItem) {
// for (let i = 0; i < subInventNameGlobalData.length; i++) {
// if (subInventNameGlobalData[i]['valueField'] === dataItem['subInventCode']) {
// return subInventNameGlobalData[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let inventCode = options.model["inventCode"];
// let inInfo = new EiInfo();
// inInfo.set("inqu_status-0-parentPrdtCode", isBlank(inventCode) ? " " : inventCode);
// inInfo.set("serviceName", "HPSC004");
// inInfo.set("methodName", "queryInventComboBox");
// inInfo.set("blockId", "sub_invent_record_block_id");
// inInfo.set("field", options.field);
// refreshSelect(container, inInfo);
// }
// }, {
// field: "orgNo",
// template: function (dataItem) {
// for (let i = 0; i < orgNameGlobalData.length; i++) {
// if (orgNameGlobalData[i]['valueField'] === dataItem['orgNo']) {
// return orgNameGlobalData[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let subInventCode = options.model["subInventCode"];
// let inInfo = new EiInfo();
// inInfo.set("inqu_status-0-prdtCode", isBlank(subInventCode) ? " " : subInventCode);
// inInfo.set("serviceName", "HPSC005");
// inInfo.set("methodName", "queryOrgComboBox");
// inInfo.set("blockId", "org_prod_block_id");
// inInfo.set("field", options.field);
// refreshSelect(container, inInfo);
// }
// },
{
field: "createdName",
template: function (options) {
return showUserName(options.createdBy, options.createdName);
}
}]
}
}
// 查询
$("#QUERY").on("click", query);
// 选择生产任务
$("#SELECT_PROD").on("click", selectProd);
});
IPLATUI.EFGrid = {
"result": {
pageable: {
input: true,
numeric: false,
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "affix",
template: function (item) {
let affix = item.affix;
if (isBlank(affix)) {
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>';
} else {
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM06.jsp?docId=' + affix
+ '" >下载</a>';
}
}
}, {
field: "operator",
template: function (item) {
let chkBillno = item.chkBillno;
let auditStatus = item.status;
if (auditStatus == 0) {
return '<a style="cursor: pointer;display: flex;justify-content: center;" ' +
'onclick="audit(' + item.id + ',\'' + chkBillno + '\')" >提交</a>';
} else {
return '<a style="cursor: pointer;display: flex;justify-content: center;" ' +
'onclick="unAudit(' + item.id + ',\'' + chkBillno + '\')" >撤回</a>';
}
}
}]
}
};
/**
* 页面加载时执行
*/
$(window).load(function () {
// 项目名称
// let inInfo = new EiInfo();
// EiCommunicator.send("HPSC001", "queryComboBox", inInfo, {
// onSuccess: function (ei) {
// projNameGlobalData = ei.getBlock("proj_record_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// // 部件名称
// EiCommunicator.send("HPSC003", "queryInventComboBox", inInfo, {
// onSuccess: function (ei) {
// inventNameGlobalData = ei.getBlock("invent_record_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// // 零部件名称
// EiCommunicator.send("HPSC004", "queryInventComboBox", inInfo, {
// onSuccess: function (ei) {
// subInventNameGlobalData = ei.getBlock("sub_invent_record_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// // 生产组名称
// EiCommunicator.send("HPSC005", "queryOrgComboBox", inInfo, {
// onSuccess: function (ei) {
// orgNameGlobalData = ei.getBlock("org_prod_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// 查询
query();
});
/**
* 文件上传
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 显示附件清单
*
* @param id
* @param docType
*/
function openUploadFile(id) {
let showUploadFile = function (id, docType) {
JSColorbox.open({
href: "HPSC099?methodName=initLoad",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: function (docId) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-affix", docId);
EiCommunicator.send('HPZL001', 'bindDocIdById', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
href: "HPZL001A?methodName=initLoad&inqu_status-0-checkId=" + id + "&inqu_status-0-docType=" + docType,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
......@@ -79,30 +215,36 @@ function openUploadFile(id) {
* 提交操作
*
* @param id
* @param chkBillno
* @param auditStatus
* @param checkNo
*/
function audit(id, chkBillNo) {
let message = "确认对单号[" + chkBillNo + "]进行提交操作吗? ";
let doProcess = function (id, checkNo) {
let message = "确认将单号[" + checkNo + "]的状态修改为已处理吗? ";
JSUtils.confirm(message, {
ok: function () {
JSUtils.submitGridsData("result", "HPZL001", "audit", true);
JSUtils.submitGridsData("result", "HPZL001", "doProcess", true);
}
});
}
/**
* 撤回操作
*
* @param id
* @param chkBillno
* @param auditStatus
* 挑选生产任务
*/
function unAudit(id, chkBillNo) {
let message = "确认对单号[" + chkBillNo + "]进行撤回操作吗? ";
JSUtils.confirm(message, {
ok: function () {
JSUtils.submitGridsData("result", "HPZL001", "unAudit", true);
}
let selectProd = function () {
JSColorbox.open({
href: "HPZL001B?methodName=initLoad",
title: "<div style='text-align: center;'>生产任务查询</div>",
width: "90%",
height: "80%",
callbackName: selectStockCallback
});
}
/**
* 挑选生产任务回调
*/
let selectStockCallback = function () {
// 刷新页面
query();
// 关闭弹窗
JSColorbox.close();
}
......@@ -8,56 +8,61 @@
<EF:EFPage title="质量巡检单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="inqu_status-0-receiptDate" cname="单据日期" colWidth="3"
<EF:EFDatePicker cname="单据日期" ename="receiptDate" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect ename="inqu_status-0-itemCode" cname="项目名称" colWidth="3"
valueTemplate="#=textField#" template="#=textField#"
textField="textField" valueField="valueField"
required="true" locked="true" filter="contains">
<EF:EFOption label="--请选择--" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零部件名称" ename="subInventName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="工作组" ename="orgName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="检查人" ename="checkUserName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="不良类型" ename="poorType" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.poorType"/>
</EF:EFSelect>
<EF:EFSelect cname="处理状态" ename="status" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="1-已处理" value="1"></EF:EFOption>
<EF:EFOption label="0-未处理" value="0"></EF:EFOption>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-princ" cname="检查人" colWidth="3" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-status" cname="处理状态" colWidth="3">
<EF:EFOption label="--请选择--" value=""/>
<EF:EFOption label="提交" value="1"></EF:EFOption>
<EF:EFOption label="待提交" value="0"></EF:EFOption>
</EF:EFSelect>
</div>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="chkBillno" cname="检查单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="itemCode" cname="项目名称" width="140" columnTemplate="#=textField#"
itemTemplate="#=textField#" blockName="proj_record_block_id"
textField="textField" valueField="valueField" maxLength="20"
required="true" filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="unit" cname="生产组" width="100" readonly="false"/>
<EF:EFColumn ename="notes" cname="质量问题描述" width="100" readonly="false"/>
<EF:EFColumn ename="princ" cname="检查人" width="100" readonly="true"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" align="center" textField="textField"
valueField="valueField" width="100" optionLabel=" ">
<EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="提交" value="1"></EF:EFOption>
<EF:EFOption label="未提交" value="0"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="affix" cname="附件" enable="false" width="100" align="center"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="100" readonly="false"/>
<EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="150" align="center" enable="false"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"
hidden="true"/>
<EF:EFColumn ename="createdBy" cname="创建人" readonly="true" width="150" align="center" enable="false"
hidden="true"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="150" align="center" enable="false"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"
hidden="true"/>
<EF:EFColumn ename="updatedBy" cname="更新人" readonly="true" width="150" align="center" enable="false"
hidden="true"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" readonly="false"/>
<EF:EFColumn ename="checkNo" cname="检查单号" locked="true" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center">
<EF:EFOption label="1-已处理" value="1"></EF:EFOption>
<EF:EFOption label="0-未处理" value="0"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="receiptDate" cname="单据日期" enable="false" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="inventName" cname="部件名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="subInventName" cname="零部件名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="poorType" cname="不良品类" width="100" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hpjx.poorType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="problemDesc" cname="质量问题描述" width="140" align="center" required="true"/>
<EF:EFColumn ename="problemPhoto" cname="问题照片" enable="false" width="100" align="center" required="true"/>
<EF:EFColumn ename="processPhoto" cname="处理照片" enable="false" width="100" align="center" required="true"/>
<EF:EFComboColumn ename="checkUser" cname="检查人" enable="false" width="120" align="center"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="prodNo" cname="生产单号" width="140" align="center" required="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="inventCode" cname="部件编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="subInventCode" cname="零部件编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="150" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
template: function (item) {
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.docId
+ '" >附件下载</a>';
return template;
}
}],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#BTN_DELETE").on("click", deleteFunc);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 隐藏按钮
let status = $("#detail-0-status").val();
if (status == "1") {
$("#UPLOAD_FILE").hide();
$("#BTN_DELETE").hide();
}
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 文件上传
*
* @param id
*/
function uploadFile(id) {
JSColorbox.open({
href: "HPSC099?methodName=initLoad",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(docId) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-checkId", $("#inqu_status-0-checkId").val());
inEiInfo.set("result-0-docType", $("#inqu_status-0-docType").val());
inEiInfo.set("result-0-docId", docId);
EiCommunicator.send('HPZL001A', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
/**
* 删除
*/
function deleteFunc() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPZL001A", "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="查询区域" type="query">
<EF:EFInput cname="质量巡检单ID" ename="checkId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="附件类型" ename="docType" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="项目名称" ename="projName" blockId="detail" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="部件名称" ename="inventName" blockId="detail" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="零部件名称" ename="subInventName" blockId="detail" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="生产组" ename="orgName" blockId="detail" row="0" colWidth="3" readonly="true"/>
</div>
<EF:EFInput cname="状态" ename="status" blockId="detail" row="0" colWidth="3" type="hidden"/>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="200" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 选择
$("#BTN_SELECT").on("click", select);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
};
/**
* 选择库存
*/
let select = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成巡检单吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPZL001B", "select",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
<!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="查询区域" type="query">
<div class="row">
<div class="row">
<EF:EFInput cname="项目号" ename="projCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件编码" ename="prdtCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="生产订单号" ename="productionOrderNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零部件编码" ename="partCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零部件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="生产任务ID" enable="false" width="90" align="center"/>
<EF:EFColumn ename="childId" cname="生产任务子ID" enable="false" width="90" align="center" hidden="true"/>
<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="partName" cname="零部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零部件规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组" enable="false" width="150" align="center"/>
<EF:EFColumn ename="num" cname="计划数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="计划重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<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="partCode" cname="零部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="150"/>
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment