New file |
| | |
| | | package com.by4cloud.platformx.device.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PurchaseWinningLetterQueryDTO { |
| | | |
| | | private String winningName; |
| | | |
| | | private String orderName; |
| | | |
| | | private String winningCode; |
| | | |
| | | } |
| | |
| | | @Data |
| | | public class ReceivingNoteQueryDTO { |
| | | |
| | | @Schema(description = "验收单名称") |
| | | private String noteName; |
| | | |
| | | @Schema(description = "验收单编号") |
| | | private String releaseCode; |
| | | |
| | |
| | | package com.by4cloud.platformx.device.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | |
| | | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | import javax.persistence.Transient; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author kdq |
| | |
| | | @Schema(description = "上报时间") |
| | | @Column(columnDefinition = "datetime comment '上报时间'") |
| | | private Date sendDate; |
| | | |
| | | @Transient |
| | | @TableField(exist = false) |
| | | private List<DeviceDemandTotal> totalList; |
| | | } |
| | |
| | | @Schema(description = "合同id") |
| | | @Column(columnDefinition="bigint comment '合同id'") |
| | | private Long contractId; |
| | | |
| | | /** |
| | | * 台账名称 |
| | | */ |
| | | @Schema(description = "台账名称") |
| | | @Column(columnDefinition="VARCHAR(256) comment '台账名称'") |
| | | private String ledgerName; |
| | | } |
| | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.hibernate.annotations.Table; |
| | | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | * @date 2025-03-24 15:45:03 |
| | | */ |
| | | @Data |
| | | @Entity |
| | | @TableName("purchase_tendr_order") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Schema(description = "招标采购单") |
| | | @javax.persistence.Table(name = "purchase_tendr_order") |
| | | @Table(appliesTo = "purchase_tendr_order", comment = "招标采购单") |
| | | public class PurchaseTendrOrderEntity extends BaseModel<PurchaseTendrOrderEntity> { |
| | | |
| | | /** |
| | | * 采购计划编号 |
| | | */ |
| | | @Schema(description="采购计划编号") |
| | | @Column(columnDefinition="varchar(100) comment '采购计划编号'") |
| | | private String purchasePlanCode; |
| | | |
| | | /** |
| | | * 设备编码 |
| | | */ |
| | | @Schema(description="设备编码") |
| | | @Column(columnDefinition="varchar(256) comment '设备编码'") |
| | | private String deviceCode; |
| | | |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | @Schema(description="设备名称") |
| | | @Column(columnDefinition="varchar(256) comment '设备名称'") |
| | | private String deviceName; |
| | | |
| | | /** |
| | | * 规格型号 |
| | | */ |
| | | @Schema(description="规格型号") |
| | | @Column(columnDefinition="varchar(256) comment '规格型号'") |
| | | private String deviceModels; |
| | | |
| | | /** |
| | | * 关键参数 |
| | | */ |
| | | @Schema(description="关键参数") |
| | | @Column(columnDefinition="varchar(256) comment '关键参数'") |
| | | private String keyParameter; |
| | | |
| | | /** |
| | | * 到货月份 |
| | | */ |
| | | @Schema(description="到货月份") |
| | | @Column(columnDefinition="int comment '到货月份'") |
| | | private Integer arrivalMonth; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @Schema(description="数量") |
| | | @Column(columnDefinition="int comment '数量'") |
| | | private Integer quantity; |
| | | |
| | | /** |
| | | * 单位 |
| | | * 计量单位 |
| | | */ |
| | | @Schema(description="单位") |
| | | @Schema(description="计量单位") |
| | | @Column(columnDefinition="varchar(20) comment '计量单位'") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 预估单价 /分 |
| | | */ |
| | | @Schema(description="预估单价 /分") |
| | | private Integer estimatePrice; |
| | | @Column(columnDefinition="decimal(10,2) comment '预估单价'") |
| | | private BigDecimal estimatePrice; |
| | | |
| | | /** |
| | | * 计划总额 /分 |
| | | */ |
| | | @Schema(description="计划总额 /分") |
| | | private Integer totalPlanndAmount; |
| | | @Column(columnDefinition="decimal(10,2) comment '计划总额'") |
| | | private BigDecimal totalPlanndAmount; |
| | | |
| | | /** |
| | | * 拟使用地点 |
| | | */ |
| | | @Schema(description="拟使用地点") |
| | | @Column(columnDefinition="varchar(256) comment '拟使用地点'") |
| | | private String locationUsed; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @Schema(description="状态") |
| | | @Column(columnDefinition="varchar(32) comment '状态'") |
| | | private String status; |
| | | |
| | | /** |
| | | * 申请人 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @Schema(description="申请人") |
| | | private String createBy; |
| | | * 招标采购计划名称 |
| | | */ |
| | | @Schema(description="招标采购计划名称") |
| | | @Column(columnDefinition="varchar(256) comment '招标采购计划名称'") |
| | | private String orderName; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @Schema(description="创建时间") |
| | | private LocalDateTime createTime; |
| | | * 设备ID |
| | | */ |
| | | @Schema(description="设备ID") |
| | | @Column(columnDefinition="bigint comment '设备ID'") |
| | | private Long deviceId; |
| | | |
| | | /** |
| | | * 修改人 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @Schema(description="修改人") |
| | | private String updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @Schema(description="修改时间") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * delFlag |
| | | */ |
| | | @TableLogic |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @Schema(description="delFlag") |
| | | private String delFlag; |
| | | } |
| | |
| | | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | private String unit; |
| | | |
| | | /** |
| | | * 中标单价 /分 |
| | | * 中标单价 |
| | | */ |
| | | @Schema(description="中标单价 /分") |
| | | @Column(columnDefinition="DECIMAL(10,0) comment '中标单价 /分'") |
| | | private Integer winningPrice; |
| | | @Schema(description="中标单价") |
| | | @Column(columnDefinition="DECIMAL(10,2) comment '中标单价'") |
| | | private BigDecimal winningPrice; |
| | | |
| | | /** |
| | | * 中标总额 /分 |
| | | * 中标总额 |
| | | */ |
| | | @Schema(description="中标总额 /分") |
| | | @Column(columnDefinition="DECIMAL(10,0) comment '中标总额 /分'") |
| | | private Integer totalWinningAmount; |
| | | @Schema(description="中标总额") |
| | | @Column(columnDefinition="DECIMAL(10,2) comment '中标总额'") |
| | | private BigDecimal totalWinningAmount; |
| | | |
| | | /** |
| | | * 拟使用地点 |
| | |
| | | /** |
| | | * 中标厂家ID |
| | | */ |
| | | @Schema(description="中标厂家") |
| | | @Column(columnDefinition="bigint comment '使用公司'") |
| | | @Schema(description="中标厂家ID") |
| | | @Column(columnDefinition="bigint comment '中标厂家ID'") |
| | | private Long winningManufacturerId; |
| | | |
| | | /** |
| | | * 中标通知名称 |
| | | */ |
| | | @Schema(description="中标通知") |
| | | @Column(columnDefinition="varchar(256) comment '中标通知'") |
| | | private String winningName; |
| | | |
| | | /** |
| | | * 设备ID |
| | | */ |
| | | @Schema(description="设备ID") |
| | | @Column(columnDefinition="bigint comment '设备ID'") |
| | | private Long deviceId; |
| | | |
| | | /** |
| | | * 招标计划ID |
| | | */ |
| | | @Schema(description="招标计划ID") |
| | | @Column(columnDefinition="bigint comment '招标计划ID'") |
| | | private Long orderId; |
| | | } |
| | |
| | | @Transient |
| | | @TableField(exist = false) |
| | | private List<ReceivingNoteItem> noteItemList; |
| | | |
| | | /** |
| | | * 验收单名称 |
| | | */ |
| | | @Schema(description = "验收单名称") |
| | | @Column(columnDefinition="VARCHAR(256) comment '验收单名称'") |
| | | private String noteName; |
| | | } |
New file |
| | |
| | | package com.by4cloud.platformx.device.entity.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PurchaseWinningLetterPageVo { |
| | | |
| | | private Long id; |
| | | |
| | | private String winningName; |
| | | |
| | | private String winningCode; |
| | | |
| | | private String orderName; |
| | | |
| | | private String deviceName; |
| | | |
| | | private String deviceCode; |
| | | |
| | | private String winningBidder; |
| | | |
| | | private String arrivalMonth; |
| | | |
| | | private String quantity; |
| | | |
| | | private String totalWinningAmount; |
| | | |
| | | private String locationUsed; |
| | | |
| | | } |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 验收单名称 |
| | | */ |
| | | private String noteName; |
| | | |
| | | /** |
| | | * 合同 名称 |
| | | */ |
| | | private String contractName; |
| | |
| | | import com.by4cloud.platformx.device.entity.Device; |
| | | import com.by4cloud.platformx.device.entity.DeviceDemandPlan; |
| | | import com.by4cloud.platformx.device.entity.DeviceDemandSub; |
| | | import com.by4cloud.platformx.device.entity.DeviceDemandTotal; |
| | | import com.by4cloud.platformx.device.service.*; |
| | | import com.by4cloud.platformx.device.util.NumUtils; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | wrapper.eq(deviceDemandPlan.getDeclareCompId() !=null,DeviceDemandPlan::getDeclareCompId,deviceDemandPlan.getDeclareCompId()); |
| | | wrapper.eq(deviceDemandPlan.getReleasePerson() !=null,DeviceDemandPlan::getReleasePerson,deviceDemandPlan.getReleasePerson()); |
| | | wrapper.eq(deviceDemandPlan.getYear() !=null,DeviceDemandPlan::getYear,deviceDemandPlan.getYear()); |
| | | wrapper.eq(DeviceDemandPlan::getType2,0); |
| | | wrapper.orderByDesc(DeviceDemandPlan::getCreateTime); |
| | | return R.ok(deviceDemandPlanService.pageByScope(page, wrapper)); |
| | | Page<DeviceDemandPlan> page1 = deviceDemandPlanService.pageByScope(page, wrapper); |
| | | for (DeviceDemandPlan record : page1.getRecords()) { |
| | | LambdaQueryWrapper<DeviceDemandTotal> totalWrapper = Wrappers.lambdaQuery(); |
| | | totalWrapper.eq(DeviceDemandTotal::getPlanId,record.getId()); |
| | | List<DeviceDemandTotal> list = deviceDemandTotalService.list(totalWrapper); |
| | | record.setTotalList(list); |
| | | } |
| | | return R.ok(page1); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Operation(summary = "修改设备需求计划项目子表" , description = "修改设备需求计划项目子表" ) |
| | | @SysLog("修改设备需求计划项目子表" ) |
| | | @PutMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_deviceDemandTotal_edit')" ) |
| | | public R updateById(@RequestBody DeviceDemandTotal deviceDemandTotal) { |
| | | List<DeviceDemandSub> subList = deviceDemandTotal.getSubList(); |
| | | QueryWrapper<DeviceDemandSub> wrapper = new QueryWrapper<>(); |
| | |
| | | @PreAuthorize("@pms.hasPermission('device_deviceLeasingLedger_view')" ) |
| | | public R getDeviceLeasingLedgerPage(@ParameterObject Page page, @ParameterObject DeviceLeasingLedger deviceLeasingLedger) { |
| | | LambdaQueryWrapper<DeviceLeasingLedger> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.eq(StrUtil.isNotBlank(deviceLeasingLedger.getContractCode()),DeviceLeasingLedger::getContractCode,deviceLeasingLedger.getContractCode()); |
| | | wrapper.eq(StrUtil.isNotBlank(deviceLeasingLedger.getLedgerCode()),DeviceLeasingLedger::getLedgerCode,deviceLeasingLedger.getLedgerCode()); |
| | | wrapper.like(StrUtil.isNotBlank(deviceLeasingLedger.getLedgerName()),DeviceLeasingLedger::getLedgerName,deviceLeasingLedger.getLedgerName()); |
| | | wrapper.like(StrUtil.isNotBlank(deviceLeasingLedger.getContractCode()),DeviceLeasingLedger::getContractCode,deviceLeasingLedger.getContractCode()); |
| | | wrapper.like(StrUtil.isNotBlank(deviceLeasingLedger.getLedgerCode()),DeviceLeasingLedger::getLedgerCode,deviceLeasingLedger.getLedgerCode()); |
| | | wrapper.orderByDesc(DeviceLeasingLedger::getCreateTime); |
| | | return R.ok(deviceLeasingLedgerService.page(page, wrapper)); |
| | | } |
| | |
| | | * 获取下拉列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getDropdownnList") |
| | | public R<List<DeviceTechnicalAgreemnt>> getDropdownnList() { |
| | | return R.ok(deviceTechnicalAgreementService.list()); |
| | | @GetMapping("/getDropdownnList/{deviceId}") |
| | | public R<List<DeviceTechnicalAgreemnt>> getDropdownnList(@PathVariable("deviceId")Long deviceId) { |
| | | return R.ok(deviceTechnicalAgreementService.getDropdownnList(deviceId)); |
| | | } |
| | | } |
| | |
| | | @PreAuthorize("@pms.hasPermission('platformx_purchaseTendrOrder_view')" ) |
| | | public R getPurchaseTendrOrderPage(@ParameterObject Page page, @ParameterObject PurchaseTendrOrderEntity purchaseTendrOrder) { |
| | | LambdaQueryWrapper<PurchaseTendrOrderEntity> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.like(StringUtils.isNotEmpty(purchaseTendrOrder.getOrderName()),PurchaseTendrOrderEntity::getOrderName,purchaseTendrOrder.getOrderName()); |
| | | wrapper.like(StringUtils.isNotEmpty(purchaseTendrOrder.getPurchasePlanCode()),PurchaseTendrOrderEntity::getPurchasePlanCode,purchaseTendrOrder.getPurchasePlanCode()); |
| | | wrapper.orderByDesc(PurchaseTendrOrderEntity::getCreateTime); |
| | | return R.ok(purchaseTendrOrderService.page(page, wrapper)); |
| | |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.common.log.annotation.SysLog; |
| | | import com.by4cloud.platformx.device.constant.MaxSizeContant; |
| | | import com.by4cloud.platformx.device.entity.Contract; |
| | | import com.by4cloud.platformx.device.entity.DeviceManufacturer; |
| | | import com.by4cloud.platformx.device.entity.PurchaseTendrOrderEntity; |
| | | import com.by4cloud.platformx.device.entity.PurchaseWinningLetterEntity; |
| | | import com.by4cloud.platformx.device.dto.PurchaseWinningLetterQueryDTO; |
| | | import com.by4cloud.platformx.device.entity.*; |
| | | import com.by4cloud.platformx.device.service.JcMaxSizeService; |
| | | import com.by4cloud.platformx.device.service.PurchaseWinningLetterService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | /** |
| | | * 分页查询 |
| | | * @param page 分页对象 |
| | | * @param purchaseWinningLetter 中标通知书 |
| | | * @param queryDTO 中标通知书 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "分页查询" , description = "分页查询" ) |
| | | @GetMapping("/page" ) |
| | | @PreAuthorize("@pms.hasPermission('device_purchaseWinningLetter_view')" ) |
| | | public R getPurchaseWinningLetterPage(@ParameterObject Page page, @ParameterObject PurchaseWinningLetterEntity purchaseWinningLetter) { |
| | | LambdaQueryWrapper<PurchaseWinningLetterEntity> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.like(StringUtils.isNotEmpty(purchaseWinningLetter.getPurchasePlanCode()), PurchaseWinningLetterEntity::getPurchasePlanCode,purchaseWinningLetter.getPurchasePlanCode()); |
| | | wrapper.like(StringUtils.isNotEmpty(purchaseWinningLetter.getWinningCode()), PurchaseWinningLetterEntity::getWinningCode,purchaseWinningLetter.getWinningCode()); |
| | | wrapper.orderByDesc(PurchaseWinningLetterEntity::getCreateTime); |
| | | return R.ok(purchaseWinningLetterService.page(page, wrapper)); |
| | | public R getPurchaseWinningLetterPage(@ParameterObject Page page, PurchaseWinningLetterQueryDTO queryDTO) { |
| | | return R.ok(purchaseWinningLetterService.pageNew(page, queryDTO)); |
| | | } |
| | | |
| | | |
| | |
| | | public R<List<PurchaseWinningLetterEntity>> getDropdownnList() { |
| | | return R.ok(purchaseWinningLetterService.list()); |
| | | } |
| | | |
| | | /** |
| | | * 根据验收查询设备下拉 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getDropdownnById/{id}") |
| | | public R<List<Device>> getDropdownnByWinningId(@PathVariable("id")Long id) { |
| | | return R.ok(purchaseWinningLetterService.getDropdownnByWinningId(id)); |
| | | } |
| | | } |
| | |
| | | List<Device> getDeviceSelectListByLedgerId(@Param("ledgerId") Long ledgerId); |
| | | |
| | | List<Device> getDeviceListByContractId(@Param("contractId")Long contractId); |
| | | |
| | | List<Device> getDropdownnByWinningId(@Param("id") Long id); |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface DeviceTechnicalAgreementMapper extends PlatformxBaseMapper<DeviceTechnicalAgreemnt> { |
| | | |
| | | |
| | | IPage<DeviceTechnicalAgreementPageVo> page(Page page, @Param("queryDTO") DeviceTechnicalAgreemntQueryDTO queryDTO); |
| | | |
| | | } |
| | |
| | | package com.by4cloud.platformx.device.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.by4cloud.platformx.common.data.datascope.PlatformxBaseMapper; |
| | | import com.by4cloud.platformx.device.dto.PurchaseWinningLetterQueryDTO; |
| | | import com.by4cloud.platformx.device.entity.PurchaseWinningLetterEntity; |
| | | import com.by4cloud.platformx.device.entity.vo.PurchaseWinningLetterPageVo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface PurchaseWinningLetterMapper extends PlatformxBaseMapper<PurchaseWinningLetterEntity> { |
| | | |
| | | |
| | | IPage<PurchaseWinningLetterPageVo> pageNew(Page page,@Param("queryDTO") PurchaseWinningLetterQueryDTO queryDTO); |
| | | } |
| | |
| | | import com.by4cloud.platformx.device.dto.DeviceTechnicalAgreemntQueryDTO; |
| | | import com.by4cloud.platformx.device.entity.DeviceTechnicalAgreemnt; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface DeviceTechnicalAgreementService extends IService<DeviceTechnicalAgreemnt> { |
| | | |
| | | IPage pageNew(Page page, DeviceTechnicalAgreemntQueryDTO queryDTO); |
| | | |
| | | List<DeviceTechnicalAgreemnt> getDropdownnList(Long deviceId); |
| | | } |
| | |
| | | package com.by4cloud.platformx.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.device.dto.PurchaseWinningLetterQueryDTO; |
| | | import com.by4cloud.platformx.device.entity.Device; |
| | | import com.by4cloud.platformx.device.entity.PurchaseWinningLetterEntity; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface PurchaseWinningLetterService extends IService<PurchaseWinningLetterEntity> { |
| | | |
| | | R saveNew(PurchaseWinningLetterEntity purchaseWinningLetter); |
| | | |
| | | IPage pageNew(Page page, PurchaseWinningLetterQueryDTO queryDTO); |
| | | |
| | | List<Device> getDropdownnByWinningId(Long id); |
| | | } |
| | |
| | | package com.by4cloud.platformx.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import com.by4cloud.platformx.device.mapper.DeviceTechnicalAgreementMapper; |
| | | import com.by4cloud.platformx.device.service.DeviceTechnicalAgreementService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设备技术协议 |
| | | * |
| | |
| | | public IPage pageNew(Page page, DeviceTechnicalAgreemntQueryDTO queryDTO) { |
| | | return baseMapper.page(page,queryDTO); |
| | | } |
| | | |
| | | @Override |
| | | public List<DeviceTechnicalAgreemnt> getDropdownnList(Long deviceId) { |
| | | QueryWrapper<DeviceTechnicalAgreemnt> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("device_id",deviceId); |
| | | List<DeviceTechnicalAgreemnt> list = baseMapper.selectList(queryWrapper); |
| | | return list; |
| | | } |
| | | } |
| | |
| | | package com.by4cloud.platformx.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.device.dto.PurchaseWinningLetterQueryDTO; |
| | | import com.by4cloud.platformx.device.entity.Device; |
| | | import com.by4cloud.platformx.device.entity.PurchaseTendrOrderEntity; |
| | | import com.by4cloud.platformx.device.entity.PurchaseWinningLetterEntity; |
| | | import com.by4cloud.platformx.device.mapper.DeviceMapper; |
| | | import com.by4cloud.platformx.device.mapper.PurchaseTendrOrderMapper; |
| | | import com.by4cloud.platformx.device.mapper.PurchaseWinningLetterMapper; |
| | | import com.by4cloud.platformx.device.service.PurchaseWinningLetterService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 中标通知书 |
| | | * |
| | |
| | | public class PurchaseWinningLetterServiceImpl extends ServiceImpl<PurchaseWinningLetterMapper, PurchaseWinningLetterEntity> implements PurchaseWinningLetterService { |
| | | |
| | | private final PurchaseTendrOrderMapper orderMapper; |
| | | private final DeviceMapper deviceMapper; |
| | | |
| | | @Override |
| | | public R saveNew(PurchaseWinningLetterEntity purchaseWinningLetter) { |
| | | baseMapper.insert(purchaseWinningLetter); |
| | | QueryWrapper<PurchaseTendrOrderEntity> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("purchase_plan_code",purchaseWinningLetter.getPurchasePlanCode()); |
| | | PurchaseTendrOrderEntity orderEntity = orderMapper.selectOne(queryWrapper); |
| | | PurchaseTendrOrderEntity orderEntity = orderMapper.selectById(purchaseWinningLetter.getOrderId()); |
| | | if (orderEntity!=null){ |
| | | orderEntity.setStatus("2"); |
| | | orderMapper.updateById(orderEntity); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public IPage pageNew(Page page, PurchaseWinningLetterQueryDTO queryDTO) { |
| | | return baseMapper.pageNew(page,queryDTO); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> getDropdownnByWinningId(Long id) { |
| | | List<Device> list = deviceMapper.getDropdownnByWinningId(id); |
| | | return list; |
| | | } |
| | | } |
| | |
| | | and ci.contract_id = #{contractId} |
| | | and ci.device_id = d.id ) |
| | | </select> |
| | | <select id="getDropdownnByWinningId" resultType="com.by4cloud.platformx.device.entity.Device"> |
| | | select |
| | | * |
| | | from |
| | | device d |
| | | where |
| | | d.del_flag = '0' |
| | | and exists ( |
| | | select |
| | | pwl.device_id |
| | | from |
| | | purchase_winning_letter pwl |
| | | where |
| | | pwl.del_flag = '0' |
| | | and pwl.id = #{id} |
| | | and pwl.device_id = d.id ) |
| | | </select> |
| | | </mapper> |
| | |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | <select id="pageNew" resultType="com.by4cloud.platformx.device.entity.vo.PurchaseWinningLetterPageVo"> |
| | | select |
| | | pwl.id, |
| | | pto.order_name, |
| | | pwl.winning_code, |
| | | pwl.purchase_plan_code , |
| | | pwl.device_code, |
| | | pwl.device_name, |
| | | pwl.arrival_month, |
| | | pwl.quantity, |
| | | pwl.total_winning_amount, |
| | | pwl.location_used, |
| | | pwl.winning_bidder, |
| | | pwl.winning_name |
| | | from |
| | | purchase_winning_letter pwl |
| | | join purchase_tendr_order pto on |
| | | pwl.order_id = pto.id |
| | | where |
| | | pwl.del_flag = '0' |
| | | <if test="queryDTO.orderName != null and queryDTO.orderName !=''"> |
| | | and pto.order_name like CONCAT('%', #{queryDTO.orderName}, '%') |
| | | </if> |
| | | <if test="queryDTO.winningName != null and queryDTO.winningName !=''"> |
| | | and pwl.winning_name like CONCAT('%', #{queryDTO.winningName}, '%') |
| | | </if> |
| | | <if test="queryDTO.winningCode != null and queryDTO.winningCode !=''"> |
| | | and pwl.winning_code like CONCAT('%', #{queryDTO.winningCode}, '%') |
| | | </if> |
| | | order by pwl.create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="pageNew" resultType="com.by4cloud.platformx.device.entity.vo.ReceivingNotePageVo"> |
| | | select |
| | | rn.id, |
| | | rn.note_name, |
| | | rn.resource_type , |
| | | rn.release_date , |
| | | rn.release_code, |
| | |
| | | <if test="queryDTO.releaseCode != null and queryDTO.releaseCode !=''"> |
| | | and rn.release_code like CONCAT('%', #{queryDTO.releaseCode}, '%') |
| | | </if> |
| | | <if test="queryDTO.noteName != null and queryDTO.noteName !=''"> |
| | | and rn.note_name like CONCAT('%', #{queryDTO.noteName}, '%') |
| | | </if> |
| | | <if test="queryDTO.contractName != null and queryDTO.contractName !=''"> |
| | | and c.name like CONCAT('%', #{queryDTO.contractName}, '%') |
| | | </if> |