Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
Project
Project
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
fulixin
dsk-operate-sys-cscec
Commits
74d9ff7e
Commit
74d9ff7e
authored
Feb 20, 2024
by
chenyuefang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成本汇总锁定
parent
6cca5fd0
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
398 additions
and
61 deletions
+398
-61
application.yml
dsk-admin/src/main/resources/application.yml
+1
-0
CbSummaryController.java
...in/java/com/dsk/cscec/controller/CbSummaryController.java
+31
-4
CbSummary.java
...biz-api/src/main/java/com/dsk/cscec/domain/CbSummary.java
+2
-0
CbSummaryActual.java
...i/src/main/java/com/dsk/cscec/domain/CbSummaryActual.java
+1
-1
CbSummaryActualLock.java
...c/main/java/com/dsk/cscec/domain/CbSummaryActualLock.java
+46
-0
CbSummaryActualListBo.java
...n/java/com/dsk/cscec/domain/bo/CbSummaryActualListBo.java
+4
-0
CbSummaryActualLockBo.java
...n/java/com/dsk/cscec/domain/bo/CbSummaryActualLockBo.java
+26
-0
CbSummaryActualListVo.java
...n/java/com/dsk/cscec/domain/vo/CbSummaryActualListVo.java
+4
-4
CbSummaryActualLockMapper.java
.../java/com/dsk/cscec/mapper/CbSummaryActualLockMapper.java
+26
-0
CbSummaryActualMapper.java
...main/java/com/dsk/cscec/mapper/CbSummaryActualMapper.java
+9
-0
CbSummaryMapper.java
...i/src/main/java/com/dsk/cscec/mapper/CbSummaryMapper.java
+9
-1
CbSummaryService.java
...src/main/java/com/dsk/cscec/service/CbSummaryService.java
+25
-1
CbSummaryServiceImpl.java
...java/com/dsk/cscec/service/impl/CbSummaryServiceImpl.java
+143
-37
CbSummaryActualLockMapper.xml
...main/resources/mapper/cscec/CbSummaryActualLockMapper.xml
+27
-0
CbSummaryActualMapper.xml
...src/main/resources/mapper/cscec/CbSummaryActualMapper.xml
+13
-2
CbSummaryMapper.xml
...z-api/src/main/resources/mapper/cscec/CbSummaryMapper.xml
+31
-11
No files found.
dsk-admin/src/main/resources/application.yml
View file @
74d9ff7e
...
@@ -188,6 +188,7 @@ tenant:
...
@@ -188,6 +188,7 @@ tenant:
-
f_ads_bsi_kpi_proj_two
-
f_ads_bsi_kpi_proj_two
-
cb_summary
-
cb_summary
-
cb_summary_actual
-
cb_summary_actual
-
cb_summary_actual_lock
-
cb_cost_measure
-
cb_cost_measure
-
cb_cost_measure_actual
-
cb_cost_measure_actual
-
cb_direct_expense
-
cb_direct_expense
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/controller/CbSummaryController.java
View file @
74d9ff7e
...
@@ -7,6 +7,7 @@ import com.dsk.common.core.domain.R;
...
@@ -7,6 +7,7 @@ import com.dsk.common.core.domain.R;
import
com.dsk.common.utils.poi.ExcelUtil
;
import
com.dsk.common.utils.poi.ExcelUtil
;
import
com.dsk.cscec.domain.bo.CbSummaryActualBo
;
import
com.dsk.cscec.domain.bo.CbSummaryActualBo
;
import
com.dsk.cscec.domain.bo.CbSummaryActualListBo
;
import
com.dsk.cscec.domain.bo.CbSummaryActualListBo
;
import
com.dsk.cscec.domain.bo.CbSummaryActualLockBo
;
import
com.dsk.cscec.domain.bo.CbSummaryBo
;
import
com.dsk.cscec.domain.bo.CbSummaryBo
;
import
com.dsk.cscec.domain.vo.CbSummaryActualListVo
;
import
com.dsk.cscec.domain.vo.CbSummaryActualListVo
;
import
com.dsk.cscec.domain.vo.CbSummaryCostAccountExportVo
;
import
com.dsk.cscec.domain.vo.CbSummaryCostAccountExportVo
;
...
@@ -64,10 +65,20 @@ public class CbSummaryController extends BaseController {
...
@@ -64,10 +65,20 @@ public class CbSummaryController extends BaseController {
* @return
* @return
*/
*/
@GetMapping
(
"/expenseDateList"
)
@GetMapping
(
"/expenseDateList"
)
public
R
<
List
<
String
>>
getExpenseDateList
(
@Validated
CbSummaryBo
bo
)
{
public
R
<
List
<
Map
<
String
,
Object
>
>>
getExpenseDateList
(
@Validated
CbSummaryBo
bo
)
{
return
R
.
ok
(
cbSummaryService
.
getExpenseDateList
(
bo
));
return
R
.
ok
(
cbSummaryService
.
getExpenseDateList
(
bo
));
}
}
/**
* 已锁定月份
* @param bo
* @return
*/
@GetMapping
(
"/expenseDateList/locked"
)
public
R
<
List
<
String
>>
getLockedList
(
@Validated
CbSummaryBo
bo
)
{
return
R
.
ok
(
cbSummaryService
.
getLockedList
(
bo
));
}
/**
/**
* 编辑成本
* 编辑成本
*
*
...
@@ -79,9 +90,25 @@ public class CbSummaryController extends BaseController {
...
@@ -79,9 +90,25 @@ public class CbSummaryController extends BaseController {
return
cbSummaryService
.
insertOrUpdateActual
(
boList
)
==
true
?
R
.
ok
()
:
R
.
fail
();
return
cbSummaryService
.
insertOrUpdateActual
(
boList
)
==
true
?
R
.
ok
()
:
R
.
fail
();
}
}
//锁定成本前提示未填项(按一级大类)
/**
* 锁定成本前提示未填项(按一级大类)
* @param bo
* @return
*/
@GetMapping
(
"/getUnfilled"
)
public
R
getUnfilled
(
CbSummaryActualLockBo
bo
){
return
cbSummaryService
.
getUnfilled
(
bo
);
}
//锁定成本
/**
* 按月份锁定成本
* @param bo
* @return
*/
@PostMapping
(
"/lockActual"
)
public
R
lockActual
(
@RequestBody
CbSummaryActualLockBo
bo
)
{
return
cbSummaryService
.
lockActual
(
bo
)
==
true
?
R
.
ok
()
:
R
.
fail
();
}
/**
/**
* 导出excel-按月导出所有
* 导出excel-按月导出所有
...
@@ -89,7 +116,7 @@ public class CbSummaryController extends BaseController {
...
@@ -89,7 +116,7 @@ public class CbSummaryController extends BaseController {
* @param response
* @param response
*/
*/
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
CbSummaryActualListBo
bo
,
HttpServletResponse
response
)
{
public
void
export
(
@RequestBody
CbSummaryActualListBo
bo
,
HttpServletResponse
response
)
{
List
<
CbSummaryActualListVo
>
actualListVoList
=
cbSummaryService
.
getAll
(
bo
);
List
<
CbSummaryActualListVo
>
actualListVoList
=
cbSummaryService
.
getAll
(
bo
);
if
(
bo
.
getCbType
()==
1
){
if
(
bo
.
getCbType
()==
1
){
List
<
CbSummaryProjectExportVo
>
list
=
BeanUtil
.
copyToList
(
actualListVoList
,
CbSummaryProjectExportVo
.
class
);
List
<
CbSummaryProjectExportVo
>
list
=
BeanUtil
.
copyToList
(
actualListVoList
,
CbSummaryProjectExportVo
.
class
);
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/domain/CbSummary.java
View file @
74d9ff7e
package
com
.
dsk
.
cscec
.
domain
;
package
com
.
dsk
.
cscec
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -83,6 +84,7 @@ public class CbSummary implements Serializable {
...
@@ -83,6 +84,7 @@ public class CbSummary implements Serializable {
/**
/**
* 删除状态(0:否、2:是)
* 删除状态(0:否、2:是)
*/
*/
@TableLogic
private
Integer
delFlag
;
private
Integer
delFlag
;
/**
/**
* 成本类型(1项目汇总,2成本科目汇总)
* 成本类型(1项目汇总,2成本科目汇总)
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/domain/CbSummaryActual.java
View file @
74d9ff7e
...
@@ -40,7 +40,7 @@ public class CbSummaryActual implements Serializable {
...
@@ -40,7 +40,7 @@ public class CbSummaryActual implements Serializable {
/**
/**
* 是否锁定(0否,1是)
* 是否锁定(0否,1是)
*/
*/
private
Integer
lockStatus
;
//
private Integer lockStatus;
/**
/**
* 创建时间
* 创建时间
*/
*/
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/domain/CbSummaryActualLock.java
0 → 100644
View file @
74d9ff7e
package
com
.
dsk
.
cscec
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
lombok.Data
;
import
java.util.Date
;
import
java.io.Serializable
;
/**
* 成本汇总-每月成本锁定(CbSummaryActualLock)实体类
*
* @author makejava
* @since 2024-02-19
*/
@Data
public
class
CbSummaryActualLock
implements
Serializable
{
private
static
final
long
serialVersionUID
=
849892917534518164L
;
/**
* 主键id
*/
@TableId
(
value
=
"id"
)
private
Long
id
;
/**
* 项目id
*/
private
Long
projectId
;
/**
* 费用日期
*/
private
String
expenseDate
;
/**
* 成本类型(1项目汇总,2成本科目汇总)
*/
private
Integer
cbType
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 删除状态(0:否、2:是)
*/
@TableLogic
private
Integer
delFlag
;
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/domain/bo/CbSummaryActualListBo.java
View file @
74d9ff7e
...
@@ -15,6 +15,10 @@ public class CbSummaryActualListBo extends BaseEntity {
...
@@ -15,6 +15,10 @@ public class CbSummaryActualListBo extends BaseEntity {
* 主键id
* 主键id
*/
*/
private
Long
id
;
private
Long
id
;
/**
* 项目id
*/
private
Long
projectId
;
/**
/**
* 成本阶段( 0:标前成本、1:标后成本、2:转固成本)
* 成本阶段( 0:标前成本、1:标后成本、2:转固成本)
*/
*/
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/domain/bo/CbSummaryActualLockBo.java
0 → 100644
View file @
74d9ff7e
package
com
.
dsk
.
cscec
.
domain
.
bo
;
import
com.dsk.common.core.domain.BaseEntity
;
import
lombok.Data
;
/**
* 成本汇总-每月成本锁定(CbSummaryActualLock)bo
*
* @author cyf
* @since 2024-02-19
*/
@Data
public
class
CbSummaryActualLockBo
extends
BaseEntity
{
/**
* 项目id
*/
private
Long
projectId
;
/**
* 费用日期
*/
private
String
expenseDate
;
/**
* 成本类型(1项目汇总,2成本科目汇总)
*/
private
Integer
cbType
;
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/domain/vo/CbSummaryActualListVo.java
View file @
74d9ff7e
...
@@ -26,6 +26,10 @@ public class CbSummaryActualListVo extends BaseEntity {
...
@@ -26,6 +26,10 @@ public class CbSummaryActualListVo extends BaseEntity {
* 成本阶段( 0:标前成本、1:标后成本、2:转固成本)
* 成本阶段( 0:标前成本、1:标后成本、2:转固成本)
*/
*/
private
Integer
cbStage
;
private
Integer
cbStage
;
/**
* 层级
*/
private
Integer
level
;
/**
/**
* 序号
* 序号
*/
*/
...
@@ -82,10 +86,6 @@ public class CbSummaryActualListVo extends BaseEntity {
...
@@ -82,10 +86,6 @@ public class CbSummaryActualListVo extends BaseEntity {
* 费用日期
* 费用日期
*/
*/
private
String
expenseDate
;
private
String
expenseDate
;
/**
* 是否锁定(0否,1是)
*/
private
Integer
lockStatus
;
private
List
<
CbSummaryActualListVo
>
children
;
private
List
<
CbSummaryActualListVo
>
children
;
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/mapper/CbSummaryActualLockMapper.java
0 → 100644
View file @
74d9ff7e
package
com
.
dsk
.
cscec
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.dsk.cscec.domain.CbSummaryActualLock
;
import
com.dsk.cscec.domain.bo.CbSummaryBo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 成本汇总-每月成本锁定(CbSummaryActualLock)表数据库访问层
*
* @author makejava
* @since 2024-02-19
*/
public
interface
CbSummaryActualLockMapper
extends
BaseMapper
<
CbSummaryActualLock
>
{
/**
* 获取已锁定成本月份
*
* @param bo
* @return
*/
List
<
String
>
getLockedList
(
@Param
(
"bo"
)
CbSummaryBo
bo
);
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/mapper/CbSummaryActualMapper.java
View file @
74d9ff7e
...
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.dsk.cscec.domain.CbSummaryActual
;
import
com.dsk.cscec.domain.CbSummaryActual
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 成本汇总-每月费用(CbSummaryActual)表数据库访问层
* 成本汇总-每月费用(CbSummaryActual)表数据库访问层
...
@@ -21,4 +23,11 @@ public interface CbSummaryActualMapper extends BaseMapper<CbSummaryActual> {
...
@@ -21,4 +23,11 @@ public interface CbSummaryActualMapper extends BaseMapper<CbSummaryActual> {
*/
*/
int
insertOrUpdateBatch
(
@Param
(
"entities"
)
List
<
CbSummaryActual
>
entities
);
int
insertOrUpdateBatch
(
@Param
(
"entities"
)
List
<
CbSummaryActual
>
entities
);
/**
* 截至本月费用
* @param cbSummaryId
* @param expenseDate
* @return
*/
Map
<
String
,
BigDecimal
>
getTotal
(
@Param
(
"cbSummaryId"
)
Long
cbSummaryId
,
@Param
(
"expenseDate"
)
String
expenseDate
);
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/mapper/CbSummaryMapper.java
View file @
74d9ff7e
...
@@ -22,6 +22,14 @@ public interface CbSummaryMapper extends BaseMapper<CbSummary> {
...
@@ -22,6 +22,14 @@ public interface CbSummaryMapper extends BaseMapper<CbSummary> {
CbSummaryActualListVo
getById
(
@Param
(
"id"
)
Long
id
,
@Param
(
"expenseDate"
)
String
expenseDate
);
CbSummaryActualListVo
getById
(
@Param
(
"id"
)
Long
id
,
@Param
(
"expenseDate"
)
String
expenseDate
);
/**
* 根据ids获取实际成本
* @param entities
* @param expenseDate
* @return
*/
List
<
CbSummaryActualListVo
>
getByIds
(
@Param
(
"entities"
)
List
<
CbSummary
>
entities
,
@Param
(
"expenseDate"
)
String
expenseDate
);
/**
/**
* 根据月份获取所有项目汇总数据
* 根据月份获取所有项目汇总数据
*
*
...
@@ -44,7 +52,7 @@ public interface CbSummaryMapper extends BaseMapper<CbSummary> {
...
@@ -44,7 +52,7 @@ public interface CbSummaryMapper extends BaseMapper<CbSummary> {
* @param bo
* @param bo
* @return
* @return
*/
*/
List
<
String
>
getExpenseDateList
(
@Param
(
"bo"
)
CbSummaryBo
bo
);
List
<
Map
<
String
,
Object
>
>
getExpenseDateList
(
@Param
(
"bo"
)
CbSummaryBo
bo
);
/**
/**
* 根据level获取名称/成本科目
* 根据level获取名称/成本科目
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/CbSummaryService.java
View file @
74d9ff7e
package
com
.
dsk
.
cscec
.
service
;
package
com
.
dsk
.
cscec
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.dsk.common.core.domain.R
;
import
com.dsk.cscec.domain.CbSummary
;
import
com.dsk.cscec.domain.CbSummary
;
import
com.dsk.cscec.domain.bo.CbSummaryActualBo
;
import
com.dsk.cscec.domain.bo.CbSummaryActualBo
;
import
com.dsk.cscec.domain.bo.CbSummaryActualListBo
;
import
com.dsk.cscec.domain.bo.CbSummaryActualListBo
;
import
com.dsk.cscec.domain.bo.CbSummaryActualLockBo
;
import
com.dsk.cscec.domain.bo.CbSummaryBo
;
import
com.dsk.cscec.domain.bo.CbSummaryBo
;
import
com.dsk.cscec.domain.vo.CbSummaryActualListVo
;
import
com.dsk.cscec.domain.vo.CbSummaryActualListVo
;
...
@@ -44,7 +46,15 @@ public interface CbSummaryService extends IService<CbSummary> {
...
@@ -44,7 +46,15 @@ public interface CbSummaryService extends IService<CbSummary> {
* @param bo
* @param bo
* @return
* @return
*/
*/
List
<
String
>
getExpenseDateList
(
CbSummaryBo
bo
);
List
<
Map
<
String
,
Object
>>
getExpenseDateList
(
CbSummaryBo
bo
);
/**
* 获取已锁定成本月份
*
* @param bo
* @return
*/
List
<
String
>
getLockedList
(
CbSummaryBo
bo
);
/**
/**
* 新增/更新每月费用
* 新增/更新每月费用
...
@@ -54,6 +64,20 @@ public interface CbSummaryService extends IService<CbSummary> {
...
@@ -54,6 +64,20 @@ public interface CbSummaryService extends IService<CbSummary> {
*/
*/
boolean
insertOrUpdateActual
(
List
<
CbSummaryActualBo
>
boList
);
boolean
insertOrUpdateActual
(
List
<
CbSummaryActualBo
>
boList
);
/**
* 获取未填写成本一级大类
* @param bo
* @return
*/
R
getUnfilled
(
CbSummaryActualLockBo
bo
);
/**
* 锁定成本
* @param bo
* @return
*/
boolean
lockActual
(
CbSummaryActualLockBo
bo
);
/**
/**
* 导出列表获取
* 导出列表获取
* @param bo
* @param bo
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/impl/CbSummaryServiceImpl.java
View file @
74d9ff7e
...
@@ -7,20 +7,16 @@ import cn.hutool.core.lang.Assert;
...
@@ -7,20 +7,16 @@ import cn.hutool.core.lang.Assert;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.dsk.common.core.domain.R
;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.cscec.constant.CbProjectConstants
;
import
com.dsk.cscec.constant.CbProjectConstants
;
import
com.dsk.cscec.domain.CbProjectFile
;
import
com.dsk.cscec.domain.*
;
import
com.dsk.cscec.domain.CbProjectRecord
;
import
com.dsk.cscec.domain.CbSummary
;
import
com.dsk.cscec.domain.CbSummaryActual
;
import
com.dsk.cscec.domain.bo.CbSummaryActualBo
;
import
com.dsk.cscec.domain.bo.CbSummaryActualBo
;
import
com.dsk.cscec.domain.bo.CbSummaryActualListBo
;
import
com.dsk.cscec.domain.bo.CbSummaryActualListBo
;
import
com.dsk.cscec.domain.bo.CbSummaryActualLockBo
;
import
com.dsk.cscec.domain.bo.CbSummaryBo
;
import
com.dsk.cscec.domain.bo.CbSummaryBo
;
import
com.dsk.cscec.domain.vo.CbSummaryActualListVo
;
import
com.dsk.cscec.domain.vo.CbSummaryActualListVo
;
import
com.dsk.cscec.mapper.CbProjectFileMapper
;
import
com.dsk.cscec.mapper.*
;
import
com.dsk.cscec.mapper.CbProjectRecordMapper
;
import
com.dsk.cscec.mapper.CbSummaryActualMapper
;
import
com.dsk.cscec.mapper.CbSummaryMapper
;
import
com.dsk.cscec.service.CbSummaryService
;
import
com.dsk.cscec.service.CbSummaryService
;
import
jodd.util.StringUtil
;
import
jodd.util.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -28,6 +24,7 @@ import org.springframework.stereotype.Service;
...
@@ -28,6 +24,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -50,6 +47,9 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
...
@@ -50,6 +47,9 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
@Autowired
@Autowired
private
CbProjectRecordMapper
cbProjectRecordMapper
;
private
CbProjectRecordMapper
cbProjectRecordMapper
;
@Autowired
private
CbSummaryActualLockMapper
cbSummaryActualLockMapper
;
@Override
@Override
public
void
importCbProject
(
Long
projectId
,
Integer
cbStage
)
{
public
void
importCbProject
(
Long
projectId
,
Integer
cbStage
)
{
//获取文件信息
//获取文件信息
...
@@ -96,33 +96,43 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
...
@@ -96,33 +96,43 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
@Override
@Override
public
List
<
CbSummaryActualListVo
>
getActualList
(
CbSummaryActualListBo
bo
)
{
public
List
<
CbSummaryActualListVo
>
getActualList
(
CbSummaryActualListBo
bo
)
{
Assert
.
notNull
(
bo
.
getId
(),
"id不能为空"
);
Assert
.
notNull
(
bo
.
getId
(),
"id不能为空"
);
Assert
.
notNull
(
bo
.
getCbType
(),
"成本类型不能为空"
);
Assert
.
notNull
(
bo
.
getCbType
(),
"成本类型不能为空"
);
if
(
StringUtil
.
isBlank
(
bo
.
getExpenseDate
()))
{
if
(
StringUtil
.
isBlank
(
bo
.
getExpenseDate
()))
{
//默认当前月
//默认当前月
bo
.
setExpenseDate
(
DatePattern
.
SIMPLE_MONTH_FORMAT
.
format
(
new
Date
()));
bo
.
setExpenseDate
(
DatePattern
.
SIMPLE_MONTH_FORMAT
.
format
(
new
Date
()));
}
}
//当前父级数据
CbSummary
cbSummary
=
baseMapper
.
selectById
(
bo
.
getId
());
CbSummary
ActualListVo
cbSummaryActualListVo
=
baseMapper
.
getById
(
bo
.
getId
(),
bo
.
getExpenseDate
());
if
(
ObjectUtil
.
isEmpty
(
cbSummary
))
{
if
(
ObjectUtil
.
isEmpty
(
cbSummary
ActualListVo
))
{
return
null
;
return
null
;
}
}
//截至本月费用汇总
Map
<
String
,
BigDecimal
>
parentTotal
=
cbSummaryActualMapper
.
getTotal
(
cbSummaryActualListVo
.
getId
(),
bo
.
getExpenseDate
());
cbSummaryActualListVo
.
setTaxExclusiveExpenseTotal
(
parentTotal
.
get
(
"taxExclusiveExpenseTotal"
));
cbSummaryActualListVo
.
setTaxInclusiveExpenseTotal
(
parentTotal
.
get
(
"taxInclusiveExpenseTotal"
));
List
<
CbSummaryActualListVo
>
childrenList
=
baseMapper
.
getByParentId
(
bo
.
getId
(),
bo
.
getExpenseDate
());
List
<
CbSummaryActualListVo
>
childrenList
=
baseMapper
.
getByParentId
(
bo
.
getId
(),
bo
.
getExpenseDate
());
if
(
0
==
cbSummary
.
getLevel
()
&&
1
==
bo
.
getCbType
())
{
//截至本月费用汇总
//项目汇总
childrenList
.
forEach
(
children
->
{
Map
<
String
,
BigDecimal
>
total
=
cbSummaryActualMapper
.
getTotal
(
children
.
getId
(),
bo
.
getExpenseDate
());
children
.
setTaxExclusiveExpenseTotal
(
total
.
get
(
"taxExclusiveExpenseTotal"
));
children
.
setTaxInclusiveExpenseTotal
(
total
.
get
(
"taxInclusiveExpenseTotal"
));
});
if
(
0
==
cbSummaryActualListVo
.
getLevel
()
&&
1
==
bo
.
getCbType
())
{
//项目汇总一级列表
return
childrenList
;
return
childrenList
;
}
else
if
(
0
==
cbSummary
.
getLevel
()
&&
2
==
bo
.
getCbType
())
{
}
else
if
(
0
==
cbSummaryActualListVo
.
getLevel
()
&&
2
==
bo
.
getCbType
())
{
//成本科目汇总
//成本科目汇总一级列表
CbSummaryActualListVo
cbSummaryActualListVo
=
baseMapper
.
getById
(
bo
.
getId
(),
bo
.
getExpenseDate
());
cbSummaryActualListVo
.
setChildren
(
childrenList
);
cbSummaryActualListVo
.
setChildren
(
childrenList
);
List
<
CbSummaryActualListVo
>
list
=
new
ArrayList
<>();
List
<
CbSummaryActualListVo
>
list
=
new
ArrayList
<>();
list
.
add
(
cbSummaryActualListVo
);
list
.
add
(
cbSummaryActualListVo
);
return
list
;
return
list
;
}
else
{
}
else
{
//递归列表
childrenList
=
getProjectSumList
(
bo
);
childrenList
=
getProjectSumList
(
bo
);
CbSummaryActualListVo
cbSummaryActualListVo
=
baseMapper
.
getById
(
bo
.
getId
(),
bo
.
getExpenseDate
());
cbSummaryActualListVo
.
setChildren
(
childrenList
);
cbSummaryActualListVo
.
setChildren
(
childrenList
);
List
<
CbSummaryActualListVo
>
list
=
new
ArrayList
<>();
List
<
CbSummaryActualListVo
>
list
=
new
ArrayList
<>();
...
@@ -133,7 +143,7 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
...
@@ -133,7 +143,7 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
}
}
/**
/**
* 成本汇总列表
* 成本汇总
递归
列表
*
*
* @param bo
* @param bo
* @return
* @return
...
@@ -146,6 +156,10 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
...
@@ -146,6 +156,10 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
childBo
.
setId
(
children
.
getId
());
childBo
.
setId
(
children
.
getId
());
childBo
.
setExpenseDate
(
bo
.
getExpenseDate
());
childBo
.
setExpenseDate
(
bo
.
getExpenseDate
());
children
.
setChildren
(
getProjectSumList
(
childBo
));
children
.
setChildren
(
getProjectSumList
(
childBo
));
//截至本月费用汇总
Map
<
String
,
BigDecimal
>
total
=
cbSummaryActualMapper
.
getTotal
(
children
.
getId
(),
bo
.
getExpenseDate
());
children
.
setTaxExclusiveExpenseTotal
(
total
.
get
(
"taxExclusiveExpenseTotal"
));
children
.
setTaxInclusiveExpenseTotal
(
total
.
get
(
"taxInclusiveExpenseTotal"
));
});
});
return
childrenList
;
return
childrenList
;
...
@@ -153,50 +167,142 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
...
@@ -153,50 +167,142 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
}
}
@Override
@Override
public
List
<
String
>
getExpenseDateList
(
CbSummaryBo
bo
)
{
public
List
<
Map
<
String
,
Object
>
>
getExpenseDateList
(
CbSummaryBo
bo
)
{
Assert
.
notNull
(
bo
.
getProjectId
(),
"项目id不能为空"
);
Assert
.
notNull
(
bo
.
getProjectId
(),
"项目id不能为空"
);
Assert
.
notNull
(
bo
.
getCbStage
(),
"成本阶段不能为空"
);
//
Assert.notNull(bo.getCbStage(),"成本阶段不能为空");
Assert
.
notNull
(
bo
.
getCbType
(),
"成本类型不能为空"
);
Assert
.
notNull
(
bo
.
getCbType
(),
"成本类型不能为空"
);
return
baseMapper
.
getExpenseDateList
(
bo
);
return
baseMapper
.
getExpenseDateList
(
bo
);
}
}
@Override
public
List
<
String
>
getLockedList
(
CbSummaryBo
bo
)
{
Assert
.
notNull
(
bo
.
getProjectId
(),
"项目id不能为空"
);
Assert
.
notNull
(
bo
.
getCbType
(),
"成本类型不能为空"
);
return
cbSummaryActualLockMapper
.
getLockedList
(
bo
);
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
insertOrUpdateActual
(
List
<
CbSummaryActualBo
>
boList
)
{
public
boolean
insertOrUpdateActual
(
List
<
CbSummaryActualBo
>
boList
)
{
if
(
CollectionUtil
.
isEmpty
(
boList
))
{
if
(
CollectionUtil
.
isEmpty
(
boList
))
{
return
false
;
return
false
;
}
}
boList
.
forEach
(
bo
->
{
boList
.
forEach
(
bo
->
{
Assert
.
notNull
(
bo
.
getCbSummaryId
(),
"成本汇总id不能为空"
);
Assert
.
notNull
(
bo
.
getCbSummaryId
(),
"成本汇总id不能为空"
);
Assert
.
notNull
(
bo
.
getExpenseDate
(),
"费用日期不能为空"
);
Assert
.
notNull
(
bo
.
getExpenseDate
(),
"费用日期不能为空"
);
});
});
List
<
CbSummaryActual
>
actualList
=
BeanUtil
.
copyToList
(
boList
,
CbSummaryActual
.
class
);
//todo
CbSummary
cbSummary
=
baseMapper
.
selectById
(
boList
.
get
(
0
).
getCbSummaryId
());
// throw new ServiceException("当前成本已锁定,不允许编辑
!");
Assert
.
isFalse
(
ObjectUtil
.
isNull
(
cbSummary
),
"成本汇总数据不存在
!"
);
String
expenseDate
=
boList
.
get
(
0
).
getExpenseDate
();
boolean
exists
=
cbSummaryActualLockMapper
.
exists
(
new
LambdaQueryWrapper
<
CbSummaryActualLock
>()
.
eq
(
CbSummaryActualLock:
:
getProjectId
,
cbSummary
.
getProjectId
())
.
eq
(
CbSummaryActualLock:
:
getExpenseDate
,
expenseDate
)
.
eq
(
CbSummaryActualLock:
:
getCbType
,
cbSummary
.
getCbType
())
);
Assert
.
isFalse
(
exists
,
"该月成本已锁定"
);
List
<
CbSummaryActual
>
actualList
=
BeanUtil
.
copyToList
(
boList
,
CbSummaryActual
.
class
);
return
cbSummaryActualMapper
.
insertOrUpdateBatch
(
actualList
)
>
0
;
return
cbSummaryActualMapper
.
insertOrUpdateBatch
(
actualList
)
>
0
;
}
}
@Override
public
R
getUnfilled
(
CbSummaryActualLockBo
bo
)
{
Assert
.
notNull
(
bo
.
getCbType
(),
"成本类型不能为空"
);
Assert
.
notNull
(
bo
.
getProjectId
(),
"项目id不能为空"
);
Assert
.
notBlank
(
bo
.
getExpenseDate
(),
"费用日期不能为空"
);
StringBuilder
unfilled
=
new
StringBuilder
();
//获取一级大类成本id
List
<
CbSummary
>
firstList
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
CbSummary
>()
.
eq
(
CbSummary:
:
getProjectId
,
bo
.
getProjectId
())
.
eq
(
CbSummary:
:
getLevel
,
1
)
.
eq
(
CbSummary:
:
getCbType
,
bo
.
getCbType
())
.
orderByAsc
(
CbSummary:
:
getSort
)
);
firstList
.
forEach
(
firstCb
->
{
//获取大类下的所有子级id
List
<
CbSummary
>
allList
=
new
ArrayList
<>();
allList
.
add
(
firstCb
);
allList
.
addAll
(
getAllChild
(
firstCb
.
getId
(),
new
ArrayList
<>()));
//根据子级id查询是否填写实际成本
List
<
CbSummaryActualListVo
>
vos
=
baseMapper
.
getByIds
(
allList
,
bo
.
getExpenseDate
());
if
(
CollectionUtil
.
isEmpty
(
vos
))
{
unfilled
.
append
(
firstCb
.
getCbName
()).
append
(
"、"
);
}
});
if
(
unfilled
.
length
()
>
0
)
{
unfilled
.
deleteCharAt
(
unfilled
.
lastIndexOf
(
"、"
));
unfilled
.
append
(
" 未填写成本,是否继续锁定?"
);
return
R
.
fail
(
unfilled
.
toString
());
}
else
{
return
R
.
ok
();
}
}
private
List
<
CbSummary
>
getAllChild
(
Long
id
,
List
<
CbSummary
>
resultList
)
{
List
<
CbSummary
>
childList
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
CbSummary
>()
.
eq
(
CbSummary:
:
getParentId
,
id
)
);
if
(
CollectionUtil
.
isNotEmpty
(
childList
))
{
resultList
.
addAll
(
childList
);
childList
.
forEach
(
child
->
{
getAllChild
(
child
.
getId
(),
resultList
);
});
}
return
resultList
;
}
@Override
public
boolean
lockActual
(
CbSummaryActualLockBo
bo
)
{
Assert
.
notNull
(
bo
.
getCbType
(),
"成本类型不能为空"
);
Assert
.
notNull
(
bo
.
getProjectId
(),
"项目id不能为空"
);
Assert
.
notBlank
(
bo
.
getExpenseDate
(),
"费用日期不能为空"
);
boolean
exists
=
cbSummaryActualLockMapper
.
exists
(
new
LambdaQueryWrapper
<
CbSummaryActualLock
>()
.
eq
(
CbSummaryActualLock:
:
getProjectId
,
bo
.
getProjectId
())
.
eq
(
CbSummaryActualLock:
:
getExpenseDate
,
bo
.
getExpenseDate
())
.
eq
(
CbSummaryActualLock:
:
getCbType
,
bo
.
getCbType
())
);
Assert
.
isFalse
(
exists
,
"该月成本已锁定,请勿重复操作!"
);
CbSummaryActualLock
lock
=
BeanUtil
.
copyProperties
(
bo
,
CbSummaryActualLock
.
class
);
return
cbSummaryActualLockMapper
.
insert
(
lock
)
>
0
;
}
@Override
@Override
public
List
<
CbSummaryActualListVo
>
getAll
(
CbSummaryActualListBo
bo
)
{
public
List
<
CbSummaryActualListVo
>
getAll
(
CbSummaryActualListBo
bo
)
{
Assert
.
notNull
(
bo
.
getId
(),
"项目id不能为空"
);
Assert
.
notNull
(
bo
.
get
Project
Id
(),
"项目id不能为空"
);
Assert
.
notNull
(
bo
.
getCbType
(),
"成本类型不能为空"
);
Assert
.
notNull
(
bo
.
getCbType
(),
"成本类型不能为空"
);
Assert
.
notNull
(
bo
.
getExpenseDate
(),
"费用日期不能为空"
);
Assert
.
notNull
(
bo
.
getExpenseDate
(),
"费用日期不能为空"
);
//获取项目成本阶段
//获取项目成本阶段
CbProjectRecord
cbProjectRecord
=
cbProjectRecordMapper
.
selectById
(
bo
.
getId
());
CbProjectRecord
cbProjectRecord
=
cbProjectRecordMapper
.
selectById
(
bo
.
get
Project
Id
());
if
(
ObjectUtil
.
isNull
(
cbProjectRecord
))
{
if
(
ObjectUtil
.
isNull
(
cbProjectRecord
))
{
throw
new
ServiceException
(
"当前项目不存在"
);
throw
new
ServiceException
(
"当前项目不存在"
);
}
}
bo
.
setCbStage
(
cbProjectRecord
.
getCbStage
());
// bo.setCbStage(cbProjectRecord.getCbStage());
List
<
CbSummaryActualListVo
>
resultList
=
new
ArrayList
<>();
if
(
bo
.
getCbType
()
==
1
)
{
if
(
bo
.
getCbType
()
==
1
)
{
re
turn
baseMapper
.
getProjectAll
(
bo
);
re
sultList
=
baseMapper
.
getProjectAll
(
bo
);
}
else
{
}
else
{
re
turn
baseMapper
.
getCostAccountAll
(
bo
);
re
sultList
=
baseMapper
.
getCostAccountAll
(
bo
);
}
}
//todo 截至本月费用汇总
//截至本月费用汇总
resultList
.
forEach
(
cbSummaryActualListVo
->
{
Map
<
String
,
BigDecimal
>
total
=
cbSummaryActualMapper
.
getTotal
(
cbSummaryActualListVo
.
getId
(),
bo
.
getExpenseDate
());
cbSummaryActualListVo
.
setTaxExclusiveExpenseTotal
(
total
.
get
(
"taxExclusiveExpenseTotal"
));
cbSummaryActualListVo
.
setTaxInclusiveExpenseTotal
(
total
.
get
(
"taxInclusiveExpenseTotal"
));
});
return
resultList
;
}
}
}
}
dsk-module/dsk-biz-api/src/main/resources/mapper/cscec/CbSummaryActualLockMapper.xml
0 → 100644
View file @
74d9ff7e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.dsk.cscec.mapper.CbSummaryActualLockMapper"
>
<resultMap
type=
"com.dsk.cscec.domain.CbSummaryActualLock"
id=
"CbSummaryActualLockMap"
>
<result
property=
"id"
column=
"id"
jdbcType=
"INTEGER"
/>
<result
property=
"projectId"
column=
"project_id"
jdbcType=
"INTEGER"
/>
<result
property=
"expenseDate"
column=
"expense_date"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"delFlag"
column=
"del_flag"
jdbcType=
"INTEGER"
/>
</resultMap>
<sql
id=
"baseColumn"
>
id, project_id, expense_date, create_time, del_flag
</sql>
<select
id=
"getLockedList"
resultType=
"java.lang.String"
>
select csal.expense_date
from cb_summary_actual_lock csal
where
csal.project_id = #{bo.projectId}
and csal.cb_type = #{bo.cbType}
and csal.del_flag = 0
order by csal.expense_date desc
</select>
</mapper>
dsk-module/dsk-biz-api/src/main/resources/mapper/cscec/CbSummaryActualMapper.xml
View file @
74d9ff7e
...
@@ -8,13 +8,13 @@
...
@@ -8,13 +8,13 @@
<result
property=
"taxInclusiveExpense"
column=
"tax_inclusive_expense"
jdbcType=
"NUMERIC"
/>
<result
property=
"taxInclusiveExpense"
column=
"tax_inclusive_expense"
jdbcType=
"NUMERIC"
/>
<result
property=
"taxExclusiveExpense"
column=
"tax_exclusive_expense"
jdbcType=
"NUMERIC"
/>
<result
property=
"taxExclusiveExpense"
column=
"tax_exclusive_expense"
jdbcType=
"NUMERIC"
/>
<result
property=
"expenseDate"
column=
"expense_date"
jdbcType=
"VARCHAR"
/>
<result
property=
"expenseDate"
column=
"expense_date"
jdbcType=
"VARCHAR"
/>
<result
property=
"lockStatus"
column=
"lock_status"
jdbcType=
"INTEGER"
/
>
<!-- <result property="lockStatus" column="lock_status" jdbcType="INTEGER"/>--
>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"delFlag"
column=
"del_flag"
jdbcType=
"INTEGER"
/>
<result
property=
"delFlag"
column=
"del_flag"
jdbcType=
"INTEGER"
/>
</resultMap>
</resultMap>
<sql
id=
"baseColumn"
>
<sql
id=
"baseColumn"
>
id, cb_summary_id, tax_inclusive_expense, tax_exclusive_expense, expense_date,
lock_status,
create_time, del_flag
id, cb_summary_id, tax_inclusive_expense, tax_exclusive_expense, expense_date, create_time, del_flag
</sql>
</sql>
<insert
id=
"insertOrUpdateBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insertOrUpdateBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
...
@@ -27,5 +27,16 @@
...
@@ -27,5 +27,16 @@
cb_summary_id = values(cb_summary_id) , tax_inclusive_expense = values(tax_inclusive_expense) ,
cb_summary_id = values(cb_summary_id) , tax_inclusive_expense = values(tax_inclusive_expense) ,
tax_exclusive_expense = values(tax_exclusive_expense) , expense_date = values(expense_date)
tax_exclusive_expense = values(tax_exclusive_expense) , expense_date = values(expense_date)
</insert>
</insert>
<select
id=
"getTotal"
resultType=
"map"
>
select ifnull(sum(csa.tax_inclusive_expense),0) taxInclusiveExpenseTotal,
ifnull(sum(csa.tax_exclusive_expense),0) taxExclusiveExpenseTotal
from cb_summary_actual csa
<where>
csa.cb_summary_id = #{cbSummaryId}
and csa.expense_date
<
= #{expenseDate}
and csa.del_flag = 0
</where>
</select>
</mapper>
</mapper>
dsk-module/dsk-biz-api/src/main/resources/mapper/cscec/CbSummaryMapper.xml
View file @
74d9ff7e
...
@@ -50,15 +50,32 @@
...
@@ -50,15 +50,32 @@
</where>
</where>
</select>
</select>
<select
id=
"getByIds"
resultType=
"com.dsk.cscec.domain.vo.CbSummaryActualListVo"
>
select csu.*,csa.id actualId,csa.tax_inclusive_expense,csa.tax_exclusive_expense,csa.expense_date
from cb_summary csu
left join cb_summary_actual csa on csu.id = csa.cb_summary_id
<where>
csa.expense_date = #{expenseDate}
and csa.del_flag = 0
and csu.del_flag = 0
and csu.id in
<foreach
collection=
"entities"
item=
"entity"
separator=
","
open=
"("
close=
")"
>
#{entity.id}
</foreach>
</where>
</select>
<select
id=
"getProjectAll"
resultType=
"com.dsk.cscec.domain.vo.CbSummaryActualListVo"
>
<select
id=
"getProjectAll"
resultType=
"com.dsk.cscec.domain.vo.CbSummaryActualListVo"
>
select
select
<include
refid=
"baseColumn"
></include>
,
<include
refid=
"baseColumn"
></include>
,
csa.tax_inclusive_expense,csa.tax_exclusive_expense
csa.
id actualId,csa.
tax_inclusive_expense,csa.tax_exclusive_expense
from cb_summary csu
from cb_summary csu
left join cb_summary_actual csa on csu.id = csa.cb_summary_id and csa.expense_date = #{expenseDate} AND csa.del_flag = 0
left join cb_summary_actual csa on csu.id = csa.cb_summary_id and csa.expense_date = #{
bo.
expenseDate} AND csa.del_flag = 0
<where>
<where>
csu.project_id = #{bo.id}
csu.project_id = #{bo.projectId}
and csu.cb_stage = #{bo.cbStage}
<if
test=
"bo.cbStage != null"
>
and csu.cb_stage = #{bo.cbStage}
</if>
and csu.cb_type = #{bo.cbType}
and csu.cb_type = #{bo.cbType}
and csu.del_flag = 0
and csu.del_flag = 0
and csu.level != 0
and csu.level != 0
...
@@ -69,30 +86,33 @@
...
@@ -69,30 +86,33 @@
<select
id=
"getCostAccountAll"
resultType=
"com.dsk.cscec.domain.vo.CbSummaryActualListVo"
>
<select
id=
"getCostAccountAll"
resultType=
"com.dsk.cscec.domain.vo.CbSummaryActualListVo"
>
select
select
<include
refid=
"baseColumn"
></include>
,
<include
refid=
"baseColumn"
></include>
,
csa.tax_inclusive_expense,csa.tax_exclusive_expense
csa.
id actualId,csa.
tax_inclusive_expense,csa.tax_exclusive_expense
from cb_summary csu
from cb_summary csu
left join cb_summary_actual csa on csu.id = csa.cb_summary_id and csa.expense_date = #{expenseDate} AND csa.del_flag = 0
left join cb_summary_actual csa on csu.id = csa.cb_summary_id and csa.expense_date = #{
bo.
expenseDate} AND csa.del_flag = 0
<where>
<where>
csu.project_id = #{bo.projectId}
csu.project_id = #{bo.projectId}
and csu.cb_stage = #{bo.cbStage}
<if
test=
"bo.cbStage != null"
>
and csu.cb_stage = #{bo.cbStage}
</if>
and csu.cb_type = #{bo.cbType}
and csu.cb_type = #{bo.cbType}
and csu.del_flag = 0
and csu.del_flag = 0
</where>
</where>
order by csu.sort
order by csu.sort
</select>
</select>
<select
id=
"getExpenseDateList"
resultType=
"string"
>
<select
id=
"getExpenseDateList"
resultType=
"map"
>
select csa.expense_date
select csa.expense_date expenseDate,
if(csal.id is null,0,1) as isLock
from cb_summary_actual csa
from cb_summary_actual csa
left join cb_summary csu on csu.id = csa.cb_summary_id
left join cb_summary csu on csu.id = csa.cb_summary_id
left join cb_summary_actual_lock csal on csal.project_id = csu.project_id and csal.expense_date = csa.expense_date and csal.del_flag = 0
where
where
csu.project_id = #{bo.projectId}
csu.project_id = #{bo.projectId}
and csu.cb_stage = #{bo.cbStage}
and csu.cb_type = #{bo.cbType}
and csu.cb_type = #{bo.cbType}
and csu.del_flag = 0
and csu.del_flag = 0
and csa.del_flag = 0
and csa.del_flag = 0
group by csa.expense_date
group by csa.expense_date
order by csa.expense_date
a
sc
order by csa.expense_date
de
sc
</select>
</select>
<select
id=
"selectByLevel"
resultType=
"map"
>
<select
id=
"selectByLevel"
resultType=
"map"
>
...
...
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