Commit cd910d02 by 宋祥

1.客户回访、客户投诉、客户关怀功能开发

parent 6cf9f7f8
...@@ -99,6 +99,10 @@ public class HPConstant { ...@@ -99,6 +99,10 @@ public class HPConstant {
public static final String AFTER_SALE_NO = "AFTER_SALE_NO"; public static final String AFTER_SALE_NO = "AFTER_SALE_NO";
// 客户关怀单号 // 客户关怀单号
public static final String CARE_NO = "CARE_NO"; public static final String CARE_NO = "CARE_NO";
// 回访单号
public static final String FOL_NO = "FOL_NO";
// 投诉单号
public static final String COMPLAINT_NO = "COMPLAINT_NO";
} }
/** /**
......
...@@ -30,4 +30,27 @@ public class HpFwSqlConstant { ...@@ -30,4 +30,27 @@ public class HpFwSqlConstant {
public static final String UPDATE_DEAL = "HPFW002.updateDeal"; public static final String UPDATE_DEAL = "HPFW002.updateDeal";
} }
/**
* @author:songx
* @date:2024/8/29,15:54
*/
public static class HpFw003 {
// 锁
public static final String LOCK = "HPFW003.lock";
// 修改
public static final String UPDATE_DEAL = "HPFW003.updateDeal";
}
/**
* @author:songx
* @date:2024/8/29,15:54
*/
public static class HpFw007 {
// 锁
public static final String LOCK = "HPFW007.lock";
// 修改
public static final String UPDATE_DEAL = "HPFW007.updateDeal";
}
} }
...@@ -146,7 +146,7 @@ public class ServiceHPFW001 extends ServiceBase { ...@@ -146,7 +146,7 @@ public class ServiceHPFW001 extends ServiceBase {
// db数据 // db数据
Map<String, HPFW001> dbFw001Map = HpFwUtils.HpFw001.lockAndGet(fFw001s); Map<String, HPFW001> dbFw001Map = HpFwUtils.HpFw001.lockAndGet(fFw001s);
// 数据校验 // 数据校验
this.dealCheckData(fFw001s, dbFw001Map); this.checkDealData(fFw001s, dbFw001Map);
// 保存数据 // 保存数据
this.dealData(fFw001s, content); this.dealData(fFw001s, content);
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
...@@ -164,7 +164,7 @@ public class ServiceHPFW001 extends ServiceBase { ...@@ -164,7 +164,7 @@ public class ServiceHPFW001 extends ServiceBase {
* @param fFw001s * @param fFw001s
* @param dbFw001Map * @param dbFw001Map
*/ */
private void dealCheckData(List<HPFW001> fFw001s, Map<String, HPFW001> dbFw001Map) { private void checkDealData(List<HPFW001> fFw001s, Map<String, HPFW001> dbFw001Map) {
for (HPFW001 fFw001 : fFw001s) { for (HPFW001 fFw001 : fFw001s) {
String afterSaleNo = fFw001.getAfterSaleNo(); String afterSaleNo = fFw001.getAfterSaleNo();
HPFW001 dbFw001 = dbFw001Map.get(afterSaleNo); HPFW001 dbFw001 = dbFw001Map.get(afterSaleNo);
...@@ -199,6 +199,6 @@ public class ServiceHPFW001 extends ServiceBase { ...@@ -199,6 +199,6 @@ public class ServiceHPFW001 extends ServiceBase {
AssertUtils.isNotEquals(dbFw001.getDeleteFlag(), CommonConstant.YesNo.NO_0, AssertUtils.isNotEquals(dbFw001.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("售后服务单【%s】不是\"未删除\"状态,不允许操作", afterSaleNo)); String.format("售后服务单【%s】不是\"未删除\"状态,不允许操作", afterSaleNo));
AssertUtils.isNotEquals(dbFw001.getStatus(), HPConstant.dealStatus.S0, AssertUtils.isNotEquals(dbFw001.getStatus(), HPConstant.dealStatus.S0,
String.format("售后服务单【%s】不是\"待回访\"状态,不允许操作", afterSaleNo)); String.format("售后服务单【%s】不是\"待处理\"状态,不允许操作", afterSaleNo));
} }
} }
...@@ -5,7 +5,6 @@ import com.baosight.hpjx.core.constant.CommonConstant; ...@@ -5,7 +5,6 @@ import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.fw.constant.HpFwConstant;
import com.baosight.hpjx.hp.fw.constant.HpFwSqlConstant; import com.baosight.hpjx.hp.fw.constant.HpFwSqlConstant;
import com.baosight.hpjx.hp.fw.domain.HPFW002; import com.baosight.hpjx.hp.fw.domain.HPFW002;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils; import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
...@@ -98,9 +97,7 @@ public class ServiceHPFW002 extends ServiceBase { ...@@ -98,9 +97,7 @@ public class ServiceHPFW002 extends ServiceBase {
for (HPFW002 fFw002 : fFw002s) { for (HPFW002 fFw002 : fFw002s) {
String careNo = fFw002.getCareNo(); String careNo = fFw002.getCareNo();
HPFW002 dbFw002 = dbFw002Map.get(careNo); HPFW002 dbFw002 = dbFw002Map.get(careNo);
AssertUtils.isNull(dbFw002, String.format("客户关怀单[%s]不存在", careNo)); this.checkData(careNo, dbFw002);
AssertUtils.isNotEquals(HPConstant.dealStatus.S0, dbFw002.getStatus(),
String.format("客户关怀单[%s]状态不是\"待处理\",不允许操作", careNo));
} }
} }
...@@ -117,21 +114,41 @@ public class ServiceHPFW002 extends ServiceBase { ...@@ -117,21 +114,41 @@ public class ServiceHPFW002 extends ServiceBase {
} }
/** /**
* 检查状态
*
* @param inInfo
* @return
*/
public EiInfo checkStatus(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String careNo = MapUtils.getString(queryMap, HPFW002.FIELD_CARE_NO);
HPFW002 dbFw002 = HpFwUtils.HpFw002.lockAndGet(careNo);
this.checkData(careNo, dbFw002);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
/**
* 处理 * 处理
* *
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "客户回访", operType = "审核") @OperationLogAnnotation(operModul = "客户回访", operType = "审核")
public EiInfo check(EiInfo inInfo) { public EiInfo deal(EiInfo inInfo) {
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String content = MapUtils.getString(queryMap, "content");
List<HPFW002> fFw002s = MapUtils.toDaoEPBases(inInfo, HPFW002.class); List<HPFW002> fFw002s = MapUtils.toDaoEPBases(inInfo, HPFW002.class);
// db数据 // db数据
Map<String, HPFW002> dbFw002Map = HpFwUtils.HpFw002.lockAndGet(fFw002s); Map<String, HPFW002> dbFw002Map = HpFwUtils.HpFw002.lockAndGet(fFw002s);
// 数据校验 // 数据校验
this.checkCheckData(fFw002s, dbFw002Map); this.checkDealData(fFw002s, dbFw002Map);
// 保存数据 // 保存数据
this.checkData(fFw002s); this.dealData(fFw002s, content);
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fFw002s.size() + "]条数据处理成功!"); inInfo.setMsg("操作成功!本次对[" + fFw002s.size() + "]条数据处理成功!");
...@@ -147,13 +164,11 @@ public class ServiceHPFW002 extends ServiceBase { ...@@ -147,13 +164,11 @@ public class ServiceHPFW002 extends ServiceBase {
* @param fFw002s * @param fFw002s
* @param dbFw002Map * @param dbFw002Map
*/ */
private void checkCheckData(List<HPFW002> fFw002s, Map<String, HPFW002> dbFw002Map) { private void checkDealData(List<HPFW002> fFw002s, Map<String, HPFW002> dbFw002Map) {
for (HPFW002 fFw002 : fFw002s) { for (HPFW002 fFw002 : fFw002s) {
String careNo = fFw002.getCareNo(); String careNo = fFw002.getCareNo();
HPFW002 dbFw002 = dbFw002Map.get(careNo); HPFW002 dbFw002 = dbFw002Map.get(careNo);
AssertUtils.isNull(dbFw002, String.format("客户关怀单[%s]不存在", careNo)); this.checkData(careNo, dbFw002);
AssertUtils.isNotEquals(HPConstant.dealStatus.S0, dbFw002.getStatus(),
String.format("客户关怀单[%s]状态不是\"待处理\",不允许操作", careNo));
} }
} }
...@@ -161,14 +176,29 @@ public class ServiceHPFW002 extends ServiceBase { ...@@ -161,14 +176,29 @@ public class ServiceHPFW002 extends ServiceBase {
* 数据保存 * 数据保存
* *
* @param fFw002s * @param fFw002s
* @param content
*/ */
private void checkData(List<HPFW002> fFw002s) { private void dealData(List<HPFW002> fFw002s, String content) {
for (HPFW002 fFw002 : fFw002s) { for (HPFW002 fFw002 : fFw002s) {
fFw002.setStatus(HPConstant.dealStatus.S1); fFw002.setStatus(HPConstant.dealStatus.S1);
fFw002.setDealUserId(UserSessionUtils.getLoginName()); fFw002.setDealUserId(UserSessionUtils.getLoginName());
fFw002.setDealUserName(UserSessionUtils.getLoginCName()); fFw002.setDealUserName(UserSessionUtils.getLoginCName());
fFw002.setDealContent(content);
DaoUtils.update(HpFwSqlConstant.HpFw002.UPDATE_DEAL, fFw002.toMap()); DaoUtils.update(HpFwSqlConstant.HpFw002.UPDATE_DEAL, fFw002.toMap());
} }
} }
/**
* 数据校验
*
* @param careNo
* @param dbFw002
*/
private void checkData(String careNo, HPFW002 dbFw002) {
AssertUtils.isNull(dbFw002, String.format("客户关怀单[%s]不存在", careNo));
AssertUtils.isNotEquals(dbFw002.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("客户关怀单【%s】不是\"未删除\"状态,不允许操作", careNo));
AssertUtils.isNotEquals(dbFw002.getStatus(), HPConstant.dealStatus.S0,
String.format("客户关怀单【%s】不是\"待处理\"状态,不允许操作", careNo));
}
} }
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.utils.Iplat4jUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.dm.domain.HPDM099;
import com.baosight.hpjx.hp.fw.domain.HPFW001;
import com.baosight.hpjx.hp.fw.domain.HPFW002;
import com.baosight.hpjx.hp.fw.tools.HpFwTools;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* 附件清单
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPFW002A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
this.setDetailInfo(inInfo);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPDM099().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPDM099.QUERY, new HPDM099());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除
*
* @param inInfo
* @return
*/
public EiInfo remove(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String bizId = MapUtils.getString(queryMap, HPDM099.FIELD_BIZ_ID);
HPFW002 dbFw002 = HpFwUtils.HpFw002.lockAndGet(bizId);
this.checkData(bizId, dbFw002);
List<HPDM099> fDm099s = MapUtils.toDaoEPBases(inInfo, HPDM099.class);
for (HPDM099 fDm099 : fDm099s) {
DaoUtils.update(HPDM099.DELETE, fDm099);
if (!fDm099.getDocId().isEmpty()) {
Iplat4jUtils.deleteFileByDocId(fDm099.getDocId());
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fDm099s.size() + "]条数据删除成功!");
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param careNo
* @param dbFw002
*/
private void checkData(String careNo, HPFW002 dbFw002) {
AssertUtils.isNull(dbFw002, String.format("客户关怀单[%s]不存在", careNo));
AssertUtils.isNotEquals(dbFw002.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("客户关怀单【%s】不是\"未删除\"状态,不允许操作", careNo));
AssertUtils.isNotEquals(dbFw002.getStatus(), HPConstant.dealStatus.S0,
String.format("客户关怀单【%s】不是\"待回访\"状态,不允许操作", careNo));
}
/**
* 设置信息
*
* @param inInfo
*/
public void setDetailInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String bizId = MapUtils.getString(queryRow, HPDM099.FIELD_BIZ_ID);
if (bizId == null) {
return;
}
EiBlock block = new EiBlock(CommonConstant.Field.DETAIL);
block.addRow(HpFwTools.HpFw002.get(bizId));
block.addBlockMeta(new HPFW002().eiMetadata);
inInfo.setBlock(block);
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.fw.constant.HpFwSqlConstant;
import com.baosight.hpjx.hp.fw.domain.HPFW003;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.List;
import java.util.Map;
/**
* 客户投诉
*
* @author:songx
* @date:2024/9/24,17:47
*/
public class ServiceHPFW003 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPFW003().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HPFW003.FIELD_COMPLAINT_DATE,
DateUtils.formatShort(queryMap.get(HPFW003.FIELD_COMPLAINT_DATE)));
inInfo = super.query(inInfo, HPFW003.QUERY, new HPFW003());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
public EiInfo remove(EiInfo inInfo) {
try {
List<HPFW003> fFw003s = MapUtils.toDaoEPBases(inInfo, HPFW003.class);
// db数据
Map<String, HPFW003> dbFw003Map = HpFwUtils.HpFw003.lockAndGet(fFw003s);
// 数据校验
this.checkRemoveData(fFw003s, dbFw003Map);
// 保存数据
this.removeData(fFw003s);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fFw003s.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fFw003s
* @param dbFw003Map
*/
private void checkRemoveData(List<HPFW003> fFw003s, Map<String, HPFW003> dbFw003Map) {
for (HPFW003 fFw003 : fFw003s) {
String complaintNo = fFw003.getComplaintNo();
HPFW003 dbFw003 = dbFw003Map.get(complaintNo);
this.checkData(complaintNo, dbFw003);
}
}
/**
* 数据保存
*
* @param fFw003s
*/
private void removeData(List<HPFW003> fFw003s) {
for (HPFW003 fFw003 : fFw003s) {
fFw003.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPFW003.DELETE, fFw003.toMap());
}
}
/**
* 检查状态
*
* @param inInfo
* @return
*/
public EiInfo checkStatus(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String complaintNo = MapUtils.getString(queryMap, HPFW003.FIELD_COMPLAINT_NO);
HPFW003 dbFw003 = HpFwUtils.HpFw003.lockAndGet(complaintNo);
this.checkData(complaintNo, dbFw003);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
/**
* 处理
*
* @param inInfo
* @return
*/
public EiInfo deal(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String content = MapUtils.getString(queryMap, "content");
List<HPFW003> fFw003s = MapUtils.toDaoEPBases(inInfo, HPFW003.class);
// db数据
Map<String, HPFW003> dbFw003Map = HpFwUtils.HpFw003.lockAndGet(fFw003s);
// 数据校验
this.checkDealData(fFw003s, dbFw003Map);
// 保存数据
this.dealData(fFw003s, content);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fFw003s.size() + "]条数据处理成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "处理失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fFw003s
* @param dbFw003Map
*/
private void checkDealData(List<HPFW003> fFw003s, Map<String, HPFW003> dbFw003Map) {
for (HPFW003 fFw003 : fFw003s) {
String complaintNo = fFw003.getComplaintNo();
HPFW003 dbFw003 = dbFw003Map.get(complaintNo);
this.checkData(complaintNo, dbFw003);
}
}
/**
* 数据保存
*
* @param fFw003s
* @param content
*/
private void dealData(List<HPFW003> fFw003s, String content) {
for (HPFW003 fFw003 : fFw003s) {
fFw003.setStatus(HPConstant.dealStatus.S1);
fFw003.setDealUserId(UserSessionUtils.getLoginName());
fFw003.setDealUserName(UserSessionUtils.getLoginCName());
fFw003.setDealContent(content);
DaoUtils.update(HpFwSqlConstant.HpFw003.UPDATE_DEAL, fFw003.toMap());
}
}
/**
* 数据校验
*
* @param careNo
* @param dbFw003
*/
private void checkData(String careNo, HPFW003 dbFw003) {
AssertUtils.isNull(dbFw003, String.format("投诉单[%s]不存在", careNo));
AssertUtils.isNotEquals(dbFw003.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("投诉单【%s】不是\"未删除\"状态,不允许操作", careNo));
AssertUtils.isNotEquals(dbFw003.getStatus(), HPConstant.dealStatus.S0,
String.format("投诉单【%s】不是\"待处理\"状态,不允许操作", careNo));
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.utils.Iplat4jUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.dm.domain.HPDM099;
import com.baosight.hpjx.hp.fw.domain.HPFW003;
import com.baosight.hpjx.hp.fw.tools.HpFwTools;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* 附件清单
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPFW003A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
this.setDetailInfo(inInfo);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPDM099().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPDM099.QUERY, new HPDM099());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除
*
* @param inInfo
* @return
*/
public EiInfo remove(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String bizId = MapUtils.getString(queryMap, HPDM099.FIELD_BIZ_ID);
HPFW003 dbFw003 = HpFwUtils.HpFw003.lockAndGet(bizId);
this.checkData(bizId, dbFw003);
List<HPDM099> fDm099s = MapUtils.toDaoEPBases(inInfo, HPDM099.class);
for (HPDM099 fDm099 : fDm099s) {
DaoUtils.update(HPDM099.DELETE, fDm099);
if (!fDm099.getDocId().isEmpty()) {
Iplat4jUtils.deleteFileByDocId(fDm099.getDocId());
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fDm099s.size() + "]条数据删除成功!");
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param complaintNo
* @param dbFw003
*/
private void checkData(String complaintNo, HPFW003 dbFw003) {
AssertUtils.isNull(dbFw003, String.format("投诉单[%s]不存在", complaintNo));
AssertUtils.isNotEquals(dbFw003.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("投诉单【%s】不是\"未删除\"状态,不允许操作", complaintNo));
AssertUtils.isNotEquals(dbFw003.getStatus(), HPConstant.dealStatus.S0,
String.format("投诉单【%s】不是\"未处理\"状态,不允许操作", complaintNo));
}
/**
* 设置信息
*
* @param inInfo
*/
public void setDetailInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String bizId = MapUtils.getString(queryRow, HPDM099.FIELD_BIZ_ID);
if (bizId == null) {
return;
}
EiBlock block = new EiBlock(CommonConstant.Field.DETAIL);
block.addRow(HpFwTools.HpFw003.get(bizId));
block.addBlockMeta(new HPFW003().eiMetadata);
inInfo.setBlock(block);
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.fw.domain.HPFW003;
import com.baosight.hpjx.hp.fw.tools.HpFwTools;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.Map;
/**
* 新增修改
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPFW003B extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
this.setBaseInfo(inInfo);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
HPFW003 fFw003 = MapUtils.toDaoEPBase(inInfo, HPFW003.class);
fFw003.setComplaintDate(DateUtils.formatShort(fFw003.getComplaintDate()));
fFw003.setLastDate(DateUtils.formatShort(fFw003.getLastDate()));
if (StringUtils.isBlank(fFw003.getComplaintNo())) {
this.add(fFw003);
} else {
this.modify(fFw003);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增
*
* @param fFw003
*/
private void add(HPFW003 fFw003) {
fFw003.setComplaintNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.COMPLAINT_NO));
fFw003.setStatus(HPConstant.dealStatus.S0);
fFw003.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPFW003.INSERT, fFw003);
}
/**
* 修改数据
*
* @param fFw003
*/
private void modify(HPFW003 fFw003) {
HPFW003 dbFw003 = HpFwUtils.HpFw003.lockAndGet(fFw003);
this.checkData(fFw003, dbFw003);
DaoUtils.update(HPFW003.UPDATE, fFw003);
}
/**
* 设置信息
*
* @param inInfo
*/
public void setBaseInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String complaintNo = MapUtils.getString(queryRow, HPFW003.FIELD_COMPLAINT_NO);
if (StringUtils.isBlank(complaintNo)) {
return;
}
EiBlock resultBlock = new EiBlock(EiConstant.resultBlock);
resultBlock.addRow(HpFwTools.HpFw003.get(complaintNo));
resultBlock.addBlockMeta(new HPFW003().eiMetadata);
inInfo.setBlock(resultBlock);
}
/**
* 数据校验
*
* @param fFw003
* @param dbFw002
*/
private void checkData(HPFW003 fFw003, HPFW003 dbFw002) {
String complaintNo = fFw003.getComplaintNo();
AssertUtils.isNull(dbFw002, String.format("投诉单【%s】不存在", complaintNo));
AssertUtils.isNotEquals(dbFw002.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("投诉单【%s】不是\"未删除\"状态,不允许操作", complaintNo));
AssertUtils.isNotEquals(dbFw002.getStatus(), HPConstant.dealStatus.S0,
String.format("投诉单【%s】不是\"未处理\"状态,不允许操作", complaintNo));
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.fw.constant.HpFwSqlConstant;
import com.baosight.hpjx.hp.fw.domain.HPFW007;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.List;
import java.util.Map;
/**
* 客户回访
*
* @author:songx
* @date:2024/9/24,17:47
*/
public class ServiceHPFW007 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "售后维修", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPFW007().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*/
@Override
@OperationLogAnnotation(operModul = "售后维修", operType = "查询")
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HPFW007.FIELD_FOL_DATE, DateUtils.formatShort(queryMap.get(HPFW007.FIELD_FOL_DATE)));
inInfo = super.query(inInfo, HPFW007.QUERY, new HPFW007());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "删除")
public EiInfo remove(EiInfo inInfo) {
try {
List<HPFW007> fFw007s = MapUtils.toDaoEPBases(inInfo, HPFW007.class);
// db数据
Map<String, HPFW007> dbFw007Map = HpFwUtils.HpFw007.lockAndGet(fFw007s);
// 数据校验
this.checkRemoveData(fFw007s, dbFw007Map);
// 保存数据
this.removeData(fFw007s);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fFw007s.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fFw007s
* @param dbFw007Map
*/
private void checkRemoveData(List<HPFW007> fFw007s, Map<String, HPFW007> dbFw007Map) {
for (HPFW007 fFw007 : fFw007s) {
String folNo = fFw007.getFolNo();
HPFW007 dbFw007 = dbFw007Map.get(folNo);
this.checkData(folNo, dbFw007);
}
}
/**
* 数据保存
*
* @param fFw007s
*/
private void removeData(List<HPFW007> fFw007s) {
for (HPFW007 fFw007 : fFw007s) {
fFw007.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPFW007.DELETE, fFw007.toMap());
}
}
/**
* 检查状态
*
* @param inInfo
* @return
*/
public EiInfo checkStatus(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String folNo = MapUtils.getString(queryMap, HPFW007.FIELD_FOL_NO);
HPFW007 dbFw007 = HpFwUtils.HpFw007.lockAndGet(folNo);
this.checkData(folNo, dbFw007);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
/**
* 处理
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "审核")
public EiInfo deal(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String content = MapUtils.getString(queryMap, "content");
List<HPFW007> fFw007s = MapUtils.toDaoEPBases(inInfo, HPFW007.class);
// db数据
Map<String, HPFW007> dbFw007Map = HpFwUtils.HpFw007.lockAndGet(fFw007s);
// 数据校验
this.checkDealData(fFw007s, dbFw007Map);
// 保存数据
this.dealData(fFw007s, content);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fFw007s.size() + "]条数据处理成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "处理失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fFw007s
* @param dbFw007Map
*/
private void checkDealData(List<HPFW007> fFw007s, Map<String, HPFW007> dbFw007Map) {
for (HPFW007 fFw007 : fFw007s) {
String folNo = fFw007.getFolNo();
HPFW007 dbFw007 = dbFw007Map.get(folNo);
this.checkData(folNo, dbFw007);
}
}
/**
* 数据保存
*
* @param fFw007s
* @param content
*/
private void dealData(List<HPFW007> fFw007s, String content) {
for (HPFW007 fFw007 : fFw007s) {
fFw007.setStatus(HPConstant.dealStatus.S1);
fFw007.setDealUserId(UserSessionUtils.getLoginName());
fFw007.setDealUserName(UserSessionUtils.getLoginCName());
fFw007.setDealContent(content);
DaoUtils.update(HpFwSqlConstant.HpFw007.UPDATE_DEAL, fFw007.toMap());
}
}
/**
* 数据校验
*
* @param folNo
* @param dbFw007
*/
private void checkData(String folNo, HPFW007 dbFw007) {
AssertUtils.isNull(dbFw007, String.format("回访单[%s]不存在", folNo));
AssertUtils.isNotEquals(dbFw007.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("回访单【%s】不是\"未删除\"状态,不允许操作", folNo));
AssertUtils.isNotEquals(dbFw007.getStatus(), HPConstant.dealStatus.S0,
String.format("回访单【%s】不是\"待回访\"状态,不允许操作", folNo));
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.utils.Iplat4jUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.dm.domain.HPDM099;
import com.baosight.hpjx.hp.fw.domain.HPFW007;
import com.baosight.hpjx.hp.fw.tools.HpFwTools;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* 附件清单
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPFW007A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
this.setDetailInfo(inInfo);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPDM099().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPDM099.QUERY, new HPDM099());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除
*
* @param inInfo
* @return
*/
public EiInfo remove(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String bizId = MapUtils.getString(queryMap, HPDM099.FIELD_BIZ_ID);
HPFW007 dbFw007 = HpFwUtils.HpFw007.lockAndGet(bizId);
this.checkData(bizId, dbFw007);
List<HPDM099> fDm099s = MapUtils.toDaoEPBases(inInfo, HPDM099.class);
for (HPDM099 fDm099 : fDm099s) {
DaoUtils.update(HPDM099.DELETE, fDm099);
if (!fDm099.getDocId().isEmpty()) {
Iplat4jUtils.deleteFileByDocId(fDm099.getDocId());
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fDm099s.size() + "]条数据删除成功!");
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param folNo
* @param dbFw007
*/
private void checkData(String folNo, HPFW007 dbFw007) {
AssertUtils.isNull(dbFw007, String.format("回访单[%s]不存在", folNo));
AssertUtils.isNotEquals(dbFw007.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("回访单【%s】不是\"未删除\"状态,不允许操作", folNo));
AssertUtils.isNotEquals(dbFw007.getStatus(), HPConstant.dealStatus.S0,
String.format("回访单【%s】不是\"待回访\"状态,不允许操作", folNo));
}
/**
* 设置信息
*
* @param inInfo
*/
public void setDetailInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String bizId = MapUtils.getString(queryRow, HPDM099.FIELD_BIZ_ID);
if (bizId == null) {
return;
}
EiBlock block = new EiBlock(CommonConstant.Field.DETAIL);
block.addRow(HpFwTools.HpFw007.get(bizId));
block.addBlockMeta(new HPFW007().eiMetadata);
inInfo.setBlock(block);
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.fw.domain.HPFW007;
import com.baosight.hpjx.hp.fw.tools.HpFwTools;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.Map;
/**
* 新增修改
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPFW007B extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SALE_NO_BLOCK_ID), null);
this.setBaseInfo(inInfo);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
HPFW007 fFw007 = MapUtils.toDaoEPBase(inInfo, HPFW007.class);
fFw007.setFolDate(DateUtils.formatShort(fFw007.getFolDate()));
if (StringUtils.isBlank(fFw007.getFolNo())) {
this.add(fFw007);
} else {
this.modify(fFw007);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增
*
* @param fFw007
*/
private void add(HPFW007 fFw007) {
fFw007.setFolNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.FOL_NO));
fFw007.setStatus(HPConstant.dealStatus.S0);
fFw007.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPFW007.INSERT, fFw007);
}
/**
* 修改数据
*
* @param fFw007
*/
private void modify(HPFW007 fFw007) {
HPFW007 dbFw007 = HpFwUtils.HpFw007.lockAndGet(fFw007);
this.checkData(fFw007, dbFw007);
DaoUtils.update(HPFW007.UPDATE, fFw007);
}
/**
* 设置信息
*
* @param inInfo
*/
public void setBaseInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String folNo = MapUtils.getString(queryRow, HPFW007.FIELD_FOL_NO);
if (StringUtils.isBlank(folNo)) {
return;
}
EiBlock resultBlock = new EiBlock(EiConstant.resultBlock);
resultBlock.addRow(HpFwTools.HpFw007.get(folNo));
resultBlock.addBlockMeta(new HPFW007().eiMetadata);
inInfo.setBlock(resultBlock);
}
/**
* 数据校验
*
* @param fFw007
* @param dbFw002
*/
private void checkData(HPFW007 fFw007, HPFW007 dbFw002) {
String folNo = fFw007.getFolNo();
AssertUtils.isNull(dbFw002, String.format("回访单【%s】不存在", folNo));
AssertUtils.isNotEquals(dbFw002.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("回访单【%s】不是\"未删除\"状态,不允许操作", folNo));
AssertUtils.isNotEquals(dbFw002.getStatus(), HPConstant.dealStatus.S0,
String.format("回访单【%s】不是\"待回访\"状态,不允许操作", folNo));
}
}
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
AFTER_SALE_NO as "afterSaleNo", <!-- 售后单号 --> AFTER_SALE_NO as "afterSaleNo", <!-- 售后单号 -->
AFTER_SALE_TYPE as "afterSaleType", <!-- 售后方式 --> AFTER_SALE_TYPE as "afterSaleType", <!-- 售后方式 -->
URGENCY as "urgency", <!-- 紧急程度 --> URGENCY as "urgency", <!-- 紧急程度 -->
AFTER_SALE_CONTENT as "afterSaleContent", <!-- 售后内容 -->
CUSTOM_ID as "customId", <!-- 客户ID --> CUSTOM_ID as "customId", <!-- 客户ID -->
CUSTOM_NAME as "customName", <!-- 客户名称 --> CUSTOM_NAME as "customName", <!-- 客户名称 -->
DEAL_USER_ID as "dealUserId", <!-- 处理人ID --> DEAL_USER_ID as "dealUserId", <!-- 处理人ID -->
...@@ -133,14 +134,15 @@ ...@@ -133,14 +134,15 @@
AFTER_SALE_NO, <!-- 售后单号 --> AFTER_SALE_NO, <!-- 售后单号 -->
AFTER_SALE_TYPE, <!-- 售后方式 --> AFTER_SALE_TYPE, <!-- 售后方式 -->
URGENCY, <!-- 紧急程度 --> URGENCY, <!-- 紧急程度 -->
AFTER_SALE_CONTENT, <!-- 售后内容 -->
CUSTOM_ID, <!-- 客户ID --> CUSTOM_ID, <!-- 客户ID -->
CUSTOM_NAME, <!-- 客户名称 --> CUSTOM_NAME, <!-- 客户名称 -->
DEAL_USER_ID, <!-- 处理人ID --> DEAL_USER_ID, <!-- 处理人ID -->
DEAL_USER_NAME <!-- 处理人名称 --> DEAL_USER_NAME <!-- 处理人名称 -->
) VALUES ( ) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #status#, #afterSaleDate#, #afterSaleNo#, #afterSaleType#, #urgency#, #customId#, #updatedTime#, #deleteFlag#, #status#, #afterSaleDate#, #afterSaleNo#, #afterSaleType#, #urgency#,
#customName#, #dealUserId#, #dealUserName#) #afterSaleContent#, #customId#, #customName#, #dealUserId#, #dealUserName#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -153,6 +155,7 @@ ...@@ -153,6 +155,7 @@
AFTER_SALE_DATE = #afterSaleDate#, <!-- 售后日期 --> AFTER_SALE_DATE = #afterSaleDate#, <!-- 售后日期 -->
AFTER_SALE_TYPE = #afterSaleType#, <!-- 售后方式 --> AFTER_SALE_TYPE = #afterSaleType#, <!-- 售后方式 -->
URGENCY = #urgency#, <!-- 紧急程度 --> URGENCY = #urgency#, <!-- 紧急程度 -->
AFTER_SALE_CONTENT = #afterSaleContent#, <!-- 售后内容 -->
CUSTOM_ID = #customId#, <!-- 客户ID --> CUSTOM_ID = #customId#, <!-- 客户ID -->
CUSTOM_NAME = #customName#, <!-- 客户名称 --> CUSTOM_NAME = #customName#, <!-- 客户名称 -->
<include refid="SqlBase.updateRevise"/> <include refid="SqlBase.updateRevise"/>
......
...@@ -18,10 +18,12 @@ ...@@ -18,10 +18,12 @@
CARE_NO as "careNo", <!-- 关怀单号 --> CARE_NO as "careNo", <!-- 关怀单号 -->
CARE_WAY as "careWay", <!-- 关怀方式 --> CARE_WAY as "careWay", <!-- 关怀方式 -->
CARE_TYPE as "careType", <!-- 关怀类型 --> CARE_TYPE as "careType", <!-- 关怀类型 -->
CARE_CONTENT as "careContent", <!-- 关怀内容 -->
CUSTOM_ID as "customId", <!-- 客户ID --> CUSTOM_ID as "customId", <!-- 客户ID -->
CUSTOM_NAME as "customName", <!-- 客户名称 --> CUSTOM_NAME as "customName", <!-- 客户名称 -->
DEAL_USER_ID as "dealUserId", <!-- 执行人ID --> DEAL_USER_ID as "dealUserId", <!-- 执行人ID -->
DEAL_USER_NAME as "dealUserName" <!-- 执行人名称 --> DEAL_USER_NAME as "dealUserName", <!-- 执行人名称 -->
DEAL_CONTENT as "dealContent" <!-- 客户反馈 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -132,13 +134,14 @@ ...@@ -132,13 +134,14 @@
CARE_NO, <!-- 关怀单号 --> CARE_NO, <!-- 关怀单号 -->
CARE_WAY, <!-- 关怀方式 --> CARE_WAY, <!-- 关怀方式 -->
CARE_TYPE, <!-- 关怀类型 --> CARE_TYPE, <!-- 关怀类型 -->
CARE_CONTENT, <!-- 关怀内容 -->
CUSTOM_ID, <!-- 客户ID --> CUSTOM_ID, <!-- 客户ID -->
CUSTOM_NAME, <!-- 客户名称 --> CUSTOM_NAME, <!-- 客户名称 -->
DEAL_USER_ID, <!-- 执行人ID --> DEAL_USER_ID, <!-- 执行人ID -->
DEAL_USER_NAME <!-- 执行人名称 --> DEAL_USER_NAME <!-- 执行人名称 -->
) VALUES ( ) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #status#, #careDate#, #careNo#, #careWay#, #careType#, #updatedTime#, #deleteFlag#, #status#, #careDate#, #careNo#, #careWay#, #careType#, #careContent#,
#customId#, #customName#, #dealUserId#, #dealUserName#) #customId#, #customName#, #dealUserId#, #dealUserName#)
</insert> </insert>
...@@ -153,6 +156,7 @@ ...@@ -153,6 +156,7 @@
CARE_NO = #careNo#, <!-- 关怀单号 --> CARE_NO = #careNo#, <!-- 关怀单号 -->
CARE_WAY = #careWay#, <!-- 关怀方式 --> CARE_WAY = #careWay#, <!-- 关怀方式 -->
CARE_TYPE = #careType#, <!-- 关怀类型 --> CARE_TYPE = #careType#, <!-- 关怀类型 -->
CARE_CONTENT = #careContent#, <!-- 关怀内容 -->
CUSTOM_ID = #customId#, <!-- 客户ID --> CUSTOM_ID = #customId#, <!-- 客户ID -->
CUSTOM_NAME = #customName#, <!-- 客户名称 --> CUSTOM_NAME = #customName#, <!-- 客户名称 -->
<include refid="SqlBase.updateRevise"/> <include refid="SqlBase.updateRevise"/>
...@@ -174,6 +178,7 @@ ...@@ -174,6 +178,7 @@
STATUS = #status#, STATUS = #status#,
DEAL_USER_ID = #dealUserId#, <!-- 处理人ID --> DEAL_USER_ID = #dealUserId#, <!-- 处理人ID -->
DEAL_USER_NAME = #dealUserName#, <!-- 处理人名称 --> DEAL_USER_NAME = #dealUserName#, <!-- 处理人名称 -->
DEAL_CONTENT = #dealContent#, <!-- 处理内容 -->
<include refid="SqlBase.updateRevise"/> <include refid="SqlBase.updateRevise"/>
WHERE CARE_NO = #careNo# WHERE CARE_NO = #careNo#
</update> </update>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPFW003">
<sql id="column">
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除 0-否1-是 -->
COMPLAINT_DATE as "complaintDate", <!-- 投诉日期 -->
COMPLAINT_NO as "complaintNo", <!-- 投诉单号 -->
STATUS as "status", <!-- 状态 -->
CUSTOM_ID as "customId", <!-- 客户ID -->
CUSTOM_NAME as "customName", <!-- 客户名称 -->
COMPLAINT_WAY as "complaintWay", <!-- 投诉方式 -->
COMPLAINT_TYPE as "complaintType", <!-- 投诉类型 -->
COMPLAINT_CONTENT as "complaintContent", <!-- 投诉内容 -->
COMPLAINT_USER_ID as "complaintUserId", <!-- 被投诉人ID -->
COMPLAINT_USER_NAME as "complaintUserName", <!-- 被投诉人名称 -->
ACCEPT_USER_ID as "acceptUserId", <!-- 受理人ID -->
ACCEPT_USER_NAME as "acceptUserName", <!-- 受理人名称 -->
LAST_DATE as "lastDate", <!-- 最后期限 -->
DEAL_CONTENT as "dealContent", <!-- 处理结果 -->
DEAL_USER_ID as "dealUserId", <!-- 处理人ID -->
DEAL_USER_NAME as "dealUserName" <!-- 处理人名称 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="idCondition"/>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="complaintDate">
COMPLAINT_DATE = #complaintDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="customId">
CUSTOM_ID = #customId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="customName">
CUSTOM_NAME LIKE CONCAT('%', #customName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="complaintWay">
COMPLAINT_WAY = #complaintWay#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="complaintType">
COMPLAINT_TYPE = #complaintType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="complaintContent">
COMPLAINT_CONTENT = #complaintContent#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="complaintUserId">
COMPLAINT_USER_ID = #complaintUserId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="complaintUserName">
COMPLAINT_USER_NAME LIKE CONCAT('%', #complaintUserName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="acceptUserId">
ACCEPT_USER_ID = #acceptUserId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="acceptUserName">
ACCEPT_USER_NAME = #acceptUserName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="lastDate">
LAST_DATE = #lastDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealContent">
DEAL_CONTENT = #dealContent#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserId">
DEAL_USER_ID = #dealUserId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserName">
DEAL_USER_NAME LIKE CONCAT('%', #dealUserName#, '%')
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="complaintNo">
COMPLAINT_NO = #complaintNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="complaintNos">
COMPLAINT_NO IN <iterate close=")" open="(" conjunction="," property="complaintNos">#complaintNos[]#</iterate>
</isNotEmpty>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.fw.domain.HPFW003">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPFW003
WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPFW003 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPFW003 (
COMPANY_CODE, <!-- 公司编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
COMPLAINT_DATE, <!-- 投诉日期 -->
COMPLAINT_NO, <!-- 投诉单号 -->
STATUS, <!-- 状态 -->
CUSTOM_ID, <!-- 客户ID -->
CUSTOM_NAME, <!-- 客户名称 -->
COMPLAINT_WAY, <!-- 投诉方式 -->
COMPLAINT_TYPE, <!-- 投诉类型 -->
COMPLAINT_CONTENT, <!-- 投诉内容 -->
COMPLAINT_USER_ID, <!-- 被投诉人ID -->
COMPLAINT_USER_NAME, <!-- 被投诉人名称 -->
ACCEPT_USER_ID, <!-- 受理人ID -->
ACCEPT_USER_NAME, <!-- 受理人名称 -->
LAST_DATE, <!-- 最后期限 -->
DEAL_CONTENT, <!-- 处理结果 -->
DEAL_USER_ID, <!-- 处理人ID -->
DEAL_USER_NAME <!-- 处理人名称 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#, #deleteFlag#, #complaintDate#, #complaintNo#, #status#,
#customId#, #customName#, #complaintWay#, #complaintType#, #complaintContent#,
#complaintUserId#, #complaintUserName#, #acceptUserId#, #acceptUserName#,
#lastDate#, #dealContent#, #dealUserId#, #dealUserName#)
</insert>
<delete id="delete">
UPDATE ${hpjxSchema}.T_HPFW003 SET DELETE_FLAG = 1 WHERE COMPLAINT_NO = #complaintNo#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPFW003
SET
COMPLAINT_DATE = #complaintDate#, <!-- 投诉日期 -->
CUSTOM_ID = #customId#, <!-- 客户ID -->
CUSTOM_NAME = #customName#, <!-- 客户名称 -->
COMPLAINT_WAY = #complaintWay#, <!-- 投诉方式 -->
COMPLAINT_TYPE = #complaintType#, <!-- 投诉类型 -->
COMPLAINT_CONTENT = #complaintContent#, <!-- 投诉内容 -->
COMPLAINT_USER_ID = #complaintUserId#, <!-- 被投诉人ID -->
COMPLAINT_USER_NAME = #complaintUserName#, <!-- 被投诉人名称 -->
ACCEPT_USER_ID = #acceptUserId#, <!-- 受理人ID -->
ACCEPT_USER_NAME = #acceptUserName#, <!-- 受理人名称 -->
LAST_DATE = #lastDate#, <!-- 最后期限 -->
<include refid="SqlBase.updateRevise"/>
WHERE ID = #id#
</update>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hpjxSchema}.T_HPFW003
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
<!-- 修改 -->
<update id="updateDeal">
UPDATE ${hpjxSchema}.T_HPFW003
SET
STATUS = #status#,
DEAL_USER_ID = #dealUserId#, <!-- 处理人ID -->
DEAL_USER_NAME = #dealUserName#, <!-- 处理人名称 -->
DEAL_CONTENT = #dealContent#, <!-- 处理内容 -->
<include refid="SqlBase.updateRevise"/>
WHERE COMPLAINT_NO = #complaintNo#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPFW007">
<sql id="column">
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除 0-否1-是 -->
FOL_DATE as "folDate", <!-- 回访日期 -->
FOL_NO as "folNo", <!-- 回访单号 -->
DEL_ORDER_NO as "delOrderNo", <!-- 发货单号 -->
FOL_WAY as "folWay", <!-- 回访方式 1-电话回访 2-上门回访 -->
STATUS as "status", <!-- 回访状态 0-未回访 1-已回访 -->
CUSTOM_ID as "customId", <!-- 客户ID -->
CUSTOM_NAME as "customName", <!-- 客户名称 -->
DEAL_CONTENT as "dealContent", <!-- 回访内容 -->
DEAL_USER_ID as "dealUserId", <!-- 回访人ID -->
DEAL_USER_NAME as "dealUserName" <!-- 回访人名称 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="idCondition"/>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="folDate">
FOL_DATE = #folDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="delOrderNo">
DEL_ORDER_NO LIKE CONCAT('%', #delOrderNo#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="folWay">
FOL_WAY = #folWay#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="customId">
CUSTOM_ID = #customId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="customName">
CUSTOM_NAME LIKE CONCAT('%', #customName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealContent">
DEAL_CONTENT = #dealContent#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserId">
DEAL_USER_ID = #dealUserId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserName">
DEAL_USER_NAME LIKE CONCAT('%', #dealUserName#, '%')
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="folNo">
FOL_NO = #folNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="folNos">
FOL_NO IN <iterate close=")" open="(" conjunction="," property="folNos">#folNos[]#</iterate>
</isNotEmpty>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.fw.domain.HPFW007">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPFW007 WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPFW007 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPFW007 (
COMPANY_CODE, <!-- 公司编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
FOL_DATE, <!-- 回访日期 -->
FOL_NO, <!-- 回访单号 -->
DEL_ORDER_NO, <!-- 发货单号 -->
FOL_WAY, <!-- 回访方式 1-电话回访 2-上门回访 -->
STATUS, <!-- 回访状态 0-未回访 1-已回访 -->
CUSTOM_ID, <!-- 客户ID -->
CUSTOM_NAME, <!-- 客户名称 -->
DEAL_CONTENT, <!-- 回访内容 -->
DEAL_USER_ID, <!-- 回访人ID -->
DEAL_USER_NAME <!-- 回访人名称 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#, #deleteFlag#, #folDate#, #folNo#, #delOrderNo#,
#folWay#, #status#, #customId#, #customName#, #dealContent#, #dealUserId#,
#dealUserName#
)
</insert>
<delete id="delete">
UPDATE ${hpjxSchema}.T_HPFW007 SET DELETE_FLAG = 1 WHERE FOL_NO = #folNo#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPFW007
SET
FOL_DATE = #folDate#, <!-- 回访日期 -->
DEL_ORDER_NO = #delOrderNo#, <!-- 发货单号 -->
FOL_WAY = #folWay#, <!-- 回访方式 1-电话回访 2-上门回访 -->
CUSTOM_ID = #customId#, <!-- 客户ID -->
CUSTOM_NAME = #customName#, <!-- 客户名称 -->
<include refid="SqlBase.updateRevise"/>
WHERE ID = #id#
</update>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hpjxSchema}.T_HPFW007
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
<!-- 修改 -->
<update id="updateDeal">
UPDATE ${hpjxSchema}.T_HPFW007
SET
STATUS = #status#,
DEAL_USER_ID = #dealUserId#,
DEAL_USER_NAME = #dealUserName#,
DEAL_CONTENT = #dealContent#,
<include refid="SqlBase.updateRevise"/>
WHERE FOL_NO = #folNo#
</update>
</sqlMap>
...@@ -4,6 +4,8 @@ import com.baosight.hpjx.core.dao.DaoBase; ...@@ -4,6 +4,8 @@ import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.fw.constant.HpFwSqlConstant; import com.baosight.hpjx.hp.fw.constant.HpFwSqlConstant;
import com.baosight.hpjx.hp.fw.domain.HPFW001; import com.baosight.hpjx.hp.fw.domain.HPFW001;
import com.baosight.hpjx.hp.fw.domain.HPFW002; import com.baosight.hpjx.hp.fw.domain.HPFW002;
import com.baosight.hpjx.hp.fw.domain.HPFW003;
import com.baosight.hpjx.hp.fw.domain.HPFW007;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
...@@ -158,4 +160,144 @@ public class HpFwTools { ...@@ -158,4 +160,144 @@ public class HpFwTools {
} }
/**
* @author:songx
* @date:2024/9/24,18:08
*/
public static class HpFw003 {
/**
* 锁.
*
* @param complaintNo
*/
public static void lock(String complaintNo) {
AssertUtils.isEmpty(complaintNo, "投诉单号不能为空!");
Map<String, Object> paramMap = new HashMap<>();
paramMap.put(HPFW003.FIELD_COMPLAINT_NO, complaintNo);
DaoBase.getInstance().update(HpFwSqlConstant.HpFw003.LOCK, paramMap);
}
/**
* 锁.
*
* @param complaintNos
*/
public static void lock(List<String> complaintNos) {
AssertUtils.isEmpty(complaintNos, "投诉单号不能为空!");
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("complaintNos", complaintNos);
DaoBase.getInstance().update(HpFwSqlConstant.HpFw003.LOCK, paramMap);
}
/**
* 查询
*
* @param complaintNo
* @return
*/
public static HPFW003 get(String complaintNo) {
AssertUtils.isEmpty(complaintNo, "投诉单号不能为空!");
Map<String, Object> paramMap = new HashMap();
paramMap.put(HPFW003.FIELD_COMPLAINT_NO, complaintNo);
List<HPFW003> results = DaoBase.getInstance().query(HPFW003.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 查询
*
* @param complaintNos
* @return
*/
public static List<HPFW003> list(List<String> complaintNos) {
AssertUtils.isEmpty(complaintNos, "投诉单号不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("complaintNos", complaintNos);
return DaoBase.getInstance().query(HPFW003.QUERY, paramMap);
}
/**
* 查询
*
* @param complaintNos
* @return
*/
public static Map<String, HPFW003> map(List<String> complaintNos) {
List<HPFW003> results = list(complaintNos);
return results.stream().collect(Collectors.toMap(HPFW003::getComplaintNo, item -> item));
}
}
/**
* @author:songx
* @date:2024/9/24,18:08
*/
public static class HpFw007 {
/**
* 锁.
*
* @param folNo
*/
public static void lock(String folNo) {
AssertUtils.isEmpty(folNo, "关怀单号不能为空!");
Map<String, Object> paramMap = new HashMap<>();
paramMap.put(HPFW007.FIELD_FOL_NO, folNo);
DaoBase.getInstance().update(HpFwSqlConstant.HpFw007.LOCK, paramMap);
}
/**
* 锁.
*
* @param folNos
*/
public static void lock(List<String> folNos) {
AssertUtils.isEmpty(folNos, "回访单号不能为空!");
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("folNos", folNos);
DaoBase.getInstance().update(HpFwSqlConstant.HpFw007.LOCK, paramMap);
}
/**
* 查询
*
* @param folNo
* @return
*/
public static HPFW007 get(String folNo) {
AssertUtils.isEmpty(folNo, "回访单号不能为空!");
Map<String, Object> paramMap = new HashMap();
paramMap.put(HPFW007.FIELD_FOL_NO, folNo);
List<HPFW007> results = DaoBase.getInstance().query(HPFW007.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 查询
*
* @param folNos
* @return
*/
public static List<HPFW007> list(List<String> folNos) {
AssertUtils.isEmpty(folNos, "回访单号不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("folNos", folNos);
return DaoBase.getInstance().query(HPFW007.QUERY, paramMap);
}
/**
* 查询
*
* @param folNos
* @return
*/
public static Map<String, HPFW007> map(List<String> folNos) {
List<HPFW007> results = list(folNos);
return results.stream().collect(Collectors.toMap(HPFW007::getFolNo, item -> item));
}
}
} }
...@@ -2,6 +2,8 @@ package com.baosight.hpjx.hp.fw.utils; ...@@ -2,6 +2,8 @@ package com.baosight.hpjx.hp.fw.utils;
import com.baosight.hpjx.hp.fw.domain.HPFW001; import com.baosight.hpjx.hp.fw.domain.HPFW001;
import com.baosight.hpjx.hp.fw.domain.HPFW002; import com.baosight.hpjx.hp.fw.domain.HPFW002;
import com.baosight.hpjx.hp.fw.domain.HPFW003;
import com.baosight.hpjx.hp.fw.domain.HPFW007;
import com.baosight.hpjx.hp.fw.tools.HpFwTools; import com.baosight.hpjx.hp.fw.tools.HpFwTools;
import com.baosight.hpjx.util.ObjectUtils; import com.baosight.hpjx.util.ObjectUtils;
...@@ -101,4 +103,92 @@ public class HpFwUtils { ...@@ -101,4 +103,92 @@ public class HpFwUtils {
return HpFwTools.HpFw002.get(careNo); return HpFwTools.HpFw002.get(careNo);
} }
} }
/**
* @author:songx
* @date:2024/9/24,18:07
*/
public static class HpFw003 {
/**
* 锁并获取数据
*
* @param fFw003s
* @return
*/
public static Map<String, HPFW003> lockAndGet(List<HPFW003> fFw003s) {
List<String> complaintNos = ObjectUtils.listEpKey(fFw003s, HPFW003.FIELD_COMPLAINT_NO);
// 锁
HpFwTools.HpFw003.lock(complaintNos);
// 查询数据
return HpFwTools.HpFw003.map(complaintNos);
}
/**
* 锁并获取数据
*
* @param fFw003
* @return
*/
public static HPFW003 lockAndGet(HPFW003 fFw003) {
return lockAndGet(fFw003.getComplaintNo());
}
/**
* 锁并获取数据
*
* @param complaintNos
* @return
*/
public static HPFW003 lockAndGet(String complaintNos) {
// 锁
HpFwTools.HpFw003.lock(complaintNos);
// 查询数据
return HpFwTools.HpFw003.get(complaintNos);
}
}
/**
* @author:songx
* @date:2024/9/24,18:07
*/
public static class HpFw007 {
/**
* 锁并获取数据
*
* @param fFw007s
* @return
*/
public static Map<String, HPFW007> lockAndGet(List<HPFW007> fFw007s) {
List<String> folNos = ObjectUtils.listEpKey(fFw007s, HPFW007.FIELD_FOL_NO);
// 锁
HpFwTools.HpFw007.lock(folNos);
// 查询数据
return HpFwTools.HpFw007.map(folNos);
}
/**
* 锁并获取数据
*
* @param fFw007
* @return
*/
public static HPFW007 lockAndGet(HPFW007 fFw007) {
return lockAndGet(fFw007.getFolNo());
}
/**
* 锁并获取数据
*
* @param folNo
* @return
*/
public static HPFW007 lockAndGet(String folNo) {
// 锁
HpFwTools.HpFw007.lock(folNo);
// 查询数据
return HpFwTools.HpFw007.get(folNo);
}
}
} }
...@@ -4,12 +4,9 @@ import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; ...@@ -4,12 +4,9 @@ import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.xs.domain.HPXS007; import com.baosight.hpjx.hp.xs.domain.HPXS007;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils; import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants; import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
...@@ -17,17 +14,15 @@ import com.baosight.iplat4j.core.ei.EiConstant; ...@@ -17,17 +14,15 @@ 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.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.ed.util.SequenceGenerator;
import java.util.*; import java.util.*;
/** /**
* * @author:songx
* @date:2024/9/26,14:32
*/ */
public class ServiceHPXS007 extends ServiceBase { public class ServiceHPXS007 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
...@@ -44,7 +39,6 @@ public class ServiceHPXS007 extends ServiceBase { ...@@ -44,7 +39,6 @@ public class ServiceHPXS007 extends ServiceBase {
return inInfo; return inInfo;
} }
/** /**
* 查询操作. * 查询操作.
*/ */
...@@ -55,7 +49,6 @@ public class ServiceHPXS007 extends ServiceBase { ...@@ -55,7 +49,6 @@ public class ServiceHPXS007 extends ServiceBase {
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPXS007.FIELD_FOL_DATE))); DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPXS007.FIELD_FOL_DATE)));
EiInfo outInfo = super.query(inInfo, HPXS007.QUERY, new HPXS007()); EiInfo outInfo = super.query(inInfo, HPXS007.QUERY, new HPXS007());
return outInfo; return outInfo;
} }
/** /**
...@@ -69,36 +62,35 @@ public class ServiceHPXS007 extends ServiceBase { ...@@ -69,36 +62,35 @@ public class ServiceHPXS007 extends ServiceBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HPXS007 hpsc007 = new HPXS007(); HPXS007 hpsc007 = new HPXS007();
hpsc007.fromMap(resultRows.get(i)); hpsc007.fromMap(resultRows.get(i));
hpsc007.setFolDate(DateUtils.formatShort(hpsc007.getFolDate())); hpsc007.setFolDate(DateUtils.formatShort(hpsc007.getFolDate()));
if (hpsc007.getId() == null || hpsc007.getId() == 0) { if (hpsc007.getId() == null || hpsc007.getId() == 0) {
this.add(hpsc007); this.add(hpsc007);
} else { } else {
this.modify(hpsc007); this.modify(hpsc007);
} }
} }
//inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败"); LogUtils.setDetailMsg(inInfo, e, "保存失败");
} }
return inInfo; return inInfo;
} }
/** /**
* 新增 * 新增
* *
* @param hpsc007 * @param hpsc007
* @throws Exception * @throws Exception
*/ */
private void add(HPXS007 hpsc007) throws Exception { private void add(HPXS007 hpsc007) {
DaoUtils.insert(HPXS007.INSERT, hpsc007); DaoUtils.insert(HPXS007.INSERT, hpsc007);
} }
/** /**
* 修改数据 * 修改数据
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
<!-- 产品服务 --> <!-- 产品服务 -->
<sqlMap resource="com/baosight/hpjx/hp/fw/sql/HPFW001.xml"/> <sqlMap resource="com/baosight/hpjx/hp/fw/sql/HPFW001.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/fw/sql/HPFW002.xml"/> <sqlMap resource="com/baosight/hpjx/hp/fw/sql/HPFW002.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/fw/sql/HPFW003.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/fw/sql/HPFW007.xml"/>
<!--财务服务--> <!--财务服务-->
<sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW001.xml"/> <sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW001.xml"/>
......
...@@ -41,16 +41,17 @@ ...@@ -41,16 +41,17 @@
<EF:EFComboColumn ename="urgency" cname="紧急程度" enable="false" width="80" align="center"> <EF:EFComboColumn ename="urgency" cname="紧急程度" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.afterSaleUrgency"/> <EF:EFCodeOption codeName="app.hpfw.afterSaleUrgency"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="afterSaleContent" cname="售后内容" enable="false" width="220" align="left"/>
<EF:EFColumn ename="customId" cname="客户ID" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="customId" cname="客户ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="customName" cname="客户名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="customName" cname="客户名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="dealContent" cname="处理内容" enable="false" width="220" align="left"/> <EF:EFColumn ename="dealContent" cname="处理内容" enable="false" width="220" align="left"/>
<EF:EFColumn ename="dealUserName" cname="处理人名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="dealUserId" cname="处理人ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="dealUserName" cname="处理人名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="dealUserName" cname="处理人名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="150" align="center" <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn cname="修改人" ename="updatedName" enable="false" width="100" align="center"/> <EF:EFColumn ename="updatedName" cname="修改人" enable="false" width="100" align="center"/>
<EF:EFColumn cname="修改时间" ename="updatedTime" enable="false" width="150" align="center" <EF:EFColumn ename="updatedTime" cname="修改时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -71,17 +71,11 @@ function uploadFile() { ...@@ -71,17 +71,11 @@ function uploadFile() {
EiCommunicator.send('HPFW001', 'checkStatus', inInfo, { EiCommunicator.send('HPFW001', 'checkStatus', inInfo, {
onSuccess(res) { onSuccess(res) {
if (res.status !== -1) { if (res.status !== -1) {
let params = { CommonUtils.uploadFile(bizType, bizId, function (res) {
"inqu_status-0-bizId": bizId, // 刷新列表
"inqu_status-0-bizType": bizType resultGrid.dataSource.page(1);
} // 关闭弹窗
JSColorbox.open({ JSColorbox.close();
href: "HPDM099A",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
params: params,
callbackName: uploadFileCallback
}); });
} else { } else {
message(res.msg); message(res.msg);
...@@ -96,18 +90,6 @@ function uploadFile() { ...@@ -96,18 +90,6 @@ function uploadFile() {
} }
/** /**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(e) {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
/**
* 删除 * 删除
*/ */
function remove() { function remove() {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<EF:EFPage title="附件清单"> <EF:EFPage title="附件清单">
<EF:EFInput cname="售后服务ID" ename="id" blockId="detail" row="0" type="hidden"/> <EF:EFInput cname="售后服务ID" ename="id" blockId="detail" row="0" type="hidden"/>
<EF:EFInput cname="售后服务单状态" ename="status" blockId="detail" row="0" type="hidden"/> <EF:EFInput cname="状态" ename="status" blockId="detail" row="0" type="hidden"/>
<EF:EFRegion id="inqu" title="查询区域" type="query"> <EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden" value="AFTER_SALE"/> <EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden" value="AFTER_SALE"/>
<div class="row"> <div class="row">
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/> <EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/> <EF:EFColumn ename="docId" cname="文件ID" enable="false" width="160"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/> <EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="docType" cname="文件类型" enable="false" width="120"/> <EF:EFColumn ename="docType" cname="文件类型" enable="false" width="100"/>
<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="operator" cname="操作" enable="false" width="200" align="center"/> <EF:EFColumn ename="operator" cname="操作" enable="false" width="100" align="center"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="afterSaleContent" cname="售后内容" blockId="result" row="0" colWidth="6" ratio="2:10"
type="textarea" rows="3"/>
</div>
<div class="row">
<EF:EFSelect ename="customId" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10" <EF:EFSelect ename="customId" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains"> filter="contains">
<EF:EFOption label="请选择" value=""/> <EF:EFOption label="请选择" value=""/>
......
...@@ -15,13 +15,13 @@ $(function () { ...@@ -15,13 +15,13 @@ $(function () {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="modify(\'' + item.careNo + '\')" >修改</a>&nbsp;&nbsp;'; + 'onclick="modify(\'' + item.careNo + '\')" >修改</a>&nbsp;&nbsp;';
} }
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(\'' + item.careNo + '\')" >附件清单</a>';
return template; return template;
} }
}], }],
loadComplete: function (grid) { loadComplete: function (grid) {
}, },
onSuccess: function (e) {
},
onRowClick: function (e) { onRowClick: function (e) {
} }
} }
...@@ -34,7 +34,9 @@ $(function () { ...@@ -34,7 +34,9 @@ $(function () {
// 删除 // 删除
$("#REMOVE").on("click", remove); $("#REMOVE").on("click", remove);
// 处理 // 处理
$("#CHECK").on("click", check); $("#DEAL").on("click", deal);
// 确认处理
$("#DEAL_CONFIRM").on("click", dealConfirm);
// 键盘按键 // 键盘按键
downKeyUp(); downKeyUp();
}); });
...@@ -116,15 +118,50 @@ function remove() { ...@@ -116,15 +118,50 @@ function remove() {
* @param id * @param id
* @param auditStatus * @param auditStatus
*/ */
function check(id) { function deal(id) {
var rows = resultGrid.getCheckedRows(); var rows = resultGrid.getCheckedRows();
if (rows.length == 0) { if (rows.length == 0) {
message("请先勾选数据!"); message("请先勾选数据!");
return; return;
} }
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"处理\"操作?", { JSUtils.confirm("确定对勾选中的" + rows.length + "条数据做\"处理\"操作?", {
ok: function () { ok: function () {
JSUtils.submitGridsData("result", "HPFW002", "check", true); $("#dealWindow").data("kendoWindow").center();
$("#dealWindow").data("kendoWindow").open();
} }
}) })
} }
/**
* 确认处理
*/
function dealConfirm() {
let content = $("#deal-0-content").val();
if (isBlank(content)) {
message("请输入反馈内容");
return;
}
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-content", content);
JSUtils.submitGridsData("result", "HPFW002", "deal", true,
function (res) {
if (res.status > -1) {
$("#dealWindow").data("kendoWindow").close();
}
}, inInfo
);
}
/**
* 附件清单
*
* @param bizId
*/
function showUploadFile(bizId) {
JSColorbox.open({
href: "HPFW002A?inqu_status-0-bizId=" + bizId,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
...@@ -45,17 +45,28 @@ ...@@ -45,17 +45,28 @@
<EF:EFComboColumn ename="careType" cname="关怀类型" enable="false" width="80" align="center"> <EF:EFComboColumn ename="careType" cname="关怀类型" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.careType"/> <EF:EFCodeOption codeName="app.hpfw.careType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="careContent" cname="关怀内容" enable="false" width="160" align="left"/>
<EF:EFColumn ename="customId" cname="客户ID" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="customId" cname="客户ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="customName" cname="客户名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="customName" cname="客户名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="dealUserId" cname="处理人ID" enable="false" width="120" align="center"/> <EF:EFColumn ename="dealContent" cname="客户反馈" enable="false" width="160" align="left"/>
<EF:EFColumn ename="dealUserId" cname="处理人ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="dealUserName" cname="处理人名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="dealUserName" cname="处理人名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="150" align="center" <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn cname="修改人" ename="updatedName" enable="false" width="100" align="center"/> <EF:EFColumn ename="updatedName" cname="修改人" enable="false" width="100" align="center"/>
<EF:EFColumn cname="修改时间" ename="updatedTime" enable="false" width="150" align="center" <EF:EFColumn ename="updatedTime" cname="修改时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
<EF:EFWindow id="dealWindow" title="反馈内容" width="50%" height="30%">
<EF:EFRegion id="deal" title="">
<div class="row">
<EF:EFInput blockId="deal" row="0" ename="content" cname="反馈内容" colWidth="12" ratio="2:10"
type="textarea" rows="4" required="true"/>
</div>
</EF:EFRegion>
</EF:EFWindow>
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
return template;
}
}]
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#REMOVE").on("click", remove);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
// 隐藏按钮
showButton();
});
/**
* 查询
*/
let query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 显示按钮,如果提交了,则不能修改
*/
let showButton = function () {
let status = $("#detail-0-status").val();
if (!isBlank(status) && status === "0") {
$('#UPLOAD_FILE').show();
$('#REMOVE').show();
} else {
$('#UPLOAD_FILE').hide();
$('#REMOVE').hide();
}
}
/**
* 文件上传
*
* @param id
*/
function uploadFile() {
let bizId = $("#inqu_status-0-bizId").val();
let bizType = $("#inqu_status-0-bizType").val();
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-careNo", bizId);
EiCommunicator.send('HPFW002', 'checkStatus', inInfo, {
onSuccess(res) {
if (res.status !== -1) {
CommonUtils.uploadFile(bizType, bizId, function (res) {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
});
} else {
message(res.msg);
}
},
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", "HPFW002A", "remove", true);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="附件清单">
<EF:EFInput cname="客户关怀ID" ename="id" blockId="detail" row="0" type="hidden"/>
<EF:EFInput cname="状态" ename="status" blockId="detail" row="0" type="hidden"/>
<EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden" value="CUSTOM_CARE"/>
<div class="row">
<EF:EFInput cname="客户关怀单号" ename="bizId" blockId="inqu_status" row="0" readonly="true"/>
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="160"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="docType" cname="文件类型" enable="false" width="100"/>
<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="100" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="careContent" cname="关怀内容" blockId="result" row="0" colWidth="6" ratio="2:10"
type="textarea" rows="3"/>
</div>
<div class="row">
<EF:EFSelect ename="customId" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10" <EF:EFSelect ename="customId" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains"> filter="contains">
<EF:EFOption label="请选择" value=""/> <EF:EFOption label="请选择" value=""/>
......
$(function () {
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 20,
pageSizes: [20, 50, 100, 200],
},
columns: [{
field: "operator",
template: function (item) {
let status = item.status;
let template = '';
if (status && status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="modify(\'' + item.complaintNo + '\')" >修改</a>&nbsp;&nbsp;';
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(\'' + item.complaintNo + '\')" >附件清单</a>';
return template;
}
}],
loadComplete: function (grid) {
},
onRowClick: function (e) {
}
}
}
// 查询
$("#QUERY").on("click", query);
// 新增
$("#ADD").on("click", add);
// 删除
$("#REMOVE").on("click", remove);
// 处理
$("#DEAL").on("click", deal);
// 确认处理
$("#DEAL_CONFIRM").on("click", dealConfirm);
// 键盘按键
downKeyUp();
});
/**
* 页面加载完成
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 新增
*/
let add = function () {
addOrUpdate("");
}
/**
* 修改
*/
let modify = function (complaintNo) {
let params = "inqu_status-0-complaintNo=" + complaintNo;
addOrUpdate(params);
}
/**
* 新增
*/
let addOrUpdate = function (params) {
JSColorbox.open({
href: "HPFW003B?" + 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", "HPFW003", "remove", true);
}
})
}
/**
* 处理
*
* @param id
* @param auditStatus
*/
function deal(id) {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的" + rows.length + "条数据做\"处理\"操作?", {
ok: function () {
$("#dealWindow").data("kendoWindow").center();
$("#dealWindow").data("kendoWindow").open();
}
})
}
/**
* 确认处理
*/
function dealConfirm() {
let content = $("#deal-0-content").val();
if (isBlank(content)) {
message("请输入反馈内容");
return;
}
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-content", content);
JSUtils.submitGridsData("result", "HPFW003", "deal", true,
function (res) {
if (res.status > -1) {
$("#dealWindow").data("kendoWindow").close();
}
}, inInfo
);
}
/**
* 附件清单
*
* @param bizId
*/
function showUploadFile(bizId) {
JSColorbox.open({
href: "HPFW003A?inqu_status-0-bizId=" + bizId,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="客户投诉">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="complaintDate" cname="投诉日期" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect ename="complaintWay" cname="投诉方式" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.hpfw.complaintWay"/>
</EF:EFSelect>
<EF:EFSelect ename="complaintType" cname="投诉类型" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.hpfw.complaintType"/>
</EF:EFSelect>
<EF:EFSelect ename="status" cname="状态" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.comm.dealStatus"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput ename="customName" cname="客户名称" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput ename="complaintUserName" cname="被投诉人" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput ename="dealUserName" cname="处理人" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="ID" enable="false" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="complaintNo" cname="投诉单号" enable="false" width="100" align="center"/>
<EF:EFColumn ename="complaintDate" cname="投诉日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.comm.dealStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="complaintWay" cname="投诉方式" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.complaintWay"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="complaintType" cname="投诉类型" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.complaintType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="complaintContent" cname="投诉内容" enable="false" width="160" align="left"/>
<EF:EFColumn ename="customId" cname="客户ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="customName" cname="客户名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="complaintUserName" cname="被投诉人" enable="false" width="120" align="center"/>
<EF:EFColumn ename="acceptUserName" cname="受理人" enable="false" width="120" align="center"/>
<EF:EFColumn ename="lastDate" cname="最后期限" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="dealContent" cname="处理内容" enable="false" width="120" align="left"/>
<EF:EFColumn ename="dealUserId" cname="处理人ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="dealUserName" cname="处理人名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="updatedName" cname="修改人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="updatedTime" cname="修改时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<EF:EFWindow id="dealWindow" title="处理内容" width="50%" height="30%">
<EF:EFRegion id="deal" title="">
<div class="row">
<EF:EFInput blockId="deal" row="0" ename="content" cname="处理内容" colWidth="12" ratio="2:10"
type="textarea" rows="4" required="true"/>
</div>
</EF:EFRegion>
</EF:EFWindow>
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
return template;
}
}]
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#REMOVE").on("click", remove);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
// 隐藏按钮
showButton();
});
/**
* 查询
*/
let query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 显示按钮,如果提交了,则不能修改
*/
let showButton = function () {
let status = $("#detail-0-status").val();
if (!isBlank(status) && status === "0") {
$('#UPLOAD_FILE').show();
$('#REMOVE').show();
} else {
$('#UPLOAD_FILE').hide();
$('#REMOVE').hide();
}
}
/**
* 文件上传
*
* @param id
*/
function uploadFile() {
let bizId = $("#inqu_status-0-bizId").val();
let bizType = $("#inqu_status-0-bizType").val();
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-complaintNo", bizId);
EiCommunicator.send('HPFW003', 'checkStatus', inInfo, {
onSuccess(res) {
if (res.status !== -1) {
CommonUtils.uploadFile(bizType, bizId, function (res) {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
});
} else {
message(res.msg);
}
},
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", "HPFW003A", "remove", true);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="附件清单">
<EF:EFInput cname="客户关怀ID" ename="id" blockId="detail" row="0" type="hidden"/>
<EF:EFInput cname="状态" ename="status" blockId="detail" row="0" type="hidden"/>
<EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"
value="COMPLAINT"/>
<div class="row">
<EF:EFInput cname="客户关怀单号" ename="bizId" blockId="inqu_status" row="0" readonly="true"/>
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="160"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="docType" cname="文件类型" enable="false" width="100"/>
<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="100" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFSelect = {
"result-0-customId": {
select: function (e) {
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var textField = dataItem['textField'];
if (valueField) {
textField = textField.indexOf("-") > -1 ? textField.split("-")[1] : textField;
$("#result-0-customName").val(textField);
} else {
$("#result-0-customName").val("");
}
}
},
"result-0-complaintUserId": {
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-complaintUserName").val(textField);
} else {
$("#result-0-complaintUserName").val("");
}
}
},
"result-0-acceptUserId": {
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-acceptUserName").val(textField);
} else {
$("#result-0-acceptUserName").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 msg = checkParam();
if (!isBlank(msg)) {
message(msg);
return;
}
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("", "HPFW003B", "save", true, function (res) {
if (res.status > -1) {
parent.JSColorbox.setValueCallback(res);
} else {
message(res.msg);
}
});
}
});
}
/**
* 参数校验
*/
let checkParam = function () {
let complaintDate = $("#result-0-complaintDate").val();
if (isBlank(complaintDate)) {
return "投诉日期不能为空";
}
let complaintWay = $("#result-0-complaintWay").val();
if (isBlank(complaintWay)) {
return "投诉方式不能为空";
}
let complaintType = $("#result-0-complaintType").val();
if (isBlank(complaintType)) {
return "投诉类型不能为空";
}
let customId = $("#result-0-customId").val();
if (isBlank(customId)) {
message("客户名称不能为空");
return;
}
let complaintContent = $("#result-0-complaintContent").val();
if (isBlank(complaintContent)) {
return "投诉内容不能为空";
}
let acceptUserId = $("#result-0-acceptUserId").val();
if (isBlank(acceptUserId)) {
return "受理人不能为空";
}
let complaintUserId = $("#result-0-complaintUserId").val();
if (isBlank(complaintUserId)) {
return "被投诉人不能为空";
}
let lastDate = $("#result-0-lastDate").val();
if (isBlank(lastDate)) {
return "最后期限不能为空";
}
return "";
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="投诉单详情">
<EF:EFRegion id="result" title="数据区域">
<EF:EFInput ename="id" cname="ID" blockId="result" row="0" type="hidden"/>
<div class="row">
<EF:EFInput ename="complaintNo" cname="投诉单号" blockId="result" row="0" colWidth="6" ratio="2:10"
required="true" readonly="true"/>
</div>
<div class="row">
<EF:EFDatePicker ename="complaintDate" cname="投诉日期" blockId="result" row="0" colWidth="6" ratio="2:10"
format="yyyy-MM-dd" readonly="true"/>
</div>
<div class="row">
<EF:EFSelect ename="complaintWay" cname="投诉方式" blockId="result" row="0" colWidth="6" ratio="2:10">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="app.hpfw.complaintWay"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="complaintType" cname="投诉类型" blockId="result" row="0" colWidth="6" ratio="2:10">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="app.hpfw.complaintType"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="customId" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput ename="customName" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10"
type="hidden"/>
</div>
<div class="row">
<EF:EFInput ename="complaintContent" cname="投诉内容" blockId="result" row="0" colWidth="6" ratio="2:10"
type="textarea" rows="3"/>
</div>
<div class="row">
<EF:EFSelect ename="complaintUserId" cname="被投诉人" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput ename="complaintUserName" cname="被投诉人" blockId="result" row="0" colWidth="6" ratio="2:10"
type="hidden"/>
</div>
<div class="row">
<EF:EFSelect ename="acceptUserId" cname="受理人" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput ename="acceptUserName" cname="受理人" blockId="result" row="0" colWidth="6" ratio="2:10"
type="hidden"/>
</div>
<div class="row">
<EF:EFDatePicker ename="lastDate" cname="最后期限" blockId="result" row="0" colWidth="6" ratio="2:10"
format="yyyy-MM-dd" readonly="true"/>
</div>
<br/>
<span style="color: red; ">说明:客户投诉单号由系统自动生成</span><br>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 20,
pageSizes: [20, 50, 100, 200],
},
columns: [{
field: "operator",
template: function (item) {
let status = item.status;
let template = '';
if (status && status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="modify(\'' + item.folNo + '\')" >修改</a>&nbsp;&nbsp;';
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(\'' + item.folNo + '\')" >附件清单</a>';
return template;
}
}],
loadComplete: function (grid) {
},
onRowClick: function (e) {
}
}
}
// 查询
$("#QUERY").on("click", query);
// 新增
$("#ADD").on("click", add);
// 删除
$("#REMOVE").on("click", remove);
// 处理
$("#DEAL").on("click", deal);
// 确认处理
$("#DEAL_CONFIRM").on("click", dealConfirm);
// 键盘按键
downKeyUp();
});
/**
* 页面加载完成
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 新增
*/
let add = function () {
addOrUpdate("");
}
/**
* 修改
*/
let modify = function (folNo) {
let params = "inqu_status-0-folNo=" + folNo;
addOrUpdate(params);
}
/**
* 新增
*/
let addOrUpdate = function (params) {
JSColorbox.open({
href: "HPFW007B?" + 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", "HPFW007", "remove", true);
}
})
}
/**
* 处理
*
* @param id
* @param auditStatus
*/
function deal(id) {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的" + rows.length + "条数据做\"处理\"操作?", {
ok: function () {
$("#dealWindow").data("kendoWindow").center();
$("#dealWindow").data("kendoWindow").open();
}
})
}
/**
* 确认处理
*/
function dealConfirm() {
let content = $("#deal-0-content").val();
if (isBlank(content)) {
message("请输入反馈内容");
return;
}
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-content", content);
JSUtils.submitGridsData("result", "HPFW007", "deal", true,
function (res) {
if (res.status > -1) {
$("#dealWindow").data("kendoWindow").close();
}
}, inInfo
);
}
/**
* 附件清单
*
* @param bizId
*/
function showUploadFile(bizId) {
JSColorbox.open({
href: "HPFW007A?inqu_status-0-bizId=" + bizId,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="客户回访">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="folDate" cname="回访日期" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput ename="delOrderNo" cname="发货单号" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect ename="folWay" cname="回访方式" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.hpfw.folWay"/>
</EF:EFSelect>
<EF:EFSelect ename="status" cname="状态" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.hpfw.folStatus"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput ename="customName" cname="客户名称" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput ename="dealUserName" cname="回访人" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="ID" enable="false" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="folNo" cname="回访单号" enable="false" width="100" align="center"/>
<EF:EFColumn ename="folDate" cname="回访日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.folStatus"/>
</EF:EFComboColumn>
<EF:EFColumn ename="delOrderNo" cname="发货单号" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="folWay" cname="回访方式" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.folWay"/>
</EF:EFComboColumn>
<EF:EFColumn ename="customId" cname="客户ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="customName" cname="客户名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="dealContent" cname="回访内容" enable="false" width="160" align="left"/>
<EF:EFColumn ename="dealUserId" cname="处理人ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="dealUserName" cname="回访人" enable="false" width="120" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="updatedName" cname="修改人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="updatedTime" cname="修改时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<EF:EFWindow id="dealWindow" title="回访内容" width="50%" height="30%">
<EF:EFRegion id="deal" title="">
<div class="row">
<EF:EFInput blockId="deal" row="0" ename="content" cname="回访内容" colWidth="12" ratio="2:10"
type="textarea" rows="4" required="true"/>
</div>
</EF:EFRegion>
</EF:EFWindow>
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
return template;
}
}]
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#REMOVE").on("click", remove);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
// 隐藏按钮
showButton();
});
/**
* 查询
*/
let query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 显示按钮,如果提交了,则不能修改
*/
let showButton = function () {
let status = $("#detail-0-status").val();
if (!isBlank(status) && status === "0") {
$('#UPLOAD_FILE').show();
$('#REMOVE').show();
} else {
$('#UPLOAD_FILE').hide();
$('#REMOVE').hide();
}
}
/**
* 文件上传
*
* @param id
*/
function uploadFile() {
let bizId = $("#inqu_status-0-bizId").val();
let bizType = $("#inqu_status-0-bizType").val();
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-folNo", bizId);
EiCommunicator.send('HPFW007', 'checkStatus', inInfo, {
onSuccess(res) {
if (res.status !== -1) {
CommonUtils.uploadFile(bizType, bizId, function (res) {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
});
} else {
message(res.msg);
}
},
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", "HPFW007A", "remove", true);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="附件清单">
<EF:EFInput cname="回访单ID" ename="id" blockId="detail" row="0" type="hidden"/>
<EF:EFInput cname="状态" ename="status" blockId="detail" row="0" type="hidden"/>
<EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden" value="FOL"/>
<div class="row">
<EF:EFInput cname="回访单号" ename="bizId" blockId="inqu_status" row="0" readonly="true"/>
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="160"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="docType" cname="文件类型" enable="false" width="100"/>
<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="100" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFSelect = {
"result-0-customId": {
select: function (e) {
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var textField = dataItem['textField'];
if (valueField) {
textField = textField.indexOf("-") > -1 ? textField.split("-")[1] : textField;
$("#result-0-customName").val(textField);
} else {
$("#result-0-customName").val("");
}
}
}
}
IPLATUI.EFGrid = {
"result": {
pageable: false,
exportGrid: false,
toolbarConfig: {
hidden: false,
},
columns: [],
loadComplete: function (grid) {
},
onSuccess: function (e) {
}
}
};
// 确认
$('#SAVE').on('click', save);
// 键盘按键
downKeyUp();
})
/**
* 保存
*/
let save = function () {
let folDate = $("#result-0-folDate").val();
if (isBlank(folDate)) {
message("回访日期不能为空");
return;
}
let folWay = $("#result-0-folWay").val();
if (isBlank(folWay)) {
message("回访方式不能为空");
return;
}
let delOrderNo = $("#result-0-delOrderNo").val();
if (isBlank(delOrderNo)) {
message("发货单不能为空");
return;
}
let customId = $("#result-0-customId").val();
if (isBlank(customId)) {
message("客户名称不能为空");
return;
}
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("", "HPFW007B", "save", true, function (res) {
if (res.status > -1) {
parent.JSColorbox.setValueCallback(res);
} else {
message(res.msg);
}
});
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="回访单详情">
<EF:EFRegion id="result" title="数据区域">
<EF:EFInput ename="id" cname="ID" blockId="result" row="0" type="hidden"/>
<div class="row">
<EF:EFInput ename="folNo" cname="回访单号" blockId="result" row="0" colWidth="6" ratio="2:10"
required="true" readonly="true"/>
</div>
<div class="row">
<EF:EFDatePicker ename="folDate" cname="回访日期" blockId="result" row="0" colWidth="6" ratio="2:10"
format="yyyy-MM-dd" readonly="true"/>
</div>
<div class="row">
<EF:EFSelect ename="folWay" cname="回访方式" blockId="result" row="0" colWidth="6" ratio="2:10">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="app.hpfw.folWay"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="delOrderNo" cname="发货单号" blockId="result" row="0" colWidth="6" ratio="2:10">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="sale_no_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="customId" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput ename="customName" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10"
type="hidden"/>
</div>
<br/>
<span style="color: red; ">说明:回访单号由系统自动生成</span><br>
</EF:EFRegion>
</EF:EFPage>
...@@ -497,3 +497,42 @@ function loadChange(grid,e,field) { ...@@ -497,3 +497,42 @@ function loadChange(grid,e,field) {
// 触发 td.click 事件, // 触发 td.click 事件,
td.trigger("click"); td.trigger("click");
} }
/**
* 工具类
*/
(function ($) {
/**
* 上传文件
*
* @param bizType
* @param bizId
* @param
*/
let uploadFile = function (bizType, bizId, callback) {
let params = {
"inqu_status-0-bizId": bizId,
"inqu_status-0-bizType": bizType
}
JSColorbox.open({
href: "HPDM099A",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
params: params,
callbackName: function (res) {
if (typeof callback === 'function') {
callback(res);
}
}
});
}
// export 到全局作用域 window对象
$.extend(window, {
CommonUtils: {
uploadFile: uploadFile,
}
});
})(window.jQuery);
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