14 changed files with 1105 additions and 0 deletions
@ -0,0 +1,151 @@ |
|||
package com.gxwebsoft.tower.controller; |
|||
|
|||
import com.github.yulichang.wrapper.MPJLambdaWrapper; |
|||
import com.gxwebsoft.common.core.web.BaseController; |
|||
import com.gxwebsoft.common.system.entity.User; |
|||
import com.gxwebsoft.tower.entity.*; |
|||
import com.gxwebsoft.tower.service.TowerHistorySettleService; |
|||
import com.gxwebsoft.tower.param.TowerHistorySettleParam; |
|||
import com.gxwebsoft.common.core.web.ApiResult; |
|||
import com.gxwebsoft.common.core.web.PageResult; |
|||
import com.gxwebsoft.common.core.web.PageParam; |
|||
import com.gxwebsoft.common.core.web.BatchParam; |
|||
import com.gxwebsoft.common.core.annotation.OperationLog; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 控制器 |
|||
* |
|||
* @author 科技小王子 |
|||
* @since 2023-06-12 16:40:25 |
|||
*/ |
|||
@Api(tags = "管理") |
|||
@RestController |
|||
@RequestMapping("/api/tower/tower-history-settle") |
|||
public class TowerHistorySettleController extends BaseController { |
|||
@Resource |
|||
private TowerHistorySettleService towerHistorySettleService; |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerHistorySettle:list')") |
|||
@OperationLog |
|||
@ApiOperation("分页查询") |
|||
@GetMapping("/page") |
|||
public ApiResult<PageResult<TowerHistorySettle>> page(TowerHistorySettleParam param) { |
|||
MPJLambdaWrapper<TowerHistorySettle> wrapper = new MPJLambdaWrapper<>(); |
|||
wrapper.selectAll(TowerHistorySettle.class) |
|||
.select(TowerProject::getProjectName) |
|||
.selectAs(TowerEquipment::getName, TowerEquipment::getEquipmentName) |
|||
.selectAs(TowerEquipment::getModel, TowerEquipment::getEquipmentModel) |
|||
.select(TowerEquipment::getEquipmentNo) |
|||
.select(TowerEquipment::getFactoryNo) |
|||
.select(TowerEquipment::getFilingNo) |
|||
.leftJoin(TowerProject.class, TowerProject::getProjectId, TowerHistorySettle::getProjectId) |
|||
.leftJoin(TowerEquipment.class, TowerEquipment::getEquipmentId, TowerHistorySettle::getEquipmentId); |
|||
|
|||
PageParam<TowerHistorySettle, TowerHistorySettleParam> page = new PageParam<>(param); |
|||
page.setDefaultOrder("create_time desc"); |
|||
return success(towerHistorySettleService.page(page, wrapper)); |
|||
// 使用关联查询
|
|||
//return success(towerHistorySettleService.pageRel(param));
|
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerHistorySettle:list')") |
|||
@OperationLog |
|||
@ApiOperation("查询全部") |
|||
@GetMapping() |
|||
public ApiResult<List<TowerHistorySettle>> list(TowerHistorySettleParam param) { |
|||
PageParam<TowerHistorySettle, TowerHistorySettleParam> page = new PageParam<>(param); |
|||
page.setDefaultOrder("create_time desc"); |
|||
return success(towerHistorySettleService.list(page.getOrderWrapper())); |
|||
// 使用关联查询
|
|||
//return success(towerHistorySettleService.listRel(param));
|
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerHistorySettle:list')") |
|||
@OperationLog |
|||
@ApiOperation("根据id查询") |
|||
@GetMapping("/{id}") |
|||
public ApiResult<TowerHistorySettle> get(@PathVariable("id") Integer id) { |
|||
return success(towerHistorySettleService.getById(id)); |
|||
// 使用关联查询
|
|||
//return success(towerHistorySettleService.getByIdRel(id));
|
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerHistorySettle:save')") |
|||
@OperationLog |
|||
@ApiOperation("添加") |
|||
@PostMapping() |
|||
public ApiResult<?> save(@RequestBody TowerHistorySettle towerHistorySettle) { |
|||
// 记录当前登录用户id
|
|||
User loginUser = getLoginUser(); |
|||
if (loginUser != null) { |
|||
towerHistorySettle.setUserId(loginUser.getUserId()); |
|||
} |
|||
if (towerHistorySettleService.save(towerHistorySettle)) { |
|||
return success("添加成功"); |
|||
} |
|||
return fail("添加失败"); |
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerHistorySettle:update')") |
|||
@OperationLog |
|||
@ApiOperation("修改") |
|||
@PutMapping() |
|||
public ApiResult<?> update(@RequestBody TowerHistorySettle towerHistorySettle) { |
|||
if (towerHistorySettleService.updateById(towerHistorySettle)) { |
|||
return success("修改成功"); |
|||
} |
|||
return fail("修改失败"); |
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerHistorySettle:remove')") |
|||
@OperationLog |
|||
@ApiOperation("删除") |
|||
@DeleteMapping("/{id}") |
|||
public ApiResult<?> remove(@PathVariable("id") Integer id) { |
|||
if (towerHistorySettleService.removeById(id)) { |
|||
return success("删除成功"); |
|||
} |
|||
return fail("删除失败"); |
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerHistorySettle:save')") |
|||
@OperationLog |
|||
@ApiOperation("批量添加") |
|||
@PostMapping("/batch") |
|||
public ApiResult<?> saveBatch(@RequestBody List<TowerHistorySettle> list) { |
|||
if (towerHistorySettleService.saveBatch(list)) { |
|||
return success("添加成功"); |
|||
} |
|||
return fail("添加失败"); |
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerHistorySettle:update')") |
|||
@OperationLog |
|||
@ApiOperation("批量修改") |
|||
@PutMapping("/batch") |
|||
public ApiResult<?> removeBatch(@RequestBody BatchParam<TowerHistorySettle> batchParam) { |
|||
if (batchParam.update(towerHistorySettleService, "history_settle_id")) { |
|||
return success("修改成功"); |
|||
} |
|||
return fail("修改失败"); |
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerHistorySettle:remove')") |
|||
@OperationLog |
|||
@ApiOperation("批量删除") |
|||
@DeleteMapping("/batch") |
|||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) { |
|||
if (towerHistorySettleService.removeByIds(ids)) { |
|||
return success("删除成功"); |
|||
} |
|||
return fail("删除失败"); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,156 @@ |
|||
package com.gxwebsoft.tower.controller; |
|||
|
|||
import com.github.yulichang.wrapper.MPJLambdaWrapper; |
|||
import com.gxwebsoft.common.core.web.BaseController; |
|||
import com.gxwebsoft.common.system.entity.Company; |
|||
import com.gxwebsoft.common.system.entity.User; |
|||
import com.gxwebsoft.tower.entity.TowerEquipment; |
|||
import com.gxwebsoft.tower.entity.TowerHistorySettle; |
|||
import com.gxwebsoft.tower.entity.TowerProject; |
|||
import com.gxwebsoft.tower.service.TowerRentRecordService; |
|||
import com.gxwebsoft.tower.entity.TowerRentRecord; |
|||
import com.gxwebsoft.tower.param.TowerRentRecordParam; |
|||
import com.gxwebsoft.common.core.web.ApiResult; |
|||
import com.gxwebsoft.common.core.web.PageResult; |
|||
import com.gxwebsoft.common.core.web.PageParam; |
|||
import com.gxwebsoft.common.core.web.BatchParam; |
|||
import com.gxwebsoft.common.core.annotation.OperationLog; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 租单记录控制器 |
|||
* |
|||
* @author 科技小王子 |
|||
* @since 2023-06-13 00:42:42 |
|||
*/ |
|||
@Api(tags = "租单记录管理") |
|||
@RestController |
|||
@RequestMapping("/api/tower/tower-rent-record") |
|||
public class TowerRentRecordController extends BaseController { |
|||
@Resource |
|||
private TowerRentRecordService towerRentRecordService; |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerRentRecord:list')") |
|||
@OperationLog |
|||
@ApiOperation("分页查询租单记录") |
|||
@GetMapping("/page") |
|||
public ApiResult<PageResult<TowerRentRecord>> page(TowerRentRecordParam param) { |
|||
MPJLambdaWrapper<TowerRentRecord> wrapper = new MPJLambdaWrapper<>(); |
|||
wrapper.selectAll(TowerRentRecord.class) |
|||
.select(TowerProject::getProjectName) |
|||
.select(Company::getCompanyName) |
|||
.selectAs(TowerEquipment::getName, TowerEquipment::getEquipmentName) |
|||
.selectAs(TowerEquipment::getModel, TowerEquipment::getEquipmentModel) |
|||
.select(TowerEquipment::getEquipmentNo) |
|||
.select(TowerEquipment::getFactoryNo) |
|||
.select(TowerEquipment::getFilingNo) |
|||
.leftJoin(TowerProject.class, TowerProject::getProjectId, TowerRentRecord::getProjectId) |
|||
.leftJoin(Company.class, Company::getCompanyId, TowerRentRecord::getCompanyId) |
|||
.leftJoin(TowerEquipment.class, TowerEquipment::getEquipmentId, TowerRentRecord::getEquipmentId); |
|||
PageParam<TowerRentRecord, TowerRentRecordParam> page = new PageParam<>(param); |
|||
page.setDefaultOrder("create_time desc"); |
|||
return success(towerRentRecordService.page(page, wrapper)); |
|||
// 使用关联查询
|
|||
//return success(towerRentRecordService.pageRel(param));
|
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerRentRecord:list')") |
|||
@OperationLog |
|||
@ApiOperation("查询全部租单记录") |
|||
@GetMapping() |
|||
public ApiResult<List<TowerRentRecord>> list(TowerRentRecordParam param) { |
|||
PageParam<TowerRentRecord, TowerRentRecordParam> page = new PageParam<>(param); |
|||
page.setDefaultOrder("create_time desc"); |
|||
return success(towerRentRecordService.list(page.getOrderWrapper())); |
|||
// 使用关联查询
|
|||
//return success(towerRentRecordService.listRel(param));
|
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerRentRecord:list')") |
|||
@OperationLog |
|||
@ApiOperation("根据id查询租单记录") |
|||
@GetMapping("/{id}") |
|||
public ApiResult<TowerRentRecord> get(@PathVariable("id") Integer id) { |
|||
return success(towerRentRecordService.getById(id)); |
|||
// 使用关联查询
|
|||
//return success(towerRentRecordService.getByIdRel(id));
|
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerRentRecord:save')") |
|||
@OperationLog |
|||
@ApiOperation("添加租单记录") |
|||
@PostMapping() |
|||
public ApiResult<?> save(@RequestBody TowerRentRecord towerRentRecord) { |
|||
// 记录当前登录用户id
|
|||
User loginUser = getLoginUser(); |
|||
if (loginUser != null) { |
|||
towerRentRecord.setUserId(loginUser.getUserId()); |
|||
} |
|||
if (towerRentRecordService.save(towerRentRecord)) { |
|||
return success("添加成功"); |
|||
} |
|||
return fail("添加失败"); |
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerRentRecord:update')") |
|||
@OperationLog |
|||
@ApiOperation("修改租单记录") |
|||
@PutMapping() |
|||
public ApiResult<?> update(@RequestBody TowerRentRecord towerRentRecord) { |
|||
if (towerRentRecordService.updateById(towerRentRecord)) { |
|||
return success("修改成功"); |
|||
} |
|||
return fail("修改失败"); |
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerRentRecord:remove')") |
|||
@OperationLog |
|||
@ApiOperation("删除租单记录") |
|||
@DeleteMapping("/{id}") |
|||
public ApiResult<?> remove(@PathVariable("id") Integer id) { |
|||
if (towerRentRecordService.removeById(id)) { |
|||
return success("删除成功"); |
|||
} |
|||
return fail("删除失败"); |
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerRentRecord:save')") |
|||
@OperationLog |
|||
@ApiOperation("批量添加租单记录") |
|||
@PostMapping("/batch") |
|||
public ApiResult<?> saveBatch(@RequestBody List<TowerRentRecord> list) { |
|||
if (towerRentRecordService.saveBatch(list)) { |
|||
return success("添加成功"); |
|||
} |
|||
return fail("添加失败"); |
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerRentRecord:update')") |
|||
@OperationLog |
|||
@ApiOperation("批量修改租单记录") |
|||
@PutMapping("/batch") |
|||
public ApiResult<?> removeBatch(@RequestBody BatchParam<TowerRentRecord> batchParam) { |
|||
if (batchParam.update(towerRentRecordService, "rent_record_id")) { |
|||
return success("修改成功"); |
|||
} |
|||
return fail("修改失败"); |
|||
} |
|||
|
|||
@PreAuthorize("hasAuthority('tower:towerRentRecord:remove')") |
|||
@OperationLog |
|||
@ApiOperation("批量删除租单记录") |
|||
@DeleteMapping("/batch") |
|||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) { |
|||
if (towerRentRecordService.removeByIds(ids)) { |
|||
return success("删除成功"); |
|||
} |
|||
return fail("删除失败"); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,109 @@ |
|||
package com.gxwebsoft.tower.entity; |
|||
|
|||
import java.math.BigDecimal; |
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import java.time.LocalDateTime; |
|||
import com.baomidou.mybatisplus.annotation.TableLogic; |
|||
import java.io.Serializable; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author 科技小王子 |
|||
* @since 2023-06-12 16:40:25 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
@ApiModel(value = "TowerHistorySettle对象", description = "") |
|||
public class TowerHistorySettle implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@TableId(value = "history_settle_id", type = IdType.AUTO) |
|||
private Integer historySettleId; |
|||
|
|||
@ApiModelProperty(value = "项目ID") |
|||
private Integer projectId; |
|||
|
|||
@ApiModelProperty(value = "合同编号") |
|||
private String contractNo; |
|||
|
|||
@ApiModelProperty(value = "设备") |
|||
private Integer equipmentId; |
|||
|
|||
@ApiModelProperty(value = "设备结算租金含税金额") |
|||
private BigDecimal amountWithTax; |
|||
|
|||
@ApiModelProperty(value = "设备结算租金税率") |
|||
private BigDecimal taxAmount; |
|||
|
|||
@ApiModelProperty(value = "进出场费含税金额") |
|||
private BigDecimal inOutWithTax; |
|||
|
|||
@ApiModelProperty(value = "进出场费税率") |
|||
private BigDecimal inOutTax; |
|||
|
|||
@ApiModelProperty(value = "劳务费含税金额") |
|||
private BigDecimal workerAmountWithTax; |
|||
|
|||
@ApiModelProperty(value = "劳务费税率") |
|||
private BigDecimal workerTax; |
|||
|
|||
@ApiModelProperty(value = "其他费用含税金额") |
|||
private BigDecimal otherAmountWithTax; |
|||
|
|||
@ApiModelProperty(value = "其他费用税率") |
|||
private BigDecimal otherTax; |
|||
|
|||
@ApiModelProperty(value = "开始日期") |
|||
private String startDate; |
|||
|
|||
@ApiModelProperty(value = "结束日期") |
|||
private String endDate; |
|||
|
|||
@ApiModelProperty(value = "用户ID") |
|||
private Integer userId; |
|||
|
|||
@ApiModelProperty(value = "是否删除, 0否, 1是") |
|||
@TableLogic |
|||
private Integer deleted; |
|||
|
|||
@ApiModelProperty(value = "租户id") |
|||
private Integer tenantId; |
|||
|
|||
@ApiModelProperty(value = "创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ApiModelProperty(value = "修改时间") |
|||
private LocalDateTime updateTime; |
|||
|
|||
@ApiModelProperty(value = "项目名称") |
|||
@TableField(exist = false) |
|||
private String projectName; |
|||
|
|||
@ApiModelProperty(value = "设备名称") |
|||
@TableField(exist = false) |
|||
private String equipmentName; |
|||
|
|||
@ApiModelProperty(value = "设备型号") |
|||
@TableField(exist = false) |
|||
private String equipmentModel; |
|||
|
|||
@ApiModelProperty(value = "出厂编号") |
|||
@TableField(exist = false) |
|||
private String factoryNo; |
|||
|
|||
@ApiModelProperty(value = "备案编号") |
|||
@TableField(exist = false) |
|||
private String filingNo; |
|||
|
|||
@ApiModelProperty(value = "自编号") |
|||
@TableField(exist = false) |
|||
private String equipmentNo; |
|||
|
|||
} |
@ -0,0 +1,114 @@ |
|||
package com.gxwebsoft.tower.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableLogic; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 租单记录 |
|||
* |
|||
* @author 科技小王子 |
|||
* @since 2023-06-13 00:42:42 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
@ApiModel(value = "TowerRentRecord对象", description = "租单记录") |
|||
public class TowerRentRecord implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty(value = "租单记录id") |
|||
@TableId(value = "rent_record_id", type = IdType.AUTO) |
|||
private Integer rentRecordId; |
|||
|
|||
@ApiModelProperty(value = "项目ID") |
|||
private Integer projectId; |
|||
|
|||
@ApiModelProperty(value = "合同编号") |
|||
private String contractNo; |
|||
|
|||
@ApiModelProperty(value = "设备ID") |
|||
private Integer equipmentId; |
|||
|
|||
@ApiModelProperty(value = "起租日期") |
|||
private String startDate; |
|||
|
|||
@ApiModelProperty(value = "停租日期") |
|||
private String stopDate; |
|||
|
|||
@ApiModelProperty(value = "检测日期") |
|||
private String checkDate; |
|||
|
|||
@ApiModelProperty(value = "报停日期") |
|||
private String reportStopDate; |
|||
|
|||
@ApiModelProperty(value = "报停类型") |
|||
private String reportStopType; |
|||
|
|||
@ApiModelProperty(value = "复工日期") |
|||
private String restoreDate; |
|||
|
|||
@ApiModelProperty(value = "报监编号") |
|||
private String reportMonitorNo; |
|||
|
|||
@ApiModelProperty(value = "承租单位") |
|||
private Integer companyId; |
|||
|
|||
@ApiModelProperty(value = "状态(0未起租1起租2中途报停3报停复工4拆卸停租)") |
|||
private Integer status; |
|||
|
|||
@ApiModelProperty(value = "所有人") |
|||
private Integer userId; |
|||
|
|||
@ApiModelProperty(value = "是否删除, 0否, 1是") |
|||
@TableLogic |
|||
private Integer deleted; |
|||
|
|||
@ApiModelProperty(value = "租户id") |
|||
private Integer tenantId; |
|||
|
|||
@ApiModelProperty(value = "创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ApiModelProperty(value = "修改时间") |
|||
private LocalDateTime updateTime; |
|||
|
|||
@ApiModelProperty(value = "项目名称") |
|||
@TableField(exist = false) |
|||
private String projectName; |
|||
|
|||
@ApiModelProperty(value = "承租单位") |
|||
@TableField(exist = false) |
|||
private String companyName; |
|||
|
|||
@ApiModelProperty(value = "设备名称") |
|||
@TableField(exist = false) |
|||
private String equipmentName; |
|||
|
|||
@ApiModelProperty(value = "设备型号") |
|||
@TableField(exist = false) |
|||
private String equipmentModel; |
|||
|
|||
@ApiModelProperty(value = "备案号") |
|||
@TableField(exist = false) |
|||
private String filingNo; |
|||
|
|||
@ApiModelProperty(value = "自编号") |
|||
@TableField(exist = false) |
|||
private String equipmentNo; |
|||
|
|||
@ApiModelProperty(value = "出厂编号") |
|||
@TableField(exist = false) |
|||
private String factoryNo; |
|||
|
|||
} |
@ -0,0 +1,38 @@ |
|||
package com.gxwebsoft.tower.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.github.yulichang.base.MPJBaseMapper; |
|||
import com.gxwebsoft.tower.entity.TowerHistorySettle; |
|||
import com.gxwebsoft.tower.param.TowerHistorySettleParam; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Mapper |
|||
* |
|||
* @author 科技小王子 |
|||
* @since 2023-06-12 16:40:25 |
|||
*/ |
|||
public interface TowerHistorySettleMapper extends MPJBaseMapper<TowerHistorySettle> { |
|||
|
|||
/** |
|||
* 分页查询 |
|||
* |
|||
* @param page 分页对象 |
|||
* @param param 查询参数 |
|||
* @return List<TowerHistorySettle> |
|||
*/ |
|||
List<TowerHistorySettle> selectPageRel(@Param("page") IPage<TowerHistorySettle> page, |
|||
@Param("param") TowerHistorySettleParam param); |
|||
|
|||
/** |
|||
* 查询全部 |
|||
* |
|||
* @param param 查询参数 |
|||
* @return List<User> |
|||
*/ |
|||
List<TowerHistorySettle> selectListRel(@Param("param") TowerHistorySettleParam param); |
|||
|
|||
} |
@ -0,0 +1,38 @@ |
|||
package com.gxwebsoft.tower.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.github.yulichang.base.MPJBaseMapper; |
|||
import com.gxwebsoft.tower.entity.TowerRentRecord; |
|||
import com.gxwebsoft.tower.param.TowerRentRecordParam; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 租单记录Mapper |
|||
* |
|||
* @author 科技小王子 |
|||
* @since 2023-06-13 00:42:42 |
|||
*/ |
|||
public interface TowerRentRecordMapper extends MPJBaseMapper<TowerRentRecord> { |
|||
|
|||
/** |
|||
* 分页查询 |
|||
* |
|||
* @param page 分页对象 |
|||
* @param param 查询参数 |
|||
* @return List<TowerRentRecord> |
|||
*/ |
|||
List<TowerRentRecord> selectPageRel(@Param("page") IPage<TowerRentRecord> page, |
|||
@Param("param") TowerRentRecordParam param); |
|||
|
|||
/** |
|||
* 查询全部 |
|||
* |
|||
* @param param 查询参数 |
|||
* @return List<User> |
|||
*/ |
|||
List<TowerRentRecord> selectListRel(@Param("param") TowerRentRecordParam param); |
|||
|
|||
} |
@ -0,0 +1,80 @@ |
|||
<?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.gxwebsoft.tower.mapper.TowerHistorySettleMapper"> |
|||
|
|||
<!-- 关联查询sql --> |
|||
<sql id="selectSql"> |
|||
SELECT a.* |
|||
FROM tower_history_settle a |
|||
<where> |
|||
<if test="param.historySettleId != null"> |
|||
AND a.history_settle_id = #{param.historySettleId} |
|||
</if> |
|||
<if test="param.projectId != null"> |
|||
AND a.project_id = #{param.projectId} |
|||
</if> |
|||
<if test="param.contractNo != null"> |
|||
AND a.contract_no LIKE CONCAT('%', #{param.contractNo}, '%') |
|||
</if> |
|||
<if test="param.equipmentId != null"> |
|||
AND a.equipment_id = #{param.equipmentId} |
|||
</if> |
|||
<if test="param.amountWithTax != null"> |
|||
AND a.amount_with_tax = #{param.amountWithTax} |
|||
</if> |
|||
<if test="param.taxAmount != null"> |
|||
AND a.tax_amount = #{param.taxAmount} |
|||
</if> |
|||
<if test="param.inOutWithTax != null"> |
|||
AND a.in_out_with_tax = #{param.inOutWithTax} |
|||
</if> |
|||
<if test="param.inOutTax != null"> |
|||
AND a.in_out_tax = #{param.inOutTax} |
|||
</if> |
|||
<if test="param.workerAmountWithTax != null"> |
|||
AND a.worker_amount_with_tax = #{param.workerAmountWithTax} |
|||
</if> |
|||
<if test="param.workerTax != null"> |
|||
AND a.worker_tax = #{param.workerTax} |
|||
</if> |
|||
<if test="param.otherAmountWithTax != null"> |
|||
AND a.other_amount_with_tax = #{param.otherAmountWithTax} |
|||
</if> |
|||
<if test="param.otherTax != null"> |
|||
AND a.other_tax = #{param.otherTax} |
|||
</if> |
|||
<if test="param.startDate != null"> |
|||
AND a.start_date LIKE CONCAT('%', #{param.startDate}, '%') |
|||
</if> |
|||
<if test="param.endDate != null"> |
|||
AND a.end_date LIKE CONCAT('%', #{param.endDate}, '%') |
|||
</if> |
|||
<if test="param.userId != null"> |
|||
AND a.user_id = #{param.userId} |
|||
</if> |
|||
<if test="param.deleted != null"> |
|||
AND a.deleted = #{param.deleted} |
|||
</if> |
|||
<if test="param.deleted == null"> |
|||
AND a.deleted = 0 |
|||
</if> |
|||
<if test="param.createTimeStart != null"> |
|||
AND a.create_time >= #{param.createTimeStart} |
|||
</if> |
|||
<if test="param.createTimeEnd != null"> |
|||
AND a.create_time <= #{param.createTimeEnd} |
|||
</if> |
|||
</where> |
|||
</sql> |
|||
|
|||
<!-- 分页查询 --> |
|||
<select id="selectPageRel" resultType="com.gxwebsoft.tower.entity.TowerHistorySettle"> |
|||
<include refid="selectSql"></include> |
|||
</select> |
|||
|
|||
<!-- 查询全部 --> |
|||
<select id="selectListRel" resultType="com.gxwebsoft.tower.entity.TowerHistorySettle"> |
|||
<include refid="selectSql"></include> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,77 @@ |
|||
<?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.gxwebsoft.tower.mapper.TowerRentRecordMapper"> |
|||
|
|||
<!-- 关联查询sql --> |
|||
<sql id="selectSql"> |
|||
SELECT a.* |
|||
FROM tower_rent_record a |
|||
<where> |
|||
<if test="param.rentRecordId != null"> |
|||
AND a.rent_record_id = #{param.rentRecordId} |
|||
</if> |
|||
<if test="param.projectId != null"> |
|||
AND a.project_id = #{param.projectId} |
|||
</if> |
|||
<if test="param.contractNo != null"> |
|||
AND a.contract_no LIKE CONCAT('%', #{param.contractNo}, '%') |
|||
</if> |
|||
<if test="param.equipmentId != null"> |
|||
AND a.equipment_id = #{param.equipmentId} |
|||
</if> |
|||
<if test="param.startDate != null"> |
|||
AND a.start_date LIKE CONCAT('%', #{param.startDate}, '%') |
|||
</if> |
|||
<if test="param.stopDate != null"> |
|||
AND a.stop_date LIKE CONCAT('%', #{param.stopDate}, '%') |
|||
</if> |
|||
<if test="param.checkDate != null"> |
|||
AND a.check_date LIKE CONCAT('%', #{param.checkDate}, '%') |
|||
</if> |
|||
<if test="param.reportStopDate != null"> |
|||
AND a.report_stop_date LIKE CONCAT('%', #{param.reportStopDate}, '%') |
|||
</if> |
|||
<if test="param.reportStopType != null"> |
|||
AND a.report_stop_type LIKE CONCAT('%', #{param.reportStopType}, '%') |
|||
</if> |
|||
<if test="param.restoreDate != null"> |
|||
AND a.restore_date LIKE CONCAT('%', #{param.restoreDate}, '%') |
|||
</if> |
|||
<if test="param.reportMonitorNo != null"> |
|||
AND a.report_monitor_no LIKE CONCAT('%', #{param.reportMonitorNo}, '%') |
|||
</if> |
|||
<if test="param.companyId != null"> |
|||
AND a.company_id = #{param.companyId} |
|||
</if> |
|||
<if test="param.status != null"> |
|||
AND a.status = #{param.status} |
|||
</if> |
|||
<if test="param.userId != null"> |
|||
AND a.user_id = #{param.userId} |
|||
</if> |
|||
<if test="param.deleted != null"> |
|||
AND a.deleted = #{param.deleted} |
|||
</if> |
|||
<if test="param.deleted == null"> |
|||
AND a.deleted = 0 |
|||
</if> |
|||
<if test="param.createTimeStart != null"> |
|||
AND a.create_time >= #{param.createTimeStart} |
|||
</if> |
|||
<if test="param.createTimeEnd != null"> |
|||
AND a.create_time <= #{param.createTimeEnd} |
|||
</if> |
|||
</where> |
|||
</sql> |
|||
|
|||
<!-- 分页查询 --> |
|||
<select id="selectPageRel" resultType="com.gxwebsoft.tower.entity.TowerRentRecord"> |
|||
<include refid="selectSql"></include> |
|||
</select> |
|||
|
|||
<!-- 查询全部 --> |
|||
<select id="selectListRel" resultType="com.gxwebsoft.tower.entity.TowerRentRecord"> |
|||
<include refid="selectSql"></include> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,87 @@ |
|||
package com.gxwebsoft.tower.param; |
|||
|
|||
import com.gxwebsoft.common.core.annotation.QueryField; |
|||
import com.gxwebsoft.common.core.annotation.QueryType; |
|||
import com.gxwebsoft.common.core.web.BaseParam; |
|||
import com.fasterxml.jackson.annotation.JsonInclude; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 查询参数 |
|||
* |
|||
* @author 科技小王子 |
|||
* @since 2023-06-12 16:40:25 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
@JsonInclude(JsonInclude.Include.NON_NULL) |
|||
@ApiModel(value = "TowerHistorySettleParam对象", description = "查询参数") |
|||
public class TowerHistorySettleParam extends BaseParam { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@QueryField(type = QueryType.EQ) |
|||
private Integer historySettleId; |
|||
|
|||
@ApiModelProperty(value = "项目ID") |
|||
@QueryField(type = QueryType.EQ) |
|||
private Integer projectId; |
|||
|
|||
@ApiModelProperty(value = "合同编号") |
|||
private String contractNo; |
|||
|
|||
@ApiModelProperty(value = "设备") |
|||
@QueryField(type = QueryType.EQ) |
|||
private Integer equipmentId; |
|||
|
|||
@ApiModelProperty(value = "设备结算租金含税金额") |
|||
@QueryField(type = QueryType.EQ) |
|||
private BigDecimal amountWithTax; |
|||
|
|||
@ApiModelProperty(value = "设备结算租金税率") |
|||
@QueryField(type = QueryType.EQ) |
|||
private BigDecimal taxAmount; |
|||
|
|||
@ApiModelProperty(value = "进出场费含税金额") |
|||
@QueryField(type = QueryType.EQ) |
|||
private BigDecimal inOutWithTax; |
|||
|
|||
@ApiModelProperty(value = "进出场费税率") |
|||
@QueryField(type = QueryType.EQ) |
|||
private BigDecimal inOutTax; |
|||
|
|||
@ApiModelProperty(value = "劳务费含税金额") |
|||
@QueryField(type = QueryType.EQ) |
|||
private BigDecimal workerAmountWithTax; |
|||
|
|||
@ApiModelProperty(value = "劳务费税率") |
|||
@QueryField(type = QueryType.EQ) |
|||
private BigDecimal workerTax; |
|||
|
|||
@ApiModelProperty(value = "其他费用含税金额") |
|||
@QueryField(type = QueryType.EQ) |
|||
private BigDecimal otherAmountWithTax; |
|||
|
|||
@ApiModelProperty(value = "其他费用税率") |
|||
@QueryField(type = QueryType.EQ) |
|||
private BigDecimal otherTax; |
|||
|
|||
@ApiModelProperty(value = "开始日期") |
|||
private String startDate; |
|||
|
|||
@ApiModelProperty(value = "结束日期") |
|||
private String endDate; |
|||
|
|||
@ApiModelProperty(value = "用户ID") |
|||
@QueryField(type = QueryType.EQ) |
|||
private Integer userId; |
|||
|
|||
@ApiModelProperty(value = "是否删除, 0否, 1是") |
|||
@QueryField(type = QueryType.EQ) |
|||
private Integer deleted; |
|||
|
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.gxwebsoft.tower.param; |
|||
|
|||
import com.gxwebsoft.common.core.annotation.QueryField; |
|||
import com.gxwebsoft.common.core.annotation.QueryType; |
|||
import com.gxwebsoft.common.core.web.BaseParam; |
|||
import com.fasterxml.jackson.annotation.JsonInclude; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 租单记录查询参数 |
|||
* |
|||
* @author 科技小王子 |
|||
* @since 2023-06-13 00:42:42 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
@JsonInclude(JsonInclude.Include.NON_NULL) |
|||
@ApiModel(value = "TowerRentRecordParam对象", description = "租单记录查询参数") |
|||
public class TowerRentRecordParam extends BaseParam { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty(value = "租单记录id") |
|||
@QueryField(type = QueryType.EQ) |
|||
private Integer rentRecordId; |
|||
|
|||
@ApiModelProperty(value = "项目ID") |
|||
@QueryField(type = QueryType.EQ) |
|||
private Integer projectId; |
|||
|
|||
@ApiModelProperty(value = "合同编号") |
|||
private String contractNo; |
|||
|
|||
@ApiModelProperty(value = "设备ID") |
|||
@QueryField(type = QueryType.EQ) |
|||
private Integer equipmentId; |
|||
|
|||
@ApiModelProperty(value = "起租日期") |
|||
private String startDate; |
|||
|
|||
@ApiModelProperty(value = "停租日期") |
|||
private String stopDate; |
|||
|
|||
@ApiModelProperty(value = "检测日期") |
|||
private String checkDate; |
|||
|
|||
@ApiModelProperty(value = "报停日期") |
|||
private String reportStopDate; |
|||
|
|||
@ApiModelProperty(value = "报停类型") |
|||
private String reportStopType; |
|||
|
|||
@ApiModelProperty(value = "复工日期") |
|||
private String restoreDate; |
|||
|
|||
@ApiModelProperty(value = "报监编号") |
|||
private String reportMonitorNo; |
|||
|
|||
@ApiModelProperty(value = "承租单位") |
|||
@QueryField(type = QueryType.EQ) |
|||
private Integer companyId; |
|||
|
|||
@ApiModelProperty(value = "状态(0未起租1起租2中途报停3报停复工4拆卸停租)") |
|||
@QueryField(type = QueryType.EQ) |
|||
private Boolean status; |
|||
|
|||
@ApiModelProperty(value = "所有人") |
|||
@QueryField(type = QueryType.EQ) |
|||
private Integer userId; |
|||
|
|||
@ApiModelProperty(value = "是否删除, 0否, 1是") |
|||
@QueryField(type = QueryType.EQ) |
|||
private Integer deleted; |
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.gxwebsoft.tower.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.gxwebsoft.common.core.web.PageResult; |
|||
import com.gxwebsoft.tower.entity.TowerHistorySettle; |
|||
import com.gxwebsoft.tower.param.TowerHistorySettleParam; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Service |
|||
* |
|||
* @author 科技小王子 |
|||
* @since 2023-06-12 16:40:25 |
|||
*/ |
|||
public interface TowerHistorySettleService extends IService<TowerHistorySettle> { |
|||
|
|||
/** |
|||
* 分页关联查询 |
|||
* |
|||
* @param param 查询参数 |
|||
* @return PageResult<TowerHistorySettle> |
|||
*/ |
|||
PageResult<TowerHistorySettle> pageRel(TowerHistorySettleParam param); |
|||
|
|||
/** |
|||
* 关联查询全部 |
|||
* |
|||
* @param param 查询参数 |
|||
* @return List<TowerHistorySettle> |
|||
*/ |
|||
List<TowerHistorySettle> listRel(TowerHistorySettleParam param); |
|||
|
|||
/** |
|||
* 根据id查询 |
|||
* |
|||
* @param historySettleId |
|||
* @return TowerHistorySettle |
|||
*/ |
|||
TowerHistorySettle getByIdRel(Integer historySettleId); |
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.gxwebsoft.tower.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.gxwebsoft.common.core.web.PageResult; |
|||
import com.gxwebsoft.tower.entity.TowerRentRecord; |
|||
import com.gxwebsoft.tower.param.TowerRentRecordParam; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 租单记录Service |
|||
* |
|||
* @author 科技小王子 |
|||
* @since 2023-06-13 00:42:42 |
|||
*/ |
|||
public interface TowerRentRecordService extends IService<TowerRentRecord> { |
|||
|
|||
/** |
|||
* 分页关联查询 |
|||
* |
|||
* @param param 查询参数 |
|||
* @return PageResult<TowerRentRecord> |
|||
*/ |
|||
PageResult<TowerRentRecord> pageRel(TowerRentRecordParam param); |
|||
|
|||
/** |
|||
* 关联查询全部 |
|||
* |
|||
* @param param 查询参数 |
|||
* @return List<TowerRentRecord> |
|||
*/ |
|||
List<TowerRentRecord> listRel(TowerRentRecordParam param); |
|||
|
|||
/** |
|||
* 根据id查询 |
|||
* |
|||
* @param rentRecordId 租单记录id |
|||
* @return TowerRentRecord |
|||
*/ |
|||
TowerRentRecord getByIdRel(Integer rentRecordId); |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
package com.gxwebsoft.tower.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.gxwebsoft.tower.mapper.TowerHistorySettleMapper; |
|||
import com.gxwebsoft.tower.service.TowerHistorySettleService; |
|||
import com.gxwebsoft.tower.entity.TowerHistorySettle; |
|||
import com.gxwebsoft.tower.param.TowerHistorySettleParam; |
|||
import com.gxwebsoft.common.core.web.PageParam; |
|||
import com.gxwebsoft.common.core.web.PageResult; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Service实现 |
|||
* |
|||
* @author 科技小王子 |
|||
* @since 2023-06-12 16:40:25 |
|||
*/ |
|||
@Service |
|||
public class TowerHistorySettleServiceImpl extends ServiceImpl<TowerHistorySettleMapper, TowerHistorySettle> implements TowerHistorySettleService { |
|||
|
|||
@Override |
|||
public PageResult<TowerHistorySettle> pageRel(TowerHistorySettleParam param) { |
|||
PageParam<TowerHistorySettle, TowerHistorySettleParam> page = new PageParam<>(param); |
|||
//page.setDefaultOrder("create_time desc");
|
|||
List<TowerHistorySettle> list = baseMapper.selectPageRel(page, param); |
|||
return new PageResult<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<TowerHistorySettle> listRel(TowerHistorySettleParam param) { |
|||
List<TowerHistorySettle> list = baseMapper.selectListRel(param); |
|||
// 排序
|
|||
PageParam<TowerHistorySettle, TowerHistorySettleParam> page = new PageParam<>(); |
|||
//page.setDefaultOrder("create_time desc");
|
|||
return page.sortRecords(list); |
|||
} |
|||
|
|||
@Override |
|||
public TowerHistorySettle getByIdRel(Integer historySettleId) { |
|||
TowerHistorySettleParam param = new TowerHistorySettleParam(); |
|||
param.setHistorySettleId(historySettleId); |
|||
return param.getOne(baseMapper.selectListRel(param)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
package com.gxwebsoft.tower.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.gxwebsoft.tower.mapper.TowerRentRecordMapper; |
|||
import com.gxwebsoft.tower.service.TowerRentRecordService; |
|||
import com.gxwebsoft.tower.entity.TowerRentRecord; |
|||
import com.gxwebsoft.tower.param.TowerRentRecordParam; |
|||
import com.gxwebsoft.common.core.web.PageParam; |
|||
import com.gxwebsoft.common.core.web.PageResult; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 租单记录Service实现 |
|||
* |
|||
* @author 科技小王子 |
|||
* @since 2023-06-13 00:42:42 |
|||
*/ |
|||
@Service |
|||
public class TowerRentRecordServiceImpl extends ServiceImpl<TowerRentRecordMapper, TowerRentRecord> implements TowerRentRecordService { |
|||
|
|||
@Override |
|||
public PageResult<TowerRentRecord> pageRel(TowerRentRecordParam param) { |
|||
PageParam<TowerRentRecord, TowerRentRecordParam> page = new PageParam<>(param); |
|||
//page.setDefaultOrder("create_time desc");
|
|||
List<TowerRentRecord> list = baseMapper.selectPageRel(page, param); |
|||
return new PageResult<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<TowerRentRecord> listRel(TowerRentRecordParam param) { |
|||
List<TowerRentRecord> list = baseMapper.selectListRel(param); |
|||
// 排序
|
|||
PageParam<TowerRentRecord, TowerRentRecordParam> page = new PageParam<>(); |
|||
//page.setDefaultOrder("create_time desc");
|
|||
return page.sortRecords(list); |
|||
} |
|||
|
|||
@Override |
|||
public TowerRentRecord getByIdRel(Integer rentRecordId) { |
|||
TowerRentRecordParam param = new TowerRentRecordParam(); |
|||
param.setRentRecordId(rentRecordId); |
|||
return param.getOne(baseMapper.selectListRel(param)); |
|||
} |
|||
|
|||
} |
Loading…
Reference in new issue