【数据资产】
1、数据需求-修改上架状态
Showing
6 changed files
with
42 additions
and
5 deletions
| 1 | package com.csbr.qingcloud.portal.controller; | 1 | package com.csbr.qingcloud.portal.controller; |
| 2 | 2 | ||
| 3 | import com.csbr.cloud.common.entity.CsbrUpdate; | ||
| 3 | import com.csbr.cloud.common.response.CommonRes; | 4 | import com.csbr.cloud.common.response.CommonRes; |
| 4 | import com.csbr.qingcloud.portal.domain.vo.*; | 5 | import com.csbr.qingcloud.portal.domain.vo.*; |
| 5 | import csbr.cloud.entity.annotation.SystemLog; | 6 | import csbr.cloud.entity.annotation.SystemLog; |
| ... | @@ -11,6 +12,7 @@ import io.swagger.v3.oas.annotations.Parameter; | ... | @@ -11,6 +12,7 @@ import io.swagger.v3.oas.annotations.Parameter; |
| 11 | import io.swagger.v3.oas.annotations.tags.Tag; | 12 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 12 | import jakarta.annotation.Resource; | 13 | import jakarta.annotation.Resource; |
| 13 | import jakarta.validation.Valid; | 14 | import jakarta.validation.Valid; |
| 15 | import org.springframework.validation.annotation.Validated; | ||
| 14 | import org.springframework.web.bind.annotation.*; | 16 | import org.springframework.web.bind.annotation.*; |
| 15 | 17 | ||
| 16 | import java.util.List; | 18 | import java.util.List; |
| ... | @@ -46,6 +48,12 @@ public class DemandController { | ... | @@ -46,6 +48,12 @@ public class DemandController { |
| 46 | demandService.updateDemand(vo); | 48 | demandService.updateDemand(vo); |
| 47 | return CommonRes.success(true); | 49 | return CommonRes.success(true); |
| 48 | } | 50 | } |
| 51 | |||
| 52 | @PostMapping("/update-grounding-pick") | ||
| 53 | @Operation(summary= "数据需求-修改上架状态") | ||
| 54 | public CommonRes<Boolean> updateGroundingPick(@Validated(value = {CsbrUpdate.class})@RequestBody @Valid DemandRQVO vo) { | ||
| 55 | return CommonRes.success(demandService.updateGroundingPick(vo)); | ||
| 56 | } | ||
| 49 | 57 | ||
| 50 | @DeleteMapping("/delete") | 58 | @DeleteMapping("/delete") |
| 51 | @SystemLog(value = "数据需求-批量删除") | 59 | @SystemLog(value = "数据需求-批量删除") | ... | ... |
| ... | @@ -221,6 +221,9 @@ public class DemandRQVO extends FlowRQBaseVO { | ... | @@ -221,6 +221,9 @@ public class DemandRQVO extends FlowRQBaseVO { |
| 221 | 221 | ||
| 222 | @Schema(description = "加工单位名称") | 222 | @Schema(description = "加工单位名称") |
| 223 | private String processCompanyName; | 223 | private String processCompanyName; |
| 224 | |||
| 225 | @Schema(title = "上架状态(Y 上架 N 下架)") | ||
| 226 | private String listingStatus = "N"; | ||
| 224 | 227 | ||
| 225 | /******** 子对象 *****/ | 228 | /******** 子对象 *****/ |
| 226 | 229 | ... | ... |
| 1 | package com.csbr.qingcloud.portal.domain.vo; | 1 | package com.csbr.qingcloud.portal.domain.vo; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import com.csbr.cloud.workflow.domain.vo.appove.BizApproveVO; |
| 4 | import com.fasterxml.jackson.annotation.JsonFormat; | 4 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 5 | import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | import lombok.Data; | 6 | import lombok.Data; |
| 6 | import com.csbr.cloud.workflow.domain.vo.appove.BizApproveVO; | 7 | |
| 7 | import java.math.BigDecimal; | 8 | import java.math.BigDecimal; |
| 8 | import java.util.Date; | 9 | import java.util.Date; |
| 9 | 10 | ||
| ... | @@ -243,7 +244,10 @@ public class DemandRSVO { | ... | @@ -243,7 +244,10 @@ public class DemandRSVO { |
| 243 | */ | 244 | */ |
| 244 | @Schema(title = "跨平台审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") | 245 | @Schema(title = "跨平台审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") |
| 245 | private String crossPlatformApproveState; | 246 | private String crossPlatformApproveState; |
| 246 | 247 | ||
| 248 | @Schema(title = "上架状态(Y 上架 N 下架)") | ||
| 249 | private String listingStatus; | ||
| 250 | |||
| 247 | /******** 库表存储属性 需处理 *****/ | 251 | /******** 库表存储属性 需处理 *****/ |
| 248 | 252 | ||
| 249 | /******** 自定义扩展 *****/ | 253 | /******** 自定义扩展 *****/ | ... | ... |
| ... | @@ -230,4 +230,7 @@ public class MfDemand extends BaseShardingDO { | ... | @@ -230,4 +230,7 @@ public class MfDemand extends BaseShardingDO { |
| 230 | @Name("审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") | 230 | @Name("审批状态(N 初始 A 审批中 Y 已通过 R 驳回 C 已撤销)") |
| 231 | private String crossPlatformApproveState; | 231 | private String crossPlatformApproveState; |
| 232 | 232 | ||
| 233 | @Name("上架状态(Y 上架 N 下架)") | ||
| 234 | private String listingStatus; | ||
| 235 | |||
| 233 | } | 236 | } | ... | ... |
| ... | @@ -84,4 +84,11 @@ public interface DemandService { | ... | @@ -84,4 +84,11 @@ public interface DemandService { |
| 84 | * @return | 84 | * @return |
| 85 | */ | 85 | */ |
| 86 | List<ProcessOrderProcessDtlRSVO> listByProcessOrderNo(); | 86 | List<ProcessOrderProcessDtlRSVO> listByProcessOrderNo(); |
| 87 | |||
| 88 | /** | ||
| 89 | * 数据需求-修改上架状态 | ||
| 90 | * @param vo | ||
| 91 | * @return | ||
| 92 | */ | ||
| 93 | Boolean updateGroundingPick(DemandRQVO vo); | ||
| 87 | } | 94 | } | ... | ... |
| ... | @@ -322,12 +322,14 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -322,12 +322,14 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 322 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); | 322 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); |
| 323 | } | 323 | } |
| 324 | String orderNo = null; | 324 | String orderNo = null; |
| 325 | LambdaUpdateWrapper<MfDemand> updateWrapper = new LambdaUpdateWrapper<>(); | ||
| 325 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState()) && !dto.getIsZqPlatformApprove() && StringUtils.isEmpty(entity.getZqName())) { | 326 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState()) && !dto.getIsZqPlatformApprove() && StringUtils.isEmpty(entity.getZqName())) { |
| 326 | //生成加工单 | 327 | //生成加工单 |
| 327 | orderNo = addOrder(mfDemandService.getById(dto.getBizGuid()),dto); | 328 | orderNo = addOrder(mfDemandService.getById(dto.getBizGuid()),dto); |
| 329 | // 判断是否审核自动上架 | ||
| 330 | updateWrapper.set(MfDemand::getListingStatus, "Y"); | ||
| 328 | } | 331 | } |
| 329 | // 同步更新审批状态 | 332 | // 同步更新审批状态 |
| 330 | LambdaUpdateWrapper<MfDemand> updateWrapper = new LambdaUpdateWrapper<>(); | ||
| 331 | updateWrapper.set(MfDemand::getBizApproveState, dto.getApprovalState()); | 333 | updateWrapper.set(MfDemand::getBizApproveState, dto.getApprovalState()); |
| 332 | updateWrapper.set(StringUtils.isNotBlank(orderNo),MfDemand::getProcessOrderNo, orderNo); | 334 | updateWrapper.set(StringUtils.isNotBlank(orderNo),MfDemand::getProcessOrderNo, orderNo); |
| 333 | updateWrapper.set(StringUtils.isNotBlank(orderNo),MfDemand::getProcessingGenerateTime, new Date()); | 335 | updateWrapper.set(StringUtils.isNotBlank(orderNo),MfDemand::getProcessingGenerateTime, new Date()); |
| ... | @@ -345,12 +347,14 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -345,12 +347,14 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 345 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); | 347 | throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToSelectMessage(FUNCTION_NAME)); |
| 346 | } | 348 | } |
| 347 | String orderNo = null; | 349 | String orderNo = null; |
| 350 | LambdaUpdateWrapper<MfDemand> updateWrapper = new LambdaUpdateWrapper<>(); | ||
| 348 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())) { | 351 | if (ApprovalStateEnum.PASSED.getValue().equals(dto.getApprovalState())) { |
| 349 | //生成加工单 | 352 | //生成加工单 |
| 350 | orderNo = addOrder(mfDemandService.getById(dto.getBizGuid()),dto); | 353 | orderNo = addOrder(mfDemandService.getById(dto.getBizGuid()),dto); |
| 354 | // 判断是否审核自动上架 | ||
| 355 | updateWrapper.set(MfDemand::getListingStatus, "Y"); | ||
| 351 | } | 356 | } |
| 352 | // 同步更新审批状态 | 357 | // 同步更新审批状态 |
| 353 | LambdaUpdateWrapper<MfDemand> updateWrapper = new LambdaUpdateWrapper<>(); | ||
| 354 | updateWrapper.set(MfDemand::getBizApproveState, dto.getApprovalState()); | 358 | updateWrapper.set(MfDemand::getBizApproveState, dto.getApprovalState()); |
| 355 | updateWrapper.set(MfDemand::getCrossPlatformApproveState, dto.getApprovalState()); | 359 | updateWrapper.set(MfDemand::getCrossPlatformApproveState, dto.getApprovalState()); |
| 356 | updateWrapper.set(StringUtils.isNotBlank(orderNo),MfDemand::getProcessOrderNo, orderNo); | 360 | updateWrapper.set(StringUtils.isNotBlank(orderNo),MfDemand::getProcessOrderNo, orderNo); |
| ... | @@ -440,6 +444,14 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -440,6 +444,14 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 440 | return dataProcessBasicFeign.processOrderList(guids).getData(); | 444 | return dataProcessBasicFeign.processOrderList(guids).getData(); |
| 441 | } | 445 | } |
| 442 | 446 | ||
| 447 | @Override | ||
| 448 | public Boolean updateGroundingPick(DemandRQVO vo) { | ||
| 449 | LambdaUpdateWrapper<MfDemand> updateWrapper = Wrappers.lambdaUpdate(); | ||
| 450 | updateWrapper.eq(MfDemand::getGuid, vo.getGuid()) | ||
| 451 | .set(MfDemand::getListingStatus, vo.getListingStatus()); | ||
| 452 | return mfDemandService.update(updateWrapper); | ||
| 453 | } | ||
| 454 | |||
| 443 | /** | 455 | /** |
| 444 | * 获取发起流程参数 | 456 | * 获取发起流程参数 |
| 445 | * | 457 | * | ... | ... |
-
Please register or sign in to post a comment