Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -100,28 +100,28 @@ public class ContractController implements BusinessControllerMarker {
|
||||
|
||||
// TODO
|
||||
@PostMapping("/download")
|
||||
@Operation(summary = "下载文件")
|
||||
@Operation(summary = "下载文件 TODO")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:download')")
|
||||
public void download() {
|
||||
}
|
||||
|
||||
// TODO
|
||||
@PostMapping("/preview")
|
||||
@Operation(summary = "预览文件")
|
||||
@Operation(summary = "预览文件 TODO")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:preview')")
|
||||
public void preview() {
|
||||
}
|
||||
|
||||
// TODO
|
||||
@PostMapping("/complete")
|
||||
@Operation(summary = "完结")
|
||||
@Operation(summary = "完结 TODO")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:complete')")
|
||||
public void complete() {
|
||||
}
|
||||
|
||||
// TODO
|
||||
@PostMapping("/archive")
|
||||
@Operation(summary = "归档")
|
||||
@Operation(summary = "归档 TODO")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:archive')")
|
||||
public void archive() {
|
||||
}
|
||||
@@ -135,7 +135,7 @@ public class ContractController implements BusinessControllerMarker {
|
||||
|
||||
// TODO
|
||||
@PostMapping("/approval")
|
||||
@Operation(summary = "合同审批")
|
||||
@Operation(summary = "合同审批 TODO")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:approval')")
|
||||
public CommonResult<String> approval(@Valid @RequestBody ApprovalReqVO reqVO) {
|
||||
return success(contractService.approval(reqVO));
|
||||
@@ -143,7 +143,7 @@ public class ContractController implements BusinessControllerMarker {
|
||||
|
||||
// TODO
|
||||
@PostMapping("/view/approval")
|
||||
@Operation(summary = "查看审批")
|
||||
@Operation(summary = "查看审批 TODO")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:approval')")
|
||||
public void viewApproval() {
|
||||
}
|
||||
@@ -154,4 +154,39 @@ public class ContractController implements BusinessControllerMarker {
|
||||
public CommonResult<List<String>> submitErp(@RequestBody List<Long> ids) {
|
||||
return success(contractService.submitErp(ids));
|
||||
}
|
||||
|
||||
@GetMapping("/list/up-not-relation")
|
||||
@Operation(summary = "获得上游未关联合同列表")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:relation')")
|
||||
public CommonResult<List<ContractRespVO>> getListUpNotRelation(@RequestParam("id") Long id) {
|
||||
return success(contractService.getListUpNotRelation(id));
|
||||
}
|
||||
|
||||
@GetMapping("/list/down-not-relation")
|
||||
@Operation(summary = "获得下游未关联合同列表")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:relation')")
|
||||
public CommonResult<List<ContractRespVO>> getListDownNotRelation(@RequestParam("id") Long id) {
|
||||
return success(contractService.getListDownNotRelation(id));
|
||||
}
|
||||
|
||||
@GetMapping("/get/up-relation")
|
||||
@Operation(summary = "获得上游关联的合同数据")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:relation')")
|
||||
public CommonResult<ContractRespVO> getUpRelation(@RequestParam("id") Long id) {
|
||||
return success(contractService.getUpRelation(id));
|
||||
}
|
||||
|
||||
@GetMapping("/get/down-relation")
|
||||
@Operation(summary = "获得下游关联的合同数据")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:relation')")
|
||||
public CommonResult<ContractRespVO> getDownRelation(@RequestParam("id") Long id) {
|
||||
return success(contractService.getDownRelation(id));
|
||||
}
|
||||
|
||||
@PostMapping("/relation")
|
||||
@Operation(summary = "关联合同")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:relation')")
|
||||
public CommonResult<Boolean> relation(@RequestBody RelationReqVo reqVo) {
|
||||
return success(contractService.relation(reqVo));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||
|
||||
import cn.hutool.json.JSONArray;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceDataSaveReqVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -34,7 +35,7 @@ public class ContractSaveReqVO {
|
||||
private String fileObject;
|
||||
|
||||
@Schema(description = "其它附件对象存储")
|
||||
private String fileObjectOther;
|
||||
private JSONArray fileObjectOther;
|
||||
|
||||
// 合同基本信息
|
||||
@Schema(description = "甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。", example = "甲方公司编号")
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 合同关联请求对象 Request VO")
|
||||
@Data
|
||||
public class RelationReqVo {
|
||||
|
||||
@Schema(description = "上游主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "上游主键不能为空")
|
||||
private Long upId;
|
||||
|
||||
@Schema(description = "下游主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "下游主键不能为空")
|
||||
private Long downId;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.zt.plat.module.contractorder.dal.dataobject.contract;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 业务关联 DO
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
@TableName("bse_sys_rel")
|
||||
@KeySequence("bse_sys_rel_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class SystemRelativityDO extends BusinessBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 上游主键
|
||||
*/
|
||||
@TableField("UP_ID")
|
||||
private Long upId;
|
||||
/**
|
||||
* 下游主键
|
||||
*/
|
||||
@TableField("DOWN_ID")
|
||||
private Long downId;
|
||||
/**
|
||||
* 方式系统;内关联/系统外关联
|
||||
*/
|
||||
@TableField("WY")
|
||||
private String way;
|
||||
/**
|
||||
* 类型;合同/订单
|
||||
*/
|
||||
@TableField("STS")
|
||||
private String status;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.SystemRelativityDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 业务关联 Mapper
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
@Mapper
|
||||
public interface SystemRelativityMapper extends BaseMapperX<SystemRelativityDO> {
|
||||
}
|
||||
@@ -119,4 +119,44 @@ public interface ContractService {
|
||||
* @return 合同信息
|
||||
*/
|
||||
ContractRespVO getBySystemContractNumber(String systemContractNumber);
|
||||
|
||||
/**
|
||||
* 获得上游未关联合同列表
|
||||
*
|
||||
* @param id 合同ID
|
||||
* @return 上游未关联的合同列表
|
||||
*/
|
||||
List<ContractRespVO> getListUpNotRelation(Long id);
|
||||
|
||||
/**
|
||||
* 获得下游未关联合同列表
|
||||
*
|
||||
* @param id 合同ID
|
||||
* @return 下游未关联的合同列表
|
||||
*/
|
||||
List<ContractRespVO> getListDownNotRelation(Long id);
|
||||
|
||||
/**
|
||||
* 获得上游关联的合同数据
|
||||
*
|
||||
* @param id 合同ID
|
||||
* @return 关联的上游合同数据
|
||||
*/
|
||||
ContractRespVO getUpRelation(Long id);
|
||||
|
||||
/**
|
||||
* 获得下游关联的合同数据
|
||||
*
|
||||
* @param id 合同ID
|
||||
* @return 关联的下游合同数据
|
||||
*/
|
||||
ContractRespVO getDownRelation(Long id);
|
||||
|
||||
/**
|
||||
* 关联合同
|
||||
*
|
||||
* @param reqVo 上下游合同ID
|
||||
* @return 关联结果
|
||||
*/
|
||||
Boolean relation(RelationReqVo reqVo);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user