Merge remote-tracking branch 'origin/main'

new
commit e02eb34e32

@ -12,6 +12,11 @@ INSERT INTO `act_re_model`(`ID_`, `REV_`, `NAME_`, `KEY_`, `CATEGORY_`, `CREATE_
INSERT INTO `bpm_form`(`id`, `name`, `status`, `conf`, `fields`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'ddx', 0, '{\"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\\\"}\"]', NULL, '', '2023-09-13 16:04:19', '', '2023-09-13 16:04:19', b'0', 1);
INSERT INTO `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 (297, 'f939dc13-521a-11ee-adcb-00a6230850b9', '', 'Activity_0b7iisg', 30, '[1]', '', '2023-09-13 17:55:26', '', '2023-09-13 17:55:26', b'0', 1);
INSERT INTO bpm_task_assign_rule (model_id, process_definition_id, task_definition_key, type, options, create_time, update_time, tenant_id) VALUES ('00380358-520c-11ee-a1f0-00a6230850b9', 'archives_turn_over:1:564e23d3-52d4-11ee-94c1-00a6230850b9', 'audit1', 30, '[1]', '2023-09-14 15:57:23.024', '2023-09-14 15:57:23.024', 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 (NULL, '', 'DAYJ_PASS', '', '{billName}', 2, '[\"billName\"]', 0, NULL, '126', '2023-08-19 23:32:29', '126', '2023-08-19 23:32:29', 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 (NULL, '', 'DAYJ_NOPASS', '', '{billName}', 2, '[\"billName\"]', 0, NULL, '126', '2023-08-19 23:32:29', '126', '2023-08-19 23:45:53', 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 (NULL, '', 'DAYJ_UNDEAL', '', '{billName}', 2, '[\"billName\"]', 0, NULL, '126', '2023-08-19 23:32:29', '126', '2023-08-30 00:21:12', b'0');
--
-- ----------------------------

@ -1,9 +1,15 @@
package cn.iocoder.yudao.module.accounting.controller.admin.other;
import cn.hutool.core.io.IoUtil;
import cn.iocoder.yudao.module.accounting.controller.admin.voucher.vo.VoucherPageReqVO;
import cn.iocoder.yudao.module.accounting.controller.admin.voucher.vo.VoucherRespVO;
import cn.iocoder.yudao.module.accounting.convert.voucher.VoucherConvert;
import cn.iocoder.yudao.module.accounting.dal.dataobject.voucher.VoucherDO;
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.service.file.FileService;
import cn.iocoder.yudao.module.setting.service.passwords.PasswordsService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -44,6 +50,9 @@ public class OtherController {
@Resource
private FileService fileService;
@Resource
private PasswordsService passwordsService;
@PostMapping("/create")
@Operation(summary = "创建其他资料")
@PreAuthorize("@ss.hasPermission('accounting:other:create')")
@ -119,4 +128,14 @@ public class OtherController {
ExcelUtils.write(response, "其他资料.xls", "数据", OtherExcelVO.class, datas);
}
@GetMapping("/downloadXml")
@Operation(summary = "获得其他资料Xml")
@PreAuthorize("@ss.hasPermission('accounting:other:query')")
public void downloadXml(@Valid OtherPageReqVO pageVO, HttpServletResponse response) throws IOException {
PageResult<OtherDO> pageResult = otherService.getOtherPage(pageVO);
PageResult<OtherRespVO> otherRespVOPageResult = OtherConvert.INSTANCE.convertPage(pageResult);
String jsonString = JSONObject.toJSONString(otherRespVOPageResult);
passwordsService.jsonToXmlConverter(response,pageVO.getInputPassword(),jsonString);
}
}

@ -79,4 +79,7 @@ public class OtherPageReqVO extends PageParam {
@Schema(description = "备注", example = "你猜")
private String remark;
@Schema(description = "密码", example = "1586")
private String inputPassword;
}

@ -1,11 +1,15 @@
package cn.iocoder.yudao.module.accounting.service.voucher;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
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.organization.OrganizationDO;
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.organization.OrganizationMapper;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -38,6 +42,8 @@ public class VoucherServiceImpl implements VoucherService {
private DepotMapper depotMapper;
@Resource
private DepotCabinetMapper depotCabinetMapper;
@Resource
private AdminUserMapper userMapper;
@Override
public Long createVoucher(VoucherCreateReqVO createReqVO) {
@ -64,6 +70,10 @@ public class VoucherServiceImpl implements VoucherService {
}
}
voucher.setPosition(position);
//制单人
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
AdminUserDO adminUserDO = userMapper.selectById(loginUser.getId());
voucher.setCreateBy(adminUserDO.getUsername());
voucherMapper.insert(voucher);
// 返回
return voucher.getId();

@ -1,5 +1,8 @@
package cn.iocoder.yudao.module.accounting.service.voucherdetails;
import cn.iocoder.yudao.module.accounting.controller.admin.voucher.vo.VoucherExportReqVO;
import cn.iocoder.yudao.module.accounting.dal.dataobject.voucher.VoucherDO;
import cn.iocoder.yudao.module.accounting.dal.mysql.voucher.VoucherMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -31,10 +34,24 @@ public class VoucherDetailsServiceImpl implements VoucherDetailsService {
@Resource
private VoucherDetailsMapper voucherDetailsMapper;
@Resource
private VoucherMapper voucherMapper;
@Override
public Long createVoucherDetails(VoucherDetailsCreateReqVO createReqVO) {
// 插入
VoucherDetailsDO voucherDetails = VoucherDetailsConvert.INSTANCE.convert(createReqVO);
//寻找凭证id通过voucherNum
if (createReqVO.getVoucherNum() != null) {
String voucherNum = createReqVO.getVoucherNum();
VoucherExportReqVO voucherExportReqVO = new VoucherExportReqVO();
voucherExportReqVO.setVoucherNum(voucherNum);
List<VoucherDO> voucherDOS = voucherMapper.selectList(voucherExportReqVO);
if (voucherDOS.size()>0){
voucherDetails.setVoucherId(voucherDOS.get(0).getId());
}
}
voucherDetailsMapper.insert(voucherDetails);
// 返回
return voucherDetails.getId();
@ -46,6 +63,16 @@ public class VoucherDetailsServiceImpl implements VoucherDetailsService {
validateVoucherDetailsExists(updateReqVO.getId());
// 更新
VoucherDetailsDO updateObj = VoucherDetailsConvert.INSTANCE.convert(updateReqVO);
//寻找凭证id通过voucherNum
if (updateReqVO.getVoucherNum() != null) {
String voucherNum = updateReqVO.getVoucherNum();
VoucherExportReqVO voucherExportReqVO = new VoucherExportReqVO();
voucherExportReqVO.setVoucherNum(voucherNum);
List<VoucherDO> voucherDOS = voucherMapper.selectList(voucherExportReqVO);
if (voucherDOS.size()>0){
updateReqVO.setVoucherId(voucherDOS.get(0).getId());
}
}
voucherDetailsMapper.updateById(updateObj);
}

@ -96,7 +96,7 @@ public class RecordController {
@GetMapping("/page")
@Operation(summary = "获得归档分页")
@PreAuthorize("@ss.hasPermission('archives:record:query')")
@DataPermission
//@DataPermission 用来限制部门数据
public CommonResult<PageResult<RecordRespVO>> getRecordPage(@Valid RecordPageReqVO pageVO) {
PageResult<RecordDO> pageResult = recordService.getRecordPage(pageVO);
return success(RecordConvert.INSTANCE.convertPage(pageResult));

@ -13,9 +13,4 @@ import javax.validation.constraints.*;
public class TurnOverCreateReqVO extends TurnOverBaseVO {
@Schema(description = "id")
private Long id;
@AssertTrue(message = "状态只能是0或者1提交")
public boolean isStatusValid() {
//只能传未提交和待审核
return getStatus().equals(ArchivesStatusEnum.NOSUBMIT.getValue()) || getStatus().equals(ArchivesStatusEnum.PROCESS.getValue());
}
}

@ -59,6 +59,7 @@ public class TurnOverServiceImpl extends MPJBaseServiceImpl<TurnOverMapper, Turn
//添加数据userid
turnOver.setUserId(loginUser.getId());
turnOver.setStatus(BpmProcessInstanceResultEnum.PROCESS.getResult().toString());
turnOver.setCreateById(loginUser.getId());
turnOverMapper.insert(turnOver);
if (turnOver.getStatus().equals(ArchivesStatusEnum.PROCESS.getValue())) {

Loading…
Cancel
Save