模版修改

This commit is contained in:
潘荣晟
2025-11-11 11:52:35 +08:00
parent 886283cdf8
commit ddfc7d8965
21 changed files with 229 additions and 33 deletions

View File

@@ -120,4 +120,19 @@ public class TmplInscBsnRelController implements BusinessControllerMarker {
BeanUtils.toBean(list, TmplInscBsnRelRespVO.class));
}
@GetMapping("/value-info")
@Operation(summary = "根据合Id和实例Id获取字段和条款")
@PreAuthorize("@ss.hasPermission('base:tmpl-insc-bsn-rel:query')")
public CommonResult<Map<String, Object>> valueInfo(@RequestParam("cttId") @Valid @NotEmpty(message = "合同Id不能为空") String cttId, @RequestParam("inscId") @Valid @NotEmpty(message = "模版实例id不能为空") String inscId) {
return success(tmplInscBsnRelService.valueInfo(cttId, inscId));
}
@GetMapping("/bsn-info")
@Operation(summary = "根据合id和实例id获取中间表")
@PreAuthorize("@ss.hasPermission('base:tmpl-insc-bsn-rel:query')")
public CommonResult<TmplInscBsnRelRespVO> bseInfo(@RequestParam("cttId") @Valid @NotEmpty(message = "合同Id不能为空") String cttId, @RequestParam("inscId") @Valid @NotEmpty(message = "模版实例id不能为空") String inscId) {
return success(tmplInscBsnRelService.bseInfo(cttId, inscId));
}
}

View File

