Commit a1a3f922 authored by 覃振观's avatar 覃振观 👶

Merge remote-tracking branch 'origin/dev' into dev

parents 2ca4e0fb ab312112
...@@ -6,6 +6,10 @@ log.db.url=jdbc:mysql://192.168.222.122:3406/topsun?serverTimezone=GMT%2B8&useUn ...@@ -6,6 +6,10 @@ log.db.url=jdbc:mysql://192.168.222.122:3406/topsun?serverTimezone=GMT%2B8&useUn
log.db.user=root log.db.user=root
log.db.password=123456 log.db.password=123456
hana.db.url=jdbc:mysql://127.0.0.1:3306/topsun?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&useSSL=false
hana.db.user=topsun
hana.db.password=topsun
#pub.db.url=jdbc:mysql://127.0.0.1:3306/topsun?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&useSSL=false #pub.db.url=jdbc:mysql://127.0.0.1:3306/topsun?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&useSSL=false
#pub.db.user=topsun #pub.db.user=topsun
#pub.db.password=topsun #pub.db.password=topsun
......
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd">
<bean id="mysqlDataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<property name="url" value="${pub.db.url}"/>
<property name="username" value="${pub.db.user}"/>
<property name="password" value="${pub.db.password}"/>
<property name="filters" value="stat"/>
<property name="maxActive" value="20"/>
<property name="initialSize" value="1"/>
<!--<property name="maxWait" value="60000"/>-->
<property name="maxWait" value="20000"/>
<property name="minIdle" value="1"/>
<property name="timeBetweenEvictionRunsMillis" value="60000"/>
<property name="minEvictableIdleTimeMillis" value="300000"/>
<property name="testWhileIdle" value="true"/>
<property name="testOnBorrow" value="true"/>
<property name="testOnReturn" value="false"/>
<property name="validationQuery" value="select 1"/>
<property name="poolPreparedStatements" value="true"/>
<property name="maxOpenPreparedStatements" value="20"/>
<property name="asyncInit" value="true"/>
<!--property name="keepAlive" value="true"/>-->
</bean>
<bean id="hanaDataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<property name="url" value="${hana.db.url}"/>
<property name="username" value="${hana.db.user}"/>
<property name="password" value="${hana.db.password}"/>
<property name="filters" value="stat"/>
<property name="maxActive" value="20"/>
<property name="initialSize" value="1"/>
<!--<property name="maxWait" value="60000"/>-->
<property name="maxWait" value="20000"/>
<property name="minIdle" value="1"/>
<property name="timeBetweenEvictionRunsMillis" value="60000"/>
<property name="minEvictableIdleTimeMillis" value="300000"/>
<property name="testWhileIdle" value="true"/>
<property name="testOnBorrow" value="true"/>
<property name="testOnReturn" value="false"/>
<property name="validationQuery" value="select 1"/>
<property name="poolPreparedStatements" value="true"/>
<property name="maxOpenPreparedStatements" value="20"/>
<property name="asyncInit" value="true"/>
<!--property name="keepAlive" value="true"/>-->
</bean>
<bean id="lobHandler" lazy-init="true" class="com.alibaba.druid.support.spring.DruidLobHandler">
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource"/>
</bean>
<!--
配置切面 需要扫描的@DataSource的位置
为业务逻辑层的方法解析@DataSource注解
为当前线程的HandleDataSource注入数据源
-->
<bean id="sourceAspect" class="com.huigou.topsun.dataSource.DataSourceAspect" />
<aop:config>
<aop:aspect id="dataSourceAspect" ref="sourceAspect" order="-999">
<!--<aop:pointcut id="ds" expression="execution(* com.huigou.topsun.technology.application..*.*(..)) and !execution(* com.huigou.topsun.technology.application.*Impl.*(..))"/>-->
<aop:pointcut id="ds" expression="execution(* com.huigou..application..*.*(..)) and !execution(* com.huigou..application.*Impl.*(..))"/>
<aop:before pointcut-ref="ds" method="before" />
<aop:after pointcut-ref="ds" method="after"/>
</aop:aspect>
</aop:config>
<!-- 动态数据源,根据service接口上的注解来决定取哪个数据源 -->
<bean id="dataSource" class="com.huigou.topsun.dataSource.DynamicDataSource">
<property name="targetDataSources">
<map key-type="java.lang.String">
<entry key="hanaDataSource" value-ref="hanaDataSource"/>
<entry key="mysqlDataSource" value-ref="mysqlDataSource"/>
</map>
</property>
<!--默认用主库 -->
<property name="defaultTargetDataSource" ref="mysqlDataSource"/>
</bean>
</beans>
\ No newline at end of file
<%-- <%--
Created by IntelliJ IDEA. Created by IntelliJ IDEA.
User: lenovo User: zht
Date: 2023/12/21 Date: 2023/12/21
Time: 13:45 Time: 13:45
To change this template use File | Settings | File Templates.
--%> --%>
<%@ page language="java" contentType="text/html; charset=utf-8" %> <%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %> <%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
......
...@@ -17,9 +17,7 @@ function loadCustomerInfoListGrid() { ...@@ -17,9 +17,7 @@ function loadCustomerInfoListGrid() {
updateHandler: function () { updateHandler: function () {
updateHandler(); updateHandler();
}, },
deleteHandler: function () { deleteHandler: deleteHandler,
updateHandler();
}
}); });
gridManager = UICtrl.grid("#customerInfoListGrid", { gridManager = UICtrl.grid("#customerInfoListGrid", {
columns: [ columns: [
...@@ -77,7 +75,7 @@ function addHandler() { ...@@ -77,7 +75,7 @@ function addHandler() {
//删除按钮 //删除按钮
function deleteHandler() { function deleteHandler() {
DataUtil.del({ DataUtil.del({
action: 'customer/deleteCustomer.ajax', action: 'customer/deleteCustomerAndAffiliatedInfoByCustomerId.ajax',
gridManager: gridManager, idFieldName: 'customerId', gridManager: gridManager, idFieldName: 'customerId',
onSuccess: function () { onSuccess: function () {
reloadGrid(); reloadGrid();
......
<%-- <%--
Created by IntelliJ IDEA. Created by IntelliJ IDEA.
User: lenovo User: zht
Date: 2023/12/20 Date: 2023/12/20
Time: 9:58 Time: 9:58
To change this template use File | Settings | File Templates.
--%> --%>
<%@ page language="java" contentType="text/html; charset=utf-8" %> <%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %> <%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
......
<%-- <%--
Created by IntelliJ IDEA. Created by IntelliJ IDEA.
User: lenovo User: zht
Date: 2023/12/20 Date: 2023/12/20
Time: 9:57 Time: 9:57
To change this template use File | Settings | File Templates.
--%> --%>
<%@ page language="java" contentType="text/html; charset=utf-8"%> <%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x"%> <%@taglib uri="/WEB-INF/taglib.tld" prefix="x"%>
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
User: zht User: zht
Date: 2023/12/8 Date: 2023/12/8
Time: 16:30 Time: 16:30
To change this template use File | Settings | File Templates.
--%> --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %> <%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
......
<%-- <%--
Created by IntelliJ IDEA. Created by IntelliJ IDEA.
User: lenovo User: zht
Date: 2023/12/11 Date: 2023/12/11
Time: 14:36 Time: 14:36
To change this template use File | Settings | File Templates.
--%> --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x"%> <%@taglib uri="/WEB-INF/taglib.tld" prefix="x"%>
......
<%-- <%--
Created by IntelliJ IDEA. Created by IntelliJ IDEA.
User: lenovo User: zht
Date: 2023/12/13 Date: 2023/12/13
Time: 16:39 Time: 16:39
To change this template use File | Settings | File Templates.
--%> --%>
<%@ page language="java" contentType="text/html; charset=utf-8" %> <%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %> <%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
......
<%-- <%--
Created by IntelliJ IDEA. Created by IntelliJ IDEA.
User: lenovo User: zht
Date: 2023/12/13 Date: 2023/12/13
Time: 15:51 Time: 15:51
To change this template use File | Settings | File Templates.
--%> --%>
<%@ page language="java" contentType="text/html; charset=utf-8"%> <%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x"%> <%@taglib uri="/WEB-INF/taglib.tld" prefix="x"%>
......
$(document).ready(function () {
initializateUI();
// loadProcessListGrid();
bindQueryEvent();
// bindEvent();
});
function initializateUI() {
UICtrl.layout("#layout", {leftWidth: 3});
}
function bindQueryEvent() {
$('#kostl').searchbox({
type: "costCenter", name: "costCenterCode",
onChange: function (value, data) {
$('#kostl').val(data.KOSTL);
// ajaxRenderDataGoForm(data.kostl);
// showTable({proofingApplyId:data.proofingApplyId});
}
});
}
function getFixedAssetsDetail(fixedAssetsAction) {
//采购订单保存时数据不进行必填验证,提交时数据才进行必填验证
var op = {};
var check = true;
if (fixedAssetsAction == "save") {
check = false;
}
op = {check: check};
var fixedAssets = $('#submitForm').formToJSON(op);
if (!fixedAssets) {
return false;
}
return fixedAssets;
}
function saveData(action) {
debugger
var fixedAssetsDetail = getFixedAssetsDetail("submit");
if (!fixedAssetsDetail) {
return;
}
Public.ajax(web_app.name + '/sapFixedAssets/saveFixedAssets.ajax?code=' + action,fixedAssetsDetail,
function (data) {
setId(data.id);
Public.successTip("数据保存成功");
renderingDictionaries(data);
}
);
}
function closeDispatchTabItem() {
UICtrl.closeCurrentTab();
}
function setId(value) {
$('#id').val(value);
}
function getId() {
return $("#id").val();
}
/**
* 渲染带数据字典的select
* @param obj
*/
function renderingDictionaries(obj) {
console.log(obj)
//获取所有select的id名与对象匹配
$("select").each(function () {
var id = $(this).attr("id");
if (obj.hasOwnProperty(id)) {
var keyValuePairs = new Map();
$('#' + id + ' option').each(function () {
var value = $(this).val();
var text = $(this).text();
keyValuePairs.set(value, text);
});
// 获取 对应的文本值
var selectedValue = obj[id];
var selectedText = keyValuePairs.get(selectedValue);
// 将文本值赋值给目标元素
$('#' + id + '_text').val(selectedText);
$('#' + id).val(selectedValue);
console.log("select:" + id+"("+selectedText+":"+selectedValue+")")
}
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: zht
Date: 2023/12/21
Time: 15:08
--%>
<%@ 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/sap/fixedAssets/sapFixedAssetsDetail.js'/>
</head>
<body>
<%--<div class="container-fluid">--%>
<x:billTitle title="固定资产" needStatus="false" needPerson="true"/>
<div class="blank_div clearfix"></div>
<form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="id"/>
<x:hidden name="version"/>
<x:hidden name="billCode"/>
<x:hidden name="fillinDate" type="datetime"/>
<x:hidden name="fullId"/>
<x:hidden name="organId"/>
<x:hidden name="organName"/>
<x:hidden name="deptId"/>
<x:hidden name="deptName"/>
<x:hidden name="positionId"/>
<x:hidden name="positionName"/>
<x:hidden name="personMemberId"/>
<x:hidden name="personMemberName"/>
<x:hidden name="statusId"/>
<div class="hg-form-row">
<x:inputC name="anln1" required="true" label="主资产号" labelCol="2" maxLength="64" fieldCol="4"/>
<x:inputC name="anlkl" required="true" label="资产分类" labelCol="2" maxLength="64" fieldCol="4"/>
<x:inputC name="bukrs" required="true" label="公司代码" labelCol="2" maxLength="64" fieldCol="4"/>
<x:inputC name="txt50" required="true" label="文本" labelCol="2" maxLength="64" fieldCol="4"/>
<x:inputC name="invnr" required="false" label="存货号" labelCol="2" maxLength="64" fieldCol="4" />
<x:inputC name="menge" required="true" label="数量" labelCol="2" maxLength="64" fieldCol="4" />
<x:inputC name="meins" required="true" label="基本计量单位" labelCol="2" maxLength="64" fieldCol="4"/>
<x:inputC name="kostl" required="true" label="成本中心" labelCol="2" wrapper="select" fieldCol="4"/>
<x:inputC name="kostlv" 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,
});
gridManager = UICtrl.grid("#sapFixedAssetsListGrid", {
columns: [
{display: "BPM单号", name: "zbpmn", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "创建标识", name: "zflg", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "主资产号", name: "anln1", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "资产分类", name: "anlkl", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "公司代码", name: "bukrs", width: 100, minWidth: 60, type: "string", align: "left"},
{display: "文本", name: "txt50", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "存货号", name: "invnr", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "数量", name: "menge", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "基本计量单位", name: "meins", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "成本中心", name: "kostl", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "责任成本中心", name: "kostlv", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "填报日期", name: "fillinDate", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "单据编号", name: "billCode", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "流程状态", name: "statusId", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "人员名称", name: "personMemberName", width: 140, minWidth: 60, type: "string", align: "left"},
],
dataAction: "server",
url: web_app.name + '/sapFixedAssets/slicedFixedAssetsList.ajax',
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 addHandler() {
UICtrl.addTabItem({
tabid: 'sapFixedAssetsDetail',
text: "新增固定资产",
url: web_app.name + '/sapFixedAssets/addFixedAssetsDetail.job'
})
}
function updateHandler(row) {
if (!row) {
row = DataUtil.getUpdateRow(gridManager);
if (!row) {
return;
}
}
UICtrl.addTabItem({
tabid: 'FixedAssetsDetail',
text: "修改固定资产",
url: web_app.name + '/sapFixedAssets/showFixedAssetsDetail.do?id='+row.id
})
}
//删除按钮
function deleteHandler() {
DataUtil.del({
action: 'sapFixedAssets/deleteCostCenterById.ajax',
gridManager: gridManager, idFieldName: 'id',
onSuccess: function () {
reloadGrid();
}
});
}
<%--
Created by IntelliJ IDEA.
User: zht
Date: 2023/12/21
Time: 15:08
--%>
<%@ 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" />
<x:script src='/biz/topsun/sap/fixedAssets/sapFixedAssetsList.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="sapFixedAssetsListGrid" style="margin: 2px;"></div>
</div>
</div>
</div>
</body>
</html>
...@@ -14,17 +14,7 @@ public interface CustomerApplication { ...@@ -14,17 +14,7 @@ public interface CustomerApplication {
Map<String, Object> findCustomerByPage(CustomerQueryRequest customerQueryRequest); Map<String, Object> findCustomerByPage(CustomerQueryRequest customerQueryRequest);
List<CustomerContact> findContactByPage(String customerId); List<CustomerContact> findContactByPage(String customerId);
void deleteContactById(String id);
void deleteContactByIds(List<String> ids);
} }
package com.huigou.topsun.customer.application; package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.controller.CustomerRelatedController;
import com.huigou.topsun.customer.domain.CustomerRelated; import com.huigou.topsun.customer.domain.CustomerRelated;
import com.huigou.topsun.customer.domain.query.CustomerRelatedQueryRequest; import com.huigou.topsun.customer.domain.query.CustomerRelatedQueryRequest;
import com.huigou.topsun.customer.domain.vo.CustomerRelatedVo; import com.huigou.topsun.customer.domain.vo.CustomerRelatedVo;
...@@ -14,9 +15,9 @@ import java.util.Map; ...@@ -14,9 +15,9 @@ import java.util.Map;
* description: * description:
*/ */
public interface CustomerRelatedApplication { public interface CustomerRelatedApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
Map<String, Object> getCustomerRelatedList(CustomerRelatedQueryRequest queryRequest);
List<CustomerRelated> getCustomerRelatedList(String customerId);
CustomerRelatedVo saveCustomerRelated(CustomerRelated customerRelated); CustomerRelatedVo saveCustomerRelated(CustomerRelated customerRelated);
......
package com.huigou.topsun.customer.application.Impl; package com.huigou.topsun.customer.application.Impl;
import com.huigou.cache.DictUtil;
import com.huigou.data.query.model.QueryDescriptor; import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel; import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.customer.application.CustomerApplication; import com.huigou.topsun.customer.application.CustomerApplication;
import com.huigou.topsun.customer.domain.CustomerContact; import com.huigou.topsun.customer.domain.CustomerContact;
import com.huigou.topsun.customer.domain.query.ContactQueryRequest;
import com.huigou.topsun.customer.domain.query.CustomerQueryRequest; import com.huigou.topsun.customer.domain.query.CustomerQueryRequest;
import com.huigou.topsun.customer.repository.CustomerRepository; import com.huigou.topsun.customer.repository.CustomerContactRepository;
import com.huigou.uasp.bmp.common.application.BaseApplication; import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -19,6 +20,8 @@ import java.util.Map; ...@@ -19,6 +20,8 @@ import java.util.Map;
@Service @Service
public class CustomerApplicationImpl extends BaseApplication implements CustomerApplication { public class CustomerApplicationImpl extends BaseApplication implements CustomerApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml"; public static final String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
@Autowired
private CustomerContactRepository customerContactRepository;
/** /**
...@@ -44,4 +47,25 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer ...@@ -44,4 +47,25 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
List<CustomerContact> customerContactList = this.sqlExecutorDao.queryToList(queryDescriptor.getSql(), CustomerContact.class, customerId); List<CustomerContact> customerContactList = this.sqlExecutorDao.queryToList(queryDescriptor.getSql(), CustomerContact.class, customerId);
return customerContactList; return customerContactList;
} }
/**
* 根据单个id删除
* @param id
*/
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void deleteContactById(String id) {
customerContactRepository.delete(id);
}
/**
* 批量进行删除
* @param ids
*/
@Override
@Transactional
public void deleteContactByIds(List<String> ids) {
ids.forEach(this::deleteContactById);
}
} }
...@@ -23,16 +23,15 @@ import java.util.Map; ...@@ -23,16 +23,15 @@ import java.util.Map;
*/ */
@Service @Service
public class CustomerRelatedApplicationImpl extends BaseApplication implements CustomerRelatedApplication { public class CustomerRelatedApplicationImpl extends BaseApplication implements CustomerRelatedApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
@Autowired @Autowired
private CustomerRelatedRepository customerRelatedRepository; private CustomerRelatedRepository customerRelatedRepository;
@Override @Override
public Map<String, Object> getCustomerRelatedList(CustomerRelatedQueryRequest queryRequest) { public List<CustomerRelated> getCustomerRelatedList(String customerId) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "customerRelated"); QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH,"customerRelated");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest); List<CustomerRelated> customerRelatedList = sqlExecutorDao.queryToList(queryDescriptor.getSql(), CustomerRelated.class, customerId);
Map<String, Object> map = this.sqlExecutorDao.executeSlicedQuery(queryModel); return customerRelatedList;
return map;
} }
@Override @Override
......
...@@ -158,6 +158,29 @@ public class CustomerController extends CommonController { ...@@ -158,6 +158,29 @@ public class CustomerController extends CommonController {
return customerBank; return customerBank;
} }
/**
* 根据id列表删除联系人
* @return
*/
public String deleteContact() {
SDO sdo = getSDO();
List<String> ids = sdo.getIds();
customerApplication.deleteContactByIds(ids);
return success();
}
/**
* 删除客户及其附属信息
* @return
*/
public String deleteCustomerAndAffiliatedInfoByCustomerId() {
SDO sdo = getSDO();
String customerId = sdo.getString("customerId");
//TODO
//多表联删
return success();
}
......
...@@ -51,7 +51,8 @@ public class CustomerDebtContactController extends CommonController { ...@@ -51,7 +51,8 @@ public class CustomerDebtContactController extends CommonController {
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
String customerId = sdo.getString("customerId"); String customerId = sdo.getString("customerId");
String customerEmailType = sdo.getString("customerEmailType"); String customerEmailType = sdo.getString("customerEmailType");
return packGridDataAndResult(customerDebtContactApplication.getCustomerDebtContactList(customerId,customerEmailType)); List<CustomerDebtContact> customerDebtContactList = customerDebtContactApplication.getCustomerDebtContactList(customerId, customerEmailType);
return packGridDataAndResult(customerDebtContactList);
} }
/** /**
......
...@@ -47,9 +47,9 @@ public class CustomerRelatedController extends CommonController { ...@@ -47,9 +47,9 @@ public class CustomerRelatedController extends CommonController {
*/ */
public String slicedCustomerRelatedList() { public String slicedCustomerRelatedList() {
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
CustomerRelatedQueryRequest queryRequest = sdo.toQueryRequest(CustomerRelatedQueryRequest.class); String customerId = sdo.getString("customerId");
List<CustomerRelated> customerRelatedList = customerRelatedApplication.getCustomerRelatedList(customerId);
return toResult(customerRelatedApplication.getCustomerRelatedList(queryRequest)); return packGridDataAndResult(customerRelatedList);
} }
/** /**
......
package com.huigou.topsun.dataSource;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 目标数据源注解,注解在方法上指定数据源的名称
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface DataSource {
String value();//此处接收的是数据源的名称
}
\ No newline at end of file
package com.huigou.topsun.dataSource;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.reflect.MethodSignature;
import java.lang.reflect.Method;
@Slf4j
public class DataSourceAspect {
/**
* 在dao层方法获取datasource对象之前,在切面中指定当前线程数据源
*/
public void before(JoinPoint point) {
Class<?>[] parameterTypes = ((MethodSignature)point.getSignature()).getMethod().getParameterTypes();
Method method = null;
try {
method = point.getTarget().getClass().getDeclaredMethod(point.getSignature().getName(), parameterTypes);
if (method != null && method.isAnnotationPresent(DataSource.class)) {
DataSource data = method.getAnnotation(DataSource.class);
log.debug("用户选择数据库库类型: {}", data.value());
HandleDataSource.putDataSource(data.value()); // 数据源放到当前线程中
}
} catch (Exception e) {
log.error("aop分配数据源异常", e);
}
}
public void after(JoinPoint joinPoint) throws Throwable {
HandleDataSource.removeDataSource();
}
}
\ No newline at end of file
package com.huigou.topsun.dataSource;
import com.huigou.util.StringUtil;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
public class DynamicDataSource extends AbstractRoutingDataSource {
/**
* 获取与数据源相关的key 此key是Map<String,DataSource> resolvedDataSources 中与数据源绑定的key值
* 在通过determineTargetDataSource获取目标数据源时使用
*/
@Override
protected Object determineCurrentLookupKey() {
String dataSource = HandleDataSource.getDataSource();
if (StringUtil.isNotBlank(dataSource)){
System.out.println("——————————切换的数据源是:——————————"+dataSource);
}
return dataSource;
}
}
\ No newline at end of file
package com.huigou.topsun.dataSource;
public class HandleDataSource {
public static final ThreadLocal<String> holder = new ThreadLocal<String>();
/**
* 绑定当前线程数据源
*
* @param datasource
*/
public static void putDataSource(String datasource) {
holder.set(datasource);
}
/**
* 获取当前线程的数据源
*
* @return
*/
public static String getDataSource() {
return holder.get();
}
public static void removeDataSource(){
holder.remove();
}
}
\ No newline at end of file
...@@ -16,15 +16,6 @@ import java.util.Date; ...@@ -16,15 +16,6 @@ import java.util.Date;
@Entity @Entity
@Data @Data
public class CostCenter extends AbstractEntity { public class CostCenter extends AbstractEntity {
/**
* id
*/
// @Id
// @GeneratedValue(generator = "system-uuid")
// @GenericGenerator(name = "system-uuid", strategy = "guid")
// @Column(name = "id")
// private String id;
/** /**
* 成本中心编码 * 成本中心编码
......
package com.huigou.topsun.sap.fixedAssets.application; package com.huigou.topsun.sap.fixedAssets.application;
import com.huigou.context.Operator;
import com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssets;
import com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedAssetsQueryRequest;
import com.huigou.topsun.sap.fixedAssets.domain.vo.SapFixedAssetsVo;
import org.activiti.engine.delegate.DelegateExecution;
import java.util.List;
import java.util.Map;
/** /**
* @Auther: xin.lu * @Auther: xin.lu
* @Date: 2023/12/21/9:37 * @Date: 2023/12/21/9:37
* @Description: * @Description:
*/ */
public interface SapFixedAssetsApplication { public interface SapFixedAssetsApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/sap/fixedAssets/fixedAssets.xml";
String PROCESS_DEFINITION_KEY = "sapFixedAssetsProc";
Map<String, Object> getFixedAssetsList(SapFixedAssetsQueryRequest sapFixedAssetsVo);
SapFixedAssetsVo getFixedAssetsById(String id);
void deleteByIds(List<String> ids);
SapFixedAssetsVo saveAndUpdate(SapFixedAssets sapFixedAssets, Operator operator);
} }
package com.huigou.topsun.sap.fixedAssets.application.impl; package com.huigou.topsun.sap.fixedAssets.application.impl;
import com.huigou.context.Operator;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.demo.domain.model.Leave;
import com.huigou.topsun.sap.fixedAssets.application.SapFixedAssetsApplication; import com.huigou.topsun.sap.fixedAssets.application.SapFixedAssetsApplication;
import com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssets;
import com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedAssetsQueryRequest;
import com.huigou.topsun.sap.fixedAssets.domain.vo.SapFixedAssetsVo;
import com.huigou.topsun.sap.fixedAssets.repository.SapFixedAssetsRepository;
import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.bpm.FlowBroker; import com.huigou.uasp.bpm.FlowBroker;
import com.huigou.util.ClassHelper;
import com.huigou.util.StringUtil;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.DelegateTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Map;
/** /**
* @Auther: xin.lu * @Auther: xin.lu
* @Date: 2023/12/21/9:37 * @Date: 2023/12/21/9:37
...@@ -11,4 +29,105 @@ import org.springframework.stereotype.Service; ...@@ -11,4 +29,105 @@ import org.springframework.stereotype.Service;
*/ */
@Service("sapFixedAssetsApplication") @Service("sapFixedAssetsApplication")
public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixedAssetsApplication { public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixedAssetsApplication {
@Autowired
private SapFixedAssetsRepository sapFixedAssetsRepository;
@Override
public Map<String, Object> getFixedAssetsList(SapFixedAssetsQueryRequest sapFixedAssetsQueryRequest) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "sapFixedAssets");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, sapFixedAssetsQueryRequest);
Map<String, Object> map = this.sqlExecutorDao.executeSlicedQuery(queryModel);
return map;
}
@Override
public SapFixedAssetsVo getFixedAssetsById(String id) {
return SapFixedAssetsVo.getSapFixedAssetsVo(sapFixedAssetsRepository.getOne(id));
}
@Override
public void deleteByIds(List<String> ids) {
ids.forEach(id -> sapFixedAssetsRepository.delete(id));
}
@Override
public SapFixedAssetsVo saveAndUpdate(SapFixedAssets sapFixedAssets, Operator operator) {
// 判断修改还是新增
if (StringUtil.isNotBlank(sapFixedAssets.getId())) {
// 修改
// 将标识修改为2
sapFixedAssets.setZflg(2);
sapFixedAssets = sapFixedAssetsRepository.saveAndFlush(sapFixedAssets);
} else {
// 新增
// 封装填报时间
long timestamp = System.currentTimeMillis();
sapFixedAssets.setFillinDate(new Date(timestamp));
// 封装人员信息
sapFixedAssets.setFullId(operator.getFullId());
sapFixedAssets.setOrganId(operator.getOrgId());
sapFixedAssets.setOrganName(operator.getOrgName());
sapFixedAssets.setDeptId(operator.getDeptId());
sapFixedAssets.setDeptName(operator.getDeptName());
sapFixedAssets.setPositionId(operator.getPositionId());
sapFixedAssets.setPositionName(operator.getPositionName());
sapFixedAssets.setPersonMemberId(operator.getPersonMemberId());
sapFixedAssets.setPersonMemberName(operator.getPersonMemberName());
sapFixedAssets.setStatusId(BizBillStatus.APPLYING.getId());
sapFixedAssets.setZflg(1);
sapFixedAssets = sapFixedAssetsRepository.saveAndFlush(sapFixedAssets);
}
return SapFixedAssetsVo.getSapFixedAssetsVo(sapFixedAssets);
}
@Override
protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapFixedAssets fixedAssets = sapFixedAssetsRepository.findOne(bizId);
fixedAssets.setStatusId(status.getId());
sapFixedAssetsRepository.save(fixedAssets);
}
@Override
protected void onAbortProcessInstance(DelegateExecution delegateExecution) {
super.onAbortProcessInstance(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey();
SapFixedAssets fixedAssets = sapFixedAssetsRepository.findOne(bizId);
fixedAssets.setStatusId(BizBillStatus.ABORTED.getId());
sapFixedAssetsRepository.save(fixedAssets);
}
@Override
protected void onBack(DelegateTask delegateTask, String destActivityId) {
super.onBack(delegateTask, destActivityId);
if ("Apply".equalsIgnoreCase(destActivityId)) {
String bizId = delegateTask.getExecution().getProcessBusinessKey();
SapFixedAssets fixedAssets = sapFixedAssetsRepository.findOne(bizId);
fixedAssets.setStatusId(BizBillStatus.APPLYING.getId());
sapFixedAssetsRepository.save(fixedAssets);
}
}
@Override
protected Map<String, Object> getProcessBizParams(String bizId) {
return ClassHelper.toMap(sapFixedAssetsRepository.getOne(bizId));
}
@Override
protected String saveBizAndApprovalData() {
super.saveBizAndApprovalData();
SapFixedAssets sapFixedAssets = getBizEntity(SapFixedAssets.class);
if (sapFixedAssets.isNew()) {
sapFixedAssets.setStatusId(BizBillStatus.APPLYING.getId());
} else {
sapFixedAssets = (SapFixedAssets) commonDomainService.loadAndFillinProperties(sapFixedAssets);
}
sapFixedAssets = sapFixedAssetsRepository.save(sapFixedAssets);
return sapFixedAssets.getId();
}
} }
package com.huigou.topsun.sap.fixedAssets.controller; package com.huigou.topsun.sap.fixedAssets.controller;
import com.huigou.context.Operator;
import com.huigou.context.OrgUnit;
import com.huigou.topsun.demo.application.LeaveApplication;
import com.huigou.topsun.demo.domain.model.Leave;
import com.huigou.topsun.sap.fixedAssets.application.SapFixedAssetsApplication;
import com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssets;
import com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedAssetsQueryRequest;
import com.huigou.topsun.sap.fixedAssets.domain.vo.SapFixedAssetsVo;
import com.huigou.uasp.annotation.ControllerMapping; import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.client.CommonController; import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import java.util.List;
/** /**
* @Auther: xin.lu * @Auther: xin.lu
* @Date: 2023/12/21/9:44 * @Date: 2023/12/21/9:44
...@@ -12,4 +25,89 @@ import org.springframework.stereotype.Controller; ...@@ -12,4 +25,89 @@ import org.springframework.stereotype.Controller;
@Controller @Controller
@ControllerMapping("/sapFixedAssets") @ControllerMapping("/sapFixedAssets")
public class SapFixedAssetsController extends CommonController { public class SapFixedAssetsController extends CommonController {
@Autowired
private SapFixedAssetsApplication sapFixedAssetsApplication;
@Override
protected String getPagePath() {
return "/biz/topsun/sap/fixedAssets/";
}
/**
* 跳转到固定资产展示页面
*/
public String forwardSapFixedAssetsList() {
return forward("sapFixedAssetsList");
}
/**
* 查询固定资产列表
*/
public String slicedFixedAssetsList() {
SDO sdo = this.getSDO();
SapFixedAssetsQueryRequest sapFixedAssetsQueryRequest = sdo.toQueryRequest(SapFixedAssetsQueryRequest.class);
return toResult(sapFixedAssetsApplication.getFixedAssetsList(sapFixedAssetsQueryRequest));
}
/**
* 跳转到新增固定资产页面
*/
public String addFixedAssetsDetail() {
this.putAttribute("processDefinitionKey", sapFixedAssetsApplication.PROCESS_DEFINITION_KEY);
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
this.putAttribute("procUnitId", "Apply");
SapFixedAssets sapFixedAssets = new SapFixedAssets();
sapFixedAssets.setStatusId(BizBillStatus.APPLYING.getId());
/**
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
*/
Operator operator = getOperator();
sapFixedAssets.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
return forward("sapFixedAssetsDetail");
}
/**
* 跳转到增固定资产页面
*/
public String showFixedAssets() {
SDO sdo = this.getSDO();
String id = sdo.getBizId();
SapFixedAssetsVo sapFixedAssetsVo = sapFixedAssetsApplication.getFixedAssetsById(id);
return forward("sapFixedAssetsDetail", sapFixedAssetsVo);
}
/**
* 根据id获取固定资产信息
*/
public String showFixedAssetsDetail() {
String id = this.getSDO().getString("id");
SapFixedAssetsVo sapFixedAssetsVo = sapFixedAssetsApplication.getFixedAssetsById(id);
return forward("sapFixedAssetsDetail",sapFixedAssetsVo);
}
/**
* 删除固定资产
*/
public String deleteCostCenterById() {
List<String> ids = this.getSDO().getIds();
sapFixedAssetsApplication.deleteByIds(ids);
return success();
}
/**
* 新增固定资产信息
*/
public String saveFixedAssets() {
SDO sdo = this.getSDO();
SapFixedAssetsVo sapFixedAssetsVo = sdo.toObject(SapFixedAssetsVo.class);
SapFixedAssets sapFixedAssets = SapFixedAssetsVo.getSapFixedAssets(sapFixedAssetsVo);
// TODO
// 判断是修改还是新增
Operator operator = sdo.getOperator();
sapFixedAssetsVo = sapFixedAssetsApplication.saveAndUpdate(sapFixedAssets,operator);
return success(sapFixedAssetsVo);
}
} }
...@@ -22,6 +22,7 @@ public class SapFixedAssets extends FlowBillAbstractEntity { ...@@ -22,6 +22,7 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
private String zbpmn; private String zbpmn;
/** /**
* 创建标识
* 用于标识数据是新增或修改,1为新增,2为修改。(必填) * 用于标识数据是新增或修改,1为新增,2为修改。(必填)
*/ */
@Column(name = "ZFLG") @Column(name = "ZFLG")
...@@ -29,12 +30,13 @@ public class SapFixedAssets extends FlowBillAbstractEntity { ...@@ -29,12 +30,13 @@ public class SapFixedAssets extends FlowBillAbstractEntity {
/** /**
* 主资产号 * 主资产号
;资产编号内部生成,当创建标识为2,即修改时,主资产号为必输。 ;资产编号内部生成,当创建标识为2,即修改时,主资产号为必输。
*/ */
@Column(name = "ANLN1") @Column(name = "ANLN1")
private String anln1; private String anln1;
/** /**
* 资产分类
* 当创建标识为1,即创建时,资产分类必输。 * 当创建标识为1,即创建时,资产分类必输。
*/ */
@Column(name = "ANLKL") @Column(name = "ANLKL")
......
package com.huigou.topsun.sap.fixedAssets.domain.query;
import com.huigou.data.domain.query.QueryAbstractRequest;
import lombok.Data;
import javax.persistence.Column;
import java.math.BigDecimal;
import java.util.Date;
/**
* title:
* author:ZHT
* date:2023/12/21
* description:
*/
@Data
public class SapFixedAssetsQueryRequest extends QueryAbstractRequest {
private String id;
private Long version;
/**
* BPM单号
*/
private String zbpmn;
/**
* 创建标识
* 用于标识数据是新增或修改,1为新增,2为修改。(必填)
*/
private Integer zflg;
/**
* 主资产号
* ;资产编号内部生成,当创建标识为2,即修改时,主资产号为必输。
*/
private String anln1;
/**
* 资产分类
* 当创建标识为1,即创建时,资产分类必输。
*/
private String anlkl;
/**
* 公司代码(必填)
*/
private String bukrs;
/**
* 文本(必填)
*/
private String txt50;
/**
* 存货号;存放地点
*/
private String invnr;
/**
* 数量
*/
private BigDecimal menge;
/**
* 基本计量单位
*/
private String meins;
/**
* 成本中心(必填)
*/
private String kostl;
/**
* 责任成本中心
*/
private String kostlv;
private Date fillinDate;
private String billCode;
private Integer statusId;
private String fullId;
private String organId;
private String organName;
private String deptId;
private String deptName;
private String positionId;
private String positionName;
private String personMemberId;
private String personMemberName;
}
package com.huigou.topsun.sap.fixedAssets.domain.vo;
import com.alibaba.fastjson.JSON;
import com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssets;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* title:
* author:ZHT
* date:2023/12/21
* description:
* sapFixedAssets
*/
@Data
public class SapFixedAssetsVo implements Serializable {
private String id;
private Long version;
/**
* BPM单号
*/
private String zbpmn;
/**
* 创建标识
* 用于标识数据是新增或修改,1为新增,2为修改。(必填)
*/
private Integer zflg;
/**
* 主资产号
* ;资产编号内部生成,当创建标识为2,即修改时,主资产号为必输。
*/
private String anln1;
/**
* 资产分类
* 当创建标识为1,即创建时,资产分类必输。
*/
private String anlkl;
/**
* 公司代码(必填)
*/
private String bukrs;
/**
* 文本(必填)
*/
private String txt50;
/**
* 存货号;存放地点
*/
private String invnr;
/**
* 数量
*/
private BigDecimal menge;
/**
* 基本计量单位
*/
private String meins;
/**
* 成本中心(必填)
*/
private String kostl;
/**
* 责任成本中心
*/
private String kostlv;
private Date fillinDate;
private String billCode;
private Integer statusId;
private String fullId;
private String organId;
private String organName;
private String deptId;
private String deptName;
private String positionId;
private String positionName;
private String personMemberId;
private String personMemberName;
public static SapFixedAssets getSapFixedAssets(SapFixedAssetsVo sapFixedAssetsVo) {
return JSON.parseObject(JSON.toJSONString(sapFixedAssetsVo), SapFixedAssets.class);
}
public static SapFixedAssetsVo getSapFixedAssetsVo(SapFixedAssets sapFixedAssets) {
return JSON.parseObject(JSON.toJSONString(sapFixedAssets), SapFixedAssetsVo.class);
}
}
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsd="http://www.w3.org/2001/XMLSchema" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test"> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsd="http://www.w3.org/2001/XMLSchema" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="leaveProc" name="请假" isExecutable="true"> <process id="sapFixedAssetsProc" name="固定资产" isExecutable="true">
<extensionElements> <extensionElements>
<activiti:executionListener event="start" delegateExpression="#{leaveApplication}"></activiti:executionListener> <activiti:executionListener event="start" delegateExpression="#{sapFixedAssetsApplication}"></activiti:executionListener>
<activiti:executionListener event="end" delegateExpression="#{leaveApplication}"></activiti:executionListener> <activiti:executionListener event="end" delegateExpression="#{sapFixedAssetsApplication}"></activiti:executionListener>
</extensionElements> </extensionElements>
<startEvent id="startevent1" name="Start"></startEvent> <startEvent id="startevent1" name="Start"></startEvent>
<endEvent id="endevent1" name="End"></endEvent> <endEvent id="endevent1" name="End"></endEvent>
<userTask id="Apply" name="请假申请" activiti:formKey="leave/showLeave.job"> <userTask id="Apply" name="固定资产申请" activiti:formKey="sapFixedAssets/showFixedAssets.job">
<extensionElements> <extensionElements>
<activiti:taskListener event="all" delegateExpression="#{leaveApplication}"></activiti:taskListener> <activiti:taskListener event="all" delegateExpression="#{sapFixedAssetsApplication}"></activiti:taskListener>
<activiti:taskListener event="saveBizData" delegateExpression="#{leaveApplication}"></activiti:taskListener> <activiti:taskListener event="saveBizData" delegateExpression="#{sapFixedAssetsApplication}"></activiti:taskListener>
</extensionElements> </extensionElements>
</userTask> </userTask>
<userTask id="Approve" name="请假审批" activiti:assignee="${assignee} " activiti:formKey="leave/showLeave.job"> <userTask id="Approve" name="固定资产审批" activiti:assignee="${assignee} " activiti:formKey="sapFixedAssets/showFixedAssets.job">
<extensionElements> <extensionElements>
<activiti:taskListener event="all" delegateExpression="#{leaveApplication}"></activiti:taskListener> <activiti:taskListener event="all" delegateExpression="#{sapFixedAssetsApplication}"></activiti:taskListener>
<activiti:taskListener event="saveBizData" delegateExpression="#{leaveApplication}"></activiti:taskListener> <activiti:taskListener event="saveBizData" delegateExpression="#{sapFixedAssetsApplication}"></activiti:taskListener>
</extensionElements> </extensionElements>
<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="handlerList" activiti:elementVariable="assignee"> <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="handlerList" activiti:elementVariable="assignee">
<completionCondition>${chiefApprovePassed}</completionCondition> <completionCondition>${chiefApprovePassed}</completionCondition>
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${!approvePassed}]]></conditionExpression> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!approvePassed}]]></conditionExpression>
</sequenceFlow> </sequenceFlow>
</process> </process>
<bpmndi:BPMNDiagram id="BPMNDiagram_leaveProc"> <bpmndi:BPMNDiagram id="BPMNDiagram_sapFixedAssetsProc">
<bpmndi:BPMNPlane bpmnElement="leaveProc" id="BPMNPlane_leaveProc"> <bpmndi:BPMNPlane bpmnElement="sapFixedAssetsProc" id="BPMNPlane_sapFixedAssetsProc">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"> <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="355.0" y="50.0"></omgdc:Bounds> <omgdc:Bounds height="35.0" width="35.0" x="355.0" y="50.0"></omgdc:Bounds>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
......
<?xml version="1.0" encoding="UTF-8"?>
<easy-search-mappings>
<easy-search name="costCenterCode" desc="成本中心">
<sql>
SELECT
scc.id,
scc.KOSTL,
scc.KTEXT,
scc.LTEXT,
scc.VERAK,
scc.KOSAR,
scc.PRCTR,
scc.t
FROM
( SELECT *,NOW() AS t FROM sap_cost_center ) AS scc
WHERE
scc.t &gt;= scc.DATAB
AND scc.t &lt;= scc.DATBI
</sql>
<field name="成本中心编码" title="成本中心编码" code="KOSTL" width="200"/>
<field name="名称" title="名称" code="KTEXT" width="200"/>
<field name="负责人" title="负责人" code="VERAK" width="200"/>
<field name="成本中心类型" title="成本中心类型" code="KOSAR" width="200" type="hidden"/>
<field name="利润中心" title="利润中心" code="PRCTR" width="200" type="hidden"/>
<condition column="KTEXT" name="KTEXT" symbol="like"
alias="scc"/>
</easy-search>
</easy-search-mappings>
\ No newline at end of file
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<sql-query> <sql-query>
select c.* select c.*
from customer_debt_contact c from customer_debt_contact c
where customer_email_type = ? where customer_id = ?
and customer_id = ? and customer_email_type = ?
</sql-query> </sql-query>
</query> </query>
......
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query name="sapFixedAssets" label="固定资产表" table="sap_fixed_assets">
<sql-query>
select t.* from sap_fixed_assets t
</sql-query>
</query>
</query-mappings>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsd="http://www.w3.org/2001/XMLSchema" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="proofingProc" name="打样" isExecutable="true">
<extensionElements>
<activiti:executionListener event="start" delegateExpression="#{proofingApplyApplication}"></activiti:executionListener>
<activiti:executionListener event="end" delegateExpression="#{proofingApplyApplication}"></activiti:executionListener>
</extensionElements>
<startEvent id="startevent1" name="Start"></startEvent>
<endEvent id="endevent1" name="End"></endEvent>
<userTask id="Apply" name="打样申请" activiti:formKey="proofingApply/showProofingApply.job">
<extensionElements>
<activiti:taskListener event="all" delegateExpression="#{proofingApplyApplication}"></activiti:taskListener>
<activiti:taskListener event="saveBizData" delegateExpression="#{proofingApplyApplication}"></activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="Approve" name="打样审批" activiti:assignee="${assignee} " activiti:formKey="proofingApply/showProofingApply.job">
<extensionElements>
<activiti:taskListener event="all" delegateExpression="#{proofingApplyApplication}"></activiti:taskListener>
<activiti:taskListener event="saveBizData" delegateExpression="#{proofingApplyApplication}"></activiti:taskListener>
</extensionElements>
<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="handlerList" activiti:elementVariable="assignee">
<completionCondition>${chiefApprovePassed}</completionCondition>
</multiInstanceLoopCharacteristics>
</userTask>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="Apply"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="Apply" targetRef="Approve"></sequenceFlow>
<exclusiveGateway id="ApproveFinished" name="审批结束"></exclusiveGateway>
<sequenceFlow id="flow3" name="审批通过" sourceRef="ApprovePassed" targetRef="ApproveFinished">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${approvePassed}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow4" name="审批结束" sourceRef="ApproveFinished" targetRef="endevent1">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${approveFinished}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow5" name="审批未结束" sourceRef="ApproveFinished" targetRef="Approve">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${!approveFinished}]]></conditionExpression>
</sequenceFlow>
<exclusiveGateway id="ApprovePassed" name="审批通过"></exclusiveGateway>
<sequenceFlow id="flow6" sourceRef="Approve" targetRef="ApprovePassed"></sequenceFlow>
<sequenceFlow id="flow9" name="审批未通过" sourceRef="ApprovePassed" targetRef="Apply">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${!approvePassed}]]></conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_proofingProc">
<bpmndi:BPMNPlane bpmnElement="proofingProc" id="BPMNPlane_proofingProc">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="355.0" y="50.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="355.0" y="550.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="Apply" id="BPMNShape_Apply">
<omgdc:Bounds height="55.0" width="161.0" x="292.0" y="140.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="Approve" id="BPMNShape_Approve">
<omgdc:Bounds height="55.0" width="161.0" x="292.0" y="240.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="ApproveFinished" id="BPMNShape_ApproveFinished">
<omgdc:Bounds height="40.0" width="40.0" x="352.0" y="440.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="ApprovePassed" id="BPMNShape_ApprovePassed">
<omgdc:Bounds height="40.0" width="40.0" x="352.0" y="349.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="372.0" y="85.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="140.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="372.0" y="195.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="240.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="372.0" y="389.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="440.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="48.0" x="320.0" y="396.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="372.0" y="480.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="550.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="48.0" x="382.0" y="489.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
<omgdi:waypoint x="392.0" y="460.0"></omgdi:waypoint>
<omgdi:waypoint x="519.0" y="459.0"></omgdi:waypoint>
<omgdi:waypoint x="519.0" y="317.0"></omgdi:waypoint>
<omgdi:waypoint x="519.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="489.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="453.0" y="267.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="60.0" x="459.0" y="411.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="372.0" y="295.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="349.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
<omgdi:waypoint x="352.0" y="369.0"></omgdi:waypoint>
<omgdi:waypoint x="231.0" y="369.0"></omgdi:waypoint>
<omgdi:waypoint x="231.0" y="167.0"></omgdi:waypoint>
<omgdi:waypoint x="292.0" y="167.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="60.0" x="257.0" y="376.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsd="http://www.w3.org/2001/XMLSchema" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="quotationProc" name="报价" isExecutable="true">
<extensionElements>
<activiti:executionListener event="start" delegateExpression="#{quotationApplication}"></activiti:executionListener>
<activiti:executionListener event="end" delegateExpression="#{quotationApplication}"></activiti:executionListener>
</extensionElements>
<startEvent id="startevent1" name="Start"></startEvent>
<endEvent id="endevent1" name="End"></endEvent>
<userTask id="Apply" name="报价申请" activiti:formKey="quotation/showQuotation.job">
<extensionElements>
<activiti:taskListener event="all" delegateExpression="#{quotationApplication}"></activiti:taskListener>
<activiti:taskListener event="saveBizData" delegateExpression="#{quotationApplication}"></activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="Approve" name="报价审批" activiti:assignee="${assignee} " activiti:formKey="quotation/showQuotation.job">
<extensionElements>
<activiti:taskListener event="all" delegateExpression="#{quotationApplication}"></activiti:taskListener>
<activiti:taskListener event="saveBizData" delegateExpression="#{quotationApplication}"></activiti:taskListener>
</extensionElements>
<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="handlerList" activiti:elementVariable="assignee">
<completionCondition>${chiefApprovePassed}</completionCondition>
</multiInstanceLoopCharacteristics>
</userTask>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="Apply"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="Apply" targetRef="Approve"></sequenceFlow>
<exclusiveGateway id="ApproveFinished" name="审批结束"></exclusiveGateway>
<sequenceFlow id="flow3" name="审批通过" sourceRef="ApprovePassed" targetRef="ApproveFinished">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${approvePassed}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow4" name="审批结束" sourceRef="ApproveFinished" targetRef="endevent1">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${approveFinished}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow5" name="审批未结束" sourceRef="ApproveFinished" targetRef="Approve">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${!approveFinished}]]></conditionExpression>
</sequenceFlow>
<exclusiveGateway id="ApprovePassed" name="审批通过"></exclusiveGateway>
<sequenceFlow id="flow6" sourceRef="Approve" targetRef="ApprovePassed"></sequenceFlow>
<sequenceFlow id="flow9" name="审批未通过" sourceRef="ApprovePassed" targetRef="Apply">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${!approvePassed}]]></conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_quotationProc">
<bpmndi:BPMNPlane bpmnElement="quotationProc" id="BPMNPlane_quotationProc">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="355.0" y="50.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="355.0" y="550.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="Apply" id="BPMNShape_Apply">
<omgdc:Bounds height="55.0" width="161.0" x="292.0" y="140.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="Approve" id="BPMNShape_Approve">
<omgdc:Bounds height="55.0" width="161.0" x="292.0" y="240.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="ApproveFinished" id="BPMNShape_ApproveFinished">
<omgdc:Bounds height="40.0" width="40.0" x="352.0" y="440.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="ApprovePassed" id="BPMNShape_ApprovePassed">
<omgdc:Bounds height="40.0" width="40.0" x="352.0" y="349.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="372.0" y="85.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="140.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="372.0" y="195.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="240.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="372.0" y="389.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="440.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="48.0" x="320.0" y="396.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="372.0" y="480.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="550.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="48.0" x="382.0" y="489.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
<omgdi:waypoint x="392.0" y="460.0"></omgdi:waypoint>
<omgdi:waypoint x="519.0" y="459.0"></omgdi:waypoint>
<omgdi:waypoint x="519.0" y="317.0"></omgdi:waypoint>
<omgdi:waypoint x="519.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="489.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="453.0" y="267.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="60.0" x="459.0" y="411.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="372.0" y="295.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="349.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
<omgdi:waypoint x="352.0" y="369.0"></omgdi:waypoint>
<omgdi:waypoint x="231.0" y="369.0"></omgdi:waypoint>
<omgdi:waypoint x="231.0" y="167.0"></omgdi:waypoint>
<omgdi:waypoint x="292.0" y="167.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="60.0" x="257.0" y="376.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
\ 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