Compare commits

..

11 Commits

@ -0,0 +1,89 @@
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- for electronic_finance
-- ----------------------------
DROP TABLE IF EXISTS `electronic_finance`;
CREATE TABLE `electronic_finance`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '',
`create_by` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`company_id` bigint DEFAULT NULL COMMENT 'id',
`company` varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`user_id` bigint DEFAULT NULL COMMENT 'id',
`dept_id` bigint DEFAULT NULL COMMENT 'id',
`dept_name` varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`account` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`project` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`Invoice_number` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '/',
`price` decimal(20, 2) DEFAULT NULL COMMENT '',
`status` varchar(2) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`position` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`cherks` int DEFAULT NULL COMMENT '',
`record_id` bigint DEFAULT NULL COMMENT 'id',
`trade_type` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`pay_type` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`file_status` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`contract_attachment` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`remarks` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`creator` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`updater` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`create_time` datetime DEFAULT NULL COMMENT '',
`update_time` datetime DEFAULT NULL COMMENT '',
`trade_date` datetime DEFAULT NULL COMMENT '',
`record_time` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`tenant_id` bigint NOT NULL COMMENT '',
`deleted` bit(1) DEFAULT b'0' COMMENT '',
PRIMARY KEY (`id`) USING BTREE,
KEY `IX_electronic_finance_tenant_id` (`tenant_id`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = DYNAMIC COMMENT ='';
-- id
SELECT `id`
INTO @menuId
FROM `system_menu`
WHERE `name` = '';
-- SQL
INSERT INTO system_menu(name, permission, type, sort, parent_id,
path, icon, component, status, component_name)
VALUES ('', '', 2, 0, @menuId,
'electronic-finance', 'clipboard', 'ea/electronicFinance/index', 0, 'ElectronicFinance');
-- ID
-- MySQL OraclePostgreSQLSQLServer @parentId
SELECT @parentId := LAST_INSERT_ID();
-- SQL
INSERT INTO system_menu(name, permission, type, sort, parent_id,
path, icon, component, status)
VALUES ('', 'electronic:finance:query', 3, 1, @parentId,
'', '', '', 0);
INSERT INTO system_menu(name, permission, type, sort, parent_id,
path, icon, component, status)
VALUES ('', 'electronic:finance:create', 3, 2, @parentId,
'', '', '', 0);
INSERT INTO system_menu(name, permission, type, sort, parent_id,
path, icon, component, status)
VALUES ('', 'electronic:finance:update', 3, 3, @parentId,
'', '', '', 0);
INSERT INTO system_menu(name, permission, type, sort, parent_id,
path, icon, component, status)
VALUES ('', 'electronic:finance:delete', 3, 4, @parentId,
'', '', '', 0);
INSERT INTO system_menu(name, permission, type, sort, parent_id,
path, icon, component, status)
VALUES ('', 'electronic:finance:export', 3, 5, @parentId,
'', '', '', 0);
-- -
INSERT INTO `lyr-one`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`,
`css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`,
`deleted`)
VALUES (null, '10', '', 'electronic_finance', 'archives_file_type', '0', 'default', '', NULL, '',
'2023-11-08 15:13:50', '', '2023-11-08 15:14:08', b'0');

@ -0,0 +1,38 @@
--
ALTER TABLE archives_borrow_apply ADD COLUMN `process_instance_id` varchar(255) NULL DEFAULT NULL COMMENT '';
--
ALTER TABLE archives_borrow_apply ADD COLUMN `bill_type` varchar(255) NULL DEFAULT NULL COMMENT '';
--
ALTER TABLE archives_borrow_apply ADD COLUMN `status` varchar(64) NULL DEFAULT NULL COMMENT '';
--
ALTER TABLE archives_turn_over ADD COLUMN `file_name` varchar(255) NULL DEFAULT NULL COMMENT '';
ALTER TABLE archives_borrow_apply ADD COLUMN `status` varchar(64) NULL DEFAULT NULL COMMENT '';
alter table archives_borrow_apply alter column status set default 1;
--
INSERT INTO `lyr-one`.`system_notify_template` (`id`, `name`, `code`, `nickname`, `content`, `type`, `params`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (19, '', 'BORROW_UNDEAL', '', '{billName}', 2, '[\"billName\"]', 0, NULL, '', '2023-11-09 10:59:29', '', '2023-11-09 11:01:31', b'0');
INSERT INTO `lyr-one`.`system_notify_template` (`id`, `name`, `code`, `nickname`, `content`, `type`, `params`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (20, '', 'BORROW_NOPASS', '', '{billName}\n', 2, '[\"billName\"]', 0, NULL, '', '2023-11-09 11:00:17', '', '2023-11-09 11:01:28', b'0');
INSERT INTO `lyr-one`.`system_notify_template` (`id`, `name`, `code`, `nickname`, `content`, `type`, `params`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (21, '', 'BORROW_PASS', '', '{billName}', 2, '[\"billName\"]', 0, NULL, '', '2023-11-09 11:01:20', '', '2023-11-09 11:01:25', b'0');
--
INSERT INTO `lyr-one`.`bpm_process_definition_ext` (`id`, `process_definition_id`, `model_id`, `description`, `form_type`, `form_id`, `form_conf`, `form_fields`, `form_custom_create_path`, `form_custom_view_path`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (150, 'borrowApply_turn_over:1:b4d0a15f-7ea1-11ee-996c-9ebfc063da7b', 'ef7a711a-7ea0-11ee-996c-9ebfc063da7b', NULL, 10, 1, '{\"formRef\":\"elForm\",\"formModel\":\"formData\",\"size\":\"medium\",\"labelPosition\":\"right\",\"labelWidth\":100,\"formRules\":\"rules\",\"gutter\":15,\"disabled\":false,\"span\":24,\"formBtns\":true}', '[\"{\\\"__config__\\\":{\\\"label\\\":\\\"单行文本\\\",\\\"labelWidth\\\":null,\\\"showLabel\\\":true,\\\"changeTag\\\":true,\\\"tag\\\":\\\"el-input\\\",\\\"tagIcon\\\":\\\"input\\\",\\\"required\\\":true,\\\"layout\\\":\\\"colFormItem\\\",\\\"span\\\":24,\\\"document\\\":\\\"https://element.eleme.cn/#/zh-CN/component/input\\\",\\\"regList\\\":[],\\\"formId\\\":101,\\\"renderKey\\\":\\\"1011694592250766\\\"},\\\"__slot__\\\":{\\\"prepend\\\":\\\"\\\",\\\"append\\\":\\\"\\\"},\\\"placeholder\\\":\\\"请输入单行文本\\\",\\\"style\\\":{\\\"width\\\":\\\"100%\\\"},\\\"clearable\\\":true,\\\"prefix-icon\\\":\\\"\\\",\\\"suffix-icon\\\":\\\"\\\",\\\"maxlength\\\":null,\\\"show-word-limit\\\":false,\\\"readonly\\\":false,\\\"disabled\\\":false,\\\"__vModel__\\\":\\\"field101\\\"}\",\"{\\\"__config__\\\":{\\\"label\\\":\\\"多行文本\\\",\\\"labelWidth\\\":null,\\\"showLabel\\\":true,\\\"tag\\\":\\\"el-input\\\",\\\"tagIcon\\\":\\\"textarea\\\",\\\"required\\\":true,\\\"layout\\\":\\\"colFormItem\\\",\\\"span\\\":24,\\\"regList\\\":[],\\\"changeTag\\\":true,\\\"document\\\":\\\"https://element.eleme.cn/#/zh-CN/component/input\\\",\\\"formId\\\":102,\\\"renderKey\\\":\\\"1021699431468585\\\"},\\\"type\\\":\\\"textarea\\\",\\\"placeholder\\\":\\\"请输入多行文本\\\",\\\"autosize\\\":{\\\"minRows\\\":4,\\\"maxRows\\\":4},\\\"style\\\":{\\\"width\\\":\\\"100%\\\"},\\\"maxlength\\\":null,\\\"show-word-limit\\\":false,\\\"readonly\\\":false,\\\"disabled\\\":false,\\\"__vModel__\\\":\\\"field102\\\"}\",\"{\\\"__config__\\\":{\\\"label\\\":\\\"级联选择\\\",\\\"url\\\":\\\"https://www.fastmock.site/mock/f8d7a54fb1e60561e2f720d5a810009d/fg/cascaderList\\\",\\\"method\\\":\\\"get\\\",\\\"dataPath\\\":\\\"list\\\",\\\"dataConsumer\\\":\\\"options\\\",\\\"showLabel\\\":true,\\\"labelWidth\\\":null,\\\"tag\\\":\\\"el-cascader\\\",\\\"tagIcon\\\":\\\"cascader\\\",\\\"layout\\\":\\\"colFormItem\\\",\\\"defaultValue\\\":[],\\\"dataType\\\":\\\"dynamic\\\",\\\"span\\\":24,\\\"required\\\":true,\\\"regList\\\":[],\\\"changeTag\\\":true,\\\"document\\\":\\\"https://element.eleme.cn/#/zh-CN/component/cascader\\\",\\\"formId\\\":103,\\\"renderKey\\\":\\\"1031699431469582\\\"},\\\"options\\\":[{\\\"id\\\":1,\\\"value\\\":1,\\\"label\\\":\\\"选项1\\\",\\\"children\\\":[{\\\"id\\\":2,\\\"value\\\":2,\\\"label\\\":\\\"选项1-1\\\"}]}],\\\"placeholder\\\":\\\"请选择级联选择\\\",\\\"style\\\":{\\\"width\\\":\\\"100%\\\"},\\\"props\\\":{\\\"props\\\":{\\\"multiple\\\":false,\\\"label\\\":\\\"label\\\",\\\"value\\\":\\\"value\\\",\\\"children\\\":\\\"children\\\"}},\\\"show-all-levels\\\":true,\\\"disabled\\\":false,\\\"clearable\\\":true,\\\"filterable\\\":false,\\\"separator\\\":\\\"/\\\",\\\"__vModel__\\\":\\\"field103\\\"}\"]', NULL, NULL, '', '2023-11-09 09:45:48', '', '2023-11-09 09:45:48', b'0', 1);
INSERT INTO `lyr-one`.`bpm_task_assign_rule` (`id`, `model_id`, `process_definition_id`, `task_definition_key`, `type`, `options`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (300, 'ef7a711a-7ea0-11ee-996c-9ebfc063da7b', '', 'Activity_1miq0ca', 30, '[1]', '', '2023-11-09 09:45:43', '', '2023-11-09 09:45:43', b'0', 1);
INSERT INTO `lyr-one`.`bpm_task_assign_rule` (`id`, `model_id`, `process_definition_id`, `task_definition_key`, `type`, `options`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (301, 'ef7a711a-7ea0-11ee-996c-9ebfc063da7b', 'borrowApply_turn_over:1:b4d0a15f-7ea1-11ee-996c-9ebfc063da7b', 'Activity_1miq0ca', 30, '[1]', '', '2023-11-09 09:45:48', '', '2023-11-09 09:45:48', b'0', 1);
INSERT INTO `lyr-one`.`act_re_deployment` (`ID_`, `NAME_`, `CATEGORY_`, `KEY_`, `TENANT_ID_`, `DEPLOY_TIME_`, `DERIVED_FROM_`, `DERIVED_FROM_ROOT_`, `PARENT_DEPLOYMENT_ID_`, `ENGINE_VERSION_`) VALUES ('b4a635fc-7ea1-11ee-996c-9ebfc063da7b', '', '1', 'borrowApply_turn_over', '1', '2023-11-09 09:45:48.069', NULL, NULL, 'b4a635fc-7ea1-11ee-996c-9ebfc063da7b', NULL);
INSERT INTO `lyr-one`.`act_ge_bytearray` (`ID_`, `REV_`, `NAME_`, `DEPLOYMENT_ID_`, `BYTES_`, `GENERATED_`) VALUES ('4bf473fb-7ea1-11ee-996c-9ebfc063da7b', 2, 'source', NULL, 0x3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D38223F3E0A3C62706D6E323A646566696E6974696F6E7320786D6C6E733A7873693D22687474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D612D696E7374616E63652220786D6C6E733A62706D6E323D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42504D4E2F32303130303532342F4D4F44454C2220786D6C6E733A62706D6E64693D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42504D4E2F32303130303532342F44492220786D6C6E733A64633D22687474703A2F2F7777772E6F6D672E6F72672F737065632F44442F32303130303532342F44432220786D6C6E733A64693D22687474703A2F2F7777772E6F6D672E6F72672F737065632F44442F32303130303532342F4449222069643D226469616772616D5F50726F636573735F3136393934393430383130303422207461726765744E616D6573706163653D22687474703A2F2F666C6F7761626C652E6F72672F62706D6E223E3C62706D6E323A70726F636573732069643D22626F72726F774170706C795F7475726E5F6F76657222206E616D653D22E5809FE99885E794B3E8AFB7E58D952220697345786563757461626C653D2274727565223E3C62706D6E323A73746172744576656E742069643D224576656E745F3167317361377022206E616D653D22E5BC80E5A78B223E3C62706D6E323A6F7574676F696E673E466C6F775F317064653662723C2F62706D6E323A6F7574676F696E673E3C2F62706D6E323A73746172744576656E743E3C62706D6E323A757365725461736B2069643D2241637469766974795F316D697130636122206E616D653D22E7AEA1E79086E59198223E3C62706D6E323A696E636F6D696E673E466C6F775F317064653662723C2F62706D6E323A696E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3174786D30696D3C2F62706D6E323A6F7574676F696E673E3C2F62706D6E323A757365725461736B3E3C62706D6E323A656E644576656E742069643D224576656E745F3075647177786C22206E616D653D22E7BB93E69D9F223E3C62706D6E323A696E636F6D696E673E466C6F775F3174786D30696D3C2F62706D6E323A696E636F6D696E673E3C2F62706D6E323A656E644576656E743E3C62706D6E323A73657175656E6365466C6F772069643D22466C6F775F317064653662722220736F757263655265663D224576656E745F3167317361377022207461726765745265663D2241637469766974795F316D697130636122202F3E3C62706D6E323A73657175656E6365466C6F772069643D22466C6F775F3174786D30696D2220736F757263655265663D2241637469766974795F316D697130636122207461726765745265663D224576656E745F3075647177786C22202F3E3C2F62706D6E323A70726F636573733E3C62706D6E64693A42504D4E4469616772616D2069643D2242504D4E4469616772616D5F31223E3C62706D6E64693A42504D4E506C616E652069643D22626F72726F774170706C795F7475726E5F6F7665725F6469222062706D6E456C656D656E743D22626F72726F774170706C795F7475726E5F6F766572223E3C62706D6E64693A42504D4E456467652069643D22466C6F775F3174786D30696D5F6469222062706D6E456C656D656E743D22466C6F775F3174786D30696D223E3C64693A776179706F696E7420783D223336302220793D2232343022202F3E3C64693A776179706F696E7420783D223433322220793D2232343022202F3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E456467652069643D22466C6F775F317064653662725F6469222062706D6E456C656D656E743D22466C6F775F31706465366272223E3C64693A776179706F696E7420783D223137382220793D2232343022202F3E3C64693A776179706F696E7420783D223236302220793D2232343022202F3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E53686170652069643D224576656E745F316731736137705F6469222062706D6E456C656D656E743D224576656E745F31673173613770223E3C64633A426F756E647320783D223134322220793D22323232222077696474683D22333622206865696768743D22333622202F3E3C62706D6E64693A42504D4E4C6162656C3E3C64633A426F756E647320783D223134392220793D22323635222077696474683D22323322206865696768743D22313422202F3E3C2F62706D6E64693A42504D4E4C6162656C3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E53686170652069643D2241637469766974795F316D69713063615F6469222062706D6E456C656D656E743D2241637469766974795F316D6971306361223E3C64633A426F756E647320783D223236302220793D22323030222077696474683D2231303022206865696768743D22383022202F3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E53686170652069643D224576656E745F3075647177786C5F6469222062706D6E456C656D656E743D224576656E745F3075647177786C223E3C64633A426F756E647320783D223433322220793D22323232222077696474683D22333622206865696768743D22333622202F3E3C62706D6E64693A42504D4E4C6162656C3E3C64633A426F756E647320783D223433392220793D22323635222077696474683D22323322206865696768743D22313422202F3E3C2F62706D6E64693A42504D4E4C6162656C3E3C2F62706D6E64693A42504D4E53686170653E3C2F62706D6E64693A42504D4E506C616E653E3C2F62706D6E64693A42504D4E4469616772616D3E3C2F62706D6E323A646566696E6974696F6E733E, NULL);
INSERT INTO `lyr-one`.`act_re_model` (`ID_`, `REV_`, `NAME_`, `KEY_`, `CATEGORY_`, `CREATE_TIME_`, `LAST_UPDATE_TIME_`, `VERSION_`, `META_INFO_`, `DEPLOYMENT_ID_`, `EDITOR_SOURCE_VALUE_ID_`, `EDITOR_SOURCE_EXTRA_VALUE_ID_`, `TENANT_ID_`) VALUES ('ef7a711a-7ea0-11ee-996c-9ebfc063da7b', 7, '', 'borrowApply_turn_over', '1', '2023-11-09 09:40:17.271', '2023-11-09 09:45:48.392', 1, '{\"description\":null,\"formType\":10,\"formId\":1,\"formCustomCreatePath\":null,\"formCustomViewPath\":null}', 'b4a635fc-7ea1-11ee-996c-9ebfc063da7b', '4bf473fb-7ea1-11ee-996c-9ebfc063da7b', NULL, '1');
INSERT INTO `lyr-one`.`bpm_task_assign_rule` (`id`, `model_id`, `process_definition_id`, `task_definition_key`, `type`, `options`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (300, 'ef7a711a-7ea0-11ee-996c-9ebfc063da7b', '', 'Activity_1miq0ca', 30, '[1]', '', '2023-11-09 09:45:43', '', '2023-11-09 09:45:43', b'0', 1);
INSERT INTO `lyr-one`.`bpm_task_assign_rule` (`id`, `model_id`, `process_definition_id`, `task_definition_key`, `type`, `options`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (301, 'ef7a711a-7ea0-11ee-996c-9ebfc063da7b', 'borrowApply_turn_over:1:b4d0a15f-7ea1-11ee-996c-9ebfc063da7b', 'Activity_1miq0ca', 30, '[1]', '', '2023-11-09 09:45:48', '', '2023-11-09 09:45:48', b'0', 1);
--
alter table archives_borrow_apply alter column status set default 1;
ALTER TABLE archives_borrow_apply MODIFY COLUMN status int(64) COMMENT '';

@ -0,0 +1 @@
ALTER TABLE system_users ADD COLUMN `white_list` tinyint(10) NOT NULL COMMENT '';

@ -6,9 +6,11 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.*; import cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo.*;
import cn.iocoder.yudao.module.accounting.controller.admin.invoices.vo.InvoicesUpdateArray;
import cn.iocoder.yudao.module.accounting.convert.bankslip.BankSlipConvert; import cn.iocoder.yudao.module.accounting.convert.bankslip.BankSlipConvert;
import cn.iocoder.yudao.module.accounting.dal.dataobject.bankslip.BankReceiptDO; import cn.iocoder.yudao.module.accounting.dal.dataobject.bankslip.BankReceiptDO;
import cn.iocoder.yudao.module.accounting.dal.dataobject.bankslip.BankSlipDO; import cn.iocoder.yudao.module.accounting.dal.dataobject.bankslip.BankSlipDO;
import cn.iocoder.yudao.module.accounting.dal.dataobject.invoices.InvoicesDO;
import cn.iocoder.yudao.module.accounting.service.bankslip.BankSlipService; import cn.iocoder.yudao.module.accounting.service.bankslip.BankSlipService;
import cn.iocoder.yudao.module.bs.utils.BaiduOcrHandler; import cn.iocoder.yudao.module.bs.utils.BaiduOcrHandler;
import cn.iocoder.yudao.module.infra.service.file.FileService; import cn.iocoder.yudao.module.infra.service.file.FileService;
@ -27,9 +29,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.DataInput; import java.io.DataInput;
import java.io.IOException; import java.io.IOException;
import java.util.Collection; import java.util.*;
import java.util.List;
import java.util.UUID;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@ -63,6 +63,23 @@ public class BankSlipController {
return success(true); return success(true);
} }
@PutMapping("/update/array")
@Operation(summary = "更新发票")
@PreAuthorize("@ss.hasPermission('archives::bank-slip:update')")
public CommonResult<Boolean> updateInvoicesArray(@Valid @RequestBody BankSlipUpdateArray updateArray) {
List<BankSlipDO> list = new LinkedList<>();
List<BankSlipDO> invoicesList = bankSlipService.getBankSlipList(Arrays.asList(updateArray.getId()));
for (BankSlipDO in : invoicesList) {
if (in.getVoucherId() !=null){
return error(in.getVoucherId()+":该回单已被关联");
}
in.setVoucherId(updateArray.getVoucherId());
list.add(in);
}
bankSlipService.updateBankSlipArray(list);
return success(true);
}
@DeleteMapping("/delete") @DeleteMapping("/delete")
@Operation(summary = "删除银行回单") @Operation(summary = "删除银行回单")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)

@ -0,0 +1,19 @@
package cn.iocoder.yudao.module.accounting.controller.admin.bankslip.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* vo
*/
@Data
public class BankSlipUpdateArray {
@Schema(description = "发票id", requiredMode = Schema.RequiredMode.REQUIRED, example = "5466")
private Long[] id;
@Schema(description = "凭证id一个凭证对应多个电子发票", requiredMode = Schema.RequiredMode.REQUIRED, example = "25675")
private Long voucherId;
}

@ -22,7 +22,9 @@ import cn.iocoder.yudao.module.accounting.service.invoices.InvoicesService;
import cn.iocoder.yudao.module.setting.service.passwords.PasswordsService; import cn.iocoder.yudao.module.setting.service.passwords.PasswordsService;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
@ -44,6 +46,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.accounting.controller.admin.voucher.vo.*; import cn.iocoder.yudao.module.accounting.controller.admin.voucher.vo.*;
@ -79,7 +82,7 @@ public class VoucherController {
VoucherExportReqVO vo = new VoucherExportReqVO(); VoucherExportReqVO vo = new VoucherExportReqVO();
vo.setVoucherNum(createReqVO.getVoucherNum()); vo.setVoucherNum(createReqVO.getVoucherNum());
List<VoucherDO> voucherList = voucherService.getVoucherList(vo); List<VoucherDO> voucherList = voucherService.getVoucherList(vo);
if (voucherList.size()>0){ if (voucherList.size() > 0) {
return error("凭证号重复!"); return error("凭证号重复!");
} }
return success(voucherService.createVoucher(createReqVO)); return success(voucherService.createVoucher(createReqVO));
@ -98,11 +101,11 @@ public class VoucherController {
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('accounting:voucher:delete')") @PreAuthorize("@ss.hasPermission('accounting:voucher:delete')")
public CommonResult<Boolean> deleteVoucher(@RequestParam("id") Long[] id) { public CommonResult<Boolean> deleteVoucher(@RequestParam("id") Long[] id) {
List<Long> listId = new ArrayList(Arrays.asList(id)) ; List<Long> listId = new ArrayList(Arrays.asList(id));
List<VoucherDO> voucherList = voucherService.getVoucherList(listId); List<VoucherDO> voucherList = voucherService.getVoucherList(listId);
for (VoucherDO voucher : voucherList) { for (VoucherDO voucher : voucherList) {
if (voucher.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())){ if (voucher.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())) {
return error("凭证号:"+voucher.getVoucherNum()+" 该凭证已归档,请勿删除!"); return error("凭证号:" + voucher.getVoucherNum() + " 该凭证已归档,请勿删除!");
} }
} }
voucherService.deleteVoucher(id); voucherService.deleteVoucher(id);
@ -134,7 +137,7 @@ public class VoucherController {
PageResult<VoucherDO> pageResult = voucherService.getVoucherPage(pageVO); PageResult<VoucherDO> pageResult = voucherService.getVoucherPage(pageVO);
PageResult<VoucherRespVO> voucherRespVOPageResult = VoucherConvert.INSTANCE.convertPage(pageResult); PageResult<VoucherRespVO> voucherRespVOPageResult = VoucherConvert.INSTANCE.convertPage(pageResult);
String jsonString = JSONObject.toJSONString(voucherRespVOPageResult); String jsonString = JSONObject.toJSONString(voucherRespVOPageResult);
passwordsService.jsonToXmlConverter(response,pageVO.getInputPassword(),jsonString); passwordsService.jsonToXmlConverter(response, pageVO.getInputPassword(), jsonString);
} }
@GetMapping("/page") @GetMapping("/page")
@ -142,14 +145,14 @@ public class VoucherController {
@PreAuthorize("@ss.hasPermission('accounting:voucher:query')") @PreAuthorize("@ss.hasPermission('accounting:voucher:query')")
public CommonResult<PageResult<VoucherRespVO>> getVoucherPage(@Valid VoucherPageReqVO pageVO) { public CommonResult<PageResult<VoucherRespVO>> getVoucherPage(@Valid VoucherPageReqVO pageVO) {
PageResult<VoucherDO> pageResult = voucherService.getVoucherPage(pageVO); PageResult<VoucherDO> pageResult = voucherService.getVoucherPage(pageVO);
int i=0; int i = 0;
//完整性检查 //完整性检查,并设置会计凭证的完整性
List<VoucherDO> list = pageResult.getList(); List<VoucherDO> list = pageResult.getList();
for (VoucherDO voucherDO:list for (VoucherDO voucherDO : list
) { ) {
//如果未归档才检查完整性 //如果未归档才检查完整性
if(!voucherDO.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())) { if (!voucherDO.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())) {
String remark = " "; String remark = " ";
Long id = voucherDO.getId(); Long id = voucherDO.getId();
AttachmentExportReqVO attachmentExportReqVO = new AttachmentExportReqVO(); AttachmentExportReqVO attachmentExportReqVO = new AttachmentExportReqVO();
@ -193,7 +196,7 @@ public class VoucherController {
voucherUpdateReqVO.setCherks(voucherDO.getCherks()); voucherUpdateReqVO.setCherks(voucherDO.getCherks());
voucherUpdateReqVO.setRemark(remark); voucherUpdateReqVO.setRemark(remark);
voucherService.updateVoucher(voucherUpdateReqVO); voucherService.updateVoucher(voucherUpdateReqVO);
}else { } else {
VoucherUpdateReqVO voucherUpdateReqVO = new VoucherUpdateReqVO(); VoucherUpdateReqVO voucherUpdateReqVO = new VoucherUpdateReqVO();
voucherUpdateReqVO.setId(voucherDO.getId()); voucherUpdateReqVO.setId(voucherDO.getId());
voucherUpdateReqVO.setCherks(Integer.valueOf(AccountingStatusEnum.COMPLETE.getValue())); voucherUpdateReqVO.setCherks(Integer.valueOf(AccountingStatusEnum.COMPLETE.getValue()));
@ -201,9 +204,10 @@ public class VoucherController {
voucherService.updateVoucher(voucherUpdateReqVO); voucherService.updateVoucher(voucherUpdateReqVO);
} }
} }
//查询未归档的会计凭证返回前端
pageVO.setFileStatus(String.valueOf(0));
PageResult<VoucherDO> pageResult2 = voucherService.getVoucherPage(pageVO); PageResult<VoucherDO> pageResult2 = voucherService.getVoucherPage(pageVO);
return success(VoucherConvert.INSTANCE.convertPage(pageResult2)); return success(VoucherConvert.INSTANCE.convertPage(pageResult2));
} }

@ -89,4 +89,10 @@ public interface BankSlipService {
* @param ocrResult * @param ocrResult
*/ */
BankSlipDO jsonToJavaObject(BankReceiptDO ocrResult, MultipartFile multipartFile) throws IOException; BankSlipDO jsonToJavaObject(BankReceiptDO ocrResult, MultipartFile multipartFile) throws IOException;
/**
*
* @param list
*/
void updateBankSlipArray(List<BankSlipDO> list);
} }

@ -143,4 +143,13 @@ public class BankSlipServiceImpl implements BankSlipService {
return bankSlipDO; return bankSlipDO;
} }
/**
*
* @param list
*/
@Override
public void updateBankSlipArray(List<BankSlipDO> list) {
bankSlipMapper.updateBatch(list, list.size());
}
} }

@ -19,6 +19,7 @@ public enum ArchivesTypeEnum {
ELECTRONI_CUSTOMER_COMPLAINT("electronic_customer_complaint", "客诉档案"), ELECTRONI_CUSTOMER_COMPLAINT("electronic_customer_complaint", "客诉档案"),
ELECTRONI_CONTRACTS("electronic_contracts", "合同档案"), ELECTRONI_CONTRACTS("electronic_contracts", "合同档案"),
ELECTRONI_CONSULTATION("electronic_consultation", "咨询档案"), ELECTRONI_CONSULTATION("electronic_consultation", "咨询档案"),
ELECTRONI_FINANCE("electronic_finance","财务档案"),
ELECTRONI_ASSETS("electronic_assets", "资产档案"); ELECTRONI_ASSETS("electronic_assets", "资产档案");

@ -1,33 +0,0 @@
package cn.iocoder.yudao.module.archives.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
*
*/
@AllArgsConstructor
@Getter
public enum BillTypeEnum {
DAYJ("DAYJ", "档案移交申请单"),
;
/**
*
*/
private final String value;
/**
*
*/
private final String name;
public static String getNameByValue(String targetValue) {
for (BillTypeEnum billTypeEnum : BillTypeEnum.values()) {
if (billTypeEnum.getValue().equals(targetValue)) {
return billTypeEnum.getName();
}
}
return null;
}
}

@ -1,5 +1,13 @@
package cn.iocoder.yudao.module.archives.controller.admin.borrowapply; package cn.iocoder.yudao.module.archives.controller.admin.borrowapply;
import cn.hutool.core.collection.CollUtil;
import cn.iocoder.yudao.module.archives.controller.admin.turnover.vo.TurnOverUpdateReqVO;
import cn.iocoder.yudao.module.archives.convert.turnover.TurnOverConvert;
import cn.iocoder.yudao.module.archives.dal.dataobject.record.RecordDO;
import cn.iocoder.yudao.module.archives.dal.dataobject.turnover.TurnOverDO;
import cn.iocoder.yudao.module.archives.service.record.RecordService;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -37,6 +45,12 @@ public class BorrowApplyController {
@Resource @Resource
private BorrowApplyService borrowApplyService; private BorrowApplyService borrowApplyService;
@Resource
private BpmTaskService taskService;
@Resource
private RecordService recordService;
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "创建档案借阅申请") @Operation(summary = "创建档案借阅申请")
@PreAuthorize("@ss.hasPermission('archives:borrow-apply:create')") @PreAuthorize("@ss.hasPermission('archives:borrow-apply:create')")
@ -84,6 +98,35 @@ public class BorrowApplyController {
@PreAuthorize("@ss.hasPermission('archives:borrow-apply:query')") @PreAuthorize("@ss.hasPermission('archives:borrow-apply:query')")
public CommonResult<PageResult<BorrowApplyRespVO>> getBorrowApplyPage(@Valid BorrowApplyPageReqVO pageVO) { public CommonResult<PageResult<BorrowApplyRespVO>> getBorrowApplyPage(@Valid BorrowApplyPageReqVO pageVO) {
PageResult<BorrowApplyDO> pageResult = borrowApplyService.getBorrowApplyPage(pageVO); PageResult<BorrowApplyDO> pageResult = borrowApplyService.getBorrowApplyPage(pageVO);
List<BorrowApplyDO> list = pageResult.getList();
if (CollUtil.isNotEmpty(list)) {
for (BorrowApplyDO t : list) {
if (t.getProcessInstanceId() != null) {
List<BpmTaskRespVO> taskListByProcessInstanceId = taskService.getTaskListByProcessInstanceId(t.getProcessInstanceId());
Optional<BpmTaskRespVO> latestTask = taskListByProcessInstanceId.stream()
.filter(task -> task.getEndTime() != null)
.sorted(Comparator.comparing(BpmTaskRespVO::getEndTime).reversed())
.findFirst();
if (latestTask.isPresent()) {
BpmTaskRespVO latest = latestTask.get();
// 找到了endTime最新的任务
BorrowApplyUpdateReqVO updateReqVO = new BorrowApplyUpdateReqVO();
updateReqVO.setId(t.getId());
if (latest.getResult().equals(2)) {
updateReqVO.setBorrowState("0");//已借阅
} else {
updateReqVO.setBorrowState("1");//驳回or未借阅
}
borrowApplyService.updateBorrowApply(updateReqVO);
}
}
PageResult<BorrowApplyDO> pageResult2 = borrowApplyService.getBorrowApplyPage(pageVO);
return success(BorrowApplyConvert.INSTANCE.convertPage(pageResult2));
}
}
return success(BorrowApplyConvert.INSTANCE.convertPage(pageResult)); return success(BorrowApplyConvert.INSTANCE.convertPage(pageResult));
} }

@ -74,5 +74,28 @@ public class BorrowApplyBaseVO {
@Schema(description = "案卷号", example = "案卷号") @Schema(description = "案卷号", example = "案卷号")
private String filesNum; private String filesNum;
/**
*
*/
@Schema(description = "流程实例的编号", example = "流程实例的编号")
private String processInstanceId;
/**
*
*/
@Schema(description = "申请类型", example = "申请类型")
private String billType;
/**
*
*/
@Schema(description = "状态", example = "状态")
private Long status;
/**
*
*/
@Schema(description = "用于前端判断修改接口的同意和提交按钮", example = "用于前端判断修改接口的同意和提交按钮")
@TableField(exist = false)
private Boolean isAuthorised;
} }

@ -11,4 +11,7 @@ import javax.validation.constraints.*;
@ToString(callSuper = true) @ToString(callSuper = true)
public class BorrowApplyCreateReqVO extends BorrowApplyBaseVO { public class BorrowApplyCreateReqVO extends BorrowApplyBaseVO {
@Schema(description = "id")
private Long id;
} }

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo; package cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
import java.util.*; import java.util.*;
@ -75,4 +76,11 @@ public class BorrowApplyExcelVO {
@Schema(description = "案卷号", example = "案卷号") @Schema(description = "案卷号", example = "案卷号")
private String filesNum; private String filesNum;
/**
*
*/
@Schema(description = "用于前端判断修改接口的同意和提交按钮", example = "用于前端判断修改接口的同意和提交按钮")
@TableField(exist = false)
private Boolean isAuthorised;
} }

@ -72,4 +72,23 @@ public class BorrowApplyExportReqVO {
@Schema(description = "案卷号", example = "案卷号") @Schema(description = "案卷号", example = "案卷号")
private String filesNum; private String filesNum;
/**
*
*/
@Schema(description = "流程实例的编号", example = "流程实例的编号")
private String processInstanceId;
/**
*
*/
@Schema(description = "申请类型", example = "申请类型")
private String billType;
/**
*
*/
@Schema(description = "状态", example = "状态")
private Long status;
} }

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo; package cn.iocoder.yudao.module.archives.controller.admin.borrowapply.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.*; import lombok.*;
import java.util.*; import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@ -79,6 +80,30 @@ public class BorrowApplyPageReqVO extends PageParam {
@Schema(description = "判断调用历史接口还是新增列表接口", example = "判断调用历史接口还是新增列表接口") @Schema(description = "判断调用历史接口还是新增列表接口", example = "判断调用历史接口还是新增列表接口")
private String historyOrList; private String historyOrList;
/**
*
*/
@Schema(description = "流程实例的编号", example = "流程实例的编号")
private String processInstanceId;
/**
*
*/
@Schema(description = "申请类型", example = "申请类型")
private String billType;
/**
*
*/
@Schema(description = "状态", example = "状态")
private Long status;
/**
*
*/
@Schema(description = "用于前端判断修改接口的同意和提交按钮", example = "用于前端判断修改接口的同意和提交按钮")
@TableField(exist = false)
private Boolean isAuthorised;
} }

@ -88,8 +88,8 @@ public class RecordController {
@Operation(summary = "获得归档列表") @Operation(summary = "获得归档列表")
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
@PreAuthorize("@ss.hasPermission('archives:record:query')") @PreAuthorize("@ss.hasPermission('archives:record:query')")
public CommonResult<List<RecordRespVO>> getRecordList(@RequestParam("ids") Collection<Long> ids) { public CommonResult<List<RecordRespVO>> getRecordList(@RequestParam("ids") Collection<Long> ids,String fileNum) {
List<RecordDO> list = recordService.getRecordList(ids); List<RecordDO> list = recordService.getRecordList(ids,fileNum);
return success(RecordConvert.INSTANCE.convertList(list)); return success(RecordConvert.INSTANCE.convertList(list));
} }

@ -106,5 +106,29 @@ public class BorrowApplyDO extends BaseDO {
*/ */
private String filesNum; private String filesNum;
/**
*
*/
@Schema(description = "流程实例的编号", example = "流程实例的编号")
private String processInstanceId;
/**
*
*/
@Schema(description = "申请类型", example = "申请类型")
private String billType;
/**
*
*/
@Schema(description = "状态", example = "状态")
private Long status;
/**
*
*/
@Schema(description = "用于前端判断修改接口的同意和提交按钮", example = "用于前端判断修改接口的同意和提交按钮")
@TableField(exist = false)
private Boolean isAuthorised;
} }

@ -1,10 +1,27 @@
package cn.iocoder.yudao.module.archives.service.borrowapply; package cn.iocoder.yudao.module.archives.service.borrowapply;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.extra.spring.SpringUtil;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.string.StringUtils; import cn.iocoder.yudao.framework.common.util.string.StringUtils;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.archives.controller.admin.record.vo.RecordUpdateReqVO; import cn.iocoder.yudao.module.archives.controller.admin.record.vo.RecordUpdateReqVO;
import cn.iocoder.yudao.module.archives.dal.dataobject.record.RecordDO; import cn.iocoder.yudao.module.archives.dal.dataobject.record.RecordDO;
import cn.iocoder.yudao.module.archives.dal.dataobject.turnover.TurnOverDO;
import cn.iocoder.yudao.module.archives.service.record.RecordService; import cn.iocoder.yudao.module.archives.service.record.RecordService;
import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi;
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheet.QuotationSheetDO;
import cn.iocoder.yudao.module.bs.enums.BillTypeEnum;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.dal.mysql.dept.DeptMapper;
import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.val;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -20,6 +37,8 @@ import cn.iocoder.yudao.module.archives.convert.borrowapply.BorrowApplyConvert;
import cn.iocoder.yudao.module.archives.dal.mysql.borrowapply.BorrowApplyMapper; import cn.iocoder.yudao.module.archives.dal.mysql.borrowapply.BorrowApplyMapper;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.archives.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.module.archives.enums.ErrorCodeConstants.*;
import static com.baomidou.mybatisplus.extension.toolkit.Db.saveOrUpdate;
import static com.baomidou.mybatisplus.extension.toolkit.Db.updateById;
/** /**
* Service * Service
@ -30,12 +49,24 @@ import static cn.iocoder.yudao.module.archives.enums.ErrorCodeConstants.*;
@Validated @Validated
public class BorrowApplyServiceImpl implements BorrowApplyService { public class BorrowApplyServiceImpl implements BorrowApplyService {
public static final String PROCESS_KEY = "borrowApply_turn_over";
@Resource @Resource
private BorrowApplyMapper borrowApplyMapper; private BorrowApplyMapper borrowApplyMapper;
@Resource @Resource
private RecordService recordService; private RecordService recordService;
@Resource
private BpmProcessInstanceApi processInstanceApi;
@Resource
private AdminUserMapper userMapper;
@Resource
private DeptMapper deptMapper;
@Override @Override
@Transactional @Transactional
public CommonResult<BorrowApplyDO> createBorrowApply(BorrowApplyCreateReqVO createReqVO) { public CommonResult<BorrowApplyDO> createBorrowApply(BorrowApplyCreateReqVO createReqVO) {
@ -44,17 +75,47 @@ public class BorrowApplyServiceImpl implements BorrowApplyService {
} }
// 插入 // 插入
BorrowApplyDO borrowApply = BorrowApplyConvert.INSTANCE.convert(createReqVO); BorrowApplyDO borrowApply = BorrowApplyConvert.INSTANCE.convert(createReqVO);
//修改借阅状态 LoginUser userDo = SecurityFrameworkUtils.getLoginUser();
RecordDO record = recordService.getRecord(createReqVO.getRecordId()); AdminUserDO user = userMapper.selectById(userDo.getId());
if (StringUtils.isNotNull(record.getBorrowStatus())){ borrowApply.setUserName(user.getNickname()).setDeptName(deptMapper.selectById(user.getDeptId()).getName());
if (record.getBorrowStatus().equals("0")){ /*
*
*
*/
PageResult<BorrowApplyDO> borrowApplyDOPageResult = borrowApplyMapper.selectPageHistory(new BorrowApplyPageReqVO().setFilesNum(createReqVO.getFilesNum()));
if (StringUtils.isNotNull(borrowApplyDOPageResult)){
List<BorrowApplyDO> list = borrowApplyDOPageResult.getList();
for (BorrowApplyDO b:list) {
//通过案卷号判断是否被借阅
if (StringUtils.isNotNull(b.getFilesNum())) {
if (b.getFilesNum().equals(createReqVO.getFilesNum()) && b.getFilesNum().equals("0")) {
return CommonResult.error("档案已被借阅"); return CommonResult.error("档案已被借阅");
} }
} }
RecordUpdateReqVO recordUpdateReqVO = new RecordUpdateReqVO(); }
BeanUtils.copyProperties(record,recordUpdateReqVO); }
recordService.updateRecord(recordUpdateReqVO); //这里设置工作流属性
Map<String, Object> variables = new HashMap<>();
//这个if判断这个申请单是暂存还是提交 因为暂存和提交都是会调这个接口 所以会重复新增条数
if (StringUtils.isNull(borrowApply.getProcessInstanceId())){
borrowApply.setBillType("BORROW");
borrowApplyMapper.insert(borrowApply); borrowApplyMapper.insert(borrowApply);
variables.put("billId", borrowApply.getId());
}
if (ObjectUtil.isNull(variables.get("billId"))){
variables.put("billId", this.borrowApplyMapper.selectOne(BorrowApplyDO::getProcessInstanceId, borrowApply.getProcessInstanceId()).getId());
}
variables.put("userName", createReqVO.getUserName());
variables.put("deptName", createReqVO.getDeptName());
variables.put("billName", "档案借阅申请单");
variables.put("billType","BORROW");
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
String processInstanceId = processInstanceApi.createProcessInstance(loginUser.getId(),
new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(PROCESS_KEY)
.setVariables(variables).setBusinessKey(String.valueOf(borrowApply.getId())));
int i = this.borrowApplyMapper.updateById(new BorrowApplyDO().setId(borrowApply.getId()).setProcessInstanceId(processInstanceId).setStatus(createReqVO.getStatus()));
// 返回 // 返回
return CommonResult.success(borrowApply); return CommonResult.success(borrowApply);
} }
@ -118,6 +179,7 @@ public class BorrowApplyServiceImpl implements BorrowApplyService {
@Override @Override
public BorrowApplyDO getBorrowApply(Long id) { public BorrowApplyDO getBorrowApply(Long id) {
BorrowApplyDO borrowApplyDO = borrowApplyMapper.selectById(id); BorrowApplyDO borrowApplyDO = borrowApplyMapper.selectById(id);
borrowApplyDO.setIsAuthorised(borrowApplyDO.getStatus()==1 ? true : false);
RecordDO record = recordService.getRecord(borrowApplyDO.getRecordId()); RecordDO record = recordService.getRecord(borrowApplyDO.getRecordId());
return borrowApplyDO.setSite(record.getSite()).setFileType(record.getFileType()).setFilesNum(record.getFilesNum()); return borrowApplyDO.setSite(record.getSite()).setFileType(record.getFileType()).setFilesNum(record.getFilesNum());
} }

@ -10,6 +10,8 @@ import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationD
import cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper; import cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.depotcabinet.DepotCabinetMapper; import cn.iocoder.yudao.module.setting.dal.mysql.depotcabinet.DepotCabinetMapper;
import cn.iocoder.yudao.module.setting.dal.mysql.organization.OrganizationMapper; import cn.iocoder.yudao.module.setting.dal.mysql.organization.OrganizationMapper;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import me.zhyd.oauth.log.Log; import me.zhyd.oauth.log.Log;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -59,7 +61,9 @@ public class PackagesServiceImpl implements PackagesService {
PackagesDO packages = PackagesConvert.INSTANCE.convert(createReqVO); PackagesDO packages = PackagesConvert.INSTANCE.convert(createReqVO);
String url = getUrl(packages); String url = getUrl(packages);
packages.setCodeUrl(url); packages.setCodeUrl(url);
packages.setCodeValue(packages.getCaseNum()+"-"+packages.getCatalogNum()+"-"+packages.getFilesNum()); packages.setCodeValue("业务实体:"+packages.getCompany()+" "+"库房名称:"+packages.getDeptName()+" "+
"档案柜:"+packages.getCabinetName()+" "+"会计年份:"+packages.getYear()+" "+"全宗号:"+
packages.getCaseNum()+" "+"目录号:"+packages.getCatalogNum()+" "+"案卷号:"+packages.getFilesNum());
//位置 //位置
Long organizationId = packages.getCompanyId(); Long organizationId = packages.getCompanyId();
Long depotId = packages.getDepotId(); Long depotId = packages.getDepotId();
@ -151,7 +155,9 @@ public class PackagesServiceImpl implements PackagesService {
private String getUrl(PackagesDO packages){ private String getUrl(PackagesDO packages){
// InetAddress address = InetAddress.getLocalHost();//获取的是本地的IP地址 // InetAddress address = InetAddress.getLocalHost();//获取的是本地的IP地址
// String hostAddress = address.getHostAddress(); // String hostAddress = address.getHostAddress();
File buf = BarcodeUtil.generateBarCode(packages.getCaseNum()+"-"+ packages.getCatalogNum()+"-"+ packages.getFilesNum(), "QR_CODE", File buf = BarcodeUtil.generateBarCode(
"Year:"+packages.getYear()+"\n"+"month:"+packages.getPeriod()+"\n"+"fullSerialNumber:"+
packages.getCaseNum()+"\n"+"catalogNumber:"+packages.getCatalogNum()+"\n"+"docketNo:"+packages.getFilesNum(), "QR_CODE",
"./tmp/Packages/" + packages.getCaseNum()+"-"+ packages.getCatalogNum()+"-"+ packages.getFilesNum() + ".png"); "./tmp/Packages/" + packages.getCaseNum()+"-"+ packages.getCatalogNum()+"-"+ packages.getFilesNum() + ".png");
MultipartFile file = FileUtils.getMultipartFile(buf); MultipartFile file = FileUtils.getMultipartFile(buf);
String url= null; String url= null;

@ -50,7 +50,7 @@ public interface RecordService {
* @param ids * @param ids
* @return * @return
*/ */
List<RecordDO> getRecordList(Collection<Long> ids); List<RecordDO> getRecordList(Collection<Long> ids,String fileNum);
/** /**
* *

@ -1,5 +1,8 @@
package cn.iocoder.yudao.module.archives.service.record; package cn.iocoder.yudao.module.archives.service.record;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import cn.iocoder.yudao.framework.common.util.string.StringUtils; import cn.iocoder.yudao.framework.common.util.string.StringUtils;
import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission;
import cn.iocoder.yudao.framework.datapermission.core.rule.dept.DeptDataPermissionRule; import cn.iocoder.yudao.framework.datapermission.core.rule.dept.DeptDataPermissionRule;
@ -22,11 +25,13 @@ import cn.iocoder.yudao.module.ea.dal.dataobject.electronicconsultation.Electron
import cn.iocoder.yudao.module.ea.dal.dataobject.electroniccontracts.ElectronicContractsDO; import cn.iocoder.yudao.module.ea.dal.dataobject.electroniccontracts.ElectronicContractsDO;
import cn.iocoder.yudao.module.ea.dal.dataobject.electroniccustomercomplaint.ElectronicCustomerComplaintDO; import cn.iocoder.yudao.module.ea.dal.dataobject.electroniccustomercomplaint.ElectronicCustomerComplaintDO;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicemployee.ElectronicEmployeeDO; import cn.iocoder.yudao.module.ea.dal.dataobject.electronicemployee.ElectronicEmployeeDO;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicfinance.ElectronicFinanceDO;
import cn.iocoder.yudao.module.ea.dal.mysql.electronicassets.ElectronicAssetsMapper; import cn.iocoder.yudao.module.ea.dal.mysql.electronicassets.ElectronicAssetsMapper;
import cn.iocoder.yudao.module.ea.dal.mysql.electronicconsultation.ElectronicConsultationMapper; import cn.iocoder.yudao.module.ea.dal.mysql.electronicconsultation.ElectronicConsultationMapper;
import cn.iocoder.yudao.module.ea.dal.mysql.electroniccontracts.ElectronicContractsMapper; import cn.iocoder.yudao.module.ea.dal.mysql.electroniccontracts.ElectronicContractsMapper;
import cn.iocoder.yudao.module.ea.dal.mysql.electroniccustomercomplaint.ElectronicCustomerComplaintMapper; import cn.iocoder.yudao.module.ea.dal.mysql.electroniccustomercomplaint.ElectronicCustomerComplaintMapper;
import cn.iocoder.yudao.module.ea.dal.mysql.electronicemployee.ElectronicEmployeeMapper; import cn.iocoder.yudao.module.ea.dal.mysql.electronicemployee.ElectronicEmployeeMapper;
import cn.iocoder.yudao.module.ea.dal.mysql.electronicfinance.ElectronicFinanceMapper;
import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO; import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO;
import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO; import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO;
@ -98,6 +103,9 @@ public class RecordServiceImpl implements RecordService {
@Resource @Resource
private ElectronicCustomerComplaintMapper electronicCustomerComplaintMapper; private ElectronicCustomerComplaintMapper electronicCustomerComplaintMapper;
@Resource
private ElectronicFinanceMapper electronicFinanceMapper;
@Override @Override
public Long createRecord(RecordCreateReqVO createReqVO) { public Long createRecord(RecordCreateReqVO createReqVO) {
@ -196,14 +204,15 @@ public class RecordServiceImpl implements RecordService {
} }
@Override @Override
public List<RecordDO> getRecordList(Collection<Long> ids) { public List<RecordDO> getRecordList(Collection<Long> ids, String fileNum) {
return recordMapper.selectBatchIds(ids); LambdaQueryWrapperX<RecordDO> wrapperX = new LambdaQueryWrapperX<>();
return recordMapper.selectList(wrapperX.likeIfPresent(RecordDO::getFilesNum,fileNum));
} }
@Override @Override
public PageResult<RecordDO> getRecordPage(RecordPageReqVO pageReqVO) { public PageResult<RecordDO> getRecordPage(RecordPageReqVO pageReqVO) {
// 这里加入authenticate字段区分是归档台账的调用接口还是鉴定调用接口 鉴定接口只查询未鉴定的归档台账 // 这里加入authenticate字段区分是归档台账的调用接口还是鉴定调用接口 鉴定接口只查询未鉴定的归档台账
if (StringUtils.isNotNull(pageReqVO.getAuthenticate())){//查询列表 if (StringUtils.isNotNull(pageReqVO.getAuthenticate())) {//查询列表
return recordMapper.selectPageAuthenticate(pageReqVO); return recordMapper.selectPageAuthenticate(pageReqVO);
} }
return recordMapper.selectPage(pageReqVO);//查询历史 return recordMapper.selectPage(pageReqVO);//查询历史
@ -276,7 +285,7 @@ public class RecordServiceImpl implements RecordService {
electronicContractsDO.setRecordId(recordId); electronicContractsDO.setRecordId(recordId);
electronicContractsDO.setFileStatus(AccountingStatusEnum.LOGFILE.getValue()); electronicContractsDO.setFileStatus(AccountingStatusEnum.LOGFILE.getValue());
//如果已归档设置完整性为完整 //如果已归档设置完整性为完整
if (electronicContractsDO.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())){ if (electronicContractsDO.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())) {
electronicContractsDO.setCherks(Integer.valueOf(AccountingStatusEnum.COMPLETE.getValue())); electronicContractsDO.setCherks(Integer.valueOf(AccountingStatusEnum.COMPLETE.getValue()));
} }
electronicContractsMapper.updateById(electronicContractsDO); electronicContractsMapper.updateById(electronicContractsDO);
@ -290,7 +299,7 @@ public class RecordServiceImpl implements RecordService {
electronicConsultationDO.setRecordId(recordId); electronicConsultationDO.setRecordId(recordId);
electronicConsultationDO.setFileStatus(AccountingStatusEnum.LOGFILE.getValue()); electronicConsultationDO.setFileStatus(AccountingStatusEnum.LOGFILE.getValue());
//如果已归档设置完整性为完整 //如果已归档设置完整性为完整
if (electronicConsultationDO.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())){ if (electronicConsultationDO.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())) {
electronicConsultationDO.setCherks(Integer.valueOf(AccountingStatusEnum.COMPLETE.getValue())); electronicConsultationDO.setCherks(Integer.valueOf(AccountingStatusEnum.COMPLETE.getValue()));
} }
electronicConsultationMapper.updateById(electronicConsultationDO); electronicConsultationMapper.updateById(electronicConsultationDO);
@ -304,7 +313,7 @@ public class RecordServiceImpl implements RecordService {
electronicEmployeeDO.setRecordId(recordId); electronicEmployeeDO.setRecordId(recordId);
electronicEmployeeDO.setFileStatus(AccountingStatusEnum.LOGFILE.getValue()); electronicEmployeeDO.setFileStatus(AccountingStatusEnum.LOGFILE.getValue());
//如果已归档设置完整性为完整 //如果已归档设置完整性为完整
if (electronicEmployeeDO.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())){ if (electronicEmployeeDO.getFileStatus().equals(AccountingStatusEnum.LOGFILE.getValue())) {
electronicEmployeeDO.setCherks(Integer.valueOf(AccountingStatusEnum.COMPLETE.getValue())); electronicEmployeeDO.setCherks(Integer.valueOf(AccountingStatusEnum.COMPLETE.getValue()));
} }
electronicEmployeeMapper.updateById(electronicEmployeeDO); electronicEmployeeMapper.updateById(electronicEmployeeDO);
@ -320,6 +329,17 @@ public class RecordServiceImpl implements RecordService {
electronicCustomerComplaintMapper.updateById(electronicCustomerComplaintDO); electronicCustomerComplaintMapper.updateById(electronicCustomerComplaintDO);
} }
} }
//财务档案归档
if (recordType.equals(ArchivesTypeEnum.ELECTRONI_FINANCE.getValue())) {
for (Long id : ids) {
ElectronicFinanceDO electronicFinanceDO = new ElectronicFinanceDO();
electronicFinanceDO.setId(id);
electronicFinanceDO.setRecordId(recordId);
electronicFinanceDO.setFileStatus(AccountingStatusEnum.LOGFILE.getValue());
electronicFinanceDO.setCherks(Integer.valueOf(AccountingStatusEnum.COMPLETE.getValue()));
electronicFinanceMapper.updateById(electronicFinanceDO);
}
}
} }
} }

@ -37,44 +37,43 @@ import cn.iocoder.yudao.module.archives.dal.mysql.authenticate.AuthenticateMappe
import cn.iocoder.yudao.module.archives.dal.mysql.record.RecordMapper; import cn.iocoder.yudao.module.archives.dal.mysql.record.RecordMapper;
import cn.iocoder.yudao.module.archives.enums.ArchivesStatusEnum; import cn.iocoder.yudao.module.archives.enums.ArchivesStatusEnum;
import cn.iocoder.yudao.module.archives.enums.ArchivesTypeEnum; import cn.iocoder.yudao.module.archives.enums.ArchivesTypeEnum;
import cn.iocoder.yudao.module.archives.enums.BillTypeEnum;
import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi; import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi;
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum;
import cn.iocoder.yudao.module.bs.enums.BillTypeEnum;
import cn.iocoder.yudao.module.ea.controller.admin.electronicassets.vo.ElectronicAssetsExportReqVO; import cn.iocoder.yudao.module.ea.controller.admin.electronicassets.vo.ElectronicAssetsExportReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo.ElectronicConsultationExportReqVO; import cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo.ElectronicConsultationExportReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electroniccontracts.vo.ElectronicContractsExportReqVO; import cn.iocoder.yudao.module.ea.controller.admin.electroniccontracts.vo.ElectronicContractsExportReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo.ElectronicCustomerComplaintExportReqVO; import cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo.ElectronicCustomerComplaintExportReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicemployee.vo.ElectronicEmployeeExportReqVO; import cn.iocoder.yudao.module.ea.controller.admin.electronicemployee.vo.ElectronicEmployeeExportReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinanceExportReqVO;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicassets.ElectronicAssetsDO; import cn.iocoder.yudao.module.ea.dal.dataobject.electronicassets.ElectronicAssetsDO;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicconsultation.ElectronicConsultationDO; import cn.iocoder.yudao.module.ea.dal.dataobject.electronicconsultation.ElectronicConsultationDO;
import cn.iocoder.yudao.module.ea.dal.dataobject.electroniccontracts.ElectronicContractsDO; import cn.iocoder.yudao.module.ea.dal.dataobject.electroniccontracts.ElectronicContractsDO;
import cn.iocoder.yudao.module.ea.dal.dataobject.electroniccustomercomplaint.ElectronicCustomerComplaintDO; import cn.iocoder.yudao.module.ea.dal.dataobject.electroniccustomercomplaint.ElectronicCustomerComplaintDO;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicemployee.ElectronicEmployeeDO; import cn.iocoder.yudao.module.ea.dal.dataobject.electronicemployee.ElectronicEmployeeDO;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicfinance.ElectronicFinanceDO;
import cn.iocoder.yudao.module.ea.dal.mysql.electronicassets.ElectronicAssetsMapper; import cn.iocoder.yudao.module.ea.dal.mysql.electronicassets.ElectronicAssetsMapper;
import cn.iocoder.yudao.module.ea.dal.mysql.electronicconsultation.ElectronicConsultationMapper; import cn.iocoder.yudao.module.ea.dal.mysql.electronicconsultation.ElectronicConsultationMapper;
import cn.iocoder.yudao.module.ea.dal.mysql.electroniccontracts.ElectronicContractsMapper; import cn.iocoder.yudao.module.ea.dal.mysql.electroniccontracts.ElectronicContractsMapper;
import cn.iocoder.yudao.module.ea.dal.mysql.electroniccustomercomplaint.ElectronicCustomerComplaintMapper; import cn.iocoder.yudao.module.ea.dal.mysql.electroniccustomercomplaint.ElectronicCustomerComplaintMapper;
import cn.iocoder.yudao.module.ea.dal.mysql.electronicemployee.ElectronicEmployeeMapper; import cn.iocoder.yudao.module.ea.dal.mysql.electronicemployee.ElectronicEmployeeMapper;
import cn.iocoder.yudao.module.ea.dal.mysql.electronicfinance.ElectronicFinanceMapper;
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.FilePageReqVO; import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.FilePageReqVO;
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import cn.iocoder.yudao.module.infra.service.file.FileService; import cn.iocoder.yudao.module.infra.service.file.FileService;
import cn.iocoder.yudao.module.setting.tools.JsonToXml; import cn.iocoder.yudao.module.setting.tools.JsonToXml;
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.github.yulichang.base.MPJBaseServiceImpl; import com.github.yulichang.base.MPJBaseServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Validator;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import java.io.*; import java.io.*;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.util.*; import java.util.*;
@ -126,6 +125,9 @@ public class TurnOverServiceImpl extends MPJBaseServiceImpl<TurnOverMapper, Turn
private ElectronicEmployeeMapper electronicEmployeeMapper; private ElectronicEmployeeMapper electronicEmployeeMapper;
@Resource @Resource
private ElectronicCustomerComplaintMapper electronicCustomerComplaintMapper; private ElectronicCustomerComplaintMapper electronicCustomerComplaintMapper;
@Resource
private ElectronicFinanceMapper electronicFinanceMapper;
@Resource @Resource
private AttachmentService attachmentService; private AttachmentService attachmentService;
@Resource @Resource
@ -397,6 +399,25 @@ public class TurnOverServiceImpl extends MPJBaseServiceImpl<TurnOverMapper, Turn
} }
} }
} }
//财务档案
if (fileType.equals(ArchivesTypeEnum.ELECTRONI_FINANCE.getValue())) {
ElectronicFinanceExportReqVO electronicFinancialExportReqVO = new ElectronicFinanceExportReqVO();
electronicFinancialExportReqVO.setRecordId(recordId);
List<ElectronicFinanceDO> electronicFinancialDOS = electronicFinanceMapper.selectList(electronicFinancialExportReqVO);
for (ElectronicFinanceDO ef:electronicFinancialDOS) {
try{
//财务档案文件夹
String financePath = folderCaseNum + "/" + ef.getInvoiceNumber();
FileUtil.mkdir(financePath);
//财务档案xml
String financeXmlPath = financePath + "/" + ef.getInvoiceNumber() + ".xml";
String financePathStr = JsonToXml.jsonToXml(JSON.toJSONString(ef));
FileUtil.writeString(financePathStr, financeXmlPath, CharsetUtil.CHARSET_UTF_8);
}catch (Exception e){
log.error(e.getMessage());
}
}
}
//打包zip //打包zip
String zipFilePath = zipFolderStr + "/" + UUID.randomUUID() + ".zip"; String zipFilePath = zipFolderStr + "/" + UUID.randomUUID() + ".zip";

@ -20,6 +20,7 @@ public enum BillTypeEnum {
RCSQ("RCSQ", "日常申请单"), RCSQ("RCSQ", "日常申请单"),
CLBX("CLBX", "差旅报销单"), CLBX("CLBX", "差旅报销单"),
RCBX("RCBX", "日常报销单"), RCBX("RCBX", "日常报销单"),
BORROW_KEY("BAYJ","借阅申请单")
; ;
/** /**

@ -13,4 +13,5 @@ public interface ErrorCodeConstants {
ErrorCode ELECTRONIC_CUSTOMER_COMPLAINT_NOT_EXISTS = new ErrorCode(300014, "客诉档案不存在"); ErrorCode ELECTRONIC_CUSTOMER_COMPLAINT_NOT_EXISTS = new ErrorCode(300014, "客诉档案不存在");
ErrorCode ELECTRONIC_OTHER_NOT_EXISTS = new ErrorCode(300015, "其他档案不存在"); ErrorCode ELECTRONIC_OTHER_NOT_EXISTS = new ErrorCode(300015, "其他档案不存在");
ErrorCode ELECTRONIC_ATTACHMENT_NOT_EXISTS = new ErrorCode(300016, "电子档案附件不存在"); ErrorCode ELECTRONIC_ATTACHMENT_NOT_EXISTS = new ErrorCode(300016, "电子档案附件不存在");
ErrorCode FINANCE_NOT_EXISTS = new ErrorCode(300017, "财务档案不存在");
} }

@ -0,0 +1,99 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicfinance;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.*;
import cn.iocoder.yudao.module.ea.convert.electronicfinance.ElectronicFinanceConvert;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicfinance.ElectronicFinanceDO;
import cn.iocoder.yudao.module.ea.service.electronicfinance.ElectronicFinanceService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
@Tag(name = "管理后台 - 财务档案")
@RestController
@RequestMapping("/electronic/finance")
@Validated
public class ElectronicFinanceController {
@Resource
private ElectronicFinanceService financeService;
@PostMapping("/create")
@Operation(summary = "创建财务档案")
@PreAuthorize("@ss.hasPermission('electronic:finance:create')")
public CommonResult<Long> createFinance(@Valid @RequestBody ElectronicFinanceCreateReqVO createReqVO) {
return success(financeService.createFinance(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新财务档案")
@PreAuthorize("@ss.hasPermission('electronic:finance:update')")
public CommonResult<Boolean> updateFinance(@Valid @RequestBody ElectronicFinanceUpdateReqVO updateReqVO) {
financeService.updateFinance(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除财务档案")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('electronic:finance:delete')")
public CommonResult<Boolean> deleteFinance(@RequestParam("id") Long[] id) {
financeService.deleteFinance(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得财务档案")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('electronic:finance:query')")
public CommonResult<ElectronicFinanceRespVO> getFinance(@RequestParam("id") Long id) {
ElectronicFinanceDO finance = financeService.getFinance(id);
return success(ElectronicFinanceConvert.INSTANCE.convert(finance));
}
@GetMapping("/list")
@Operation(summary = "获得财务档案列表")
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
@PreAuthorize("@ss.hasPermission('electronic:finance:query')")
public CommonResult<List<ElectronicFinanceRespVO>> getFinanceList(@RequestParam("ids") Collection<Long> ids) {
List<ElectronicFinanceDO> list = financeService.getFinanceList(ids);
return success(ElectronicFinanceConvert.INSTANCE.convertList(list));
}
@GetMapping("/page")
@Operation(summary = "获得财务档案分页")
@PreAuthorize("@ss.hasPermission('electronic:finance:query')")
public CommonResult<PageResult<ElectronicFinanceRespVO>> getFinancePage(@Valid ElectronicFinancePageReqVO pageVO) {
PageResult<ElectronicFinanceDO> pageResult = financeService.getFinancePage(pageVO);
return success(ElectronicFinanceConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/export-excel")
@Operation(summary = "导出财务档案 Excel")
@PreAuthorize("@ss.hasPermission('electronic:finance:export')")
@OperateLog(type = EXPORT)
public void exportFinanceExcel(@Valid ElectronicFinanceExportReqVO exportReqVO,
HttpServletResponse response) throws IOException {
List<ElectronicFinanceDO> list = financeService.getFinanceList(exportReqVO);
// 导出 Excel
List<ElectronicFinanceExcelVO> datas = ElectronicFinanceConvert.INSTANCE.convertList02(list);
ExcelUtils.write(response, "财务档案.xls", "数据", ElectronicFinanceExcelVO.class, datas);
}
}

@ -0,0 +1,88 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* Base VO VO 使
* VO Swagger
*/
@Data
public class ElectronicFinanceBaseVO {
@Schema(description = "制单人")
private String createBy;
@Schema(description = "业务实体id", example = "17856")
private Long companyId;
@Schema(description = "业务实体")
private String company;
@Schema(description = "用户id", example = "16066")
private Long userId;
@Schema(description = "所属部门id", example = "13607")
private Long deptId;
@Schema(description = "所属部门", example = "芋艿")
private String deptName;
@Schema(description = "支付账户", example = "5498")
private String account;
@Schema(description = "项目")
private String project;
@Schema(description = "收据/发票号码")
private String invoiceNumber;
@Schema(description = "金额", example = "23497")
private BigDecimal price;
@Schema(description = "状态")
private String status;
@Schema(description = "纸档位置")
private String position;
@Schema(description = "完整性")
private Integer cherks;
@Schema(description = "归档id")
private Long recordId;
@Schema(description = "交易类型")
private String tradeType;
@Schema(description = "支付方式")
private String payType;
@Schema(description = "归档状态")
private String fileStatus;
@Schema(description = "附件")
private String contractAttachment;
@Schema(description = "备注")
private String remarks;
@Schema(description = "交易日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime tradeDate;
@Schema(description = "归档日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String recordTime;
}

@ -0,0 +1,15 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo;
import lombok.*;
import java.time.LocalDateTime;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 财务档案创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ElectronicFinanceCreateReqVO extends ElectronicFinanceBaseVO {
}

@ -0,0 +1,99 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.ExcelProperty;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
/**
* Excel VO
*
* @author
*/
@Data
public class ElectronicFinanceExcelVO {
@ExcelProperty("主键")
private Long id;
@ExcelProperty("制单人")
private String createBy;
@ExcelProperty("业务实体id")
private Long companyId;
@ExcelProperty("业务实体")
private String company;
@ExcelProperty("用户id")
private Long userId;
@ExcelProperty("所属部门id")
private Long deptId;
@ExcelProperty("所属部门")
private String deptName;
@ExcelProperty("支付账户")
private String account;
@ExcelProperty("项目")
private String project;
@ExcelProperty("收据/发票号码")
private String invoiceNumber;
@ExcelProperty("金额")
private BigDecimal price;
@ExcelProperty(value = "状态", converter = DictConvert.class)
@DictFormat("contract_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String status;
@ExcelProperty("纸档位置")
private String position;
@ExcelProperty(value = "完整性", converter = DictConvert.class)
@DictFormat("cherks") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private Integer cherks;
@ExcelProperty("归档id")
private Long recordId;
@ExcelProperty(value = "交易类型", converter = DictConvert.class)
@DictFormat("trade_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String tradeType;
@ExcelProperty(value = "支付方式", converter = DictConvert.class)
@DictFormat("pay_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String payType;
@ExcelProperty(value = "归档状态", converter = DictConvert.class)
@DictFormat("archives_file_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String fileStatus;
@ExcelProperty("附件")
private String contractAttachment;
@ExcelProperty("备注")
private String remarks;
@ExcelProperty("创建日期")
private LocalDateTime createTime;
@ExcelProperty("交易日期")
private LocalDateTime tradeDate;
@ExcelProperty("归档日期")
private String recordTime;
}

@ -0,0 +1,89 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.*;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 财务档案 Excel 导出 Request VO参数和 ElectronicFinancePageReqVO 是一致的")
@Data
public class ElectronicFinanceExportReqVO {
@Schema(description = "制单人")
private String createBy;
@Schema(description = "业务实体id", example = "17856")
private Long companyId;
@Schema(description = "业务实体")
private String company;
@Schema(description = "用户id", example = "16066")
private Long userId;
@Schema(description = "所属部门id", example = "13607")
private Long deptId;
@Schema(description = "所属部门", example = "芋艿")
private String deptName;
@Schema(description = "支付账户", example = "5498")
private String account;
@Schema(description = "项目")
private String project;
@Schema(description = "收据/发票号码")
private String invoiceNumber;
@Schema(description = "金额", example = "23497")
private BigDecimal price;
@Schema(description = "状态")
private String status;
@Schema(description = "纸档位置")
private String position;
@Schema(description = "完整性")
private Integer cherks;
@Schema(description = "归档id")
private Long recordId;
@Schema(description = "交易类型")
private String tradeType;
@Schema(description = "支付方式")
private String payType;
@Schema(description = "归档状态")
private String fileStatus;
@ExcelProperty("附件")
private String contractAttachment;
@Schema(description = "备注")
private String remarks;
@Schema(description = "创建日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "交易日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] tradeDate;
@Schema(description = "归档日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String[] recordTime;
}

@ -0,0 +1,91 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 财务档案分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ElectronicFinancePageReqVO extends PageParam {
@Schema(description = "制单人")
private String createBy;
@Schema(description = "业务实体id", example = "17856")
private Long companyId;
@Schema(description = "业务实体")
private String company;
@Schema(description = "用户id", example = "16066")
private Long userId;
@Schema(description = "所属部门id", example = "13607")
private Long deptId;
@Schema(description = "所属部门", example = "芋艿")
private String deptName;
@Schema(description = "支付账户", example = "5498")
private String account;
@Schema(description = "项目")
private String project;
@Schema(description = "收据/发票号码")
private String invoiceNumber;
@Schema(description = "金额", example = "23497")
private BigDecimal price;
@Schema(description = "状态")
private String status;
@Schema(description = "纸档位置")
private String position;
@Schema(description = "完整性")
private Integer cherks;
@Schema(description = "归档id")
private Long recordId;
@Schema(description = "交易类型")
private String tradeType;
@Schema(description = "支付方式")
private String payType;
@Schema(description = "归档状态")
private String fileStatus;
@ExcelProperty("附件")
private String contractAttachment;
@Schema(description = "备注")
private String remarks;
@Schema(description = "创建日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "交易日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] tradeDate;
@Schema(description = "归档日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String[] recordTime;
}

@ -0,0 +1,23 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 财务档案 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ElectronicFinanceRespVO extends ElectronicFinanceBaseVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "6066")
private Long id;
@Schema(description = "创建日期")
private LocalDateTime createTime;
}

@ -0,0 +1,18 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 财务档案更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ElectronicFinanceUpdateReqVO extends ElectronicFinanceBaseVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "6066")
@NotNull(message = "主键不能为空")
private Long id;
}

@ -0,0 +1,37 @@
package cn.iocoder.yudao.module.ea.convert.electronicfinance;
import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinanceCreateReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinanceExcelVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinanceRespVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinanceUpdateReqVO;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicfinance.ElectronicFinanceDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* Convert
*
* @author
*/
@Mapper
public interface ElectronicFinanceConvert {
ElectronicFinanceConvert INSTANCE = Mappers.getMapper(ElectronicFinanceConvert.class);
ElectronicFinanceDO convert(ElectronicFinanceCreateReqVO bean);
ElectronicFinanceDO convert(ElectronicFinanceUpdateReqVO bean);
ElectronicFinanceRespVO convert(ElectronicFinanceDO bean);
List<ElectronicFinanceRespVO> convertList(List<ElectronicFinanceDO> list);
PageResult<ElectronicFinanceRespVO> convertPage(PageResult<ElectronicFinanceDO> page);
List<ElectronicFinanceExcelVO> convertList02(List<ElectronicFinanceDO> list);
}

@ -0,0 +1,129 @@
package cn.iocoder.yudao.module.ea.dal.dataobject.electronicfinance;
import lombok.*;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* DO
*
* @author
*/
@TableName("electronic_finance")
@KeySequence("electronic_finance_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ElectronicFinanceDO extends BaseDO {
/**
*
*/
@TableId
private Long id;
/**
*
*/
private String createBy;
/**
* id
*/
private Long companyId;
/**
*
*/
private String company;
/**
* id
*/
private Long userId;
/**
* id
*/
private Long deptId;
/**
*
*/
private String deptName;
/**
*
*/
private String account;
/**
*
*/
private String project;
/**
* /
*/
private String invoiceNumber;
/**
*
*/
private BigDecimal price;
/**
*
*
*
*/
private String status;
/**
*
*/
private String position;
/**
*
*
*
*/
private Integer cherks;
/**
* id
*/
private Long recordId;
/**
*
*
*
*/
private String tradeType;
/**
*
*
*
*/
private String payType;
/**
*
*
*
*/
private String fileStatus;
/**
*
*/
private String remarks;
/**
*
*/
private LocalDateTime tradeDate;
/**
*
*/
private String recordTime;
/**
*
*/
private String contractAttachment;
}

@ -0,0 +1,73 @@
package cn.iocoder.yudao.module.ea.dal.mysql.electronicfinance;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinanceExportReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinancePageReqVO;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicfinance.ElectronicFinanceDO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Mapper
*
* @author
*/
@Mapper
public interface ElectronicFinanceMapper extends BaseMapperX<ElectronicFinanceDO> {
default PageResult<ElectronicFinanceDO> selectPage(ElectronicFinancePageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<ElectronicFinanceDO>()
.eqIfPresent(ElectronicFinanceDO::getCreateBy, reqVO.getCreateBy())
.eqIfPresent(ElectronicFinanceDO::getCompanyId, reqVO.getCompanyId())
.likeIfPresent(ElectronicFinanceDO::getCompany, reqVO.getCompany())
.eqIfPresent(ElectronicFinanceDO::getUserId, reqVO.getUserId())
.eqIfPresent(ElectronicFinanceDO::getDeptId, reqVO.getDeptId())
.likeIfPresent(ElectronicFinanceDO::getDeptName, reqVO.getDeptName())
.likeIfPresent(ElectronicFinanceDO::getAccount, reqVO.getAccount())
.likeIfPresent(ElectronicFinanceDO::getProject, reqVO.getProject())
.likeIfPresent(ElectronicFinanceDO::getInvoiceNumber, reqVO.getInvoiceNumber())
.eqIfPresent(ElectronicFinanceDO::getPrice, reqVO.getPrice())
.eqIfPresent(ElectronicFinanceDO::getStatus, reqVO.getStatus())
.eqIfPresent(ElectronicFinanceDO::getPosition, reqVO.getPosition())
.eqIfPresent(ElectronicFinanceDO::getCherks, reqVO.getCherks())
.eqIfPresent(ElectronicFinanceDO::getRecordId, reqVO.getRecordId())
.eqIfPresent(ElectronicFinanceDO::getTradeType, reqVO.getTradeType())
.eqIfPresent(ElectronicFinanceDO::getPayType, reqVO.getPayType())
.eqIfPresent(ElectronicFinanceDO::getFileStatus, reqVO.getFileStatus())
.eqIfPresent(ElectronicFinanceDO::getRemarks, reqVO.getRemarks())
.betweenIfPresent(ElectronicFinanceDO::getCreateTime, reqVO.getCreateTime())
.betweenIfPresent(ElectronicFinanceDO::getTradeDate, reqVO.getTradeDate())
.betweenIfPresent(ElectronicFinanceDO::getRecordTime, reqVO.getRecordTime())
.orderByDesc(ElectronicFinanceDO::getId));
}
default List<ElectronicFinanceDO> selectList(ElectronicFinanceExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<ElectronicFinanceDO>()
.eqIfPresent(ElectronicFinanceDO::getCreateBy, reqVO.getCreateBy())
.eqIfPresent(ElectronicFinanceDO::getCompanyId, reqVO.getCompanyId())
.likeIfPresent(ElectronicFinanceDO::getCompany, reqVO.getCompany())
.eqIfPresent(ElectronicFinanceDO::getUserId, reqVO.getUserId())
.eqIfPresent(ElectronicFinanceDO::getDeptId, reqVO.getDeptId())
.likeIfPresent(ElectronicFinanceDO::getDeptName, reqVO.getDeptName())
.likeIfPresent(ElectronicFinanceDO::getAccount, reqVO.getAccount())
.likeIfPresent(ElectronicFinanceDO::getProject, reqVO.getProject())
.likeIfPresent(ElectronicFinanceDO::getInvoiceNumber, reqVO.getInvoiceNumber())
.eqIfPresent(ElectronicFinanceDO::getPrice, reqVO.getPrice())
.eqIfPresent(ElectronicFinanceDO::getStatus, reqVO.getStatus())
.eqIfPresent(ElectronicFinanceDO::getPosition, reqVO.getPosition())
.eqIfPresent(ElectronicFinanceDO::getCherks, reqVO.getCherks())
.eqIfPresent(ElectronicFinanceDO::getRecordId, reqVO.getRecordId())
.eqIfPresent(ElectronicFinanceDO::getTradeType, reqVO.getTradeType())
.eqIfPresent(ElectronicFinanceDO::getPayType, reqVO.getPayType())
.eqIfPresent(ElectronicFinanceDO::getFileStatus, reqVO.getFileStatus())
.eqIfPresent(ElectronicFinanceDO::getRemarks, reqVO.getRemarks())
.betweenIfPresent(ElectronicFinanceDO::getCreateTime, reqVO.getCreateTime())
.betweenIfPresent(ElectronicFinanceDO::getTradeDate, reqVO.getTradeDate())
.betweenIfPresent(ElectronicFinanceDO::getRecordTime, reqVO.getRecordTime())
.orderByDesc(ElectronicFinanceDO::getId));
}
}

@ -0,0 +1,74 @@
package cn.iocoder.yudao.module.ea.service.electronicfinance;
import java.util.*;
import javax.validation.*;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinanceCreateReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinanceExportReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinancePageReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinanceUpdateReqVO;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicfinance.ElectronicFinanceDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
/**
* Service
*
* @author
*/
public interface ElectronicFinanceService {
/**
*
*
* @param createReqVO
* @return
*/
Long createFinance(@Valid ElectronicFinanceCreateReqVO createReqVO);
/**
*
*
* @param updateReqVO
*/
void updateFinance(@Valid ElectronicFinanceUpdateReqVO updateReqVO);
/**
*
*
* @param id
*/
void deleteFinance(Long[] id);
/**
*
*
* @param id
* @return
*/
ElectronicFinanceDO getFinance(Long id);
/**
*
*
* @param ids
* @return
*/
List<ElectronicFinanceDO> getFinanceList(Collection<Long> ids);
/**
*
*
* @param pageReqVO
* @return
*/
PageResult<ElectronicFinanceDO> getFinancePage(ElectronicFinancePageReqVO pageReqVO);
/**
* , Excel
*
* @param exportReqVO
* @return
*/
List<ElectronicFinanceDO> getFinanceList(ElectronicFinanceExportReqVO exportReqVO);
}

@ -0,0 +1,84 @@
package cn.iocoder.yudao.module.ea.service.electronicfinance;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinanceCreateReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinanceExportReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinancePageReqVO;
import cn.iocoder.yudao.module.ea.controller.admin.electronicfinance.vo.ElectronicFinanceUpdateReqVO;
import cn.iocoder.yudao.module.ea.convert.electronicfinance.ElectronicFinanceConvert;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicfinance.ElectronicFinanceDO;
import cn.iocoder.yudao.module.ea.dal.mysql.electronicfinance.ElectronicFinanceMapper;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.ea.enums.ErrorCodeConstants.FINANCE_NOT_EXISTS;
/**
* Service
*
* @author
*/
@Service
@Validated
public class ElectronicFinanceServiceImpl implements ElectronicFinanceService {
@Resource
private ElectronicFinanceMapper financeMapper;
@Override
public Long createFinance(ElectronicFinanceCreateReqVO createReqVO) {
// 插入
ElectronicFinanceDO finance = ElectronicFinanceConvert.INSTANCE.convert(createReqVO);
financeMapper.insert(finance);
// 返回
return finance.getId();
}
@Override
public void updateFinance(ElectronicFinanceUpdateReqVO updateReqVO) {
// 校验存在
validateFinanceExists(updateReqVO.getId());
// 更新
ElectronicFinanceDO updateObj = ElectronicFinanceConvert.INSTANCE.convert(updateReqVO);
financeMapper.updateById(updateObj);
}
@Override
public void deleteFinance(Long[] id) {
// 删除
financeMapper.deleteBatchIds(Arrays.asList(id));
}
private void validateFinanceExists(Long id) {
if (financeMapper.selectById(id) == null) {
throw exception(FINANCE_NOT_EXISTS);
}
}
@Override
public ElectronicFinanceDO getFinance(Long id) {
return financeMapper.selectById(id);
}
@Override
public List<ElectronicFinanceDO> getFinanceList(Collection<Long> ids) {
return financeMapper.selectBatchIds(ids);
}
@Override
public PageResult<ElectronicFinanceDO> getFinancePage(ElectronicFinancePageReqVO pageReqVO) {
return financeMapper.selectPage(pageReqVO);
}
@Override
public List<ElectronicFinanceDO> getFinanceList(ElectronicFinanceExportReqVO exportReqVO) {
return financeMapper.selectList(exportReqVO);
}
}

@ -1,35 +0,0 @@
package cn.iocoder.yudao.module.ea.utils.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;
/**
* author: zk
* date: 2023/9/22
* description:
* @author HP
*/
@Getter
public enum BorrowStatusEnum {
/**
*
*/
BORROWSTATUS_TRUE("true", "1"),
BORROWSTATUS_FALSE("false", "0")
;
@JsonValue
private final String status;
/**
*
*/
@EnumValue
private final String isStatus;
BorrowStatusEnum(String status, String isStatus) {
this.status = status;
this.isStatus = isStatus;
}
}

@ -0,0 +1,12 @@
<?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="cn.iocoder.yudao.module.ea.dal.mysql.electronicfinance.ElectronicFinanceMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

@ -86,6 +86,15 @@ public class UserController {
return success(true); return success(true);
} }
@PutMapping("/update-whiteList")
@Operation(summary = "修改用户状态")
@PreAuthorize("@ss.hasPermission('system:user:updatewhiteList')")
public CommonResult<Boolean> updateUserWhiteList(@Valid @RequestBody UserUpdateWhiteListReqVo reqVO) {
userService.updateUserWhiteList(reqVO.getId(), reqVO.getWhiteList());
return success(true);
}
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "获得用户分页列表") @Operation(summary = "获得用户分页列表")
@PreAuthorize("@ss.hasPermission('system:user:list')") @PreAuthorize("@ss.hasPermission('system:user:list')")
@ -111,9 +120,9 @@ public class UserController {
@GetMapping("/list-all-simple") @GetMapping("/list-all-simple")
@Operation(summary = "获取用户精简信息列表", description = "只包含被开启的用户,主要用于前端的下拉选项") @Operation(summary = "获取用户精简信息列表", description = "只包含被开启的用户,主要用于前端的下拉选项")
public CommonResult<List<UserSimpleRespVO>> getSimpleUserList() { public CommonResult<List<UserSimpleRespVO>> getSimpleUserList(UserSimpleRespVO userSimpleRespVO) {
// 获用户列表,只要开启状态的 // 获用户列表,只要开启状态的
List<AdminUserDO> list = userService.getUserListByStatus(CommonStatusEnum.ENABLE.getStatus()); List<AdminUserDO> list = userService.getUserListByStatus(CommonStatusEnum.ENABLE.getStatus(),userSimpleRespVO);
// 排序后,返回给前端 // 排序后,返回给前端
return success(UserConvert.INSTANCE.convertList04(list)); return success(UserConvert.INSTANCE.convertList04(list));
} }

@ -51,4 +51,7 @@ public class UserBaseVO {
@Schema(description = "用户头像", example = "https://www.iocoder.cn/xxx.png") @Schema(description = "用户头像", example = "https://www.iocoder.cn/xxx.png")
private String avatar; private String avatar;
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer whiteList;
} }

@ -35,4 +35,7 @@ public class UserPageReqVO extends PageParam {
@Schema(description = "部门编号,同时筛选子部门", example = "1024") @Schema(description = "部门编号,同时筛选子部门", example = "1024")
private Long deptId; private Long deptId;
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
private Integer whiteList;
} }

@ -18,4 +18,11 @@ public class UserUpdateStatusReqVO {
// @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") // @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
private Integer status; private Integer status;
// @Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
// @NotNull(message = "状态不能为空")
// @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
// @Schema(description = "白名单")
// @NotNull(message = "状态不能为空")
// private Integer whiteList;
} }

@ -0,0 +1,24 @@
package cn.iocoder.yudao.module.system.controller.admin.user.vo.user;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author: cyl
* @Description:
* @create: 2023/11/10 12:48
*/
@Schema(description = "管理后台 - 用户更新白名单状态 Request VO")
@Data
public class UserUpdateWhiteListReqVo {
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "角色编号不能为空")
private Long id;
@Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态不能为空")
// @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
private Integer whiteList;
}

@ -93,4 +93,10 @@ public class AdminUserDO extends TenantBaseDO {
*/ */
private LocalDateTime loginDate; private LocalDateTime loginDate;
/**
*
*
*/
private Integer whiteList;
} }

@ -1,10 +1,12 @@
package cn.iocoder.yudao.module.system.dal.mysql.user; package cn.iocoder.yudao.module.system.dal.mysql.user;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.string.StringUtils;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserExportReqVO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserExportReqVO;
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO;
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserSimpleRespVO;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -31,6 +33,7 @@ public interface AdminUserMapper extends BaseMapperX<AdminUserDO> {
.likeIfPresent(AdminUserDO::getUsername, reqVO.getUsername()) .likeIfPresent(AdminUserDO::getUsername, reqVO.getUsername())
.likeIfPresent(AdminUserDO::getMobile, reqVO.getMobile()) .likeIfPresent(AdminUserDO::getMobile, reqVO.getMobile())
.eqIfPresent(AdminUserDO::getStatus, reqVO.getStatus()) .eqIfPresent(AdminUserDO::getStatus, reqVO.getStatus())
.eqIfPresent(AdminUserDO::getWhiteList, reqVO.getWhiteList())
.betweenIfPresent(AdminUserDO::getCreateTime, reqVO.getCreateTime()) .betweenIfPresent(AdminUserDO::getCreateTime, reqVO.getCreateTime())
.inIfPresent(AdminUserDO::getDeptId, deptIds) .inIfPresent(AdminUserDO::getDeptId, deptIds)
.orderByDesc(AdminUserDO::getId)); .orderByDesc(AdminUserDO::getId));
@ -49,8 +52,10 @@ public interface AdminUserMapper extends BaseMapperX<AdminUserDO> {
return selectList(new LambdaQueryWrapperX<AdminUserDO>().like(AdminUserDO::getNickname, nickname)); return selectList(new LambdaQueryWrapperX<AdminUserDO>().like(AdminUserDO::getNickname, nickname));
} }
default List<AdminUserDO> selectListByStatus(Integer status) { default List<AdminUserDO> selectListByStatus(Integer status, UserSimpleRespVO userSimpleRespVO) {
return selectList(AdminUserDO::getStatus, status); LambdaQueryWrapperX<AdminUserDO> wrapperX = new LambdaQueryWrapperX<>();
wrapperX.eq(AdminUserDO::getStatus, status).likeIfPresent(AdminUserDO::getNickname,userSimpleRespVO.getNickname());
return selectList(wrapperX);
} }
default List<AdminUserDO> selectListByDeptIds(Collection<Long> deptIds) { default List<AdminUserDO> selectListByDeptIds(Collection<Long> deptIds) {

@ -20,7 +20,7 @@ public interface RedisKeyConstants {
RedisKeyDefine OAUTH2_ACCESS_TOKEN = new RedisKeyDefine("访问令牌的缓存", RedisKeyDefine OAUTH2_ACCESS_TOKEN = new RedisKeyDefine("访问令牌的缓存",
"oauth2_access_token:%s", // 参数为访问令牌 token "oauth2_access_token:%s", // 参数为访问令牌 token
STRING, OAuth2AccessTokenDO.class, RedisKeyDefine.TimeoutTypeEnum.DYNAMIC); STRING, OAuth2AccessTokenDO.class, RedisKeyDefine.TimeoutTypeEnum.FOREVER);
RedisKeyDefine SOCIAL_AUTH_STATE = new RedisKeyDefine("社交登陆的 state", // 注意,它是被 JustAuth 的 justauth.type.prefix 使用到 RedisKeyDefine SOCIAL_AUTH_STATE = new RedisKeyDefine("社交登陆的 state", // 注意,它是被 JustAuth 的 justauth.type.prefix 使用到
"social_auth_state:%s", // 参数为 state "social_auth_state:%s", // 参数为 state

@ -8,17 +8,21 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.token.OAuth2AccessTokenPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.token.OAuth2AccessTokenPageReqVO;
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserBaseVO;
import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2AccessTokenDO; import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2AccessTokenDO;
import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2ClientDO; import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2ClientDO;
import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2RefreshTokenDO; import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2RefreshTokenDO;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.dal.mysql.oauth2.OAuth2AccessTokenMapper; import cn.iocoder.yudao.module.system.dal.mysql.oauth2.OAuth2AccessTokenMapper;
import cn.iocoder.yudao.module.system.dal.mysql.oauth2.OAuth2RefreshTokenMapper; import cn.iocoder.yudao.module.system.dal.mysql.oauth2.OAuth2RefreshTokenMapper;
import cn.iocoder.yudao.module.system.dal.redis.oauth2.OAuth2AccessTokenRedisDAO; import cn.iocoder.yudao.module.system.dal.redis.oauth2.OAuth2AccessTokenRedisDAO;
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.Calendar; import java.util.Calendar;
import java.util.List; import java.util.List;
@ -44,6 +48,9 @@ public class OAuth2TokenServiceImpl implements OAuth2TokenService {
@Resource @Resource
private OAuth2ClientService oauth2ClientService; private OAuth2ClientService oauth2ClientService;
@Resource
private AdminUserService adminUserService;
@Override @Override
@Transactional @Transactional
public OAuth2AccessTokenDO createAccessToken(Long userId, Integer userType, String clientId, List<String> scopes) { public OAuth2AccessTokenDO createAccessToken(Long userId, Integer userType, String clientId, List<String> scopes) {
@ -139,7 +146,15 @@ public class OAuth2TokenServiceImpl implements OAuth2TokenService {
.setClientId(clientDO.getClientId()).setScopes(refreshTokenDO.getScopes()) .setClientId(clientDO.getClientId()).setScopes(refreshTokenDO.getScopes())
.setRefreshToken(refreshTokenDO.getRefreshToken()) .setRefreshToken(refreshTokenDO.getRefreshToken())
.setExpiresTime(LocalDateTime.now().plusSeconds(clientDO.getAccessTokenValiditySeconds())); .setExpiresTime(LocalDateTime.now().plusSeconds(clientDO.getAccessTokenValiditySeconds()));
accessTokenDO.setTenantId(TenantContextHolder.getTenantId()); // 手动设置租户编号,避免缓存到 Redis 的时候,无对应的租户编号 // 手动设置租户编号,避免缓存到 Redis 的时候,无对应的租户编号
accessTokenDO.setTenantId(TenantContextHolder.getTenantId());
Long userId = accessTokenDO.getUserId();
AdminUserDO user = adminUserService.getUser(userId);
Integer whiteList = user.getWhiteList();
if (whiteList == 0){
accessTokenDO.setExpiresTime(LocalDateTime.now().plus(1, ChronoUnit.YEARS));
}
oauth2AccessTokenMapper.insert(accessTokenDO); oauth2AccessTokenMapper.insert(accessTokenDO);
// 记录到 Redis 中 // 记录到 Redis 中
oauth2AccessTokenRedisDAO.set(accessTokenDO); oauth2AccessTokenRedisDAO.set(accessTokenDO);

@ -82,6 +82,16 @@ public interface AdminUserService {
*/ */
void updateUserStatus(Long id, Integer status); void updateUserStatus(Long id, Integer status);
/**
*
*
* @param id
* @param whiteList
*/
void updateUserWhiteList(Long id, Integer whiteList);
/** /**
* *
* *
@ -198,7 +208,7 @@ public interface AdminUserService {
* @param status * @param status
* @return * @return
*/ */
List<AdminUserDO> getUserListByStatus(Integer status); List<AdminUserDO> getUserListByStatus(Integer status,UserSimpleRespVO userSimpleRespVO);
/** /**
* *

@ -90,6 +90,7 @@ public class AdminUserServiceImpl implements AdminUserService {
// 插入用户 // 插入用户
AdminUserDO user = UserConvert.INSTANCE.convert(reqVO); AdminUserDO user = UserConvert.INSTANCE.convert(reqVO);
user.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 默认开启 user.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 默认开启
user.setWhiteList(CommonStatusEnum.ENABLE.getStatus());// 默认开启
user.setPassword(encodePassword(reqVO.getPassword())); // 加密密码 user.setPassword(encodePassword(reqVO.getPassword())); // 加密密码
userMapper.insert(user); userMapper.insert(user);
// 插入关联岗位 // 插入关联岗位
@ -190,6 +191,18 @@ public class AdminUserServiceImpl implements AdminUserService {
userMapper.updateById(updateObj); userMapper.updateById(updateObj);
} }
@Override
public void updateUserWhiteList(Long id, Integer whiteList) {
// 校验用户存在
validateUserExists(id);
// 更新状态
AdminUserDO updateObj = new AdminUserDO();
updateObj.setId(id);
updateObj.setWhiteList(whiteList);
userMapper.updateById(updateObj);
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void deleteUser(Long id) { public void deleteUser(Long id) {
@ -435,8 +448,8 @@ public class AdminUserServiceImpl implements AdminUserService {
} }
@Override @Override
public List<AdminUserDO> getUserListByStatus(Integer status) { public List<AdminUserDO> getUserListByStatus(Integer status,UserSimpleRespVO userSimpleRespVO) {
return userMapper.selectListByStatus(status); return userMapper.selectListByStatus(status,userSimpleRespVO);
} }
@Override @Override

@ -30,6 +30,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
*/ */
@Override @Override
public void addInterceptors(InterceptorRegistry registry) { public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new LicenseCheckInterceptor()).addPathPatterns("/admin-api/system/auth/login"); // registry.addInterceptor(new LicenseCheckInterceptor()).addPathPatterns("/admin-api/system/auth/login");
} }
} }

Loading…
Cancel
Save