Commit 86f3ecad authored by wangyangyang's avatar wangyangyang

Merge remote-tracking branch 'origin/master'

parents 97b04b60 e6580255
package com.inet.dcs.document.common.vo;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.time.LocalDateTime;
import java.util.ArrayList;
import cn.hutool.core.convert.Convert;
import com.yonde.dex.basedata.entity.annotation.XmlElementProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import lombok.ToString;
import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.math.BigInteger;
import org.springframework.data.annotation.Transient;
import lombok.experimental.Delegate;
import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.XmlAttribute;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotNull;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.yonde.dex.basedata.entity.xmladapters.LocalDateTimeXmlAdapter;
import lombok.Data;
import com.yonde.dex.basedata.entity.annotation.*;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import com.yonde.dex.basedata.entity.vo.IdOnlyVO;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.TypeReference;
import com.yonde.dex.basedata.entity.data.VersionRelationType;
import com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable;
import com.yonde.dex.basedata.entity.vo.IdVO;
import com.yonde.dex.linkdata.plugin.common.DxLinkDataVOHolder;
import com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable;
import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.inet.dcs.document.common.vo.ExtBorrowingFormVO;
import com.yonde.dex.basedata.entity.users.DxUserVO;
/**
* @description: ExtBorrowingDocLink-VO
* @author: dexadmin
* @version: V
* @date: 2024-10-29 15:52:00
**/
@JsonTypeInfo( use = JsonTypeInfo.Id.CLASS, property = "dxClassname", visible = true, defaultImpl = ExtBorrowingDocLinkVO.class)
@EqualsAndHashCode(callSuper = true)
@Data
@ToString(callSuper = true)
@DexTypeVersionProp(propName = "target", join = @VersionProperty(curVersion = VersionRelationType.NONE, refVersion = VersionRelationType.ITERATION))
@DexTypeVersionProp(propName = "source", join = @VersionProperty(curVersion = VersionRelationType.NONE, refVersion = VersionRelationType.ITERATION))
public class ExtBorrowingDocLinkVO extends IdOnlyVO implements DxLinkDataVOHolder<DxDocumentVO, ExtBorrowingFormVO> ,IdVO{
public static final String DX_ID_EMBEDDABLE_PROP_NAME = "dxIdEmbeddable";
public static final String DX_LINK_DATA_EMBEDDABLE_PROP_NAME = "dxLinkDataEmbeddable";
/**
* dao扩展对象
*/
@DexEmbedded()
@JsonIgnore
private DxIdVOEmbeddable dxIdEmbeddable;
/**
* 扩展VO属性
*/
@DexEmbedded()
@JsonIgnore
private DxLinkDataVOEmbeddable<DxDocumentVO, ExtBorrowingFormVO> dxLinkDataEmbeddable;
}
......@@ -47,12 +47,13 @@ import com.yonde.dex.container.folder.plugin.common.entity.DxObjFolderVOHolder;
import com.yonde.dex.user.common.vo.DxUserInfoVO;
import com.yonde.dex.dfs.objfilelink.plugin.common.entity.DxObjFileLinkVOEmbeddable;
import com.yonde.dex.version.plugin.common.entity.DxIterationVOHolder;
import com.inet.dcs.document.common.vo.ExtBorrowingDocLinkVO;
/**
* @description: ExtBorrowingForm-VO
* @author: dexadmin
* @version: V
* @date: 2024-10-29 10:30:50
* @date: 2024-10-29 15:52:00
**/
@JsonTypeInfo( use = JsonTypeInfo.Id.CLASS, property = "dxClassname", visible = true, defaultImpl = ExtBorrowingFormVO.class)
@EqualsAndHashCode(callSuper = true)
......@@ -80,6 +81,7 @@ public class ExtBorrowingFormVO extends IdOnlyVO implements IdVO ,DxContextVOHol
public static final String DX_HANDLER_USER_INFO_ID_PROP_NAME = "dxHandlerUserInfoId";
public static final String DX_HANDLER_USER_INFO_ID_TYPE_PROP_NAME = "dxHandlerUserInfoIdType";
public static final String EXPECTED_RETURN_TIME_PROP_NAME = "expectedReturnTime";
public static final String EXT_BORROWING_DOC_LINKS_PROP_NAME = "extBorrowingDocLinks";
public static final String FILE_NAME_PROP_NAME = "fileName";
public static final String REFERENCE_PROP_NAME = "reference";
public static final String RETURN_SITUATION_DESCRIPTION_PROP_NAME = "returnSituationDescription";
......@@ -204,6 +206,13 @@ public class ExtBorrowingFormVO extends IdOnlyVO implements IdVO ,DxContextVOHol
*/
private LocalDateTime expectedReturnTime;
/**
* 借阅单文档关系关系集合
*/
@RelationProperty(refProperty = "target")
@VersionProperty(curVersion = VersionRelationType.ITERATION, refVersion = VersionRelationType.NONE)
private List<ExtBorrowingDocLinkVO> extBorrowingDocLinks;
/**
* 文件名称
*/
......
package com.inet.dcs.document.core.controller;
import org.springframework.stereotype.Controller;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import java.util.List;
import com.inet.dcs.document.common.vo.ExtBorrowingDocLinkVO;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
import com.inet.dcs.document.core.service.ExtBorrowingDocLinkService;
import com.yonde.dex.basedata.entity.api.ApiResult;
import com.inet.dcs.document.core.controller.shadow.ExtBorrowingDocLinkControllerShadow;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
/**
* @description: ExtBorrowingDocLink-Controller
* @author: dexadmin
* @version: V
* @date: 2024-10-29 15:52:00
**/
@Api(tags = "ExtBorrowingDocLink管理服务")
@RequestMapping("/ExtBorrowingDocLink")
@ResponseBody()
@Controller(ExtBorrowingDocLinkController.BEAN_NAME)
public class ExtBorrowingDocLinkController<V extends ExtBorrowingDocLinkVO, S extends ExtBorrowingDocLinkService<V>> extends ExtBorrowingDocLinkControllerShadow<V, S> {
}
......@@ -28,6 +28,14 @@ import org.springframework.stereotype.Controller;
public class ExtTransferDocumentController<V extends ExtTransferDocumentVO, S extends ExtTransferDocumentService<V>> extends ExtTransferDocumentControllerShadow<V, S> {
@Autowired
private ExtTransferDocumentService extTransferDocumentService;
@ApiOperation("发起审批流程")
@PostMapping({"startWorkflow"})
public ApiResult startWorkflow(@RequestParam("id") Long id) {
return ApiResult.ok(extTransferDocumentService.startWorkflow(id), "流程启动成功");
}
}
package com.inet.dcs.document.core.controller.shadow;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import java.util.List;
import com.inet.dcs.document.common.vo.ExtBorrowingDocLinkVO;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
import com.inet.dcs.document.core.service.ExtBorrowingDocLinkService;
import com.inet.dcs.document.core.service.impl.ExtBorrowingDocLinkServiceImpl;
import com.yonde.dex.basedata.entity.api.ApiResult;
import javax.annotation.Resource;
import com.yonde.dex.linkdata.plugin.core.controller.DxLinkDataController;
import com.yonde.dex.baseweb.AbstractBaseController;
/**
* @description: ExtBorrowingDocLink-Controller
* @author: dexadmin
* @version: V
* @date: 2024-10-29 15:52:00
**/
public class ExtBorrowingDocLinkControllerShadow<V extends ExtBorrowingDocLinkVO, S extends ExtBorrowingDocLinkService<V>> implements AbstractBaseController<V, S> ,DxLinkDataController<V, S>{
public static final String BEAN_NAME = "extBorrowingDocLinkController";
/**
* 注入
*/
@Resource(name = ExtBorrowingDocLinkServiceImpl.BEAN_NAME)
private ExtBorrowingDocLinkService<V> extBorrowingDocLinkService;
/**
* getService
*/
@Override
public S getService() {
return (S)this.extBorrowingDocLinkService;
}
}
package com.inet.dcs.document.core.repository;
import com.inet.dcs.document.entity.po.ExtBorrowingDocLink;
import com.inet.dcs.document.core.repository.shadow.ExtBorrowingDocLinkRepositoryShadow;
/**
* @description: ExtBorrowingDocLink-repository
* @author: dexadmin
* @version: V
* @date: 2024-10-29 15:52:00
**/
public interface ExtBorrowingDocLinkRepository<P extends ExtBorrowingDocLink> extends ExtBorrowingDocLinkRepositoryShadow<P> {
}
package com.inet.dcs.document.core.repository.shadow;
import com.inet.dcs.document.entity.po.ExtBorrowingDocLink;
import org.springframework.data.repository.NoRepositoryBean;
import com.yonde.dex.dao.business.repository.BaseRepository;
import com.yonde.dex.linkdata.plugin.core.repository.DxLinkDataRepository;
/**
* @description: ExtBorrowingDocLink-repository
* @author: dexadmin
* @version: V
* @date: 2024-10-29 15:52:00
**/
@NoRepositoryBean
public interface ExtBorrowingDocLinkRepositoryShadow<P extends ExtBorrowingDocLink> extends BaseRepository<P> ,DxLinkDataRepository<P> {
String BEAN_NAME = "extBorrowingDocLinkRepository";
}
package com.inet.dcs.document.core.service;
import com.inet.dcs.document.common.vo.ExtBorrowingDocLinkVO;
import com.inet.dcs.document.core.service.shadow.ExtBorrowingDocLinkServiceShadow;
/**
* @description: ExtBorrowingDocLink-service
* @author: dexadmin
* @version: V
* @date: 2024-10-29 15:52:00
**/
public interface ExtBorrowingDocLinkService<V extends ExtBorrowingDocLinkVO> extends ExtBorrowingDocLinkServiceShadow<V> {
}
......@@ -10,4 +10,5 @@ import com.inet.dcs.document.core.service.shadow.ExtTransferDocumentServiceShado
**/
public interface ExtTransferDocumentService<V extends ExtTransferDocumentVO> extends ExtTransferDocumentServiceShadow<V> {
ExtTransferDocumentVO startWorkflow(Long id);
}
package com.inet.dcs.document.core.service.impl;
import org.springframework.stereotype.Service;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import com.inet.dcs.document.common.vo.ExtBorrowingDocLinkVO;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Autowired;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import com.inet.dcs.document.core.service.ExtBorrowingDocLinkService;
import com.inet.dcs.document.core.repository.ExtBorrowingDocLinkRepository;
import com.inet.dcs.document.entity.po.ExtBorrowingDocLink;
import javax.annotation.Resource;
/**
* @description: ExtBorrowingDocLink-ServiceImpl
* @author: dexadmin
* @version: V
* @date: 2024-10-29 15:52:00
**/
@Slf4j
@Service(ExtBorrowingDocLinkServiceImpl.BEAN_NAME)
public class ExtBorrowingDocLinkServiceImpl<V extends ExtBorrowingDocLinkVO> implements ExtBorrowingDocLinkService<V>{
public static final String BEAN_NAME = "extBorrowingDocLinkServiceImpl";
@Autowired
ExtBorrowingDocLinkRepository<ExtBorrowingDocLink> extBorrowingDocLinkRepository;
}
package com.inet.dcs.document.core.service.impl;
import org.springframework.stereotype.Service;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import com.inet.dcs.document.common.vo.ExtTransferDocumentVO;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Autowired;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import com.inet.dcs.document.core.service.ExtTransferDocumentService;
import com.inet.dcs.document.core.constants.Constants;
import com.inet.dcs.document.core.repository.ExtTransferDocumentRepository;
import com.inet.dcs.document.core.service.ExtTransferDocumentService;
import com.inet.dcs.document.entity.po.ExtTransferDocument;
import javax.annotation.Resource;
import com.yonde.dex.basedata.exception.DxBusinessException;
import com.yonde.dex.wfc.feign.api.WfcProcessFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @description: ExtTransferDocument-ServiceImpl
* @author: dexadmin
* @version: V
* @date: 2024-10-29 10:30:50
**/
* @description: ExtTransferDocument-ServiceImpl
* @author: dexadmin
* @version: V
* @date: 2024-10-29 10:30:50
**/
@Slf4j
@Service(ExtTransferDocumentServiceImpl.BEAN_NAME)
public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> implements ExtTransferDocumentService<V>{
public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> implements ExtTransferDocumentService<V> {
public static final String BEAN_NAME = "extTransferDocumentServiceImpl";
......@@ -29,6 +27,23 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
@Autowired
ExtTransferDocumentRepository<ExtTransferDocument> extTransferDocumentRepository;
@Autowired
private WfcProcessFeign wfcProcessFeign;
private static final String START_PROCESS_BY_KEY = "ExtTransferDocWF";
@Override
public ExtTransferDocumentVO startWorkflow(Long id) {
ExtTransferDocumentVO extTransferDocumentVO = this.get(id);
if (extTransferDocumentVO == null) {
throw new DxBusinessException("500", "获取不到对象");
}
if (!extTransferDocumentVO.getState().equals(Constants.EDIT)) {
throw new DxBusinessException("500", "该对象不是编制状态");
}
wfcProcessFeign.startProcessByKey(START_PROCESS_BY_KEY, extTransferDocumentVO);
return this.changeStatus(extTransferDocumentVO.getId(), Constants.SUBMIT_REVIEWING, true);
}
}
package com.inet.dcs.document.core.service.shadow;
import com.inet.dcs.document.common.vo.ExtBorrowingDocLinkVO;
import com.inet.dcs.document.feign.ExtBorrowingDocLinkServiceFeign;
import com.yonde.dex.linkdata.plugin.core.service.DxLinkDataService;
import com.yonde.dex.dao.service.BaseIdEntityService;
/**
* @description: ExtBorrowingDocLink-service
* @author: dexadmin
* @version: V
* @date: 2024-10-29 15:52:00
**/
public interface ExtBorrowingDocLinkServiceShadow<V extends ExtBorrowingDocLinkVO> extends ExtBorrowingDocLinkServiceFeign<V>, BaseIdEntityService<V> ,DxLinkDataService<V> {
}
package com.inet.dcs.document.entity.po;
import org.springframework.data.annotation.CreatedBy;
import javax.persistence.UniqueConstraint;
import java.util.Date;
import java.time.LocalDateTime;
import lombok.EqualsAndHashCode;
import org.springframework.data.annotation.LastModifiedDate;
import com.yonde.dex.dao.entity.base.IdEntity;
import org.springframework.data.annotation.LastModifiedBy;
import javax.persistence.Column;
import org.springframework.data.annotation.CreatedDate;
import com.yonde.dex.basedata.entity.annotation.DexEmbedded;
import lombok.Data;
import com.yonde.dex.basedata.entity.annotation.*;
import java.math.BigInteger;
import javax.persistence.*;
import java.math.BigDecimal;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.yonde.dex.dao.entity.base.IdEntity;
import javax.persistence.Column;
import com.yonde.dex.linkdata.plugin.entities.DxLinkDataHolder;
import com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable;
import com.yonde.dex.dao.entity.base.IdOnlyEntity;
import com.yonde.dex.linkdata.plugin.entities.DxLinkDataEmbeddable;
/**
* @description: ExtBorrowingDocLink-PO实体
* @author: dexadmin
* @version: V
* @date: 2024-10-29 15:52:00
**/
@Entity
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Data
@Table(name = "EXT_BORROWING_DOC_LINK")
public class ExtBorrowingDocLink extends IdOnlyEntity implements IdEntity ,DxLinkDataHolder{
/**
* dao扩展对象
*/
@DexEmbedded()
@Embedded()
private DxIdEntityEmbeddable dxIdEmbeddable;
/**
* 扩展PO属性
*/
@DexEmbedded()
@Embedded()
private DxLinkDataEmbeddable dxLinkDataEmbeddable;
}
......@@ -43,7 +43,7 @@ import com.yonde.dex.version.plugin.entities.DxIterationEmbeddable;
* @description: ExtBorrowingForm-PO实体
* @author: dexadmin
* @version: V
* @date: 2024-10-29 10:30:50
* @date: 2024-10-29 15:52:00
**/
@Entity
@EqualsAndHashCode(callSuper = true)
......
package com.inet.dcs.document.feign;
import com.inet.dcs.document.common.vo.ExtBorrowingDocLinkVO;
import io.swagger.annotations.Api;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.inet.dcs.document.feign.shadow.ExtBorrowingDocLinkServiceFeignShadow;
/**
* @description: ExtBorrowingDocLink-Feign
* @author: dexadmin
* @version: V
* @date: 2024-10-29 15:52:00
**/
@Api(tags = "ExtBorrowingDocLink-FEIGN")
@FeignClient(value = "${dcs.feign.DCS-DOC}", path = "/ExtBorrowingDocLink")
public interface ExtBorrowingDocLinkServiceFeign<V extends ExtBorrowingDocLinkVO> extends ExtBorrowingDocLinkServiceFeignShadow<V> {
}
package com.inet.dcs.document.feign.shadow;
import com.inet.dcs.document.common.vo.ExtBorrowingDocLinkVO;
import io.swagger.annotations.Api;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.yonde.dex.dao.service.remotes.BaseFeign;
import com.yonde.dex.linkdata.plugin.feign.DxLinkDataFeign;
/**
* @description: ExtBorrowingDocLink-Feign
* @author: dexadmin
* @version: V
* @date: 2024-10-29 15:52:00
**/
public interface ExtBorrowingDocLinkServiceFeignShadow<V extends ExtBorrowingDocLinkVO> extends BaseFeign<V> ,DxLinkDataFeign<V> {
String BEAN_NAME = "extBorrowingDocLinkServiceFeign";
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment