Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
b9fb7e2c
"src/vscode:/vscode.git/clone" did not exist on "6f733eb0a0d0e03aa8f10c191707457e352b18fe"
Commit
b9fb7e2c
authored
Dec 25, 2019
by
季圣华
Browse files
优化用户和单据模块
parent
8cfdc3dc
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
b9fb7e2c
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
<plugin>
<plugin>
<groupId>
org.mybatis.generator
</groupId>
<groupId>
org.mybatis.generator
</groupId>
<artifactId>
mybatis-generator-maven-plugin
</artifactId>
<artifactId>
mybatis-generator-maven-plugin
</artifactId>
<version>
1.
3.2
</version>
<version>
1.
4.0
</version>
<configuration>
<configuration>
<configurationFile>
${basedir}/src/test/resources/generatorConfig.xml
</configurationFile>
<configurationFile>
${basedir}/src/test/resources/generatorConfig.xml
</configurationFile>
<verbose>
true
</verbose>
<verbose>
true
</verbose>
...
...
src/main/java/com/jsh/erp/datasource/entities/DepotHeadExample.java
View file @
b9fb7e2c
...
@@ -13,7 +13,7 @@ public class DepotHeadExample {
...
@@ -13,7 +13,7 @@ public class DepotHeadExample {
protected
List
<
Criteria
>
oredCriteria
;
protected
List
<
Criteria
>
oredCriteria
;
public
DepotHeadExample
()
{
public
DepotHeadExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
oredCriteria
=
new
ArrayList
<>();
}
}
public
void
setOrderByClause
(
String
orderByClause
)
{
public
void
setOrderByClause
(
String
orderByClause
)
{
...
@@ -70,7 +70,7 @@ public class DepotHeadExample {
...
@@ -70,7 +70,7 @@ public class DepotHeadExample {
protected
GeneratedCriteria
()
{
protected
GeneratedCriteria
()
{
super
();
super
();
criteria
=
new
ArrayList
<
Criterion
>();
criteria
=
new
ArrayList
<>();
}
}
public
boolean
isValid
()
{
public
boolean
isValid
()
{
...
@@ -2118,7 +2118,6 @@ public class DepotHeadExample {
...
@@ -2118,7 +2118,6 @@ public class DepotHeadExample {
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
protected
Criteria
()
{
super
();
super
();
}
}
...
...
src/main/java/com/jsh/erp/datasource/entities/UserExample.java
View file @
b9fb7e2c
...
@@ -11,7 +11,7 @@ public class UserExample {
...
@@ -11,7 +11,7 @@ public class UserExample {
protected
List
<
Criteria
>
oredCriteria
;
protected
List
<
Criteria
>
oredCriteria
;
public
UserExample
()
{
public
UserExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
oredCriteria
=
new
ArrayList
<>();
}
}
public
void
setOrderByClause
(
String
orderByClause
)
{
public
void
setOrderByClause
(
String
orderByClause
)
{
...
@@ -68,7 +68,7 @@ public class UserExample {
...
@@ -68,7 +68,7 @@ public class UserExample {
protected
GeneratedCriteria
()
{
protected
GeneratedCriteria
()
{
super
();
super
();
criteria
=
new
ArrayList
<
Criterion
>();
criteria
=
new
ArrayList
<>();
}
}
public
boolean
isValid
()
{
public
boolean
isValid
()
{
...
@@ -1036,7 +1036,6 @@ public class UserExample {
...
@@ -1036,7 +1036,6 @@ public class UserExample {
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
protected
Criteria
()
{
super
();
super
();
}
}
...
...
src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapper.java
View file @
b9fb7e2c
...
@@ -6,7 +6,7 @@ import java.util.List;
...
@@ -6,7 +6,7 @@ import java.util.List;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
public
interface
DepotHeadMapper
{
public
interface
DepotHeadMapper
{
int
countByExample
(
DepotHeadExample
example
);
long
countByExample
(
DepotHeadExample
example
);
int
deleteByExample
(
DepotHeadExample
example
);
int
deleteByExample
(
DepotHeadExample
example
);
...
...
src/main/java/com/jsh/erp/datasource/mappers/UserMapper.java
View file @
b9fb7e2c
...
@@ -6,7 +6,7 @@ import java.util.List;
...
@@ -6,7 +6,7 @@ import java.util.List;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
public
interface
UserMapper
{
public
interface
UserMapper
{
int
countByExample
(
UserExample
example
);
long
countByExample
(
UserExample
example
);
int
deleteByExample
(
UserExample
example
);
int
deleteByExample
(
UserExample
example
);
...
...
src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
b9fb7e2c
...
@@ -464,8 +464,6 @@ public class DepotHeadService {
...
@@ -464,8 +464,6 @@ public class DepotHeadService {
}
}
/**
/**
* create by: cjl
* description:
* 新增单据主表及单据子表信息
* 新增单据主表及单据子表信息
* create time: 2019/1/25 14:36
* create time: 2019/1/25 14:36
* @Param: beanJson
* @Param: beanJson
...
@@ -493,15 +491,21 @@ public class DepotHeadService {
...
@@ -493,15 +491,21 @@ public class DepotHeadService {
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
JshException
.
writeFail
(
logger
,
e
);
}
}
/**入库和出库处理预付款信息*/
/**入库和出库处理预付款信息*/
if
(
BusinessConstants
.
PAY_TYPE_PREPAID
.
equals
(
depotHead
.
getPaytype
())){
if
(
BusinessConstants
.
PAY_TYPE_PREPAID
.
equals
(
depotHead
.
getPaytype
())){
if
(
depotHead
.
getOrganid
()!=
null
)
{
if
(
depotHead
.
getOrganid
()!=
null
)
{
supplierService
.
updateAdvanceIn
(
depotHead
.
getOrganid
(),
BigDecimal
.
ZERO
.
subtract
(
depotHead
.
getTotalprice
()));
supplierService
.
updateAdvanceIn
(
depotHead
.
getOrganid
(),
BigDecimal
.
ZERO
.
subtract
(
depotHead
.
getTotalprice
()));
}
}
}
}
/**入库和出库处理单据子表信息*/
//根据单据编号查询单据id
depotItemService
.
saveDetials
(
inserted
,
deleted
,
updated
,
depotHead
.
getId
(),
tenantId
,
request
);
DepotHeadExample
dhExample
=
new
DepotHeadExample
();
dhExample
.
createCriteria
().
andDefaultnumberEqualTo
(
depotHead
.
getDefaultnumber
()).
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
List
<
DepotHead
>
list
=
depotHeadMapper
.
selectByExample
(
dhExample
);
if
(
list
!=
null
)
{
Long
headId
=
list
.
get
(
0
).
getId
();
/**入库和出库处理单据子表信息*/
depotItemService
.
saveDetials
(
inserted
,
deleted
,
updated
,
headId
,
tenantId
,
request
);
}
/**如果关联单据号非空则更新订单的状态为2 */
/**如果关联单据号非空则更新订单的状态为2 */
if
(
depotHead
.
getLinknumber
()!=
null
)
{
if
(
depotHead
.
getLinknumber
()!=
null
)
{
DepotHead
depotHeadOrders
=
new
DepotHead
();
DepotHead
depotHeadOrders
=
new
DepotHead
();
...
@@ -516,8 +520,6 @@ public class DepotHeadService {
...
@@ -516,8 +520,6 @@ public class DepotHeadService {
}
}
}
}
/**
/**
* create by: cjl
* description:
* 更新单据主表及单据子表信息
* 更新单据主表及单据子表信息
* create time: 2019/1/28 14:47
* create time: 2019/1/28 14:47
* @Param: id
* @Param: id
...
...
src/main/java/com/jsh/erp/service/user/UserService.java
View file @
b9fb7e2c
...
@@ -334,8 +334,14 @@ public class UserService {
...
@@ -334,8 +334,14 @@ public class UserService {
OrgaUserRel
oul
=
new
OrgaUserRel
();
OrgaUserRel
oul
=
new
OrgaUserRel
();
//机构id
//机构id
oul
.
setOrgaId
(
ue
.
getOrgaId
());
oul
.
setOrgaId
(
ue
.
getOrgaId
());
//用户id
//用户id,根据用户名查询id
oul
.
setUserId
(
ue
.
getId
());
UserExample
example
=
new
UserExample
();
example
.
createCriteria
().
andLoginameEqualTo
(
ue
.
getLoginame
());
List
<
User
>
list
=
userMapper
.
selectByExample
(
example
);
if
(
list
!=
null
)
{
Long
userId
=
list
.
get
(
0
).
getId
();
oul
.
setUserId
(
userId
);
}
//用户在机构中的排序
//用户在机构中的排序
oul
.
setUserBlngOrgaDsplSeq
(
ue
.
getUserBlngOrgaDsplSeq
());
oul
.
setUserBlngOrgaDsplSeq
(
ue
.
getUserBlngOrgaDsplSeq
());
...
...
src/main/resources/mapper_xml/DepotHeadMapper.xml
View file @
b9fb7e2c
This diff is collapsed.
Click to expand it.
src/main/resources/mapper_xml/UserMapper.xml
View file @
b9fb7e2c
This diff is collapsed.
Click to expand it.
src/test/resources/generatorConfig.xml
View file @
b9fb7e2c
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<!-- generate Mapper -->
<!-- generate Mapper -->
<javaClientGenerator
type=
"XMLMAPPER"
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.jsh.erp.datasource.mappers"
targetPackage=
"com.jsh.erp.datasource.mappers"
targetProject=
"src\main\java"
implementationPackage=
""
>
targetProject=
"src\main\java"
>
<property
name=
"enableSubPackages"
value=
"false"
/>
<property
name=
"enableSubPackages"
value=
"false"
/>
<property
name=
"exampleMethodVisibility"
value=
"public"
/>
<property
name=
"exampleMethodVisibility"
value=
"public"
/>
</javaClientGenerator>
</javaClientGenerator>
...
@@ -45,9 +45,7 @@
...
@@ -45,9 +45,7 @@
<table tableName="jsh_accounthead" domainObjectName="AccountHead"></table>
<table tableName="jsh_accounthead" domainObjectName="AccountHead"></table>
<table tableName="jsh_accountitem" domainObjectName="AccountItem"></table>
<table tableName="jsh_accountitem" domainObjectName="AccountItem"></table>
<table tableName="jsh_depot" domainObjectName="Depot"></table>
<table tableName="jsh_depot" domainObjectName="Depot"></table>
<table tableName="jsh_depothead" domainObjectName="DepotHead">
<table tableName="jsh_depothead" domainObjectName="DepotHead"></table>
<generatedKey column="id" sqlStatement="SELECT LAST_INSERT_ID()"/>
</table>
<table tableName="jsh_depotitem" domainObjectName="DepotItem"></table>
<table tableName="jsh_depotitem" domainObjectName="DepotItem"></table>
<table tableName="jsh_functions" domainObjectName="Functions"></table>
<table tableName="jsh_functions" domainObjectName="Functions"></table>
<table tableName="jsh_inoutitem" domainObjectName="InOutItem"></table>
<table tableName="jsh_inoutitem" domainObjectName="InOutItem"></table>
...
@@ -61,9 +59,7 @@
...
@@ -61,9 +59,7 @@
<table tableName="jsh_supplier" domainObjectName="Supplier"></table>
<table tableName="jsh_supplier" domainObjectName="Supplier"></table>
<table tableName="jsh_systemconfig" domainObjectName="SystemConfig"></table>
<table tableName="jsh_systemconfig" domainObjectName="SystemConfig"></table>
<table tableName="jsh_unit" domainObjectName="Unit"></table>
<table tableName="jsh_unit" domainObjectName="Unit"></table>
<table tableName="jsh_user" domainObjectName="User">
<table tableName="jsh_user" domainObjectName="User"></table>
<generatedKey column="id" sqlStatement="SELECT LAST_INSERT_ID()"/>
</table>
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>
<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>
<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>
<table tableName="jsh_organization" domainObjectName="Organization"></table>
<table tableName="jsh_organization" domainObjectName="Organization"></table>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment