Commit d84048fc by liuyang

2024-04-17 客户管理功能优化

parent 487aa248
...@@ -29,6 +29,10 @@ public class HPPZ003 extends DaoEPBase { ...@@ -29,6 +29,10 @@ public class HPPZ003 extends DaoEPBase {
public static final String FIELD_CUST_TYPE = "custType"; /* 客商类型 1:国企;2:民营;*/ public static final String FIELD_CUST_TYPE = "custType"; /* 客商类型 1:国企;2:民营;*/
public static final String FIELD_CUST_CODE = "custCode"; /* 客户编码*/ public static final String FIELD_CUST_CODE = "custCode"; /* 客户编码*/
public static final String FIELD_CUST_NAME = "custName"; /* 客户名称*/ public static final String FIELD_CUST_NAME = "custName"; /* 客户名称*/
public static final String FIELD_TAX_REGISTER_CODE = "taxRegisterCode"; /*统一社会信息代码*/
public static final String FIELD_OPEN_BANK_CODE = "openBankCode"; /*开户银行代码*/
public static final String FIELD_OPEN_BANK_NAME = "openBankName"; /*开会银行名称*/
public static final String FIELD_ACCOUNT_NUM = "accountNum"; /*银行账号*/
public static final String FIELD_ADDRESS = "address"; /* 地址*/ public static final String FIELD_ADDRESS = "address"; /* 地址*/
public static final String FIELD_STATUS = "status"; /* 状态 0未启用 1启用*/ public static final String FIELD_STATUS = "status"; /* 状态 0未启用 1启用*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/ public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
...@@ -65,13 +69,19 @@ public class HPPZ003 extends DaoEPBase { ...@@ -65,13 +69,19 @@ public class HPPZ003 extends DaoEPBase {
public static final String INSERT = "HPPZ003.insert"; public static final String INSERT = "HPPZ003.insert";
public static final String UPDATE = "HPPZ003.update"; public static final String UPDATE = "HPPZ003.update";
public static final String DELETE = "HPPZ003.delete"; public static final String DELETE = "HPPZ003.delete";
public static final String UPDATE_CUST_CODE = "HPPZ003.updateCustCode";
private Long id = null; private Long id = null;
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码 预留*/ private String depCode = " "; /* 部门编码 预留*/
private Integer custType = null; /* 客商类型 1:国企;2:民营;*/ private Integer custType = 1; /* 客商类别 1:潜在客户;2:正式客户;*/
private String custCode = " "; /* 客户编码*/ private String custCode = " "; /* 客户编码*/
private String custName = " "; /* 客户名称*/ private String custName = " "; /* 客户名称*/
private String taxRegisterCode = " "; /*统一社会信息代码*/
private String openBankCode = " "; /*开户银行代码*/
private String openBankName = " "; /*开会银行名称*/
private String accountNum = " "; /*银行账号*/
private String address = " "; /* 地址*/ private String address = " "; /* 地址*/
private Integer status = 1; /* 状态 0未启用 1启用*/ private Integer status = 1; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
...@@ -116,6 +126,22 @@ public class HPPZ003 extends DaoEPBase { ...@@ -116,6 +126,22 @@ public class HPPZ003 extends DaoEPBase {
eiColumn.setDescName("客户名称"); eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_REGISTER_CODE);
eiColumn.setDescName("统一社会信息代码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OPEN_BANK_CODE);
eiColumn.setDescName("开户银行代码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OPEN_BANK_NAME);
eiColumn.setDescName("开会银行名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_NUM);
eiColumn.setDescName("银行账号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ADDRESS); eiColumn = new EiColumn(FIELD_ADDRESS);
eiColumn.setDescName("地址"); eiColumn.setDescName("地址");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -431,6 +457,38 @@ public class HPPZ003 extends DaoEPBase { ...@@ -431,6 +457,38 @@ public class HPPZ003 extends DaoEPBase {
this.putAddress = putAddress; this.putAddress = putAddress;
} }
public String getTaxRegisterCode() {
return taxRegisterCode;
}
public void setTaxRegisterCode(String taxRegisterCode) {
this.taxRegisterCode = taxRegisterCode;
}
public String getOpenBankCode() {
return openBankCode;
}
public void setOpenBankCode(String openBankCode) {
this.openBankCode = openBankCode;
}
public String getOpenBankName() {
return openBankName;
}
public void setOpenBankName(String openBankName) {
this.openBankName = openBankName;
}
public String getAccountNum() {
return accountNum;
}
public void setAccountNum(String accountNum) {
this.accountNum = accountNum;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -445,6 +503,10 @@ public class HPPZ003 extends DaoEPBase { ...@@ -445,6 +503,10 @@ public class HPPZ003 extends DaoEPBase {
setCustType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CUST_TYPE)), custType)); setCustType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CUST_TYPE)), custType));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUST_CODE)), custCode)); setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUST_CODE)), custCode));
setCustName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUST_NAME)), custName)); setCustName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUST_NAME)), custName));
setTaxRegisterCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_TAX_REGISTER_CODE)), taxRegisterCode));
setOpenBankCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OPEN_BANK_CODE)), openBankCode));
setOpenBankName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OPEN_BANK_NAME)), openBankName));
setAccountNum(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_NUM)), accountNum));
setAddress(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ADDRESS)), address)); setAddress(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ADDRESS)), address));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status)); setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
...@@ -472,6 +534,10 @@ public class HPPZ003 extends DaoEPBase { ...@@ -472,6 +534,10 @@ public class HPPZ003 extends DaoEPBase {
map.put(FIELD_CUST_TYPE, StringUtils.toString(custType, eiMetadata.getMeta(FIELD_CUST_TYPE))); map.put(FIELD_CUST_TYPE, StringUtils.toString(custType, eiMetadata.getMeta(FIELD_CUST_TYPE)));
map.put(FIELD_CUST_CODE, StringUtils.toString(custCode, eiMetadata.getMeta(FIELD_CUST_CODE))); map.put(FIELD_CUST_CODE, StringUtils.toString(custCode, eiMetadata.getMeta(FIELD_CUST_CODE)));
map.put(FIELD_CUST_NAME, StringUtils.toString(custName, eiMetadata.getMeta(FIELD_CUST_NAME))); map.put(FIELD_CUST_NAME, StringUtils.toString(custName, eiMetadata.getMeta(FIELD_CUST_NAME)));
map.put(FIELD_TAX_REGISTER_CODE, StringUtils.toString(taxRegisterCode, eiMetadata.getMeta(FIELD_TAX_REGISTER_CODE)));
map.put(FIELD_OPEN_BANK_CODE, StringUtils.toString(openBankCode, eiMetadata.getMeta(FIELD_OPEN_BANK_CODE)));
map.put(FIELD_OPEN_BANK_NAME, StringUtils.toString(openBankName, eiMetadata.getMeta(FIELD_OPEN_BANK_NAME)));
map.put(FIELD_ACCOUNT_NUM, StringUtils.toString(accountNum, eiMetadata.getMeta(FIELD_ACCOUNT_NUM)));
map.put(FIELD_ADDRESS, StringUtils.toString(address, eiMetadata.getMeta(FIELD_ADDRESS))); map.put(FIELD_ADDRESS, StringUtils.toString(address, eiMetadata.getMeta(FIELD_ADDRESS)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS))); map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY))); map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
......
...@@ -6,9 +6,13 @@ ...@@ -6,9 +6,13 @@
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 --> DEP_CODE as "depCode", <!-- 部门编码 预留 -->
CUST_TYPE as "custType", <!-- 客商类型 1:国企;2:民营; --> CUST_TYPE as "custType", <!-- 客商类别 1:潜在客户;2:正式客户; -->
CUST_CODE as "custCode", <!-- 客户编码 --> CUST_CODE as "custCode", <!-- 客户编码 -->
CUST_NAME as "custName", <!-- 客户名称 --> CUST_NAME as "custName", <!-- 客户名称 -->
TAX_REGISTER_CODE as "taxRegisterCode",
OPEN_BANK_CODE as "openBankCode",
OPEN_BANK_NAME as "openBankName",
ACCOUNT_NUM as "accountNum",
ADDRESS as "address", <!-- 地址 --> ADDRESS as "address", <!-- 地址 -->
STATUS as "status", <!-- 状态 0未启用 1启用 --> STATUS as "status", <!-- 状态 0未启用 1启用 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
...@@ -56,6 +60,18 @@ ...@@ -56,6 +60,18 @@
<isNotEmpty prepend=" AND " property="custName"> <isNotEmpty prepend=" AND " property="custName">
CUST_NAME LIKE CONCAT('%', #custName#, '%') CUST_NAME LIKE CONCAT('%', #custName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="taxRegisterCode">
TAX_REGISTER_CODE = #taxRegisterCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="openBankCode">
OPEN_BANK_CODE = #openBankCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="openBankName">
OPEN_BANK_NAME = #openBankName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountNum">
ACCOUNT_NUM = #accountNum#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="address"> <isNotEmpty prepend=" AND " property="address">
ADDRESS = #address# ADDRESS = #address#
</isNotEmpty> </isNotEmpty>
...@@ -107,6 +123,10 @@ ...@@ -107,6 +123,10 @@
CUST_TYPE, <!-- 客商类型 1:国企;2:民营; --> CUST_TYPE, <!-- 客商类型 1:国企;2:民营; -->
CUST_CODE, <!-- 客户编码 --> CUST_CODE, <!-- 客户编码 -->
CUST_NAME, <!-- 客户名称 --> CUST_NAME, <!-- 客户名称 -->
TAX_REGISTER_CODE,
OPEN_BANK_CODE,
OPEN_BANK_NAME,
ACCOUNT_NUM,
ADDRESS, <!-- 地址 --> ADDRESS, <!-- 地址 -->
STATUS, <!-- 状态 0未启用 1启用 --> STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
...@@ -117,9 +137,9 @@ ...@@ -117,9 +137,9 @@
PHONE_NAME, PHONE_NAME,
PUT_ADDRESS PUT_ADDRESS
) VALUES ( ) VALUES (
#companyCode#, #depCode#, #custType#, #custCode#, #custName#, #address#, #companyCode#, #depCode#, #custType#, #custCode#, #custName#, #taxRegisterCode#, #openBankCode#,
#status#, #createdBy#, #createdName#, #createdTime# , #companyName# , #headName# #openBankName#, #accountNum#, #address#, #status#, #createdBy#, #createdName#, #createdTime# , #companyName#,
, #phoneName# , #putAddress# #headName#, #phoneName#,#putAddress#
) )
</insert> </insert>
...@@ -133,6 +153,10 @@ ...@@ -133,6 +153,10 @@
SET SET
CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; --> CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; -->
CUST_NAME = #custName#, <!-- 客户名称 --> CUST_NAME = #custName#, <!-- 客户名称 -->
TAX_REGISTER_CODE = #taxRegisterCode#,
OPEN_BANK_CODE = #openBankCode#,
OPEN_BANK_NAME = #openBankName#,
ACCOUNT_NUM = #accountNum#,
ADDRESS = #address#, <!-- 地址 --> ADDRESS = #address#, <!-- 地址 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 --> STATUS = #status#, <!-- 状态 0未启用 1启用 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
...@@ -145,6 +169,17 @@ ...@@ -145,6 +169,17 @@
WHERE ID = #id# WHERE ID = #id#
</update> </update>
<!--修改客户类型-->
<update id="updateCustCode">
UPDATE hpjx.t_hppz003
SET
CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE CUST_CODE = #custCode#
</update>
<select id="queryComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
CUST_CODE as "custCode", CUST_CODE as "custCode",
......
...@@ -116,6 +116,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -116,6 +116,7 @@ public class ServiceHPSC001 extends ServiceBase {
hpsc001.fromMap(resultRows.get(i)); hpsc001.fromMap(resultRows.get(i));
HPPZ003 fPz003 = new HPPZ003(); HPPZ003 fPz003 = new HPPZ003();
if (hpsc001.getPrinc2().trim().isEmpty()) { if (hpsc001.getPrinc2().trim().isEmpty()) {
/*添加客户档案*/
fPz003.setCustCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ003_CUST_CODE)); fPz003.setCustCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ003_CUST_CODE));
fPz003.setCustType(CompanyTypeEnum.GQ.getCode()); fPz003.setCustType(CompanyTypeEnum.GQ.getCode());
fPz003.setCustName(resultRows.get(i).get("princ2Name").toString()); fPz003.setCustName(resultRows.get(i).get("princ2Name").toString());
...@@ -232,7 +233,13 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -232,7 +233,13 @@ public class ServiceHPSC001 extends ServiceBase {
if(hpsc001.getStatus() == 1){ if(hpsc001.getStatus() == 1){
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("id",hpsc001.getId()); sqlMap.put("id",hpsc001.getId());
List<Map> rows = this.dao.query("HPSC001.query",sqlMap); List<HPSC001> rows = this.dao.query("HPSC001.query",sqlMap);
if (rows.size()>0){
Map hppz003Map = new HashMap();
hppz003Map.put(HPPZ003.FIELD_CUST_CODE,rows.get(0).getPrinc2());
hppz003Map.put(HPPZ003.FIELD_CUST_TYPE,2); //提交变更为正式客户
DaoUtils.update(HPPZ003.UPDATE_CUST_CODE, hppz003Map);
}
eiInfo.getBlock(EiConstant.resultBlock).setRows(rows); eiInfo.getBlock(EiConstant.resultBlock).setRows(rows);
this.buildHPSC002(eiInfo); this.buildHPSC002(eiInfo);
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="row"> <div class="row">
<EF:EFSelect ename="custType" blockId="inqu_status" cname="客户类型" row="0" colWidth="3"> <EF:EFSelect ename="custType" blockId="inqu_status" cname="客户类型" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/> <EF:EFCodeOption codeName="hpjx.hppz.customerType"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput ename="inqu_status-0-companyName" cname="公司" colWidth="3" readonly="false"/> <EF:EFInput ename="inqu_status-0-companyName" cname="公司" colWidth="3" readonly="false"/>
<EF:EFInput ename="inqu_status-0-headName" cname="负责人" colWidth="3" readonly="false"/> <EF:EFInput ename="inqu_status-0-headName" cname="负责人" colWidth="3" readonly="false"/>
...@@ -27,19 +27,22 @@ ...@@ -27,19 +27,22 @@
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="custCode" cname="客户编码" enable="false" width="100" align="center"/> <EF:EFColumn ename="custCode" cname="客户编码" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center" required="true"> <EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center" defaultValue="1" required="true">
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/> <EF:EFCodeOption codeName="hpjx.hppz.customerType"/> <%--hpjx.hppz.companyType--%>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="custName" cname="公司简称" width="120" align="center" required="true"/> <EF:EFColumn ename="custName" cname="公司简称" align="center" width="120" required="true"/>
<EF:EFColumn ename="companyName" cname="公司全称" width="100" required="true"/> <EF:EFColumn ename="companyName" cname="公司全称" align="center" width="100" required="true"/>
<EF:EFColumn ename="headName" cname="负责人" width="100" required="true"/> <EF:EFColumn ename="taxRegisterCode" cname="统一社会信息代码" width="140"/>
<EF:EFColumn ename="phoneName" cname="负责人联系方式" width="100" required="true"/> <EF:EFColumn ename="openBankName" cname="开户银行名称" width="120"/>
<EF:EFColumn ename="accountNum" cname="银行账号" width="120"/>
<EF:EFColumn ename="headName" cname="负责人" width="100" align="center" required="true"/>
<EF:EFColumn ename="phoneName" cname="负责人联系方式" align="center" width="120" required="true"/>
<EF:EFColumn ename="address" cname="地址" width="150" align="center" required="true"/> <EF:EFColumn ename="address" cname="地址" width="150" align="center" required="true"/>
<EF:EFColumn ename="phoneName" cname="负责人联系方式" width="100" required="true"/> <EF:EFColumn ename="phoneName" cname="负责人联系方式" width="100" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" width="100" align="center" required="true" defaultValue="1"> <EF:EFComboColumn ename="status" cname="状态" width="80" align="center" required="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="updatedName" cname="更新人名称" enable="false" width="100" align="center"/> <EF:EFColumn ename="updatedName" cname="更新人名称" enable="false" width="100" align="center"/>
......
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