Commit 720153bc by liuyang

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

parents a9f82509 33e7256e
...@@ -388,6 +388,8 @@ public class HGSqlConstant { ...@@ -388,6 +388,8 @@ public class HGSqlConstant {
public static final String LOCKS = MODULE_NAME + "locks"; public static final String LOCKS = MODULE_NAME + "locks";
// 修改库存 // 修改库存
public static final String UPDATE_INV = MODULE_NAME + "updateInv"; public static final String UPDATE_INV = MODULE_NAME + "updateInv";
// 领用查询
public static final String QUERY_LY = MODULE_NAME + "queryLy";
} }
/** /**
......
...@@ -23,7 +23,7 @@ public class HGDM099 extends DaoEPBase { ...@@ -23,7 +23,7 @@ public class HGDM099 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/ public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/ public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/ public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
...@@ -52,14 +52,14 @@ public class HGDM099 extends DaoEPBase { ...@@ -52,14 +52,14 @@ public class HGDM099 extends DaoEPBase {
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 QUERY = "HPDM099.query"; public static final String QUERY = "HGDM099.query";
public static final String COUNT = "HPDM099.count"; public static final String COUNT = "HGDM099.count";
public static final String INSERT = "HPDM099.insert"; public static final String INSERT = "HGDM099.insert";
public static final String UPDATE = "HPDM099.update"; public static final String UPDATE = "HGDM099.update";
public static final String DELETE = "HPDM099.delete"; public static final String DELETE = "HGDM099.delete";
private Long id = new Long(0); private Long id = new Long(0);
private String companyCode = " "; /* 企业编码 预留*/ private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/ private String createdName = " "; /* 创建人名称*/
...@@ -84,8 +84,8 @@ public class HGDM099 extends DaoEPBase { ...@@ -84,8 +84,8 @@ public class HGDM099 extends DaoEPBase {
eiColumn.setDescName(" "); eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE); eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码 预留"); eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE); eiColumn = new EiColumn(FIELD_DEP_CODE);
...@@ -162,20 +162,20 @@ public class HGDM099 extends DaoEPBase { ...@@ -162,20 +162,20 @@ public class HGDM099 extends DaoEPBase {
this.id = id; this.id = id;
} }
/** /**
* get the companyCode - 企业编码 预留. * get the accountCode - 企业编码.
* @return the companyCode * @return the accountCode
*/ */
public String getCompanyCode() { public String getAccountCode() {
return this.companyCode; return this.accountCode;
} }
/** /**
* set the companyCode - 企业编码 预留. * set the accountCode - 企业编码.
* *
* @param companyCode - 企业编码 预留 * @param accountCode - 企业编码
*/ */
public void setCompanyCode(String companyCode) { public void setAccountCode(String accountCode) {
this.companyCode = companyCode; this.accountCode = accountCode;
} }
/** /**
* get the depCode - 部门编码. * get the depCode - 部门编码.
...@@ -358,7 +358,7 @@ public class HGDM099 extends DaoEPBase { ...@@ -358,7 +358,7 @@ public class HGDM099 extends DaoEPBase {
* @return the docName * @return the docName
*/ */
public String getDocName() { public String getDocName() {
return this.getDocName(); return this.docName;
} }
/** /**
...@@ -378,7 +378,7 @@ public class HGDM099 extends DaoEPBase { ...@@ -378,7 +378,7 @@ public class HGDM099 extends DaoEPBase {
public void fromMap(Map map) { public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id)); setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode)); setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName)); setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
...@@ -401,7 +401,7 @@ public class HGDM099 extends DaoEPBase { ...@@ -401,7 +401,7 @@ public class HGDM099 extends DaoEPBase {
Map map = new HashMap(); Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID))); map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE))); map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_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_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_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
......
...@@ -46,12 +46,7 @@ public class ServiceHGDM099 extends ServiceEPBase { ...@@ -46,12 +46,7 @@ public class ServiceHGDM099 extends ServiceEPBase {
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
// 文件存储位置 inInfo = super.query(inInfo, HGDM099.QUERY, new HGDM099());
if (CommonConstant.FileLocation.S3.equalsIgnoreCase(S3Constant.FILE_LOCATION)) {
inInfo = super.query(inInfo, "HGDM099.queryS3", new HGDM099());
} else {
inInfo = super.query(inInfo, "HGDM099.queryLocal", new HGDM099());
}
} catch (Throwable e) { } catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
...@@ -83,7 +78,7 @@ public class ServiceHGDM099 extends ServiceEPBase { ...@@ -83,7 +78,7 @@ public class ServiceHGDM099 extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
public EiInfo delete(EiInfo inInfo) { public EiInfo remove(EiInfo inInfo) {
try { try {
List<HGDM099> fDm099s = MapUtils.toDaoEPBases(inInfo, HGDM099.class); List<HGDM099> fDm099s = MapUtils.toDaoEPBases(inInfo, HGDM099.class);
for (HGDM099 fDm099 : fDm099s) { for (HGDM099 fDm099 : fDm099s) {
......
...@@ -3,72 +3,48 @@ ...@@ -3,72 +3,48 @@
<sqlMap namespace="HGDM099"> <sqlMap namespace="HGDM099">
<sql id="column"> <sql id="column">
A.ID as "id", ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
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" <!-- 文件名称 -->
<sql id="columnLocal">
<include refid="column"/>,
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="HGXSDataAuth.authConditionA"/> <include refid="HGXSDataAuth.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,46 +54,30 @@ ...@@ -78,46 +54,30 @@
$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.hggp.hg.dm.domain.HGDM099"> <select id="query" resultClass="com.baosight.hggp.hg.dm.domain.HGDM099">
SELECT SELECT
<include refid="columnLocal"/> <include refid="column"/>
FROM ${hggpSchema}.HGDM099 A, ${platSchema}.TEUDM02 B FROM ${hggpSchema}.HGDM099
WHERE 1=1
<include refid="conditionLocal"/>
<include refid="orderBy"/>
</select>
<select id="countLocal" resultClass="int">
SELECT COUNT(*)
FROM ${hggpSchema}.HGDM099 A, ${platSchema}.TEUDM02 B
WHERE 1=1 WHERE 1=1
<include refid="conditionLocal"/> <include refid="customCondition"/>
</select>
<select id="queryS3" resultClass="com.baosight.hpjx.hp.dm.domain.HPDM099">
SELECT
<include refid="columnS3"/>
FROM ${hggpSchema}.HGDM099 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 ${hggpSchema}.HGDM099 A, ${platSchema}.TEUDM05 B FROM ${hggpSchema}.HGDM099
WHERE 1=1 WHERE 1=1
<include refid="conditionS3"/> <include refid="customCondition"/>
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGDM099 ( INSERT INTO ${hggpSchema}.HGDM099 (
COMPANY_CODE, <!-- 企业编码 预留 --> ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 --> CREATED_NAME, <!-- 创建人名称 -->
...@@ -126,16 +86,16 @@ ...@@ -126,16 +86,16 @@
BIZ_TYPE, <!-- 业务类型 --> BIZ_TYPE, <!-- 业务类型 -->
BIZ_ID, <!-- 业务ID --> BIZ_ID, <!-- 业务ID -->
DOC_ID, <!-- 文件ID --> DOC_ID, <!-- 文件ID -->
DOC_ID <!-- 文件名称 --> DOC_NAME <!-- 文件名称 -->
) VALUES ( ) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName# #deleteFlag#, #bizType#, #bizId#, #docId#, #docName#
) )
</insert> </insert>
<delete id="delete"> <delete id="delete">
UPDATE ${hggpSchema}.HGDM099 UPDATE ${hggpSchema}.HGDM099
SET DELETE_FLAG = '1' SET DELETE_FLAG = 1
WHERE ID = #id# WHERE ID = #id#
</delete> </delete>
......
...@@ -12,7 +12,12 @@ import com.baosight.hggp.hg.kc.tools.HGKCTools; ...@@ -12,7 +12,12 @@ import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ004; import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
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;
...@@ -24,7 +29,11 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator; ...@@ -24,7 +29,11 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/** /**
...@@ -37,11 +46,12 @@ public class ServiceHGKC008 extends ServiceBase { ...@@ -37,11 +46,12 @@ public class ServiceHGKC008 extends ServiceBase {
try { try {
inInfo = super.query(inInfo, HGKC008.QUERY, new HGKC008()); inInfo = super.query(inInfo, HGKC008.QUERY, new HGKC008());
Map map = new HashMap(); Map map = new HashMap();
map.put(HGKC008.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode()); map.put(HGKC008.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BY_ROLE_BLOCK_ID,DdynamicEnum.WH_RECORD_BOX_BLOCK_ID),map,false Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID, DdynamicEnum.PROJ_RECORD_BY_ROLE_BLOCK_ID,
); DdynamicEnum.WH_RECORD_BLOCK_ID), map, false
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); );
EiInfoUtils.addBlock(inInfo, "roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
......
...@@ -5,34 +5,29 @@ import com.baosight.hggp.common.DdynamicEnum; ...@@ -5,34 +5,29 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum; import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cg.domain.HGCG002;
import com.baosight.hggp.hg.cg.domain.HGCG002B;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.domain.HGKC008; import com.baosight.hggp.hg.kc.domain.HGKC008;
import com.baosight.hggp.hg.kc.domain.HGKC008A; import com.baosight.hggp.hg.kc.domain.HGKC008A;
import com.baosight.hggp.hg.kc.domain.HGKC010; import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.yx.domain.HGYX001A; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.BeanUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.service.soa.XLocalManager;
import com.baosight.iplat4j.core.util.DateUtils;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import java.math.BigDecimal; import java.util.Arrays;
import java.util.*; import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
/** /**
* @author:songx * @author:songx
...@@ -53,10 +48,10 @@ public class ServiceHGKC008B extends ServiceBase { ...@@ -53,10 +48,10 @@ public class ServiceHGKC008B extends ServiceBase {
Map<String, Object> paramMap = new HashMap<>(); Map<String, Object> paramMap = new HashMap<>();
paramMap.put("inventTypeDetails", InventTypeDetailEnum.getInentTypeTwo()); paramMap.put("inventTypeDetails", InventTypeDetailEnum.getInentTypeTwo());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BLOCK_ID),paramMap); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BLOCK_ID), paramMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID),paramMap); // CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID), paramMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID),paramMap); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(inInfo, "roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC010().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC010().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
...@@ -75,8 +70,8 @@ public class ServiceHGKC008B extends ServiceBase { ...@@ -75,8 +70,8 @@ public class ServiceHGKC008B extends ServiceBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "inventTypeDetails", InventTypeDetailEnum.getInentTypeTwo()); // inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "inventTypeDetails", InventTypeDetailEnum.getInentTypeTwo());
inInfo = super.query(inInfo, HGKC010.QUERY, new HGKC010()); inInfo = super.query(inInfo, HGSqlConstant.HgKc010.QUERY_LY, new HGKC010());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
...@@ -134,12 +129,12 @@ public class ServiceHGKC008B extends ServiceBase { ...@@ -134,12 +129,12 @@ public class ServiceHGKC008B extends ServiceBase {
}); });
DaoUtils.insertBatch(HGKC008A.INSERT, hgkc008AList); DaoUtils.insertBatch(HGKC008A.INSERT, hgkc008AList);
} }
private void checkConfirmData(List<HGKC008A> hgkc008AList, Map<Long, HGKC010> dbHgkc010Map, HGKC008 hgkc008) { private void checkConfirmData(List<HGKC008A> hgkc008AList, Map<Long, HGKC010> dbHgkc010Map, HGKC008 hgkc008) {
AssertUtils.isTrue(hgkc008.getStatus().compareTo(HGConstant.ProductStatus.YTJ) == 0,"领料单已提交,不可修改"); AssertUtils.isTrue(hgkc008.getStatus().compareTo(HGConstant.ProductStatus.YTJ) == 0, "领料单已提交,不可修改");
hgkc008AList.forEach(o -> { hgkc008AList.forEach(o -> {
dbHgkc010Map.forEach((k,v) ->{ dbHgkc010Map.forEach((k, v) -> {
AssertUtils.isTrue(o.getInventCode().equals(v.getInventCode()), "此领料单已选择存货:"+v.getInventCode()); AssertUtils.isTrue(o.getInventCode().equals(v.getInventCode()), "此领料单已选择存货:" + v.getInventCode());
}); });
}); });
} }
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
INVENT_CODE = #inventCode# INVENT_CODE = #inventCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName"> <isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName# INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="specId"> <isNotEmpty prepend=" AND " property="specId">
SPEC_ID = #specId# SPEC_ID = #specId#
...@@ -120,6 +120,30 @@ ...@@ -120,6 +120,30 @@
<include refid="BaseCondition.createdTimeCondition"/> <include refid="BaseCondition.createdTimeCondition"/>
</sql> </sql>
<sql id="lyCondition">
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE LIKE CONCAT('%', #inventCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty>
</sql>
<sql id="orderBy"> <sql id="orderBy">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
...@@ -145,6 +169,20 @@ ...@@ -145,6 +169,20 @@
<include refid="condition"/> <include refid="condition"/>
</select> </select>
<select id="queryLy" resultClass="com.baosight.hggp.hg.kc.domain.HGKC010">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include refid="lyCondition"/>
<include refid="orderBy"/>
</select>
<select id="countLy" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGKC010 WHERE 1=1
<include refid="lyCondition"/>
</select>
<select id="querySum" resultClass="com.baosight.hggp.hg.kc.domain.HGKC010"> <select id="querySum" resultClass="com.baosight.hggp.hg.kc.domain.HGKC010">
SELECT SELECT
ACCOUNT_CODE as "accountCode", <!-- 企业编码 --> ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
......
package com.baosight.hggp.hg.xs.constant;
/**
* @author:songx
* @date:2024/8/27,9:14
*/
public class HgXsConstant {
/**
* 状态
*
* @author:songx
* @date:2024/5/7,16:36
*/
public static class FolStatus {
// 待回访
public static final Integer S0 = 0;
// 已回访
public static final Integer S1 = 1;
}
}
package com.baosight.hggp.hg.xs.constant;
/**
* @author:songx
* @date:2024/8/27,9:14
*/
public class HgXsSqlConstant {
/**
* 客户回访
*
* @author:songx
* @date:2024/5/7,16:36
*/
public static class HgXs007 {
// 审核
public static final String CHECK = "HGXS007.check";
// 锁
public static final String LOCK = "HGXS007.lock";
}
}
package com.baosight.hggp.hg.xs.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:Hgxs007.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-08-27 9:04:34 create
*/
public class HGXS007 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* ID*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 账套*/
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_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_FOL_DATE = "folDate"; /* 回访日期*/
public static final String FIELD_FOL_TYPE = "folType"; /* 回访方式 1-电话回访 2-上门回访*/
public static final String FIELD_FOL_STATUS = "folStatus"; /* 回访状态 0-待回访 1-已回访*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_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_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_FOL_DATE = "FOL_DATE"; /* 回访日期*/
public static final String COL_FOL_TYPE = "FOL_TYPE"; /* 回访方式 1-电话回访 2-上门回访*/
public static final String COL_FOL_STATUS = "FOL_STATUS"; /* 回访状态 0-待回访 1-已回访*/
public static final String QUERY = "HGXS007.query";
public static final String COUNT = "HGXS007.count";
public static final String INSERT = "HGXS007.insert";
public static final String UPDATE = "HGXS007.update";
public static final String DELETE = "HGXS007.delete";
private Long id = new Long(0); /* ID*/
private String accountCode = " "; /* 账套*/
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 String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String folDate = " "; /* 回访日期*/
private Integer folType; /* 回访方式 1-电话回访 2-上门回访*/
private Integer folStatus; /* 回访状态 0-待回访 1-已回访*/
/**
* the constructor.
*/
public HGXS007() {
initMetaData();
}
/**
* 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_ACCOUNT_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_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FOL_DATE);
eiColumn.setDescName("回访日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FOL_TYPE);
eiColumn.setDescName("回访方式 1-电话回访 2-上门回访");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FOL_STATUS);
eiColumn.setDescName("回访状态 0-待回访 1-已回访");
eiMetadata.addMeta(eiColumn);
}
/**
* 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 accountCode - 账套.
*
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 账套.
*
* @param accountCode - 账套
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* 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 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 companyName - 公司名称.
*
* @return the companyName
*/
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公司名称.
*
* @param companyName - 公司名称
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* get the folDate - 回访日期.
*
* @return the folDate
*/
public String getFolDate() {
return this.folDate;
}
/**
* set the folDate - 回访日期.
*
* @param folDate - 回访日期
*/
public void setFolDate(String folDate) {
this.folDate = folDate;
}
/**
* get the folType - 回访方式 1-电话回访 2-上门回访.
*
* @return the folType
*/
public Integer getFolType() {
return this.folType;
}
/**
* set the folType - 回访方式 1-电话回访 2-上门回访.
*
* @param folType - 回访方式 1-电话回访 2-上门回访
*/
public void setFolType(Integer folType) {
this.folType = folType;
}
/**
* get the folStatus - 回访状态 0-待回访 1-已回访.
*
* @return the folStatus
*/
public Integer getFolStatus() {
return this.folStatus;
}
/**
* set the folStatus - 回访状态 0-待回访 1-已回访.
*
* @param folStatus - 回访状态 0-待回访 1-已回访
*/
public void setFolStatus(Integer folStatus) {
this.folStatus = folStatus;
}
/**
* 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));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
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));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setFolDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FOL_DATE)), folDate));
setFolType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_FOL_TYPE)), folType));
setFolStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_FOL_STATUS)), folStatus));
}
/**
* 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_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_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_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_FOL_DATE, StringUtils.toString(folDate, eiMetadata.getMeta(FIELD_FOL_DATE)));
map.put(FIELD_FOL_TYPE, StringUtils.toString(folType, eiMetadata.getMeta(FIELD_FOL_TYPE)));
map.put(FIELD_FOL_STATUS, StringUtils.toString(folStatus, eiMetadata.getMeta(FIELD_FOL_STATUS)));
return map;
}
}
package com.baosight.hggp.hg.xs.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.xs.constant.HgXsConstant;
import com.baosight.hggp.hg.xs.constant.HgXsSqlConstant;
import com.baosight.hggp.hg.xs.domain.HGXS007;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.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.Arrays;
import java.util.List;
import java.util.Map;
/**
* 客户回访
*
* @author:songx
* @date:2024/8/27,9:05
*/
public class ServiceHGXS007 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGXS007().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "客户回访", operType = "查询")
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HGXS007.FIELD_FOL_DATE, DateUtils.formatShort(queryMap.get(HGXS007.FIELD_FOL_DATE)));
inInfo = super.query(inInfo, HGXS007.QUERY, new HGXS007());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "删除")
public EiInfo remove(EiInfo inInfo) {
try {
List<HGXS007> fXs007s = MapUtils.toDaoEPBases(inInfo, HGXS007.class);
Map<Long, HGXS007> dbXs007s = HGXSUtils.HgXs007.lockAndGet(fXs007s);
for (HGXS007 fXs007 : fXs007s) {
Long id = fXs007.getId();
HGXS007 dbXs007 = dbXs007s.get(id);
this.checkData(dbXs007);
DaoUtils.update(HGXS007.DELETE, fXs007);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fXs007s.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 审核
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "审核")
public EiInfo check(EiInfo inInfo) {
try {
List<HGXS007> fXs007s = MapUtils.toDaoEPBases(inInfo, HGXS007.class);
Map<Long, HGXS007> dbXs007s = HGXSUtils.HgXs007.lockAndGet(fXs007s);
for (HGXS007 fXs007 : fXs007s) {
Long id = fXs007.getId();
HGXS007 dbXs007 = dbXs007s.get(id);
this.checkData(dbXs007);
fXs007.setFolStatus(HgXsConstant.FolStatus.S1);
DaoUtils.update(HgXsSqlConstant.HgXs007.CHECK, fXs007);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fXs007s.size() + "]条数据审核成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "审核失败");
}
return inInfo;
}
/**
* 检查状态
*
* @param inInfo
* @return
*/
public EiInfo checkStatus(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
HGXS007 dbXs007 = HGXSUtils.HgXs007.lockAndGet(MapUtils.getLong(queryMap, HGXS007.FIELD_ID));
this.checkData(dbXs007);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param dbXs007
*/
private void checkData(HGXS007 dbXs007) {
AssertUtils.isNotEquals(dbXs007.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("回访单【%s】不是\"未删除\"状态,不允许操作", dbXs007.getId()));
AssertUtils.isNotEquals(dbXs007.getFolStatus(), HgXsConstant.FolStatus.S0,
String.format("回访单【%s】不是\"待回访\"状态,不允许操作", dbXs007.getId()));
}
}
package com.baosight.hggp.hg.xs.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.constant.S3Constant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.utils.Iplat4jUtils;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.dm.domain.HGDM099;
import com.baosight.hggp.hg.xs.constant.HgXsConstant;
import com.baosight.hggp.hg.xs.domain.HGXS007;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.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.Arrays;
import java.util.List;
import java.util.Map;
/**
* 附件清单
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHGXS007A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
this.setDetailInfo(inInfo);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGDM099().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "附件清单", operType = "查询", operDesc = "物料清单-附件清单A-查询")
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGDM099.QUERY, new HGDM099());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除
*
* @param inInfo
* @return
*/
public EiInfo remove(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
Long bizId = MapUtils.getLong(queryMap, HGDM099.FIELD_BIZ_ID);
HGXS007 dbXs007 = HGXSUtils.HgXs007.lockAndGet(bizId);
this.checkData(dbXs007);
List<HGDM099> fDm099s = MapUtils.toDaoEPBases(inInfo, HGDM099.class);
for (HGDM099 fDm099 : fDm099s) {
DaoUtils.update(HGDM099.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 dbXs007
*/
private void checkData(HGXS007 dbXs007) {
AssertUtils.isNotEquals(dbXs007.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("回访单【%s】不是\"未删除\"状态,不允许操作", dbXs007.getId()));
AssertUtils.isNotEquals(dbXs007.getFolStatus(), HgXsConstant.FolStatus.S0,
String.format("回访单【%s】不是\"待回访\"状态,不允许操作", dbXs007.getId()));
}
/**
* 设置信息
*
* @param inInfo
*/
public void setDetailInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
Long bizId = MapUtils.getLong(queryRow, HGDM099.FIELD_BIZ_ID);
if (bizId == null) {
return;
}
EiBlock block = new EiBlock(CommonConstant.Field.DETAIL);
block.addRow(HGXSTools.HgXs007.get(bizId));
block.addBlockMeta(new HGXS007().eiMetadata);
inInfo.setBlock(block);
}
}
package com.baosight.hggp.hg.xs.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.constant.HgScSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.constant.HgXsConstant;
import com.baosight.hggp.hg.xs.domain.HGXS007;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.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 ServiceHGXS007B extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID));
this.setProjectInfo(inInfo);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
HGXS007 fXs007 = MapUtils.toDaoEPBase(inInfo, HGXS007.class);
fXs007.setFolDate(DateUtils.formatShort(fXs007.getFolDate()));
if (fXs007.getId() == null || fXs007.getId() == 0) {
this.add(fXs007);
} else {
this.modify(fXs007);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增
*
* @param fXs007
*/
private void add(HGXS007 fXs007) {
fXs007.setFolStatus(HgXsConstant.FolStatus.S0);
DaoUtils.insert(HGXS007.INSERT, fXs007);
}
/**
* 修改数据
*
* @param fXs007
*/
private void modify(HGXS007 fXs007) {
HGXS007 dbXs007 = HGXSUtils.HgXs007.lockAndGet(fXs007);
this.checkData(dbXs007);
DaoUtils.update(HGXS007.UPDATE, fXs007);
}
/**
* 设置项目信息
*
* @param inInfo
*/
public void setProjectInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
Long id = MapUtils.getLong(queryRow, HGXS007.FIELD_ID);
if (id == null) {
return;
}
EiBlock resultBlock = new EiBlock(EiConstant.resultBlock);
resultBlock.addRow(HGXSTools.HgXs007.get(id));
resultBlock.addBlockMeta(new HGXS007().eiMetadata);
inInfo.setBlock(resultBlock);
}
/**
* 数据校验
*
* @param dbXs007
*/
private void checkData(HGXS007 dbXs007) {
AssertUtils.isNotEquals(dbXs007.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("回访单【%s】不是\"未删除\"状态,不允许操作", dbXs007.getId()));
AssertUtils.isNotEquals(dbXs007.getFolStatus(), HgXsConstant.FolStatus.S0,
String.format("回访单【%s】不是\"待回访\"状态,不允许操作", dbXs007.getId()));
}
}
<?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="HGXS007">
<sql id="column">
ID as "id", <!-- ID -->
ACCOUNT_CODE as "accountCode", <!-- 账套 -->
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-是 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
FOL_DATE as "folDate", <!-- 回访日期 -->
FOL_TYPE as "folType", <!-- 回访方式 1-电话回访 2-上门回访 -->
FOL_STATUS as "folStatus" <!-- 回访状态 0-待回访 1-已回访 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="HGXSDataAuth.authCondition"/>
<include refid="idCondition"/>
<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="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="folDate">
FOL_DATE = #folDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="folType">
FOL_TYPE = #folType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="folStatus">
FOL_STATUS = #folStatus#
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate open="(" close=")" conjunction="," property="ids">#ids[]#</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.hggp.hg.xs.domain.HGXS007">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGXS007
WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGXS007
WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGXS007 (
ACCOUNT_CODE, <!-- 账套 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
FOL_DATE, <!-- 回访日期 -->
FOL_TYPE, <!-- 回访方式 1-电话回访 2-上门回访 -->
FOL_STATUS <!-- 回访状态 0-待回访 1-已回访 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#companyCode#, #companyName#, #folDate#, #folType#, #folStatus#
)
</insert>
<!-- 逻辑删除 -->
<delete id="delete">
UPDATE ${hggpSchema}.HGXS007
SET DELETE_FLAG = 1,
<include refid="SqlBase.updateRevise"/>
WHERE ID = #id#
</delete>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hggpSchema}.HGXS007
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
<update id="update">
UPDATE ${hggpSchema}.HGXS007
SET
FOL_DATE = #folDate#, <!-- 回访日期 -->
FOL_TYPE = #folType#, <!-- 回访方式 1-电话回访 2-上门回访 -->
<include refid="SqlBase.updateRevise"/>
WHERE ID = #id#
</update>
<!-- 审核 -->
<update id="check">
UPDATE ${hggpSchema}.HGXS007
SET
FOL_STATUS = #folStatus#, <!-- 回访状态 0-待回访 1-已回访 -->
<include refid="SqlBase.updateRevise"/>
WHERE ID = #id#
</update>
</sqlMap>
...@@ -4,6 +4,8 @@ import com.baosight.hggp.core.dao.DaoBase; ...@@ -4,6 +4,8 @@ import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.enums.OrgTypeEnum; import com.baosight.hggp.core.enums.OrgTypeEnum;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.xs.constant.HgXsSqlConstant;
import com.baosight.hggp.hg.xs.domain.HGXS007;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.domain.UserGroup; import com.baosight.hggp.hg.xs.domain.UserGroup;
...@@ -33,6 +35,81 @@ import java.util.stream.Collectors; ...@@ -33,6 +35,81 @@ import java.util.stream.Collectors;
public class HGXSTools { public class HGXSTools {
/** /**
* 客户回访
*
* @author:songx
* @date:2024/8/27,9:27
*/
public static class HgXs007 {
/**
* 锁.
*
* @param id ID
*/
public static void lock(Long id) {
AssertUtils.isNull(id, "ID不能为空!");
Map<String, Object> map = new HashMap<>();
map.put(HGXS007.FIELD_ID, id);
DaoBase.getInstance().update(HgXsSqlConstant.HgXs007.LOCK, map);
}
/**
* 锁.
*
* @param ids ID
*/
public static void lock(List<Long> ids) {
AssertUtils.isEmpty(ids, "ID不能为空!");
Map<String, Object> map = new HashMap<>();
map.put("ids", ids);
DaoBase.getInstance().update(HgXsSqlConstant.HgXs007.LOCK, map);
}
/**
* 查询
*
* @param id ID
* @return
*/
public static HGXS007 get(Long id) {
if (id == null) {
return null;
}
Map<String, Object> paramMap = new HashMap();
paramMap.put(HGXS007.FIELD_ID, id);
List<HGXS007> results = DaoBase.getInstance().query(HGXS007.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 查询
*
* @param ids ID
* @return
*/
public static List<HGXS007> list(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return null;
}
Map<String, Object> paramMap = new HashMap();
paramMap.put("ids", ids);
return DaoBase.getInstance().query(HGXS007.QUERY, paramMap);
}
/**
* 查询
*
* @param ids ID
* @return
*/
public static Map<Long, HGXS007> map(List<Long> ids) {
List<HGXS007> results = list(ids);
return results.stream().collect(Collectors.toMap(HGXS007::getId, item -> item));
}
}
/**
* @author:songx * @author:songx
* @date:2024/2/4,10:35 * @date:2024/2/4,10:35
*/ */
......
package com.baosight.hggp.hg.xs.utils; package com.baosight.hggp.hg.xs.utils;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.xs.domain.HGXS007;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.domain.UserGroup; import com.baosight.hggp.hg.xs.domain.UserGroup;
...@@ -98,4 +99,51 @@ public class HGXSUtils { ...@@ -98,4 +99,51 @@ public class HGXSUtils {
} }
} }
/**
* 客户回访
*
* @author:songx
* @date:2024/8/27,9:25
*/
public static class HgXs007 {
/**
* 锁并获取数据
*
* @param id
* @return
*/
public static HGXS007 lockAndGet(Long id) {
// 锁
HGXSTools.HgXs007.lock(id);
// 查询数据
return HGXSTools.HgXs007.get(id);
}
/**
* 锁并获取数据
*
* @param fXs007
* @return
*/
public static HGXS007 lockAndGet(HGXS007 fXs007) {
return lockAndGet(fXs007.getId());
}
/**
* 锁并获取数据
*
* @param fXs007s
* @return
*/
public static Map<Long, HGXS007> lockAndGet(List<HGXS007> fXs007s) {
List<Long> ids = ObjectUtils.listEpKey(fXs007s, HGXS007.FIELD_ID);
// 锁
HGXSTools.HgXs007.lock(ids);
// 查询数据
return HGXSTools.HgXs007.map(ids);
}
}
} }
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
<!-- 数据权限 --> <!-- 数据权限 -->
<sqlMap resource="com/baosight/hggp/hg/xs/sql/HGXSDataAuth.xml"/> <sqlMap resource="com/baosight/hggp/hg/xs/sql/HGXSDataAuth.xml"/>
<sqlMap resource="com/baosight/hggp/hg/xs/sql/HGXS007.xml"/>
<!-- 工具 -->
<sqlMap resource="com/baosight/hggp/hg/dm/sql/HGDM099.xml"/>
<!--成本--> <!--成本-->
<sqlMap resource="com/baosight/hggp/hg/cb/sql/HGCB001.xml"/> <sqlMap resource="com/baosight/hggp/hg/cb/sql/HGCB001.xml"/>
......
...@@ -51,6 +51,9 @@ ...@@ -51,6 +51,9 @@
sumType="page"/> sumType="page"/>
<EF:EFColumn ename="receiveUnitWeight" cname="收货单重" enable="false" width="120" align="right" format="{0:N3}" <EF:EFColumn ename="receiveUnitWeight" cname="收货单重" enable="false" width="120" align="right" format="{0:N3}"
hidden="true"/> hidden="true"/>
<EF:EFComboColumn ename="calculationMethod" cname="计算方式" enable="true" width="100" align="center" required="true">
<EF:EFCodeOption codeName="hggp.cg.calculationMethod" />
</EF:EFComboColumn>
<EF:EFColumn ename="price" cname="单价" width="120" align="right" format="{0:C3}" required="true"/> <EF:EFColumn ename="price" cname="单价" width="120" align="right" format="{0:C3}" required="true"/>
<EF:EFColumn ename="amount" cname="金额" enable="false" width="120" align="right" format="{0:C3}" <EF:EFColumn ename="amount" cname="金额" enable="false" width="120" align="right" format="{0:C3}"
sumType="page"/> sumType="page"/>
......
...@@ -10,11 +10,6 @@ $(function () { ...@@ -10,11 +10,6 @@ $(function () {
} }
}], }],
loadComplete: function (grid) { loadComplete: function (grid) {
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#BTN_DELETE").on("click", deleteFunc);
}, },
dataBound: function () { dataBound: function () {
} }
...@@ -22,10 +17,12 @@ $(function () { ...@@ -22,10 +17,12 @@ $(function () {
}; };
$("#ef_form_head").hide(); $("#ef_form_head").hide();
// 查询 // 查询
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#REMOVE").on("click", remove);
}); });
/** /**
...@@ -86,7 +83,7 @@ function uploadFileCallback(e) { ...@@ -86,7 +83,7 @@ function uploadFileCallback(e) {
/** /**
* 删除 * 删除
*/ */
function deleteFunc() { function remove() {
var rows = resultGrid.getCheckedRows(); var rows = resultGrid.getCheckedRows();
if (rows.length == 0) { if (rows.length == 0) {
message("请先勾选数据!"); message("请先勾选数据!");
...@@ -94,7 +91,7 @@ function deleteFunc() { ...@@ -94,7 +91,7 @@ function deleteFunc() {
} }
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () { ok: function () {
JSUtils.submitGridsData("result", "HGDM099", "delete", true); JSUtils.submitGridsData("result", "HGDM099", "remove", true);
} }
}) })
} }
...@@ -2,7 +2,7 @@ $(function (){ ...@@ -2,7 +2,7 @@ $(function (){
var companyCodes = __eiInfo.getBlock("roleCompany").getMappedRows(); var companyCodes = __eiInfo.getBlock("roleCompany").getMappedRows();
var projCodes = __eiInfo.getBlock("projRecordByRole_block_id").getMappedRows(); var projCodes = __eiInfo.getBlock("projRecordByRole_block_id").getMappedRows();
var whRecordBoxBlocks = __eiInfo.getBlock("wh_record_box_block_id").getMappedRows(); var whRecordBoxBlocks = __eiInfo.getBlock("wh_record_block_id").getMappedRows();
$(".row").children().attr("class", "col-md-3"); $(".row").children().attr("class", "col-md-3");
......
...@@ -222,14 +222,19 @@ let save = function (btnNode) { ...@@ -222,14 +222,19 @@ let save = function (btnNode) {
* 选择 * 选择
*/ */
let selectInvent = function () { let selectInvent = function () {
let params = {
JSColorbox.open({ "inqu_status-0-receiveId": $("#inqu_status-0-receiveId").val(),
href: "HGKC008B?methodName=initLoad&inqu_status-0-receiveId="+$("#inqu_status-0-receiveId").val()+"&inqu_status-0-companyCode="+$("#inqu_status-0-companyCode").val(), "inqu_status-0-companyCode": $("#inqu_status-0-companyCode").val(),
title: "<div style='text-align: center;'>综合实时库存</div>", "inqu_status-0-whCode": $("#inqu_status-0-whCode").val()
width: "90%", }
height: "90%", JSColorbox.open({
callbackName: selectInventCallback href: "HGKC008B",
}); title: "<div style='text-align: center;'>综合实时库存</div>",
width: "90%",
height: "90%",
params: params,
callbackName: selectInventCallback
});
} }
/** /**
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<EF:EFInput ename="inqu_status-0-receiveId" cname="领料单id" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-receiveId" cname="领料单id" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-whCode" cname="仓库编码" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-whCode" cname="仓库编码" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-companyCode" cname="仓库编码" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-companyCode" cname="公司编码" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-status" cname="状态" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-status" cname="状态" colWidth="3" type="hidden"/>
<div class="row"> <div class="row">
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains"> <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="receiveId" cname="领料单id" hidden="true"/> <EF:EFColumn ename="receiveId" cname="领料单id" hidden="true"/>
<EF:EFColumn ename="whCode" cname="仓库编码" hidden="true"/> <EF:EFColumn ename="whCode" cname="仓库编码" hidden="true"/>
......
...@@ -20,7 +20,7 @@ $(window).load(function () { ...@@ -20,7 +20,7 @@ $(window).load(function () {
// 查询 // 查询
query(); query();
//存货编号查询条件 //存货编号查询条件
initInventCode(); // initInventCode();
}); });
/** /**
...@@ -46,12 +46,12 @@ let confirm = function () { ...@@ -46,12 +46,12 @@ let confirm = function () {
message("勾选的第" + (i + 1) + "行库存数量必须大于0"); message("勾选的第" + (i + 1) + "行库存数量必须大于0");
return; return;
} }
if (!isPositiveNumber(invWeight)) { // if (!isPositiveNumber(invWeight)) {
message("勾选的第" + (i + 1) + "行库存总重必须大于0"); // message("勾选的第" + (i + 1) + "行库存总重必须大于0");
return; // return;
} // }
} }
JSUtils.confirm("确定对勾选的[" + rows.length + "]条数据生成\"采购收货\"吗? ", { JSUtils.confirm("确定对勾选的[" + rows.length + "]条数据进行\"生产领料\"操作吗? ", {
ok: function () { ok: function () {
JSUtils.submitGridsData("result", "HGKC008B", "confirm", JSUtils.submitGridsData("result", "HGKC008B", "confirm",
true, function (e) { true, function (e) {
......
...@@ -8,20 +8,19 @@ ...@@ -8,20 +8,19 @@
<EF:EFPage title="综合库存管理"> <EF:EFPage title="综合库存管理">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<EF:EFInput ename="inqu_status-0-companyCode" cname="公司编号" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-companyCode" cname="公司编号" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-whCode" cname="仓库编码" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-receiveId" cname="领料单id" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-receiveId" cname="领料单id" colWidth="3" type="hidden"/>
<div class="row"> <div class="row">
<EF:EFSelect cname="仓库名称" blockId="inqu_status" ename="whCode" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货类型" blockId="inqu_status" ename="inventType" row="0" colWidth="3" <EF:EFSelect cname="存货类型" blockId="inqu_status" ename="inventType" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains"> optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="存货编号" blockId="inqu_status" ename="inventCode" row="0" colWidth="3" <%-- <EF:EFSelect cname="存货编号" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"--%>
filter="contains" optionLabel="全部" defultValue="" template="[#=valueField#]#=textField#"> <%-- filter="contains" optionLabel="全部" defultValue="" template="[#=valueField#]#=textField#">--%>
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/> <%-- <EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>--%>
</EF:EFSelect> <%-- </EF:EFSelect>--%>
<EF:EFInput cname="存货编码" ename="inventCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
......
$(function () {
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 20,
pageSizes: [20, 50, 100, 200],
},
columns: [{
field: "operator",
template: function (item) {
let auditStatus = item.folStatus;
let template = '';
if (auditStatus && auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="modify(' + item.id + ')" >修改</a>&nbsp;&nbsp;';
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
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 (id) {
let params = "inqu_status-0-id=" + id;
addOrUpdate(params);
}
/**
* 新增
*/
let addOrUpdate = function (params) {
JSColorbox.open({
href: "HGXS007B?" + 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", "HGXS007", "remove",
false, function (res) {
message(res.msg);
if (res.status > -1) {
resultGrid.dataSource.page(1);
}
}
);
}
})
}
/**
* 审核
*
* @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", "HGXS007", "check",
false, function (res) {
message(res.msg);
if (res.status > -1) {
resultGrid.dataSource.page(1);
}
}
);
}
})
}
/**
* 附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HGXS007A?inqu_status-0-bizId=" + id,
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:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDatePicker cname="回访日期" ename="folDate" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect cname="回访方式" ename="folType" blockId="inqu_status" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.xs.folType"/>
</EF:EFSelect>
<EF:EFSelect cname="回访状态" ename="folStatus" blockId="inqu_status" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.xs.folStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="id" cname="回访单ID" enable="false" width="80" align="center"/>
<EF:EFColumn ename="folDate" cname="回访日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="220" align="left"/>
<EF:EFComboColumn ename="folType" cname="回访方式" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="hggp.xs.folType"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="folStatus" cname="回访状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="hggp.xs.folStatus"/>
</EF:EFComboColumn>
<EF:EFColumn cname="创建人" ename="createdName" enable="false" width="100" align="center"/>
<EF:EFColumn cname="创建时间" ename="createdTime" 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 = {
"inqu_status-0-bizType": {
change: function (e) {
query();
}
}
}
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 () {
var folStatus = $("#detail-0-folStatus").val();
//如果提交了,则不能修改
if (folStatus && folStatus === "0") {
$('#UPLOAD_FILE').show();
$('#REMOVE').show();
} else {
$('#UPLOAD_FILE').hide();
$('#REMOVE').hide();
}
}
/**
* 文件上传
*
* @param id
*/
function uploadFile() {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-id", $("#inqu_status-0-bizId").val());
EiCommunicator.send('HGXS007', 'checkStatus', inInfo, {
onSuccess(res) {
if (res.status !== -1) {
JSColorbox.open({
href: "HGDM099A?methodName=initLoad",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
} else {
message(res.msg);
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(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);
EiCommunicator.send('HGDM099', 'upload', inInfo, {
onSuccess(res) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
/**
* 删除
*/
function remove() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HGXS007A", "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:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="回访单ID" ename="id" blockId="detail" row="0" type="hidden"/>
<EF:EFInput cname="回访单状态" ename="folStatus" blockId="detail" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="回访单ID" ename="bizId" blockId="inqu_status" row="0" readonly="true"/>
<EF:EFSelect cname="业务类型" ename="bizType" blockId="inqu_status" row="0" colWidth="3" required="true">
<EF:EFOption label="体验调查" value="HGXS007_TY"/>
<EF:EFOption label="满意度调查" value="HGXS007_MY"/>
</EF:EFSelect>
<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="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-companyCode": {
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-companyName").val(textField);
} else {
$("#result-0-companyName").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 companyCode = $("#result-0-companyCode").val();
if (isBlank(companyCode)) {
message("企业名称不能为空");
return;
}
let folDate = $("#result-0-folDate").val();
if (isBlank(folDate)) {
message("回访日期不能为空");
return;
}
let folType = $("#result-0-folType").val();
if (isBlank(folType)) {
message("回访方式不能为空");
return;
}
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("", "HGXS007B", "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="数据区域">
<div class="row">
<EF:EFInput cname="ID" blockId="result" ename="id" row="0" colWidth="6" ratio="2:10" required="true"
readonly="true"/>
</div>
<div class="row">
<EF:EFSelect cname="公司" blockId="result" ename="companyCode" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="公司名称" blockId="result" ename="companyName" row="0" colWidth="6" ratio="2:10"
type="hidden"/>
</div>
<div class="row">
<EF:EFDatePicker cname="回访日期" ename="folDate" blockId="result" row="0" colWidth="3" ratio="2:10"
format="yyyy-MM-dd" readonly="true"/>
</div>
<div class="row">
<EF:EFSelect cname="回访方式" ename="folType" blockId="result" row="0" colWidth="3" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="hggp.xs.folType"/>
</EF:EFSelect>
</div>
<br/>
<span style="color: red; ">说明:ID由系统自动生成</span><br>
</EF:EFRegion>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment