Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-cost-system
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
dc-cost-system
Commits
6e44b2a5
Commit
6e44b2a5
authored
Oct 17, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e6bfd788
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
62 deletions
+67
-62
CostTypeKindDao.java
...in/java/com/blt/other/other_cost/dao/CostTypeKindDao.java
+20
-2
CostApiServiceImpl.java
...blt/other/other_cost/service/impl/CostApiServiceImpl.java
+6
-1
CostTypeKindMapper.xml
cost-core/src/main/resources/mapper/CostTypeKindMapper.xml
+41
-59
No files found.
cost-core/src/main/java/com/blt/other/other_cost/dao/CostTypeKindDao.java
View file @
6e44b2a5
package
com
.
blt
.
other
.
other_cost
.
dao
;
package
com
.
blt
.
other
.
other_cost
.
dao
;
import
com.blt.other.other_cost.dto.CostTypeKindDto
;
import
com.blt.other.other_database.model.CostTypeDomain
;
import
com.blt.other.other_database.model.CostTypeKindDomain
;
import
com.blt.other.other_database.model.CostTypeKindDomain
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.List
;
...
@@ -14,12 +13,14 @@ public interface CostTypeKindDao {
...
@@ -14,12 +13,14 @@ public interface CostTypeKindDao {
/**
/**
* 获取所有费用种类
* 获取所有费用种类
*
* @return
* @return
*/
*/
List
<
CostTypeKindDomain
>
selectAll
();
List
<
CostTypeKindDomain
>
selectAll
();
/**
/**
* 根据 typeNo 获取费用种类
* 根据 typeNo 获取费用种类
*
* @param typeNo
* @param typeNo
* @return
* @return
*/
*/
...
@@ -27,6 +28,7 @@ public interface CostTypeKindDao {
...
@@ -27,6 +28,7 @@ public interface CostTypeKindDao {
/**
/**
* 根据 companyNo 获取费用种类
* 根据 companyNo 获取费用种类
*
* @param companyNo
* @param companyNo
* @return
* @return
*/
*/
...
@@ -34,6 +36,7 @@ public interface CostTypeKindDao {
...
@@ -34,6 +36,7 @@ public interface CostTypeKindDao {
/**
/**
* 根据 typeNo 和 kindName 获取费用种类,用于添加费用种类时判断是否已经存在相同的费用种类
* 根据 typeNo 和 kindName 获取费用种类,用于添加费用种类时判断是否已经存在相同的费用种类
*
* @param costTypeKindDomain
* @param costTypeKindDomain
* @return
* @return
*/
*/
...
@@ -41,6 +44,7 @@ public interface CostTypeKindDao {
...
@@ -41,6 +44,7 @@ public interface CostTypeKindDao {
/**
/**
* 根据 costTypeKindNo 获取种类信息
* 根据 costTypeKindNo 获取种类信息
*
* @param costTypeKindNo
* @param costTypeKindNo
* @return
* @return
*/
*/
...
@@ -48,14 +52,27 @@ public interface CostTypeKindDao {
...
@@ -48,14 +52,27 @@ public interface CostTypeKindDao {
/**
/**
* 根据费用小类名称和公司名称获取种类信息
* 根据费用小类名称和公司名称获取种类信息
*
* @param kindName
* @param kindName
* @param companyName
* @param companyName
* @return
* @return
*/
*/
@Deprecated
CostTypeKindDomain
selectByKindNameAndCompanyName
(
String
kindName
,
String
companyName
);
CostTypeKindDomain
selectByKindNameAndCompanyName
(
String
kindName
,
String
companyName
);
/**
/**
* <
*
* @param kindName
* @param companyNo
* @return
*/
CostTypeKindDomain
selectByKindNameAndCompanyNo
(
@Param
(
"kindName"
)
String
kindName
,
@Param
(
"companyNo"
)
String
companyNo
);
/**
* 新增费用种类记录
* 新增费用种类记录
*
* @param ctkd
* @param ctkd
* @return
* @return
*/
*/
...
@@ -66,4 +83,5 @@ public interface CostTypeKindDao {
...
@@ -66,4 +83,5 @@ public interface CostTypeKindDao {
Integer
update
(
CostTypeKindDomain
costTypeKindDomain
);
Integer
update
(
CostTypeKindDomain
costTypeKindDomain
);
Integer
delete
(
String
kindNo
);
Integer
delete
(
String
kindNo
);
}
}
cost-core/src/main/java/com/blt/other/other_cost/service/impl/CostApiServiceImpl.java
View file @
6e44b2a5
...
@@ -63,6 +63,9 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -63,6 +63,9 @@ public class CostApiServiceImpl implements CostApiService {
@Autowired
@Autowired
CostLogDao
costLogDao
;
CostLogDao
costLogDao
;
@Autowired
CostCompanyDao
costCompanyDao
;
@Override
@Override
@Transactional
@Transactional
public
String
generateLogisticsCost
(
int
costForm
,
LogisticsCostDto
logisticsCostDto
)
throws
Exception
{
public
String
generateLogisticsCost
(
int
costForm
,
LogisticsCostDto
logisticsCostDto
)
throws
Exception
{
...
@@ -281,7 +284,9 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -281,7 +284,9 @@ public class CostApiServiceImpl implements CostApiService {
sqlParam
.
setKindName
(
"工资"
);
sqlParam
.
setKindName
(
"工资"
);
sqlParam
.
setCompanyName
(
wageCostDto
.
getCompanyName
());
sqlParam
.
setCompanyName
(
wageCostDto
.
getCompanyName
());
CostTypeKindDomain
costTypeKindDomain
=
costTypeKindDao
.
selectByKindNameAndCompanyName
(
"工资"
,
wageCostDto
.
getCompanyName
());
CostCompanyDomain
costCompany
=
costCompanyDao
.
selectByName
(
wageCostDto
.
getCompanyName
());
CostTypeKindDomain
costTypeKindDomain
=
costTypeKindDao
.
selectByKindNameAndCompanyNo
(
"工资"
,
costCompany
.
getCompanyNo
());
if
(
costTypeKindDomain
==
null
)
{
if
(
costTypeKindDomain
==
null
)
{
throw
new
RuntimeException
(
wageCostDto
+
"在费用系统不存在费用单小类:工资"
);
throw
new
RuntimeException
(
wageCostDto
+
"在费用系统不存在费用单小类:工资"
);
}
}
...
...
cost-core/src/main/resources/mapper/CostTypeKindMapper.xml
View file @
6e44b2a5
...
@@ -3,85 +3,68 @@
...
@@ -3,85 +3,68 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.blt.other.other_cost.dao.CostTypeKindDao"
>
<mapper
namespace=
"com.blt.other.other_cost.dao.CostTypeKindDao"
>
<select
id=
"selectAll"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
<select
id=
"selectAll"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
SELECT
SELECT *
*
FROM cost_type_kind
FROM
ORDER BY id desc
cost_type_kind
ORDER BY
id desc
</select>
</select>
<select
id=
"selectByTypeNo"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
<select
id=
"selectByTypeNo"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
SELECT
SELECT *
*
FROM cost_type_kind
FROM
WHERE type_no = #{typeNo}
cost_type_kind
WHERE
type_no = #{typeNo}
</select>
</select>
<select
id=
"selectByCompanyNo"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
<select
id=
"selectByCompanyNo"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
SELECT
SELECT *
*
FROM cost_type_kind
FROM
WHERE company_no = #{companyNo}
cost_type_kind
WHERE
company_no = #{companyNo}
</select>
</select>
<select
id=
"selectByTypeNoAndKindName"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
<select
id=
"selectByTypeNoAndKindName"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
SELECT
SELECT *
*
FROM cost_type_kind
FROM
WHERE type_no = #{typeNo}
cost_type_kind
AND kind_name = #{kindName}
WHERE
type_no = #{typeNo}
AND
kind_name = #{kindName}
</select>
</select>
<select
id=
"selectByKindNo"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
<select
id=
"selectByKindNo"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
SELECT
SELECT *
*
FROM cost_type_kind
FROM
WHERE kind_no = #{kindNo}
cost_type_kind
WHERE
kind_no = #{kindNo}
</select>
</select>
<select
id=
"selectByKindNameAndCompanyName"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
<select
id=
"selectByKindNameAndCompanyName"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
SELECT
SELECT *
*
FROM cost_type_kind
FROM
WHERE kind_name = #{kindName}
cost_type_kind
AND company_name = #{companyName}
WHERE
kind_name = #{kindName}
AND
company_name = #{companyName}
</select>
</select>
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO
INSERT INTO cost_type_kind(kind_no, kind_name, type_no, type_name, company_no, company_name, cost_form,
cost_type_kind(
subject_code, is_lend,
kind_no,kind_name,type_no,type_name,company_no,company_name,cost_form,subject_code,is_lend,
create_username, create_usercode, cost_type_status)
create_username,create_usercode,cost_type_status
)
VALUE
VALUE
(
(
#{kindNo},#{kindName},#{typeNo},#{typeName},#{companyNo},#{companyName},#{costForm},#{subjectCode},#{isLend},
#{kindNo}, #{kindName}, #{typeNo}, #{typeName}, #{companyNo}, #{companyName}, #{costForm}, #{subjectCode},
#{createUsername},#{createUsercode},#{costTypeStatus}
#{isLend},
#{createUsername}, #{createUsercode}, #{costTypeStatus}
)
)
</insert>
</insert>
<select
id=
"selectByCompanyNoAndCostForm"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
<select
id=
"selectByCompanyNoAndCostForm"
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
SELECT
SELECT *
*
FROM cost_type_kind
FROM
WHERE company_no = #{companyNo}
cost_type_kind
AND cost_form = #{costForm}
WHERE
</select>
company_no = #{companyNo}
AND
<select
id=
"selectByKindNameAndCompanyNo"
cost_form = #{costForm}
resultType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
SELECT *
FROM cost_type_kind
WHERE kind_name = #{kindName}
AND company_no = #{companyNo}
</select>
</select>
<update
id=
"update"
parameterType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
<update
id=
"update"
parameterType=
"com.blt.other.other_database.model.CostTypeKindDomain"
>
...
@@ -105,9 +88,8 @@
...
@@ -105,9 +88,8 @@
</update>
</update>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
DELETE FROM
DELETE
cost_type_kind
FROM cost_type_kind
WHERE
WHERE kind_no = #{kindNo}
kind_no = #{kindNo}
</delete>
</delete>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
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