修改
This commit is contained in:
@@ -9,6 +9,8 @@ import com.nbport.zgwl.contractlaunch.dto.ContractLaunchQueryDto;
|
||||
import com.nbport.zgwl.contractlaunch.dto.ContractLaunchSealDto;
|
||||
import com.nbport.zgwl.contractlaunch.service.ContractLaunchService;
|
||||
import com.nbport.zgwl.contractlaunch.utils.ContractLaunchConstants;
|
||||
import com.nbport.zgwl.entity.SysUserEntity;
|
||||
import com.nbport.zgwl.utils.AdminSecurityManage;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -39,6 +41,7 @@ import java.util.Map;
|
||||
public class ContractLaunchController {
|
||||
|
||||
private final ContractLaunchService contractLaunchService;
|
||||
private final AdminSecurityManage adminSecurityManage;
|
||||
|
||||
/**
|
||||
* 分页查询合同列表。
|
||||
@@ -73,6 +76,19 @@ public class ContractLaunchController {
|
||||
return R.success(contractLaunchService.getDetail(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登录人的我方组织信息(当前先返回 mock 数据)。
|
||||
*
|
||||
* 用途:
|
||||
* 1. 发起合同页面只读展示“我方”信息
|
||||
* 2. 后续接入真实组织主数据时,前端不需要再改字段来源
|
||||
*/
|
||||
@GetMapping("/self-profile")
|
||||
public R<Object> getSelfProfile() {
|
||||
SysUserEntity currentUser = adminSecurityManage.getUser();
|
||||
return R.success(currentUser == null ? null : currentUser.getSysOrgEntity());
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建合同草稿。
|
||||
*
|
||||
|
||||
@@ -101,12 +101,12 @@ public class ContractLaunchDto implements Serializable {
|
||||
/** 期限说明(无固定期限时必填) */
|
||||
private String periodExplain;
|
||||
|
||||
/** 合同开始日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
/** 合同开始日期(前端保存时传 yyyy-MM-dd HH:mm:ss) */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime effectiveStart;
|
||||
|
||||
/** 合同结束日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
/** 合同结束日期(前端保存时传 yyyy-MM-dd HH:mm:ss) */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime effectiveEnd;
|
||||
|
||||
/** 付款方式 */
|
||||
@@ -234,6 +234,13 @@ public class ContractLaunchDto implements Serializable {
|
||||
/** 正文/摘要 */
|
||||
private String bodySummary;
|
||||
|
||||
/**
|
||||
* 模板字段值 JSON。
|
||||
* 例如:{"contractName":"xx","businessRemark":"xx"}
|
||||
* 这里用字符串存,方便后续新增字段时不用改表结构。
|
||||
*/
|
||||
private String templateFieldValuesJson;
|
||||
|
||||
// ==================== 文件信息 ====================
|
||||
|
||||
/** 合同正文文件名 */
|
||||
|
||||
@@ -643,6 +643,7 @@ public class ContractLaunchServiceImpl implements ContractLaunchService {
|
||||
contract.setPeriodExplain(trim(contract.getPeriodExplain()));
|
||||
contract.setContractGistRemark(trim(contract.getContractGistRemark()));
|
||||
contract.setBodySummary(trim(contract.getBodySummary()));
|
||||
contract.setTemplateFieldValuesJson(trim(contract.getTemplateFieldValuesJson()));
|
||||
contract.setSigningSubjectCode(trim(contract.getSigningSubjectCode()));
|
||||
contract.setDateType(trim(contract.getDateType()));
|
||||
contract.setPushUrl(trim(contract.getPushUrl()));
|
||||
|
||||
@@ -38,7 +38,7 @@ public class MinioFileController {
|
||||
MultipartFile file = fileMap.values().iterator().next();
|
||||
log.info("接收到上传文件请求,fileName={}", file.getOriginalFilename());
|
||||
String relativePath = localFileService.upload(file);
|
||||
return R.success(relativePath);
|
||||
return R.data(relativePath);
|
||||
}
|
||||
|
||||
@GetMapping("/download")
|
||||
|
||||
@@ -4,6 +4,8 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组织信息
|
||||
@@ -22,4 +24,31 @@ public class SysOrgEntity implements Serializable {
|
||||
|
||||
/** 组织名称 */
|
||||
private String orgName;
|
||||
|
||||
/** 联系电话 */
|
||||
private String contactPhone;
|
||||
|
||||
/** 电子邮箱 */
|
||||
private String contactEmail;
|
||||
|
||||
/** 通讯地址 */
|
||||
private String contactAddress;
|
||||
|
||||
/** 注册地址 */
|
||||
private String registeredAddress;
|
||||
|
||||
/** 开户银行 */
|
||||
private String bankName;
|
||||
|
||||
/** 银行账号 */
|
||||
private String bankAccount;
|
||||
|
||||
/** 法定代表人 */
|
||||
private String legalRepresentative;
|
||||
|
||||
/** 统一社会信用代码 */
|
||||
private String creditCode;
|
||||
|
||||
/** 备选开票抬头 */
|
||||
private List<String> invoiceTitleOptions = new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -18,6 +18,15 @@ public class AdminSecurityManage {
|
||||
SysOrgEntity orgEntity = new SysOrgEntity();
|
||||
orgEntity.setId("ORG001");
|
||||
orgEntity.setOrgName("浙港物流平台有限公司");
|
||||
orgEntity.setContactPhone("13800000000");
|
||||
orgEntity.setContactEmail("admin@test.com");
|
||||
orgEntity.setContactAddress("宁波市北仑区明州路288号");
|
||||
orgEntity.setRegisteredAddress("宁波市北仑区明州路288号");
|
||||
orgEntity.setBankName("中国工商银行宁波分行");
|
||||
orgEntity.setBankAccount("330201000000000001");
|
||||
orgEntity.setLegalRepresentative("张三");
|
||||
orgEntity.setCreditCode("91330200MAZGWL0001");
|
||||
orgEntity.setInvoiceTitleOptions(java.util.List.of("浙港物流平台有限公司"));
|
||||
|
||||
SysUserEntity user = new SysUserEntity();
|
||||
user.setId(1L);
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
<result property="yfkAmount" column="YFK_AMOUNT"/>
|
||||
<result property="bzjAmount" column="BZJ_AMOUNT"/>
|
||||
<result property="bodySummary" column="BODY_SUMMARY"/>
|
||||
<result property="templateFieldValuesJson" column="TEMPLATE_FIELD_VALUES_JSON"/>
|
||||
<result property="contractTextFileName" column="CONTRACT_TEXT_FILE_NAME"/>
|
||||
<result property="contractTextFilePath" column="CONTRACT_TEXT_FILE_PATH"/>
|
||||
<result property="contractTextFileType" column="CONTRACT_TEXT_FILE_TYPE"/>
|
||||
@@ -185,19 +186,19 @@
|
||||
from SEAL_CONTRACT_LAUNCH_MAIN
|
||||
</sql>
|
||||
|
||||
<select id="selectMainSeqNextVal" resultType="java.lang.Long">
|
||||
<select id="selectMainSeqNextVal" resultType="java.lang.Long" useCache="false" flushCache="true">
|
||||
select SEQ_SEAL_CONTRACT_LAUNCH_MAIN.NEXTVAL from dual
|
||||
</select>
|
||||
<select id="selectPartySeqNextVal" resultType="java.lang.Long">
|
||||
<select id="selectPartySeqNextVal" resultType="java.lang.Long" useCache="false" flushCache="true">
|
||||
select SEQ_SEAL_CONTRACT_LAUNCH_PARTY.NEXTVAL from dual
|
||||
</select>
|
||||
<select id="selectFileSeqNextVal" resultType="java.lang.Long">
|
||||
<select id="selectFileSeqNextVal" resultType="java.lang.Long" useCache="false" flushCache="true">
|
||||
select SEQ_SEAL_CONTRACT_LAUNCH_FILE.NEXTVAL from dual
|
||||
</select>
|
||||
<select id="selectPlanSeqNextVal" resultType="java.lang.Long">
|
||||
<select id="selectPlanSeqNextVal" resultType="java.lang.Long" useCache="false" flushCache="true">
|
||||
select SEQ_SEAL_CONTRACT_LAUNCH_PLAN.NEXTVAL from dual
|
||||
</select>
|
||||
<select id="selectLogSeqNextVal" resultType="java.lang.Long">
|
||||
<select id="selectLogSeqNextVal" resultType="java.lang.Long" useCache="false" flushCache="true">
|
||||
select SEQ_SEAL_CONTRACT_LAUNCH_LOG.NEXTVAL from dual
|
||||
</select>
|
||||
|
||||
@@ -253,6 +254,7 @@
|
||||
CONTRACT_NATURE, IS_SGAT, IS_NORMAL, IS_TERMINATED, IS_SINGLE_AGREEMENT,
|
||||
BIDDING_NO, OPEN_BIDDING_REMARK, CONTRACT_GIST_REMARK,
|
||||
EW_AMOUNT_TYPE, DJ_AMOUNT, YJ_AMOUNT, YFK_AMOUNT, BZJ_AMOUNT, BODY_SUMMARY,
|
||||
TEMPLATE_FIELD_VALUES_JSON,
|
||||
CONTRACT_TEXT_FILE_NAME, CONTRACT_TEXT_FILE_PATH, CONTRACT_TEXT_FILE_TYPE, CONTRACT_TEXT_FILE_SIZE,
|
||||
SIGNED_FILE_NAME, SIGNED_FILE_PATH, SIGNED_FILE_TYPE, SIGNED_FILE_SIZE, SIGNED_OFFLINE_REASON,
|
||||
SIGN_DATE, ACTIVE_DATE, ARCHIVE_DATE, ARCHIVE_KEEPER, ARCHIVE_KEEPER_UNIT,
|
||||
@@ -272,6 +274,7 @@
|
||||
#{contractNature}, #{isSgat}, #{isNormal}, #{isTerminated}, #{isSingleAgreement},
|
||||
#{biddingNo}, #{openBiddingRemark}, #{contractGistRemark},
|
||||
#{ewAmountType}, #{djAmount}, #{yjAmount}, #{yfkAmount}, #{bzjAmount}, #{bodySummary},
|
||||
#{templateFieldValuesJson},
|
||||
#{contractTextFileName}, #{contractTextFilePath}, #{contractTextFileType}, #{contractTextFileSize},
|
||||
#{signedFileName}, #{signedFilePath}, #{signedFileType}, #{signedFileSize}, #{signedOfflineReason},
|
||||
#{signDate}, #{activeDate}, #{archiveDate}, #{archiveKeeper}, #{archiveKeeperUnit},
|
||||
@@ -342,6 +345,7 @@
|
||||
YFK_AMOUNT = #{yfkAmount},
|
||||
BZJ_AMOUNT = #{bzjAmount},
|
||||
BODY_SUMMARY = #{bodySummary},
|
||||
TEMPLATE_FIELD_VALUES_JSON = #{templateFieldValuesJson},
|
||||
CONTRACT_TEXT_FILE_NAME = #{contractTextFileName},
|
||||
CONTRACT_TEXT_FILE_PATH = #{contractTextFilePath},
|
||||
CONTRACT_TEXT_FILE_TYPE = #{contractTextFileType},
|
||||
|
||||
Reference in New Issue
Block a user