Commit 8bc16726 authored by 赵汉亭's avatar 赵汉亭

月结方式展示页面、添加页面、增删改查、ES搜索完成

parent 306acc67
$(document).ready(function () {
initializateUI();
// loadProcessListGrid();
bindQueryEvent(); // 这里也要复制!!!!!!!
bindEvent();
});
function initializateUI() {
UICtrl.layout("#layout", {leftWidth: 3});
}
//绑定selectC--------月结方式复制这里!!! (PS:复制完此页面可以删除了)
function bindQueryEvent() {
$('#method').searchbox({
type: "monthlySettlementMethod", name: "monthlySettlementMethodApplyCode",
onChange: function (value, data) {
$('#method').val(data.method);
ajaxRenderDataGoForm(data.method);
showTable({methodId:data.methodId});
}
});
}
function bindEvent() {
$("#save").click(function () {
saveData("save");
})
$("#submit").click(function () {
saveData("submit");
})
$("#close").click(function () {//关闭
closeDispatchTabItem();
})
}
function getCostCenterDetail(CostCenterAction) {
//采购订单保存时数据不进行必填验证,提交时数据才进行必填验证
var op = {};
var check = true;
if (CostCenterAction == "save") {
check = false;
}
op = {check: check};
var costCenter = $('#submitForm').formToJSON(op);
if (!costCenter) {
return false;
}
return costCenter;
}
function saveData(action) {
debugger
var CostCenterDetail = getCostCenterDetail("submit");
if (!CostCenterDetail) {
return;
}
Public.ajax(web_app.name + '/monthlySettlementMethod/saveMonthlySettlementMethod.ajax?code=' + action,CostCenterDetail,
function (data) {
setId(data.id);
Public.successTip("数据保存成功");
// processGridManager.setParm('id', data.id);
// processGridManager.loadData();
}
);
}
function closeDispatchTabItem() {
UICtrl.closeCurrentTab();
}
function setId(value) {
$('#id').val(value);
}
function getId() {
return $("#id").val();
}
<%--
Created by IntelliJ IDEA.
User: lenovo
Date: 2023/12/21
Time: 13:45
To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<x:base include="layout,dialog,grid,tree,combox,commonTree,date"/>
<x:script src='/biz/topsun/customer/ESText.js'/>
</head>
<body>
<%--<div class="container-fluid">--%>
<x:billTitle title="月结方式" needStatus="false" needPerson="true"/>
<div class="blank_div clearfix"></div>
<button class="btn btn-default" type="button" id="close" style="left: 200px;float:right;bottom: 10px;">关闭</button>
<button class="btn btn-warning" type="button" id="submit" style="left: 200px;float:right;bottom: 10px;">提交</button>
<button class="btn btn-success" type="button" id="save" style="left: 200px;float:right;bottom: 10px;">保存</button>
<form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="methodId"/>
<div class="hg-form-row">
<%-- 月结方式复制这里!!!!!(PS:复制完可以删除了!!!)--%>
<x:inputC name="method" label="月结方式名称" labelCol="2" wrapper="select" fieldCol="4"/>
</div>
<div class="blank_div clearfix"></div>
</form>
<%--</div>--%>
</body>
</html>
$(document).ready(function () {
initializateUI();
bindEvent();
});
function initializateUI() {
UICtrl.layout("#layout", {leftWidth: 3});
}
function bindEvent() {
$("#save").click(function () {
saveData("save");
})
$("#submit").click(function () {
saveData("submit");
})
$("#close").click(function () {//关闭
closeDispatchTabItem();
})
}
function getCostCenterDetail(CostCenterAction) {
//采购订单保存时数据不进行必填验证,提交时数据才进行必填验证
var op = {};
var check = true;
if (CostCenterAction == "save") {
check = false;
}
op = {check: check};
var costCenter = $('#submitForm').formToJSON(op);
if (!costCenter) {
return false;
}
return costCenter;
}
function saveData(action) {
debugger
var CostCenterDetail = getCostCenterDetail("submit");
if (!CostCenterDetail) {
return;
}
Public.ajax(web_app.name + '/monthlySettlementMethod/saveMonthlySettlementMethod.ajax?code=' + action,CostCenterDetail,
function (data) {
setId(data.id);
Public.successTip("数据保存成功");
// processGridManager.setParm('id', data.id);
// processGridManager.loadData();
}
);
}
function closeDispatchTabItem() {
UICtrl.closeCurrentTab();
}
function setId(value) {
$('#id').val(value);
}
function getId() {
return $("#id").val();
}
<%--
Created by IntelliJ IDEA.
User: lenovo
Date: 2023/12/20
Time: 9:58
To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<x:base include="layout,dialog,grid,tree,combox,commonTree,date"/>
<x:script src='/biz/topsun/customer/monthlySettlementMethodDetail.js'/>
</head>
<body>
<%--<div class="container-fluid">--%>
<x:billTitle title="月结方式" needStatus="false" needPerson="true"/>
<div class="blank_div clearfix"></div>
<button class="btn btn-default" type="button" id="close" style="left: 200px;float:right;bottom: 10px;">关闭</button>
<button class="btn btn-warning" type="button" id="submit" style="left: 200px;float:right;bottom: 10px;">提交</button>
<button class="btn btn-success" type="button" id="save" style="left: 200px;float:right;bottom: 10px;">保存</button>
<form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="methodId"/>
<div class="hg-form-row">
<x:inputC name="method" required="true" label="月结方式名称" labelCol="2" maxLength="64" fieldCol="4"/>
</div>
<div class="blank_div clearfix"></div>
</form>
<%--</div>--%>
</body>
</html>
var gridManager = null;
$(document).ready(function () {
initializateUI();
loadCostCenterListGrid();
});
function initializateUI() {
UICtrl.layout("#layout", {leftWidth: 3});
}
function loadCostCenterListGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions({
addHandler: function () {
addHandler();
},
updateHandler: function () {
updateHandler();
},
deleteHandler: deleteHandler,
// Excel导入按钮
excelImpManager: {
id: 'excelImpManager', text: '导入Excel', click: function () {
excelImpManager();
}, img: 'fa-link'
},
});
gridManager = UICtrl.grid("#monthlySettlementMethodListGrid", {
columns: [
{display: "月结方式编码", name: "methodId", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "月结方式名", name: "method", width: 140, minWidth: 60, type: "string", align: "left"},
{ display: "状态", name: "status", width: 60, minWidth: 60, type: "string", align: "center",
render: function (item) {
return UICtrl.getStatusInfo(item);
}
},
],
dataAction: "server",
url: web_app.name + '/monthlySettlementMethod/slicedMonthlySettlementMethodList.ajax',
parms: {methodId: getId},
pageSize: 20,
usePager: true,
toolbar: toolbarOptions,
width: "100%",
height: "100%",
heightDiff: -8,
checkbox: true,
fixedCellHeight: true,
selectRowButtonOnly: true,
// 双击执行
onDblClickRow: function (data, rowindex, rowobj) {
updateHandler(data);
}
});
UICtrl.setSearchAreaToggle(gridManager);
}
function query(obj) {
var param = $(obj).formToJSON();
UICtrl.gridSearch(gridManager, param);
}
function reloadGrid() {
gridManager.loadData();
}
function resetForm(obj) {
$(obj).formClean();
}
function setId(value) {
$('#methodId').val(value);
}
function getId() {
return $("#methodId").val();
}
function addHandler() {
UICtrl.addTabItem({
tabid: 'monthlySettlementMethodDetail',
text: "新增月结方式",
url: web_app.name + '/monthlySettlementMethod/addMonthlySettlementMethodDetail.do'
})
}
function updateHandler(row) {
if (!row) {
row = DataUtil.getUpdateRow(gridManager);
if (!row) {
return;
}
}
UICtrl.addTabItem({
tabid: 'monthlySettlementMethodDetail',
text: "修改月结方式",
url: web_app.name + '/monthlySettlementMethod/showMonthlySettlementMethodDetail.do?methodId=' + row.methodId
})
}
//删除按钮
function deleteHandler() {
DataUtil.del({
action: 'monthlySettlementMethod/deleteMonthlySettlementMethodById.ajax',
gridManager: gridManager, idFieldName: 'methodId',
onSuccess: function () {
reloadGrid();
}
});
}
// 导入按钮
function excelImpManager() {
ExcelImpManager.showImpDialog('月结方式导入', 'monthlySettlementMethod', '100', function () {
reloadGrid();
});
}
<%--
Created by IntelliJ IDEA.
User: lenovo
Date: 2023/12/20
Time: 9:57
To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<x:base include="layout,dialog,grid,tree,combox,commonTree,excelImp" />
<x:script src='/biz/topsun/customer/monthlySettlementMethodList.js'/>
</head>
<body>
<div class="container-fluid">
<div class="ui-hide">
<%-- <x:select name="processType" dictionary="processType" />--%>
<%-- <x:select name="yesorno" dictionary="yesorno" />--%>
</div>
<div id="layout">
<div position="center" title="月结方式">
<x:title title="common.button.search" hideTable="queryMainForm" isHide="true" />
<form class="hg-form ui-hide" method="post" action="" id="queryMainForm">
<x:inputC name="ruleKind" required="false" label="月结方式名" labelCol="1"/>
<x:searchButtons />
</form>
<div class="blank_div clearfix"></div>
<div id="monthlySettlementMethodListGrid" style="margin: 2px;"></div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
package com.huigou.topsun.customer.application.Impl;
import com.huigou.data.jdbc.util.BatchSqlUpdateDetail;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.topsun.base.dictionary.domain.DictionaryImportData;
import com.huigou.topsun.customer.application.MSMDictionaryImportApplication;
import com.huigou.topsun.customer.domain.MonthlySettlementMethodData;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import com.huigou.uasp.tool.dataimport.application.ExcelImportInterface;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* title:
* author:ZHT
* date:2023/12/20
* description:
*/
@Service("MSMDictionaryImportApplication")
public class MSMDictionaryImportApplicationImpl extends BaseApplication implements MSMDictionaryImportApplication, ExcelImportInterface {
@Override
public void executeImport(String batchNumber) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "queryTempData");
//前提是建立数据字典,不添加明细。这里传入数据字典的编码
// String dictionaryId = sqlExecutorDao.queryToString(queryDescriptor.getSql(), "monthlySettlementMethod");
String sql = queryDescriptor.getSqlByName("queryImpTempDatas");
//获取导入的数据条目
List<MonthlySettlementMethodData> tmpDatas = this.sqlExecutorDao.queryToList(sql, MonthlySettlementMethodData.class, batchNumber);
if (tmpDatas == null || tmpDatas.size() == 0) {
return;
}
// 插入预算记录
BatchSqlUpdateDetail inserts = this.getBatchInsertDetail();
for (MonthlySettlementMethodData tmp : tmpDatas) {
// tmp.setDictionaryId(dictionaryId);
if (!tmp.isError()) {
// 执行插入
tmp.setId(tmp.getTmpId());
tmp.setStatus("1");
inserts.setRows(tmp);
}
}
inserts.flush();
}
private BatchSqlUpdateDetail getBatchInsertDetail() {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "queryTempData");
Map<String, Integer> paramType = new HashMap<String, Integer>();
return BatchSqlUpdateDetail.newInstance(this.sqlExecutorDao.getDataSource(),
queryDescriptor.getSqlByName("insertRecord"), paramType);
}
}
package com.huigou.topsun.customer.application.Impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.customer.application.MonthlySettlementMethodApplication;
import com.huigou.topsun.customer.domain.MonthlySettlementMethod;
import com.huigou.topsun.customer.domain.query.MonthlySettlementMethodQueryRequest;
import com.huigou.topsun.customer.domain.vo.MonthlySettlementMethodVo;
import com.huigou.topsun.customer.repository.MonthlySettlementMethodRepository;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* title:
* author:ZHT
* date:2023/12/20
* description:
*/
@Service
public class MonthlySettlementMethodApplicationImpl extends BaseApplication implements MonthlySettlementMethodApplication {
@Autowired
private MonthlySettlementMethodRepository monthlySettlementMethodRepository;
@Override
public void deleteById(List<String> ids) {
ids.forEach(id -> monthlySettlementMethodRepository.delete(id));
}
@Override
public MonthlySettlementMethodVo getOneById(String methodId) {
MonthlySettlementMethod monthlySettlementMethod = monthlySettlementMethodRepository.getOne(methodId);
return MonthlySettlementMethodVo.getMonthlySettlementMethodVo(monthlySettlementMethod);
}
@Override
public Map<String, Object> getList(MonthlySettlementMethodQueryRequest monthlySettlementMethodQueryRequest) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "monthlySettlementMethod");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, monthlySettlementMethodQueryRequest);
Map<String, Object> map = this.sqlExecutorDao.executeSlicedQuery(queryModel);
return map;
}
@Override
public MonthlySettlementMethodVo saveAndUpdate(MonthlySettlementMethod monthlySettlementMethod) {
return MonthlySettlementMethodVo.getMonthlySettlementMethodVo(monthlySettlementMethodRepository.saveAndFlush(monthlySettlementMethod));
}
}
package com.huigou.topsun.customer.application;
/**
* title:
* author:ZHT
* date:2023/12/20
* description:
*/
public interface MSMDictionaryImportApplication {
static String QUERY_XML_FILE_PATH = "config/topsun/customer/dictionaryImport.xml";
}
package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.domain.MonthlySettlementMethod;
import com.huigou.topsun.customer.domain.query.MonthlySettlementMethodQueryRequest;
import com.huigou.topsun.customer.domain.vo.MonthlySettlementMethodVo;
import java.util.List;
import java.util.Map;
/**
* title:
* author:ZHT
* date:2023/12/20
* description:
*/
public interface MonthlySettlementMethodApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
void deleteById(List<String> ids);
MonthlySettlementMethodVo getOneById(String methodId);
Map<String, Object> getList(MonthlySettlementMethodQueryRequest monthlySettlementMethodQueryRequest);
MonthlySettlementMethodVo saveAndUpdate(MonthlySettlementMethod monthlySettlementMethod);
}
...@@ -31,6 +31,19 @@ public class CustomerDebtContactController extends CommonController { ...@@ -31,6 +31,19 @@ public class CustomerDebtContactController extends CommonController {
return "/biz/topsun/custcomer/"; return "/biz/topsun/custcomer/";
} }
/**
* 跳转到催货款通知邮箱展示页面
*/
public String forwardCustomerDebtContactList() {
return forward("customerDebtContactList");
}
/**
* 跳转到催货款通知邮箱新增页面
*/
public String saveCustomerDebtContactDetail() {
return forward("customerDebtContactDetail");
}
/** /**
* 获取催货款通知邮箱 * 获取催货款通知邮箱
*/ */
......
...@@ -31,6 +31,19 @@ public class CustomerPayInfoController extends CommonController { ...@@ -31,6 +31,19 @@ public class CustomerPayInfoController extends CommonController {
return "/biz/topsun/custcomer/"; return "/biz/topsun/custcomer/";
} }
/**
* 跳转到客户付款信息展示页面
*/
public String forwardCustomerPayInfoList() {
return forward("customerPayInfoList");
}
/**
* 跳转到客户付款信息新增页面
*/
public String saveCustomerPayInfoDetail() {
return forward("customerPayInfoDetail");
}
/** /**
* 获取客户付款信息 * 获取客户付款信息
*/ */
......
...@@ -30,7 +30,18 @@ public class CustomerRelatedController extends CommonController { ...@@ -30,7 +30,18 @@ public class CustomerRelatedController extends CommonController {
protected String getPagePath() { protected String getPagePath() {
return "/biz/topsun/custcomer/"; return "/biz/topsun/custcomer/";
} }
/**
* 跳转到客户管理信息展示页面
*/
public String forwardCustomerRelatedList() {
return forward("customerRelatedList");
}
/**
* 跳转到客户管理信息新增页面
*/
public String saveCustomerRelatedDetail() {
return forward("customerRelatedDetail");
}
/** /**
* 获取客户关联信息 * 获取客户关联信息
*/ */
......
package com.huigou.topsun.customer.controller;
import com.huigou.topsun.customer.application.MonthlySettlementMethodApplication;
import com.huigou.topsun.customer.domain.MonthlySettlementMethod;
import com.huigou.topsun.customer.domain.query.MonthlySettlementMethodQueryRequest;
import com.huigou.topsun.customer.domain.vo.MonthlySettlementMethodVo;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.util.List;
/**
* title:
* author:ZHT
* date:2023/12/20
* description:
* 月结方式表
*/
@Controller
@ControllerMapping("/monthlySettlementMethod")
public class MonthlySettlementMethodController extends CommonController {
@Autowired
private MonthlySettlementMethodApplication monthlySettlementMethodApplication;
@Override
protected String getPagePath() {
return "/biz/topsun/customer/";
}
/**
* 跳转到月结方式页面
*/
public String forwardMonthlySettlementMethodList() {
return forward("monthlySettlementMethodList");
}
/**
* 获取月结方式列表
*/
public String slicedMonthlySettlementMethodList() {
SDO sdo = this.getSDO();
MonthlySettlementMethodQueryRequest monthlySettlementMethodQueryRequest = sdo.toQueryRequest(MonthlySettlementMethodQueryRequest.class);
return toResult(monthlySettlementMethodApplication.getList(monthlySettlementMethodQueryRequest));
}
/**
* 跳转到添加页面
*/
public String addMonthlySettlementMethodDetail() {
return forward("monthlySettlementMethodDetail");
// return forward("ESText");
}
/**
* 保存月结方式
*/
public String saveMonthlySettlementMethod() {
MonthlySettlementMethodVo monthlySettlementMethodVo = this.getSDO().toObject(MonthlySettlementMethodVo.class);
MonthlySettlementMethod monthlySettlementMethod = MonthlySettlementMethodVo.getMonthlySettlementMethod(monthlySettlementMethodVo);
monthlySettlementMethodVo = monthlySettlementMethodApplication.saveAndUpdate(monthlySettlementMethod);
return success(monthlySettlementMethodVo);
}
/**
* 根据id删除月结方式
*/
public String deleteMonthlySettlementMethodById() {
List<String> ids = this.getSDO().getIds();
monthlySettlementMethodApplication.deleteById(ids);
return success();
}
/**
* 根据id获取单个月结方式
*/
public String showMonthlySettlementMethodDetail() {
String methodId = this.getSDO().getString("methodId");
MonthlySettlementMethodVo monthlySettlementMethodVo = monthlySettlementMethodApplication.getOneById(methodId);
return forward("monthlySettlementMethodDetail", monthlySettlementMethodVo);
}
}
...@@ -5,6 +5,7 @@ import java.util.Date; ...@@ -5,6 +5,7 @@ import java.util.Date;
import javax.persistence.*; import javax.persistence.*;
import lombok.Data; import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
/** /**
* 催货款通知邮箱 * 催货款通知邮箱
...@@ -18,6 +19,8 @@ public class CustomerDebtContact implements Serializable { ...@@ -18,6 +19,8 @@ public class CustomerDebtContact implements Serializable {
* 催货款通知邮箱id * 催货款通知邮箱id
*/ */
@Id @Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "customer_debt_contact_id") @Column(name = "customer_debt_contact_id")
private String customerDebtContactId; private String customerDebtContactId;
......
...@@ -5,6 +5,7 @@ import java.util.Date; ...@@ -5,6 +5,7 @@ import java.util.Date;
import javax.persistence.*; import javax.persistence.*;
import lombok.Data; import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
/** /**
* 客户付款信息 * 客户付款信息
...@@ -18,6 +19,8 @@ public class CustomerPayInfo implements Serializable { ...@@ -18,6 +19,8 @@ public class CustomerPayInfo implements Serializable {
* 客户付款信息表id * 客户付款信息表id
*/ */
@Id @Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "customer_pay_info_id") @Column(name = "customer_pay_info_id")
private String customerPayInfoId; private String customerPayInfoId;
......
...@@ -5,6 +5,7 @@ import java.util.Date; ...@@ -5,6 +5,7 @@ import java.util.Date;
import javax.persistence.*; import javax.persistence.*;
import lombok.Data; import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
/** /**
* 关联客户 * 关联客户
...@@ -18,6 +19,8 @@ public class CustomerRelated implements Serializable { ...@@ -18,6 +19,8 @@ public class CustomerRelated implements Serializable {
* 关联客户id * 关联客户id
*/ */
@Id @Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "customer_related_id") @Column(name = "customer_related_id")
private String customerRelatedId; private String customerRelatedId;
......
package com.huigou.topsun.customer.domain;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import java.io.Serializable;
/**
* 月结方式表
*
* @TableName monthly_settlement_method
*/
@Table(name = "monthly_settlement_method")
@Entity
@Data
public class MonthlySettlementMethod implements Serializable {
/**
* 月结方式id
*/
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "method_id")
private String methodId;
/**
* 月结方式
*/
@Column(name = "method")
private String method;
/**
* 状态
*/
@Column(name = "status")
private String status;
/**
* 序列
*/
@Column(name = "sequence")
private String sequence;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.huigou.topsun.customer.domain;
import com.huigou.data.domain.model.AbstractEntity;
import com.huigou.util.StringUtil;
import lombok.Data;
/**
* title:
* author:ZHT
* date:2023/12/21
* description:
*/
@Data
public class MonthlySettlementMethodData extends AbstractEntity {
private String tmpId;
/**
* 名称
*/
private String name;
/**
* 序列
*/
private String sequence;
/**
* 状态
*/
private String status;
private String message;
public boolean isError() {
if (StringUtil.isBlank(status)) {
return false;
}
if (status.equals("2")) {
return true;
}
return false;
}
}
package com.huigou.topsun.customer.domain.query;
import com.huigou.data.domain.query.QueryAbstractRequest;
import lombok.Data;
/**
* title:
* author:ZHT
* date:2023/12/20
* description:
*/
@Data
public class MonthlySettlementMethodQueryRequest extends QueryAbstractRequest {
/**
* 月结方式id
*/
private String methodId;
/**
* 月结方式
*/
private String method;
/**
* 状态
*/
private String status;
/**
* 序列
*/
private String sequence;
}
package com.huigou.topsun.customer.domain.vo;
import com.alibaba.fastjson.JSON;
import com.huigou.topsun.customer.domain.MonthlySettlementMethod;
import lombok.Data;
import java.io.Serializable;
/**
* title:
* author:ZHT
* date:2023/12/20
* description:
*/
@Data
public class MonthlySettlementMethodVo implements Serializable {
private String methodId;
private String method;
private String status;
private String sequence;
public static MonthlySettlementMethod getMonthlySettlementMethod(MonthlySettlementMethodVo monthlySettlementMethodVo) {
return JSON.parseObject(JSON.toJSONString(monthlySettlementMethodVo), MonthlySettlementMethod.class);
}
public static MonthlySettlementMethodVo getMonthlySettlementMethodVo(MonthlySettlementMethod monthlySettlementMethod) {
return JSON.parseObject(JSON.toJSONString(monthlySettlementMethod), MonthlySettlementMethodVo.class);
}
}
package com.huigou.topsun.customer.repository;
import com.huigou.topsun.customer.domain.MonthlySettlementMethod;
import org.springframework.data.jpa.repository.JpaRepository;
/**
* title:
* author:ZHT
* date:2023/12/20
* description:
*/
public interface MonthlySettlementMethodRepository extends JpaRepository<MonthlySettlementMethod, String> {
}
<?xml version="1.0" encoding="UTF-8"?>
<easy-search-mappings>
<easy-search name="monthlySettlementMethodApplyCode" desc="订单">
<sql>
select m.method_id, m.method,m.status,m.sequence
from monthly_settlement_method m
where status = 1
</sql>
<field name="月結方式" title="月结方式" code="method" width="543"/>
<field name="月結方式Id" title="月结方式id" code="methodId" width="200" type="hidden"/>
<condition column="method" name="method" symbol="like"
alias="m" />
<orderby> sequence asc</orderby>
</easy-search>
</easy-search-mappings>
\ No newline at end of file
...@@ -38,4 +38,10 @@ ...@@ -38,4 +38,10 @@
select c.* from customer_contact c where c.customer_id = ? select c.* from customer_contact c where c.customer_id = ?
</sql-query> </sql-query>
</query> </query>
<query name="monthlySettlementMethod" label="月结方式表" table="monthly_settlement_method">
<sql-query>
select t.* from monthly_settlement_method t where 1=1 order by t.sequence
</sql-query>
</query>
</query-mappings> </query-mappings>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- 月结方式字典Excel导入-->
<query-mappings>
<query name="queryTempData" label="" table="tmp_monthly_settlement_method">
<sql-query>
select t.id from monthly_settlement_method t where 1=1
</sql-query>
<sql name="queryImpTempDatas">
select t.*
from tmp_monthly_settlement_method t where t.batch_number=?
</sql>
<sql name="updateImpTempDatas">
update tmp_monthly_settlement_method t set t.status =:status where t.tmp_id=:tmpId
</sql>
<sql name="insertRecord">
insert into monthly_settlement_method
(method_id,
method,
sequence,
status)
values
(:id,
:name,
:sequence,
1
)
</sql>
</query>
</query-mappings>
\ No newline at end of file
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