|
@@ -440,13 +440,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
}
|
|
|
|
|
|
|
|
|
- * 利润预算
|
|
|
- *
|
|
|
- * @param dto
|
|
|
- * @return
|
|
|
+ * 利润预算表公共条件
|
|
|
*/
|
|
|
- @Override
|
|
|
- public Page<ContractBudgetVo> getProfitBudgetPage(ContractSelectDto dto) {
|
|
|
+ private IWrapper<Contract> getProfitBudgetPageWrapper(ContractSelectDto dto) {
|
|
|
IWrapper<Contract> wrapper = getWrapper();
|
|
|
wrapper.orderByDesc("t1", Contract::getCreateTime);
|
|
|
wrapper.eq("t1", Contract::getIsChange, "0");
|
|
@@ -481,6 +477,21 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
|
|
|
wrapper.eq("t1", Contract::getId, dto.getId());
|
|
|
|
|
|
+
|
|
|
+ wrapper.eq("t1", Contract::getIsSettled, dto.getIsSettled());
|
|
|
+ return wrapper;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 利润预算
|
|
|
+ *
|
|
|
+ * @param dto
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public Page<ContractBudgetVo> getProfitBudgetPage(ContractSelectDto dto) {
|
|
|
+ IWrapper<Contract> wrapper = getProfitBudgetPageWrapper(dto);
|
|
|
+
|
|
|
|
|
|
Page<ContractBudgetVo> page = this.baseMapper.getProfitBudgetPage(dto.getPage(), wrapper);
|
|
|
List<ContractBudgetVo> list = page.getRecords();
|
|
@@ -502,39 +513,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
*/
|
|
|
@Override
|
|
|
public Map<String, Object> getProfitBudgetHeadStatistic(ContractSelectDto dto) {
|
|
|
- IWrapper<Contract> wrapper = getWrapper();
|
|
|
- wrapper.orderByDesc("t1", Contract::getCreateTime);
|
|
|
- wrapper.eq("t1", Contract::getIsChange, "0");
|
|
|
- wrapper.ne("t1", Contract::getIsShow, 1);
|
|
|
- wrapper.between("t1", Contract::getStatus, FlowStatusEnum1.PASS.getKey(), FlowStatusEnum1.CANCELLATION.getKey() - 1);
|
|
|
- if (StringUtils.isNotEmpty(dto.getCustomerId())) {
|
|
|
- wrapper.eq("t1", Contract::getBuyCorporationId, dto.getCustomerId());
|
|
|
- }
|
|
|
- if (StringUtils.isNotEmpty(dto.getUserId())) {
|
|
|
- wrapper.eq("t1", Contract::getCreateUser, dto.getUserId());
|
|
|
- }
|
|
|
- if (StringUtils.isNotEmpty(dto.getKeyword())) {
|
|
|
- wrapper.keyword(dto.getKeyword(), new SqlField("t1.code"));
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if (StringUtils.isNotEmpty(dto.getCustomerName())) {
|
|
|
- wrapper.like("cu.name", dto.getCustomerName());
|
|
|
- }
|
|
|
-
|
|
|
- if (StringUtils.isNotEmpty(dto.getUserName())) {
|
|
|
- wrapper.like("us1.nick_name", dto.getUserName());
|
|
|
- }
|
|
|
-
|
|
|
- if (StringUtils.isNotEmpty(dto.getContractCode())) {
|
|
|
- wrapper.like("t1", Contract::getCode, dto.getContractCode());
|
|
|
- }
|
|
|
-
|
|
|
- wrapper.ge("t1", Contract::getCreateTime, dto.getBeginTime());
|
|
|
- wrapper.le("t1", Contract::getCreateTime, dto.getEndTime());
|
|
|
-
|
|
|
-
|
|
|
- wrapper.eq("t1", Contract::getId, dto.getId());
|
|
|
+ IWrapper<Contract> wrapper = getProfitBudgetPageWrapper(dto);
|
|
|
|
|
|
List<ContractBudgetVo> list = this.baseMapper.getProfitBudgetHeadStatistic(wrapper);
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
@@ -792,6 +771,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
|
|
|
wrapper.eq("t1", Contract::getId, dto.getId());
|
|
|
|
|
|
+
|
|
|
+ wrapper.eq("t1", Contract::getIsSettled, dto.getIsSettled());
|
|
|
+
|
|
|
Page<ContractBudgetVo> page = this.baseMapper.getProfitClearingPage(dto.getPage(), wrapper);
|
|
|
List<ContractBudgetVo> list = page.getRecords();
|
|
|
if (ObjectUtil.isEmpty(list)) {
|