'feat():完成客户类型画面'

parent 2db292cb
......@@ -21,10 +21,10 @@ public class Thppz001 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private Boolean custClassify; /* 客商名称 1:供应商; 2:客户;*/
private int custClassify; /* 客商名称 1:供应商; 2:客户;*/
private String custCode = " "; /* 客商类型编码*/
private Boolean custType; /* 客商类型 1:国企;2:民营;*/
private Boolean status; /* 状态 0未启用 1启用*/
private int custType; /* 客商类型 1:国企;2:民营;*/
private int status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
......@@ -121,14 +121,14 @@ public class Thppz001 extends DaoEPBase {
* get the custClassify - 客商名称 1:供应商; 2:客户;
* @return the custClassify
*/
public Boolean getCustClassify() {
public int getCustClassify() {
return this.custClassify;
}
/**
* set the custClassify - 客商名称 1:供应商; 2:客户;
*/
public void setCustClassify(Boolean custClassify) {
public void setCustClassify(int custClassify) {
this.custClassify = custClassify;
}
......@@ -151,14 +151,14 @@ public class Thppz001 extends DaoEPBase {
* get the custType - 客商类型 1:国企;2:民营;
* @return the custType
*/
public Boolean getCustType() {
public int getCustType() {
return this.custType;
}
/**
* set the custType - 客商类型 1:国企;2:民营;
*/
public void setCustType(Boolean custType) {
public void setCustType(int custType) {
this.custType = custType;
}
......@@ -166,14 +166,14 @@ public class Thppz001 extends DaoEPBase {
* get the status - 状态 0未启用 1启用
* @return the status
*/
public Boolean getStatus() {
public int getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用
*/
public void setStatus(Boolean status) {
public void setStatus(int status) {
this.status = status;
}
......@@ -244,10 +244,10 @@ public class Thppz001 extends DaoEPBase {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setCustClassify(NumberUtils.toBoolean(StringUtils.toString(map.get("custClassify")), custClassify));
setCustClassify(NumberUtils.toint(StringUtils.toString(map.get("custClassify")), custClassify));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCode")), custCode));
setCustType(NumberUtils.toBoolean(StringUtils.toString(map.get("custType")), custType));
setStatus(NumberUtils.toBoolean(StringUtils.toString(map.get("status")), status));
setCustType(NumberUtils.toint(StringUtils.toString(map.get("custType")), custType));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
......
......@@ -5,8 +5,11 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.hp.pz.domain.Thppz001;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -45,13 +48,17 @@ public class ServiceHPPZ001 extends ServiceBase {
*/
@Override
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
Thppz001 hppz001 = new Thppz001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz001.fromMap(map);
hppz001.setCreatedBy(UserSession.getLoginName());
hppz001.setCreatedTime(sdf.format(new Date()));
this.dao.insert("HPPZ001.insert", hppz001.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
......@@ -72,13 +79,15 @@ public class ServiceHPPZ001 extends ServiceBase {
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
Thppz001 hppz001 = new Thppz001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz001.fromMap(map);
hppz001.setUpdatedBy(UserSession.getLoginName());
hppz001.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPPZ001.update", hppz001.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
......@@ -104,7 +113,7 @@ public class ServiceHPPZ001 extends ServiceBase {
Map<?, ?> map = eiBlock.getRow(i);
hppz001.fromMap(map);
this.dao.delete("Thppz001.delete", hppz001.toMap());
this.dao.delete("HPPZ001.delete", hppz001.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
......
......@@ -18,12 +18,18 @@
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz001
WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE LIKE CONCAT('%',CONCAT( #custType#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custClassify">
CUST_CLASSIFY = #custClassify#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isEmpty property="orderBy">
ID asc
CREATED_TIME desc
</isEmpty>
</dynamic>
......@@ -70,7 +76,9 @@
-->
<insert id="insert">
INSERT INTO hpjx.t_hppz001 (ID,
INSERT INTO
hpjx.t_hppz001 (
ID,
COMPANY_CODE, <!-- 企业编码 预留 -->
CUST_CLASSIFY, <!-- 客商名称 1:供应商; 2:客户; -->
CUST_CODE, <!-- 客商类型编码 -->
......
......@@ -4,22 +4,12 @@ $(function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [20, 50, 70, 100],
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
{
field:"money",
valueType:"N",//小计设置
type:"N",
},
{
field:"assessmentAmount",
valueType:"N",//小计设置
type:"N",
}
]
}
});
\ No newline at end of file
......@@ -5,105 +5,47 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="设备索赔">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="code" cname="代码:" row="0"/>
<EF:EFSelect cname="被索赔班组:" optionLabel="全部" blockId="inqu_status" ename="claimedGroupNo" row="0">
<EF:EFOption label="倒罐" value="TPD"/>
<EF:EFOption label="-------" value="-"/>
<EF:EFOption label="脱硫" value="KR"/>
<EF:EFOption label="-------" value="-"/>
<EF:EFOption label="转炉汇总" value="LF"/>
<EF:EFOption label="转炉1#" value="LF1#"/>
<EF:EFOption label="转炉2#" value="LF2#"/>
<EF:EFOption label="转炉3#" value="LF3#"/>
<EF:EFOption label="-------" value="-"/>
<EF:EFOption label="钢包汇总" value="BOF"/>
<EF:EFOption label="钢包1#" value="BOF1#"/>
<EF:EFOption label="钢包2#" value="BOF2#"/>
<EF:EFOption label="钢包3#" value="BOF3#"/>
<EF:EFOption label="-------" value="-"/>
<EF:EFOption label="真空汇总" value="RH"/>
<EF:EFOption label="真空1#" value="RH1#"/>
<EF:EFOption label="真空2#" value="RH2#"/>
<EF:EFInput blockId="inqu_status" ename="custType" cname="客商类型:" row="0"/>
<EF:EFSelect cname="分类:" optionLabel="全部" blockId="inqu_status" ename="custClassify" row="0">
<EF:EFOption label="供应商" value="1"/>
<EF:EFOption label="客户" value="2"/>
</EF:EFSelect>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
</EF:EFSelect>
</div>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" >
<EF:EFColumn ename="id" cname="主键" hidden="true" />
<EF:EFColumn ename="code" cname="代码" />
<EF:EFComboColumn align="center" ename="claimedGroupNo" cname="被索赔班组" width="120" readonly="true">
<EF:EFOption label="倒罐-甲" value="TPD-1"/>
<EF:EFOption label="倒罐-乙" value="TPD-2"/>
<EF:EFOption label="倒罐-丙" value="TPD-3"/>
<EF:EFOption label="倒罐-丁" value="TPD-4"/>
<EF:EFOption label="--------" value="-"/>
<EF:EFOption label="脱硫-甲" value="KR-1"/>
<EF:EFOption label="脱硫-乙" value="KR-2"/>
<EF:EFOption label="脱硫-丙" value="KR-3"/>
<EF:EFOption label="脱硫-丁" value="KR-4"/>
<EF:EFOption label="--------" value="-"/>
<EF:EFOption label="废钢-甲" value="SCR-1"/>
<EF:EFOption label="废钢-乙" value="SCR-2"/>
<EF:EFOption label="废钢-丙" value="SCR-3"/>
<EF:EFOption label="废钢-丁" value="SCR-4"/>
<EF:EFOption label="--------" value="-"/>
<EF:EFOption label="转炉1#-甲" value="LF1#-1"/>
<EF:EFOption label="转炉1#-乙" value="LF1#-2"/>
<EF:EFOption label="转炉1#-丙" value="LF1#-3"/>
<EF:EFOption label="转炉1#-丁" value="LF1#-4"/>
<EF:EFOption label="--------" value="-"/>
<EF:EFOption label="转炉2#-甲" value="LF2#-1"/>
<EF:EFOption label="转炉2#-乙" value="LF2#-2"/>
<EF:EFOption label="转炉2#-丙" value="LF2#-3"/>
<EF:EFOption label="转炉2#-丁" value="LF2#-4"/>
<EF:EFOption label="--------" value="-"/>
<EF:EFOption label="转炉3#-甲" value="LF3#-1"/>
<EF:EFOption label="转炉3#-乙" value="LF3#-2"/>
<EF:EFOption label="转炉3#-丙" value="LF3#-3"/>
<EF:EFOption label="转炉3#-丁" value="LF3#-4"/>
<EF:EFOption label="--------" value="-"/>
<EF:EFOption label="钢包1#-甲" value="BOF1#-1"/>
<EF:EFOption label="钢包1#-乙" value="BOF1#-2"/>
<EF:EFOption label="钢包1#-丙" value="BOF1#-3"/>
<EF:EFOption label="钢包1#-丁" value="BOF1#-4"/>
<EF:EFOption label="--------" value="-"/>
<EF:EFOption label="钢包2#-甲" value="BOF2#-1"/>
<EF:EFOption label="钢包2#-乙" value="BOF2#-2"/>
<EF:EFOption label="钢包2#-丙" value="BOF2#-3"/>
<EF:EFOption label="钢包2#-丁" value="BOF2#-4"/>
<EF:EFOption label="--------" value="-"/>
<EF:EFOption label="钢包3#-甲" value="BOF3#-1"/>
<EF:EFOption label="钢包3#-乙" value="BOF3#-2"/>
<EF:EFOption label="钢包3#-丙" value="BOF3#-3"/>
<EF:EFOption label="钢包3#-丁" value="BOF3#-4"/>
<EF:EFOption label="--------" value="-"/>
<EF:EFOption label="真空1#-甲" value="RH1#-1"/>
<EF:EFOption label="真空1#-乙" value="RH1#-2"/>
<EF:EFOption label="真空1#-丙" value="RH1#-3"/>
<EF:EFOption label="真空1#-丁" value="RH1#-4"/>
<EF:EFOption label="--------" value="-"/>
<EF:EFOption label="真空2#-甲" value="RH2#-1"/>
<EF:EFOption label="真空2#-乙" value="RH2#-2"/>
<EF:EFOption label="真空2#-丙" value="RH2#-3"/>
<EF:EFOption label="真空2#-丁" value="RH2#-4"/>
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn align="center" ename="custClassify" cname="分类">
<EF:EFOption label="供应商" value="1"/>
<EF:EFOption label="客户" value="2"/>
</EF:EFComboColumn>
<EF:EFColumn ename="money" cname="金额" sumType="page" data-rules="number"/>
<EF:EFColumn ename="assessmentAmount" cname="考核金额" data-rules="number" sumType="page" required="true"/>
<EF:EFColumn ename="reasonAssessment" cname="考核原因" editType="textarea" width="300" required="true"/>
<EF:EFColumn ename="creator" cname="创建人" enable="false" width="150"/>
<EF:EFColumn ename="creationTime" cname="创建时间" enable="false" width="150"/>
<EF:EFColumn ename="custCode" cname="类型编码"/>
<EF:EFComboColumn align="center" ename="custType" cname="客商类型">
<EF:EFOption label="民营" value="1"/>
<EF:EFOption label="国营" value="2"/>
</EF:EFComboColumn>
<EF:EFComboColumn align="center" ename="status" cname="状态">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
</EF:EFComboColumn>
<EF:EFColumn ename="createdBy" enable="false" cname="创建时间"/>
<EF:EFColumn ename="createdTime" enable="false" cname="创建人"/>
<EF:EFColumn ename="updatedBy" enable="false" cname="修改时间"/>
<EF:EFColumn ename="updatedTime" enable="false" cname="修改人"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment