模版修改

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)); 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.Action;
import com.zt.plat.module.base.controller.admin.templtp.onlyoffice.pojo.History; 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.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.base.service.tmpltp.TemplateInstanceService;
import com.zt.plat.module.infra.api.file.FileApi; import com.zt.plat.module.infra.api.file.FileApi;
import com.zt.plat.module.infra.api.file.dto.FileCreateReqDTO; 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 { public class OnlyOfficeCallbackServiceImpl implements OnlyOfficeCallbackService {
private final FileApi fileApi; private final FileApi fileApi;
private final TemplateInstanceService templateInstanceService; private final TemplateInstanceService templateInstanceService;
private final TmplInscBsnRelMapper tmplInscBsnRelMapper;
@Override @Override
public void processCallback(OnlyOfficeCallback callback, String id,String fileName) { public void processCallback(OnlyOfficeCallback callback, String id,String fileName) {
log.info("收到OnlyOffice文档回调: {}", callback.getKey()); log.info("收到OnlyOffice文档回调: {}", callback.getKey());
@@ -354,7 +356,10 @@ public class OnlyOfficeCallbackServiceImpl implements OnlyOfficeCallbackService
fileInfo.put("name", fileRespDTO.getName()); fileInfo.put("name", fileRespDTO.getName());
fileInfo.put("directory", fileRespDTO.getDirectory()); fileInfo.put("directory", fileRespDTO.getDirectory());
fileInfo.put("key", callback.getKey()); 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 { } else {
// 创建文件失败,处理错误 // 创建文件失败,处理错误
log.error("文件创建失败,错误信息:{}", result.getMsg()); log.error("文件创建失败,错误信息:{}", result.getMsg());

View File

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

View File

@@ -70,9 +70,22 @@ public interface TmplInscBsnRelService {
void getTmplInscBsnRelDetails(TmplInscBsnRelRespVO tmplInscBsnRelRespVO); void getTmplInscBsnRelDetails(TmplInscBsnRelRespVO tmplInscBsnRelRespVO);
/** /**
* 新cntt * 新cntt
* *
* @param bsnId ,params * @param bsnId ,params
*/ */
void updateCntt(Long bsnId,String 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

@@ -23,10 +23,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import java.util.HashMap; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception; import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.zt.plat.module.infra.enums.ErrorCodeConstants.FILE_NOT_EXISTS; import static com.zt.plat.module.infra.enums.ErrorCodeConstants.FILE_NOT_EXISTS;
@@ -47,32 +44,37 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
private TmplInscBsnRelMapper tmplInscBsnRelMapper; private TmplInscBsnRelMapper tmplInscBsnRelMapper;
@Resource @Resource
private TemplateInstanceService templateInstanceService; private TemplateInstanceService templateInstanceService;
@Resource
private TmplInscDatBsnService tmplInscDatBsnService; private TmplInscDatBsnService tmplInscDatBsnService;
@Resource @Resource
private TmplInscItmBsnService tmplInscItmBsnService; private TmplInscItmBsnService tmplInscItmBsnService;
@Override @Override
@Transactional(rollbackFor = Exception.class)
public TmplInscBsnRelRespVO createTmplInscBsnRel(TmplInscBsnRelSaveReqVO createReqVO) { public TmplInscBsnRelRespVO createTmplInscBsnRel(TmplInscBsnRelSaveReqVO createReqVO) {
TemplateInstanceRespVO templateInstance = templateInstanceService.getTemplateInstance(createReqVO.getInscId()); // TemplateInstanceRespVO templateInstance = templateInstanceService.getTemplateInstance(createReqVO.getInscId());
if (templateInstance == null) { // if (templateInstance == null) {
throw exception(TEMPLATE_INSTANCE_NOT_EXISTS); // throw exception(TEMPLATE_INSTANCE_NOT_EXISTS);
} // }
String type = "cntt"; // String type = "cntt";
if (templateInstance.getCntt().isEmpty() && templateInstance.getOrigCntt().isEmpty()) { // if (templateInstance.getCntt().isEmpty() && templateInstance.getOrigCntt().isEmpty()) {
throw exception(TEMPLATE_INSTANCE_FILE_NOT_EXISTS); // throw exception(TEMPLATE_INSTANCE_FILE_NOT_EXISTS);
} // }
if (templateInstance.getCntt().isEmpty()) { // if (templateInstance.getCntt().isEmpty()) {
type = "origCntt"; // type = "origCntt";
} // }
//下载文件并且上传文件 // //下载文件并且上传文件
fileUpload(createReqVO, templateInstance, type); // fileUpload(createReqVO, templateInstance, type);
// 插入 // 插入
TmplInscBsnRelDO tmplInscBsnRel = BeanUtils.toBean(createReqVO, TmplInscBsnRelDO.class); TmplInscBsnRelDO tmplInscBsnRel = BeanUtils.toBean(createReqVO, TmplInscBsnRelDO.class);
// tmplInscBsnRel.setBsnId(Long.valueOf(createReqVO.getUuid()));
tmplInscBsnRelMapper.insert(tmplInscBsnRel); tmplInscBsnRelMapper.insert(tmplInscBsnRel);
// 返回 // 返回
return BeanUtils.toBean(tmplInscBsnRel, TmplInscBsnRelRespVO.class); return BeanUtils.toBean(tmplInscBsnRel, TmplInscBsnRelRespVO.class);
} }
@Override @Override
public void updateTmplInscBsnRel(TmplInscBsnRelSaveReqVO updateReqVO) { public void updateTmplInscBsnRel(TmplInscBsnRelSaveReqVO updateReqVO) {
// 校验存在 // 校验存在
@@ -83,7 +85,7 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
} }
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public void deleteTmplInscBsnRel(Long id) { public void deleteTmplInscBsnRel(Long id) {
// 校验存在 // 校验存在
validateTmplInscBsnRelExists(id); validateTmplInscBsnRelExists(id);
@@ -92,11 +94,10 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
} }
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public void deleteTmplInscBsnRelListByIds(List<Long> ids) { public void deleteTmplInscBsnRelListByIds(List<Long> ids) {
// 校验存在 // 校验存在
validateTmplInscBsnRelExists(ids); validateTmplInscBsnRelExists(ids);
// 删除
//删除业务实例字段值 //删除业务实例字段值
deleteFldOrItmByIds(tmplInscBsnRelMapper.selectByIds(ids).stream().map(TmplInscBsnRelDO::getBsnId).map(String::valueOf).toList(), tmplInscDatBsnService); deleteFldOrItmByIds(tmplInscBsnRelMapper.selectByIds(ids).stream().map(TmplInscBsnRelDO::getBsnId).map(String::valueOf).toList(), tmplInscDatBsnService);
//删除业务实例字段值 //删除业务实例字段值
@@ -154,11 +155,12 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
throw exception(TEMPLATE_INSTANCE_FILE_NOT_EXISTS); throw exception(TEMPLATE_INSTANCE_FILE_NOT_EXISTS);
} }
TmplInscBsnRelDO tmplInscBsnRelDO = tmplInscBsnRelDOS.get(0); TmplInscBsnRelDO tmplInscBsnRelDO = tmplInscBsnRelDOS.get(0);
tmplInscBsnRelDO.setCntt( params); tmplInscBsnRelDO.setCntt(params);
tmplInscBsnRelMapper.updateById(tmplInscBsnRelDO); tmplInscBsnRelMapper.updateById(tmplInscBsnRelDO);
log.info("更新业务实例cntt字段值成功"); log.info("更新业务实例cntt字段值成功");
} }
//业务条款 //业务条款
private List<TmplInscItmBsnRespVO> setTmplInscItmBsnRespVOS(TmplInscBsnRelRespVO tmplInscBsnRelRespVO) { private List<TmplInscItmBsnRespVO> setTmplInscItmBsnRespVOS(TmplInscBsnRelRespVO tmplInscBsnRelRespVO) {
List<TmplInscItmBsnRespVO> tmplInscItmBsnRespVOS = BeanUtils.toBean(SpringUtil.getBean(TmplInscItmBsnMapper.class).selectList(new LambdaQueryWrapper<TmplInscItmBsnDO>() List<TmplInscItmBsnRespVO> tmplInscItmBsnRespVOS = BeanUtils.toBean(SpringUtil.getBean(TmplInscItmBsnMapper.class).selectList(new LambdaQueryWrapper<TmplInscItmBsnDO>()
@@ -288,5 +290,69 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
} }
} }
@Override
public Map<String, Object> valueInfo(String cttId, String inscId) {
// 1、通过实例和合同Id获取业务
TmplInscBsnRelDO tmplInscBsnRelDO = tmplInscBsnRelMapper.selectOne(
TmplInscBsnRelDO::getBsnId, cttId,
TmplInscBsnRelDO::getInscId, inscId
);
if (tmplInscBsnRelDO == null) {
throw exception(TMPL_INSC_BSN_REL_NOT_EXISTS);
}
List<ValueInfo> valueInfoS = new ArrayList<>();
// 2、获取绑定的字段
List<TmplInscDatBsnRespVO> tmplInscDatBsnList = tmplInscDatBsnService
.getTmplInscDatBsnListByBsnId(String.valueOf(tmplInscBsnRelDO.getBsnId()));
Optional.ofNullable(tmplInscDatBsnList)
.ifPresent(list -> list.forEach(tmplInscDatBsnRespVO -> {
ValueInfo valueInfo = new ValueInfo(
tmplInscDatBsnRespVO.getId(),
tmplInscDatBsnRespVO.getFldKy(),
tmplInscDatBsnRespVO.getFldVal(),
"field",
tmplInscDatBsnRespVO.getInscFldId()
);
valueInfoS.add(valueInfo);
}));
// 3、获取条款
List<TmplInscItmBsnRespVO> tmplInscItmBsnList = tmplInscItmBsnService.getTmplInscItmBsnList(String.valueOf(tmplInscBsnRelDO.getBsnId()));
Optional.ofNullable(tmplInscItmBsnList)
.ifPresent(list -> list.forEach(tmplInscItmBsnRespVO -> {
ValueInfo valueInfo = new ValueInfo(
tmplInscItmBsnRespVO.getId(),
tmplInscItmBsnRespVO.getItmName(),
tmplInscItmBsnRespVO.getVal(),
"item",
tmplInscItmBsnRespVO.getItmId()
);
valueInfoS.add(valueInfo);
}));
return Map.of("data", valueInfoS, "id", tmplInscBsnRelDO.getId());
}
@Override
public TmplInscBsnRelRespVO bseInfo(String cttId, String inscId) {
TmplInscBsnRelDO tmplInscBsnRelDO = tmplInscBsnRelMapper.selectOne(
TmplInscBsnRelDO::getBsnId, cttId,
TmplInscBsnRelDO::getInscId, inscId
);
return BeanUtils.toBean(tmplInscBsnRelDO, TmplInscBsnRelRespVO.class);
}
private record ValueInfo(
String id,
String label,
String value,
String type,
String codeNumber
) {
}
} }

View File

@@ -69,5 +69,12 @@ public interface TmplInscDatBsnService {
* *
*/ */
void deleteTmplInscDatBsnListByBsnIds(@Valid @NotEmpty(message = "业务编号不能为空") List<String> ids); 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.convertList;
import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList; 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.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; 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 @Override
public TmplInscDatBsnRespVO createTmplInscDatBsn(TmplInscDatBsnSaveReqVO createReqVO) { public TmplInscDatBsnRespVO createTmplInscDatBsn(TmplInscDatBsnSaveReqVO createReqVO) {
//判断存在
validateTmplInscDatBsnExistsByKey(createReqVO);
// 插入 // 插入
TmplInscDatBsnDO tmplInscDatBsn = BeanUtils.toBean(createReqVO, TmplInscDatBsnDO.class); TmplInscDatBsnDO tmplInscDatBsn = BeanUtils.toBean(createReqVO, TmplInscDatBsnDO.class);
tmplInscDatBsnMapper.insert(tmplInscDatBsn); tmplInscDatBsnMapper.insert(tmplInscDatBsn);
// 返回 // 返回
return BeanUtils.toBean(tmplInscDatBsn, TmplInscDatBsnRespVO.class); 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 @Override
public void updateTmplInscDatBsn(TmplInscDatBsnSaveReqVO updateReqVO) { 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)); 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 编号 * @param ids 编号
*/ */
void deleteTmplInscDatBsnListByBsnIds(@Valid @NotEmpty(message = "业务编号不能为空") List<String> 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 org.springframework.transaction.annotation.Transactional;
import java.util.*; import java.util.*;
import com.zt.plat.module.base.controller.admin.templtp.vo.*; import com.zt.plat.module.base.controller.admin.templtp.vo.*;
import com.zt.plat.framework.common.pojo.PageResult; 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 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.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.convertList;
import static com.zt.plat.framework.common.util.collection.CollectionUtils.diffList; 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.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; 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 @Override
public TmplInscItmBsnRespVO createTmplInscItmBsn(TmplInscItmBsnSaveReqVO createReqVO) { public TmplInscItmBsnRespVO createTmplInscItmBsn(TmplInscItmBsnSaveReqVO createReqVO) {
//校验存在
validateTmplInscItmBsnExistsByKey(createReqVO);
// 插入 // 插入
TmplInscItmBsnDO tmplInscItmBsn = BeanUtils.toBean(createReqVO, TmplInscItmBsnDO.class); TmplInscItmBsnDO tmplInscItmBsn = BeanUtils.toBean(createReqVO, TmplInscItmBsnDO.class);
tmplInscItmBsnMapper.insert(tmplInscItmBsn); tmplInscItmBsnMapper.insert(tmplInscItmBsn);
@@ -47,6 +50,13 @@ public class TmplInscItmBsnServiceImpl implements TmplInscItmBsnService {
return BeanUtils.toBean(tmplInscItmBsn, TmplInscItmBsnRespVO.class); 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 @Override
public void updateTmplInscItmBsn(TmplInscItmBsnSaveReqVO updateReqVO) { public void updateTmplInscItmBsn(TmplInscItmBsnSaveReqVO updateReqVO) {
// 校验存在 // 校验存在
@@ -65,12 +75,12 @@ public class TmplInscItmBsnServiceImpl implements TmplInscItmBsnService {
} }
@Override @Override
public void deleteTmplInscItmBsnListByIds(List<Long> ids) { public void deleteTmplInscItmBsnListByIds(List<Long> ids) {
// 校验存在 // 校验存在
validateTmplInscItmBsnExists(ids); validateTmplInscItmBsnExists(ids);
// 删除 // 删除
tmplInscItmBsnMapper.deleteByIds(ids); tmplInscItmBsnMapper.deleteByIds(ids);
} }
private void validateTmplInscItmBsnExists(List<Long> ids) { private void validateTmplInscItmBsnExists(List<Long> ids) {
List<TmplInscItmBsnDO> list = tmplInscItmBsnMapper.selectByIds(ids); List<TmplInscItmBsnDO> list = tmplInscItmBsnMapper.selectByIds(ids);
@@ -101,4 +111,10 @@ public class TmplInscItmBsnServiceImpl implements TmplInscItmBsnService {
tmplInscItmBsnMapper.update(new LambdaUpdateWrapper<TmplInscItmBsnDO>().in(TmplInscItmBsnDO::getBsnId, ids).set(TmplInscItmBsnDO::getDeleted, 1)); 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") @TableField("PYER_NUM")
private String payerNum; private String payerNum;
/**
* 货权准转移类型
*/
private String meteringType;
/** /**
* 订单明细 * 订单明细

View File

@@ -198,6 +198,11 @@ public class PurchaseOrderWithDetailsDTO {
* 税码 * 税码
*/ */
private String taxNum; private String taxNum;
/**
* 货权准转移类型
*/
private String meteringType;
/** /**
* 采购订单明细 * 采购订单明细
*/ */

View File

@@ -1,5 +1,6 @@
package com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo; package com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.*; import lombok.*;
import java.util.*; import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@@ -133,5 +134,8 @@ public class PurchaseOrderPageReqVO extends PageParam {
@Schema(description = "订单分类") @Schema(description = "订单分类")
private String splyBsnTp; private String splyBsnTp;
@Schema(description = "货权转移类型(字典ASY_MTNG_TP)")
private String meteringType;
} }

View File

@@ -196,4 +196,8 @@ public class PurchaseOrderRespVO {
@ExcelProperty(" 审批意见") @ExcelProperty(" 审批意见")
private String reviewOpinion; private String reviewOpinion;
@Schema(description = "货权转移类型(字典ASY_MTNG_TP)")
@ExcelProperty("货权转移类型(字典ASY_MTNG_TP)")
private String meteringType;
} }

View File

@@ -178,4 +178,21 @@ public class PurchaseOrderSaveReqVO {
@Schema(description = "订单分类(字典SPLY_BSN_TP)", example = "2") @Schema(description = "订单分类(字典SPLY_BSN_TP)", example = "2")
@ExcelProperty("订单分类") @ExcelProperty("订单分类")
private String splyBsnTp; private String splyBsnTp;
@Schema(description = "货权转移类型(字典ASY_MTNG_TP)")
@ExcelProperty("货权转移类型(字典ASY_MTNG_TP)")
private String meteringType;
@Schema(description = "产品组名")
@ExcelProperty("产品组名")
private String pdtGrpName;
@Schema(description = "产品组编码")
@ExcelProperty("产品组编码")
private String pdtGrpCdg;
@Schema(description = "付款方名称")
@ExcelProperty("付款方名称")
private String payerName;
@Schema(description = "付款方编码")
@ExcelProperty("付款方编码")
private String payerNum;
} }

View File

@@ -156,4 +156,7 @@ public class SalesOrderPageReqVO extends PageParam {
@ExcelProperty("产品组编码") @ExcelProperty("产品组编码")
private String pdtGrpCdg; private String pdtGrpCdg;
@Schema(description = "货权转移类型(字典ASY_MTNG_TP)")
private String meteringType;
} }

View File

@@ -220,5 +220,8 @@ public class SalesOrderRespVO {
@Schema(description = "付款方编码") @Schema(description = "付款方编码")
@ExcelProperty("付款方编码") @ExcelProperty("付款方编码")
private String payerNum; private String payerNum;
@Schema(description = "货权转移类型(字典ASY_MTNG_TP)")
@ExcelProperty("货权转移类型(字典ASY_MTNG_TP)")
private String meteringType;
} }

View File

@@ -198,4 +198,8 @@ public class SalesOrderSaveReqVO {
@Schema(description = "付款方编码") @Schema(description = "付款方编码")
@ExcelProperty("付款方编码") @ExcelProperty("付款方编码")
private String payerNum; private String payerNum;
@Schema(description = "货权转移类型(字典ASY_MTNG_TP)")
@ExcelProperty("货权转移类型(字典ASY_MTNG_TP)")
private String meteringType;
} }

View File

@@ -283,4 +283,10 @@ public class PurchaseOrderDO extends BusinessBaseDO {
*/ */
@TableField("TAX_RTE") @TableField("TAX_RTE")
private BigDecimal taxRte; private BigDecimal taxRte;
/**
* 货权准转移类型
*/
@TableField("MTRG_TP")
private String meteringType;
} }

View File

@@ -303,9 +303,8 @@ public class SalesOrderDO extends BusinessBaseDO {
*/ */
@TableField("PYER_NUM") @TableField("PYER_NUM")
private String payerNum; private String payerNum;
// /** /**
// * 税码 * 货权准转移类型
// */ */
// @TableField("TAX_NUM") private String meteringType;
// private String taxNum;
} }

View File

@@ -61,6 +61,7 @@ public interface PurchaseOrderMapper extends BaseMapperX<PurchaseOrderDO> {
.eqIfPresent(PurchaseOrderDO::getSplyBsnTp, reqVO.getSplyBsnTp() != null ? reqVO.getSplyBsnTp() : "PUR") .eqIfPresent(PurchaseOrderDO::getSplyBsnTp, reqVO.getSplyBsnTp() != null ? reqVO.getSplyBsnTp() : "PUR")
.eqIfPresent(PurchaseOrderDO::getCause, reqVO.getCause()) .eqIfPresent(PurchaseOrderDO::getCause, reqVO.getCause())
.eqIfPresent(PurchaseOrderDO::getStatus, reqVO.getStatus()) .eqIfPresent(PurchaseOrderDO::getStatus, reqVO.getStatus())
.eqIfPresent(PurchaseOrderDO::getMeteringType, reqVO.getMeteringType())
.likeIfPresent(PurchaseOrderDO::getPurchaseGroupName, reqVO.getPurchaseGroupName()) .likeIfPresent(PurchaseOrderDO::getPurchaseGroupName, reqVO.getPurchaseGroupName())
.orderByDesc(PurchaseOrderDO::getId)); .orderByDesc(PurchaseOrderDO::getId));
} }

View File

@@ -27,6 +27,7 @@ public interface SalesOrderMapper extends BaseMapperX<SalesOrderDO> {
.eqIfPresent(SalesOrderDO::getSupplierNumber, reqVO.getSupplierNumber()) .eqIfPresent(SalesOrderDO::getSupplierNumber, reqVO.getSupplierNumber())
.likeIfPresent(SalesOrderDO::getSupplierName, reqVO.getSupplierName()) .likeIfPresent(SalesOrderDO::getSupplierName, reqVO.getSupplierName())
.eqIfPresent(SalesOrderDO::getType, reqVO.getType()) .eqIfPresent(SalesOrderDO::getType, reqVO.getType())
.eqIfPresent(SalesOrderDO::getMeteringType, reqVO.getMeteringType())
.betweenIfPresent(SalesOrderDO::getVoucherDate, reqVO.getVoucherDate()) .betweenIfPresent(SalesOrderDO::getVoucherDate, reqVO.getVoucherDate())
.eqIfPresent(SalesOrderDO::getPurchaseOrganizationCustomsDeclaration, reqVO.getPurchaseOrganizationCustomsDeclaration()) .eqIfPresent(SalesOrderDO::getPurchaseOrganizationCustomsDeclaration, reqVO.getPurchaseOrganizationCustomsDeclaration())
.likeIfPresent(SalesOrderDO::getReceiveFactoryName, reqVO.getReceiveFactoryName()) .likeIfPresent(SalesOrderDO::getReceiveFactoryName, reqVO.getReceiveFactoryName())