diff --git a/config/db/V7.7__resource_add_price.sql b/config/db/V7.7__resource_add_price.sql new file mode 100644 index 00000000..08b70e42 --- /dev/null +++ b/config/db/V7.7__resource_add_price.sql @@ -0,0 +1,11 @@ +-- 2022-11-22 资源增加价格字段,申请表增加申请价格 + +ALTER TABLE t_ability_application ADD COLUMN `apply_price` BIGINT NOT NULL DEFAULT 0 COMMENT '申请价格'; + +ALTER TABLE tb_data_resource ADD COLUMN `price` BIGINT NOT NULL DEFAULT 0 COMMENT '价格'; + +ALTER TABLE t_meetingroom ADD COLUMN `price` BIGINT NOT NULL DEFAULT 0 COMMENT '价格'; + +ALTER TABLE t_meetingroom_book ADD COLUMN `apply_price` BIGINT NOT NULL DEFAULT 0 COMMENT '申请价格'; + + diff --git a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java index 6ecd64cd..df1a9d6f 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV2.java @@ -7,6 +7,7 @@ import io.renren.common.constant.Constant; import io.renren.common.dto.AuditingBaseDTO; import io.renren.common.page.PageData; import io.renren.common.utils.CodeGenerationUtils; +import io.renren.common.utils.DateUtils; import io.renren.common.utils.Result; import io.renren.common.validator.ValidatorUtils; import io.renren.common.validator.group.AddGroup; @@ -148,7 +149,8 @@ public class AbilityCenterControllerV2 { } break; default: { - executor.execute(() -> deal(abilityBatchApplicationDTO, deptDTO, applyFlag, user)); + //executor.execute(() -> deal(abilityBatchApplicationDTO, deptDTO, applyFlag, user)); + deal(abilityBatchApplicationDTO, deptDTO, applyFlag, user); } } return new Result().ok(LocalDateTime.now().toString()); @@ -156,10 +158,26 @@ public class AbilityCenterControllerV2 { private void deal(TAbilityBatchApplicationDTO abilityBatchApplicationDTO, Optional deptDTO, String applyFlag, UserDetail user) { List tAbilityApplicationDTOList = abilityBatchApplicationDTO.getSystem().stream().map(index -> { - if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请 - logger.error("重复发起申请"); - return null; + + //if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请 + // logger.error("重复发起申请"); + // return null; + //} + + //2022-11-22 资源重复申请判断更新 + if (index.containsKey("channelId")) { + String today = DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN); + if (tAbilityApplicationService.countUserCameraApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId")), today) > 0) { + logger.error("重复发起申请"); + return null; + } + } else { + if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请 + logger.error("重复发起申请"); + return null; + } } + TAbilityApplicationDTO tAbilityApplicationDTO = new TAbilityApplicationDTO(); tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea()); tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment()); diff --git a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java index cec16f03..9fac8bf8 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java +++ b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java @@ -8,6 +8,7 @@ import io.renren.common.constant.Constant; import io.renren.common.dto.AuditingBaseDTO; import io.renren.common.page.PageData; import io.renren.common.utils.CodeGenerationUtils; +import io.renren.common.utils.DateUtils; import io.renren.common.utils.Result; import io.renren.common.validator.ValidatorUtils; import io.renren.common.validator.group.AddGroup; @@ -218,10 +219,27 @@ public class AbilityCenterControllerV3 { } logger.info("开始申请流程!"); List tAbilityApplicationDTOList = abilityBatchApplicationDTO.getSystem().stream().map(index -> { - if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请 - logger.error("重复发起申请"); - return null; + + //if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请 + // logger.error("重复发起申请"); + // return null; + //} + + //2022-11-22 资源重复申请判断更新 + if (index.containsKey("channelId")) { + String today = DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN); + if (tAbilityApplicationService.countUserCameraApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId")), today) > 0) { + logger.error("重复发起申请"); + return null; + } + } else { + if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请 + logger.error("重复发起申请"); + return null; + } } + + TAbilityApplicationDTO tAbilityApplicationDTO = new TAbilityApplicationDTO(); tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea()); tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment()); @@ -332,7 +350,6 @@ public class AbilityCenterControllerV3 { Boolean crossRegion = Boolean.FALSE; // 是否跨区 Boolean cityApplyCity = Boolean.FALSE; // 是否为市区申请市区 - // TODO if (sysUserDTO.getDeptId() != null) { SysDeptDTO applyUserDeptDTO = sysDeptService.get(sysUserDTO.getDeptId()); // 发起人的部门 Integer applyUserDeptType = applyUserDeptDTO.getType(); // 发起人 diff --git a/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomBookDTO.java b/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomBookDTO.java index 4f22e87f..bdeba7c3 100644 --- a/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomBookDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomBookDTO.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; @@ -51,4 +52,7 @@ public class TMeetingroomBookDTO implements Serializable { private Date auditTime; private String roomName; + + @ApiModelProperty(value = "申请价格") + private BigDecimal applyPrice; } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomDTO.java b/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomDTO.java index e3dcf8fd..30d1e48c 100644 --- a/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/meeting/dto/TMeetingroomDTO.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; /** @@ -39,5 +40,8 @@ public class TMeetingroomDTO implements Serializable { private Long modifier; @ApiModelProperty(value = "是否删除,0-未删除,1-删除") private Integer delFlag; + @ApiModelProperty(value = "价格") + private BigDecimal price; + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroom.java b/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroom.java index 74b52e8b..65f706fa 100644 --- a/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroom.java +++ b/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroom.java @@ -5,6 +5,7 @@ import io.renren.common.entity.BaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.math.BigDecimal; import java.util.Date; /** @@ -47,4 +48,9 @@ public class TMeetingroom extends BaseEntity { private Integer delFlag; private Long modifier; + /** + * 价格 + */ + private BigDecimal price; + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroomBook.java b/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroomBook.java index af09e629..9ae99a62 100644 --- a/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroomBook.java +++ b/renren-admin/src/main/java/io/renren/modules/meeting/entity/TMeetingroomBook.java @@ -5,6 +5,7 @@ import io.renren.common.entity.BaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.math.BigDecimal; import java.util.Date; /** @@ -65,4 +66,10 @@ public class TMeetingroomBook extends BaseEntity { * 审核时间 */ private Date auditTime; + + /** + * 申请价格 + */ + private BigDecimal applyPrice; + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java index fe54bf71..fbceb8f9 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java @@ -1,5 +1,6 @@ package io.renren.modules.processForm.controller; +import com.alibaba.excel.EasyExcel; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.renren.common.annotation.LogOperation; @@ -23,6 +24,8 @@ import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import io.renren.modules.processForm.excel.TAbilityApplicationExcel; import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.resource.dto.ResourceDTO; +import io.renren.modules.resource.excel.census.config.CustomCellWriteHeightConfig; +import io.renren.modules.resource.excel.census.config.CustomCellWriteWeightConfig; import io.renren.modules.resource.service.ResourceService; import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.UserDetail; @@ -50,6 +53,8 @@ import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.net.URLEncoder; import java.time.LocalDateTime; import java.util.*; import java.util.stream.Collectors; @@ -454,21 +459,92 @@ public class TAbilityApplicationController { } @GetMapping("/getApplyCameraList") - @ApiOperation("/西海岸-根据用户获取已申请摄像头列表") - @LogOperation("/西海岸-根据用户获取已申请摄像头列表") + @ApiOperation("西海岸-根据用户获取已申请摄像头列表") + @LogOperation("西海岸-根据用户获取已申请摄像头列表") public Result getApplyCameraList() { return new Result().ok(tAbilityApplicationService.getApplyCameraList()); } @PostMapping("/delApplyCamera") - @ApiOperation("/西海岸-用户删除已申请摄像头") - @LogOperation("/西海岸-用户删除已申请摄像头") + @ApiOperation("西海岸-用户删除已申请摄像头") + @LogOperation("西海岸-用户删除已申请摄像头") public Result delApplyCamera(@RequestBody List ids) { tAbilityApplicationService.delApplyCamera(ids); return new Result().ok("删除成功。"); } + @GetMapping("/getFundStatement") + @ApiOperation("获取资金报表") + @LogOperation("获取资金报表") + @ApiImplicitParams({@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "provideDept", value = "提供部门", paramType = "query", dataType = "Long"), + @ApiImplicitParam(name = "applyDept", value = "申请部门", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "resourceType", value = "资源类型", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "resourceName", value = "资源名称", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query", dataType = "INTEGER"), + @ApiImplicitParam(name = "pageSize", value = "页数大小", paramType = "query", dataType = "INTEGER") + }) + public Result getFundStatement (@ApiIgnore @RequestParam Map params) { + return new Result().ok(tAbilityApplicationService.getFundStatement(params)); + } + @GetMapping("/exportFundStatementTable") + @ApiOperation("导出资金报表") + @LogOperation("导出资金报表") + @ApiImplicitParams({@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "provideDept", value = "提供部门", paramType = "query", dataType = "Long"), + @ApiImplicitParam(name = "applyDept", value = "申请部门", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "resourceType", value = "资源类型", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "resourceName", value = "资源名称", paramType = "query", dataType = "String") + }) + public void exportFundStatementTable(@RequestParam Map params, HttpServletResponse response) throws IOException { + + List resultList = (List) tAbilityApplicationService.exportFundStatementTable(params); + List> date = resultList.stream().map(index -> { + List data = new ArrayList<>(); + data.add(index.getOrDefault("resourceName", "") == null ? "" : index.getOrDefault("resourceName", "").toString()); + data.add(index.getOrDefault("resourceType", "") == null ? "" : index.getOrDefault("resourceType", "").toString()); + data.add(index.getOrDefault("provideDept", "") == null ? "" : index.getOrDefault("provideDept", "").toString()); + data.add(index.getOrDefault("applyDept", "") == null ? "" : index.getOrDefault("applyDept", "").toString()); + data.add(index.getOrDefault("applyDate", "") == null ? "" : index.getOrDefault("applyDate", "").toString()); + data.add(index.getOrDefault("applyPrice", "") == null ? "" : index.getOrDefault("applyPrice", "").toString()); + return data; + }).collect(Collectors.toList()); + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setCharacterEncoding("utf-8"); + String fileName = URLEncoder.encode("资金报表", "UTF-8"); + response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream()).head(exportSelectCensusApplyTableHead()) + .registerWriteHandler(new CustomCellWriteWeightConfig()) + .registerWriteHandler(new CustomCellWriteHeightConfig()) + .sheet("资金报表").doWrite(date); + } + + + private List> exportSelectCensusApplyTableHead() { + List> list = new ArrayList<>(); + List head0 = new ArrayList<>(); + head0.add("资源名称"); + List head1 = new ArrayList<>(); + head1.add("类型"); + List head2 = new ArrayList<>(); + head2.add("提供部门"); + List head3 = new ArrayList<>(); + head3.add("申请部门"); + List head4 = new ArrayList<>(); + head4.add("申请时间"); + List head5 = new ArrayList<>(); + head5.add("参考价格"); + list.add(head0); + list.add(head1); + list.add(head2); + list.add(head3); + list.add(head4); + list.add(head5); + return list; + } } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dao/TAbilityApplicationDao.java b/renren-admin/src/main/java/io/renren/modules/processForm/dao/TAbilityApplicationDao.java index b4a160dc..1048f710 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/dao/TAbilityApplicationDao.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dao/TAbilityApplicationDao.java @@ -54,4 +54,14 @@ public interface TAbilityApplicationDao extends BaseDao getApplyCameraList(@Param("userId") Long userId, @Param("date") String date); Integer delApplyCamera(@Param("ids") List ids); + + Integer countUserCameraApply(@Param("userId") Long userId, @Param("resourceId") Long resourceId, @Param("today") String today); + + List getFundStatement(@Param("params") Map params); + + Long getFundStatementSum(@Param("params") Map params); + + List exportFundStatementTable(@Param("params") Map params); + + Long getFundStatementCount(@Param("params") Map params); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java index 682436e4..6ae34e8f 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -93,4 +94,7 @@ public class TAbilityApplicationDTO extends AuditingBaseDTO implements Serializa @ApiModelProperty(value = "过期时间") private Date expireDate; + + @ApiModelProperty(value = "申请价格") + private BigDecimal applyPrice; } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java b/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java index 2868b2ee..8792dc0a 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java @@ -9,6 +9,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -136,4 +137,10 @@ public class TAbilityApplicationEntity extends BaseEntity implements Serializabl * 过期时间 */ private Date expireDate; + + /** + * 申请价格 + */ + private BigDecimal applyPrice; + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/TAbilityApplicationService.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/TAbilityApplicationService.java index b48c93a1..1d38c71d 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/service/TAbilityApplicationService.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/TAbilityApplicationService.java @@ -62,4 +62,10 @@ public interface TAbilityApplicationService extends CrudService ids); + + Integer countUserCameraApply(Long userId, Long resourceId, String today); + + Object getFundStatement(Map params); + + Object exportFundStatementTable(Map params); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java index 693d1f98..8f67f666 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java @@ -1,5 +1,6 @@ package io.renren.modules.processForm.service.impl; +import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.renren.common.service.impl.CrudServiceImpl; import io.renren.common.utils.ConvertUtils; @@ -16,10 +17,8 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.math.BigDecimal; +import java.util.*; import java.util.stream.Collectors; /** @@ -158,5 +157,27 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl params) { + Map resultMap = new HashMap<>(); + int pageNum = Integer.parseInt(params.get("pageNum").toString()); + int pageSize = Integer.parseInt(params.get("pageSize").toString()); + params.replace("pageNum", (pageNum - 1) * pageSize); + resultMap.put("list", abilityApplicationDao.getFundStatement(params)); + resultMap.put("totalPrice", abilityApplicationDao.getFundStatementSum(params)); + resultMap.put("total", abilityApplicationDao.getFundStatementCount(params)); + return resultMap; + } + + @Override + public Object exportFundStatementTable(Map params) { + return abilityApplicationDao.exportFundStatementTable(params); + } + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/WillApplyCameraServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/WillApplyCameraServiceImpl.java index f45d9e40..60864b3c 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/WillApplyCameraServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/WillApplyCameraServiceImpl.java @@ -18,10 +18,8 @@ public class WillApplyCameraServiceImpl extends CrudServiceImpl getWrapper(Map params) { - return null; } diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java b/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java index bc70e01a..4b0b7533 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import java.util.List; import java.util.Optional; @@ -132,6 +133,9 @@ public class ResourceDTO extends AuditingBaseDTO implements Serializable { @ApiModelProperty(value = "下架流程实例ID") private Long undercarriageInstanceId; + @ApiModelProperty(value = "价格") + private BigDecimal price; + public String getDelFlagTip() { if (this.delFlag != null) { Optional resourceEntityDelFlagOptional = Optional.ofNullable(ResourceEntityDelFlag.getByFlag(this.delFlag)); diff --git a/renren-admin/src/main/java/io/renren/modules/resource/entity/ResourceEntity.java b/renren-admin/src/main/java/io/renren/modules/resource/entity/ResourceEntity.java index 54c350e2..644f258a 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/entity/ResourceEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/entity/ResourceEntity.java @@ -8,6 +8,7 @@ import io.renren.common.entity.BaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -174,5 +175,13 @@ public class ResourceEntity extends BaseEntity { */ private String applyNumber; + /** + * 下架流程实例ID + */ private Long undercarriageInstanceId; + + /** + * 价格 + */ + private BigDecimal price; } \ No newline at end of file diff --git a/renren-admin/src/main/resources/db/V7.7__resource_add_price.sql b/renren-admin/src/main/resources/db/V7.7__resource_add_price.sql new file mode 100644 index 00000000..08b70e42 --- /dev/null +++ b/renren-admin/src/main/resources/db/V7.7__resource_add_price.sql @@ -0,0 +1,11 @@ +-- 2022-11-22 资源增加价格字段,申请表增加申请价格 + +ALTER TABLE t_ability_application ADD COLUMN `apply_price` BIGINT NOT NULL DEFAULT 0 COMMENT '申请价格'; + +ALTER TABLE tb_data_resource ADD COLUMN `price` BIGINT NOT NULL DEFAULT 0 COMMENT '价格'; + +ALTER TABLE t_meetingroom ADD COLUMN `price` BIGINT NOT NULL DEFAULT 0 COMMENT '价格'; + +ALTER TABLE t_meetingroom_book ADD COLUMN `apply_price` BIGINT NOT NULL DEFAULT 0 COMMENT '申请价格'; + + diff --git a/renren-admin/src/main/resources/mapper/meeting/TMeetingroomBookMapper.xml b/renren-admin/src/main/resources/mapper/meeting/TMeetingroomBookMapper.xml index 4548698d..95c7b5b1 100644 --- a/renren-admin/src/main/resources/mapper/meeting/TMeetingroomBookMapper.xml +++ b/renren-admin/src/main/resources/mapper/meeting/TMeetingroomBookMapper.xml @@ -18,6 +18,7 @@ + @@ -37,6 +38,7 @@ + @@ -57,6 +59,7 @@ , t.audit_viem , t.auditor , t.audit_time + , t.apply_price diff --git a/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml b/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml index 3829e074..5300f4c4 100644 --- a/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml +++ b/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml @@ -29,7 +29,9 @@ typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/> + + @@ -55,6 +57,7 @@ typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/> + @@ -337,4 +340,292 @@ AND expire_date > #{date} ORDER BY create_date DESC + + + + + + + + + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index 309a3f44..c380224b 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -42,6 +42,7 @@ + @@ -91,6 +92,7 @@ +