@@ -13,7 +13,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.hz.pm.api.external.todo.dto.MhTodoRequestDTO; | import com.hz.pm.api.external.todo.dto.MhTodoRequestDTO; | ||||
import com.hz.pm.api.external.todo.dto.MhTodoRetDTO; | import com.hz.pm.api.external.todo.dto.MhTodoRetDTO; | ||||
import com.hz.pm.api.external.todo.enumerization.MHTodoTypeEnum; | import com.hz.pm.api.external.todo.enumerization.MHTodoTypeEnum; | ||||
import com.hz.pm.api.sys.entity.MhTodoRecord; | |||||
import com.hz.pm.api.sys.model.entity.MhTodoRecord; | |||||
import com.hz.pm.api.sys.service.IMhTodoRecordService; | import com.hz.pm.api.sys.service.IMhTodoRecordService; | ||||
import com.hz.pm.api.user.security.model.UserFullInfoDTO; | import com.hz.pm.api.user.security.model.UserFullInfoDTO; | ||||
import com.ningdatech.basic.exception.BizException; | import com.ningdatech.basic.exception.BizException; | ||||
@@ -26,7 +26,6 @@ import org.springframework.transaction.annotation.Transactional; | |||||
import java.util.Collection; | import java.util.Collection; | ||||
import java.util.Collections; | import java.util.Collections; | ||||
import java.util.HashMap; | |||||
import java.util.List; | import java.util.List; | ||||
/** | /** | ||||
@@ -35,8 +35,8 @@ import java.util.Objects; | |||||
* @Date 2023/7/31 14:48 | * @Date 2023/7/31 14:48 | ||||
* @Author PoffyZhang | * @Author PoffyZhang | ||||
*/ | */ | ||||
@Component | |||||
@Slf4j | @Slf4j | ||||
@Component | |||||
@RequiredArgsConstructor | @RequiredArgsConstructor | ||||
public class OperationManage { | public class OperationManage { | ||||
@@ -85,6 +85,7 @@ public class OperationManage { | |||||
curr.setUpdateOn(now); | curr.setUpdateOn(now); | ||||
curr.setUpdateBy(user.getUsername()); | curr.setUpdateBy(user.getUsername()); | ||||
operationService.saveOrUpdate(curr); | operationService.saveOrUpdate(curr); | ||||
long operationCount = operationService.countByBidIds(purchaseMap.keySet()); | long operationCount = operationService.countByBidIds(purchaseMap.keySet()); | ||||
if (operationCount == purchaseMap.size()) { | if (operationCount == purchaseMap.size()) { | ||||
// 修改项目状态 | // 修改项目状态 | ||||
@@ -267,6 +267,12 @@ public class PurchaseManage { | |||||
purchase.setBidEndTime(w.getBidEndTime()); | purchase.setBidEndTime(w.getBidEndTime()); | ||||
purchase.setId(w.getBidId()); | purchase.setId(w.getBidId()); | ||||
purchase.setProjectId(projectId); | purchase.setProjectId(projectId); | ||||
purchase.setPurchaseConnectAddress(w.getPurchaseConnectAddress()); | |||||
purchase.setPurchasePhone(w.getPurchasePhone()); | |||||
purchase.setPurchaseRemark(w.getPurchaseRemark()); | |||||
purchase.setPurchaseScope(w.getPurchaseScope()); | |||||
purchase.setPurchaseUnit(w.getPurchaseUnit()); | |||||
purchase.setPurchaseContact(w.getPurchaseContact()); | |||||
if (purchase.getId() == null) { | if (purchase.getId() == null) { | ||||
purchase.setCreateBy(user.getUserIdStr()); | purchase.setCreateBy(user.getUserIdStr()); | ||||
} | } | ||||
@@ -50,4 +50,13 @@ public class OperationReq { | |||||
@ApiModelProperty("试运行开始时间") | @ApiModelProperty("试运行开始时间") | ||||
private LocalDateTime pilotRunStartDate; | private LocalDateTime pilotRunStartDate; | ||||
@ApiModelProperty("适配改造时间") | |||||
private LocalDateTime adaptationTime; | |||||
@ApiModelProperty("系统自测时间") | |||||
private LocalDateTime selfTestTime; | |||||
@ApiModelProperty("测试验证时间") | |||||
private LocalDateTime testValidTime; | |||||
} | } |
@@ -65,4 +65,13 @@ public class Operation { | |||||
@ApiModelProperty("试运行开始时间") | @ApiModelProperty("试运行开始时间") | ||||
private LocalDateTime pilotRunStartDate; | private LocalDateTime pilotRunStartDate; | ||||
@ApiModelProperty("适配改造时间") | |||||
private LocalDateTime adaptationTime; | |||||
@ApiModelProperty("系统自测时间") | |||||
private LocalDateTime selfTestTime; | |||||
@ApiModelProperty("测试验证时间") | |||||
private LocalDateTime testValidTime; | |||||
} | } |
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | import lombok.Data; | ||||
import javax.validation.constraints.NotBlank; | |||||
import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
@@ -100,6 +101,24 @@ public class Purchase { | |||||
private Integer status; | private Integer status; | ||||
@ApiModelProperty("采购范围:1 公开采购、2 非公开采购") | |||||
private Integer purchaseScope; | |||||
@ApiModelProperty("采购单位") | |||||
private String purchaseUnit; | |||||
@ApiModelProperty("采购联系人") | |||||
private String purchaseContact; | |||||
@ApiModelProperty("采购联系电话") | |||||
private String purchasePhone; | |||||
@ApiModelProperty("采购联系地址") | |||||
private String purchaseConnectAddress; | |||||
@ApiModelProperty("采购说明") | |||||
private String purchaseRemark; | |||||
@ApiModelProperty("初验材料") | @ApiModelProperty("初验材料") | ||||
private String preliminaryInspectionMaterials; | private String preliminaryInspectionMaterials; | ||||
@@ -0,0 +1,26 @@ | |||||
package com.hz.pm.api.projectdeclared.model.enumerization; | |||||
import lombok.AllArgsConstructor; | |||||
import lombok.Getter; | |||||
/** | |||||
* <p> | |||||
* BidTypeEnum | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 13:37 2024/3/25 | |||||
*/ | |||||
@Getter | |||||
@AllArgsConstructor | |||||
public enum BidTypeEnum { | |||||
BUILD(1, "建设类(无应用)"), | |||||
BUILD_APP(2, "建设类(总集成,软件开发)"), | |||||
SERVICE(3, "服务类(单一集成,项目监理,系统运维,咨询设计,系统测评,财务审计)"), | |||||
SERVICE_RENT(4, "服务类(产品采购、政务内网服务器租赁服务,政务外网云建设租赁服务)"); | |||||
private final Integer code; | |||||
private final String val; | |||||
} |
@@ -0,0 +1,24 @@ | |||||
package com.hz.pm.api.projectdeclared.model.enumerization; | |||||
import lombok.AllArgsConstructor; | |||||
import lombok.Getter; | |||||
/** | |||||
* <p> | |||||
* PurchaseScopeEnum | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 13:28 2024/3/25 | |||||
*/ | |||||
@Getter | |||||
@AllArgsConstructor | |||||
public enum PurchaseScopeEnum { | |||||
PUBLIC(1, "公开采购"), | |||||
PRIVATE(2, "非公开采购"); | |||||
private final Integer code; | |||||
private final String val; | |||||
} |
@@ -64,9 +64,31 @@ public class SubmitPurchaseNoticeReq { | |||||
@NotBlank(message = "采购方式不能为空") | @NotBlank(message = "采购方式不能为空") | ||||
private String purchaseMethod; | private String purchaseMethod; | ||||
@ApiModelProperty("采购范围:1 公开采购、2 非公开采购") | |||||
private Integer purchaseScope; | |||||
@ApiModelProperty("标段类型") | |||||
private Integer bidType; | |||||
@ApiModelProperty("招标文件") | @ApiModelProperty("招标文件") | ||||
@NotBlank(message = "招标文件不能为空") | @NotBlank(message = "招标文件不能为空") | ||||
private String bidDoc; | private String bidDoc; | ||||
@ApiModelProperty("采购单位") | |||||
private String purchaseUnit; | |||||
@ApiModelProperty("采购联系人") | |||||
private String purchaseContact; | |||||
@ApiModelProperty("采购联系电话") | |||||
private String purchasePhone; | |||||
@ApiModelProperty("采购联系地址") | |||||
private String purchaseConnectAddress; | |||||
@ApiModelProperty("采购说明") | |||||
private String purchaseRemark; | |||||
} | } | ||||
} | } |
@@ -14,7 +14,7 @@ import com.hz.pm.api.projectlib.model.entity.Project; | |||||
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | ||||
import com.hz.pm.api.projectlib.service.IMhProjectService; | import com.hz.pm.api.projectlib.service.IMhProjectService; | ||||
import com.hz.pm.api.projectlib.service.IProjectService; | import com.hz.pm.api.projectlib.service.IProjectService; | ||||
import com.hz.pm.api.sys.entity.MhTodoRecord; | |||||
import com.hz.pm.api.sys.model.entity.MhTodoRecord; | |||||
import com.hz.pm.api.sys.service.IMhTodoRecordService; | import com.hz.pm.api.sys.service.IMhTodoRecordService; | ||||
import com.hz.pm.api.user.helper.MhUnitCache; | import com.hz.pm.api.user.helper.MhUnitCache; | ||||
import com.hz.pm.api.user.model.dto.UnitDTO; | import com.hz.pm.api.user.model.dto.UnitDTO; | ||||
@@ -0,0 +1,38 @@ | |||||
package com.hz.pm.api.sys.controller; | |||||
import com.hz.pm.api.sys.manage.StagingManage; | |||||
import com.hz.pm.api.sys.model.dto.StagingDTO; | |||||
import com.hz.pm.api.sys.model.enumeration.StagingType; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import lombok.AllArgsConstructor; | |||||
import org.springframework.web.bind.annotation.*; | |||||
import javax.validation.Valid; | |||||
/** | |||||
* <p> | |||||
* 通用暂存前端控制器 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-03-25 | |||||
*/ | |||||
@RestController | |||||
@AllArgsConstructor | |||||
@RequestMapping("/api/v1/staging") | |||||
public class StagingController { | |||||
private final StagingManage stagingManage; | |||||
@PostMapping("/save") | |||||
@ApiOperation("保存暂存") | |||||
public void saveStaging(@Valid @RequestBody StagingDTO staging) { | |||||
stagingManage.save(staging); | |||||
} | |||||
@GetMapping(value = {"/detail/{type}", "/detail/{type}/{bizId}"}) | |||||
public StagingDTO detail(@PathVariable StagingType type, @PathVariable(required = false) String bizId) { | |||||
return stagingManage.detail(type, bizId); | |||||
} | |||||
} |
@@ -0,0 +1,61 @@ | |||||
package com.hz.pm.api.sys.manage; | |||||
import cn.hutool.core.util.StrUtil; | |||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.hz.pm.api.common.model.constant.BizConst; | |||||
import com.hz.pm.api.sys.model.dto.StagingDTO; | |||||
import com.hz.pm.api.sys.model.entity.Staging; | |||||
import com.hz.pm.api.sys.model.enumeration.StagingType; | |||||
import com.hz.pm.api.sys.service.IStagingService; | |||||
import com.hz.pm.api.user.util.LoginUserUtil; | |||||
import lombok.AllArgsConstructor; | |||||
import org.springframework.stereotype.Component; | |||||
import java.time.LocalDateTime; | |||||
/** | |||||
* <p> | |||||
* StagingManage | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 14:21 2024/3/25 | |||||
*/ | |||||
@Component | |||||
@AllArgsConstructor | |||||
public class StagingManage { | |||||
private final IStagingService stagingService; | |||||
public void save(StagingDTO staging) { | |||||
Staging entity = new Staging(); | |||||
entity.setType(staging.getType().name()); | |||||
entity.setContent(staging.getContent()); | |||||
entity.setBizId(staging.getBizId()); | |||||
entity.setCreateBy(LoginUserUtil.getUserId()); | |||||
entity.setCreateOn(LocalDateTime.now()); | |||||
stagingService.save(entity); | |||||
} | |||||
public StagingDTO detail(StagingType type, String bizId) { | |||||
Wrapper<Staging> query = Wrappers.lambdaQuery(Staging.class) | |||||
.eq(Staging::getType, type) | |||||
.eq(Staging::getCreateBy, LoginUserUtil.getUserId()) | |||||
.eq(StrUtil.isNotBlank(bizId), Staging::getBizId, bizId) | |||||
.orderByDesc(Staging::getCreateOn, Staging::getId) | |||||
.last(BizConst.LIMIT_1); | |||||
Staging staging = stagingService.getOne(query); | |||||
if (staging == null) { | |||||
return null; | |||||
} | |||||
StagingDTO detail = new StagingDTO(); | |||||
detail.setId(staging.getId()); | |||||
detail.setContent(staging.getType()); | |||||
detail.setType(StagingType.valueOf(staging.getType())); | |||||
detail.setBizId(staging.getBizId()); | |||||
return detail; | |||||
} | |||||
} |
@@ -1,6 +1,6 @@ | |||||
package com.hz.pm.api.sys.mapper; | package com.hz.pm.api.sys.mapper; | ||||
import com.hz.pm.api.sys.entity.MhTodoRecord; | |||||
import com.hz.pm.api.sys.model.entity.MhTodoRecord; | |||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
/** | /** | ||||
@@ -0,0 +1,16 @@ | |||||
package com.hz.pm.api.sys.mapper; | |||||
import com.hz.pm.api.sys.model.entity.Staging; | |||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
/** | |||||
* <p> | |||||
* Mapper 接口 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-03-25 | |||||
*/ | |||||
public interface StagingMapper extends BaseMapper<Staging> { | |||||
} |
@@ -0,0 +1,5 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
<mapper namespace="com.hz.pm.api.sys.mapper.StagingMapper"> | |||||
</mapper> |
@@ -0,0 +1,35 @@ | |||||
package com.hz.pm.api.sys.model.dto; | |||||
import com.hz.pm.api.sys.model.enumeration.StagingType; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotBlank; | |||||
import javax.validation.constraints.NotNull; | |||||
/** | |||||
* <p> | |||||
* StagingDTO | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 14:24 2024/3/25 | |||||
*/ | |||||
@Data | |||||
public class StagingDTO { | |||||
@ApiModelProperty("暂存ID") | |||||
private Long id; | |||||
@ApiModelProperty("唯一业务标识") | |||||
private String bizId; | |||||
@ApiModelProperty("暂存类型") | |||||
@NotNull(message = "暂存类型不能为空") | |||||
private StagingType type; | |||||
@ApiModelProperty("暂存内容") | |||||
@NotBlank(message = "暂存内容不能为空") | |||||
private String content; | |||||
} |
@@ -1,4 +1,4 @@ | |||||
package com.hz.pm.api.sys.entity; | |||||
package com.hz.pm.api.sys.model.entity; | |||||
import com.baomidou.mybatisplus.annotation.IdType; | import com.baomidou.mybatisplus.annotation.IdType; | ||||
import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; |
@@ -0,0 +1,42 @@ | |||||
package com.hz.pm.api.sys.model.entity; | |||||
import com.baomidou.mybatisplus.annotation.IdType; | |||||
import com.baomidou.mybatisplus.annotation.TableId; | |||||
import com.baomidou.mybatisplus.annotation.TableName; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Getter; | |||||
import lombok.Setter; | |||||
import java.io.Serializable; | |||||
import java.time.LocalDateTime; | |||||
/** | |||||
* <p> | |||||
* 通用暂存表 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-03-25 | |||||
*/ | |||||
@Getter | |||||
@Setter | |||||
@TableName("ND_STAGING") | |||||
@ApiModel(value = "NdStaging对象") | |||||
public class Staging implements Serializable { | |||||
private static final long serialVersionUID = 1L; | |||||
@TableId(value = "ID", type = IdType.AUTO) | |||||
private Long id; | |||||
private String type; | |||||
private String content; | |||||
private String bizId; | |||||
private Long createBy; | |||||
private LocalDateTime createOn; | |||||
} |
@@ -0,0 +1,25 @@ | |||||
package com.hz.pm.api.sys.model.enumeration; | |||||
import lombok.AllArgsConstructor; | |||||
import lombok.Getter; | |||||
/** | |||||
* <p> | |||||
* StagingType | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 14:26 2024/3/25 | |||||
*/ | |||||
@Getter | |||||
@AllArgsConstructor | |||||
public enum StagingType { | |||||
PURCHASE_NOTICE("发布采购公告"), | |||||
PURCHASE_RECORD("采购信息备案"), | |||||
CONSTRUCTION_RECORD("采购合同备案"), | |||||
OPERATION_PLAN("填写实施计划"); | |||||
private final String val; | |||||
} |
@@ -1,10 +1,9 @@ | |||||
package com.hz.pm.api.sys.service; | package com.hz.pm.api.sys.service; | ||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; | import com.baomidou.mybatisplus.core.conditions.Wrapper; | ||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.hz.pm.api.external.todo.enumerization.MHTodoTypeEnum; | import com.hz.pm.api.external.todo.enumerization.MHTodoTypeEnum; | ||||
import com.hz.pm.api.sys.entity.MhTodoRecord; | |||||
import com.hz.pm.api.sys.model.entity.MhTodoRecord; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import java.util.Collection; | import java.util.Collection; | ||||
@@ -0,0 +1,16 @@ | |||||
package com.hz.pm.api.sys.service; | |||||
import com.hz.pm.api.sys.model.entity.Staging; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | |||||
/** | |||||
* <p> | |||||
* 服务类 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-03-25 | |||||
*/ | |||||
public interface IStagingService extends IService<Staging> { | |||||
} |
@@ -1,6 +1,6 @@ | |||||
package com.hz.pm.api.sys.service.impl; | package com.hz.pm.api.sys.service.impl; | ||||
import com.hz.pm.api.sys.entity.MhTodoRecord; | |||||
import com.hz.pm.api.sys.model.entity.MhTodoRecord; | |||||
import com.hz.pm.api.sys.mapper.MhTodoRecordMapper; | import com.hz.pm.api.sys.mapper.MhTodoRecordMapper; | ||||
import com.hz.pm.api.sys.service.IMhTodoRecordService; | import com.hz.pm.api.sys.service.IMhTodoRecordService; | ||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
@@ -0,0 +1,20 @@ | |||||
package com.hz.pm.api.sys.service.impl; | |||||
import com.hz.pm.api.sys.model.entity.Staging; | |||||
import com.hz.pm.api.sys.mapper.StagingMapper; | |||||
import com.hz.pm.api.sys.service.IStagingService; | |||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* <p> | |||||
* 服务实现类 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2024-03-25 | |||||
*/ | |||||
@Service | |||||
public class StagingServiceImpl extends ServiceImpl<StagingMapper, Staging> implements IStagingService { | |||||
} |