Commit 5d532a82 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hp-smart into dev-ly

 Conflicts:
	src/main/java/com/baosight/hpjx/hp/constant/HPConstant.java
parents bc8f28c2 6cf9f7f8
package com.baosight.hpjx.core.dao; package com.baosight.hpjx.core.dao;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils; import com.baosight.hpjx.util.DateUtils;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
...@@ -120,7 +119,7 @@ public class DaoUtils { ...@@ -120,7 +119,7 @@ public class DaoUtils {
} }
try { try {
BeanUtils.setProperty(bean, "createdBy", userId); BeanUtils.setProperty(bean, "createdBy", userId);
BeanUtils.setProperty(bean, "updatedBy", ""); BeanUtils.setProperty(bean, "updatedBy", userId);
} catch (Exception e) { } catch (Exception e) {
log.warn("写入创建人ID失败", e); log.warn("写入创建人ID失败", e);
} }
...@@ -133,7 +132,7 @@ public class DaoUtils { ...@@ -133,7 +132,7 @@ public class DaoUtils {
userName = "System"; userName = "System";
} }
BeanUtils.setProperty(bean, "createdName", userName); BeanUtils.setProperty(bean, "createdName", userName);
BeanUtils.setProperty(bean, "updatedName", ""); BeanUtils.setProperty(bean, "updatedName", userName);
} catch (Exception e) { } catch (Exception e) {
log.warn("写入创建人姓名失败", e); log.warn("写入创建人姓名失败", e);
} }
...@@ -155,8 +154,9 @@ public class DaoUtils { ...@@ -155,8 +154,9 @@ public class DaoUtils {
} }
// 创建时刻 // 创建时刻
try { try {
BeanUtils.setProperty(bean, "createdTime", DateUtils.shortDateTime()); String dateTime = DateUtils.shortDateTime();
BeanUtils.setProperty(bean, "updatedTime", ""); BeanUtils.setProperty(bean, "createdTime", dateTime);
BeanUtils.setProperty(bean, "updatedTime", dateTime);
} catch (Exception e) { } catch (Exception e) {
log.error("写入创建时刻失败:{}", e.getMessage(), e); log.error("写入创建时刻失败:{}", e.getMessage(), e);
} }
...@@ -179,7 +179,7 @@ public class DaoUtils { ...@@ -179,7 +179,7 @@ public class DaoUtils {
userId = "System"; userId = "System";
} }
map.put("createdBy", userId); map.put("createdBy", userId);
map.put("updatedBy", ""); map.put("updatedBy", userId);
// 创建人姓名 // 创建人姓名
String userName = MapUtils.getString(map, "createdName"); String userName = MapUtils.getString(map, "createdName");
try { try {
...@@ -190,7 +190,7 @@ public class DaoUtils { ...@@ -190,7 +190,7 @@ public class DaoUtils {
userName = "System"; userName = "System";
} }
map.put("createdName", userName); map.put("createdName", userName);
map.put("updatedName", ""); map.put("updatedName", userName);
// 创建人企业编码 // 创建人企业编码
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
AssertUtils.isEmpty(companyCode, "当前用户未绑定公司,无法操作数据,请联系管理员!"); AssertUtils.isEmpty(companyCode, "当前用户未绑定公司,无法操作数据,请联系管理员!");
...@@ -209,8 +209,9 @@ public class DaoUtils { ...@@ -209,8 +209,9 @@ public class DaoUtils {
} }
// 创建时刻 // 创建时刻
try { try {
map.put("createdTime", DateUtils.shortDateTime()); String dateTime = DateUtils.shortDateTime();
map.put("updatedTime", ""); map.put("createdTime", dateTime);
map.put("updatedTime", dateTime);
} catch (PlatException e) { } catch (PlatException e) {
log.warn("写入创建时刻失败", e); log.warn("写入创建时刻失败", e);
} }
......
...@@ -97,6 +97,10 @@ public class HPConstant { ...@@ -97,6 +97,10 @@ public class HPConstant {
public static final String HPCW002_BILL_NUMBER = "HPCW002_BILL_NUMBER"; public static final String HPCW002_BILL_NUMBER = "HPCW002_BILL_NUMBER";
public static final String WD_FILE_ID = "WD_FILE_ID"; public static final String WD_FILE_ID = "WD_FILE_ID";
// 售后单号
public static final String AFTER_SALE_NO = "AFTER_SALE_NO";
// 客户关怀单号
public static final String CARE_NO = "CARE_NO";
} }
/** /**
...@@ -129,4 +133,17 @@ public class HPConstant { ...@@ -129,4 +133,17 @@ public class HPConstant {
public static final Integer S_1 = 1; public static final Integer S_1 = 1;
} }
/**
* 处理状态
*
* @author:songx
* @date:2024/2/22,13:57
*/
public static class dealStatus {
// 未处理
public static final Integer S0 = 0;
// 已处理
public static final Integer S1 = 1;
}
} }
...@@ -378,6 +378,18 @@ public class HPSqlConstant { ...@@ -378,6 +378,18 @@ public class HPSqlConstant {
} }
/** /**
* HPSC0061 定义
*
* @author:songx
* @date:2024/9/26,10:08
*/
public class HPSC0061 {
// 锁
public static final String LOCK = "HPSC0061.lock";
}
/**
* 质量巡检单 * 质量巡检单
* *
* @author:songx * @author:songx
......
...@@ -36,6 +36,9 @@ public class HPDM099 extends DaoEPBase { ...@@ -36,6 +36,9 @@ public class HPDM099 extends DaoEPBase {
public static final String FIELD_BIZ_ID = "bizId"; /* 业务ID*/ public static final String FIELD_BIZ_ID = "bizId"; /* 业务ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/ public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/ public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/
public static final String FIELD_DOC_TYPE = "docType"; /* 文件类型*/
public static final String FIELD_PREVIEW_NUM = "previewNum"; /* 预览次数*/
public static final String FIELD_DOWNLOAD_NUM = "downloadNum"; /* 下载次数*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
...@@ -51,6 +54,9 @@ public class HPDM099 extends DaoEPBase { ...@@ -51,6 +54,9 @@ public class HPDM099 extends DaoEPBase {
public static final String COL_BIZ_ID = "BIZ_ID"; /* 业务ID*/ public static final String COL_BIZ_ID = "BIZ_ID"; /* 业务ID*/
public static final String COL_DOC_ID = "DOC_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_DOC_NAME = "DOC_NAME"; /* 文件名称*/
public static final String COL_DOC_TYPE = "DOC_TYPE"; /* 文件类型*/
public static final String COL_PREVIEW_NUM = "PREVIEW_NUM"; /* 预览次数*/
public static final String COL_DOWNLOAD_NUM = "DOWNLOAD_NUM"; /* 下载次数*/
public static final String QUERY = "HPDM099.query"; public static final String QUERY = "HPDM099.query";
public static final String COUNT = "HPDM099.count"; public static final String COUNT = "HPDM099.count";
...@@ -72,6 +78,9 @@ public class HPDM099 extends DaoEPBase { ...@@ -72,6 +78,9 @@ public class HPDM099 extends DaoEPBase {
private String bizId = " "; /* 业务ID*/ private String bizId = " "; /* 业务ID*/
private String docId = " "; /* 文件ID*/ private String docId = " "; /* 文件ID*/
private String docName = " "; /* 文件名称*/ private String docName = " "; /* 文件名称*/
private String docType = " "; /* 文件类型*/
private Integer previewNum = new Integer(0); /* 预览次数*/
private Integer downloadNum = new Integer(0); /* 下载次数*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -136,6 +145,17 @@ public class HPDM099 extends DaoEPBase { ...@@ -136,6 +145,17 @@ public class HPDM099 extends DaoEPBase {
eiColumn.setDescName("文件名称"); eiColumn.setDescName("文件名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_TYPE);
eiColumn.setDescName("文件类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PREVIEW_NUM);
eiColumn.setDescName("预览次数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOWNLOAD_NUM);
eiColumn.setDescName("下载次数");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -358,7 +378,7 @@ public class HPDM099 extends DaoEPBase { ...@@ -358,7 +378,7 @@ public class HPDM099 extends DaoEPBase {
* @return the docName * @return the docName
*/ */
public String getDocName() { public String getDocName() {
return this.getDocName(); return docName;
} }
/** /**
...@@ -369,6 +389,48 @@ public class HPDM099 extends DaoEPBase { ...@@ -369,6 +389,48 @@ public class HPDM099 extends DaoEPBase {
public void setDocName(String docName) { public void setDocName(String docName) {
this.docName = docName; this.docName = docName;
} }
public String getDocType() {
return docType;
}
public void setDocType(String docType) {
this.docType = docType;
}
/**
* get the previewNum - 预览次数.
* @return the previewNum
*/
public Integer getPreviewNum() {
return this.previewNum;
}
/**
* set the previewNum - 预览次数.
*
* @param previewNum - 预览次数
*/
public void setPreviewNum(Integer previewNum) {
this.previewNum = previewNum;
}
/**
* get the downloadNum - 下载次数.
* @return the downloadNum
*/
public Integer getDownloadNum() {
return this.downloadNum;
}
/**
* set the downloadNum - 下载次数.
*
* @param downloadNum - 下载次数
*/
public void setDownloadNum(Integer downloadNum) {
this.downloadNum = downloadNum;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -390,7 +452,9 @@ public class HPDM099 extends DaoEPBase { ...@@ -390,7 +452,9 @@ public class HPDM099 extends DaoEPBase {
setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType)); setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType));
setBizId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_ID)), bizId)); setBizId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_ID)), bizId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId)); setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName)); setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName)); setDocType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_TYPE)), docType));
setPreviewNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PREVIEW_NUM)), previewNum));
setDownloadNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOWNLOAD_NUM)), downloadNum));
} }
/** /**
...@@ -414,6 +478,9 @@ public class HPDM099 extends DaoEPBase { ...@@ -414,6 +478,9 @@ public class HPDM099 extends DaoEPBase {
map.put(FIELD_BIZ_ID, StringUtils.toString(bizId, eiMetadata.getMeta(FIELD_BIZ_ID))); map.put(FIELD_BIZ_ID, StringUtils.toString(bizId, eiMetadata.getMeta(FIELD_BIZ_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_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_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_DOC_TYPE, StringUtils.toString(docType, eiMetadata.getMeta(FIELD_DOC_TYPE)));
map.put(FIELD_PREVIEW_NUM, StringUtils.toString(previewNum, eiMetadata.getMeta(FIELD_PREVIEW_NUM)));
map.put(FIELD_DOWNLOAD_NUM, StringUtils.toString(downloadNum, eiMetadata.getMeta(FIELD_DOWNLOAD_NUM)));
return map; return map;
} }
......
...@@ -49,12 +49,7 @@ public class ServiceHPDM099 extends ServiceEPBase { ...@@ -49,12 +49,7 @@ public class ServiceHPDM099 extends ServiceEPBase {
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
// 文件存储位置 inInfo = super.query(inInfo, HPDM099.QUERY, new HPDM099());
if (CommonConstant.FileLocation.S3.equalsIgnoreCase(S3Constant.FILE_LOCATION)) {
inInfo = super.query(inInfo, "HPDM099.queryS3", new HPDM099());
} else {
inInfo = super.query(inInfo, "HPDM099.queryLocal", new HPDM099());
}
} catch (Throwable e) { } catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
......
...@@ -3,72 +3,51 @@ ...@@ -3,72 +3,51 @@
<sqlMap namespace="HPDM099"> <sqlMap namespace="HPDM099">
<sql id="column"> <sql id="column">
A.ID as "id", ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEP_CODE as "depCode", <!-- 部门编码 预留 --> DEP_CODE as "depCode", <!-- 部门编码 预留 -->
A.CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 --> CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 --> UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 --> UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime", <!-- 修改时间 --> UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
A.BIZ_TYPE as "bizType", <!-- 业务类型 --> BIZ_TYPE as "bizType", <!-- 业务类型 -->
A.BIZ_ID as "bizId", <!-- 业务ID --> BIZ_ID as "bizId", <!-- 业务ID -->
A.DOC_ID as "docId" <!-- 文件ID --> DOC_ID as "docId", <!-- 文件ID -->
</sql> DOC_NAME as "docName", <!-- 文件名称 -->
DOC_TYPE as "docType", <!-- 文件类型 -->
<sql id="columnLocal"> PREVIEW_NUM as "previewNum", <!-- 预览次数 -->
<include refid="column"/>, DOWNLOAD_NUM as "downloadNum" <!-- 下载次数 -->
B.DOC_NAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="columnS3">
<include refid="column"/>,
B.RES_CNAME as "docName" <!-- 文件名称 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND A.DELETE_FLAG = '0' AND DELETE_FLAG = '0'
<include refid="SqlBase.authCondition"/> <include refid="SqlBase.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
A.ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType"> <isNotEmpty prepend=" AND " property="bizType">
A.BIZ_TYPE = #bizType# BIZ_TYPE = #bizType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="bizId"> <isNotEmpty prepend=" AND " property="bizId">
A.BIZ_ID = #bizId# BIZ_ID = #bizId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="docId"> <isNotEmpty prepend=" AND " property="docId">
A.DOC_ID = #docId# DOC_ID = #docId#
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
<include refid="condition"/> <include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom"> <isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000') CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo"> <isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959') CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<!-- 本地 -->
<sql id="conditionLocal">
AND A.DOC_ID = B.DOC_ID
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="docName">
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<!-- S3地址 -->
<sql id="conditionS3">
AND A.DOC_ID = B.RES_ID
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="docName">
B.RES_CNAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty> </isNotEmpty>
</sql> </sql>
...@@ -78,41 +57,25 @@ ...@@ -78,41 +57,25 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
A.ID asc ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql> </sql>
<select id="queryLocal" resultClass="com.baosight.hpjx.hp.dm.domain.HPDM099"> <select id="query" resultClass="com.baosight.hpjx.hp.dm.domain.HPDM099">
SELECT SELECT
<include refid="columnLocal"/> <include refid="column"/>
FROM ${hpjxSchema}.T_HPDM099 A, ${platSchema}.TEUDM02 B FROM ${hpjxSchema}.T_HPDM099
WHERE 1=1 WHERE 1=1
<include refid="conditionLocal"/> <include refid="customCondition"/>
<include refid="orderBy"/>
</select>
<select id="countLocal" resultClass="int">
SELECT COUNT(*)
FROM ${hpjxSchema}.T_HPDM099 A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionLocal"/>
</select>
<select id="queryS3" resultClass="com.baosight.hpjx.hp.dm.domain.HPDM099">
SELECT
<include refid="columnS3"/>
FROM ${hpjxSchema}.T_HPDM099 A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionS3"/>
<include refid="orderBy"/> <include refid="orderBy"/>
</select> </select>
<select id="countS3" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) SELECT COUNT(*)
FROM ${hpjxSchema}.T_HPDM099 A, ${platSchema}.TEUDM05 B FROM ${hpjxSchema}.T_HPDM099
WHERE 1=1 WHERE 1=1
<include refid="conditionS3"/> <include refid="customCondition"/>
</select> </select>
<insert id="insert"> <insert id="insert">
...@@ -122,20 +85,54 @@ ...@@ -122,20 +85,54 @@
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 --> CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除 --> DELETE_FLAG, <!-- 是否删除 -->
BIZ_TYPE, <!-- 业务类型 --> BIZ_TYPE, <!-- 业务类型 -->
BIZ_ID, <!-- 业务ID --> BIZ_ID, <!-- 业务ID -->
DOC_ID <!-- 文件ID --> DOC_ID, <!-- 文件ID -->
DOC_NAME, <!-- 文件名称 -->
DOC_TYPE <!-- 文件类型 -->
) VALUES ( ) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #bizType#, #bizId#, #docId# #updatedBy#, #updatedName#, #updatedTime#,
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#
) )
</insert> </insert>
<delete id="deleteBizId">
UPDATE ${hpjxSchema}.T_HPDM099
SET DELETE_FLAG = 1
<include refid="SqlBase.updateRevise"/>
WHERE BIZ_ID = #bizId#
AND BIZ_TYPE = #bizType#
</delete>
<delete id="delete"> <delete id="delete">
UPDATE ${hpjxSchema}.T_HPDM099 UPDATE ${hpjxSchema}.T_HPDM099
SET DELETE_FLAG = '1' SET DELETE_FLAG = 1,
<include refid="SqlBase.updateRevise"/>
WHERE ID = #id# WHERE ID = #id#
</delete> </delete>
<!-- 预览自增 -->
<update id="previewIncr">
UPDATE ${hpjxSchema}.T_HPDM099
SET
PREVIEW_NUM = PREVIEW_NUM + 1,
<include refid="SqlBase.updateRevise"/>
WHERE DOC_ID = #docId#
</update>
<!-- 下载自增 -->
<update id="downloadIncr">
UPDATE ${hpjxSchema}.T_HPDM099
SET
DOWNLOAD_NUM = DOWNLOAD_NUM + 1,
<include refid="SqlBase.updateRevise"/>
WHERE DOC_ID = #docId#
</update>
</sqlMap> </sqlMap>
package com.baosight.hpjx.hp.fw.constant;
/**
* @author:songx
* @date:2024/9/24,17:53
*/
public class HpFwConstant {
/**
* HPFW001 定义
*
* @author:songx
* @date:2024/9/24,17:54
*/
public static class HpFw001 {
}
/**
* HPFW001 定义
*
* @author:songx
* @date:2024/9/24,17:54
*/
public static class HpFw002 {
}
}
package com.baosight.hpjx.hp.fw.constant;
/**
* @author:songx
* @date:2024/9/24,18:09
*/
public class HpFwSqlConstant {
/**
* @author:songx
* @date:2024/8/29,15:54
*/
public static class HpFw001 {
// 锁
public static final String LOCK = "HPFW001.lock";
// 修改
public static final String UPDATE_DEAL = "HPFW001.updateDeal";
}
/**
* @author:songx
* @date:2024/8/29,15:54
*/
public static class HpFw002 {
// 锁
public static final String LOCK = "HPFW002.lock";
// 修改
public static final String UPDATE_DEAL = "HPFW002.updateDeal";
}
}
package com.baosight.hpjx.hp.fw.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THpfw001.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-25 17:31:45 create
*/
public class HPFW001 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_DEP_CODE = "depCode"; /* 部门编码*/
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"; /* 是否删除 0-否1-是*/
public static final String FIELD_STATUS = "status"; /* 维修状态 0-未处理 1-已维修*/
public static final String FIELD_AFTER_SALE_DATE = "afterSaleDate"; /* 售后日期*/
public static final String FIELD_AFTER_SALE_NO = "afterSaleNo"; /* 售后单号*/
public static final String FIELD_AFTER_SALE_TYPE = "afterSaleType"; /* 售后方式*/
public static final String FIELD_URGENCY = "urgency"; /* 紧急程度*/
public static final String FIELD_AFTER_SALE_CONTENT = "afterSaleContent"; /* 售后内容*/
public static final String FIELD_CUSTOM_ID = "customId"; /* 客户ID*/
public static final String FIELD_CUSTOM_NAME = "customName"; /* 客户名称*/
public static final String FIELD_DEAL_USER_ID = "dealUserId"; /* 处理人ID*/
public static final String FIELD_DEAL_USER_NAME = "dealUserName"; /* 处理人名称*/
public static final String FIELD_DEAL_CONTENT = "dealContent"; /* 处理内容*/
public static final String COL_ID = "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_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"; /* 是否删除 0-否1-是*/
public static final String COL_STATUS = "STATUS"; /* 维修状态 0-未处理 1-已维修*/
public static final String COL_AFTER_SALE_DATE = "AFTER_SALE_DATE"; /* 售后日期*/
public static final String COL_AFTER_SALE_NO = "AFTER_SALE_NO"; /* 售后单号*/
public static final String COL_AFTER_SALE_TYPE = "AFTER_SALE_TYPE"; /* 售后方式*/
public static final String COL_URGENCY = "URGENCY"; /* 紧急程度*/
public static final String COL_AFTER_SALE_CONTENT = "AFTER_SALE_CONTENT"; /* 售后内容*/
public static final String COL_CUSTOM_ID = "CUSTOM_ID"; /* 客户ID*/
public static final String COL_CUSTOM_NAME = "CUSTOM_NAME"; /* 客户名称*/
public static final String COL_DEAL_USER_ID = "DEAL_USER_ID"; /* 处理人ID*/
public static final String COL_DEAL_USER_NAME = "DEAL_USER_NAME"; /* 处理人名称*/
public static final String COL_DEAL_CONTENT = "DEAL_CONTENT"; /* 处理内容*/
public static final String QUERY = "HPFW001.query";
public static final String COUNT = "HPFW001.count";
public static final String INSERT = "HPFW001.insert";
public static final String UPDATE = "HPFW001.update";
public static final String DELETE = "HPFW001.delete";
private Long id = new Long(0); /* ID*/
private String companyCode = " "; /* 公司编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private Integer deleteFlag; /* 是否删除 0-否1-是*/
private Integer status = new Integer(0); /* 维修状态 0-未处理 1-已维修*/
private String afterSaleDate = " "; /* 售后日期*/
private String afterSaleNo = " "; /* 售后单号*/
private Integer afterSaleType = new Integer(0); /* 售后方式*/
private Integer urgency = new Integer(0); /* 紧急程度*/
private String afterSaleContent = " "; /* 售后内容*/
private String customId = " "; /* 客户ID*/
private String customName = " "; /* 客户名称*/
private String dealUserId = " "; /* 处理人ID*/
private String dealUserName = " "; /* 处理人名称*/
private String dealContent = " "; /* 处理内容*/
/**
* 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_DEP_CODE);
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);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除 0-否1-是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("维修状态 0-未处理 1-已维修");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AFTER_SALE_DATE);
eiColumn.setDescName("售后日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AFTER_SALE_NO);
eiColumn.setDescName("售后单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AFTER_SALE_TYPE);
eiColumn.setDescName("售后方式");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_URGENCY);
eiColumn.setDescName("紧急程度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AFTER_SALE_CONTENT);
eiColumn.setDescName("售后内容");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUSTOM_ID);
eiColumn.setDescName("客户ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUSTOM_NAME);
eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEAL_USER_ID);
eiColumn.setDescName("处理人ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEAL_USER_NAME);
eiColumn.setDescName("处理人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEAL_CONTENT);
eiColumn.setDescName("处理内容");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPFW001() {
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 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 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 - 是否删除 0-否1-是.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除 0-否1-是.
*
* @param deleteFlag - 是否删除 0-否1-是
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the 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 afterSaleDate - 售后日期.
* @return the afterSaleDate
*/
public String getAfterSaleDate() {
return this.afterSaleDate;
}
/**
* set the afterSaleDate - 售后日期.
*
* @param afterSaleDate - 售后日期
*/
public void setAfterSaleDate(String afterSaleDate) {
this.afterSaleDate = afterSaleDate;
}
/**
* get the afterSaleNo - 售后单号.
* @return the afterSaleNo
*/
public String getAfterSaleNo() {
return this.afterSaleNo;
}
/**
* set the afterSaleNo - 售后单号.
*
* @param afterSaleNo - 售后单号
*/
public void setAfterSaleNo(String afterSaleNo) {
this.afterSaleNo = afterSaleNo;
}
/**
* get the afterSaleType - 售后方式.
* @return the afterSaleType
*/
public Integer getAfterSaleType() {
return this.afterSaleType;
}
/**
* set the afterSaleType - 售后方式.
*
* @param afterSaleType - 售后方式
*/
public void setAfterSaleType(Integer afterSaleType) {
this.afterSaleType = afterSaleType;
}
/**
* get the urgency - 紧急程度.
* @return the urgency
*/
public Integer getUrgency() {
return this.urgency;
}
/**
* set the urgency - 紧急程度.
*
* @param urgency - 紧急程度
*/
public void setUrgency(Integer urgency) {
this.urgency = urgency;
}
/**
* get the afterSaleContent - 售后内容.
* @return the afterSaleContent
*/
public String getAfterSaleContent() {
return this.afterSaleContent;
}
/**
* set the afterSaleContent - 售后内容.
*
* @param afterSaleContent - 售后内容
*/
public void setAfterSaleContent(String afterSaleContent) {
this.afterSaleContent = afterSaleContent;
}
/**
* get the customId - 客户ID.
* @return the customId
*/
public String getCustomId() {
return this.customId;
}
/**
* set the customId - 客户ID.
*
* @param customId - 客户ID
*/
public void setCustomId(String customId) {
this.customId = customId;
}
/**
* get the customName - 客户名称.
* @return the customName
*/
public String getCustomName() {
return this.customName;
}
/**
* set the customName - 客户名称.
*
* @param customName - 客户名称
*/
public void setCustomName(String customName) {
this.customName = customName;
}
/**
* get the dealUserId - 处理人ID.
* @return the dealUserId
*/
public String getDealUserId() {
return this.dealUserId;
}
/**
* set the dealUserId - 处理人ID.
*
* @param dealUserId - 处理人ID
*/
public void setDealUserId(String dealUserId) {
this.dealUserId = dealUserId;
}
/**
* get the dealUserName - 处理人名称.
* @return the dealUserName
*/
public String getDealUserName() {
return this.dealUserName;
}
/**
* set the dealUserName - 处理人名称.
*
* @param dealUserName - 处理人名称
*/
public void setDealUserName(String dealUserName) {
this.dealUserName = dealUserName;
}
/**
* get the dealContent - 处理内容.
* @return the dealContent
*/
public String getDealContent() {
return this.dealContent;
}
/**
* set the dealContent - 处理内容.
*
* @param dealContent - 处理内容
*/
public void setDealContent(String dealContent) {
this.dealContent = dealContent;
}
/**
* 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));
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));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setAfterSaleDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AFTER_SALE_DATE)), afterSaleDate));
setAfterSaleNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AFTER_SALE_NO)), afterSaleNo));
setAfterSaleType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_AFTER_SALE_TYPE)), afterSaleType));
setUrgency(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_URGENCY)), urgency));
setAfterSaleContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AFTER_SALE_CONTENT)), afterSaleContent));
setCustomId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUSTOM_ID)), customId));
setCustomName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUSTOM_NAME)), customName));
setDealUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEAL_USER_ID)), dealUserId));
setDealUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEAL_USER_NAME)), dealUserName));
setDealContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEAL_CONTENT)), dealContent));
}
/**
* 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_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)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_AFTER_SALE_DATE, StringUtils.toString(afterSaleDate, eiMetadata.getMeta(FIELD_AFTER_SALE_DATE)));
map.put(FIELD_AFTER_SALE_NO, StringUtils.toString(afterSaleNo, eiMetadata.getMeta(FIELD_AFTER_SALE_NO)));
map.put(FIELD_AFTER_SALE_TYPE, StringUtils.toString(afterSaleType, eiMetadata.getMeta(FIELD_AFTER_SALE_TYPE)));
map.put(FIELD_URGENCY, StringUtils.toString(urgency, eiMetadata.getMeta(FIELD_URGENCY)));
map.put(FIELD_AFTER_SALE_CONTENT, StringUtils.toString(afterSaleContent, eiMetadata.getMeta(FIELD_AFTER_SALE_CONTENT)));
map.put(FIELD_CUSTOM_ID, StringUtils.toString(customId, eiMetadata.getMeta(FIELD_CUSTOM_ID)));
map.put(FIELD_CUSTOM_NAME, StringUtils.toString(customName, eiMetadata.getMeta(FIELD_CUSTOM_NAME)));
map.put(FIELD_DEAL_USER_ID, StringUtils.toString(dealUserId, eiMetadata.getMeta(FIELD_DEAL_USER_ID)));
map.put(FIELD_DEAL_USER_NAME, StringUtils.toString(dealUserName, eiMetadata.getMeta(FIELD_DEAL_USER_NAME)));
map.put(FIELD_DEAL_CONTENT, StringUtils.toString(dealContent, eiMetadata.getMeta(FIELD_DEAL_CONTENT)));
return map;
}
}
package com.baosight.hpjx.hp.fw.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THpfw002.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-25 17:31:47 create
*/
public class HPFW002 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_DEP_CODE = "depCode"; /* 部门编码*/
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"; /* 是否删除 0-否1-是*/
public static final String FIELD_STATUS = "status"; /* 状态 0-未处理 1-已维修*/
public static final String FIELD_CARE_DATE = "careDate"; /* 关怀日期*/
public static final String FIELD_CARE_NO = "careNo"; /* 关怀单号*/
public static final String FIELD_CARE_WAY = "careWay"; /* 关怀方式*/
public static final String FIELD_CARE_TYPE = "careType"; /* 关怀类型*/
public static final String FIELD_CARE_CONTENT = "careContent"; /* 关怀内容*/
public static final String FIELD_CUSTOM_ID = "customId"; /* 客户ID*/
public static final String FIELD_CUSTOM_NAME = "customName"; /* 客户名称*/
public static final String FIELD_DEAL_USER_ID = "dealUserId"; /* 执行人ID*/
public static final String FIELD_DEAL_USER_NAME = "dealUserName"; /* 执行人名称*/
public static final String FIELD_DEAL_CONTENT = "dealContent"; /* 处理内容*/
public static final String COL_ID = "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_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"; /* 是否删除 0-否1-是*/
public static final String COL_STATUS = "STATUS"; /* 状态 0-未处理 1-已维修*/
public static final String COL_CARE_DATE = "CARE_DATE"; /* 关怀日期*/
public static final String COL_CARE_NO = "CARE_NO"; /* 关怀单号*/
public static final String COL_CARE_WAY = "CARE_WAY"; /* 关怀方式*/
public static final String COL_CARE_TYPE = "CARE_TYPE"; /* 关怀类型*/
public static final String COL_CARE_CONTENT = "CARE_CONTENT"; /* 关怀内容*/
public static final String COL_CUSTOM_ID = "CUSTOM_ID"; /* 客户ID*/
public static final String COL_CUSTOM_NAME = "CUSTOM_NAME"; /* 客户名称*/
public static final String COL_DEAL_USER_ID = "DEAL_USER_ID"; /* 执行人ID*/
public static final String COL_DEAL_USER_NAME = "DEAL_USER_NAME"; /* 执行人名称*/
public static final String COL_DEAL_CONTENT = "DEAL_CONTENT"; /* 处理内容*/
public static final String QUERY = "HPFW002.query";
public static final String COUNT = "HPFW002.count";
public static final String INSERT = "HPFW002.insert";
public static final String UPDATE = "HPFW002.update";
public static final String DELETE = "HPFW002.delete";
private Long id = new Long(0); /* ID*/
private String companyCode = " "; /* 公司编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private Integer deleteFlag; /* 是否删除 0-否1-是*/
private Integer status; /* 状态 0-未处理 1-已维修*/
private String careDate = " "; /* 关怀日期*/
private String careNo = " "; /* 关怀单号*/
private Integer careWay = new Integer(0); /* 关怀方式*/
private Integer careType = new Integer(0); /* 关怀类型*/
private String careContent = " "; /* 关怀内容*/
private String customId = " "; /* 客户ID*/
private String customName = " "; /* 客户名称*/
private String dealUserId = " "; /* 执行人ID*/
private String dealUserName = " "; /* 执行人名称*/
private String dealContent = " "; /* 处理内容*/
/**
* 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_DEP_CODE);
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);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除 0-否1-是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0-未处理 1-已维修");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CARE_DATE);
eiColumn.setDescName("关怀日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CARE_NO);
eiColumn.setDescName("关怀单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CARE_WAY);
eiColumn.setDescName("关怀方式");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CARE_TYPE);
eiColumn.setDescName("关怀类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CARE_CONTENT);
eiColumn.setDescName("关怀内容");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUSTOM_ID);
eiColumn.setDescName("客户ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUSTOM_NAME);
eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEAL_USER_ID);
eiColumn.setDescName("执行人ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEAL_USER_NAME);
eiColumn.setDescName("执行人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEAL_CONTENT);
eiColumn.setDescName("处理内容");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPFW002() {
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 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 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 - 是否删除 0-否1-是.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除 0-否1-是.
*
* @param deleteFlag - 是否删除 0-否1-是
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the 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 careDate - 关怀日期.
* @return the careDate
*/
public String getCareDate() {
return this.careDate;
}
/**
* set the careDate - 关怀日期.
*
* @param careDate - 关怀日期
*/
public void setCareDate(String careDate) {
this.careDate = careDate;
}
/**
* get the careNo - 关怀单号.
* @return the careNo
*/
public String getCareNo() {
return this.careNo;
}
/**
* set the careNo - 关怀单号.
*
* @param careNo - 关怀单号
*/
public void setCareNo(String careNo) {
this.careNo = careNo;
}
/**
* get the careWay - 关怀方式.
* @return the careWay
*/
public Integer getCareWay() {
return this.careWay;
}
/**
* set the careWay - 关怀方式.
*
* @param careWay - 关怀方式
*/
public void setCareWay(Integer careWay) {
this.careWay = careWay;
}
/**
* get the careType - 关怀类型.
* @return the careType
*/
public Integer getCareType() {
return this.careType;
}
/**
* set the careType - 关怀类型.
*
* @param careType - 关怀类型
*/
public void setCareType(Integer careType) {
this.careType = careType;
}
/**
* get the careContent - 关怀内容.
* @return the careContent
*/
public String getCareContent() {
return this.careContent;
}
/**
* set the careContent - 关怀内容.
*
* @param careContent - 关怀内容
*/
public void setCareContent(String careContent) {
this.careContent = careContent;
}
/**
* get the customId - 客户ID.
* @return the customId
*/
public String getCustomId() {
return this.customId;
}
/**
* set the customId - 客户ID.
*
* @param customId - 客户ID
*/
public void setCustomId(String customId) {
this.customId = customId;
}
/**
* get the customName - 客户名称.
* @return the customName
*/
public String getCustomName() {
return this.customName;
}
/**
* set the customName - 客户名称.
*
* @param customName - 客户名称
*/
public void setCustomName(String customName) {
this.customName = customName;
}
/**
* get the dealUserId - 执行人ID.
* @return the dealUserId
*/
public String getDealUserId() {
return this.dealUserId;
}
/**
* set the dealUserId - 执行人ID.
*
* @param dealUserId - 执行人ID
*/
public void setDealUserId(String dealUserId) {
this.dealUserId = dealUserId;
}
/**
* get the dealUserName - 执行人名称.
* @return the dealUserName
*/
public String getDealUserName() {
return this.dealUserName;
}
/**
* set the dealUserName - 执行人名称.
*
* @param dealUserName - 执行人名称
*/
public void setDealUserName(String dealUserName) {
this.dealUserName = dealUserName;
}
/**
* get the dealContent - 处理内容.
* @return the dealContent
*/
public String getDealContent() {
return this.dealContent;
}
/**
* set the dealContent - 处理内容.
*
* @param dealContent - 处理内容
*/
public void setDealContent(String dealContent) {
this.dealContent = dealContent;
}
/**
* 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));
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));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setCareDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CARE_DATE)), careDate));
setCareNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CARE_NO)), careNo));
setCareWay(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CARE_WAY)), careWay));
setCareType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CARE_TYPE)), careType));
setCareContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CARE_CONTENT)), careContent));
setCustomId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUSTOM_ID)), customId));
setCustomName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUSTOM_NAME)), customName));
setDealUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEAL_USER_ID)), dealUserId));
setDealUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEAL_USER_NAME)), dealUserName));
setDealContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEAL_CONTENT)), dealContent));
}
/**
* 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_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)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_CARE_DATE, StringUtils.toString(careDate, eiMetadata.getMeta(FIELD_CARE_DATE)));
map.put(FIELD_CARE_NO, StringUtils.toString(careNo, eiMetadata.getMeta(FIELD_CARE_NO)));
map.put(FIELD_CARE_WAY, StringUtils.toString(careWay, eiMetadata.getMeta(FIELD_CARE_WAY)));
map.put(FIELD_CARE_TYPE, StringUtils.toString(careType, eiMetadata.getMeta(FIELD_CARE_TYPE)));
map.put(FIELD_CARE_CONTENT, StringUtils.toString(careContent, eiMetadata.getMeta(FIELD_CARE_CONTENT)));
map.put(FIELD_CUSTOM_ID, StringUtils.toString(customId, eiMetadata.getMeta(FIELD_CUSTOM_ID)));
map.put(FIELD_CUSTOM_NAME, StringUtils.toString(customName, eiMetadata.getMeta(FIELD_CUSTOM_NAME)));
map.put(FIELD_DEAL_USER_ID, StringUtils.toString(dealUserId, eiMetadata.getMeta(FIELD_DEAL_USER_ID)));
map.put(FIELD_DEAL_USER_NAME, StringUtils.toString(dealUserName, eiMetadata.getMeta(FIELD_DEAL_USER_NAME)));
map.put(FIELD_DEAL_CONTENT, StringUtils.toString(dealContent, eiMetadata.getMeta(FIELD_DEAL_CONTENT)));
return map;
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.fw.constant.HpFwSqlConstant;
import com.baosight.hpjx.hp.fw.domain.HPFW001;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
import com.baosight.hpjx.util.AssertUtils;
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.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 java.util.List;
import java.util.Map;
/**
* 售后服务
*
* @author:songx
* @date:2024/9/24,17:47
*/
public class ServiceHPFW001 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "售后维修", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPFW001().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*/
@Override
@OperationLogAnnotation(operModul = "售后维修", operType = "查询")
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HPFW001.FIELD_AFTER_SALE_DATE,
DateUtils.formatShort(queryMap.get(HPFW001.FIELD_AFTER_SALE_DATE)));
inInfo = super.query(inInfo, HPFW001.QUERY, new HPFW001());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "删除")
public EiInfo remove(EiInfo inInfo) {
try {
List<HPFW001> fFw001s = MapUtils.toDaoEPBases(inInfo, HPFW001.class);
// db数据
Map<String, HPFW001> dbFw001Map = HpFwUtils.HpFw001.lockAndGet(fFw001s);
// 数据校验
this.checkRemoveData(fFw001s, dbFw001Map);
// 保存数据
this.removeData(fFw001s);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fFw001s.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fFw001s
* @param dbFw001Map
*/
private void checkRemoveData(List<HPFW001> fFw001s, Map<String, HPFW001> dbFw001Map) {
for (HPFW001 fFw001 : fFw001s) {
String afterSaleNo = fFw001.getAfterSaleNo();
HPFW001 dbFw001 = dbFw001Map.get(afterSaleNo);
this.checkData(afterSaleNo, dbFw001);
}
}
/**
* 数据保存
*
* @param fFw001s
*/
private void removeData(List<HPFW001> fFw001s) {
for (HPFW001 fFw001 : fFw001s) {
fFw001.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPFW001.DELETE, fFw001.toMap());
}
}
/**
* 检查状态
*
* @param inInfo
* @return
*/
public EiInfo checkStatus(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String afterSaleNo = MapUtils.getString(queryMap, HPFW001.FIELD_AFTER_SALE_NO);
HPFW001 dbFw001 = HpFwUtils.HpFw001.lockAndGet(afterSaleNo);
this.checkData(afterSaleNo, dbFw001);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
/**
* 处理
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "审核")
public EiInfo deal(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String content = MapUtils.getString(queryMap, "content");
List<HPFW001> fFw001s = MapUtils.toDaoEPBases(inInfo, HPFW001.class);
// db数据
Map<String, HPFW001> dbFw001Map = HpFwUtils.HpFw001.lockAndGet(fFw001s);
// 数据校验
this.dealCheckData(fFw001s, dbFw001Map);
// 保存数据
this.dealData(fFw001s, content);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fFw001s.size() + "]条数据处理成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "处理失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fFw001s
* @param dbFw001Map
*/
private void dealCheckData(List<HPFW001> fFw001s, Map<String, HPFW001> dbFw001Map) {
for (HPFW001 fFw001 : fFw001s) {
String afterSaleNo = fFw001.getAfterSaleNo();
HPFW001 dbFw001 = dbFw001Map.get(afterSaleNo);
this.checkData(afterSaleNo, dbFw001);
}
}
/**
* 数据保存
*
* @param fFw001s
* @param content
*/
private void dealData(List<HPFW001> fFw001s, String content) {
for (HPFW001 fFw001 : fFw001s) {
fFw001.setDealContent(content);
fFw001.setStatus(HPConstant.dealStatus.S1);
fFw001.setDealUserId(UserSessionUtils.getLoginName());
fFw001.setDealUserName(UserSessionUtils.getLoginCName());
DaoUtils.update(HpFwSqlConstant.HpFw001.UPDATE_DEAL, fFw001.toMap());
}
}
/**
* 数据校验
*
* @param afterSaleNo
* @param dbFw001
*/
private void checkData(String afterSaleNo, HPFW001 dbFw001) {
AssertUtils.isNull(dbFw001, String.format("售后服务单[%s]不存在", afterSaleNo));
AssertUtils.isNotEquals(dbFw001.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("售后服务单【%s】不是\"未删除\"状态,不允许操作", afterSaleNo));
AssertUtils.isNotEquals(dbFw001.getStatus(), HPConstant.dealStatus.S0,
String.format("售后服务单【%s】不是\"待回访\"状态,不允许操作", afterSaleNo));
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.utils.Iplat4jUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.dm.domain.HPDM099;
import com.baosight.hpjx.hp.fw.constant.HpFwConstant;
import com.baosight.hpjx.hp.fw.domain.HPFW001;
import com.baosight.hpjx.hp.fw.tools.HpFwTools;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* 附件清单
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPFW001A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
this.setDetailInfo(inInfo);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPDM099().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPDM099.QUERY, new HPDM099());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除
*
* @param inInfo
* @return
*/
public EiInfo remove(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String bizId = MapUtils.getString(queryMap, HPDM099.FIELD_BIZ_ID);
HPFW001 dbFw001 = HpFwUtils.HpFw001.lockAndGet(bizId);
this.checkData(dbFw001);
List<HPDM099> fDm099s = MapUtils.toDaoEPBases(inInfo, HPDM099.class);
for (HPDM099 fDm099 : fDm099s) {
DaoUtils.update(HPDM099.DELETE, fDm099);
if (!fDm099.getDocId().isEmpty()) {
Iplat4jUtils.deleteFileByDocId(fDm099.getDocId());
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fDm099s.size() + "]条数据删除成功!");
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param dbFw001
*/
private void checkData(HPFW001 dbFw001) {
AssertUtils.isNotEquals(dbFw001.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("售后服务单【%s】不是\"未删除\"状态,不允许操作", dbFw001.getAfterSaleNo()));
AssertUtils.isNotEquals(dbFw001.getStatus(), HPConstant.dealStatus.S0,
String.format("售后服务单【%s】不是\"待处理\"状态,不允许操作", dbFw001.getAfterSaleNo()));
}
/**
* 设置信息
*
* @param inInfo
*/
public void setDetailInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String bizId = MapUtils.getString(queryRow, HPDM099.FIELD_BIZ_ID);
if (bizId == null) {
return;
}
EiBlock block = new EiBlock(CommonConstant.Field.DETAIL);
block.addRow(HpFwTools.HpFw001.get(bizId));
block.addBlockMeta(new HPFW001().eiMetadata);
inInfo.setBlock(block);
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
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.fw.domain.HPFW001;
import com.baosight.hpjx.hp.fw.tools.HpFwTools;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
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.MapUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.Map;
/**
* 新增修改
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPFW001B extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
this.setBaseInfo(inInfo);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
HPFW001 fFw001 = MapUtils.toDaoEPBase(inInfo, HPFW001.class);
fFw001.setAfterSaleDate(DateUtils.formatShort(fFw001.getAfterSaleDate()));
if (StringUtils.isBlank(fFw001.getAfterSaleNo())) {
this.add(fFw001);
} else {
this.modify(fFw001);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增
*
* @param fFw001
*/
private void add(HPFW001 fFw001) {
fFw001.setAfterSaleNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.AFTER_SALE_NO));
fFw001.setStatus(HPConstant.dealStatus.S0);
fFw001.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPFW001.INSERT, fFw001);
}
/**
* 修改数据
*
* @param fFw001
*/
private void modify(HPFW001 fFw001) {
HPFW001 dbFw001 = HpFwUtils.HpFw001.lockAndGet(fFw001);
this.checkData(fFw001, dbFw001);
DaoUtils.update(HPFW001.UPDATE, fFw001);
}
/**
* 设置信息
*
* @param inInfo
*/
public void setBaseInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String afterSaleNo = MapUtils.getString(queryRow, HPFW001.FIELD_AFTER_SALE_NO);
if (StringUtils.isBlank(afterSaleNo)) {
return;
}
EiBlock resultBlock = new EiBlock(EiConstant.resultBlock);
resultBlock.addRow(HpFwTools.HpFw001.get(afterSaleNo));
resultBlock.addBlockMeta(new HPFW001().eiMetadata);
inInfo.setBlock(resultBlock);
}
/**
* 数据校验
*
* @param fFw001
* @param dbFw001
*/
private void checkData(HPFW001 fFw001, HPFW001 dbFw001) {
AssertUtils.isNull(dbFw001, String.format("售后服务单【%s】不存在", fFw001.getAfterSaleNo()));
AssertUtils.isNotEquals(dbFw001.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("售后服务单【%s】不是\"未删除\"状态,不允许操作", dbFw001.getAfterSaleNo()));
AssertUtils.isNotEquals(dbFw001.getStatus(), HPConstant.dealStatus.S0,
String.format("售后服务单【%s】不是\"待处理\"状态,不允许操作", dbFw001.getAfterSaleNo()));
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.fw.constant.HpFwConstant;
import com.baosight.hpjx.hp.fw.constant.HpFwSqlConstant;
import com.baosight.hpjx.hp.fw.domain.HPFW002;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
import com.baosight.hpjx.util.AssertUtils;
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.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 java.util.List;
import java.util.Map;
/**
* 客户关怀
*
* @author:songx
* @date:2024/9/24,17:47
*/
public class ServiceHPFW002 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "售后维修", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPFW002().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*/
@Override
@OperationLogAnnotation(operModul = "售后维修", operType = "查询")
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HPFW002.FIELD_CARE_DATE,
DateUtils.formatShort(queryMap.get(HPFW002.FIELD_CARE_DATE)));
inInfo = super.query(inInfo, HPFW002.QUERY, new HPFW002());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "删除")
public EiInfo remove(EiInfo inInfo) {
try {
List<HPFW002> fFw002s = MapUtils.toDaoEPBases(inInfo, HPFW002.class);
// db数据
Map<String, HPFW002> dbFw002Map = HpFwUtils.HpFw002.lockAndGet(fFw002s);
// 数据校验
this.checkRemoveData(fFw002s, dbFw002Map);
// 保存数据
this.removeData(fFw002s);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fFw002s.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fFw002s
* @param dbFw002Map
*/
private void checkRemoveData(List<HPFW002> fFw002s, Map<String, HPFW002> dbFw002Map) {
for (HPFW002 fFw002 : fFw002s) {
String careNo = fFw002.getCareNo();
HPFW002 dbFw002 = dbFw002Map.get(careNo);
AssertUtils.isNull(dbFw002, String.format("客户关怀单[%s]不存在", careNo));
AssertUtils.isNotEquals(HPConstant.dealStatus.S0, dbFw002.getStatus(),
String.format("客户关怀单[%s]状态不是\"待处理\",不允许操作", careNo));
}
}
/**
* 数据保存
*
* @param fFw002s
*/
private void removeData(List<HPFW002> fFw002s) {
for (HPFW002 fFw002 : fFw002s) {
fFw002.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPFW002.DELETE, fFw002.toMap());
}
}
/**
* 处理
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "审核")
public EiInfo check(EiInfo inInfo) {
try {
List<HPFW002> fFw002s = MapUtils.toDaoEPBases(inInfo, HPFW002.class);
// db数据
Map<String, HPFW002> dbFw002Map = HpFwUtils.HpFw002.lockAndGet(fFw002s);
// 数据校验
this.checkCheckData(fFw002s, dbFw002Map);
// 保存数据
this.checkData(fFw002s);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fFw002s.size() + "]条数据处理成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "处理失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fFw002s
* @param dbFw002Map
*/
private void checkCheckData(List<HPFW002> fFw002s, Map<String, HPFW002> dbFw002Map) {
for (HPFW002 fFw002 : fFw002s) {
String careNo = fFw002.getCareNo();
HPFW002 dbFw002 = dbFw002Map.get(careNo);
AssertUtils.isNull(dbFw002, String.format("客户关怀单[%s]不存在", careNo));
AssertUtils.isNotEquals(HPConstant.dealStatus.S0, dbFw002.getStatus(),
String.format("客户关怀单[%s]状态不是\"待处理\",不允许操作", careNo));
}
}
/**
* 数据保存
*
* @param fFw002s
*/
private void checkData(List<HPFW002> fFw002s) {
for (HPFW002 fFw002 : fFw002s) {
fFw002.setStatus(HPConstant.dealStatus.S1);
fFw002.setDealUserId(UserSessionUtils.getLoginName());
fFw002.setDealUserName(UserSessionUtils.getLoginCName());
DaoUtils.update(HpFwSqlConstant.HpFw002.UPDATE_DEAL, fFw002.toMap());
}
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
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.fw.domain.HPFW002;
import com.baosight.hpjx.hp.fw.tools.HpFwTools;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
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.MapUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.Map;
/**
* 新增修改
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPFW002B extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
this.setBaseInfo(inInfo);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
HPFW002 fFw002 = MapUtils.toDaoEPBase(inInfo, HPFW002.class);
fFw002.setCareDate(DateUtils.formatShort(fFw002.getCareDate()));
if (StringUtils.isBlank(fFw002.getCareNo())) {
this.add(fFw002);
} else {
this.modify(fFw002);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增
*
* @param fFw002
*/
private void add(HPFW002 fFw002) {
fFw002.setCareNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CARE_NO));
fFw002.setStatus(HPConstant.dealStatus.S0);
fFw002.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPFW002.INSERT, fFw002);
}
/**
* 修改数据
*
* @param fFw002
*/
private void modify(HPFW002 fFw002) {
HPFW002 dbFw002 = HpFwUtils.HpFw002.lockAndGet(fFw002);
this.checkData(fFw002, dbFw002);
DaoUtils.update(HPFW002.UPDATE, fFw002);
}
/**
* 设置信息
*
* @param inInfo
*/
public void setBaseInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String careNo = MapUtils.getString(queryRow, HPFW002.FIELD_CARE_NO);
if (StringUtils.isBlank(careNo)) {
return;
}
EiBlock resultBlock = new EiBlock(EiConstant.resultBlock);
resultBlock.addRow(HpFwTools.HpFw002.get(careNo));
resultBlock.addBlockMeta(new HPFW002().eiMetadata);
inInfo.setBlock(resultBlock);
}
/**
* 数据校验
*
* @param fFw002
* @param dbFw002
*/
private void checkData(HPFW002 fFw002, HPFW002 dbFw002) {
String careNo = fFw002.getCareNo();
AssertUtils.isNull(dbFw002, String.format("客户关怀单【%s】不存在", careNo));
AssertUtils.isNotEquals(dbFw002.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("客户关怀单【%s】不是\"未删除\"状态,不允许操作", careNo));
AssertUtils.isNotEquals(dbFw002.getStatus(), HPConstant.dealStatus.S0,
String.format("客户关怀单【%s】不是\"待处理\"状态,不允许操作", careNo));
}
}
<?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="HPFW001">
<sql id="column">
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除 0-否1-是 -->
STATUS as "status", <!-- 维修状态 0-未处理 1-已维修 -->
AFTER_SALE_DATE as "afterSaleDate", <!-- 售后日期 -->
AFTER_SALE_NO as "afterSaleNo", <!-- 售后单号 -->
AFTER_SALE_TYPE as "afterSaleType", <!-- 售后方式 -->
URGENCY as "urgency", <!-- 紧急程度 -->
CUSTOM_ID as "customId", <!-- 客户ID -->
CUSTOM_NAME as "customName", <!-- 客户名称 -->
DEAL_USER_ID as "dealUserId", <!-- 处理人ID -->
DEAL_USER_NAME as "dealUserName", <!-- 处理人名称 -->
DEAL_CONTENT as "dealContent" <!-- 处理内容 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="idCondition"/>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="afterSaleDate">
AFTER_SALE_DATE = #afterSaleDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="afterSaleType">
AFTER_SALE_TYPE = #afterSaleType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="urgency">
URGENCY = #urgency#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="customId">
CUSTOM_ID = #customId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="customName">
CUSTOM_NAME LIKE CONCAT('%', #customName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserId">
DEAL_USER_ID = #dealUserId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserName">
DEAL_USER_NAME LIKE CONCAT('%', #dealUserName#, '%')
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="afterSaleNo">
AFTER_SALE_NO = #afterSaleNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="afterSaleNos">
AFTER_SALE_NO IN <iterate close=")" open="(" conjunction="," property="afterSaleNos">#afterSaleNos[]#</iterate>
</isNotEmpty>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.fw.domain.HPFW001">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPFW001 WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPFW001 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPFW001 (
COMPANY_CODE, <!-- 公司编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
STATUS, <!-- 维修状态 0-未处理 1-已维修 -->
AFTER_SALE_DATE, <!-- 售后日期 -->
AFTER_SALE_NO, <!-- 售后单号 -->
AFTER_SALE_TYPE, <!-- 售后方式 -->
URGENCY, <!-- 紧急程度 -->
CUSTOM_ID, <!-- 客户ID -->
CUSTOM_NAME, <!-- 客户名称 -->
DEAL_USER_ID, <!-- 处理人ID -->
DEAL_USER_NAME <!-- 处理人名称 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #status#, #afterSaleDate#, #afterSaleNo#, #afterSaleType#, #urgency#, #customId#,
#customName#, #dealUserId#, #dealUserName#)
</insert>
<delete id="delete">
UPDATE ${hpjxSchema}.T_HPFW001 SET DELETE_FLAG = 1 WHERE AFTER_SALE_NO = #afterSaleNo#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPFW001
SET
AFTER_SALE_DATE = #afterSaleDate#, <!-- 售后日期 -->
AFTER_SALE_TYPE = #afterSaleType#, <!-- 售后方式 -->
URGENCY = #urgency#, <!-- 紧急程度 -->
CUSTOM_ID = #customId#, <!-- 客户ID -->
CUSTOM_NAME = #customName#, <!-- 客户名称 -->
<include refid="SqlBase.updateRevise"/>
WHERE AFTER_SALE_NO = #afterSaleNo#
</update>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hpjxSchema}.T_HPFW001
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
<!-- 修改 -->
<update id="updateDeal">
UPDATE ${hpjxSchema}.T_HPFW001
SET
STATUS = #status#,
DEAL_USER_ID = #dealUserId#, <!-- 处理人ID -->
DEAL_USER_NAME = #dealUserName#, <!-- 处理人名称 -->
DEAL_CONTENT = #dealContent#,
<include refid="SqlBase.updateRevise"/>
WHERE AFTER_SALE_NO = #afterSaleNo#
</update>
</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="HPFW002">
<sql id="column">
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除 0-否1-是 -->
STATUS as "status", <!-- 状态 0-未处理 1-已维修 -->
CARE_DATE as "careDate", <!-- 关怀日期 -->
CARE_NO as "careNo", <!-- 关怀单号 -->
CARE_WAY as "careWay", <!-- 关怀方式 -->
CARE_TYPE as "careType", <!-- 关怀类型 -->
CUSTOM_ID as "customId", <!-- 客户ID -->
CUSTOM_NAME as "customName", <!-- 客户名称 -->
DEAL_USER_ID as "dealUserId", <!-- 执行人ID -->
DEAL_USER_NAME as "dealUserName" <!-- 执行人名称 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="idCondition"/>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="careDate">
CARE_DATE = #careDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="careWay">
CARE_WAY = #careWay#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="careType">
CARE_TYPE = #careType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="customId">
CUSTOM_ID = #customId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="customName">
CUSTOM_NAME LIKE CONCAT('%', #customName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserId">
DEAL_USER_ID = #dealUserId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserName">
DEAL_USER_NAME LIKE CONCAT('%', #dealUserName#, '%')
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="careNo">
CARE_NO = #careNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="careNos">
CARE_NO IN <iterate close=")" open="(" conjunction="," property="careNos">#careNos[]#</iterate>
</isNotEmpty>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.fw.domain.HPFW002">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPFW002 WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPFW002 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPFW002 (
COMPANY_CODE, <!-- 公司编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
STATUS, <!-- 状态 0-未处理 1-已维修 -->
CARE_DATE, <!-- 关怀日期 -->
CARE_NO, <!-- 关怀单号 -->
CARE_WAY, <!-- 关怀方式 -->
CARE_TYPE, <!-- 关怀类型 -->
CUSTOM_ID, <!-- 客户ID -->
CUSTOM_NAME, <!-- 客户名称 -->
DEAL_USER_ID, <!-- 执行人ID -->
DEAL_USER_NAME <!-- 执行人名称 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #status#, #careDate#, #careNo#, #careWay#, #careType#,
#customId#, #customName#, #dealUserId#, #dealUserName#)
</insert>
<delete id="delete">
UPDATE ${hpjxSchema}.T_HPFW002 SET DELETE_FLAG = 1 WHERE CARE_NO = #careNo#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPFW002
SET
CARE_DATE = #careDate#, <!-- 关怀日期 -->
CARE_NO = #careNo#, <!-- 关怀单号 -->
CARE_WAY = #careWay#, <!-- 关怀方式 -->
CARE_TYPE = #careType#, <!-- 关怀类型 -->
CUSTOM_ID = #customId#, <!-- 客户ID -->
CUSTOM_NAME = #customName#, <!-- 客户名称 -->
<include refid="SqlBase.updateRevise"/>
WHERE ID = #id#
</update>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hpjxSchema}.T_HPFW002
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
<!-- 修改 -->
<update id="updateDeal">
UPDATE ${hpjxSchema}.T_HPFW002
SET
STATUS = #status#,
DEAL_USER_ID = #dealUserId#, <!-- 处理人ID -->
DEAL_USER_NAME = #dealUserName#, <!-- 处理人名称 -->
<include refid="SqlBase.updateRevise"/>
WHERE CARE_NO = #careNo#
</update>
</sqlMap>
package com.baosight.hpjx.hp.fw.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.fw.constant.HpFwSqlConstant;
import com.baosight.hpjx.hp.fw.domain.HPFW001;
import com.baosight.hpjx.hp.fw.domain.HPFW002;
import com.baosight.hpjx.util.AssertUtils;
import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author:songx
* @date:2024/9/24,18:08
*/
public class HpFwTools {
/**
* @author:songx
* @date:2024/9/24,18:08
*/
public static class HpFw001 {
/**
* 锁.
*
* @param afterSaleNo
*/
public static void lock(String afterSaleNo) {
AssertUtils.isEmpty(afterSaleNo, "售后单号不能为空!");
Map<String, Object> paramMap = new HashMap<>();
paramMap.put(HPFW001.FIELD_AFTER_SALE_NO, afterSaleNo);
DaoBase.getInstance().update(HpFwSqlConstant.HpFw001.LOCK, paramMap);
}
/**
* 锁.
*
* @param afterSaleNos
*/
public static void lock(List<String> afterSaleNos) {
AssertUtils.isEmpty(afterSaleNos, "售后单号不能为空!");
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("afterSaleNos", afterSaleNos);
DaoBase.getInstance().update(HpFwSqlConstant.HpFw001.LOCK, paramMap);
}
/**
* 查询
*
* @param afterSaleNo
* @return
*/
public static HPFW001 get(String afterSaleNo) {
AssertUtils.isEmpty(afterSaleNo, "售后单号不能为空!");
Map<String, Object> paramMap = new HashMap();
paramMap.put(HPFW001.FIELD_AFTER_SALE_NO, afterSaleNo);
List<HPFW001> results = DaoBase.getInstance().query(HPFW001.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 查询
*
* @param afterSaleNos
* @return
*/
public static List<HPFW001> list(List<String> afterSaleNos) {
AssertUtils.isEmpty(afterSaleNos, "售后服务单号不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("afterSaleNos", afterSaleNos);
return DaoBase.getInstance().query(HPFW001.QUERY, paramMap);
}
/**
* 查询
*
* @param afterSaleNos
* @return
*/
public static Map<String, HPFW001> map(List<String> afterSaleNos) {
List<HPFW001> results = list(afterSaleNos);
return results.stream().collect(Collectors.toMap(HPFW001::getAfterSaleNo, item -> item));
}
}
/**
* @author:songx
* @date:2024/9/24,18:08
*/
public static class HpFw002 {
/**
* 锁.
*
* @param careNo
*/
public static void lock(String careNo) {
AssertUtils.isEmpty(careNo, "关怀单号不能为空!");
Map<String, Object> paramMap = new HashMap<>();
paramMap.put(HPFW002.FIELD_CARE_NO, careNo);
DaoBase.getInstance().update(HpFwSqlConstant.HpFw002.LOCK, paramMap);
}
/**
* 锁.
*
* @param careNos
*/
public static void lock(List<String> careNos) {
AssertUtils.isEmpty(careNos, "关怀单号不能为空!");
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("careNos", careNos);
DaoBase.getInstance().update(HpFwSqlConstant.HpFw002.LOCK, paramMap);
}
/**
* 查询
*
* @param careNo
* @return
*/
public static HPFW002 get(String careNo) {
AssertUtils.isEmpty(careNo, "关怀单号不能为空!");
Map<String, Object> paramMap = new HashMap();
paramMap.put(HPFW002.FIELD_CARE_NO, careNo);
List<HPFW002> results = DaoBase.getInstance().query(HPFW002.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 查询
*
* @param careNos
* @return
*/
public static List<HPFW002> list(List<String> careNos) {
AssertUtils.isEmpty(careNos, "客户关怀单号不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("careNos", careNos);
return DaoBase.getInstance().query(HPFW002.QUERY, paramMap);
}
/**
* 查询
*
* @param careNos
* @return
*/
public static Map<String, HPFW002> map(List<String> careNos) {
List<HPFW002> results = list(careNos);
return results.stream().collect(Collectors.toMap(HPFW002::getCareNo, item -> item));
}
}
}
package com.baosight.hpjx.hp.fw.utils;
import com.baosight.hpjx.hp.fw.domain.HPFW001;
import com.baosight.hpjx.hp.fw.domain.HPFW002;
import com.baosight.hpjx.hp.fw.tools.HpFwTools;
import com.baosight.hpjx.util.ObjectUtils;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/9/24,18:06
*/
public class HpFwUtils {
/**
* @author:songx
* @date:2024/9/24,18:07
*/
public static class HpFw001 {
/**
* 锁并获取数据
*
* @param fFw001s
* @return
*/
public static Map<String, HPFW001> lockAndGet(List<HPFW001> fFw001s) {
List<String> afterSaleNos = ObjectUtils.listEpKey(fFw001s, HPFW001.FIELD_AFTER_SALE_NO);
// 锁
HpFwTools.HpFw001.lock(afterSaleNos);
// 查询数据
return HpFwTools.HpFw001.map(afterSaleNos);
}
/**
* 锁并获取数据
*
* @param fFw001
* @return
*/
public static HPFW001 lockAndGet(HPFW001 fFw001) {
return lockAndGet(fFw001.getAfterSaleNo());
}
/**
* 锁并获取数据
*
* @param afterSaleNo
* @return
*/
public static HPFW001 lockAndGet(String afterSaleNo) {
// 锁
HpFwTools.HpFw001.lock(afterSaleNo);
// 查询数据
return HpFwTools.HpFw001.get(afterSaleNo);
}
}
/**
* @author:songx
* @date:2024/9/24,18:07
*/
public static class HpFw002 {
/**
* 锁并获取数据
*
* @param fFw002s
* @return
*/
public static Map<String, HPFW002> lockAndGet(List<HPFW002> fFw002s) {
List<String> careNos = ObjectUtils.listEpKey(fFw002s, HPFW002.FIELD_CARE_NO);
// 锁
HpFwTools.HpFw002.lock(careNos);
// 查询数据
return HpFwTools.HpFw002.map(careNos);
}
/**
* 锁并获取数据
*
* @param fFw002
* @return
*/
public static HPFW002 lockAndGet(HPFW002 fFw002) {
return lockAndGet(fFw002.getCareNo());
}
/**
* 锁并获取数据
*
* @param careNo
* @return
*/
public static HPFW002 lockAndGet(String careNo) {
// 锁
HpFwTools.HpFw002.lock(careNo);
// 查询数据
return HpFwTools.HpFw002.get(careNo);
}
}
}
...@@ -183,8 +183,8 @@ public class HPKC003 extends DaoEPBase { ...@@ -183,8 +183,8 @@ public class HPKC003 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_AMOUNT); eiColumn = new EiColumn(FIELD_AMOUNT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(0); eiColumn.setScaleLength(1);
eiColumn.setFieldLength(12); eiColumn.setFieldLength(15);
eiColumn.setDescName("数量"); eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
......
package com.baosight.hpjx.hp.sc.constant;
/**
* @author:songx
* @date:2024/9/25,10:06
*/
public class HpScConst {
/**
* 完成状态
*
* @author:songx
* @date:2024/9/25,10:07
*/
public static class CompleteStatus {
// 未完成
public static final Integer S0 = 0;
// 已完成
public static final Integer S1 = 1;
// 部分完成
public static final Integer S2 = 2;
}
}
...@@ -72,6 +72,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -72,6 +72,7 @@ public class HPSC005 extends DaoEPBase {
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/ public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String FIELD_MAT_ID = "matId"; /* 材料ID*/ public static final String FIELD_MAT_ID = "matId"; /* 材料ID*/
public static final String FIELD_DELIVERY_DATE = "deliveryDate"; public static final String FIELD_DELIVERY_DATE = "deliveryDate";
public static final String FIELD_COMPLETE_STATUS = "completeStatus"; /* 完成状态*/
public static final String COL_MAT_ID = "MAT_ID"; /* 材料ID*/ public static final String COL_MAT_ID = "MAT_ID"; /* 材料ID*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
...@@ -122,6 +123,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -122,6 +123,7 @@ public class HPSC005 extends DaoEPBase {
public static final String COL_FILE_PATH5 = "FILE_PATH5"; /* 文件地址5*/ public static final String COL_FILE_PATH5 = "FILE_PATH5"; /* 文件地址5*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/ public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/
public static final String COL_DELIVERY_DATE = "DELIVERY_DATE"; public static final String COL_DELIVERY_DATE = "DELIVERY_DATE";
public static final String COL_COMPLETE_STATUS = "COMPLETE_STATUS";
public static final String QUERY = "HPSC005.query"; public static final String QUERY = "HPSC005.query";
public static final String COUNT = "HPSC005.count"; public static final String COUNT = "HPSC005.count";
...@@ -178,6 +180,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -178,6 +180,7 @@ public class HPSC005 extends DaoEPBase {
private Long inventRecordId; /* 存货档案ID*/ private Long inventRecordId; /* 存货档案ID*/
private Long matId; /* 材料ID*/ private Long matId; /* 材料ID*/
private String deliveryDate = " "; private String deliveryDate = " ";
private Integer completeStatus = new Integer(0);
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -414,6 +417,10 @@ public class HPSC005 extends DaoEPBase { ...@@ -414,6 +417,10 @@ public class HPSC005 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_DELIVERY_DATE); eiColumn = new EiColumn(FIELD_DELIVERY_DATE);
eiColumn.setDescName("交货日期"); eiColumn.setDescName("交货日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPLETE_STATUS);
eiColumn.setDescName("完成状态");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -1193,6 +1200,14 @@ public class HPSC005 extends DaoEPBase { ...@@ -1193,6 +1200,14 @@ public class HPSC005 extends DaoEPBase {
this.deliveryDate = deliveryDate; this.deliveryDate = deliveryDate;
} }
public Integer getCompleteStatus() {
return completeStatus;
}
public void setCompleteStatus(Integer completeStatus) {
this.completeStatus = completeStatus;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -1250,6 +1265,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1250,6 +1265,7 @@ public class HPSC005 extends DaoEPBase {
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId)); setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId)); setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDeliveryDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_DATE)), deliveryDate)); setDeliveryDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_DATE)), deliveryDate));
setCompleteStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_COMPLETE_STATUS)), completeStatus));
} }
...@@ -1309,6 +1325,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1309,6 +1325,7 @@ public class HPSC005 extends DaoEPBase {
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID))); map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID))); map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DELIVERY_DATE, StringUtils.toString(deliveryDate, eiMetadata.getMeta(FIELD_DELIVERY_DATE))); map.put(FIELD_DELIVERY_DATE, StringUtils.toString(deliveryDate, eiMetadata.getMeta(FIELD_DELIVERY_DATE)));
map.put(FIELD_COMPLETE_STATUS, StringUtils.toString(completeStatus, eiMetadata.getMeta(FIELD_COMPLETE_STATUS)));
return map; return map;
} }
......
...@@ -56,6 +56,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -56,6 +56,7 @@ public class HPSC006 extends DaoEPBase {
public static final String FIELD_FILE_PATH1 = "filePath1"; /* 文件地址1*/ public static final String FIELD_FILE_PATH1 = "filePath1"; /* 文件地址1*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/ public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String FIELD_MATERIAL = "material"; /* 材质*/ public static final String FIELD_MATERIAL = "material"; /* 材质*/
public static final String FIELD_COMPLETE_STATUS = "completeStatus"; /* 完成状态*/
public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/ public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/
public static final String FIELD_PART_NAME = "partName"; /* 零件名称*/ public static final String FIELD_PART_NAME = "partName"; /* 零件名称*/
...@@ -104,6 +105,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -104,6 +105,7 @@ public class HPSC006 extends DaoEPBase {
public static final String COL_CUT_SCHEDULE = "CUT_SCHEDULE"; /* 下料进度*/ public static final String COL_CUT_SCHEDULE = "CUT_SCHEDULE"; /* 下料进度*/
public static final String COL_REQ_NUM = "REQ_NUM"; /* 领料记录*/ public static final String COL_REQ_NUM = "REQ_NUM"; /* 领料记录*/
public static final String COL_DELIVERY_DATE = "DELIVERY_DATE"; public static final String COL_DELIVERY_DATE = "DELIVERY_DATE";
public static final String COL_COMPLETE_STATUS = "COMPLETE_STATUS";
public static final String QUERY = "HPSC006.query"; public static final String QUERY = "HPSC006.query";
...@@ -161,6 +163,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -161,6 +163,7 @@ public class HPSC006 extends DaoEPBase {
private Integer reqNum = new Integer(0); private Integer reqNum = new Integer(0);
private String deliveryDate = " "; private String deliveryDate = " ";
private Integer completeStatus = new Integer(0);
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -344,6 +347,11 @@ public class HPSC006 extends DaoEPBase { ...@@ -344,6 +347,11 @@ public class HPSC006 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_DELIVERY_DATE); eiColumn = new EiColumn(FIELD_DELIVERY_DATE);
eiColumn.setDescName("交货日期"); eiColumn.setDescName("交货日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPLETE_STATUS);
eiColumn.setDescName("完成状态");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -948,6 +956,14 @@ public class HPSC006 extends DaoEPBase { ...@@ -948,6 +956,14 @@ public class HPSC006 extends DaoEPBase {
this.deliveryDate = deliveryDate; this.deliveryDate = deliveryDate;
} }
public Integer getCompleteStatus() {
return completeStatus;
}
public void setCompleteStatus(Integer completeStatus) {
this.completeStatus = completeStatus;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -994,6 +1010,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -994,6 +1010,7 @@ public class HPSC006 extends DaoEPBase {
setCutSchedule(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUT_SCHEDULE)), cutSchedule)); setCutSchedule(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUT_SCHEDULE)), cutSchedule));
setReqNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REQ_NUM)), reqNum)); setReqNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REQ_NUM)), reqNum));
setDeliveryDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_DATE)), deliveryDate)); setDeliveryDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_DATE)), deliveryDate));
setCompleteStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_COMPLETE_STATUS)), completeStatus));
} }
/** /**
...@@ -1041,6 +1058,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -1041,6 +1058,7 @@ public class HPSC006 extends DaoEPBase {
map.put(FIELD_CUT_SCHEDULE, StringUtils.toString(cutSchedule, eiMetadata.getMeta(FIELD_CUT_SCHEDULE))); map.put(FIELD_CUT_SCHEDULE, StringUtils.toString(cutSchedule, eiMetadata.getMeta(FIELD_CUT_SCHEDULE)));
map.put(FIELD_REQ_NUM, StringUtils.toString(reqNum, eiMetadata.getMeta(FIELD_REQ_NUM))); map.put(FIELD_REQ_NUM, StringUtils.toString(reqNum, eiMetadata.getMeta(FIELD_REQ_NUM)));
map.put(FIELD_DELIVERY_DATE, StringUtils.toString(deliveryDate, eiMetadata.getMeta(FIELD_DELIVERY_DATE))); map.put(FIELD_DELIVERY_DATE, StringUtils.toString(deliveryDate, eiMetadata.getMeta(FIELD_DELIVERY_DATE)));
map.put(FIELD_COMPLETE_STATUS, StringUtils.toString(completeStatus, eiMetadata.getMeta(FIELD_COMPLETE_STATUS)));
return map; return map;
} }
} }
package com.baosight.hpjx.hp.sc.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THpsc0061.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-26 9:53:43 create
*/
public class HPSC0061 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
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"; /* 0-未删除,1-已删除*/
public static final String FIELD_PROD_ORDER_NO = "prodOrderNo"; /* 生产订单号*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 物料编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 物料名称*/
public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String FIELD_GROUP_CODE = "groupCode"; /* 生产组编码*/
public static final String FIELD_GROUP_NAME = "groupName"; /* 生产组名称*/
public static final String FIELD_COMPLETE_STATUS = "completeStatus"; /* 完成状态,0.未完成,1.已完成*/
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_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"; /* 0-未删除,1-已删除*/
public static final String COL_PROD_ORDER_NO = "PROD_ORDER_NO"; /* 生产订单号*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 物料编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 物料名称*/
public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String COL_GROUP_CODE = "GROUP_CODE"; /* 生产组编码*/
public static final String COL_GROUP_NAME = "GROUP_NAME"; /* 生产组名称*/
public static final String COL_COMPLETE_STATUS = "COMPLETE_STATUS"; /* 完成状态,0.未完成,1.已完成*/
public static final String QUERY = "HPSC0061.query";
public static final String COUNT = "HPSC0061.count";
public static final String INSERT = "HPSC0061.insert";
public static final String UPDATE = "HPSC0061.update";
public static final String DELETE = "HPSC0061.delete";
private Long id = new Long(0);
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码 预留*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag = new Integer(0); /* 0-未删除,1-已删除*/
private String prodOrderNo = " "; /* 生产订单号*/
private String inventCode = " "; /* 物料编码*/
private String inventName = " "; /* 物料名称*/
private String factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/
private String groupCode = " "; /* 生产组编码*/
private String groupName = " "; /* 生产组名称*/
private Integer completeStatus = new Integer(0); /* 完成状态,0.未完成,1.已完成*/
/**
* 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_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("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_ORDER_NO);
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_FACTORY_CODE);
eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_GROUP_CODE);
eiColumn.setDescName("生产组编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_GROUP_NAME);
eiColumn.setDescName("生产组名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPLETE_STATUS);
eiColumn.setDescName("完成状态,0.未完成,1.已完成");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPSC0061() {
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 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 - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the prodOrderNo - 生产订单号.
* @return the prodOrderNo
*/
public String getProdOrderNo() {
return this.prodOrderNo;
}
/**
* set the prodOrderNo - 生产订单号.
*
* @param prodOrderNo - 生产订单号
*/
public void setProdOrderNo(String prodOrderNo) {
this.prodOrderNo = prodOrderNo;
}
/**
* 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 factoryCode - 厂区编码.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 厂区编码.
*
* @param factoryCode - 厂区编码
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 厂区名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 厂区名称.
*
* @param factoryName - 厂区名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the groupCode - 生产组编码.
* @return the groupCode
*/
public String getGroupCode() {
return this.groupCode;
}
/**
* set the groupCode - 生产组编码.
*
* @param groupCode - 生产组编码
*/
public void setGroupCode(String groupCode) {
this.groupCode = groupCode;
}
/**
* get the groupName - 生产组名称.
* @return the groupName
*/
public String getGroupName() {
return this.groupName;
}
/**
* set the groupName - 生产组名称.
*
* @param groupName - 生产组名称
*/
public void setGroupName(String groupName) {
this.groupName = groupName;
}
/**
* get the completeStatus - 完成状态,0.未完成,1.已完成.
* @return the completeStatus
*/
public Integer getCompleteStatus() {
return this.completeStatus;
}
/**
* set the completeStatus - 完成状态,0.未完成,1.已完成.
*
* @param completeStatus - 完成状态,0.未完成,1.已完成
*/
public void setCompleteStatus(Integer completeStatus) {
this.completeStatus = completeStatus;
}
/**
* 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));
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));
setProdOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_ORDER_NO)), prodOrderNo));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setGroupCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_GROUP_CODE)), groupCode));
setGroupName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_GROUP_NAME)), groupName));
setCompleteStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_COMPLETE_STATUS)), completeStatus));
}
/**
* 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_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)));
map.put(FIELD_PROD_ORDER_NO, StringUtils.toString(prodOrderNo, eiMetadata.getMeta(FIELD_PROD_ORDER_NO)));
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_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_GROUP_CODE, StringUtils.toString(groupCode, eiMetadata.getMeta(FIELD_GROUP_CODE)));
map.put(FIELD_GROUP_NAME, StringUtils.toString(groupName, eiMetadata.getMeta(FIELD_GROUP_NAME)));
map.put(FIELD_COMPLETE_STATUS, StringUtils.toString(completeStatus, eiMetadata.getMeta(FIELD_COMPLETE_STATUS)));
return map;
}
}
package com.baosight.hpjx.hp.sc.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THpsc0061a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-26 9:53:46 create
*/
public class HPSC0061A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
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"; /* 0-未删除,1-已删除*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 物料编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 物料名称*/
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_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"; /* 0-未删除,1-已删除*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 物料编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 物料名称*/
public static final String QUERY = "HPSC0061A.query";
public static final String COUNT = "HPSC0061A.count";
public static final String INSERT = "HPSC0061A.insert";
public static final String UPDATE = "HPSC0061A.update";
public static final String DELETE = "HPSC0061A.delete";
private Long id = new Long(0);
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码 预留*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag = new Integer(0); /* 0-未删除,1-已删除*/
private String inventCode = " "; /* 物料编码*/
private String inventName = " "; /* 物料名称*/
/**
* 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_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("0-未删除,1-已删除");
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);
}
/**
* the constructor.
*/
public HPSC0061A() {
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 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 - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the 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 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));
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));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
}
/**
* 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_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)));
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)));
return map;
}
}
...@@ -73,7 +73,7 @@ public class HPSC010 extends DaoEPBase { ...@@ -73,7 +73,7 @@ public class HPSC010 extends DaoEPBase {
private String registerDate = " "; /* 登记日期*/ private String registerDate = " "; /* 登记日期*/
private String factoryCode = " "; /* 工厂代码*/ private String factoryCode = " "; /* 工厂代码*/
private BigDecimal weight = new BigDecimal("0"); /* 产量*/ private BigDecimal weight = new BigDecimal("0"); /* 产量*/
private Long userCount = new Long(0); /* 用工人数*/ private BigDecimal userCount = new BigDecimal(0); /* 用工人数*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -138,6 +138,9 @@ public class HPSC010 extends DaoEPBase { ...@@ -138,6 +138,9 @@ public class HPSC010 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_USER_COUNT); eiColumn = new EiColumn(FIELD_USER_COUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(1);
eiColumn.setFieldLength(18);
eiColumn.setDescName("用工人数"); eiColumn.setDescName("用工人数");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -363,7 +366,7 @@ public class HPSC010 extends DaoEPBase { ...@@ -363,7 +366,7 @@ public class HPSC010 extends DaoEPBase {
* get the userCount - 用工人数. * get the userCount - 用工人数.
* @return the userCount * @return the userCount
*/ */
public Long getUserCount() { public BigDecimal getUserCount() {
return this.userCount; return this.userCount;
} }
...@@ -372,7 +375,7 @@ public class HPSC010 extends DaoEPBase { ...@@ -372,7 +375,7 @@ public class HPSC010 extends DaoEPBase {
* *
* @param userCount - 用工人数 * @param userCount - 用工人数
*/ */
public void setUserCount(Long userCount) { public void setUserCount(BigDecimal userCount) {
this.userCount = userCount; this.userCount = userCount;
} }
/** /**
...@@ -396,7 +399,7 @@ public class HPSC010 extends DaoEPBase { ...@@ -396,7 +399,7 @@ public class HPSC010 extends DaoEPBase {
setRegisterDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REGISTER_DATE)), registerDate)); setRegisterDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REGISTER_DATE)), registerDate));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode)); setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight)); setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setUserCount(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_USER_COUNT)), userCount)); setUserCount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_USER_COUNT)), userCount));
} }
/** /**
......
...@@ -92,7 +92,7 @@ public class HPSC010A extends DaoEPBase { ...@@ -92,7 +92,7 @@ public class HPSC010A extends DaoEPBase {
private BigDecimal weight = new BigDecimal("0"); /* 产量*/ private BigDecimal weight = new BigDecimal("0"); /* 产量*/
private BigDecimal weightJh = new BigDecimal("0"); /* 加焊产量*/ private BigDecimal weightJh = new BigDecimal("0"); /* 加焊产量*/
private Integer groupUserCount = 0; /* 组用工人数*/ private BigDecimal groupUserCount = new BigDecimal(0); /* 组用工人数*/
private Integer rowNo = 0; private Integer rowNo = 0;
private Long parentId = new Long(0); /* 父级ID*/ private Long parentId = new Long(0); /* 父级ID*/
private Integer deleteFlag; /* 是否删除0:否1.是*/ private Integer deleteFlag; /* 是否删除0:否1.是*/
...@@ -165,6 +165,9 @@ public class HPSC010A extends DaoEPBase { ...@@ -165,6 +165,9 @@ public class HPSC010A extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_GROUP_USER_COUNT); eiColumn = new EiColumn(FIELD_GROUP_USER_COUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(1);
eiColumn.setFieldLength(20);
eiColumn.setDescName("组人数"); eiColumn.setDescName("组人数");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -408,7 +411,7 @@ public class HPSC010A extends DaoEPBase { ...@@ -408,7 +411,7 @@ public class HPSC010A extends DaoEPBase {
* get the groupUserCount - 组人数. * get the groupUserCount - 组人数.
* @return the groupUserCount * @return the groupUserCount
*/ */
public Integer getGroupUserCount() { public BigDecimal getGroupUserCount() {
return this.groupUserCount; return this.groupUserCount;
} }
...@@ -417,7 +420,7 @@ public class HPSC010A extends DaoEPBase { ...@@ -417,7 +420,7 @@ public class HPSC010A extends DaoEPBase {
* *
* @param groupUserCount - 组人数 * @param groupUserCount - 组人数
*/ */
public void setGroupUserCount(Integer groupUserCount) { public void setGroupUserCount(BigDecimal groupUserCount) {
this.groupUserCount = groupUserCount; this.groupUserCount = groupUserCount;
} }
...@@ -578,7 +581,7 @@ public class HPSC010A extends DaoEPBase { ...@@ -578,7 +581,7 @@ public class HPSC010A extends DaoEPBase {
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName)); setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight)); setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setWeightJh(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT_JH)), weightJh)); setWeightJh(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT_JH)), weightJh));
setGroupUserCount(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_GROUP_USER_COUNT)), groupUserCount)); setGroupUserCount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_GROUP_USER_COUNT)), groupUserCount));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId)); setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
......
...@@ -84,7 +84,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -84,7 +84,7 @@ public class ServiceHPSC002 extends ServiceBase {
try { try {
inInfo = super.query(inInfo, HPSC002.APPQUERY, new HPSC002()); inInfo = super.query(inInfo, HPSC002.APPQUERY, new HPSC002());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setMsg(inInfo, e, "查询失败");
} }
return inInfo; return inInfo;
} }
......
...@@ -8,11 +8,22 @@ import com.baosight.hpjx.core.dao.DaoUtils; ...@@ -8,11 +8,22 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.ds.domain.HPDS002; import com.baosight.hpjx.hp.ds.domain.HPDS002;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.*; import com.baosight.hpjx.hp.sc.constant.HpScConst;
import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC006;
import com.baosight.hpjx.hp.sc.tools.HPSCTools; import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.hp.sc.utils.HpScUtils;
import com.baosight.hpjx.hp.xs.tools.HPXSTools; import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.*; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.contants.ACConstants; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.FileUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.ProjectInfo; import com.baosight.iplat4j.core.ProjectInfo;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -30,22 +41,21 @@ import java.util.Arrays; ...@@ -30,22 +41,21 @@ import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* *
*/ */
public class ServiceHPSC006 extends ServiceBase { public class ServiceHPSC006 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
@OperationLogAnnotation(operModul = "生产下料",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "生产下料",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
HPSC005 HPSC005 = new HPSC005(); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005().eiMetadata);
EiInfo outInfo = super.initLoad(inInfo, HPSC005); inInfo.addBlock(HPConstants.BLOCK_DETAIL).addBlockMeta(new HPSC006().eiMetadata);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPSC005.eiMetadata);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
} catch (Exception e) { } catch (Exception e) {
...@@ -54,35 +64,39 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -54,35 +64,39 @@ public class ServiceHPSC006 extends ServiceBase {
return inInfo; return inInfo;
} }
/** /**
* 查询操作. * 查询操作
*
* @param inInfo
* @return
*/ */
@OperationLogAnnotation(operModul = "生产下料",operType = "查询",operDesc = "查询")
@Override @Override
@OperationLogAnnotation(operModul = "生产下料", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC003.FIELD_DELIVERY_DATE, Map queryMap = EiInfoUtils.getFirstRow(inInfo);
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC003.FIELD_DELIVERY_DATE))); queryMap.put(HPSC003.FIELD_DELIVERY_DATE, DateUtils.formatShort(queryMap.get(HPSC003.FIELD_DELIVERY_DATE)));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC005.FIELD_WORK_DATE, queryMap.put(HPSC005.FIELD_WORK_DATE, DateUtils.formatShort(queryMap.get(HPSC005.FIELD_WORK_DATE)));
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC005.FIELD_WORK_DATE))); queryMap.put(HPSC005.FIELD_PLAN_COMPLETION_DATE, DateUtils.formatShort(queryMap.get(HPSC005.FIELD_PLAN_COMPLETION_DATE)));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC005.FIELD_PLAN_COMPLETION_DATE, inInfo = super.query(inInfo, "HPSC005.query", new HPSC005());
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC005.FIELD_PLAN_COMPLETION_DATE))); // 统计各个状态数量
EiInfo outInfo = super.query(inInfo, "HPSC005.query", new HPSC005()); List<Map> statusStats = dao.query("HPSC005.statByCompleteStatus", queryMap);
EiBlock blcok = outInfo.addBlock(HPConstants.BLOCK_DETAIL); inInfo.set("statusStat", statusStats);
blcok.setBlockMeta(new HPSC006().eiMetadata); } catch (Exception e) {
return outInfo; LogUtils.setMsg(inInfo, e, "查询失败");
}
return inInfo;
} }
@OperationLogAnnotation(operModul = "生产下料",operType = "查询",operDesc = "查询明细")
public EiInfo queryDetail(EiInfo inInfo){ @OperationLogAnnotation(operModul = "生产下料", operType = "查询", operDesc = "查询明细")
public EiInfo queryDetail(EiInfo inInfo) {
HPSC006 HPSC006 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
EiInfo outInfo = new EiInfo(); EiInfo outInfo = new EiInfo();
//添加返回到前台的块,块名和前台的对应 //添加返回到前台的块,块名和前台的对应
EiBlock eiBlock = outInfo.addBlock("result"); EiBlock eiBlock = outInfo.addBlock("result");
HashMap params = new HashMap(); HashMap params = new HashMap();
params.put("productionOrderNo",inInfo.get("productionOrderNo")); params.put("productionOrderNo", inInfo.get("productionOrderNo"));
List<HPSC006> list = dao.query("HPSC006.queryDetail",params,0,-999999); List<HPSC006> list = dao.query("HPSC006.queryDetail", params, 0, -999999);
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
HPSC006 hpsc006 = list.get(i); HPSC006 hpsc006 = list.get(i);
...@@ -92,7 +106,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -92,7 +106,7 @@ public class ServiceHPSC006 extends ServiceBase {
map.put("projCode", projCode); map.put("projCode", projCode);
map.put("hpsc006Id", hpsc006.getId()); map.put("hpsc006Id", hpsc006.getId());
List reqNum = dao.query("HPKC002.query",map); List reqNum = dao.query("HPKC002.query", map);
hpsc006.setReqNum(reqNum.size()); hpsc006.setReqNum(reqNum.size());
} }
} }
...@@ -111,7 +125,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -111,7 +125,7 @@ public class ServiceHPSC006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产下料",operType = "保存",operDesc = "保存") @OperationLogAnnotation(operModul = "生产下料", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock("detail").getRows(); List<Map> resultRows = inInfo.getBlock("detail").getRows();
...@@ -152,12 +166,12 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -152,12 +166,12 @@ public class ServiceHPSC006 extends ServiceBase {
this.modify(hpsc006); this.modify(hpsc006);
} }
} }
int size = resultRows.size(); // 更新主订单状态
//刷新 this.updateMainStatus(productionOrderNo);
//inInfo = this.refreshHPSC006(inInfo, productionOrderNo); //inInfo = this.refreshHPSC006(inInfo, productionOrderNo);
inInfo = this.queryDetail(inInfo); inInfo = this.queryDetail(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + size + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败"); LogUtils.setDetailMsg(inInfo, e, "保存失败");
} }
...@@ -170,6 +184,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -170,6 +184,7 @@ public class ServiceHPSC006 extends ServiceBase {
public void add(HPSC006 hpsc006) { public void add(HPSC006 hpsc006) {
DaoUtils.insert("HPSC006.insert",hpsc006); DaoUtils.insert("HPSC006.insert",hpsc006);
} }
/** /**
* 修改操作. * 修改操作.
*/ */
...@@ -230,15 +245,17 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -230,15 +245,17 @@ public class ServiceHPSC006 extends ServiceBase {
} }
return outInfo; return outInfo;
} }
private EiInfo refreshHPSC006(EiInfo inInfo, String productionOrderNo) { private EiInfo refreshHPSC006(EiInfo inInfo, String productionOrderNo) {
List<HPSC006> HPSC006 = HPSCTools.Hpsc006.get(productionOrderNo); List<HPSC006> HPSC006 = HPSCTools.Hpsc006.get(productionOrderNo);
inInfo.addBlock(CommonConstant.Field.DETAIL).addRows(HPSC006); inInfo.addBlock(CommonConstant.Field.DETAIL).setRows(HPSC006);
return inInfo; return inInfo;
} }
/** /**
* 修改操作. * 修改操作.
*/ */
@OperationLogAnnotation(operModul = "生产下料",operType = "修改",operDesc = "修改") @OperationLogAnnotation(operModul = "生产下料", operType = "修改", operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
EiInfo outInfo = new EiInfo(); EiInfo outInfo = new EiInfo();
try { try {
...@@ -254,17 +271,18 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -254,17 +271,18 @@ public class ServiceHPSC006 extends ServiceBase {
BigDecimal num = HPSC006.getNum(); BigDecimal num = HPSC006.getNum();
BigDecimal unitWt = HPSC006.getUnitWt(); BigDecimal unitWt = HPSC006.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()/1000)); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue() / 1000));
HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick())); HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(), HPSC006.getInventWidth(),
HPSC006.getInventThick()));
HPSC006.setProjCode(projCode); HPSC006.setProjCode(projCode);
HPSC006.setProjName(projName); HPSC006.setProjName(projName);
HPSC006.setProductionOrderNo(productionOrderNo); HPSC006.setProductionOrderNo(productionOrderNo);
HPSC006.setTotalWt(totalWt); HPSC006.setTotalWt(totalWt);
HPSC006.setPlanCompletionDate(StringUtil.removeHorizontalLine(HPSC006.getPlanCompletionDate())); HPSC006.setPlanCompletionDate(StringUtil.removeHorizontalLine(HPSC006.getPlanCompletionDate()));
HPSC006.setInventCode(HPPZTools.checkAndSavePZ04(HPSC006.getInventType(),HPSC006.getInventName())); HPSC006.setInventCode(HPPZTools.checkAndSavePZ04(HPSC006.getInventType(), HPSC006.getInventName()));
HPSC006.setOrgName(HPXSTools.XsOrg.get(HPSC006.getFactoryCode()).getOrgCname()); HPSC006.setOrgName(HPXSTools.XsOrg.get(HPSC006.getFactoryCode()).getOrgCname());
HPSC006.setFactoryName(HPXSTools.XsOrg.get(HPSC006.getOrgNo()).getOrgCname()); HPSC006.setFactoryName(HPXSTools.XsOrg.get(HPSC006.getOrgNo()).getOrgCname());
DaoUtils.update("HPSC006.update",HPSC006); DaoUtils.update("HPSC006.update", HPSC006);
} }
//刷新 //刷新
outInfo = this.refreshHPSC006(outInfo, productionOrderNo); outInfo = this.refreshHPSC006(outInfo, productionOrderNo);
...@@ -283,7 +301,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -283,7 +301,7 @@ public class ServiceHPSC006 extends ServiceBase {
/** /**
* 删除操作. * 删除操作.
*/ */
@OperationLogAnnotation(operModul = "生产下料",operType = "删除",operDesc = "删除") @OperationLogAnnotation(operModul = "生产下料", operType = "删除", operDesc = "删除")
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
HPSC006 HPSC006 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
EiBlock eiBlock = eiInfo.getBlock(HPConstants.BLOCK_DETAIL); EiBlock eiBlock = eiInfo.getBlock(HPConstants.BLOCK_DETAIL);
...@@ -448,22 +466,109 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -448,22 +466,109 @@ public class ServiceHPSC006 extends ServiceBase {
Map docInfoMap = docInfo.getMap("docMap"); Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) { if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo(); EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0); eiInfo.set("data", docInfoMap.get("url") + "-" + 0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105"); eiInfo.set(EiConstant.serviceId, "S_EU_0105");
//调用接口 //调用接口
EiInfo outInfo = XServiceManager.call(eiInfo); EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){ if (outInfo.getStatus() == EiConstant.STATUS_FAILURE) {
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败"); LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败"); outInfo.setMsg("失败");
} }
} }
}else { } else {
FileUtils.deleteFile(realPath); FileUtils.deleteFile(realPath);
} }
} }
this.dao.delete(HPDS002.DELETE,map); this.dao.delete(HPDS002.DELETE, map);
}
}
/**
* 完成
*
* @param inInfo
* @return
*/
public EiInfo complete(EiInfo inInfo) {
try {
String productionOrderNo = inInfo.getString("productionOrderNo");
List<HPSC006> fSc006s = MapUtils.toDaoEPBases(inInfo, CommonConstant.Field.DETAIL, HPSC006.class);
Map<Long, HPSC006> dbSc006Map = HpScUtils.HpSc006.lockAndGet(fSc006s);
// 检查数据
this.checkCompleteData(fSc006s, dbSc006Map);
// 写入数据
this.saveCompleteData(fSc006s, dbSc006Map);
// 更新主订单状态
this.updateMainStatus(productionOrderNo);
// 刷新页面数据
inInfo = this.query(inInfo);
inInfo = this.refreshHPSC006(inInfo, productionOrderNo);
inInfo.setMsg("操作成功,本次完成" + fSc006s.size() + "条数据");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
/**
* @param fSc006s
* @param dbSc006Map
*/
private void checkCompleteData(List<HPSC006> fSc006s, Map<Long, HPSC006> dbSc006Map) {
for (HPSC006 fSc006 : fSc006s) {
Long id = fSc006.getId();
HPSC006 dbSc006 = dbSc006Map.get(id);
AssertUtils.isNull(dbSc006, String.format("标识【%s】不存在,请检查", id));
AssertUtils.isNotEquals(dbSc006.getCompleteStatus(), CommonConstant.YesNo.NO_0,
String.format("标识【%s】状态的不是\"未完成\",", id));
}
}
/**
* 写入数据
*
* @param fSc006s
* @param dbSc006Map
*/
private void saveCompleteData(List<HPSC006> fSc006s, Map<Long, HPSC006> dbSc006Map) {
for (HPSC006 fSc006 : fSc006s) {
Map paramMap = new HashMap();
paramMap.put(HPSC006.FIELD_ID, fSc006.getId());
paramMap.put(HPSC006.FIELD_COMPLETE_STATUS, HpScConst.CompleteStatus.S1);
DaoUtils.update("HPSC006.updateCompleteStatus", paramMap);
} }
} }
/**
* 更新主订单状态
*
* @param prodOrderNo
*/
private void updateMainStatus(String prodOrderNo) {
Integer completeStatus = calcCompleteStatus(prodOrderNo);
Map paramMap = new HashMap();
paramMap.put(HPSC005.FIELD_PROD_ORDER_NO, prodOrderNo);
paramMap.put(HPSC006.FIELD_COMPLETE_STATUS, completeStatus);
DaoUtils.update("HPSC005.updateCompleteStatus", paramMap);
}
/**
* 计算完成状态
*
* @param prodOrderNo
* @return
*/
private Integer calcCompleteStatus(String prodOrderNo) {
List<HPSC006> dbSc006s = HPSCTools.Hpsc006.get(prodOrderNo);
List<Integer> statuses = dbSc006s.stream().map(HPSC006::getCompleteStatus).distinct()
.collect(Collectors.toList());
if (statuses.size() > 1) {
return HpScConst.CompleteStatus.S2;
} else {
return statuses.get(0);
}
}
} }
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.ds.domain.HPDS002;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.constant.HpScConst;
import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC006;
import com.baosight.hpjx.hp.sc.domain.HPSC0061;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.hp.sc.utils.HpScUtils;
import com.baosight.hpjx.hp.xs.domain.Org;
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.FileUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.ProjectInfo;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import com.baosight.iplat4j.core.util.NumberUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author:songx
* @date:2024/9/26,9:37
*/
public class ServiceHPSC0061 extends ServiceBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产下料", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005().eiMetadata);
inInfo.addBlock(CommonConstant.Field.DETAIL).addBlockMeta(new HPSC006().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "生产下料", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HPSC003.FIELD_DELIVERY_DATE, DateUtils.formatShort(queryMap.get(HPSC003.FIELD_DELIVERY_DATE)));
queryMap.put(HPSC005.FIELD_WORK_DATE, DateUtils.formatShort(queryMap.get(HPSC005.FIELD_WORK_DATE)));
queryMap.put(HPSC005.FIELD_PLAN_COMPLETION_DATE,
DateUtils.formatShort(queryMap.get(HPSC005.FIELD_PLAN_COMPLETION_DATE)));
inInfo = super.query(inInfo, "HPSC005.query", new HPSC005());
// 统计各个状态数量
List<Map> statusStats = dao.query("HPSC005.statByCompleteStatus", queryMap);
inInfo.set("statusStat", statusStats);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 明细
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产下料", operType = "查询", operDesc = "查询明细")
public EiInfo queryDetail(EiInfo inInfo) {
try {
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", inInfo.getString("prodOrderNo"));
List<HPSC0061> dbSc0061s = dao.query("HPSC0061.queryDetail", queryMap);
inInfo.addBlock(CommonConstant.Field.DETAIL).setRows(dbSc0061s);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询明细失败");
}
return inInfo;
}
/**
* 刷新主信息
*
* @param inInfo
* @param prodOrderNo
* @return
*/
private EiInfo refreshMain(EiInfo inInfo, String prodOrderNo) {
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC0061> dbSc0061s = dao.query("HPSC0061.queryDetail", queryMap);
inInfo.addBlock(CommonConstant.Field.DETAIL).setRows(dbSc0061s);
return inInfo;
}
/**
* 保存操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产下料", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
String prodOrderNo = inInfo.getString("prodOrderNo");
List<HPSC0061> fSc0061s = MapUtils.toDaoEPBases(inInfo, CommonConstant.Field.DETAIL, HPSC0061.class);
for (HPSC0061 fSc0061 : fSc0061s) {
String groupCode = fSc0061.getGroupCode();
AssertUtils.isEmpty(groupCode, String.format("物料【%s】的生产组不能为空,请检查", fSc0061.getInventName()));
Org groupOrg = HPXSTools.XsOrg.get(groupCode);
fSc0061.setGroupName(groupOrg.getOrgCname());
fSc0061.setFactoryCode(groupOrg.getFactoryCode());
fSc0061.setFactoryName(groupOrg.getFactoryName());
fSc0061.setProdOrderNo(prodOrderNo);
if (fSc0061.getId() == null || fSc0061.getId() == 0) {
this.add(fSc0061);
} else {
this.modify(fSc0061);
}
}
// 更新主订单状态
this.updateMainStatus(prodOrderNo);
inInfo = this.queryDetail(inInfo);
inInfo.setMsg("操作成功!本次对[" + fSc0061s.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param fSc0061
*/
public void add(HPSC0061 fSc0061) {
fSc0061.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPSC0061.INSERT, fSc0061);
}
/**
* 修改操作.
*/
public void modify(HPSC0061 fSc006) {
DaoUtils.update(HPSC0061.UPDATE, fSc006);
}
/**
* 完成
*
* @param inInfo
* @return
*/
public EiInfo complete(EiInfo inInfo) {
try {
String prodOrderNo = inInfo.getString("prodOrderNo");
List<HPSC0061> fSc0061s = MapUtils.toDaoEPBases(inInfo, CommonConstant.Field.DETAIL, HPSC0061.class);
// 检查数据
this.checkCompleteData(prodOrderNo, fSc0061s);
// 写入数据
this.saveCompleteData(prodOrderNo, fSc0061s);
// 更新主订单状态
this.updateMainStatus(prodOrderNo);
// 刷新页面数据
inInfo = this.query(inInfo);
inInfo = this.refreshMain(inInfo, prodOrderNo);
inInfo.setMsg("操作成功,本次完成" + fSc0061s.size() + "条数据");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
/**
* @param prodOrderNo
* @param fSc0061s
*/
private void checkCompleteData(String prodOrderNo, List<HPSC0061> fSc0061s) {
AssertUtils.isEmpty(prodOrderNo, "请选择订单");
for (HPSC0061 fSc0061 : fSc0061s) {
AssertUtils.isEmpty(fSc0061.getGroupCode(), String.format("物料【%s】的生产组不能为空",
fSc0061.getInventName()));
}
}
/**
* 写入数据
*
* @param prodOrderNo
* @param fSc0061s
*/
private void saveCompleteData(String prodOrderNo, List<HPSC0061> fSc0061s) {
for (HPSC0061 fSc0061 : fSc0061s) {
String groupCode = fSc0061.getGroupCode();
AssertUtils.isEmpty(groupCode, String.format("物料【%s】的生产组不能为空,请检查", fSc0061.getInventName()));
Org groupOrg = HPXSTools.XsOrg.get(groupCode);
fSc0061.setGroupName(groupOrg.getOrgCname());
fSc0061.setFactoryCode(groupOrg.getFactoryCode());
fSc0061.setFactoryName(groupOrg.getFactoryName());
fSc0061.setProdOrderNo(prodOrderNo);
fSc0061.setCompleteStatus(HpScConst.CompleteStatus.S1);
this.add(fSc0061);
}
}
/**
* 更新主订单状态
*
* @param prodOrderNo
*/
private void updateMainStatus(String prodOrderNo) {
Integer completeStatus = calcCompleteStatus(prodOrderNo);
Map paramMap = new HashMap();
paramMap.put(HPSC005.FIELD_PROD_ORDER_NO, prodOrderNo);
paramMap.put(HPSC0061.FIELD_COMPLETE_STATUS, completeStatus);
DaoUtils.update("HPSC005.updateCompleteStatus", paramMap);
}
/**
* 计算完成状态
*
* @param prodOrderNo
* @return
*/
private Integer calcCompleteStatus(String prodOrderNo) {
List<HPSC0061> dbSc0061s = HPSCTools.HpSc0061.getDetailByOrder(prodOrderNo);
List<Integer> statuses = dbSc0061s.stream().map(HPSC0061::getCompleteStatus).distinct()
.collect(Collectors.toList());
if (statuses.size() > 1) {
return HpScConst.CompleteStatus.S2;
} else {
return statuses.get(0);
}
}
}
...@@ -81,6 +81,7 @@ public class ServiceHPSC010 extends ServiceEPBase { ...@@ -81,6 +81,7 @@ public class ServiceHPSC010 extends ServiceEPBase {
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
int i = 0; int i = 0;
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
HPSC010 hpsc010 = new HPSC010(); HPSC010 hpsc010 = new HPSC010();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
List<Map> list = eiBlock.getRows(); List<Map> list = eiBlock.getRows();
...@@ -99,7 +100,7 @@ public class ServiceHPSC010 extends ServiceEPBase { ...@@ -99,7 +100,7 @@ public class ServiceHPSC010 extends ServiceEPBase {
hpsc010.setWeight(BigDecimal.valueOf(weight/2)); hpsc010.setWeight(BigDecimal.valueOf(weight/2));
hpsc010.setId(Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_ID))); hpsc010.setId(Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_ID)));
hpsc010.setRegisterDate(StringUtil.removeHorizontalLine(registerDate)); hpsc010.setRegisterDate(StringUtil.removeHorizontalLine(registerDate));
hpsc010.setUserCount(Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_USER_COUNT))); hpsc010.setUserCount(MapUtils.getBigDecimal(queryMap, HPSC010.FIELD_USER_COUNT));
DaoUtils.update(HPSC010.UPDATE, hpsc010); DaoUtils.update(HPSC010.UPDATE, hpsc010);
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
...@@ -119,17 +120,18 @@ public class ServiceHPSC010 extends ServiceEPBase { ...@@ -119,17 +120,18 @@ public class ServiceHPSC010 extends ServiceEPBase {
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
int i = 0; int i = 0;
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
HPSC010 hpxs010 = new HPSC010(); HPSC010 hpxs010 = new HPSC010();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
List<Map> list = eiBlock.getRows(); List<Map> list = eiBlock.getRows();
list.addAll(inInfo.getBlock(CommonConstant.Field.DETAIL).getRows()); list.addAll(inInfo.getBlock(CommonConstant.Field.DETAIL).getRows());
double weight = 0; double weight = 0;
String registerDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_REGISTER_DATE); String registerDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_REGISTER_DATE);
Map queryMap = new HashMap(); Map paramMap = new HashMap();
queryMap.put(HPSC010.FIELD_FACTORY_CODE,list.get(0).get(HPSC010.FIELD_FACTORY_CODE)); paramMap.put(HPSC010.FIELD_FACTORY_CODE,list.get(0).get(HPSC010.FIELD_FACTORY_CODE));
queryMap.put(HPSC010.FIELD_REGISTER_DATE,StringUtil.removeHorizontalLine(registerDate)); paramMap.put(HPSC010.FIELD_REGISTER_DATE,StringUtil.removeHorizontalLine(registerDate));
queryMap.put(HPSC010.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0); paramMap.put(HPSC010.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
queryFactoryCode(inInfo,queryMap); queryFactoryCode(inInfo,paramMap);
for (i = 0; i < list.size(); i++) { for (i = 0; i < list.size(); i++) {
Map<?, ?> map = list.get(i); Map<?, ?> map = list.get(i);
HPSC010A hpsc010A = new HPSC010A(); HPSC010A hpsc010A = new HPSC010A();
...@@ -138,9 +140,9 @@ public class ServiceHPSC010 extends ServiceEPBase { ...@@ -138,9 +140,9 @@ public class ServiceHPSC010 extends ServiceEPBase {
} }
hpxs010.fromMap(eiBlock.getRow(0)); hpxs010.fromMap(eiBlock.getRow(0));
hpxs010.setDeleteFlag(CommonConstant.YesNo.NO_0); hpxs010.setDeleteFlag(CommonConstant.YesNo.NO_0);
hpxs010.setWeight(BigDecimal.valueOf(weight/2)); hpxs010.setWeight(BigDecimal.valueOf(weight / 2));
hpxs010.setRegisterDate(StringUtil.removeHorizontalLine(registerDate)); hpxs010.setRegisterDate(StringUtil.removeHorizontalLine(registerDate));
hpxs010.setUserCount(Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_USER_COUNT))); hpxs010.setUserCount(MapUtils.getBigDecimal(queryMap, HPSC010.FIELD_USER_COUNT));
DaoUtils.insert(HPSC010.INSERT, hpxs010); DaoUtils.insert(HPSC010.INSERT, hpxs010);
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.insert", "新增")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.insert", "新增")});
......
...@@ -204,28 +204,39 @@ ...@@ -204,28 +204,39 @@
<include refid="order"/> <include refid="order"/>
</select> </select>
<select id="appQuery" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002"> <select id="appQuery" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002">
SELECT * FROM (
SELECT SELECT
<include refid="column1"/> <include refid="column1"/>
,ifnull(C.CKNUM,0) as "cknum",ifnull(C.RKNUM,0) as "rknum",ifnull(C.PROJ_STATUS,1) as "projStatus" ,ifnull(C.CKNUM,0) as "cknum",ifnull(C.RKNUM,0) as "rknum",ifnull(C.PROJ_STATUS,1) as "projStatus"
FROM ${hpjxSchema}.t_hpsc002 A FROM ${hpjxSchema}.t_hpsc002 A
LEFT JOIN ${hpjxSchema}.t_hpsc005 B on A.ID = B.MAT_ID LEFT JOIN ${hpjxSchema}.t_hpsc005 B on A.ID = B.MAT_ID
LEFT JOIN (select A.COMPANY_CODE,A.PROJ_CODE,A.PRDT_CODE,A.PARENT_PRDT_NAME,sum(ifnull(A.NUM,0)) as JHNUM,sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) as RKNUM,sum(ifnull(B.AMOUNT,0)) as CKNUM, LEFT JOIN (select A.COMPANY_CODE,A.PROJ_CODE,A.PRDT_CODE,A.PARENT_PRDT_NAME,
A.LENGTH, A.WIDTH, A.THICK,
sum(ifnull(A.NUM,0)) as JHNUM,sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) as RKNUM,sum(ifnull(B.AMOUNT,0)) as CKNUM,
case when sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 1 case when sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 1
when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 2 when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) <![CDATA[ <> ]]> sum(ifnull(B.AMOUNT,0)) then 2
when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) = sum(ifnull(B.AMOUNT,0)) then 3 else 0 end as PROJ_STATUS when sum(ifnull(A.NUM,0)) = sum(ifnull(A.ACTUAL_COMPLETION_NUM,0)) and sum(ifnull(A.NUM,0)) = sum(ifnull(B.AMOUNT,0)) then 3 else 0 end as PROJ_STATUS
from ${hpjxSchema}.T_HPSC004 a from ${hpjxSchema}.T_HPSC004 a
left join ${hpjxSchema}.T_HPKC004 b on a.PROJ_CODE = b.PROJ_CODE and a.PRDT_CODE = b.SUB_INVENT_CODE left join ${hpjxSchema}.T_HPKC004 b on a.PROJ_CODE = b.PROJ_CODE and a.PRDT_CODE = b.SUB_INVENT_CODE
group by A.COMPANY_CODE,A.PROJ_CODE,A.PRDT_CODE,A.PARENT_PRDT_NAME) C on A.COMPANY_CODE = C.COMPANY_CODE and A.PROJ_CODE = C.PROJ_CODE group by A.COMPANY_CODE,A.PROJ_CODE,A.PRDT_CODE,A.PARENT_PRDT_NAME,A.LENGTH, A.WIDTH, A.THICK) C
and A.PARENT_PRDT_NAME = C.PARENT_PRDT_NAME and A.PRDT_CODE = C.PRDT_CODE on A.COMPANY_CODE = C.COMPANY_CODE
and A.PROJ_CODE = C.PROJ_CODE
and A.PARENT_PRDT_NAME = C.PARENT_PRDT_NAME
and A.PRDT_CODE = C.PRDT_CODE
and A.LENGTH = C.LENGTH
and A.WIDTH = C.WIDTH
and A.THICK = C.THICK
WHERE 1=1 WHERE 1=1
AND PARENT_ID NOT IN ('root') AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0 AND DEL_STATUS = 0
<include refid="condition1"/> <include refid="condition1"/>
) T
WHERE 1=1
<isNotEmpty prepend=" AND " property="projStatus"> <isNotEmpty prepend=" AND " property="projStatus">
C.PROJ_STATUS = #projStatus# T.projStatus = #projStatus#
</isNotEmpty> </isNotEmpty>
<include refid="order"/> ORDER BY ID ASC
</select> </select>
<!-- 查询统计 --> <!-- 查询统计 -->
......
...@@ -51,7 +51,8 @@ ...@@ -51,7 +51,8 @@
FILE_PATH4 as "filePath4", <!-- 文件地址4 --> FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 --> FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID --> INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
DELIVERY_DATE as "deliveryDate" DELIVERY_DATE as "deliveryDate",
COMPLETE_STATUS as "completeStatus"
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -132,6 +133,9 @@ ...@@ -132,6 +133,9 @@
<isNotEmpty prepend=" AND " property="prodOrderNos"> <isNotEmpty prepend=" AND " property="prodOrderNos">
PROD_ORDER_NO IN <iterate close=")" open="(" conjunction="," property="prodOrderNos">#prodOrderNos[]#</iterate> PROD_ORDER_NO IN <iterate close=")" open="(" conjunction="," property="prodOrderNos">#prodOrderNos[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="completeStatus">
COMPLETE_STATUS = #completeStatus#
</isNotEmpty>
</sql> </sql>
<sql id="authCondition"> <sql id="authCondition">
...@@ -410,4 +414,24 @@ ...@@ -410,4 +414,24 @@
STATUS IN <iterate close=")" open="(" conjunction="," property="statuses">#statuses[]#</iterate> STATUS IN <iterate close=")" open="(" conjunction="," property="statuses">#statuses[]#</iterate>
</isNotEmpty> </isNotEmpty>
</select> </select>
<!-- 修改完成状态 -->
<update id="updateCompleteStatus">
UPDATE ${hpjxSchema}.T_HPSC005
SET
COMPLETE_STATUS = #completeStatus#,
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE PROD_ORDER_NO = #prodOrderNo#
</update>
<!-- 按状态统计 -->
<select id="statByCompleteStatus" resultClass="java.util.HashMap">
SELECT COMPLETE_STATUS AS "completeStatus", COUNT(1) AS "num"
FROM ${hpjxSchema}.T_HPSC005
WHERE 1=1
<include refid="condition"/>
GROUP BY COMPLETE_STATUS
</select>
</sqlMap> </sqlMap>
...@@ -36,11 +36,13 @@ ...@@ -36,11 +36,13 @@
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 --> FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID --> INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
DELIVERY_DATE as "deliveryDate" DELIVERY_DATE as "deliveryDate",
COMPLETE_STATUS as "completeStatus"
</sql> </sql>
<sql id="condition"> <sql id="condition">
<include refid="authCondition"/> <include refid="authCondition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -151,6 +153,12 @@ ...@@ -151,6 +153,12 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql>
<sql id="order"> <sql id="order">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
...@@ -162,18 +170,17 @@ ...@@ -162,18 +170,17 @@
</dynamic> </dynamic>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC006">
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC006">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM ${hpjxSchema}.T_HPSC006 WHERE 1=1 FROM ${hpjxSchema}.T_HPSC006 WHERE 1=1
<include refid="condition" /> <include refid="condition"/>
<include refid="order" /> <include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC006 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC006 WHERE 1=1
<include refid="condition" /> <include refid="condition"/>
</select> </select>
<select id="queryDetail" parameterClass="java.util.HashMap" <select id="queryDetail" parameterClass="java.util.HashMap"
...@@ -236,10 +243,8 @@ ...@@ -236,10 +243,8 @@
<update id="update"> <update id="update">
UPDATE ${hpjxSchema}.T_HPSC006 UPDATE ${hpjxSchema}.T_HPSC006
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PRODUCTION_ORDER_NO = #productionOrderNo#, <!-- 生产订单号 -->
INVENT_TYPE = #inventType#, <!-- 物料类型 --> INVENT_TYPE = #inventType#, <!-- 物料类型 -->
INVENT_CODE = #inventCode#, <!-- 物料编码 --> INVENT_CODE = #inventCode#, <!-- 物料编码 -->
INVENT_NAME = #inventName#, <!-- 物料名称 --> INVENT_NAME = #inventName#, <!-- 物料名称 -->
...@@ -260,17 +265,15 @@ ...@@ -260,17 +265,15 @@
ORG_NAME = #orgName#, <!-- 生产组名称 --> ORG_NAME = #orgName#, <!-- 生产组名称 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 --> FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 工厂 --> FACTORY_NAME = #factoryName#, <!-- 工厂 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DEP_CODE = #depCode#, <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
REMARK = #remark#, <!-- 备注 --> REMARK = #remark#, <!-- 备注 -->
FILE_PATH1 = #filePath1#, <!-- 文件地址1 --> FILE_PATH1 = #filePath1#, <!-- 文件地址1 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID --> INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID -->
DELIVERY_DATE = #deliveryDate# DELIVERY_DATE = #deliveryDate#,
WHERE COMPLETE_STATUS = #completeStatus#
ID = #id# WHERE ID = #id#
</update> </update>
<update id="updateAssign"> <update id="updateAssign">
...@@ -294,7 +297,11 @@ ...@@ -294,7 +297,11 @@
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</update> </update>
<update id="updateCompleteNum"> <update id="updateCompleteNum">
UPDATE ${hpjxSchema}.T_HPSC006 UPDATE ${hpjxSchema}.T_HPSC006
SET SET
...@@ -306,4 +313,14 @@ ...@@ -306,4 +313,14 @@
ID = #id# ID = #id#
</update> </update>
<!-- 修改完成状态 -->
<update id="updateCompleteStatus">
UPDATE ${hpjxSchema}.T_HPSC006
SET
COMPLETE_STATUS = #completeStatus#,
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
</update>
</sqlMap> </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="HPSC0061">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
INVENT_CODE as "inventCode", <!-- 物料编码 -->
INVENT_NAME as "inventName", <!-- 物料名称 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
GROUP_CODE as "groupCode", <!-- 生产组编码 -->
GROUP_NAME as "groupName", <!-- 生产组名称 -->
COMPLETE_STATUS as "completeStatus" <!-- 完成状态,0.未完成,1.已完成 -->
</sql>
<sql id="condition">
<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="prodOrderNo">
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
GROUP_CODE = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupName">
GROUP_NAME = #groupName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="completeStatus">
COMPLETE_STATUS = #completeStatus#
</isNotEmpty>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC0061">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPSC0061 WHERE 1=1
<include refid="condition"/>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC0061 WHERE 1=1
<include refid="condition"/>
</select>
<select id="queryDetail" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC0061">
SELECT
B.ID as "id",
B.PROD_ORDER_NO as "prodOrderNo",
A.INVENT_CODE as "inventCode",
A.INVENT_NAME as "inventName",
B.FACTORY_CODE as "factoryCode",
B.FACTORY_NAME as "factoryName",
B.GROUP_CODE as "groupCode",
B.GROUP_NAME as "groupName",
IFNULL(B.COMPLETE_STATUS, 0) as "completeStatus"
FROM ${hpjxSchema}.T_HPSC0061A A
LEFT JOIN ${hpjxSchema}.T_HPSC0061 B
ON A.INVENT_CODE = B.INVENT_CODE AND B.PROD_ORDER_NO = #prodOrderNo#
ORDER BY A.INVENT_CODE ASC
</select>
<select id="countDetail" resultClass="int">
SELECT COUNT(1)
FROM ${hpjxSchema}.T_HPSC0061A A
LEFT JOIN ${hpjxSchema}.T_HPSC0061 B
ON A.INVENT_CODE = B.INVENT_CODE
WHERE B.PROD_ORDER_NO = #prodOrderNo#
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC0061 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
PROD_ORDER_NO, <!-- 生产订单号 -->
INVENT_CODE, <!-- 物料编码 -->
INVENT_NAME, <!-- 物料名称 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 厂区名称 -->
GROUP_CODE, <!-- 生产组编码 -->
GROUP_NAME, <!-- 生产组名称 -->
COMPLETE_STATUS <!-- 完成状态,0.未完成,1.已完成 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#, #deleteFlag#, #prodOrderNo#, #inventCode#, #inventName#,
#factoryCode#, #factoryName#, #groupCode#, #groupName#, #completeStatus#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPSC0061 WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPSC0061
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
GROUP_CODE = #groupCode#, <!-- 生产组编码 -->
GROUP_NAME = #groupName#, <!-- 生产组名称 -->
WHERE ID = #id#
</update>
<update id="lock">
UPDATE ${hpjxSchema}.T_HPSC0061
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</update>
<!-- 修改完成状态 -->
<update id="updateCompleteStatus">
UPDATE ${hpjxSchema}.T_HPSC0061
SET
COMPLETE_STATUS = #completeStatus#,
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
</update>
</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="HPSC0061A">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
INVENT_CODE as "inventCode", <!-- 物料编码 -->
INVENT_NAME as "inventName" <!-- 物料名称 -->
</sql>
<sql id="condition">
<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="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC0061A">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPSC0061A WHERE 1=1
<include refid="condition"/>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC0061A WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC0061A (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
INVENT_CODE, <!-- 物料编码 -->
INVENT_NAME <!-- 物料名称 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#, #deleteFlag#, #inventCode#, #inventName#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPSC0061A WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPSC0061A
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
INVENT_CODE = #inventCode#, <!-- 物料编码 -->
INVENT_NAME = #inventName# <!-- 物料名称 -->
WHERE ID = #id#
</update>
</sqlMap>
...@@ -7,6 +7,7 @@ import com.baosight.hpjx.core.security.UserSessionUtils; ...@@ -7,6 +7,7 @@ import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.core.utils.QrCodeUtils; import com.baosight.hpjx.core.utils.QrCodeUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.sc.domain.*; import com.baosight.hpjx.hp.sc.domain.*;
import com.baosight.hpjx.util.*; import com.baosight.hpjx.util.*;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -1191,8 +1192,13 @@ public class HPSCTools { ...@@ -1191,8 +1192,13 @@ public class HPSCTools {
} }
} }
/**
*
* @author:songx
* @date:2024/9/25,9:32
*/
public static class Hpsc006 { public static class Hpsc006 {
/** /**
* 锁 * 锁
* *
...@@ -1205,6 +1211,20 @@ public class HPSCTools { ...@@ -1205,6 +1211,20 @@ public class HPSCTools {
queryMap.put("id", id); queryMap.put("id", id);
DaoBase.getInstance().update(HPSqlConstant.HPSC006.LOCK, queryMap); DaoBase.getInstance().update(HPSqlConstant.HPSC006.LOCK, queryMap);
} }
/**
* 锁
*
* @param ids
* @return
*/
public static void lock(List<Long> ids) {
AssertUtils.isEmpty(ids, "生产下料号不能为空");
Map queryMap = new HashMap();
queryMap.put("ids", ids);
DaoBase.getInstance().update(HPSqlConstant.HPSC006.LOCK, queryMap);
}
/** /**
* 更新已完成数量 * 更新已完成数量
* *
...@@ -1253,6 +1273,140 @@ public class HPSCTools { ...@@ -1253,6 +1273,140 @@ public class HPSCTools {
AssertUtils.isEmpty(results, String.format("生产订单[%s]信息不存在", productionOrderNo)); AssertUtils.isEmpty(results, String.format("生产订单[%s]信息不存在", productionOrderNo));
return results; return results;
} }
/**
* 查询其他入库信息
*
* @param ids
* @return
*/
public static List<HPSC006> list(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("ids", ids);
return DaoBase.getInstance().query(HPSC006.QUERY, queryMap);
}
/**
* 查询其他入库信息
*
* @param ids
* @return
*/
public static Map<Long, HPSC006> map(List<Long> ids) {
List<HPSC006> results = list(ids);
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HPSC006::getId, item -> item));
}
}
/**
*
* @author:songx
* @date:2024/9/25,9:32
*/
public static class HpSc0061 {
/**
* 锁
*
* @param id
* @return
*/
public static void lock(Long id) {
AssertUtils.isNull(id, "生产下料号不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
DaoBase.getInstance().update(HPSqlConstant.HPSC0061.LOCK, queryMap);
}
/**
* 锁
*
* @param ids
* @return
*/
public static void lock(List<Long> ids) {
AssertUtils.isEmpty(ids, "生产下料号不能为空");
Map queryMap = new HashMap();
queryMap.put("ids", ids);
DaoBase.getInstance().update(HPSqlConstant.HPSC0061.LOCK, queryMap);
}
/**
* 查询
*
* @param id
* @return
*/
public static HPSC0061 getById(Long id) {
AssertUtils.isNull(id, "生产下料ID不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HPSC0061> results = DaoBase.getInstance().query(HPSC0061.QUERY, queryMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 查询
*
* @param prodOrderNo
* @return
*/
public static List<HPSC0061> getByOrder(String prodOrderNo) {
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo);
return DaoBase.getInstance().query(HPSC0061.QUERY, queryMap);
}
/**
* 查询
*
* @param prodOrderNo
* @return
*/
public static List<HPSC0061> getDetailByOrder(String prodOrderNo) {
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo);
return DaoBase.getInstance().query("HPSC0061.queryDetail", queryMap);
}
/**
* 查询其他入库信息
*
* @param ids
* @return
*/
public static List<HPSC0061> list(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("ids", ids);
return DaoBase.getInstance().query(HPSC0061.QUERY, queryMap);
}
/**
* 查询其他入库信息
*
* @param ids
* @return
*/
public static Map<Long, HPSC0061> map(List<Long> ids) {
List<HPSC0061> results = list(ids);
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HPSC0061::getId, item -> item));
}
} }
public static class Hpsc007 { public static class Hpsc007 {
......
package com.baosight.hpjx.hp.sc.utils;
import com.baosight.hpjx.hp.sc.domain.HPSC006;
import com.baosight.hpjx.hp.sc.domain.HPSC0061;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.ObjectUtils;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/9/25,9:29
*/
public class HpScUtils {
/**
* @author:songx
* @date:2024/9/24,18:07
*/
public static class HpSc006 {
/**
* 锁并获取数据
*
* @param fSc006s
* @return
*/
public static Map<Long, HPSC006> lockAndGet(List<HPSC006> fSc006s) {
List<Long> ids = ObjectUtils.listEpKey(fSc006s, HPSC006.FIELD_ID);
// 锁
HPSCTools.Hpsc006.lock(ids);
// 查询数据
return HPSCTools.Hpsc006.map(ids);
}
/**
* 锁并获取数据
*
* @param id
* @return
*/
public static HPSC006 lockAndGet(Long id) {
// 锁
HPSCTools.Hpsc006.lock(id);
// 查询数据
return HPSCTools.Hpsc006.getById(id);
}
}
/**
* @author:songx
* @date:2024/9/24,18:07
*/
public static class HpSc0061 {
/**
* 锁并获取数据
*
* @param fSc0061s
* @return
*/
public static Map<Long, HPSC0061> lockAndGet(List<HPSC0061> fSc0061s) {
List<Long> ids = ObjectUtils.listEpKey(fSc0061s, HPSC0061.FIELD_ID);
// 锁
HPSCTools.HpSc0061.lock(ids);
// 查询数据
return HPSCTools.HpSc0061.map(ids);
}
/**
* 锁并获取数据
*
* @param id
* @return
*/
public static HPSC0061 lockAndGet(Long id) {
// 锁
HPSCTools.HpSc0061.lock(id);
// 查询数据
return HPSCTools.HpSc0061.getById(id);
}
}
}
...@@ -119,7 +119,7 @@ public class ServiceXS0102 extends ServiceEPBase implements LoginConstants { ...@@ -119,7 +119,7 @@ public class ServiceXS0102 extends ServiceEPBase implements LoginConstants {
return inInfo; return inInfo;
} }
inInfoRowMap.put("accountExpireDate", DateUtils.toDateStr8(gc.getTime())); inInfoRowMap.put("accountExpireDate", "29991231");
gc.setTime(new Date()); gc.setTime(new Date());
try { try {
......
<%@ page import="com.baosight.iplat4j.core.ei.EiInfo" %>
<%@ page import="com.baosight.iplat4j.core.log.Logger" %>
<%@ page import="com.baosight.iplat4j.core.log.LoggerFactory" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%@ page import="com.baosight.iplat4j.core.ei.EiConstant" %>
<%@ page import="com.baosight.iplat4j.core.service.soa.XLocalManager" %>
<%@ page import="com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext" %>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
final Logger logger = LoggerFactory.getLogger("index");
//门户插件跳转逻辑
String loginName = UserSession.getLoginName()==null? "admin":UserSession.getLoginName();
String userId = UserSession.getUserUuid();
String url = "";
String frameOpenWeb = "";
String frameOpenCname = "";
try {
EiInfo setInfo = new EiInfo();
setInfo.set("username", loginName);
setInfo.set(EiConstant.serviceName, "EDPR00");
setInfo.set(EiConstant.methodName, "queryIndexPageUrl");
logger.info("loginName" + loginName);
logger.info("调用EDPR00.queryIndexPageUrl!");
EiInfo getInfo = XLocalManager.call(setInfo);
int status = getInfo.getStatus();
if(status < 0){
logger.error("配置首页获取失败:调用EDPR00.queryIndexPageUrl失败!" + getInfo.getMsg());
}else{
if("1".equals(getInfo.get("enableStatus"))){
if ("openSeparately".equals(getInfo.get("openWith"))){
url = getInfo.get("url") + "";
}else {
frameOpenWeb = getInfo.get("url").toString();
frameOpenCname = getInfo.get("formCname").toString();
}
}
}
}catch (Exception e) {
logger.error("配置首页获取失败!" + e.getMessage(), e);
}
//以上门户插件跳转逻辑
//设置session过期时间
HttpSession currentSession = request.getSession();
String sessionTimeout= PlatApplicationContext.getProperty("iplat4j.ui.sessionTimeout");
if (!sessionTimeout.isEmpty()){
if(-1==Integer.valueOf(sessionTimeout)){
currentSession.setMaxInactiveInterval(-1);
}else{
Integer sessionTimeoutNumber =Integer.valueOf(sessionTimeout)*60;
currentSession.setMaxInactiveInterval(sessionTimeoutNumber);
}
// 获取会话的最大非活动间隔时间(单位为秒)
int maxInactiveInterval = currentSession.getMaxInactiveInterval();
int maxInactiveIntervalMinutes = maxInactiveInterval / 60;
logger.info("获取会话的最大非活动间隔时间(单位为秒)!"+maxInactiveInterval);
}
String ip="";
if (request.getHeader("x-forwarded-for") == null) {
ip=request.getRemoteAddr();
}else {
ip=request.getHeader("x-forwarded-for");
}
%>
<c:set var="url" value="<%=url%>"/>
<c:set var="frameOpenWeb" value="<%=frameOpenWeb%>"/>
<c:set var="frameOpenCname" value="<%=frameOpenCname%>"/>
<c:set var="ip" value="<%=ip%>"/>
<html lang="zh">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
</head>
<body>
</body>
<script type="text/javascript">
var load_time = new Date();
var load_label = "indexReal" + load_time.getTime();
let url = "${url}";
let frameOpenWeb = "${frameOpenWeb}";
let frameOpenCname = "${frameOpenCname}"
console.log("redirect to " + url);
var userId = '<%=userId%>';
var loginName = '<%=loginName%>';
let ip = "${ip}";
sessionStorage.setItem("userId", userId);
sessionStorage.setItem("loginName", loginName);
sessionStorage.setItem("ip", ip);
if(url != null && url != "") {
window.location.href = '${ctx}/web/' + url;
sessionStorage.removeItem("frameOpenWeb");
sessionStorage.removeItem("frameOpenCname");
} else {
if (frameOpenWeb != null && frameOpenWeb != ""){
sessionStorage.setItem("frameOpenWeb", frameOpenWeb);
sessionStorage.setItem("frameOpenCname", frameOpenCname);
}else {
sessionStorage.removeItem("frameOpenWeb");
sessionStorage.removeItem("frameOpenCname");
}
window.location.href = '${ctx}/iPlatV7-index.jsp';
}
</script>
</html>
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
<script src="${iPlatStaticURL}/iplatui/assets/js/polyfills/iplat.ui.ie8.polyfills.min.js"></script> <script src="${iPlatStaticURL}/iplatui/assets/js/polyfills/iplat.ui.ie8.polyfills.min.js"></script>
<![endif]--> <![endif]-->
<script src="${iPlatStaticURL}/iPlatV6-login.js"></script> <script src="${iPlatStaticURL}/iPlatV7-login.js"></script>
<%--引入RSA加密js--%> <%--引入RSA加密js--%>
<script src="${iPlatStaticURL}/iplatui/js/jsencrypt.js"></script> <script src="${iPlatStaticURL}/iplatui/js/jsencrypt.js"></script>
<% <%
......
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.baosight.iplat4j.core.FrameworkInfo" %>
<%@ page import="java.io.File" %>
<%
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>
<%
}
%>
<%
String directmode = request.getParameter("maintain") != null ? request.getParameter("maintain").toString() : "";
RequestDispatcher rd;
String appName = FrameworkInfo.getProjectAppName();
org.springframework.security.core.context.SecurityContextHolder.clearContext();
session.setAttribute("iplat.logout", "1");
session.invalidate();
String entryChoice = FrameworkInfo.getText("entryChoice");
String url = "/DispatchAction.do?efFormEname=ECTM40&nodeId=0000000099999999&nodeType=s&templateType=0";
if (entryChoice.equals("template")) {
//从模板进入登录页面
rd = request.getRequestDispatcher(url);
try {
rd.forward(request, response);
} catch (ServletException e1) {
e1.printStackTrace();
} finally {
out.clear();
out = pageContext.pushBody();
}
} else if (entryChoice.equals("static")) {
// 从静态页面进入登录页面
// 判断缓存文件是否存在
String requestURL = request.getRequestURL().toString();
String _url = requestURL.substring(0, requestURL.indexOf(request.getContextPath())) + request.getContextPath();
String _urlHtml = "/login.html";
java.io.File file = new java.io.File(request.getRealPath("") + _urlHtml);
if (!file.exists()) {
//生成对应的html静态文件
try {
//+url;
java.io.FileOutputStream blankFile = new java.io.FileOutputStream(request.getRealPath("") + _urlHtml);
blankFile.write(new byte[0]);
java.net.URL requestUrl = new java.net.URL(_url);
System.out.println(_url);
java.net.HttpURLConnection con = (java.net.HttpURLConnection) requestUrl.openConnection();
con.connect();
java.io.FileOutputStream fileout = new java.io.FileOutputStream(request.getRealPath("") + _urlHtml);
byte[] bytes = new byte[1024];
int len = 0;
while ((len = con.getInputStream().read(bytes)) != -1) {
fileout.write(bytes, 0, len);
}
} catch (Exception e) {
e.printStackTrace();
out.print("生成静态html文件出错!");
}
}
File _file = new File(request.getRealPath("") + _urlHtml);
if (_file.length() == 0) {
rd = request.getRequestDispatcher(url);
try {
rd.forward(request, response);
} catch (ServletException e1) {
e1.printStackTrace();
} finally {
out.clear();
out = pageContext.pushBody();
}
} else {
response.sendRedirect(request.getContextPath() + _urlHtml);
}
} else {
//以正常方式进入登录首页
rd = request.getRequestDispatcher("iPlatV7-login.jsp");
try {
rd.forward(request, response);
} catch (ServletException e1) {
e1.printStackTrace();
} finally {
out.clear();
out = pageContext.pushBody();
}
}
%>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" monitorInterval="10"> <Configuration status="WARN">
<Properties>
<Property name="PID">mylog</Property> <properties>
<property name="LOG_HOME">./logs</property>
<Property name="LOG_EXCEPTION_CONVERSION_WORD">%xwEx</Property> <Property name="LOG_EXCEPTION_CONVERSION_WORD">%xwEx</Property>
<Property name="LOG_LEVEL_PATTERN">%5p</Property> <!--<Property name="LOG_PATTERN">%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread][%file:%line] - %msg%n</Property>--> <Property name="LOG_LEVEL_PATTERN">%5p</Property>
<!--参考文档 https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout --> <Property name="LOG_PATTERN">%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level[%thread] %logger{1.} - %msg%n</Property>
<Property name="LOG_PATTERN">%highlight{%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{1.} - %msg%n%}</Property> </properties>
<Property name="filename">iplat.$${date:yyyy-MM-dd}.log</Property>
</Properties> <Appenders>
<Appenders> <!--<Console name="Console" target="SYSTEM_OUT" follow="true">--> <!--<PatternLayout pattern="${LOG_PATTERN}"/>--> <!--</Console>--> <!-- 用来定义输出到控制台的配置 --> <!--*********************控制台日志***********************-->
<Console name="Console" target="SYSTEM_OUT"> <!-- 设置控制台只输出error及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)--> <Console name="Console" target="SYSTEM_OUT" follow="true">
<ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY" /> <PatternLayout charset="GBK" pattern="${LOG_PATTERN}"/>
<PatternLayout pattern="${LOG_PATTERN}" />
</Console> </Console>
<RollingRandomAccessFile name="MyFile" fileName="apps/logs/iplat.log" filePattern="apps/logs/iplat.%d{yyyy-MM-dd}-%i.log.gz"> <TextArea name="platLogAppender">
<PatternLayout pattern="%m%n"/>
</TextArea>
<!--*********************文件日志***********************-->
<!--info级别日志-->
<RollingFile name="InfoAppender" fileName="${LOG_HOME}/info.log"
filePattern="${LOG_HOME}/%d{yyyy-MM-dd}/info-%i.log.gz">
<!-- <Filters>-->
<!-- &lt;!&ndash;过滤掉warn及更高级别日志&ndash;&gt;-->
<!-- <ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>-->
<!-- </Filters>-->
<!--设置日志格式-->
<PatternLayout> <PatternLayout>
<Pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{1.} - %msg%n%throwable{short}</Pattern> <pattern>${LOG_PATTERN}</pattern>
</PatternLayout> </PatternLayout>
<Policies> <Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true" /> <!-- 设置日志文件切分参数 -->
<SizeBasedTriggeringPolicy size="1024 MB" /> <!--<OnStartupTriggeringPolicy/>-->
<!--设置日志基础文件大小,超过该大小就触发日志文件滚动更新-->
<SizeBasedTriggeringPolicy size="20MB"/>
<!--设置日志文件滚动更新的时间,依赖于文件命名filePattern的设置-->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
</Policies> </Policies>
<DefaultRolloverStrategy max="50" /> <!--设置日志的文件个数上限,不设置默认为7个,超过大小后会被覆盖;依赖于filePattern中的%i-->
</RollingRandomAccessFile> <DefaultRolloverStrategy max="100"/>
<TextArea name="platLogAppender"> </RollingFile>
<PatternLayout pattern="%m%n" />
</TextArea> <!--warn级别日志-->
<RollingFile name="WarnAppender" fileName="${LOG_HOME}/warn.log"
filePattern="${LOG_HOME}/%d{yyyy-MM-dd}/warn-%i.log.gz">
<Filters>
<!--过滤掉error及更高级别日志-->
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>
<!--设置日志格式-->
<PatternLayout>
<pattern>${LOG_PATTERN}</pattern>
</PatternLayout>
<Policies>
<!-- 设置日志文件切分参数 -->
<!--<OnStartupTriggeringPolicy/>-->
<!--设置日志基础文件大小,超过该大小就触发日志文件滚动更新-->
<SizeBasedTriggeringPolicy size="20MB"/>
<!--设置日志文件滚动更新的时间,依赖于文件命名filePattern的设置-->
<TimeBasedTriggeringPolicy/>
</Policies>
<!--设置日志的文件个数上限,不设置默认为7个,超过大小后会被覆盖;依赖于filePattern中的%i-->
<DefaultRolloverStrategy max="100"/>
</RollingFile>
<!--error及更高级别日志-->
<RollingFile name="ErrorAppender" fileName="${LOG_HOME}/error.log"
filePattern="${LOG_HOME}/%d{yyyy-MM-dd}/error-%i.log.gz">
<!--设置日志格式-->
<PatternLayout>
<pattern>${LOG_PATTERN}</pattern>
</PatternLayout>
<Policies>
<!-- 设置日志文件切分参数 -->
<!--<OnStartupTriggeringPolicy/>-->
<!--设置日志基础文件大小,超过该大小就触发日志文件滚动更新-->
<SizeBasedTriggeringPolicy size="20MB"/>
<!--设置日志文件滚动更新的时间,依赖于文件命名filePattern的设置-->
<TimeBasedTriggeringPolicy/>
</Policies>
<!--设置日志的文件个数上限,不设置默认为7个,超过大小后会被覆盖;依赖于filePattern中的%i-->
<DefaultRolloverStrategy max="100"/>
</RollingFile>
<Async name="Async">
<AppenderRef ref="InfoAppender" level="info"/>
<AppenderRef ref="WarnAppender" level="warn"/>
<AppenderRef ref="ErrorAppender" level="error"/>
</Async>
</Appenders> </Appenders>
<Loggers> <!--用来增加sql的日志,无论下面root logger级别是什么都输出sql log-->
<logger name="com.baosight.iplat4j.core.data.ibatis.dao.SqlMapDaoLogProxy" level="ERROR" /> <Loggers>
<AsyncLogger name="com.baosight.iplat4j" level="INFO" additivity="false"> <!-- 根日志设置 -->
<AppenderRef ref="Console" /> <Root level="info">
<AppenderRef ref="MyFile" /> <AppenderRef ref="Console"/>
<AppenderRef ref="platLogAppender" /> <AppenderRef ref="Async"/>
</AsyncLogger>
<logger name="org.springframework" level="ERROR" />
<logger name="org.thymeleaf" level="ERROR" />
<Root level="INFO">
<AppenderRef ref="Console" />
<AppenderRef ref="MyFile" />
<AppenderRef ref="platLogAppender" />
</Root> </Root>
<!--用来增加sql的日志,无论下面root logger级别是什么都输出sql log-->
<logger name="com.baosight.iplat4j.core.data.ibatis.dao.SqlMapDaoLogProxy" level="info"/>
<!--spring日志-->
<Logger name="org.springframework" level="error"/>
<!-- mybatis日志 -->
<Logger name="com.mybatis" level="warn"/>
<Logger name="org.hibernate" level="warn"/>
<Logger name="com.zaxxer.hikari" level="warn"/>
<Logger name="org.quartz" level="warn"/>
</Loggers> </Loggers>
</Configuration> </Configuration>
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
<!-- 用户服务 --> <!-- 用户服务 -->
<sqlMap resource="com/baosight/hpjx/hp/xs/sql/HPXS007A.xml"/> <sqlMap resource="com/baosight/hpjx/hp/xs/sql/HPXS007A.xml"/>
<!-- 产品服务 -->
<sqlMap resource="com/baosight/hpjx/hp/fw/sql/HPFW001.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/fw/sql/HPFW002.xml"/>
<!--财务服务--> <!--财务服务-->
<sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW001.xml"/> <sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW001.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW002.xml"/> <sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW002.xml"/>
......
...@@ -9,10 +9,38 @@ $(function () { ...@@ -9,10 +9,38 @@ $(function () {
} }
NotificationUtil("附件上传成功"); NotificationUtil("附件上传成功");
try { try {
parent.JSColorbox.setValueCallback(e.response); uploadFile(e);
} catch (e) { } catch (e) {
} }
}, },
} }
}; };
}); });
/**
* 附件上传回调
*
* @param docId
*/
function uploadFile(e) {
let inInfo = new EiInfo();
inInfo.set("result-0-bizId", $("#inqu_status-0-bizId").val());
inInfo.set("result-0-bizType", $("#inqu_status-0-bizType").val());
inInfo.set("result-0-docId", e.response.docId);
inInfo.set("result-0-docName", e.response.docName);
var index = e.response.docName.lastIndexOf(".");
var type = index == -1 ? e.response.docType : e.response.docName.substring(index + 1);
inInfo.set("result-0-docType", type);
EiCommunicator.send('HPDM099', 'upload', inInfo, {
onSuccess(res) {
if (res.status > -1) {
parent.JSColorbox.setValueCallback(e);
} else {
message(res.msg);
}
},
onFail(msg, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {async: false});
}
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
<EF:EFPage title="附件上传"> <EF:EFPage title="附件上传">
<EF:EFRegion id="result" title="请选择文件"> <EF:EFRegion id="result" title="请选择文件">
<EF:EFInput ename="bizId" cname="业务ID" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput ename="bizType" cname="业务类型" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFUpload blockId="result" ename="uploadFile" docTag="fj_file" path="biz"/> <EF:EFUpload blockId="result" ename="uploadFile" docTag="fj_file" path="biz"/>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 20,
pageSizes: [20, 50, 100, 200],
},
columns: [{
field: "operator",
template: function (item) {
let status = item.status;
let template = '';
if (status && status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="modify(\'' + item.afterSaleNo + '\')" >修改</a>&nbsp;&nbsp;';
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(\'' + item.afterSaleNo + '\')" >附件清单</a>';
return template;
}
}],
loadComplete: function (grid) {
},
onSuccess: function (e) {
},
onRowClick: function (e) {
}
}
}
// 查询
$("#QUERY").on("click", query);
// 新增
$("#ADD").on("click", add);
// 删除
$("#REMOVE").on("click", remove);
// 处理
$("#DEAL").on("click", deal);
// 确认处理
$("#DEAL_CONFIRM").on("click", dealConfirm);
// 键盘按键
downKeyUp();
});
/**
* 页面加载完成
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 新增
*/
let add = function () {
addOrUpdate("");
}
/**
* 修改
*/
let modify = function (afterSaleNo) {
let params = "inqu_status-0-afterSaleNo=" + afterSaleNo;
addOrUpdate(params);
}
/**
* 新增
*/
let addOrUpdate = function (params) {
JSColorbox.open({
href: "HPFW001B?" + params,
title: "<div style='text-align: center;'>" + (isBlank(params) ? "新增售后服务" : "修改售后服务") + "</div>",
width: "60%",
height: "70%",
callbackName: addOrUpdateCallback
});
}
/**
* 新增成功后回调
*/
let addOrUpdateCallback = function (res) {
// 消息
message(res.msg);
// 刷新列表
query();
// 关闭弹窗
JSColorbox.close();
}
/**
* 删除
*/
function remove() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPFW001", "remove", true);
}
})
}
/**
* 处理
*
* @param id
* @param auditStatus
*/
function deal(id) {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的" + rows.length + "条数据做\"处理\"操作?", {
ok: function () {
$("#dealWindow").data("kendoWindow").center();
$("#dealWindow").data("kendoWindow").open();
}
})
}
/**
* 确认处理
*/
function dealConfirm() {
let content = $("#deal-0-content").val();
if (isBlank(content)) {
message("请输入处理内容");
return;
}
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-content", content);
JSUtils.submitGridsData("result", "HPFW001", "deal", true,
function (res) {
if (res.status > -1) {
$("#dealWindow").data("kendoWindow").close();
}
}, inInfo
);
}
/**
* 附件清单
*
* @param bizId
*/
function showUploadFile(bizId) {
JSColorbox.open({
href: "HPFW001A?inqu_status-0-bizId=" + bizId,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="售后服务">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="afterSaleDate" cname="售后日期" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect ename="afterSaleType" cname="售后方式" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.hpfw.afterSaleType"/>
</EF:EFSelect>
<EF:EFSelect ename="status" cname="状态" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.comm.dealStatus"/>
</EF:EFSelect>
<EF:EFInput ename="customName" cname="客户名称" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput ename="dealUserName" cname="处理人名称" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="ID" enable="false" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="afterSaleNo" cname="售后单号" enable="false" width="100" align="center"/>
<EF:EFColumn ename="afterSaleDate" cname="售后日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFComboColumn ename="afterSaleType" cname="售后方式" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.afterSaleType"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.comm.dealStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="urgency" cname="紧急程度" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.afterSaleUrgency"/>
</EF:EFComboColumn>
<EF:EFColumn ename="customId" cname="客户ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="customName" cname="客户名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="dealContent" cname="处理内容" enable="false" width="220" align="left"/>
<EF:EFColumn ename="dealUserName" cname="处理人名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="dealUserName" cname="处理人名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" 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:EFColumn cname="修改人" ename="updatedName" enable="false" width="100" align="center"/>
<EF:EFColumn cname="修改时间" ename="updatedTime" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<EF:EFWindow id="dealWindow" title="处理内容" width="50%" height="30%">
<EF:EFRegion id="deal" title="">
<div class="row">
<EF:EFInput blockId="deal" row="0" ename="content" cname="处理内容" colWidth="12" ratio="2:10"
type="textarea" rows="4" required="true"/>
</div>
</EF:EFRegion>
</EF:EFWindow>
$(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="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
return template;
}
}],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#REMOVE").on("click", remove);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
// 隐藏按钮
showButton();
});
/**
* 查询
*/
let query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 显示按钮,如果提交了,则不能修改
*/
let showButton = function () {
let status = $("#detail-0-status").val();
if (!isBlank(status) && status === "0") {
$('#UPLOAD_FILE').show();
$('#REMOVE').show();
} else {
$('#UPLOAD_FILE').hide();
$('#REMOVE').hide();
}
}
/**
* 文件上传
*
* @param id
*/
function uploadFile() {
let bizId = $("#inqu_status-0-bizId").val();
let bizType = $("#inqu_status-0-bizType").val();
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-afterSaleNo", bizId);
EiCommunicator.send('HPFW001', 'checkStatus', inInfo, {
onSuccess(res) {
if (res.status !== -1) {
let params = {
"inqu_status-0-bizId": bizId,
"inqu_status-0-bizType": bizType
}
JSColorbox.open({
href: "HPDM099A",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
params: params,
callbackName: uploadFileCallback
});
} else {
message(res.msg);
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(e) {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
/**
* 删除
*/
function remove() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPFW001A", "remove", 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:EFInput cname="售后服务ID" ename="id" blockId="detail" row="0" type="hidden"/>
<EF:EFInput cname="售后服务单状态" ename="status" blockId="detail" row="0" type="hidden"/>
<EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden" value="AFTER_SALE"/>
<div class="row">
<EF:EFInput cname="售后服务单号" ename="bizId" blockId="inqu_status" row="0" readonly="true"/>
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<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="docType" cname="文件类型" enable="false" width="120"/>
<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.EFSelect = {
"result-0-customId": {
select: function (e) {
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var textField = dataItem['textField'];
if (valueField) {
textField = textField.indexOf("-") > -1 ? textField.split("-")[1] : textField;
$("#result-0-customName").val(textField);
} else {
$("#result-0-customName").val("");
}
}
}
}
IPLATUI.EFGrid = {
"result": {
pageable: false,
exportGrid: false,
toolbarConfig: {
hidden: false,
},
columns: [],
loadComplete: function (grid) {
},
onSuccess: function (e) {
}
}
};
// 确认
$('#SAVE').on('click', save);
// 键盘按键
downKeyUp();
})
/**
* 保存
*/
let save = function () {
let afterSaleDate = $("#result-0-afterSaleDate").val();
if (isBlank(afterSaleDate)) {
message("售后日期不能为空");
return;
}
let afterSaleType = $("#result-0-afterSaleType").val();
if (isBlank(afterSaleType)) {
message("售后方式不能为空");
return;
}
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("", "HPFW001B", "save", true, function (res) {
if (res.status > -1) {
parent.JSColorbox.setValueCallback(res);
} else {
message(res.msg);
}
});
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="售后服务单详情">
<EF:EFRegion id="result" title="数据区域">
<EF:EFInput cname="ID" blockId="result" ename="id" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="售后服务单号" blockId="result" ename="afterSaleNo" row="0" colWidth="6" ratio="2:10"
required="true" readonly="true"/>
</div>
<div class="row">
<EF:EFDatePicker cname="售后日期" ename="afterSaleDate" blockId="result" row="0" colWidth="6" ratio="2:10"
format="yyyy-MM-dd" readonly="true"/>
</div>
<div class="row">
<EF:EFSelect cname="售后方式" ename="afterSaleType" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="app.hpfw.afterSaleType"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="urgency" cname="紧急程度" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="app.hpfw.afterSaleUrgency"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="customId" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput ename="customName" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10"
type="hidden"/>
</div>
<br/>
<span style="color: red; ">说明:售后服务单号由系统自动生成</span><br>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 20,
pageSizes: [20, 50, 100, 200],
},
columns: [{
field: "operator",
template: function (item) {
let status = item.status;
let template = '';
if (status && status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="modify(\'' + item.careNo + '\')" >修改</a>&nbsp;&nbsp;';
}
return template;
}
}],
loadComplete: function (grid) {
},
onSuccess: function (e) {
},
onRowClick: function (e) {
}
}
}
// 查询
$("#QUERY").on("click", query);
// 新增
$("#ADD").on("click", add);
// 删除
$("#REMOVE").on("click", remove);
// 处理
$("#CHECK").on("click", check);
// 键盘按键
downKeyUp();
});
/**
* 页面加载完成
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 新增
*/
let add = function () {
addOrUpdate("");
}
/**
* 修改
*/
let modify = function (careNo) {
let params = "inqu_status-0-careNo=" + careNo;
addOrUpdate(params);
}
/**
* 新增
*/
let addOrUpdate = function (params) {
JSColorbox.open({
href: "HPFW002B?" + params,
title: "<div style='text-align: center;'>" + (isBlank(params) ? "新增客户关怀" : "修改客户关怀") + "</div>",
width: "60%",
height: "70%",
callbackName: addOrUpdateCallback
});
}
/**
* 新增成功后回调
*/
let addOrUpdateCallback = function (res) {
// 消息
message(res.msg);
// 刷新列表
query();
// 关闭弹窗
JSColorbox.close();
}
/**
* 删除
*/
function remove() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPFW002", "remove", true);
}
})
}
/**
* 处理
*
* @param id
* @param auditStatus
*/
function check(id) {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"处理\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPFW002", "check", true);
}
})
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="客户关怀">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="careDate" cname="关怀日期" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect ename="careWay" cname="关怀方式" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.hpfw.careWay"/>
</EF:EFSelect>
<EF:EFSelect ename="careType" cname="关怀类型" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.hpfw.careType"/>
</EF:EFSelect>
<EF:EFSelect ename="status" cname="状态" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.comm.dealStatus"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput ename="customName" cname="客户名称" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput ename="dealUserName" cname="处理人名称" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="ID" enable="false" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="careNo" cname="关怀单号" enable="false" width="100" align="center"/>
<EF:EFColumn ename="careDate" cname="关怀日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.comm.dealStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="careWay" cname="关怀方式" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.careWay"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="careType" cname="关怀类型" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.careType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="customId" cname="客户ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="customName" cname="客户名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="dealUserId" cname="处理人ID" enable="false" width="120" align="center"/>
<EF:EFColumn ename="dealUserName" cname="处理人名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" 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:EFColumn cname="修改人" ename="updatedName" enable="false" width="100" align="center"/>
<EF:EFColumn cname="修改时间" ename="updatedTime" 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.EFSelect = {
"result-0-customId": {
select: function (e) {
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var textField = dataItem['textField'];
if (valueField) {
textField = textField.indexOf("-") > -1 ? textField.split("-")[1] : textField;
$("#result-0-customName").val(textField);
} else {
$("#result-0-customName").val("");
}
}
}
}
IPLATUI.EFGrid = {
"result": {
pageable: false,
exportGrid: false,
toolbarConfig: {
hidden: false,
},
columns: [],
loadComplete: function (grid) {
},
onSuccess: function (e) {
}
}
};
// 确认
$('#SAVE').on('click', save);
// 键盘按键
downKeyUp();
})
/**
* 保存
*/
let save = function () {
let careDate = $("#result-0-careDate").val();
if (isBlank(careDate)) {
message("关怀日期不能为空");
return;
}
let careWay = $("#result-0-careWay").val();
if (isBlank(careWay)) {
message("关怀方式不能为空");
return;
}
let careType = $("#result-0-careType").val();
if (isBlank(careType)) {
message("关怀类型不能为空");
return;
}
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("", "HPFW002B", "save", true, function (res) {
if (res.status > -1) {
parent.JSColorbox.setValueCallback(res);
} else {
message(res.msg);
}
});
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="客户关怀单详情">
<EF:EFRegion id="result" title="数据区域">
<EF:EFInput ename="id" cname="ID" blockId="result" row="0" type="hidden"/>
<div class="row">
<EF:EFInput ename="careNo" cname="客户关怀单号" blockId="result" row="0" colWidth="6" ratio="2:10"
required="true" readonly="true"/>
</div>
<div class="row">
<EF:EFDatePicker ename="careDate" cname="关怀日期" blockId="result" row="0" colWidth="6" ratio="2:10"
format="yyyy-MM-dd" readonly="true"/>
</div>
<div class="row">
<EF:EFSelect ename="careWay" cname="关怀方式" blockId="result" row="0" colWidth="6" ratio="2:10">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="app.hpfw.careWay"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="careType" cname="关怀类型" blockId="result" row="0" colWidth="6" ratio="2:10">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="app.hpfw.careType"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="customId" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput ename="customName" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10"
type="hidden"/>
</div>
<br/>
<span style="color: red; ">说明:客户关怀单号由系统自动生成</span><br>
</EF:EFRegion>
</EF:EFPage>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="150" align="center"/> <EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="amount" cname="数量" enable="false" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="amount" cname="数量" enable="false" width="120" align="right" format="{0:N1}"/>
<EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
......
...@@ -93,8 +93,8 @@ let select = function () { ...@@ -93,8 +93,8 @@ let select = function () {
message("第" + (i + 1) + "行请选择仓库名称"); message("第" + (i + 1) + "行请选择仓库名称");
return; return;
} }
if (!isPositiveInteger(applyNum)) { if (!isPositiveNumber(applyNum)) {
message("勾选的第" + (i + 1) + "行数量必须是大于0的整数"); message("勾选的第" + (i + 1) + "行数量必须是大于0的数字");
return; return;
} }
if (parseFloat(applyNum) > parseFloat(num) - parseFloat(completeNum)) { if (parseFloat(applyNum) > parseFloat(num) - parseFloat(completeNum)) {
......
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true"/> <EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="applyNum" cname="入库数量" width="120" align="right" format="{0:N0}" required="true"/> <EF:EFColumn ename="applyNum" cname="入库数量" width="120" align="right" format="{0:N0}" required="true"/>
<EF:EFColumn ename="remark1" cname="入库说明" width="150"/> <EF:EFColumn ename="remark1" cname="入库说明" width="150"/>
<EF:EFColumn ename="completeNum" cname="已入库数量" enable="false" width="120" align="right" format="{0:N0}" <EF:EFColumn ename="completeNum" cname="已入库数量" enable="false" width="120" align="right" format="{0:N1}"
hidden="true"/> hidden="true"/>
<EF:EFColumn ename="unCompleteNum" cname="待入库数量" enable="false" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="unCompleteNum" cname="待入库数量" enable="false" width="120" align="right" format="{0:N1}"/>
<EF:EFColumn ename="num" cname="任务数量" enable="false" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="num" cname="任务数量" enable="false" width="120" align="right" format="{0:N1}"/>
<EF:EFColumn ename="totalWt" cname="任务重量(T)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="totalWt" cname="任务重量(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="150" align="center"/> <EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="150" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/> <EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/>
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<EF:EFColumn ename="length" cname="长(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/> <EF:EFColumn ename="length" cname="长(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/>
<EF:EFColumn ename="width" cname="宽(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/> <EF:EFColumn ename="width" cname="宽(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/>
<EF:EFColumn ename="thick" cname="厚(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/> <EF:EFColumn ename="thick" cname="厚(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/>
<EF:EFColumn ename="amount" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/> <EF:EFColumn ename="amount" cname="数量" enable="false" width="100" align="right" format="{0:N1}"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFComboColumn ename="isPrint" cname="是否制单" width="80" align="center"> <EF:EFComboColumn ename="isPrint" cname="是否制单" width="80" align="center">
......
...@@ -50,8 +50,8 @@ let select = function () { ...@@ -50,8 +50,8 @@ let select = function () {
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
let applyAmount = rows[i]['applyAmount']; let applyAmount = rows[i]['applyAmount'];
let amount = rows[i]['amount']; let amount = rows[i]['amount'];
if (!isPositiveInteger(applyAmount)) { if (!isPositiveNumber(applyAmount)) {
message("勾选的第" + (i + 1) + "行数量必须是大于0的整数"); message("勾选的第" + (i + 1) + "行数量必须是大于0的数字");
return; return;
} }
if (parseFloat(applyAmount) > parseFloat(amount)) { if (parseFloat(applyAmount) > parseFloat(amount)) {
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="inventName" cname="部件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="inventName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N0}" required="true"/> <EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N1}" required="true"/>
<EF:EFColumn ename="applyRemark" cname="申请说明" width="150" editType="textarea" copy="true"/> <EF:EFColumn ename="applyRemark" cname="申请说明" width="150" editType="textarea" copy="true"/>
<EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N1}"/>
<EF:EFColumn ename="weight" cname="库存重量(T)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="weight" cname="库存重量(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150" hidden="true"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="150" hidden="true"/>
<EF:EFColumn ename="whCode" cname="仓库编码" enable="false" width="140" align="center" hidden="true"/> <EF:EFColumn ename="whCode" cname="仓库编码" enable="false" width="140" align="center" hidden="true"/>
......
...@@ -45,8 +45,8 @@ let select = function () { ...@@ -45,8 +45,8 @@ let select = function () {
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
let applyAmount = rows[i]['applyAmount']; let applyAmount = rows[i]['applyAmount'];
let amount = rows[i]['amount']; let amount = rows[i]['amount'];
if (!isPositiveInteger(applyAmount)) { if (!isPositiveNumber(applyAmount)) {
message("勾选的第" + (i + 1) + "行数量必须是大于0的整数"); message("勾选的第" + (i + 1) + "行数量必须是大于0的数字");
return; return;
} }
if (parseFloat(applyAmount) > parseFloat(amount)) { if (parseFloat(applyAmount) > parseFloat(amount)) {
......
...@@ -53,9 +53,9 @@ ...@@ -53,9 +53,9 @@
filter="contains" > filter="contains" >
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField" /> <EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField" />
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N0}" required="true"/> <EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N1}" required="true"/>
<EF:EFColumn ename="applyRemark" cname="申请说明" width="200" editType="textarea" copy="true"/> <EF:EFColumn ename="applyRemark" cname="申请说明" width="200" editType="textarea" copy="true"/>
<EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}" <EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N1}"
sumType="all"/> sumType="all"/>
<EF:EFColumn ename="unitWeight" cname="单量(KG)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="unitWeight" cname="单量(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="库存重量(T)" enable="false" width="120" align="right" format="{0:N3}" <EF:EFColumn ename="weight" cname="库存重量(T)" enable="false" width="120" align="right" format="{0:N3}"
......
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="100" align="center" <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="assignedNum" cname="派工数量" enable="false" width="80" align="right" format="{0:N0}"/> <EF:EFColumn ename="assignedNum" cname="派工数量" enable="false" width="80" align="right" format="{0:N1}"/>
<EF:EFColumn ename="unassignedNum" cname="剩余数量" enable="false" width="80" align="right" format="{0:N0}"/> <EF:EFColumn ename="unassignedNum" cname="剩余数量" enable="false" width="80" align="right" format="{0:N1}"/>
<EF:EFColumn ename="num" cname="数量" enable="false" width="80" align="right" format="{0:N0}"/> <EF:EFColumn ename="num" cname="数量" enable="false" width="80" align="right" format="{0:N0}"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="80" align="right" format="{0:N3}"/>
<%--<EF:EFColumn ename="remark" cname="部件备注" enable="false"/>--%> <%--<EF:EFColumn ename="remark" cname="部件备注" enable="false"/>--%>
......
...@@ -112,8 +112,8 @@ let save = function () { ...@@ -112,8 +112,8 @@ let save = function () {
message("勾选的第" + (i + 1) + "行\"分派数量\",不能为空"); message("勾选的第" + (i + 1) + "行\"分派数量\",不能为空");
return; return;
} }
if (!isPositiveInteger(rows[i]['num'])) { if (!isPositiveNumber(rows[i]['num'])) {
message("勾选的第" + (i + 1) + "行\"分派数量\"必须是大于0的整数"); message("勾选的第" + (i + 1) + "行\"分派数量\"必须是大于0的数字");
return; return;
} }
} }
......
...@@ -66,9 +66,9 @@ ...@@ -66,9 +66,9 @@
valueField="textField" textField="textField" readonly="true" required="true"/>--%> valueField="textField" textField="textField" readonly="true" required="true"/>--%>
<%--<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" hidden="true"/> <%--<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" hidden="true"/>
<EF:EFColumn ename="factoryName" cname="厂区" enable="false" align="center"/>--%> <EF:EFColumn ename="factoryName" cname="厂区" enable="false" align="center"/>--%>
<EF:EFColumn ename="num" cname="分派数量" format="{0:N0}" required="true"/> <EF:EFColumn ename="num" cname="分派数量" format="{0:N1}" required="true"/>
<EF:EFColumn ename="totalWt" cname="分派重量(T)" enable="false" format="{0:N3}"/> <EF:EFColumn ename="totalWt" cname="分派重量(T)" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="completeNum" cname="已完工数量" enable="false" format="{0:N0}"/> <EF:EFColumn ename="completeNum" cname="已完工数量" enable="false" format="{0:N1}"/>
</EF:EFGrid> </EF:EFGrid>
<br/> <br/>
<span style='color: red;font-size: 13px;'>说明:厂区和生产组仅新增的时候可以编辑</span> <span style='color: red;font-size: 13px;'>说明:厂区和生产组仅新增的时候可以编辑</span>
......
...@@ -43,9 +43,9 @@ ...@@ -43,9 +43,9 @@
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center" <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="completeNum" cname="完成数量" enable="false" width="100" align="right" format="{0:N0}"/> <EF:EFColumn ename="completeNum" cname="完成数量" enable="false" width="100" align="right" format="{0:N1}"/>
<EF:EFColumn ename="unCompleteNum" cname="剩余数量" enable="false" width="100" align="right" format="{0:N0}"/> <EF:EFColumn ename="unCompleteNum" cname="剩余数量" enable="false" width="100" align="right" format="{0:N1}"/>
<EF:EFColumn ename="num" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/> <EF:EFColumn ename="num" cname="数量" enable="false" width="100" align="right" format="{0:N1}"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="140" align="center"/> <EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="140" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="140" align="center"/> <EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="140" align="center"/>
......
...@@ -3,9 +3,9 @@ prdtNameGlobalData = []; ...@@ -3,9 +3,9 @@ prdtNameGlobalData = [];
factoryGroupGlobalData = []; factoryGroupGlobalData = [];
$(function () { $(function () {
$("#QUERY").on("click", function () { $("#QUERY").on("click", query);
query();
}); $("#COMPLETE").on("click", complete);
$("#ASSIGN").on("click", function () { $("#ASSIGN").on("click", function () {
//重置全局变量 //重置全局变量
...@@ -389,7 +389,8 @@ $(function () { ...@@ -389,7 +389,8 @@ $(function () {
}); });
downKeyUp(); downKeyUp();
}); });
query = function () {
let query = function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
...@@ -398,6 +399,8 @@ query = function () { ...@@ -398,6 +399,8 @@ query = function () {
* 页面加载时执行 * 页面加载时执行
*/ */
$(window).load(function () { $(window).load(function () {
// 查询
query();
// 生产组名称 // 生产组名称
let inInfo = new EiInfo(); let inInfo = new EiInfo();
inInfo.set("inqu_status-0-orgType", 'cutGroup'); inInfo.set("inqu_status-0-orgType", 'cutGroup');
...@@ -547,3 +550,18 @@ function saveFunc() { ...@@ -547,3 +550,18 @@ function saveFunc() {
} }
} }
/**
* 完成
*/
let complete = function (){
let rows = detailGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"完成\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result,detail", "HPSC006", "complete", true);
}
});
}
...@@ -14,16 +14,25 @@ ...@@ -14,16 +14,25 @@
<EF:EFPage title="生产下料"> <EF:EFPage title="生产下料">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%> <EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row">
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="projCode" cname="项目号:" colWidth="3" row="0"/> <EF:EFInput blockId="inqu_status" ename="projCode" cname="项目号:" colWidth="3" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" colWidth="3" row="0"/> <EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" colWidth="3" row="0"/>
<EF:EFInput blockId="inqu_status" ename="prodOrderNo" cname="生产订单号:" colWidth="3" row="0"/> <EF:EFInput blockId="inqu_status" ename="prodOrderNo" cname="生产订单号:" colWidth="3" row="0"/>
<EF:EFDatePicker blockId="inqu_status" ename="deliveryDate" cname="交货日期" row="0" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3" /> <EF:EFDatePicker blockId="inqu_status" ename="deliveryDate" cname="交货日期" row="0" role="date"
<EF:EFDatePicker blockId="inqu_status" ename="workDate" cname="派工时间" row="0" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3" /> format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" colWidth="3" format="yyyy-MM-dd" /> </div>
<div class="row">
<EF:EFDatePicker blockId="inqu_status" ename="workDate" cname="派工时间" row="0" role="date" format="yyyy-MM-dd"
parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" colWidth="3"
format="yyyy-MM-dd"/>
<EF:EFSelect ename="completeStatus" cname="状态" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="未完成" value="0"/>
<EF:EFOption label="部分完成" value="2"/>
<EF:EFOption label="已完成" value="1"/>
</EF:EFSelect>
</div> </div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="生产任务集"> <EF:EFRegion id="result" title="生产任务集">
...@@ -42,7 +51,10 @@ ...@@ -42,7 +51,10 @@
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn enable="false" ename="planCompletionDate" editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" <EF:EFColumn enable="false" ename="planCompletionDate" editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"
cname="计划完成日期"/> cname="计划完成日期"/>
<EF:EFComboColumn ename="completeStatus" cname="状态" enable="false" align="center" width="80">
<EF:EFOption label="未完成" value="0"/>
<EF:EFOption label="已完成" value="1"/>
</EF:EFComboColumn>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
...@@ -52,14 +64,13 @@ ...@@ -52,14 +64,13 @@
<EF:EFInput ename="productionOrderNo" type="hidden"/> <EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFInput ename="deliveryDate" type="hidden"/> <EF:EFInput ename="deliveryDate" type="hidden"/>
<EF:EFInput ename="factoryCode" type="hidden"/> <EF:EFInput ename="factoryCode" type="hidden"/>
<EF:EFGrid blockId="detail" autoDraw="no"> <EF:EFGrid blockId="detail" autoDraw="no" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="标识" enable="false" width="60" align="center"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/> <EF:EFColumn ename="operator" cname="操作" enable="false" width="100" align="center"/>
<EF:EFColumn enable="false" ename="reqNum" cname="领料记录" width="80" align="center" readonly="true"/> <EF:EFColumn enable="false" ename="reqNum" cname="领料记录" width="80" align="center" readonly="true"/>
<%-- <EF:EFComboColumn cname="材料类型" ename="inventType" width="80" align="center" required="true" >--%>
<%-- <EF:EFComboColumn cname="材料类型" ename="inventType" width="80" align="center" required="true" >--%> <%-- <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('7')"/>--%>
<%-- <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('7')"/>--%> <%-- </EF:EFComboColumn>--%>
<%-- </EF:EFComboColumn>--%>
<%-- <EF:EFPopupColumn ename="inventName" cname="材料名称" width="200" popupType="ServiceGrid" <%-- <EF:EFPopupColumn ename="inventName" cname="材料名称" width="200" popupType="ServiceGrid"
popupTitle="材料信息" serviceName="HPPZ004" methodName="queryComboBox" resultId="invent_name_block_id" popupTitle="材料信息" serviceName="HPPZ004" methodName="queryComboBox" resultId="invent_name_block_id"
columnEnames="textField,valueField" columnEnames="textField,valueField"
...@@ -107,12 +118,15 @@ ...@@ -107,12 +118,15 @@
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" width="120" enable="false"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" width="120" enable="false"/>
<EF:EFColumn enable="false" ename="actualCompletionNum" cname="完工数量" width="100" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionNum" cname="完工数量" width="100" readonly="true"/>
<EF:EFColumn enable="false" ename="actualCompletionTotalWt" cname="完工重量(T)" width="100" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionTotalWt" cname="完工重量(T)" width="100" readonly="true"/>
<EF:EFComboColumn enable="false" align="center" ename="status" width="80" cname="状态"> <EF:EFComboColumn enable="false" align="center" ename="status" width="80" cname="状态" hidden="true">
<EF:EFOption label="计划中" value="0"/> <EF:EFOption label="计划中" value="0"/>
<EF:EFOption label="生产中" value="1"/> <EF:EFOption label="生产中" value="1"/>
<EF:EFOption label="已完成" value="2"/> <EF:EFOption label="已完成" value="2"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="completeStatus" cname="状态" enable="false" align="center" width="80">
<EF:EFOption label="未完成" value="0"/>
<EF:EFOption label="已完成" value="1"/>
</EF:EFComboColumn>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
......
$(function () {
IPLATUI.EFGrid = {
"result": {
exportGrid: false,
pageable: {
pageSize: 10,
pageSizes: [10, 50, 70, 100],
},
onRowClick: function (e) {
var block = detailGrid.getEiBlock();
if (block != null) {
block.setRows([]);
detailGrid.setEiBlock(block);
}
let prodOrderNo = e.model['prodOrderNo'];
var inInfo = new EiInfo()
inInfo.set("prodOrderNo", prodOrderNo);
EiCommunicator.send("HPSC0061", "queryDetail", inInfo, {
onSuccess: function (res) {
if (res.status > -1) {
detailGrid.setEiInfo(res);
$('#prodOrderNo').val(prodOrderNo);
} else {
message(res.msg);
}
}, onFail: function (ei) {
}
}, {async: false});
},
columns: []
},
"detail": {
exportGrid: false,
pageable: false,
columns: []
}
}
// 查询
$("#QUERY").on("click", query);
// 完成
$("#COMPLETE").on("click", complete);
// 键盘按键
downKeyUp();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 完成
*/
let complete = function () {
let rows = detailGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
for (let i = 0; i < rows.length; i++) {
let item = rows[i];
let completeStatus = item['completeStatus'];
let inventName = item['inventName'];
let groupCode = item['groupCode'];
if (completeStatus === "1") {
message("物料【" + inventName + "】的状态不是\"未完成\",不能进行操作");
return;
}
if (isBlank(groupCode)) {
message("物料【" + inventName + "】的生产组不能为空");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"完成\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result,detail", "HPSC0061", "complete", true);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="生产下料">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="projCode" cname="项目号" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput ename="projName" cname="项目名称" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput ename="prodOrderNo" cname="生产订单号" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect ename="completeStatus" cname="状态" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="未完成" value="0"/>
<EF:EFOption label="部分完成" value="2"/>
<EF:EFOption label="已完成" value="1"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="生产任务集">
<EF:EFGrid blockId="result" autoDraw="override" showCount="true" height="40vh" checkMode="row,single"
isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" align="center" width="100"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" align="left" width="180"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" align="center" width="80"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="left"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="left"/>
<EF:EFComboColumn ename="completeStatus" cname="状态" enable="false" width="100" align="center">
<EF:EFOption label="未完成" value="0"/>
<EF:EFOption label="已完成" value="1"/>
<EF:EFOption label="部分完成" value="2"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="detail" title="下料清单">
<EF:EFInput ename="prodOrderNo" type="hidden"/>
<EF:EFGrid blockId="detail" autoDraw="override" showCount="true" checkMode="row">
<EF:EFColumn ename="id" cname="标识" enable="false" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="材料编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="inventName" cname="材料名称" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="groupCode" cname="生产组" width="180" align="center" defaultValue="" required="true"
filter="contains" copy="true">
<EF:EFOptions blockId="group_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="completeStatus" cname="状态" enable="false" align="center" width="80">
<EF:EFOption label="未完成" value="0"/>
<EF:EFOption label="已完成" value="1"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" required="true" data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!" data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
/> />
<EF:EFColumn ename="userCount" cname="用工人数" width="120" enable="false" format="{0:N3}" editType="text" <EF:EFColumn ename="userCount" cname="用工人数" width="120" enable="false" format="{0:N1}" editType="text"
displayType="0.000" sort="true" align="right" displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" required="true" data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!" data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" required="true" data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!" data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
/> />
<EF:EFColumn ename="groupUserCount" cname="组用工数" maxLength="15" displayType="0" format="{0:N0}" enable="false" align="right"/> <EF:EFColumn ename="groupUserCount" cname="组用工数" maxLength="15" displayType="0" format="{0:N1}" enable="false" align="right"/>
<%--<EF:EFColumn ename="remark" cname="备注" enable="true" width="200" align="center"/>--%> <%--<EF:EFColumn ename="remark" cname="备注" enable="true" width="200" align="center"/>--%>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -137,8 +137,8 @@ $(function (){ ...@@ -137,8 +137,8 @@ $(function (){
return false; return false;
} }
let groupUserCount = item.get("groupUserCount"); let groupUserCount = item.get("groupUserCount");
if (!isInteger(groupUserCount) || parseFloat(groupUserCount) < 0) { if (!isNumber(groupUserCount) || parseFloat(groupUserCount) < 0) {
message("选中的生产组第" + (index + 1) + "行\"组用工数\",必须为正整数!"); message("选中的生产组第" + (index + 1) + "行\"组用工数\",必须为大于等于0的数字!");
flag = false; flag = false;
return false; return false;
} }
...@@ -147,9 +147,9 @@ $(function (){ ...@@ -147,9 +147,9 @@ $(function (){
JSUtils.confirm("确定对数据做\"保存\"操作? ", { JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () { ok: function () {
var info = new EiInfo(); var info = new EiInfo();
info.set("inqu_status-0-userCount",$("#inqu_status-0-userCount").val()); info.set("inqu_status-0-userCount", $("#inqu_status-0-userCount").val());
info.set("inqu_status-0-registerDate",registerDate); info.set("inqu_status-0-registerDate", registerDate);
info.set("inqu_status-0-id",$("#inqu_status-0-id").val()); info.set("inqu_status-0-id", $("#inqu_status-0-id").val());
info.addBlock(rowsBlock("result")); info.addBlock(rowsBlock("result"));
info.addBlock(rowsBlock("detail")) info.addBlock(rowsBlock("detail"))
EiCommunicator.send("HPSC010", methodType, info, { EiCommunicator.send("HPSC010", methodType, info, {
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!" data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
/> />
<EF:EFColumn ename="groupUserCount" cname="组用工数" maxLength="15" displayType="0" format="{0:N0}" align="right"/> <EF:EFColumn ename="groupUserCount" cname="组用工数" maxLength="15" displayType="0" format="{0:N1}" align="right"/>
<EF:EFComboColumn ename="groupType" cname="生产类型" <EF:EFComboColumn ename="groupType" cname="生产类型"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" hidden="true" textField="textField" valueField="valueField" hidden="true"
......
...@@ -2,8 +2,8 @@ $(function () { ...@@ -2,8 +2,8 @@ $(function () {
$("#result-0-quantity_textField").on('change',function () { $("#result-0-quantity_textField").on('change',function () {
var quantity = $("#result-0-quantity_textField").val(); var quantity = $("#result-0-quantity_textField").val();
if(!isPositiveInteger(quantity)){ if(!isPositiveNumber(quantity)){
message("报工数量必须是大于0的正整数") message("报工数量必须是大于0的数字")
} }
var taskWeight = $("#result-0-taskWeight_textField").val(); var taskWeight = $("#result-0-taskWeight_textField").val();
if(isPositiveNumber(taskWeight)) { if(isPositiveNumber(taskWeight)) {
...@@ -28,8 +28,8 @@ $(function () { ...@@ -28,8 +28,8 @@ $(function () {
$("#btn_save").on("click",function(){ $("#btn_save").on("click",function(){
let quantity = $("#result-0-quantity_textField").val().split("%")[0]; let quantity = $("#result-0-quantity_textField").val().split("%")[0];
let unregisterQuantity = $("#result-0-unregisterQuantity").val(); let unregisterQuantity = $("#result-0-unregisterQuantity").val();
if(!isPositiveInteger(quantity)){ if(!isPositiveNumber(quantity)){
message("报工数量必须是大于0的正整数"); message("报工数量必须是大于0的数字");
return ; return ;
} }
if (unregisterQuantity-quantity < 0){ if (unregisterQuantity-quantity < 0){
......
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