Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -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')")
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
}
|
||||
@@ -65,4 +65,6 @@ public interface ElementService {
|
||||
void enableElementList(List<ElementRespVO> saveReqVOS);
|
||||
|
||||
List<ElementDO> getElementNoPage();
|
||||
|
||||
PageResult<ElementDO> getElementPageByEnable(ElementPageReqVO pageReqVO);
|
||||
}
|
||||
@@ -35,6 +35,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 +57,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);
|
||||
@@ -69,12 +73,12 @@ public class ElementServiceImpl implements ElementService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteElementListByIds(List<Long> ids) {
|
||||
public void deleteElementListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateElementExists(ids);
|
||||
// 删除
|
||||
elementMapper.deleteByIds(ids);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateElementExists(List<Long> ids) {
|
||||
List<ElementDO> list = elementMapper.selectByIds(ids);
|
||||
@@ -89,6 +93,13 @@ public class ElementServiceImpl implements ElementService {
|
||||
}
|
||||
}
|
||||
|
||||
private void validateElementCodeExists(String code) {
|
||||
ElementDO elementDO = elementMapper.getElementName(code);
|
||||
if (elementDO == null) {
|
||||
throw exception(ELEMENT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ElementDO getElement(Long id) {
|
||||
return elementMapper.selectById(id);
|
||||
@@ -102,7 +113,7 @@ public class ElementServiceImpl implements ElementService {
|
||||
@Override
|
||||
public void enableElementList(List<ElementRespVO> saveReqVOS) {
|
||||
List<ElementDO> updateObj = BeanUtils.toBean(saveReqVOS, ElementDO.class);
|
||||
List<BatchResult> count = elementMapper.updateById(updateObj);
|
||||
List<BatchResult> count = elementMapper.updateById(updateObj);
|
||||
if (CollUtil.isEmpty(count)) {
|
||||
throw exception(ELEMENT_NOT_EXISTS);
|
||||
}
|
||||
@@ -113,4 +124,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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -242,6 +242,30 @@ public class ContractRespDTO {
|
||||
@Schema(description = "模板中间表ID")
|
||||
private Long businessId;
|
||||
|
||||
@Schema(description = "甲方户名")
|
||||
private String purchaseAccountName;
|
||||
|
||||
@Schema(description = "甲方开户行")
|
||||
private String purchaseBankAccount;
|
||||
|
||||
@Schema(description = "甲方户号")
|
||||
private String purchaseAccountNumber;
|
||||
|
||||
@Schema(description = "甲方税号/社会信用代码")
|
||||
private String purchaseTaxNumber;
|
||||
|
||||
@Schema(description = "乙方户名")
|
||||
private String salesAccountName;
|
||||
|
||||
@Schema(description = "乙方开户行")
|
||||
private String salesBankAccount;
|
||||
|
||||
@Schema(description = "乙方户号")
|
||||
private String salesAccountNumber;
|
||||
|
||||
@Schema(description = "乙方税号/社会信用代码")
|
||||
private String salesTaxNumber;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailRespDTO> detail;
|
||||
|
||||
|
||||
@@ -248,6 +248,30 @@ public class ContractRespVO {
|
||||
@Schema(description = "模板中间表ID")
|
||||
private Long businessId;
|
||||
|
||||
@Schema(description = "甲方户名")
|
||||
private String purchaseAccountName;
|
||||
|
||||
@Schema(description = "甲方开户行")
|
||||
private String purchaseBankAccount;
|
||||
|
||||
@Schema(description = "甲方户号")
|
||||
private String purchaseAccountNumber;
|
||||
|
||||
@Schema(description = "甲方税号/社会信用代码")
|
||||
private String purchaseTaxNumber;
|
||||
|
||||
@Schema(description = "乙方户名")
|
||||
private String salesAccountName;
|
||||
|
||||
@Schema(description = "乙方开户行")
|
||||
private String salesBankAccount;
|
||||
|
||||
@Schema(description = "乙方户号")
|
||||
private String salesAccountNumber;
|
||||
|
||||
@Schema(description = "乙方税号/社会信用代码")
|
||||
private String salesTaxNumber;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailRespVO> detail;
|
||||
|
||||
|
||||
@@ -218,6 +218,30 @@ public class ContractSaveReqVO {
|
||||
@Schema(description = "模板中间表ID")
|
||||
private Long businessId;
|
||||
|
||||
@Schema(description = "甲方户名")
|
||||
private String purchaseAccountName;
|
||||
|
||||
@Schema(description = "甲方开户行")
|
||||
private String purchaseBankAccount;
|
||||
|
||||
@Schema(description = "甲方户号")
|
||||
private String purchaseAccountNumber;
|
||||
|
||||
@Schema(description = "甲方税号/社会信用代码")
|
||||
private String purchaseTaxNumber;
|
||||
|
||||
@Schema(description = "乙方户名")
|
||||
private String salesAccountName;
|
||||
|
||||
@Schema(description = "乙方开户行")
|
||||
private String salesBankAccount;
|
||||
|
||||
@Schema(description = "乙方户号")
|
||||
private String salesAccountNumber;
|
||||
|
||||
@Schema(description = "乙方税号/社会信用代码")
|
||||
private String salesTaxNumber;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailSaveReqVO> detail;
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 合同交易信息 Response VO")
|
||||
@Data
|
||||
public class TransactionInfoRespVO {
|
||||
|
||||
@Schema(description = "公司编号")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "公司户名")
|
||||
private String companyAccountName;
|
||||
|
||||
@Schema(description = "公司开户行")
|
||||
private String companyBankAccount;
|
||||
|
||||
@Schema(description = "公司户号")
|
||||
private String companyAccountNumber;
|
||||
|
||||
@Schema(description = "公司税号/社会信用代码")
|
||||
private String companyTaxNumber;
|
||||
|
||||
@Schema(description = "客商编号")
|
||||
private String supplierNumber;
|
||||
|
||||
@Schema(description = "客商名称")
|
||||
private String supplierName;
|
||||
|
||||
@Schema(description = "客商户名")
|
||||
private String supplierAccountName;
|
||||
|
||||
@Schema(description = "客商开户行")
|
||||
private String supplierBankAccount;
|
||||
|
||||
@Schema(description = "客商户号")
|
||||
private String supplierAccountNumber;
|
||||
|
||||
@Schema(description = "客商税号/社会信用代码")
|
||||
private String supplierTaxNumber;
|
||||
}
|
||||
@@ -213,5 +213,14 @@ public class ContractController implements BusinessControllerMarker {
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:query')")
|
||||
public CommonResult<List<PurchaseOrderWithDetailsDTO>> getOrderByOrderNo(@RequestBody List<String> orderNoS){
|
||||
return contractApi.getOrderByOrderNo(orderNoS);
|
||||
};
|
||||
}
|
||||
|
||||
@GetMapping("/transaction-info/by-paper-number")
|
||||
@Operation(summary = "根据合同编号获得交易信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:get')")
|
||||
public CommonResult<TransactionInfoRespVO> transactionInfoByPaperNumber(
|
||||
@RequestParam("contractPaperNumber") String contractPaperNumber
|
||||
) {
|
||||
return success(contractService.transactionInfoByPaperNumber(contractPaperNumber));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,4 +195,9 @@ public class PurchaseOrderDetailsRespVO {
|
||||
* 订单类型
|
||||
*/
|
||||
private String splyBsnTp;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unt;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user