资产处置新增
This commit is contained in:
parent
a860d1ada1
commit
08f93f5bae
@ -1,30 +1,26 @@
|
|||||||
package cn.iocoder.yudao.module.property.controller.admin;
|
package cn.iocoder.yudao.module.property.controller.admin;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
|
||||||
import cn.iocoder.yudao.module.property.entity.PropertyDeal;
|
|
||||||
import cn.iocoder.yudao.module.property.service.PropertyDealService;
|
import cn.iocoder.yudao.module.property.service.PropertyDealService;
|
||||||
import cn.iocoder.yudao.module.property.vo.PropertyDealReqVO;
|
|
||||||
import cn.iocoder.yudao.module.property.vo.PropertyDealRespVO;
|
import cn.iocoder.yudao.module.property.vo.PropertyDealRespVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理后台 - 企业管理-资产处置单/变动单
|
||||||
|
* @author 小李
|
||||||
|
* @date 21:24 2024/8/16
|
||||||
|
**/
|
||||||
@Tag(name = "管理后台 - 企业管理-资产处置单/变动单")
|
@Tag(name = "管理后台 - 企业管理-资产处置单/变动单")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/company/property-deal")
|
@RequestMapping("/company/property-deal")
|
||||||
@ -37,54 +33,55 @@ public class PropertyDealController {
|
|||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建企业管理-资产处置单/变动单")
|
@Operation(summary = "创建企业管理-资产处置单/变动单")
|
||||||
@PreAuthorize("@ss.hasPermission('company:property-deal:create')")
|
@PreAuthorize("@ss.hasPermission('company:property-deal:create')")
|
||||||
public CommonResult<String> createPropertyDeal(@RequestBody PropertyDealReqVO createReqVO) {
|
public CommonResult createPropertyDeal(@RequestBody PropertyDealRespVO createReqVO) {
|
||||||
return success(propertyDealService.createPropertyDeal(createReqVO));
|
propertyDealService.createPropertyDeal(createReqVO);
|
||||||
|
return CommonResult.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update")
|
// @PutMapping("/update")
|
||||||
@Operation(summary = "更新企业管理-资产处置单/变动单")
|
// @Operation(summary = "更新企业管理-资产处置单/变动单")
|
||||||
@PreAuthorize("@ss.hasPermission('company:property-deal:update')")
|
// @PreAuthorize("@ss.hasPermission('company:property-deal:update')")
|
||||||
public CommonResult<Boolean> updatePropertyDeal(@RequestBody PropertyDealReqVO updateReqVO) {
|
// public CommonResult<Boolean> updatePropertyDeal(@RequestBody PropertyDealReqVO updateReqVO) {
|
||||||
propertyDealService.updatePropertyDeal(updateReqVO);
|
// propertyDealService.updatePropertyDeal(updateReqVO);
|
||||||
return success(true);
|
// return success(true);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@DeleteMapping("/delete")
|
// @DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除企业管理-资产处置单/变动单")
|
// @Operation(summary = "删除企业管理-资产处置单/变动单")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
// @Parameter(name = "id", description = "编号", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('company:property-deal:delete')")
|
// @PreAuthorize("@ss.hasPermission('company:property-deal:delete')")
|
||||||
public CommonResult<Boolean> deletePropertyDeal(@RequestParam("id") String id) {
|
// public CommonResult<Boolean> deletePropertyDeal(@RequestParam("id") String id) {
|
||||||
propertyDealService.deletePropertyDeal(id);
|
// propertyDealService.deletePropertyDeal(id);
|
||||||
return success(true);
|
// return success(true);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@GetMapping("/get")
|
// @GetMapping("/get")
|
||||||
@Operation(summary = "获得企业管理-资产处置单/变动单")
|
// @Operation(summary = "获得企业管理-资产处置单/变动单")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
// @Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('company:property-deal:query')")
|
// @PreAuthorize("@ss.hasPermission('company:property-deal:query')")
|
||||||
public CommonResult<PropertyDealRespVO> getPropertyDeal(@RequestParam("id") String id) {
|
// public CommonResult<PropertyDealRespVO> getPropertyDeal(@RequestParam("id") String id) {
|
||||||
PropertyDeal propertyDeal = propertyDealService.getPropertyDeal(id);
|
// PropertyDeal propertyDeal = propertyDealService.getPropertyDeal(id);
|
||||||
return success(BeanUtils.toBean(propertyDeal, PropertyDealRespVO.class));
|
// return success(BeanUtils.toBean(propertyDeal, PropertyDealRespVO.class));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@GetMapping("/page")
|
// @GetMapping("/page")
|
||||||
@Operation(summary = "获得企业管理-资产处置单/变动单分页")
|
// @Operation(summary = "获得企业管理-资产处置单/变动单分页")
|
||||||
@PreAuthorize("@ss.hasPermission('company:property-deal:query')")
|
// @PreAuthorize("@ss.hasPermission('company:property-deal:query')")
|
||||||
public CommonResult<IPage<PropertyDealRespVO>> getPropertyDealPage(PropertyDealReqVO pageReqVO) {
|
// public CommonResult<IPage<PropertyDealRespVO>> getPropertyDealPage(PropertyDealReqVO pageReqVO) {
|
||||||
IPage<PropertyDealRespVO> propertyDealPage = propertyDealService.getPropertyDealPage(pageReqVO);
|
// IPage<PropertyDealRespVO> propertyDealPage = propertyDealService.getPropertyDealPage(pageReqVO);
|
||||||
return success(propertyDealPage);
|
// return success(propertyDealPage);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@GetMapping("/export-excel")
|
// @GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出企业管理-资产处置单/变动单 Excel")
|
// @Operation(summary = "导出企业管理-资产处置单/变动单 Excel")
|
||||||
@PreAuthorize("@ss.hasPermission('company:property-deal:export')")
|
// @PreAuthorize("@ss.hasPermission('company:property-deal:export')")
|
||||||
@ApiAccessLog(operateType = EXPORT)
|
// @ApiAccessLog(operateType = EXPORT)
|
||||||
public void exportPropertyDealExcel(PropertyDealReqVO pageReqVO,
|
// public void exportPropertyDealExcel(PropertyDealReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
// HttpServletResponse response) throws IOException {
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
// pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
List<PropertyDealRespVO> list = propertyDealService.getPropertyDealPage(pageReqVO).getRecords();
|
// List<PropertyDealRespVO> list = propertyDealService.getPropertyDealPage(pageReqVO).getRecords();
|
||||||
// 导出 Excel
|
// // 导出 Excel
|
||||||
ExcelUtils.write(response, "企业管理-资产处置单/变动单.xls", "数据", PropertyDealRespVO.class,list);
|
// ExcelUtils.write(response, "企业管理-资产处置单/变动单.xls", "数据", PropertyDealRespVO.class,list);
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
@ -1,90 +1,90 @@
|
|||||||
package cn.iocoder.yudao.module.property.controller.admin;
|
//package cn.iocoder.yudao.module.property.controller.admin;
|
||||||
|
//
|
||||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
//import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
//import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
//import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
//import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
//import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
import cn.iocoder.yudao.module.property.entity.PropertyDealItem;
|
//import cn.iocoder.yudao.module.property.entity.PropertyDealItem;
|
||||||
import cn.iocoder.yudao.module.property.service.PropertyDealItemService;
|
//import cn.iocoder.yudao.module.property.service.PropertyDealItemService;
|
||||||
import cn.iocoder.yudao.module.property.vo.PropertyDealItemReqVO;
|
//import cn.iocoder.yudao.module.property.vo.PropertyDealItemReqVO;
|
||||||
import cn.iocoder.yudao.module.property.vo.PropertyDealItemRespVO;
|
//import cn.iocoder.yudao.module.property.vo.PropertyDealItemRespVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
//import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
//import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
//import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
//import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
//import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
//import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
//import org.springframework.web.bind.annotation.*;
|
||||||
|
//
|
||||||
import javax.annotation.Resource;
|
//import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
//import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
//import java.io.IOException;
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
|
//
|
||||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
//import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
//import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
//
|
||||||
@Tag(name = "管理后台 - 企业管理-资产处置子")
|
//@Tag(name = "管理后台 - 企业管理-资产处置子")
|
||||||
@RestController
|
//@RestController
|
||||||
@RequestMapping("/company/property-deal-item")
|
//@RequestMapping("/company/property-deal-item")
|
||||||
@Validated
|
//@Validated
|
||||||
public class PropertyDealItemController {
|
//public class PropertyDealItemController {
|
||||||
|
//
|
||||||
@Resource
|
// @Resource
|
||||||
private PropertyDealItemService propertyDealItemService;
|
// private PropertyDealItemService propertyDealItemService;
|
||||||
|
//
|
||||||
@PostMapping("/create")
|
// @PostMapping("/create")
|
||||||
@Operation(summary = "创建企业管理-资产处置子")
|
// @Operation(summary = "创建企业管理-资产处置子")
|
||||||
@PreAuthorize("@ss.hasPermission('company:property-deal-item:create')")
|
// @PreAuthorize("@ss.hasPermission('company:property-deal-item:create')")
|
||||||
public CommonResult<String> createPropertyDealItem(@RequestBody PropertyDealItemReqVO createReqVO) {
|
// public CommonResult<String> createPropertyDealItem(@RequestBody PropertyDealItemReqVO createReqVO) {
|
||||||
return success(propertyDealItemService.createPropertyDealItem(createReqVO));
|
// return success(propertyDealItemService.createPropertyDealItem(createReqVO));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@PutMapping("/update")
|
// @PutMapping("/update")
|
||||||
@Operation(summary = "更新企业管理-资产处置子")
|
// @Operation(summary = "更新企业管理-资产处置子")
|
||||||
@PreAuthorize("@ss.hasPermission('company:property-deal-item:update')")
|
// @PreAuthorize("@ss.hasPermission('company:property-deal-item:update')")
|
||||||
public CommonResult<Boolean> updatePropertyDealItem(@RequestBody PropertyDealItemReqVO updateReqVO) {
|
// public CommonResult<Boolean> updatePropertyDealItem(@RequestBody PropertyDealItemReqVO updateReqVO) {
|
||||||
propertyDealItemService.updatePropertyDealItem(updateReqVO);
|
// propertyDealItemService.updatePropertyDealItem(updateReqVO);
|
||||||
return success(true);
|
// return success(true);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@DeleteMapping("/delete")
|
// @DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除企业管理-资产处置子")
|
// @Operation(summary = "删除企业管理-资产处置子")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
// @Parameter(name = "id", description = "编号", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('company:property-deal-item:delete')")
|
// @PreAuthorize("@ss.hasPermission('company:property-deal-item:delete')")
|
||||||
public CommonResult<Boolean> deletePropertyDealItem(@RequestParam("id") String id) {
|
// public CommonResult<Boolean> deletePropertyDealItem(@RequestParam("id") String id) {
|
||||||
propertyDealItemService.deletePropertyDealItem(id);
|
// propertyDealItemService.deletePropertyDealItem(id);
|
||||||
return success(true);
|
// return success(true);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@GetMapping("/get")
|
// @GetMapping("/get")
|
||||||
@Operation(summary = "获得企业管理-资产处置子")
|
// @Operation(summary = "获得企业管理-资产处置子")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
// @Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('company:property-deal-item:query')")
|
// @PreAuthorize("@ss.hasPermission('company:property-deal-item:query')")
|
||||||
public CommonResult<PropertyDealItemRespVO> getPropertyDealItem(@RequestParam("id") String id) {
|
// public CommonResult<PropertyDealItemRespVO> getPropertyDealItem(@RequestParam("id") String id) {
|
||||||
PropertyDealItem propertyDealItem = propertyDealItemService.getPropertyDealItem(id);
|
// PropertyDealItem propertyDealItem = propertyDealItemService.getPropertyDealItem(id);
|
||||||
return success(BeanUtils.toBean(propertyDealItem, PropertyDealItemRespVO.class));
|
// return success(BeanUtils.toBean(propertyDealItem, PropertyDealItemRespVO.class));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@GetMapping("/page")
|
// @GetMapping("/page")
|
||||||
@Operation(summary = "获得企业管理-资产处置子分页")
|
// @Operation(summary = "获得企业管理-资产处置子分页")
|
||||||
@PreAuthorize("@ss.hasPermission('company:property-deal-item:query')")
|
// @PreAuthorize("@ss.hasPermission('company:property-deal-item:query')")
|
||||||
public CommonResult<IPage<PropertyDealItemRespVO>> getPropertyDealItemPage(PropertyDealItemReqVO pageReqVO) {
|
// public CommonResult<IPage<PropertyDealItemRespVO>> getPropertyDealItemPage(PropertyDealItemReqVO pageReqVO) {
|
||||||
IPage<PropertyDealItemRespVO> propertyDealItemPage = propertyDealItemService.getPropertyDealItemPage(pageReqVO);
|
// IPage<PropertyDealItemRespVO> propertyDealItemPage = propertyDealItemService.getPropertyDealItemPage(pageReqVO);
|
||||||
return success(propertyDealItemPage);
|
// return success(propertyDealItemPage);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@GetMapping("/export-excel")
|
// @GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出企业管理-资产处置子 Excel")
|
// @Operation(summary = "导出企业管理-资产处置子 Excel")
|
||||||
@PreAuthorize("@ss.hasPermission('company:property-deal-item:export')")
|
// @PreAuthorize("@ss.hasPermission('company:property-deal-item:export')")
|
||||||
@ApiAccessLog(operateType = EXPORT)
|
// @ApiAccessLog(operateType = EXPORT)
|
||||||
public void exportPropertyDealItemExcel(PropertyDealItemReqVO pageReqVO,
|
// public void exportPropertyDealItemExcel(PropertyDealItemReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
// HttpServletResponse response) throws IOException {
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
// pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
List<PropertyDealItemRespVO> list = propertyDealItemService.getPropertyDealItemPage(pageReqVO).getRecords();
|
// List<PropertyDealItemRespVO> list = propertyDealItemService.getPropertyDealItemPage(pageReqVO).getRecords();
|
||||||
// 导出 Excel
|
// // 导出 Excel
|
||||||
ExcelUtils.write(response, "企业管理-资产处置子.xls", "数据", PropertyDealItemRespVO.class,list);
|
// ExcelUtils.write(response, "企业管理-资产处置子.xls", "数据", PropertyDealItemRespVO.class,list);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
@ -155,11 +155,17 @@ public class Property extends TenantBaseDO {
|
|||||||
@ExcelProperty("附件")
|
@ExcelProperty("附件")
|
||||||
private String fileUrls;
|
private String fileUrls;
|
||||||
|
|
||||||
|
/** 使用人 */
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ExcelProperty("使用人")
|
@ExcelProperty("使用人")
|
||||||
private String staffName;
|
private String staffName;
|
||||||
|
|
||||||
|
/** 存放位置 */
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ExcelProperty("存放位置")
|
@ExcelProperty("存放位置")
|
||||||
private String posName;
|
private String posName;
|
||||||
|
|
||||||
|
/** 处置方式 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dealWay;
|
||||||
}
|
}
|
@ -1,55 +1,56 @@
|
|||||||
package cn.iocoder.yudao.module.property.entity;
|
package cn.iocoder.yudao.module.property.entity;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.*;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业管理-资产处置单/变动单 DO
|
* 企业管理-资产处置单/变动单 DO
|
||||||
*
|
* @author 小李
|
||||||
* @author 后台管理员
|
* @date 21:17 2024/8/16
|
||||||
*/
|
**/
|
||||||
@TableName("company_property_deal")
|
@TableName("company_property_deal")
|
||||||
@KeySequence("company_property_deal_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
public class PropertyDeal extends TenantBaseDO {
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class PropertyDeal extends BaseDO {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键标识
|
* 主键标识
|
||||||
*/
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_UUID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业id(base_company表中的id)
|
* 企业id(base_company表中的id)
|
||||||
*/
|
*/
|
||||||
private String corpId;
|
private String corpId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门id(system_dept表中的id,用来做数据权限控制)
|
* 部门id(system_dept表中的id,用来做数据权限控制)
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据类型
|
* 数据类型
|
||||||
*
|
|
||||||
* 枚举 {@link TODO property_data_type 对应的类}
|
|
||||||
*/
|
*/
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处置/变动单号
|
* 处置/变动单号
|
||||||
*/
|
*/
|
||||||
private String dealNo;
|
private String dealNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处置/变动日期
|
* 处置/变动日期
|
||||||
*/
|
*/
|
||||||
private LocalDate dealDate;
|
@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
private Date dealDate;
|
||||||
}
|
}
|
@ -1,78 +1,86 @@
|
|||||||
package cn.iocoder.yudao.module.property.entity;
|
package cn.iocoder.yudao.module.property.entity;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业管理-资产处置子 DO
|
* 企业管理-资产处置子 DO
|
||||||
*
|
* @author 小李
|
||||||
* @author 后台管理员
|
* @date 21:33 2024/8/16
|
||||||
*/
|
**/
|
||||||
@TableName("company_property_deal_item")
|
@TableName("company_property_deal_item")
|
||||||
@KeySequence("company_property_deal_item_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
public class PropertyDealItem extends TenantBaseDO {
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class PropertyDealItem extends BaseDO {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键标识
|
* 主键标识
|
||||||
*/
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_UUID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处置单/变动单id
|
* 处置单/变动单id
|
||||||
*/
|
*/
|
||||||
private String dealId;
|
private String dealId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资产id
|
* 资产id
|
||||||
*/
|
*/
|
||||||
private String propertyId;
|
private String propertyId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处置方式
|
* 处置方式
|
||||||
*
|
|
||||||
* 枚举 {@link TODO company_deal_way 对应的类}
|
|
||||||
*/
|
*/
|
||||||
private String dealWay;
|
private String dealWay;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原企业id
|
* 原企业id
|
||||||
*/
|
*/
|
||||||
private String oldCorpId;
|
private String oldCorpId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调入企业id
|
* 调入企业id
|
||||||
*/
|
*/
|
||||||
private String corpId;
|
private String corpId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原部门id
|
* 原部门id
|
||||||
*/
|
*/
|
||||||
private Long oldDeptId;
|
private Long oldDeptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调入部门id
|
* 调入部门id
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原存放地id
|
* 原存放地id
|
||||||
*/
|
*/
|
||||||
private String oldPosId;
|
private String oldPosId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调入存放地id
|
* 调入存放地id
|
||||||
*/
|
*/
|
||||||
private String posId;
|
private String posId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原使用人id
|
* 原使用人id
|
||||||
*/
|
*/
|
||||||
private Long oldUserId;
|
private Long oldUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调入使用人id
|
* 调入使用人id
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
@ -9,14 +9,9 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业管理-资产处置子 Mapper
|
* 企业管理-资产处置子 Mapper
|
||||||
*
|
* @author 小李
|
||||||
* @author 后台管理员
|
* @date 21:35 2024/8/16
|
||||||
*/
|
**/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface PropertyDealItemMapper extends BaseMapper<PropertyDealItem> {
|
public interface PropertyDealItemMapper extends BaseMapper<PropertyDealItem> {
|
||||||
|
|
||||||
default IPage<PropertyDealItemRespVO> selectPage(PropertyDealItemReqVO reqVO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,22 +1,14 @@
|
|||||||
package cn.iocoder.yudao.module.property.mapper;
|
package cn.iocoder.yudao.module.property.mapper;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
|
||||||
import cn.iocoder.yudao.module.property.entity.PropertyDeal;
|
import cn.iocoder.yudao.module.property.entity.PropertyDeal;
|
||||||
import cn.iocoder.yudao.module.property.vo.PropertyDealReqVO;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import cn.iocoder.yudao.module.property.vo.PropertyDealRespVO;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业管理-资产处置单/变动单 Mapper
|
* 企业管理-资产处置单/变动单 Mapper
|
||||||
*
|
* @author 小李
|
||||||
* @author 后台管理员
|
* @date 21:22 2024/8/16
|
||||||
*/
|
**/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface PropertyDealMapper extends BaseMapperX<PropertyDeal> {
|
public interface PropertyDealMapper extends BaseMapper<PropertyDeal> {
|
||||||
|
|
||||||
default IPage<PropertyDealRespVO> selectPage(PropertyDealReqVO reqVO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -2,54 +2,52 @@ package cn.iocoder.yudao.module.property.service;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.module.property.entity.PropertyDealItem;
|
import cn.iocoder.yudao.module.property.entity.PropertyDealItem;
|
||||||
import cn.iocoder.yudao.module.property.vo.PropertyDealItemReqVO;
|
import cn.iocoder.yudao.module.property.vo.PropertyDealItemReqVO;
|
||||||
import cn.iocoder.yudao.module.property.vo.PropertyDealItemRespVO;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业管理-资产处置子 Service 接口
|
* 企业管理-资产处置子 Service 接口
|
||||||
*
|
* @author 小李
|
||||||
* @author 后台管理员
|
* @date 21:37 2024/8/16
|
||||||
*/
|
**/
|
||||||
public interface PropertyDealItemService extends IService<PropertyDealItem> {
|
public interface PropertyDealItemService extends IService<PropertyDealItem> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建企业管理-资产处置子
|
* 创建企业管理-资产处置子表
|
||||||
*
|
* @author 小李
|
||||||
|
* @date 21:36 2024/8/16
|
||||||
* @param createReqVO 创建信息
|
* @param createReqVO 创建信息
|
||||||
* @return 编号
|
**/
|
||||||
*/
|
void createPropertyDealItem(PropertyDealItemReqVO createReqVO);
|
||||||
String createPropertyDealItem(PropertyDealItemReqVO createReqVO);
|
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 更新企业管理-资产处置子
|
// * 更新企业管理-资产处置子
|
||||||
*
|
// *
|
||||||
* @param updateReqVO 更新信息
|
// * @param updateReqVO 更新信息
|
||||||
*/
|
// */
|
||||||
void updatePropertyDealItem(PropertyDealItemReqVO updateReqVO);
|
// void updatePropertyDealItem(PropertyDealItemReqVO updateReqVO);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 删除企业管理-资产处置子
|
// * 删除企业管理-资产处置子
|
||||||
*
|
// *
|
||||||
* @param id 编号
|
// * @param id 编号
|
||||||
*/
|
// */
|
||||||
void deletePropertyDealItem(String id);
|
// void deletePropertyDealItem(String id);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 获得企业管理-资产处置子
|
// * 获得企业管理-资产处置子
|
||||||
*
|
// *
|
||||||
* @param id 编号
|
// * @param id 编号
|
||||||
* @return 企业管理-资产处置子
|
// * @return 企业管理-资产处置子
|
||||||
*/
|
// */
|
||||||
PropertyDealItem getPropertyDealItem(String id);
|
// PropertyDealItem getPropertyDealItem(String id);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 获得企业管理-资产处置子分页
|
// * 获得企业管理-资产处置子分页
|
||||||
*
|
// *
|
||||||
* @param pageReqVO 分页查询
|
// * @param pageReqVO 分页查询
|
||||||
* @return 企业管理-资产处置子分页
|
// * @return 企业管理-资产处置子分页
|
||||||
*/
|
// */
|
||||||
IPage<PropertyDealItemRespVO> getPropertyDealItemPage(PropertyDealItemReqVO pageReqVO);
|
// IPage<PropertyDealItemRespVO> getPropertyDealItemPage(PropertyDealItemReqVO pageReqVO);
|
||||||
|
|
||||||
}
|
}
|
@ -8,47 +8,47 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业管理-资产处置单/变动单 Service 接口
|
* 企业管理-资产处置单/变动单 Service 接口
|
||||||
*
|
* @author 小李
|
||||||
* @author 后台管理员
|
* @date 21:24 2024/8/16
|
||||||
*/
|
**/
|
||||||
public interface PropertyDealService extends IService<PropertyDeal> {
|
public interface PropertyDealService extends IService<PropertyDeal> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建企业管理-资产处置单/变动单
|
* 创建企业管理-资产处置单/变动单
|
||||||
*
|
* @author 小李
|
||||||
* @param createReqVO 创建信息
|
* @date 21:24 2024/8/16
|
||||||
* @return 编号
|
* @param createReqVO 处置单/变动单对象
|
||||||
*/
|
**/
|
||||||
String createPropertyDeal(PropertyDealReqVO createReqVO);
|
void createPropertyDeal(PropertyDealRespVO createReqVO);
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 更新企业管理-资产处置单/变动单
|
// * 更新企业管理-资产处置单/变动单
|
||||||
*
|
// *
|
||||||
* @param updateReqVO 更新信息
|
// * @param updateReqVO 更新信息
|
||||||
*/
|
// */
|
||||||
void updatePropertyDeal(PropertyDealReqVO updateReqVO);
|
// void updatePropertyDeal(PropertyDealReqVO updateReqVO);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 删除企业管理-资产处置单/变动单
|
// * 删除企业管理-资产处置单/变动单
|
||||||
*
|
// *
|
||||||
* @param id 编号
|
// * @param id 编号
|
||||||
*/
|
// */
|
||||||
void deletePropertyDeal(String id);
|
// void deletePropertyDeal(String id);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 获得企业管理-资产处置单/变动单
|
// * 获得企业管理-资产处置单/变动单
|
||||||
*
|
// *
|
||||||
* @param id 编号
|
// * @param id 编号
|
||||||
* @return 企业管理-资产处置单/变动单
|
// * @return 企业管理-资产处置单/变动单
|
||||||
*/
|
// */
|
||||||
PropertyDeal getPropertyDeal(String id);
|
// PropertyDeal getPropertyDeal(String id);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 获得企业管理-资产处置单/变动单分页
|
// * 获得企业管理-资产处置单/变动单分页
|
||||||
*
|
// *
|
||||||
* @param pageReqVO 分页查询
|
// * @param pageReqVO 分页查询
|
||||||
* @return 企业管理-资产处置单/变动单分页
|
// * @return 企业管理-资产处置单/变动单分页
|
||||||
*/
|
// */
|
||||||
IPage<PropertyDealRespVO> getPropertyDealPage(PropertyDealReqVO pageReqVO);
|
// IPage<PropertyDealRespVO> getPropertyDealPage(PropertyDealReqVO pageReqVO);
|
||||||
|
|
||||||
}
|
}
|
@ -13,44 +13,45 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业管理-资产处置子 Service 实现类
|
* 企业管理-资产处置子 Service 实现类
|
||||||
*
|
* @author 小李
|
||||||
* @author 后台管理员
|
* @date 21:37 2024/8/16
|
||||||
*/
|
**/
|
||||||
@Service
|
@Service
|
||||||
@Validated
|
@Validated
|
||||||
public class PropertyDealItemServiceImpl extends ServiceImpl<PropertyDealItemMapper, PropertyDealItem> implements PropertyDealItemService {
|
public class PropertyDealItemServiceImpl extends ServiceImpl<PropertyDealItemMapper, PropertyDealItem> implements PropertyDealItemService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建企业管理-资产处置子表
|
||||||
|
* @author 小李
|
||||||
|
* @date 21:36 2024/8/16
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public String createPropertyDealItem(PropertyDealItemReqVO createReqVO) {
|
public void createPropertyDealItem(PropertyDealItemReqVO createReqVO) {
|
||||||
// 插入
|
|
||||||
PropertyDealItem propertyDealItem = BeanUtils.toBean(createReqVO, PropertyDealItem.class);
|
|
||||||
baseMapper.insert(propertyDealItem);
|
|
||||||
// 返回
|
|
||||||
return propertyDealItem.getId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
public void updatePropertyDealItem(PropertyDealItemReqVO updateReqVO) {
|
// public void updatePropertyDealItem(PropertyDealItemReqVO updateReqVO) {
|
||||||
// 更新
|
// // 更新
|
||||||
PropertyDealItem updateObj = BeanUtils.toBean(updateReqVO, PropertyDealItem.class);
|
// PropertyDealItem updateObj = BeanUtils.toBean(updateReqVO, PropertyDealItem.class);
|
||||||
baseMapper.updateById(updateObj);
|
// baseMapper.updateById(updateObj);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void deletePropertyDealItem(String id) {
|
// public void deletePropertyDealItem(String id) {
|
||||||
// 删除
|
// // 删除
|
||||||
baseMapper.deleteById(id);
|
// baseMapper.deleteById(id);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public PropertyDealItem getPropertyDealItem(String id) {
|
// public PropertyDealItem getPropertyDealItem(String id) {
|
||||||
return baseMapper.selectById(id);
|
// return baseMapper.selectById(id);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public IPage<PropertyDealItemRespVO> getPropertyDealItemPage(PropertyDealItemReqVO pageReqVO) {
|
// public IPage<PropertyDealItemRespVO> getPropertyDealItemPage(PropertyDealItemReqVO pageReqVO) {
|
||||||
return baseMapper.selectPage(pageReqVO);
|
// return baseMapper.selectPage(pageReqVO);
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
@ -1,57 +1,85 @@
|
|||||||
package cn.iocoder.yudao.module.property.service.impl;
|
package cn.iocoder.yudao.module.property.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
import cn.iocoder.yudao.module.property.entity.PropertyDeal;
|
import cn.iocoder.yudao.module.property.entity.PropertyDeal;
|
||||||
|
import cn.iocoder.yudao.module.property.entity.PropertyDealItem;
|
||||||
import cn.iocoder.yudao.module.property.mapper.PropertyDealMapper;
|
import cn.iocoder.yudao.module.property.mapper.PropertyDealMapper;
|
||||||
|
import cn.iocoder.yudao.module.property.service.PropertyDealItemService;
|
||||||
import cn.iocoder.yudao.module.property.service.PropertyDealService;
|
import cn.iocoder.yudao.module.property.service.PropertyDealService;
|
||||||
import cn.iocoder.yudao.module.property.vo.PropertyDealReqVO;
|
import cn.iocoder.yudao.module.property.vo.PropertyDealReqVO;
|
||||||
import cn.iocoder.yudao.module.property.vo.PropertyDealRespVO;
|
import cn.iocoder.yudao.module.property.vo.PropertyDealRespVO;
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业管理-资产处置单/变动单 Service 实现类
|
* 企业管理-资产处置单/变动单 Service 实现类
|
||||||
*
|
* @author 小李
|
||||||
* @author 后台管理员
|
* @date 21:26 2024/8/16
|
||||||
*/
|
**/
|
||||||
@Service
|
@Service
|
||||||
@Validated
|
@Validated
|
||||||
public class PropertyDealServiceImpl extends ServiceImpl<PropertyDealMapper, PropertyDeal> implements PropertyDealService {
|
public class PropertyDealServiceImpl extends ServiceImpl<PropertyDealMapper, PropertyDeal> implements PropertyDealService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PropertyDealItemService propertyDealItemService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建企业管理-资产处置单/变动单
|
||||||
|
* @author 小李
|
||||||
|
* @date 21:24 2024/8/16
|
||||||
|
* @param createReqVO 处置单/变动单对象
|
||||||
|
**/
|
||||||
@Override
|
@Override
|
||||||
public String createPropertyDeal(PropertyDealReqVO createReqVO) {
|
@DSTransactional
|
||||||
// 插入
|
public void createPropertyDeal(PropertyDealRespVO createReqVO) {
|
||||||
PropertyDeal propertyDeal = BeanUtils.toBean(createReqVO, PropertyDeal.class);
|
/* 创建主表 */
|
||||||
|
PropertyDeal propertyDeal = BeanUtil.toBean(createReqVO, PropertyDeal.class);
|
||||||
|
propertyDeal.setCorpId(createReqVO.getPropList().get(0).getCorpId());
|
||||||
|
propertyDeal.setDeptId(createReqVO.getPropList().get(0).getDeptId());
|
||||||
baseMapper.insert(propertyDeal);
|
baseMapper.insert(propertyDeal);
|
||||||
// 返回
|
String dealId = propertyDeal.getId();
|
||||||
return propertyDeal.getId();
|
/* 创建子表 */
|
||||||
|
List<PropertyDealItem> propertyDealItems = createReqVO.getPropList().stream().map(item -> {
|
||||||
|
PropertyDealItem propertyDealItem = new PropertyDealItem();
|
||||||
|
propertyDealItem.setDealId(dealId);
|
||||||
|
propertyDealItem.setPropertyId(item.getId());
|
||||||
|
propertyDealItem.setDealWay(item.getDealWay());
|
||||||
|
return propertyDealItem;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
propertyDealItemService.saveBatch(propertyDealItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
public void updatePropertyDeal(PropertyDealReqVO updateReqVO) {
|
// public void updatePropertyDeal(PropertyDealReqVO updateReqVO) {
|
||||||
// 更新
|
// // 更新
|
||||||
PropertyDeal updateObj = BeanUtils.toBean(updateReqVO, PropertyDeal.class);
|
// PropertyDeal updateObj = BeanUtils.toBean(updateReqVO, PropertyDeal.class);
|
||||||
baseMapper.updateById(updateObj);
|
// baseMapper.updateById(updateObj);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void deletePropertyDeal(String id) {
|
// public void deletePropertyDeal(String id) {
|
||||||
// 删除
|
// // 删除
|
||||||
baseMapper.deleteById(id);
|
// baseMapper.deleteById(id);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public PropertyDeal getPropertyDeal(String id) {
|
// public PropertyDeal getPropertyDeal(String id) {
|
||||||
return baseMapper.selectById(id);
|
// return baseMapper.selectById(id);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public IPage<PropertyDealRespVO> getPropertyDealPage(PropertyDealReqVO pageReqVO) {
|
// public IPage<PropertyDealRespVO> getPropertyDealPage(PropertyDealReqVO pageReqVO) {
|
||||||
return baseMapper.selectPage(pageReqVO);
|
// return baseMapper.selectPage(pageReqVO);
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
@ -1,63 +1,15 @@
|
|||||||
package cn.iocoder.yudao.module.property.vo;
|
package cn.iocoder.yudao.module.property.vo;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.module.property.entity.PropertyDealItem;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业管理-资产处置子分页 Request VO
|
||||||
|
* @author 小李
|
||||||
|
* @date 21:34 2024/8/16
|
||||||
|
**/
|
||||||
@Schema(description = "管理后台 - 企业管理-资产处置子分页 Request VO")
|
@Schema(description = "管理后台 - 企业管理-资产处置子分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
public class PropertyDealItemReqVO extends PropertyDealItem {
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class PropertyDealItemReqVO extends PageParam {
|
|
||||||
|
|
||||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "18095")
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@Schema(description = "处置单/变动单id", example = "12936")
|
|
||||||
private String dealId;
|
|
||||||
|
|
||||||
@Schema(description = "资产id", example = "14421")
|
|
||||||
private String propertyId;
|
|
||||||
|
|
||||||
@Schema(description = "处置方式")
|
|
||||||
private String dealWay;
|
|
||||||
|
|
||||||
@Schema(description = "原企业id", example = "17291")
|
|
||||||
private String oldCorpId;
|
|
||||||
|
|
||||||
@Schema(description = "调入企业id", example = "21009")
|
|
||||||
private String corpId;
|
|
||||||
|
|
||||||
@Schema(description = "原部门id", example = "23846")
|
|
||||||
private Long oldDeptId;
|
|
||||||
|
|
||||||
@Schema(description = "调入部门id", example = "3881")
|
|
||||||
private Long deptId;
|
|
||||||
|
|
||||||
@Schema(description = "原存放地id", example = "8837")
|
|
||||||
private String oldPosId;
|
|
||||||
|
|
||||||
@Schema(description = "调入存放地id", example = "28147")
|
|
||||||
private String posId;
|
|
||||||
|
|
||||||
@Schema(description = "原使用人id", example = "23983")
|
|
||||||
private Long oldUserId;
|
|
||||||
|
|
||||||
@Schema(description = "调入使用人id", example = "918")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
@Schema(description = "备注", example = "你说的对")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
}
|
}
|
@ -8,13 +8,12 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业管理-资产处置子 Response VO
|
||||||
|
* @author 小李
|
||||||
|
* @date 21:34 2024/8/16
|
||||||
|
**/
|
||||||
@Schema(description = "管理后台 - 企业管理-资产处置子 Response VO")
|
@Schema(description = "管理后台 - 企业管理-资产处置子 Response VO")
|
||||||
@Data
|
@Data
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
public class PropertyDealItemRespVO extends PropertyDealItem {
|
public class PropertyDealItemRespVO extends PropertyDealItem {
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
@ExcelProperty("创建时间")
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,44 +1,15 @@
|
|||||||
package cn.iocoder.yudao.module.property.vo;
|
package cn.iocoder.yudao.module.property.vo;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.module.property.entity.PropertyDeal;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业管理-资产处置单/变动单分页 Request VO
|
||||||
|
* @author 小李
|
||||||
|
* @date 21:19 2024/8/16
|
||||||
|
**/
|
||||||
@Schema(description = "管理后台 - 企业管理-资产处置单/变动单分页 Request VO")
|
@Schema(description = "管理后台 - 企业管理-资产处置单/变动单分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
public class PropertyDealReqVO extends PropertyDeal {
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class PropertyDealReqVO extends PageParam {
|
|
||||||
|
|
||||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "18095")
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@Schema(description = "企业id(base_company表中的id)", example = "21595")
|
|
||||||
private String corpId;
|
|
||||||
|
|
||||||
@Schema(description = "部门id(system_dept表中的id,用来做数据权限控制)", example = "19510")
|
|
||||||
private Long deptId;
|
|
||||||
|
|
||||||
@Schema(description = "数据类型", example = "1")
|
|
||||||
private String dataType;
|
|
||||||
|
|
||||||
@Schema(description = "处置/变动单号")
|
|
||||||
private String dealNo;
|
|
||||||
|
|
||||||
@Schema(description = "处置/变动日期")
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
|
||||||
private LocalDate dealDate;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.property.vo;
|
package cn.iocoder.yudao.module.property.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.property.entity.Property;
|
||||||
import cn.iocoder.yudao.module.property.entity.PropertyDeal;
|
import cn.iocoder.yudao.module.property.entity.PropertyDeal;
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
@ -7,14 +8,21 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理后台 - 企业管理-资产处置单/变动单 Response VO
|
||||||
|
* @author 小李
|
||||||
|
* @date 21:19 2024/8/16
|
||||||
|
**/
|
||||||
@Schema(description = "管理后台 - 企业管理-资产处置单/变动单 Response VO")
|
@Schema(description = "管理后台 - 企业管理-资产处置单/变动单 Response VO")
|
||||||
@Data
|
@Data
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
public class PropertyDealRespVO extends PropertyDeal {
|
public class PropertyDealRespVO extends PropertyDeal {
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
/**
|
||||||
@ExcelProperty("创建时间")
|
* 多个资产
|
||||||
private LocalDateTime createTime;
|
* @author 小李
|
||||||
|
* @date 21:20 2024/8/16
|
||||||
|
**/
|
||||||
|
private List<Property> propList;
|
||||||
}
|
}
|
@ -1,12 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="cn.iocoder.yudao.module.company.dal.mysql.propertydealitem.PropertyDealItemMapper">
|
<mapper namespace="cn.iocoder.yudao.module.property.mapper.PropertyDealItemMapper">
|
||||||
|
|
||||||
<!--
|
|
||||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
|
||||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
|
||||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
|
||||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
|
||||||
-->
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -1,12 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="cn.iocoder.yudao.module.company.dal.mysql.propertydeal.PropertyDealMapper">
|
<mapper namespace="cn.iocoder.yudao.module.property.mapper.PropertyDealMapper">
|
||||||
|
|
||||||
<!--
|
|
||||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
|
||||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
|
||||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
|
||||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
|
||||||
-->
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue
Block a user