|
@@ -105,7 +105,7 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
@Override
|
|
|
public Page<AssetsVO> selectPage(Page page, AssetsSelectDTO assetsSelectDTO) {
|
|
|
// 判断是否要根据部门id集合查询(部门待办查询)
|
|
|
- if (ObjectUtil.isNotNull(assetsSelectDTO.getSelectByDepartment()) && assetsSelectDTO.getSelectByDepartment()){
|
|
|
+ if (ObjectUtil.isNotNull(assetsSelectDTO.getSelectByDepartment()) && assetsSelectDTO.getSelectByDepartment()) {
|
|
|
List<Long> depIds = new ArrayList<>();
|
|
|
for (SimpleParentModel postModel : LoginContext.getLoginCacheUserBO().getDepartmentList()) {
|
|
|
// 根据部门id获取部门及其下属部门的id
|
|
@@ -115,7 +115,7 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
assetsSelectDTO.setDepartmentIdList(depIds.stream().distinct().collect(Collectors.toList()));
|
|
|
}
|
|
|
// 判断是否要查询资产列表,资产列表只能查询包含本人及其所在部门的人员为项目负责人或客户经理的流程(资产列表查询)
|
|
|
- if (ObjectUtil.isNotNull(assetsSelectDTO.getSelectByAll()) && assetsSelectDTO.getSelectByAll()){
|
|
|
+ if (ObjectUtil.isNotNull(assetsSelectDTO.getSelectByAll()) && assetsSelectDTO.getSelectByAll()) {
|
|
|
List<Long> depIds = new ArrayList<>();
|
|
|
for (SimpleParentModel depModel : LoginContext.getLoginCacheUserBO().getDepartmentList()) {
|
|
|
// 根据部门id获取部门及其下属部门的id
|
|
@@ -132,7 +132,7 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
assetsSelectDTO.setDepartmentIdList(depIds.stream().distinct().collect(Collectors.toList()));
|
|
|
}
|
|
|
// 此处判断handlerId是否为空只是为了确保前端查询条件有handlerId,并不直接信任
|
|
|
- if (ObjectUtil.isNotNull(assetsSelectDTO) && ObjectUtil.isNotNull(assetsSelectDTO.getHandlerId())){
|
|
|
+ if (ObjectUtil.isNotNull(assetsSelectDTO) && ObjectUtil.isNotNull(assetsSelectDTO.getHandlerId())) {
|
|
|
assetsSelectDTO.setHandlerId(LoginContext.getCurrentUserId());
|
|
|
}
|
|
|
return assetsMapper.selectPage(page, assetsSelectDTO);
|
|
@@ -140,13 +140,14 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
|
|
|
/**
|
|
|
* 条件导出资产任务列表
|
|
|
+ *
|
|
|
* @param assetsSelectDTO 查询条件
|
|
|
* @return Page<AssetsVO>
|
|
|
*/
|
|
|
@Override
|
|
|
public List<AssetsVO> exportPage(AssetsSelectDTO assetsSelectDTO) {
|
|
|
// 判断是否要根据部门id集合查询(部门待办查询)
|
|
|
- if (ObjectUtil.isNotNull(assetsSelectDTO.getSelectByDepartment()) && assetsSelectDTO.getSelectByDepartment()){
|
|
|
+ if (ObjectUtil.isNotNull(assetsSelectDTO.getSelectByDepartment()) && assetsSelectDTO.getSelectByDepartment()) {
|
|
|
List<Long> depIds = new ArrayList<>();
|
|
|
for (SimpleParentModel postModel : LoginContext.getLoginCacheUserBO().getDepartmentList()) {
|
|
|
// 根据部门id获取部门及其下属部门的id
|
|
@@ -156,7 +157,7 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
assetsSelectDTO.setDepartmentIdList(depIds.stream().distinct().collect(Collectors.toList()));
|
|
|
}
|
|
|
// 判断是否要查询资产列表,资产列表只能查询包含本人及其所在部门的人员为项目负责人或项目经理的流程(资产列表查询)
|
|
|
- if (ObjectUtil.isNotNull(assetsSelectDTO.getSelectByAll()) && assetsSelectDTO.getSelectByAll()){
|
|
|
+ if (ObjectUtil.isNotNull(assetsSelectDTO.getSelectByAll()) && assetsSelectDTO.getSelectByAll()) {
|
|
|
List<Long> depIds = new ArrayList<>();
|
|
|
for (SimpleParentModel postModel : LoginContext.getLoginCacheUserBO().getDepartmentList()) {
|
|
|
// 根据部门id获取部门及其下属部门的id
|
|
@@ -166,7 +167,7 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
assetsSelectDTO.setDepartmentIdList(depIds.stream().distinct().collect(Collectors.toList()));
|
|
|
}
|
|
|
// 此处判断handlerId是否为空只是为了确保前端查询条件有handlerId,并不直接信任
|
|
|
- if (ObjectUtil.isNotNull(assetsSelectDTO) && ObjectUtil.isNotNull(assetsSelectDTO.getHandlerId())){
|
|
|
+ if (ObjectUtil.isNotNull(assetsSelectDTO) && ObjectUtil.isNotNull(assetsSelectDTO.getHandlerId())) {
|
|
|
assetsSelectDTO.setHandlerId(LoginContext.getCurrentUserId());
|
|
|
}
|
|
|
return assetsMapper.exportPage(assetsSelectDTO);
|
|
@@ -182,7 +183,7 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
@Override
|
|
|
public Page<AssetsVO> selectMyOrderPage(Page page, AssetsSelectDTO assetsSelectDTO) {
|
|
|
// 此处判断managerId是否为空只是为了确保前端查询条件有managerId,并不直接信任
|
|
|
- if (ObjectUtil.isNotNull(assetsSelectDTO) && ObjectUtil.isNotNull(assetsSelectDTO.getClientManagerId())){
|
|
|
+ if (ObjectUtil.isNotNull(assetsSelectDTO) && ObjectUtil.isNotNull(assetsSelectDTO.getClientManagerId())) {
|
|
|
assetsSelectDTO.setClientManagerId(LoginContext.getCurrentUserId());
|
|
|
}
|
|
|
return assetsMapper.selectMyOrderPage(page, assetsSelectDTO);
|
|
@@ -190,13 +191,14 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
|
|
|
/**
|
|
|
* 导出我的任务订单列表
|
|
|
+ *
|
|
|
* @param assetsSelectDTO 查询条件
|
|
|
* @return Page<AssetsVO>
|
|
|
*/
|
|
|
@Override
|
|
|
public List<AssetsVO> exportMyOrder(AssetsSelectDTO assetsSelectDTO) {
|
|
|
// 此处判断managerId是否为空只是为了确保前端查询条件有managerId,并不直接信任
|
|
|
- if (ObjectUtil.isNotNull(assetsSelectDTO) && ObjectUtil.isNotNull(assetsSelectDTO.getClientManagerId())){
|
|
|
+ if (ObjectUtil.isNotNull(assetsSelectDTO) && ObjectUtil.isNotNull(assetsSelectDTO.getClientManagerId())) {
|
|
|
assetsSelectDTO.setClientManagerId(LoginContext.getCurrentUserId());
|
|
|
}
|
|
|
return assetsMapper.exportMyOrder(assetsSelectDTO);
|
|
@@ -317,6 +319,7 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
|
|
|
/**
|
|
|
* 修改资产业务订单项目成员
|
|
|
+ *
|
|
|
* @param membersDTO 修改dto
|
|
|
* @return Boolean
|
|
|
*/
|
|
@@ -330,16 +333,17 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 根据业务id获取资产业务款项信息
|
|
|
+ * 根据业务id与产品号获取资产业务款项信息
|
|
|
*
|
|
|
* @param id 业务id
|
|
|
* @return AssetsOrderFundInvoiceVO
|
|
|
*/
|
|
|
@Override
|
|
|
- public AssetsOrderFundInvoiceVO getOrderFundInvoiceById(Long id) {
|
|
|
- AssetsOrderFundInvoiceVO assetsOrderFundInvoiceVO = assetsMapper.getOrderFundInvoiceById(id);
|
|
|
+ public AssetsOrderFundInvoiceVO getOrderFundInvoiceById(Long id, String productionNo) {
|
|
|
+ AssetsOrderFundInvoiceVO assetsOrderFundInvoiceVO = assetsMapper.getOrderFundInvoiceById(id, productionNo);
|
|
|
assetsOrderFundInvoiceVO.setFinanceInvoiceVoList(financeInvoiceService.list(new LambdaQueryWrapper<FinanceInvoice>()
|
|
|
- .eq(ObjectUtil.isNotNull(assetsOrderFundInvoiceVO.getId()),FinanceInvoice::getOrderFundId, assetsOrderFundInvoiceVO.getId())
|
|
|
+ .eq(FinanceInvoice::getOrderFundId, assetsOrderFundInvoiceVO.getOrderFundId())
|
|
|
+ .eq(FinanceInvoice::getProductionFundId, assetsOrderFundInvoiceVO.getProductionFundId())
|
|
|
.eq(BaseEntity::getDeleted, 0)));
|
|
|
return assetsOrderFundInvoiceVO;
|
|
|
}
|
|
@@ -420,7 +424,7 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
.eq(BusinessProductionChoiceLog::getBusinessId, dto.getBusinessId())
|
|
|
.eq(BusinessProductionChoiceLog::getTakeNoStatus, 0));
|
|
|
// 将未取号的评估对象对应的产品选择记录的产品id改为新的
|
|
|
- if (ObjectUtil.isNotNull(choiceLog)){
|
|
|
+ if (ObjectUtil.isNotNull(choiceLog)) {
|
|
|
choiceLog.setProductionId(copyProductionInfo.getId());
|
|
|
// 获取后将选择记录对应的产品id改为前面新添加的产品信息
|
|
|
choiceLogList.add(choiceLog);
|
|
@@ -452,7 +456,8 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
|
|
|
/**
|
|
|
* 生成资产产品号
|
|
|
- * 资产Month没有特殊含义,就是进位,比如现在是0199,不管月份,下一位就是0200
|
|
|
+ * 资产Month没有特殊含义,就是进位,比如现在是0199,不管月份,下一位就是0200
|
|
|
+ *
|
|
|
* @param takeAssetsProductionNoDTO 取号dto
|
|
|
* @return String
|
|
|
*/
|
|
@@ -759,6 +764,7 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
|
|
|
/**
|
|
|
* 获取资产市场下单部门
|
|
|
+ *
|
|
|
* @return List<Department>
|
|
|
*/
|
|
|
@Override
|
|
@@ -768,12 +774,12 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
|
|
|
|
@Override
|
|
|
public List<Assets> getMembersIsNull() {
|
|
|
- return assetsMapper.selectList(new LambdaQueryWrapper<Assets>().select(BaseEntity::getId,Assets::getOrderId));
|
|
|
+ return assetsMapper.selectList(new LambdaQueryWrapper<Assets>().select(BaseEntity::getId, Assets::getOrderId));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void updateMembers(Assets assets) {
|
|
|
- this.update(new LambdaUpdateWrapper<Assets>().eq(BaseEntity::getId,assets.getId()).set(Assets::getMembers,assets.getMembers()));
|
|
|
+ this.update(new LambdaUpdateWrapper<Assets>().eq(BaseEntity::getId, assets.getId()).set(Assets::getMembers, assets.getMembers()));
|
|
|
}
|
|
|
|
|
|
/**
|