add:工作组成员新增确认凭证、审核字段;新增确认凭证接口

This commit is contained in:
sunzheng
2024-07-08 16:47:57 +08:00
parent 78a553c1bd
commit 9e0ecc0ab0
8 changed files with 110 additions and 8 deletions
+28
View File
@@ -145,3 +145,31 @@ INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `com
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1808798008250093569', '1808797556947177473', '导出', NULL, NULL, NULL, NULL, 2, 'companyPaymentClassificationStatistics:export', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-07-04 17:40:26', NULL, NULL, 0, 0, '1', 0, 1); INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1808798008250093569', '1808797556947177473', '导出', NULL, NULL, NULL, NULL, 2, 'companyPaymentClassificationStatistics:export', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-07-04 17:40:26', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1808797925806854146', '1808797556947177473', '查询', NULL, NULL, NULL, NULL, 2, 'companyPaymentClassificationStatistics:search', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-07-04 17:40:06', NULL, NULL, 0, 0, '1', 0, 1); INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1808797925806854146', '1808797556947177473', '查询', NULL, NULL, NULL, NULL, 2, 'companyPaymentClassificationStatistics:search', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-07-04 17:40:06', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1808797556947177473', '1437320526513905666', '企业来款分类统计', '/statisticalReport/enterprisePaymentStatistics/enterprisePaymentClassificationStatisticsList', 'statisticalReport/enterprisePaymentStatistics/EnterprisePaymentClassificationStatisticsList', NULL, NULL, 1, NULL, '1', 2.10, 0, NULL, 1, 0, 1, 0, NULL, 'LKGLZ', '2024-07-04 17:38:38', NULL, NULL, 0, 0, '1', 0, 0); INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1808797556947177473', '1437320526513905666', '企业来款分类统计', '/statisticalReport/enterprisePaymentStatistics/enterprisePaymentClassificationStatisticsList', 'statisticalReport/enterprisePaymentStatistics/EnterprisePaymentClassificationStatisticsList', NULL, NULL, 1, NULL, '1', 2.10, 0, NULL, 1, 0, 1, 0, NULL, 'LKGLZ', '2024-07-04 17:38:38', NULL, NULL, 0, 0, '1', 0, 0);
-- 20240705 标协会员的视图创建
CREATE VIEW v_member_project_subitem AS
SELECT
`t1`.`id` AS `id`,
`t1`.`member_no` AS `member_no`,
`t1`.`company_name` AS `company_name`,
`t1`.`liaison_man_id` AS `liaison_man_id`,
`t1`.`member_status` AS `member_status`,
`t1`.`effective_date` AS `effective_date`,
`t1`.`invalidation_date` AS `invalidation_date`,
`t1`.`create_time` AS `create_time`,
`t1`.`project_id` AS `project_id`
FROM
(
`tb_member_project_subitem` `t1`
JOIN ( SELECT `tb_member_project_subitem`.`company_id` AS `company_id`, max( `tb_member_project_subitem`.`create_time` ) AS `max_create_time` FROM `tb_member_project_subitem` GROUP BY `tb_member_project_subitem`.`company_id` ) `t2` ON (((
`t1`.`company_id` = `t2`.`company_id`
)
AND ( `t1`.`create_time` = `t2`.`max_create_time` ))))
WHERE
(
`t1`.`member_status` IS NOT NULL);
-- 20240708 工作组成员新增是否审核,是否确认凭证字段
ALTER TABLE `tb_member_project_subitem`
add column check_payment_status tinyint(1) comment '是否审核(1:是,0:否)',
add column confirm_voucher tinyint(1) comment '是否确认凭证(1:是,0:否)';
@@ -563,6 +563,9 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
project = payWorkingGroup.getWorkingGroupProject(); project = payWorkingGroup.getWorkingGroupProject();
checkSendMessage(payPaymentRecord.getCreateBy(), payPaymentRecord.getProjectId(),project, String.valueOf(payPaymentRecord.getProjectType())); checkSendMessage(payPaymentRecord.getCreateBy(), payPaymentRecord.getProjectId(),project, String.valueOf(payPaymentRecord.getProjectType()));
} }
// 更新审核状态为已审核
payWorking.setCheckPaymentStatus(PayProjectCommon.IS_CHECK_PAY_MENT);
payWorkingGroupSubItemMapper.updateById(payWorking);
break; break;
//会员项目 //会员项目
@@ -149,4 +149,21 @@ public class PayProjectCommon {
* 确认收入((1:全额(对勾),0:0(X),2:>0 && <总金额(半满标志))) * 确认收入((1:全额(对勾),0:0(X),2:>0 && <总金额(半满标志)))
*/ */
public static Integer AFFIRM_INCOME0 = 0; public static Integer AFFIRM_INCOME0 = 0;
/**
* 1 已审核
*/
public static Integer IS_CHECK_PAY_MENT = 1;
/**
* 0 未审核
*/
public static Integer NOT_CHECK_PAY_MENT = 0;
/**
* 1 确认凭证
*/
public static Integer IS_CONFIRM_VOUCHER = 1;
/**
* 0 未确认凭证
*/
public static Integer NOT_CONFIRM_VOUCHER = 0;
} }
@@ -455,6 +455,9 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
if (StringUtils.isBlank(workingGroupIds)) { if (StringUtils.isBlank(workingGroupIds)) {
return Result.error("工作组ids不能为空!"); return Result.error("工作组ids不能为空!");
} }
if (!StringUtils.isBlank(payWorkingGroupSubItem.getEstimatedArrivalDate())) {
payWorkingGroupSubItem.setEstimatedArrivalDate(payWorkingGroupSubItem.getEstimatedArrivalDate() + "-01");
}
String[] workingGroupIdsArr = workingGroupIds.split(","); String[] workingGroupIdsArr = workingGroupIds.split(",");
List<String> errInfoList = new ArrayList<>(); List<String> errInfoList = new ArrayList<>();
for (String workingGroupId : workingGroupIdsArr) { for (String workingGroupId : workingGroupIdsArr) {
@@ -932,4 +935,18 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
payWorkingGroupSubItemService.deleteLabel(setLabelVO); payWorkingGroupSubItemService.deleteLabel(setLabelVO);
return Result.OK("设置标签成功!"); return Result.OK("设置标签成功!");
} }
/**
* 确认凭证
*
* @return
*/
@AutoLog(value = "确认凭证",operateType = 2)
// @RequiresPermissions("workingGroupMember:confirmVoucher")
@GetMapping(value = "/confirmVoucher")
@ApiOperation(value = "工作组成员-确认凭证")
public Result<?> confirmVoucher(@RequestParam(name = "id") String id) {
payWorkingGroupSubItemService.confirmVoucher(id);
return Result.OK("确认凭证成功!");
}
} }
@@ -614,4 +614,10 @@ public class PayWorkingGroupSubItem implements Serializable {
@ApiModelProperty(value = "工作组ids 多个以逗号分隔") @ApiModelProperty(value = "工作组ids 多个以逗号分隔")
@TableField(exist = false) @TableField(exist = false)
private String workingGroupIds; private String workingGroupIds;
@ApiModelProperty(value = "是否审核(1:是,0:否")
private Integer checkPaymentStatus;
@ApiModelProperty(value = "是否确认凭证(1:是,0:否")
private Integer confirmVoucher;
} }
@@ -57,7 +57,9 @@
pwgs.tax_rate, pwgs.tax_rate,
pwgs.no_tax_amount, pwgs.no_tax_amount,
pwgs.label, pwgs.label,
pwgs.estimated_arrival_date pwgs.estimated_arrival_date,
pwgs.check_payment_status,
pwgs.confirm_voucher
FROM pay_working_group_subitem pwgs FROM pay_working_group_subitem pwgs
LEFT JOIN pay_payment_record ppr ON ppr.project_id = pwgs.id LEFT JOIN pay_payment_record ppr ON ppr.project_id = pwgs.id
left join pay_company_management_temporary pcmt on pwgs.charge_company_temporary_id = pcmt.id left join pay_company_management_temporary pcmt on pwgs.charge_company_temporary_id = pcmt.id
@@ -92,6 +94,12 @@
<if test="payWorkingGroupSubItem.id != null and payWorkingGroupSubItem.id != ''"> <if test="payWorkingGroupSubItem.id != null and payWorkingGroupSubItem.id != ''">
and pwgs.id = #{payWorkingGroupSubItem.id} and pwgs.id = #{payWorkingGroupSubItem.id}
</if> </if>
<if test="payWorkingGroupSubItem.confirmVoucher != null">
and pwgs.confirm_voucher = #{payWorkingGroupSubItem.confirmVoucher}
</if>
<if test="payWorkingGroupSubItem.checkPaymentStatus != null">
and pwgs.check_payment_status = #{payWorkingGroupSubItem.checkPaymentStatus}
</if>
</where> </where>
GROUP BY pwgs.id GROUP BY pwgs.id
ORDER BY pwgs.create_time desc ORDER BY pwgs.create_time desc
@@ -145,4 +145,10 @@ public interface IPayWorkingGroupSubItemService extends IService<PayWorkingGroup
* @param id * @param id
*/ */
void editAccount(String workGroupId, String companyId, String id); void editAccount(String workGroupId, String companyId, String id);
/**
* 确认凭证
* @param id
*/
void confirmVoucher(String id);
} }
@@ -241,6 +241,8 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
payWorkingGroupSubItem.setMail(PayProjectCommon.MAIL0); payWorkingGroupSubItem.setMail(PayProjectCommon.MAIL0);
payWorkingGroupSubItem.setChargeUse(PayProjectCommon.CHARGE_USE1); payWorkingGroupSubItem.setChargeUse(PayProjectCommon.CHARGE_USE1);
payWorkingGroupSubItem.setAffirmIncome(PayProjectCommon.AFFIRM_INCOME0); payWorkingGroupSubItem.setAffirmIncome(PayProjectCommon.AFFIRM_INCOME0);
payWorkingGroupSubItem.setCheckPaymentStatus(PayProjectCommon.NOT_CHECK_PAY_MENT);
payWorkingGroupSubItem.setConfirmVoucher(PayProjectCommon.NOT_CONFIRM_VOUCHER);
payWorkingGroupSubItemService.save(payWorkingGroupSubItem); payWorkingGroupSubItemService.save(payWorkingGroupSubItem);
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContactsNew = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList(); List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContactsNew = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
// 添加联系人表 // 添加联系人表
@@ -453,10 +455,12 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
BigDecimal taxRate = payWorkingGroupSubItem.getTaxRate(); BigDecimal taxRate = payWorkingGroupSubItem.getTaxRate();
BigDecimal receivableAmount = payWorkingGroupSubItem.getReceivableAmount(); BigDecimal receivableAmount = payWorkingGroupSubItem.getReceivableAmount();
if (!Objects.isNull(taxRate)) {
BigDecimal noTaxAmount = receivableAmount.divide(taxRate.add(BigDecimal.ONE), 2, RoundingMode.HALF_UP); BigDecimal noTaxAmount = receivableAmount.divide(taxRate.add(BigDecimal.ONE), 2, RoundingMode.HALF_UP);
BigDecimal tax = receivableAmount.subtract(noTaxAmount); BigDecimal tax = receivableAmount.subtract(noTaxAmount);
payWorkingGroupSubItem.setNoTaxAmount(noTaxAmount); payWorkingGroupSubItem.setNoTaxAmount(noTaxAmount);
payWorkingGroupSubItem.setTax(tax); payWorkingGroupSubItem.setTax(tax);
}
payWorkingGroupSubItemService.updateById(payWorkingGroupSubItem); payWorkingGroupSubItemService.updateById(payWorkingGroupSubItem);
LambdaUpdateWrapper<PayWorkingGroupSubItem> updatePayWorkingGroupSubItem = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<PayWorkingGroupSubItem> updatePayWorkingGroupSubItem = new LambdaUpdateWrapper<>();
updatePayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getId, workingGroupSubItemId); updatePayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getId, workingGroupSubItemId);
@@ -1498,4 +1502,17 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
payWorkingGroupSubItem.setMailContactsId(payWorkingGroupSubItemOld.getMailContactsId()); payWorkingGroupSubItem.setMailContactsId(payWorkingGroupSubItemOld.getMailContactsId());
} }
} }
/**
* 确认凭证
*
* @param id
*/
@Override
public void confirmVoucher(String id) {
LambdaUpdateWrapper<PayWorkingGroupSubItem> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(PayWorkingGroupSubItem::getId, id);
updateWrapper.set(PayWorkingGroupSubItem::getConfirmVoucher, PayProjectCommon.IS_CONFIRM_VOUCHER);
payWorkingGroupSubItemMapper.update(null, updateWrapper);
}
} }