Compare commits

...

10 Commits

Author SHA1 Message Date
guojunyun
685ba9473b 查询结算公式列表:增加明细列表数据返回 2025-11-18 14:44:31 +08:00
guojunyun
09f8db69c4 SZHGYL-251修改 2025-11-18 10:19:16 +08:00
liss
cfdeb40a23 金属元素新增BUG 2025-11-17 18:33:33 +08:00
潘荣晟
10bfece481 Merge remote-tracking branch 'origin/dev' into dev 2025-11-17 18:15:05 +08:00
潘荣晟
79a760a379 开票检验 2025-11-17 18:14:50 +08:00
liss
dd9142a670 金属元素缩新增分页查询,生产订单erp分页查询 2025-11-17 18:07:54 +08:00
liss
8faa14d227 金属元素缩写重复校验,生产订单定时任务获取 2025-11-17 00:45:26 +08:00
guojunyun
82219fd733 新增根据合同编号获得交易信息接口 2025-11-14 17:15:58 +08:00
hxt
f797283021 订单单位 2025-11-14 17:10:39 +08:00
潘荣晟
d382abba10 模版修改 2025-11-14 14:51:20 +08:00
33 changed files with 837 additions and 232 deletions

View File

@@ -12,6 +12,7 @@ public interface ErrorCodeConstants {
// ========== 示例模块 1-001-000-000 ==========
ErrorCode MATERIAL_OTHER_NOT_EXISTS = new ErrorCode(1_001_000_001, "物料不存在");
ErrorCode ELEMENT_NOT_EXISTS = new ErrorCode(1_001_000_001, "金属元素不存在");
ErrorCode ELEMENT_EXISTS = new ErrorCode(1_001_000_002, "金属元素已经存在");
ErrorCode CONTACT_NOT_EXISTS = new ErrorCode(1_001_000_001, "联系人不存在");
ErrorCode ACCOUNT_NOT_EXISTS = new ErrorCode(1_001_000_001, "账户条款不存在");
ErrorCode MATERIAL_DESTROY_NOT_EXISTS = new ErrorCode(1_001_000_001, "物料回收率不存在");

View File

@@ -88,6 +88,14 @@ public class ElementController {
return success(BeanUtils.toBean(pageResult, ElementRespVO.class));
}
@GetMapping("/pageByEnable")
@Operation(summary = "获得启用的金属元素分页")
@PreAuthorize("@ss.hasPermission('base:element:query')")
public CommonResult<PageResult<ElementRespVO>> getElementPageByEnable(@Valid ElementPageReqVO pageReqVO) {
PageResult<ElementDO> pageResult = elementService.getElementPageByEnable(pageReqVO);
return success(BeanUtils.toBean(pageResult, ElementRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出金属元素 Excel")
@PreAuthorize("@ss.hasPermission('base:element:export')")

View File

@@ -40,4 +40,8 @@ public class TemplateInstanceDataRespVO {
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "是否必填", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("是否必填")
private String isMust;
}

View File

@@ -34,8 +34,8 @@ public class TmplInscBsnRelDO extends BusinessBaseDO {
/**
* 业务主键
*/
@TableField("BSN_ID")
private Long bsnId;
@TableField("REL_ID")
private Long relativityId;
/**
* 实例主键
*/

View File

@@ -23,6 +23,7 @@ public interface ElementMapper extends BaseMapperX<ElementDO> {
.likeIfPresent(ElementDO::getAbbreviation, reqVO.getAbbreviation())
.likeIfPresent(ElementDO::getName, reqVO.getName())
.eqIfPresent(ElementDO::getDecimalValue, reqVO.getDecimalValue())
.eqIfPresent(ElementDO::getIsEnable, reqVO.getIsEnable())
.likeIfPresent(ElementDO::getCoding, reqVO.getCoding())
.eqIfPresent(ElementDO::getGradeUnit, reqVO.getGradeUnit())
.betweenIfPresent(ElementDO::getCreateTime, reqVO.getCreateTime())
@@ -36,4 +37,9 @@ public interface ElementMapper extends BaseMapperX<ElementDO> {
.eq(ElementDO::getIsEnable, 1)
.orderByDesc(ElementDO::getSort));
}
default ElementDO getElementName(String code){
return selectOne(new LambdaQueryWrapperX<ElementDO>()
.eq(ElementDO::getAbbreviation, code));
};
}

View File

@@ -21,7 +21,7 @@ public interface TmplInscBsnRelMapper extends BaseMapperX<TmplInscBsnRelDO> {
default PageResult<TmplInscBsnRelDO> selectPage(TmplInscBsnRelPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<TmplInscBsnRelDO>()
.eqIfPresent(TmplInscBsnRelDO::getBsnId, reqVO.getBsnId())
.eqIfPresent(TmplInscBsnRelDO::getRelativityId, reqVO.getBsnId())
.eqIfPresent(TmplInscBsnRelDO::getInscId, reqVO.getInscId())
.eqIfPresent(TmplInscBsnRelDO::getCntt, reqVO.getCntt())
.eqIfPresent(TmplInscBsnRelDO::getVer, reqVO.getVer())

View File

@@ -65,4 +65,6 @@ public interface ElementService {
void enableElementList(List<ElementRespVO> saveReqVOS);
List<ElementDO> getElementNoPage();
PageResult<ElementDO> getElementPageByEnable(ElementPageReqVO pageReqVO);
}

View File

@@ -17,6 +17,7 @@ import org.springframework.validation.annotation.Validated;
import java.util.List;
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.zt.plat.module.base.enums.ErrorCodeConstants.ELEMENT_EXISTS;
import static com.zt.plat.module.base.enums.ErrorCodeConstants.ELEMENT_NOT_EXISTS;
/**
@@ -35,6 +36,8 @@ public class ElementServiceImpl implements ElementService {
public ElementRespVO createElement(ElementSaveReqVO createReqVO) {
// 插入
ElementDO element = BeanUtils.toBean(createReqVO, ElementDO.class);
// 校验存在
validateElementCodeExists(createReqVO.getAbbreviation());
//金属编码自动生成,格式 JSYS-00001,依次新增
String maxCode = elementMapper.selectMaxCode();
if (maxCode == null) {
@@ -55,6 +58,8 @@ public class ElementServiceImpl implements ElementService {
public void updateElement(ElementSaveReqVO updateReqVO) {
// 校验存在
validateElementExists(updateReqVO.getId());
// 校验存在
validateElementCodeExists(updateReqVO.getAbbreviation());
// 更新
ElementDO updateObj = BeanUtils.toBean(updateReqVO, ElementDO.class);
elementMapper.updateById(updateObj);
@@ -89,6 +94,13 @@ public class ElementServiceImpl implements ElementService {
}
}
private void validateElementCodeExists(String code) {
ElementDO elementDO = elementMapper.getElementName(code);
if (elementDO != null) {
throw exception(ELEMENT_EXISTS);
}
}
@Override
public ElementDO getElement(Long id) {
return elementMapper.selectById(id);
@@ -113,4 +125,12 @@ public class ElementServiceImpl implements ElementService {
return elementMapper.getElementNoPage();
}
@Override
public PageResult<ElementDO> getElementPageByEnable(ElementPageReqVO pageReqVO) {
if (pageReqVO!=null&&pageReqVO.getIsEnable()==null){
pageReqVO.setIsEnable("1");
}
return elementMapper.selectPage(pageReqVO);
}
}

View File

@@ -420,6 +420,7 @@ public class TemplateInstanceServiceImpl implements TemplateInstanceService {
if (templateInstanceDataRespVO.getFldKy().equals(tmplTpFldDO.getFldKy())) {
templateInstanceDataRespVO.setFldName(tmplTpFldDO.getFldName());
templateInstanceDataRespVO.setFldDoc(tmplTpFldDO.getFldDoc());
templateInstanceDataRespVO.setIsMust(tmplTpFldDO.getIsMust());
}
});
});

View File

@@ -67,6 +67,7 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
// fileUpload(createReqVO, templateInstance, type);
// 插入
TmplInscBsnRelDO tmplInscBsnRel = BeanUtils.toBean(createReqVO, TmplInscBsnRelDO.class);
tmplInscBsnRel.setRelativityId(createReqVO.getBsnId());
// tmplInscBsnRel.setBsnId(Long.valueOf(createReqVO.getUuid()));
tmplInscBsnRelMapper.insert(tmplInscBsnRel);
// 返回
@@ -81,6 +82,9 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
validateTmplInscBsnRelExists(updateReqVO.getId());
// 更新
TmplInscBsnRelDO updateObj = BeanUtils.toBean(updateReqVO, TmplInscBsnRelDO.class);
if (updateReqVO.getBsnId()!=null){
updateObj.setRelativityId(updateReqVO.getBsnId());
}
tmplInscBsnRelMapper.updateById(updateObj);
}
@@ -99,9 +103,9 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
// 校验存在
validateTmplInscBsnRelExists(ids);
//删除业务实例字段值
deleteFldOrItmByIds(tmplInscBsnRelMapper.selectByIds(ids).stream().map(TmplInscBsnRelDO::getBsnId).map(String::valueOf).toList(), tmplInscDatBsnService);
deleteFldOrItmByIds(tmplInscBsnRelMapper.selectByIds(ids).stream().map(TmplInscBsnRelDO::getRelativityId).map(String::valueOf).toList(), tmplInscDatBsnService);
//删除业务实例字段值
deleteFldOrItmByIds(tmplInscBsnRelMapper.selectByIds(ids).stream().map(TmplInscBsnRelDO::getBsnId).map(String::valueOf).toList(), tmplInscItmBsnService);
deleteFldOrItmByIds(tmplInscBsnRelMapper.selectByIds(ids).stream().map(TmplInscBsnRelDO::getRelativityId).map(String::valueOf).toList(), tmplInscItmBsnService);
tmplInscBsnRelMapper.deleteByIds(ids);
}
@@ -155,7 +159,7 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
@Override
public void updateCntt(Long bsnId, String params) {
List<TmplInscBsnRelDO> tmplInscBsnRelDOS = tmplInscBsnRelMapper.selectList(new LambdaQueryWrapper<TmplInscBsnRelDO>()
.eq(TmplInscBsnRelDO::getBsnId, bsnId).orderByDesc(TmplInscBsnRelDO::getVer)
.eq(TmplInscBsnRelDO::getRelativityId, bsnId).orderByDesc(TmplInscBsnRelDO::getVer)
);
if (tmplInscBsnRelDOS.isEmpty()) {
throw exception(TEMPLATE_INSTANCE_FILE_NOT_EXISTS);
@@ -170,7 +174,7 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
//业务条款
private List<TmplInscItmBsnRespVO> setTmplInscItmBsnRespVOS(TmplInscBsnRelRespVO tmplInscBsnRelRespVO) {
List<TmplInscItmBsnRespVO> tmplInscItmBsnRespVOS = BeanUtils.toBean(SpringUtil.getBean(TmplInscItmBsnMapper.class).selectList(new LambdaQueryWrapper<TmplInscItmBsnDO>()
.eq(TmplInscItmBsnDO::getBsnId, tmplInscBsnRelRespVO.getBsnId())
.eq(TmplInscItmBsnDO::getBsnId, tmplInscBsnRelRespVO.getId())
), TmplInscItmBsnRespVO.class);
// tmplInscItmBsnRespVOS.forEach(tmplInscItmBsnRespVO -> {
// tmplInscBsnRelRespVO.getInstanceItemRespVOS().forEach(instanceItemRespVO -> {
@@ -184,7 +188,7 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
//业务字段
private List<TmplInscDatBsnRespVO> setTmplInscDatBsnRespVOS(TmplInscBsnRelRespVO tmplInscBsnRelRespVO) {
List<TmplInscDatBsnRespVO> tmplInscDatBsnRespVOS = BeanUtils.toBean(SpringUtil.getBean(TmplInscDatBsnMapper.class).selectList(new LambdaQueryWrapper<TmplInscDatBsnDO>()), TmplInscDatBsnRespVO.class);
List<TmplInscDatBsnRespVO> tmplInscDatBsnRespVOS = BeanUtils.toBean(SpringUtil.getBean(TmplInscDatBsnMapper.class).selectList(new LambdaQueryWrapper<TmplInscDatBsnDO>().eq(TmplInscDatBsnDO::getBsnId, tmplInscBsnRelRespVO.getId())), TmplInscDatBsnRespVO.class);
// tmplInscDatBsnRespVOS.forEach(tmplInscDatBsnRespVO -> tmplInscBsnRelRespVO.getTemplateInstanceDataRespVOS().forEach(templateInstanceDataRespVO -> {
// if (templateInstanceDataRespVO.getId().toString().equals(tmplInscDatBsnRespVO.getInscFldId())) {
@@ -300,7 +304,7 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
public Map<String, Object> valueInfo(String cttId, String inscId) {
// 1、通过实例和合同Id获取业务
TmplInscBsnRelDO tmplInscBsnRelDO = tmplInscBsnRelMapper.selectOne(
TmplInscBsnRelDO::getBsnId, cttId,
TmplInscBsnRelDO::getRelativityId, cttId,
TmplInscBsnRelDO::getInscId, inscId
);
if (tmplInscBsnRelDO == null) {
@@ -310,7 +314,7 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
List<ValueInfo> valueInfoS = new ArrayList<>();
// 2、获取绑定的字段
List<TmplInscDatBsnRespVO> tmplInscDatBsnList = tmplInscDatBsnService
.getTmplInscDatBsnListByBsnId(String.valueOf(tmplInscBsnRelDO.getBsnId()));
.getTmplInscDatBsnListByBsnId(String.valueOf(tmplInscBsnRelDO.getRelativityId()));
Optional.ofNullable(tmplInscDatBsnList)
@@ -326,7 +330,7 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
}));
// 3、获取条款
List<TmplInscItmBsnRespVO> tmplInscItmBsnList = tmplInscItmBsnService.getTmplInscItmBsnList(String.valueOf(tmplInscBsnRelDO.getBsnId()));
List<TmplInscItmBsnRespVO> tmplInscItmBsnList = tmplInscItmBsnService.getTmplInscItmBsnList(String.valueOf(tmplInscBsnRelDO.getRelativityId()));
Optional.ofNullable(tmplInscItmBsnList)
.ifPresent(list -> list.forEach(tmplInscItmBsnRespVO -> {
ValueInfo valueInfo = new ValueInfo(
@@ -345,7 +349,7 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
@Override
public TmplInscBsnRelRespVO bseInfo(String cttId, String inscId) {
TmplInscBsnRelDO tmplInscBsnRelDO = tmplInscBsnRelMapper.selectOne(
TmplInscBsnRelDO::getBsnId, cttId,
TmplInscBsnRelDO::getRelativityId, cttId,
TmplInscBsnRelDO::getInscId, inscId
);
return BeanUtils.toBean(tmplInscBsnRelDO, TmplInscBsnRelRespVO.class);
@@ -362,7 +366,7 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
List<ValueInfo> valueInfoS = new ArrayList<>();
// 2、获取绑定的字段
List<TmplInscDatBsnRespVO> tmplInscDatBsnList = tmplInscDatBsnService
.getTmplInscDatBsnListByBsnId(String.valueOf(tmplInscBsnRelDO.getBsnId()));
.getTmplInscDatBsnListByBsnId(String.valueOf(tmplInscBsnRelDO.getRelativityId()));
Optional.ofNullable(tmplInscDatBsnList)
@@ -378,7 +382,7 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
}));
// 3、获取条款
List<TmplInscItmBsnRespVO> tmplInscItmBsnList = tmplInscItmBsnService.getTmplInscItmBsnList(String.valueOf(tmplInscBsnRelDO.getBsnId()));
List<TmplInscItmBsnRespVO> tmplInscItmBsnList = tmplInscItmBsnService.getTmplInscItmBsnList(String.valueOf(tmplInscBsnRelDO.getRelativityId()));
Optional.ofNullable(tmplInscItmBsnList)
.ifPresent(list -> list.forEach(tmplInscItmBsnRespVO -> {
ValueInfo valueInfo = new ValueInfo(

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