@@ -5,6 +5,8 @@ import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.base.controller.admin.templtp.onlyoffice.pojo.Action;
import com.zt.plat.module.base.controller.admin.templtp.onlyoffice.pojo.History;
import com.zt.plat.module.base.controller.admin.templtp.onlyoffice.pojo.OnlyOfficeCallback;
import com.zt.plat.module.base.dal.dataobject.tmpltp.TmplInscBsnRelDO;
import com.zt.plat.module.base.dal.mysql.tmpltp.TmplInscBsnRelMapper;
import com.zt.plat.module.base.service.tmpltp.TemplateInstanceService;
import com.zt.plat.module.infra.api.file.FileApi;
import com.zt.plat.module.infra.api.file.dto.FileCreateReqDTO;
@@ -29,7 +31,7 @@ import static com.zt.plat.module.base.controller.admin.templtp.onlyoffice.util.U
public class OnlyOfficeCallbackServiceImpl implements OnlyOfficeCallbackService {
private final FileApi fileApi;
private final TemplateInstanceService templateInstanceService;
private final TmplInscBsnRelMapper tmplInscBsnRelMapper;
@Override
public void processCallback(OnlyOfficeCallback callback, String id,String fileName) {
log.info("收到OnlyOffice文档回调: {}", callback.getKey());
@@ -354,7 +356,10 @@ public class OnlyOfficeCallbackServiceImpl implements OnlyOfficeCallbackService
fileInfo.put("name", fileRespDTO.getName());
fileInfo.put("directory", fileRespDTO.getDirectory());
fileInfo.put("key", callback.getKey());
templateInstanceService.updateTemplateInstanceFileUrlByInstanceId(id, JSONObject.toJSONString(fileInfo));
TmplInscBsnRelDO createReqVO = new TmplInscBsnRelDO();
createReqVO.setId(Long.valueOf(id));
createReqVO.setCntt(JSONObject.toJSONString(fileInfo));
tmplInscBsnRelMapper.updateById(createReqVO);
} else {
// 创建文件失败,处理错误
log.error("文件创建失败,错误信息:{}", result.getMsg());

View File

@@ -8,7 +8,7 @@ import java.util.List;
@Schema(description = "管理后台 - 合同动态表单 响应 VO")
@Data
public class FieldAndClauseRespVO {
@Schema(description = "模板分类")
@Schema(description = "模板字段")
List<TmplFldRespVO> tmplFldRespVOS;
@Schema(description = "条款")
List<TmplItmRespVO> tmplItmRespVOS;

View File

@@ -70,9 +70,22 @@ public interface TmplInscBsnRelService {
void getTmplInscBsnRelDetails(TmplInscBsnRelRespVO tmplInscBsnRelRespVO);
/**
* 新cntt
* 新cntt
*
* @param bsnId ,params
*/
void updateCntt(Long bsnId,String params);
/**
* 获取字段和条款
*
* @param cttId ,inscId
*/
Map<String,Object> valueInfo(String cttId,String inscId);
/**
* 获取中间表
*
* @param cttId ,inscId
*/
TmplInscBsnRelRespVO bseInfo(String cttId,String inscId);
}

View File

@@ -69,5 +69,12 @@ public interface TmplInscDatBsnService {
*
*/
void deleteTmplInscDatBsnListByBsnIds(@Valid @NotEmpty(message = "业务编号不能为空") List<String> ids);
/**
* 通过业务id查询业务字段
*
* @param id 业务id
*
*/
List<TmplInscDatBsnRespVO> getTmplInscDatBsnListByBsnId(@Valid @NotEmpty(message = "业务编号不能为空") String id);
}

View File

@@ -24,6 +24,7 @@ import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.e
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList;
import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList;
import static com.zt.plat.module.base.enums.ErrorCodeConstants.*;
import static com.zt.plat.module.tmpltp.enums.ErrorCodeConstants.TMPL_INSC_DAT_BSN_EXISTS;
import static com.zt.plat.module.tmpltp.enums.ErrorCodeConstants.TMPL_INSC_DAT_BSN_NOT_EXISTS;
/**
@@ -40,12 +41,20 @@ public class TmplInscDatBsnServiceImpl implements TmplInscDatBsnService {
@Override
public TmplInscDatBsnRespVO createTmplInscDatBsn(TmplInscDatBsnSaveReqVO createReqVO) {
//判断存在
validateTmplInscDatBsnExistsByKey(createReqVO);
// 插入
TmplInscDatBsnDO tmplInscDatBsn = BeanUtils.toBean(createReqVO, TmplInscDatBsnDO.class);
tmplInscDatBsnMapper.insert(tmplInscDatBsn);
// 返回
return BeanUtils.toBean(tmplInscDatBsn, TmplInscDatBsnRespVO.class);
}
private void validateTmplInscDatBsnExistsByKey(TmplInscDatBsnSaveReqVO createReqVO) {
List<TmplInscDatBsnDO> tmplInscDatBsnDOS = tmplInscDatBsnMapper.selectList(TmplInscDatBsnDO::getInscFldId, createReqVO.getInscFldId());
if (!tmplInscDatBsnDOS.isEmpty()) {
throw exception(TMPL_INSC_DAT_BSN_EXISTS);
}
}
@Override
public void updateTmplInscDatBsn(TmplInscDatBsnSaveReqVO updateReqVO) {
@@ -101,4 +110,10 @@ public class TmplInscDatBsnServiceImpl implements TmplInscDatBsnService {
tmplInscDatBsnMapper.update(new LambdaUpdateWrapper<TmplInscDatBsnDO>().in(TmplInscDatBsnDO::getBsnId, ids).set(TmplInscDatBsnDO::getDeleted, 1));
}
@Override
public List<TmplInscDatBsnRespVO> getTmplInscDatBsnListByBsnId(String id) {
List<TmplInscDatBsnDO> tmplInscDatBsnDOS = tmplInscDatBsnMapper.selectList(TmplInscDatBsnDO::getBsnId, id);
return BeanUtils.toBean(tmplInscDatBsnDOS, TmplInscDatBsnRespVO.class);
}
}

View File

@@ -67,5 +67,12 @@ public interface TmplInscItmBsnService {
* @param ids 编号
*/
void deleteTmplInscDatBsnListByBsnIds(@Valid @NotEmpty(message = "业务编号不能为空") List<String> ids);
/**
* 获取条款值列表
*
* @param bsnId 业务编号
* @return TmplInscItmBsnRespVO
*/
List<TmplInscItmBsnRespVO> getTmplInscItmBsnList(@Valid @NotEmpty(message = "创建信息不能为空")String bsnId);
}

View File

@@ -12,6 +12,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import com.zt.plat.module.base.controller.admin.templtp.vo.*;
import com.zt.plat.framework.common.pojo.PageResult;
@@ -19,11 +20,11 @@ import com.zt.plat.framework.common.pojo.PageParam;
import com.zt.plat.framework.common.util.object.BeanUtils;
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.zt.plat.framework.common.util.collection.CollectionUtils.convertList;
import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList;
import static com.zt.plat.module.base.enums.ErrorCodeConstants.*;
import static com.zt.plat.module.tmpltp.enums.ErrorCodeConstants.TMPL_INSC_ITM_BSN_EXISTS;
import static com.zt.plat.module.tmpltp.enums.ErrorCodeConstants.TMPL_INSC_ITM_BSN_NOT_EXISTS;
/**
@@ -40,6 +41,8 @@ public class TmplInscItmBsnServiceImpl implements TmplInscItmBsnService {
@Override
public TmplInscItmBsnRespVO createTmplInscItmBsn(TmplInscItmBsnSaveReqVO createReqVO) {
//校验存在
validateTmplInscItmBsnExistsByKey(createReqVO);
// 插入
TmplInscItmBsnDO tmplInscItmBsn = BeanUtils.toBean(createReqVO, TmplInscItmBsnDO.class);
tmplInscItmBsnMapper.insert(tmplInscItmBsn);
@@ -47,6 +50,13 @@ public class TmplInscItmBsnServiceImpl implements TmplInscItmBsnService {
return BeanUtils.toBean(tmplInscItmBsn, TmplInscItmBsnRespVO.class);
}
void validateTmplInscItmBsnExistsByKey(TmplInscItmBsnSaveReqVO createReqVO) {
List<TmplInscItmBsnDO> tmplInscItmBsnDOS = tmplInscItmBsnMapper.selectList(TmplInscItmBsnDO::getBsnId, createReqVO.getBsnId(), TmplInscItmBsnDO::getInscItmId, createReqVO.getBsnId());
if (!tmplInscItmBsnDOS.isEmpty()){
throw exception(TMPL_INSC_ITM_BSN_EXISTS);
}
}
@Override
public void updateTmplInscItmBsn(TmplInscItmBsnSaveReqVO updateReqVO) {
// 校验存在
@@ -101,4 +111,10 @@ public class TmplInscItmBsnServiceImpl implements TmplInscItmBsnService {
tmplInscItmBsnMapper.update(new LambdaUpdateWrapper<TmplInscItmBsnDO>().in(TmplInscItmBsnDO::getBsnId, ids).set(TmplInscItmBsnDO::getDeleted, 1));
}
@Override
public List<TmplInscItmBsnRespVO> getTmplInscItmBsnList(String bsnId) {
List<TmplInscItmBsnDO> tmplInscItmBsnDOS = tmplInscItmBsnMapper.selectList(TmplInscItmBsnDO::getBsnId, bsnId);
return BeanUtils.toBean(tmplInscItmBsnDOS, TmplInscItmBsnRespVO.class);
}
}

View File

@@ -283,6 +283,11 @@ public class OrderDTO {
*/
@TableField("PYER_NUM")
private String payerNum;
/**
* 货权准转移类型
*/
private String meteringType;
/**
* 订单明细

Some files were not shown because too many files have changed in this diff Show More