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
9cfb6558
Commit
9cfb6558
authored
Nov 03, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api
parent
a4b0c516
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
88 additions
and
48 deletions
+88
-48
BuyApi.java
...cost-api/src/main/java/com/bailuntec/cost/api/BuyApi.java
+34
-0
BuyDomain.java
...rc/main/java/com/bailuntec/cost/api/domain/BuyDomain.java
+1
-1
BuyUtils.java
...ore/src/main/java/com/blt/other/common/util/BuyUtils.java
+1
-1
InventoryLogService.java
...lt/other/module/entrepot/service/InventoryLogService.java
+1
-1
InventoryService.java
...m/blt/other/module/entrepot/service/InventoryService.java
+1
-1
InventoryLogServiceImpl.java
...module/entrepot/service/impl/InventoryLogServiceImpl.java
+1
-1
InventoryServiceImpl.java
...er/module/entrepot/service/impl/InventoryServiceImpl.java
+1
-1
StorageServiceImpl.java
...ther/module/entrepot/service/impl/StorageServiceImpl.java
+1
-1
BuyApiController.java
.../other/module/purchasing/controller/BuyApiController.java
+22
-19
PurchasingListDetailButtonController.java
...sing/controller/PurchasingListDetailButtonController.java
+1
-1
PurchasingListDetailController.java
...purchasing/controller/PurchasingListDetailController.java
+1
-0
BuyDao.java
...main/java/com/blt/other/module/purchasing/dao/BuyDao.java
+1
-1
BuySearchDao.java
...ava/com/blt/other/module/purchasing/dao/BuySearchDao.java
+1
-1
BuyApiService.java
...om/blt/other/module/purchasing/service/BuyApiService.java
+1
-1
BuyService.java
...a/com/blt/other/module/purchasing/service/BuyService.java
+1
-1
BuyApiServiceImpl.java
...her/module/purchasing/service/impl/BuyApiServiceImpl.java
+1
-1
BuyPlanDetailServiceImpl.java
...ule/purchasing/service/impl/BuyPlanDetailServiceImpl.java
+1
-0
BuySearchServiceImpl.java
.../module/purchasing/service/impl/BuySearchServiceImpl.java
+1
-1
BuyServiceImpl.java
.../other/module/purchasing/service/impl/BuyServiceImpl.java
+1
-0
BuyMapper.xml
bailuntec-cost-core/src/main/resources/mapper/BuyMapper.xml
+13
-13
BuySearchMapper.xml
...c-cost-core/src/main/resources/mapper/BuySearchMapper.xml
+2
-2
No files found.
bailuntec-cost-api/src/main/java/com/bailuntec/cost/api/BuyApi.java
0 → 100644
View file @
9cfb6558
package
com
.
bailuntec
.
cost
.
api
;
import
com.bailuntec.cost.api.domain.BuyDomain
;
import
com.bailuntec.cost.api.response.CostResult
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.text.ParseException
;
import
java.util.List
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/3 10:39 上午
*/
@FeignClient
(
name
=
"bailuntec-cost-api"
,
url
=
"http://api.fee.bailuntec.com/purchase/other/buy/api"
)
public
interface
BuyApi
{
/**
* 获取资产负债表相关采购单
*
* @param startDateStr yyyy-MM-dd
* @param endDateStr yyyy-MM-dd
* @return 资产负债表相关采购单
* @throws ParseException ex
*/
@GetMapping
(
"/balanceSheetBuy"
)
CostResult
<
List
<
BuyDomain
>>
balanceSheetBuyList
(
@RequestParam
(
name
=
"startDate"
)
String
startDateStr
,
@RequestParam
(
name
=
"endDate"
)
String
endDateStr
)
throws
ParseException
;
}
bailuntec-cost-
core/src/main/java/com/blt/other/module/database/model
/BuyDomain.java
→
bailuntec-cost-
api/src/main/java/com/bailuntec/cost/api/domain
/BuyDomain.java
View file @
9cfb6558
package
com
.
b
lt
.
other
.
module
.
database
.
model
;
package
com
.
b
ailuntec
.
cost
.
api
.
domain
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/common/util/BuyUtils.java
View file @
9cfb6558
package
com
.
blt
.
other
.
common
.
util
;
import
com.b
lt.other.module.database.model
.BuyDomain
;
import
com.b
ailuntec.cost.api.domain
.BuyDomain
;
import
com.blt.other.module.purchasing.service.BuyService
;
import
java.text.NumberFormat
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/entrepot/service/InventoryLogService.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
entrepot
.
service
;
import
com.b
lt.other.module.database.model
.BuyDomain
;
import
com.b
ailuntec.cost.api.domain
.BuyDomain
;
import
com.blt.other.module.database.model.InventoryLogDomain
;
import
com.blt.other.module.entrepot.dto.InventoryLogDto
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/entrepot/service/InventoryService.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
entrepot
.
service
;
import
com.b
lt.other.module.database.model
.BuyDomain
;
import
com.b
ailuntec.cost.api.domain
.BuyDomain
;
import
com.blt.other.module.database.model.InventoryDomain
;
import
java.util.Map
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/entrepot/service/impl/InventoryLogServiceImpl.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
entrepot
.
service
.
impl
;
import
com.blt.other.module.database.mapper.StatusMapper
;
import
com.b
lt.other.module.database.model
.BuyDomain
;
import
com.b
ailuntec.cost.api.domain
.BuyDomain
;
import
com.blt.other.module.database.model.InventoryDomain
;
import
com.blt.other.module.database.model.InventoryLogDomain
;
import
com.blt.other.module.entrepot.dao.InventoryDao
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/entrepot/service/impl/InventoryServiceImpl.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
entrepot
.
service
.
impl
;
import
com.b
lt.other.module.database.model
.BuyDomain
;
import
com.b
ailuntec.cost.api.domain
.BuyDomain
;
import
com.blt.other.module.database.model.InventoryDomain
;
import
com.blt.other.module.database.model.SysProductDomain
;
import
com.blt.other.module.entrepot.dao.InventoryDao
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/entrepot/service/impl/StorageServiceImpl.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
entrepot
.
service
.
impl
;
import
com.blt.other.module.database.mapper.StatusMapper
;
import
com.b
lt.other.module.database.model
.BuyDomain
;
import
com.b
ailuntec.cost.api.domain
.BuyDomain
;
import
com.blt.other.module.database.model.StorageDomain
;
import
com.blt.other.module.entrepot.dao.StorageDao
;
import
com.blt.other.module.entrepot.dto.StorageDto
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/controller/BuyApiController.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
purchasing
.
controller
;
import
com.blt.other.module.database.model.BuyDomain
;
import
com.bailuntec.cost.api.BuyApi
;
import
com.bailuntec.cost.api.domain.BuyDomain
;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.blt.other.module.purchasing.service.BuyApiService
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RequestMapping
(
"/buy/api"
)
public
class
BuyApiController
{
public
class
BuyApiController
implements
BuyApi
{
@Autowired
private
BuyApiService
buyApiService
;
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
BuyApiController
.
class
);
@ApiOperation
(
"获取资产负债表相关采购单"
)
@GetMapping
(
"/balanceSheetBuy"
)
public
Map
<
String
,
Object
>
balanceSheetBuyList
(
@RequestParam
(
name
=
"startDate"
)
String
startDateStr
,
@RequestParam
(
name
=
"endDate"
)
String
endDateStr
)
{
public
CostResult
<
List
<
BuyDomain
>
>
balanceSheetBuyList
(
@RequestParam
(
name
=
"startDate"
)
String
startDateStr
,
@RequestParam
(
name
=
"endDate"
)
String
endDateStr
)
throws
ParseException
{
logger
.
warn
(
"获取资产负债表相关采购单"
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
try
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
startDate
=
sdf
.
parse
(
startDateStr
);
Date
endDate
=
sdf
.
parse
(
endDateStr
);
List
<
BuyDomain
>
balanceSheetBuyList
=
buyApiService
.
getBalanceSheetBuy
(
startDate
,
endDate
);
result
.
put
(
"success"
,
true
);
result
.
put
(
"data"
,
balanceSheetBuyList
);
}
catch
(
ParseException
e
){
e
.
printStackTrace
();
result
.
put
(
"success"
,
false
);
}
return
result
;
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
startDate
=
sdf
.
parse
(
startDateStr
);
Date
endDate
=
sdf
.
parse
(
endDateStr
);
List
<
BuyDomain
>
balanceSheetBuyList
=
buyApiService
.
getBalanceSheetBuy
(
startDate
,
endDate
);
return
CostResult
.
success
(
balanceSheetBuyList
);
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/controller/PurchasingListDetailButtonController.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
purchasing
.
controller
;
import
com.blt.other.common.util.AxiosUtil
;
import
com.b
lt.other.module.database.model
.BuyDomain
;
import
com.b
ailuntec.cost.api.domain
.BuyDomain
;
import
com.blt.other.module.purchasing.service.BuyLogService
;
import
com.blt.other.module.purchasing.service.BuyService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/controller/PurchasingListDetailController.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
purchasing
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.bailuntec.cost.api.domain.BuyDomain
;
import
com.blt.other.common.util.AxiosUtil
;
import
com.blt.other.common.util.IpUtil
;
import
com.blt.other.common.util.PathUtil
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/dao/BuyDao.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
purchasing
.
dao
;
import
com.b
lt.other.module.database.model
.BuyDomain
;
import
com.b
ailuntec.cost.api.domain
.BuyDomain
;
import
com.blt.other.module.purchasing.dto.BuyExportDto
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/dao/BuySearchDao.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
purchasing
.
dao
;
import
com.b
lt.other.module.database.model
.BuyDomain
;
import
com.b
ailuntec.cost.api.domain
.BuyDomain
;
import
com.blt.other.module.purchasing.vo.PurcharseListSearchKeysVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/service/BuyApiService.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
purchasing
.
service
;
import
com.b
lt.other.module.database.model
.BuyDomain
;
import
com.b
ailuntec.cost.api.domain
.BuyDomain
;
import
java.util.Date
;
import
java.util.List
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/service/BuyService.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
purchasing
.
service
;
import
com.b
lt.other.module.database.model
.BuyDomain
;
import
com.b
ailuntec.cost.api.domain
.BuyDomain
;
import
com.blt.other.module.database.model.BuyPlanDetailDomain
;
import
com.blt.other.module.database.model.BuyPlanDomain
;
import
com.blt.other.module.database.model.CostDomain
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/service/impl/BuyApiServiceImpl.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
purchasing
.
service
.
impl
;
import
com.b
lt.other.module.database.model.*
;
import
com.b
ailuntec.cost.api.domain.BuyDomain
;
import
com.blt.other.module.purchasing.dao.BuyDao
;
import
com.blt.other.module.purchasing.service.BuyApiService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/service/impl/BuyPlanDetailServiceImpl.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
purchasing
.
service
.
impl
;
import
com.bailuntec.cost.api.domain.BuyDomain
;
import
com.blt.other.module.database.model.*
;
import
com.blt.other.module.purchasing.dao.BuyDao
;
import
com.blt.other.module.purchasing.dao.BuyPlanDao
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/service/impl/BuySearchServiceImpl.java
View file @
9cfb6558
package
com
.
blt
.
other
.
module
.
purchasing
.
service
.
impl
;
import
com.b
lt.other.module.database.model
.BuyDomain
;
import
com.b
ailuntec.cost.api.domain
.BuyDomain
;
import
com.blt.other.module.purchasing.dao.BuySearchDao
;
import
com.blt.other.module.purchasing.dto.BuyListDto
;
import
com.blt.other.module.purchasing.service.BuySearchService
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/service/impl/BuyServiceImpl.java
View file @
9cfb6558
...
...
@@ -2,6 +2,7 @@ package com.blt.other.module.purchasing.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.bailuntec.cost.api.domain.BuyDomain
;
import
com.blt.other.common.util.BuyUtils
;
import
com.blt.other.common.util.CurUtils
;
import
com.blt.other.common.util.MoneyUtil
;
...
...
bailuntec-cost-core/src/main/resources/mapper/BuyMapper.xml
View file @
9cfb6558
...
...
@@ -24,7 +24,7 @@
)
</insert>
<select
id=
"selectByNoAndSkucode"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"selectByNoAndSkucode"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT
*
FROM
...
...
@@ -35,7 +35,7 @@
skucode = #{skucode}
</select>
<select
id=
"selectAll"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"selectAll"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT
*
FROM
...
...
@@ -44,7 +44,7 @@
id DESC
</select>
<select
id=
"selectBySkucode"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"selectBySkucode"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT
*
FROM
...
...
@@ -53,7 +53,7 @@
skucode = #{skucode}
</select>
<select
id=
"selectByBuyno"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"selectByBuyno"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT
*
FROM
...
...
@@ -62,7 +62,7 @@
buyno = #{buyno}
</select>
<update
id=
"update"
parameterType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<update
id=
"update"
parameterType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
UPDATE
buy
<set>
...
...
@@ -123,7 +123,7 @@
buyno = #{buyno}
</update>
<update
id=
"updateInstallment"
parameterType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<update
id=
"updateInstallment"
parameterType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
UPDATE
buy
SET
...
...
@@ -137,7 +137,7 @@
delete from buy where buyno = #{buyNo}
</delete>
<select
id=
"selectBuy"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"selectBuy"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT
*
FROM
...
...
@@ -146,7 +146,7 @@
buyno = #{buyno}
</select>
<select
id=
"selectByPlanNo"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"selectByPlanNo"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT
*
FROM
...
...
@@ -155,7 +155,7 @@
no = #{planNo}
</select>
<select
id=
"selectBySkuKeyWord"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"selectBySkuKeyWord"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT
*
FROM
...
...
@@ -164,7 +164,7 @@
skuname LIKE CONCAT('%',#{searchKey},'%')
</select>
<select
id=
"selectLastBuy"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"selectLastBuy"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT
*
FROM
...
...
@@ -186,7 +186,7 @@
buyno = #{oldBuyno}
</update>
<select
id=
"findByBuyNo"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"findByBuyNo"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT
*
FROM
...
...
@@ -196,7 +196,7 @@
LIMIT 1
</select>
<select
id=
"selectByIds"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"selectByIds"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT
*
FROM
...
...
@@ -232,7 +232,7 @@
order by b.id desc
</select>
<select
id=
"selectBalanceSheetBuy"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"selectBalanceSheetBuy"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT * FROM buy WHERE pay_time
<![CDATA[>=]]>
#{startDate} AND pay_time
<![CDATA[<]]>
#{endDate} AND sku_type_name = '固定资产' and buy_type
<![CDATA[<]]>
3
</select>
</mapper>
bailuntec-cost-core/src/main/resources/mapper/BuySearchMapper.xml
View file @
9cfb6558
...
...
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.blt.other.module.purchasing.dao.BuySearchDao"
>
<select
id=
"selectByKey"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"selectByKey"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT
*
FROM
...
...
@@ -30,7 +30,7 @@
DESC
</select>
<select
id=
"selectByKeys"
resultType=
"com.b
lt.other.module.database.model
.BuyDomain"
>
<select
id=
"selectByKeys"
resultType=
"com.b
ailuntec.cost.api.domain
.BuyDomain"
>
SELECT
*
FROM
...
...
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