31 changed files with 1929 additions and 3 deletions
@ -0,0 +1,152 @@ |
|||||
|
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.*; |
||||
|
import com.gxwebsoft.tower.mapper.TowerContractMapper; |
||||
|
import com.gxwebsoft.tower.service.TowerContractService; |
||||
|
import com.gxwebsoft.tower.param.TowerContractParam; |
||||
|
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-08 22:36:47 |
||||
|
*/ |
||||
|
@Api(tags = "合同存档管理") |
||||
|
@RestController |
||||
|
@RequestMapping("/api/tower/tower-contract") |
||||
|
public class TowerContractController extends BaseController { |
||||
|
@Resource |
||||
|
private TowerContractService towerContractService; |
||||
|
private TowerContractMapper towerContractMapper; |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerContract:list')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("分页查询合同存档") |
||||
|
@GetMapping("/page") |
||||
|
public ApiResult<PageResult<TowerContract>> page(TowerContractParam param) { |
||||
|
MPJLambdaWrapper<TowerContract> wrapper = new MPJLambdaWrapper<>(); |
||||
|
wrapper.selectAll(TowerContract.class) |
||||
|
.select(TowerProject::getProjectName) |
||||
|
.selectAs(TowerCustomer::getName, TowerContract::getCustomerName) |
||||
|
.selectAs(Company::getCompanyName, TowerContract::getCompanyName) |
||||
|
.leftJoin(TowerProject.class, TowerProject::getProjectId, TowerContract::getProjectId) |
||||
|
.leftJoin(TowerCustomer.class, TowerCustomer::getCustomerId, TowerContract::getCustomerId) |
||||
|
.leftJoin(Company.class, Company::getCompanyId, TowerContract::getCompanyId); |
||||
|
|
||||
|
PageParam<TowerContract, TowerContractParam> page = new PageParam<>(param); |
||||
|
page.setDefaultOrder("create_time desc"); |
||||
|
return success(towerContractService.page(page, wrapper)); |
||||
|
// 使用关联查询
|
||||
|
//return success(towerContractService.pageRel(param));
|
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerContract:list')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("查询全部合同存档") |
||||
|
@GetMapping() |
||||
|
public ApiResult<List<TowerContract>> list(TowerContractParam param) { |
||||
|
PageParam<TowerContract, TowerContractParam> page = new PageParam<>(param); |
||||
|
page.setDefaultOrder("create_time desc"); |
||||
|
return success(towerContractService.list(page.getOrderWrapper())); |
||||
|
// 使用关联查询
|
||||
|
//return success(towerContractService.listRel(param));
|
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerContract:list')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("根据id查询合同存档") |
||||
|
@GetMapping("/{id}") |
||||
|
public ApiResult<TowerContract> get(@PathVariable("id") Integer id) { |
||||
|
return success(towerContractService.getById(id)); |
||||
|
// 使用关联查询
|
||||
|
//return success(towerContractService.getByIdRel(id));
|
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerContract:save')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("添加合同存档") |
||||
|
@PostMapping() |
||||
|
public ApiResult<?> save(@RequestBody TowerContract towerContract) { |
||||
|
// 记录当前登录用户id
|
||||
|
User loginUser = getLoginUser(); |
||||
|
if (loginUser != null) { |
||||
|
towerContract.setUserId(loginUser.getUserId()); |
||||
|
} |
||||
|
if (towerContractService.save(towerContract)) { |
||||
|
return success(towerContract.getContractId()); |
||||
|
} |
||||
|
return fail("添加失败"); |
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerContract:update')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("修改合同存档") |
||||
|
@PutMapping() |
||||
|
public ApiResult<?> update(@RequestBody TowerContract towerContract) { |
||||
|
if (towerContractService.updateById(towerContract)) { |
||||
|
return success("修改成功"); |
||||
|
} |
||||
|
return fail("修改失败"); |
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerContract:remove')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("删除合同存档") |
||||
|
@DeleteMapping("/{id}") |
||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) { |
||||
|
if (towerContractService.removeById(id)) { |
||||
|
return success("删除成功"); |
||||
|
} |
||||
|
return fail("删除失败"); |
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerContract:save')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("批量添加合同存档") |
||||
|
@PostMapping("/batch") |
||||
|
public ApiResult<?> saveBatch(@RequestBody List<TowerContract> list) { |
||||
|
if (towerContractService.saveBatch(list)) { |
||||
|
return success("添加成功"); |
||||
|
} |
||||
|
return fail("添加失败"); |
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerContract:update')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("批量修改合同存档") |
||||
|
@PutMapping("/batch") |
||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<TowerContract> batchParam) { |
||||
|
if (batchParam.update(towerContractService, "contract_id")) { |
||||
|
return success("修改成功"); |
||||
|
} |
||||
|
return fail("修改失败"); |
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerContract:remove')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("批量删除合同存档") |
||||
|
@DeleteMapping("/batch") |
||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) { |
||||
|
if (towerContractService.removeByIds(ids)) { |
||||
|
return success("删除成功"); |
||||
|
} |
||||
|
return fail("删除失败"); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,134 @@ |
|||||
|
package com.gxwebsoft.tower.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.gxwebsoft.common.core.web.BaseController; |
||||
|
import com.gxwebsoft.common.system.entity.User; |
||||
|
import com.gxwebsoft.tower.entity.TowerContractFile; |
||||
|
import com.gxwebsoft.tower.service.TowerContractEquipmentService; |
||||
|
import com.gxwebsoft.tower.entity.TowerContractEquipment; |
||||
|
import com.gxwebsoft.tower.param.TowerContractEquipmentParam; |
||||
|
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.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 合同设备清单控制器 |
||||
|
* |
||||
|
* @author 科技小王子 |
||||
|
* @since 2023-06-09 13:42:20 |
||||
|
*/ |
||||
|
@Api(tags = "合同设备清单管理") |
||||
|
@RestController |
||||
|
@RequestMapping("/api/tower/tower-contract-equipment") |
||||
|
public class TowerContractEquipmentController extends BaseController { |
||||
|
@Resource |
||||
|
private TowerContractEquipmentService towerContractEquipmentService; |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("分页查询合同设备清单") |
||||
|
@GetMapping("/page") |
||||
|
public ApiResult<PageResult<TowerContractEquipment>> page(TowerContractEquipmentParam param) { |
||||
|
PageParam<TowerContractEquipment, TowerContractEquipmentParam> page = new PageParam<>(param); |
||||
|
page.setDefaultOrder("create_time desc"); |
||||
|
return success(towerContractEquipmentService.page(page, page.getWrapper())); |
||||
|
// 使用关联查询
|
||||
|
//return success(towerContractEquipmentService.pageRel(param));
|
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("查询全部合同设备清单") |
||||
|
@GetMapping() |
||||
|
public ApiResult<List<TowerContractEquipment>> list(TowerContractEquipmentParam param) { |
||||
|
PageParam<TowerContractEquipment, TowerContractEquipmentParam> page = new PageParam<>(param); |
||||
|
page.setDefaultOrder("create_time desc"); |
||||
|
return success(towerContractEquipmentService.list(page.getOrderWrapper())); |
||||
|
// 使用关联查询
|
||||
|
//return success(towerContractEquipmentService.listRel(param));
|
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("根据id查询合同设备清单") |
||||
|
@GetMapping("/{id}") |
||||
|
public ApiResult<TowerContractEquipment> get(@PathVariable("id") Integer id) { |
||||
|
return success(towerContractEquipmentService.getById(id)); |
||||
|
// 使用关联查询
|
||||
|
//return success(towerContractEquipmentService.getByIdRel(id));
|
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("添加合同设备清单") |
||||
|
@PostMapping() |
||||
|
public ApiResult<?> save(@RequestBody TowerContractEquipment towerContractEquipment) { |
||||
|
// 记录当前登录用户idfc vbnm,dxcybc yhguc
|
||||
|
User loginUser = getLoginUser(); |
||||
|
if (loginUser != null) { |
||||
|
towerContractEquipment.setUserId(loginUser.getUserId()); |
||||
|
} |
||||
|
if (towerContractEquipmentService.save(towerContractEquipment)) { |
||||
|
return success("添加成功"); |
||||
|
} |
||||
|
return fail("添加失败"); |
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("修改合同设备清单") |
||||
|
@PutMapping() |
||||
|
public ApiResult<?> update(@RequestBody TowerContractEquipment towerContractEquipment) { |
||||
|
if (towerContractEquipmentService.updateById(towerContractEquipment)) { |
||||
|
return success("修改成功"); |
||||
|
} |
||||
|
return fail("修改失败"); |
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("删除合同设备清单") |
||||
|
@DeleteMapping("/{id}") |
||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) { |
||||
|
if (towerContractEquipmentService.removeById(id)) { |
||||
|
return success("删除成功"); |
||||
|
} |
||||
|
return fail("删除失败"); |
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("批量添加合同设备清单") |
||||
|
@PostMapping("/batch") |
||||
|
public ApiResult<?> saveBatch(@RequestBody List<TowerContractEquipment> list) { |
||||
|
QueryWrapper<TowerContractEquipment> queryWrapper = new QueryWrapper<>(); |
||||
|
queryWrapper.eq("contract_id", list.get(0).getContractId()); |
||||
|
towerContractEquipmentService.remove(queryWrapper); |
||||
|
if (towerContractEquipmentService.saveBatch(list)) { |
||||
|
return success("添加成功"); |
||||
|
} |
||||
|
return fail("添加失败"); |
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("批量修改合同设备清单") |
||||
|
@PutMapping("/batch") |
||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<TowerContractEquipment> batchParam) { |
||||
|
if (batchParam.update(towerContractEquipmentService, "contract_equipment_id")) { |
||||
|
return success("修改成功"); |
||||
|
} |
||||
|
return fail("修改失败"); |
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("批量删除合同设备清单") |
||||
|
@DeleteMapping("/batch") |
||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) { |
||||
|
if (towerContractEquipmentService.removeByIds(ids)) { |
||||
|
return success("删除成功"); |
||||
|
} |
||||
|
return fail("删除失败"); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,139 @@ |
|||||
|
package com.gxwebsoft.tower.controller; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.gxwebsoft.common.core.web.BaseController; |
||||
|
import com.gxwebsoft.common.system.entity.User; |
||||
|
import com.gxwebsoft.tower.service.TowerContractFileService; |
||||
|
import com.gxwebsoft.tower.entity.TowerContractFile; |
||||
|
import com.gxwebsoft.tower.param.TowerContractFileParam; |
||||
|
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.HashMap; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 合同附件控制器 |
||||
|
* |
||||
|
* @author 科技小王子 |
||||
|
* @since 2023-06-09 13:42:20 |
||||
|
*/ |
||||
|
@Api(tags = "合同附件管理") |
||||
|
@RestController |
||||
|
@RequestMapping("/api/tower/tower-contract-file") |
||||
|
public class TowerContractFileController extends BaseController { |
||||
|
@Resource |
||||
|
private TowerContractFileService towerContractFileService; |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("分页查询合同附件") |
||||
|
@GetMapping("/page") |
||||
|
public ApiResult<PageResult<TowerContractFile>> page(TowerContractFileParam param) { |
||||
|
PageParam<TowerContractFile, TowerContractFileParam> page = new PageParam<>(param); |
||||
|
page.setDefaultOrder("create_time desc"); |
||||
|
return success(towerContractFileService.page(page, page.getWrapper())); |
||||
|
// 使用关联查询
|
||||
|
//return success(towerContractFileService.pageRel(param));
|
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@PreAuthorize("permitAll()") |
||||
|
@ApiOperation("查询全部合同附件") |
||||
|
@GetMapping() |
||||
|
public ApiResult<List<TowerContractFile>> list(TowerContractFileParam param) { |
||||
|
PageParam<TowerContractFile, TowerContractFileParam> page = new PageParam<>(param); |
||||
|
page.setDefaultOrder("create_time desc"); |
||||
|
return success(towerContractFileService.list(page.getOrderWrapper())); |
||||
|
// 使用关联查询
|
||||
|
//return success(towerContractFileService.listRel(param));
|
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("根据id查询合同附件") |
||||
|
@GetMapping("/{id}") |
||||
|
public ApiResult<TowerContractFile> get(@PathVariable("id") Integer id) { |
||||
|
return success(towerContractFileService.getById(id)); |
||||
|
// 使用关联查询
|
||||
|
//return success(towerContractFileService.getByIdRel(id));
|
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("添加合同附件") |
||||
|
@PostMapping() |
||||
|
public ApiResult<?> save(@RequestBody TowerContractFile towerContractFile) { |
||||
|
// 记录当前登录用户id
|
||||
|
User loginUser = getLoginUser(); |
||||
|
if (loginUser != null) { |
||||
|
towerContractFile.setUserId(loginUser.getUserId()); |
||||
|
} |
||||
|
if (towerContractFileService.save(towerContractFile)) { |
||||
|
return success("添加成功"); |
||||
|
} |
||||
|
return fail("添加失败"); |
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("修改合同附件") |
||||
|
@PutMapping() |
||||
|
public ApiResult<?> update(@RequestBody TowerContractFile towerContractFile) { |
||||
|
if (towerContractFileService.updateById(towerContractFile)) { |
||||
|
return success("修改成功"); |
||||
|
} |
||||
|
return fail("修改失败"); |
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("删除合同附件") |
||||
|
@DeleteMapping("/{id}") |
||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) { |
||||
|
if (towerContractFileService.removeById(id)) { |
||||
|
return success("删除成功"); |
||||
|
} |
||||
|
return fail("删除失败"); |
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@PreAuthorize("permitAll()") |
||||
|
@ApiOperation("批量添加合同附件") |
||||
|
@PostMapping("/batch") |
||||
|
public ApiResult<?> saveBatch(@RequestBody List<TowerContractFile> list) { |
||||
|
QueryWrapper<TowerContractFile> queryWrapper = new QueryWrapper<>(); |
||||
|
queryWrapper.eq("contract_id", list.get(0).getContractId()); |
||||
|
towerContractFileService.remove(queryWrapper); |
||||
|
if (towerContractFileService.saveBatch(list)) { |
||||
|
return success("添加成功"); |
||||
|
} |
||||
|
return fail("添加失败"); |
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("批量修改合同附件") |
||||
|
@PutMapping("/batch") |
||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<TowerContractFile> batchParam) { |
||||
|
if (batchParam.update(towerContractFileService, "contract_file_id")) { |
||||
|
return success("修改成功"); |
||||
|
} |
||||
|
return fail("修改失败"); |
||||
|
} |
||||
|
|
||||
|
@OperationLog |
||||
|
@ApiOperation("批量删除合同附件") |
||||
|
@DeleteMapping("/batch") |
||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) { |
||||
|
if (towerContractFileService.removeByIds(ids)) { |
||||
|
return success("删除成功"); |
||||
|
} |
||||
|
return fail("删除失败"); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,139 @@ |
|||||
|
package com.gxwebsoft.tower.controller; |
||||
|
|
||||
|
import com.gxwebsoft.common.core.web.BaseController; |
||||
|
import com.gxwebsoft.common.system.entity.User; |
||||
|
import com.gxwebsoft.tower.service.TowerCustomerService; |
||||
|
import com.gxwebsoft.tower.entity.TowerCustomer; |
||||
|
import com.gxwebsoft.tower.param.TowerCustomerParam; |
||||
|
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-08 21:04:27 |
||||
|
*/ |
||||
|
@Api(tags = "客户管理管理") |
||||
|
@RestController |
||||
|
@RequestMapping("/api/tower/tower-customer") |
||||
|
public class TowerCustomerController extends BaseController { |
||||
|
@Resource |
||||
|
private TowerCustomerService towerCustomerService; |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerCustomer:list')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("分页查询客户管理") |
||||
|
@GetMapping("/page") |
||||
|
public ApiResult<PageResult<TowerCustomer>> page(TowerCustomerParam param) { |
||||
|
PageParam<TowerCustomer, TowerCustomerParam> page = new PageParam<>(param); |
||||
|
page.setDefaultOrder("create_time desc"); |
||||
|
return success(towerCustomerService.page(page, page.getWrapper())); |
||||
|
// 使用关联查询
|
||||
|
//return success(towerCustomerService.pageRel(param));
|
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerCustomer:list')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("查询全部客户管理") |
||||
|
@GetMapping() |
||||
|
public ApiResult<List<TowerCustomer>> list(TowerCustomerParam param) { |
||||
|
PageParam<TowerCustomer, TowerCustomerParam> page = new PageParam<>(param); |
||||
|
page.setDefaultOrder("create_time desc"); |
||||
|
return success(towerCustomerService.list(page.getOrderWrapper())); |
||||
|
// 使用关联查询
|
||||
|
//return success(towerCustomerService.listRel(param));
|
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerCustomer:list')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("根据id查询客户管理") |
||||
|
@GetMapping("/{id}") |
||||
|
public ApiResult<TowerCustomer> get(@PathVariable("id") Integer id) { |
||||
|
return success(towerCustomerService.getById(id)); |
||||
|
// 使用关联查询
|
||||
|
//return success(towerCustomerService.getByIdRel(id));
|
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerCustomer:save')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("添加客户管理") |
||||
|
@PostMapping() |
||||
|
public ApiResult<?> save(@RequestBody TowerCustomer towerCustomer) { |
||||
|
// 记录当前登录用户id
|
||||
|
User loginUser = getLoginUser(); |
||||
|
if (loginUser != null) { |
||||
|
towerCustomer.setUserId(loginUser.getUserId()); |
||||
|
} |
||||
|
if (towerCustomerService.save(towerCustomer)) { |
||||
|
return success("添加成功"); |
||||
|
} |
||||
|
return fail("添加失败"); |
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerCustomer:update')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("修改客户管理") |
||||
|
@PutMapping() |
||||
|
public ApiResult<?> update(@RequestBody TowerCustomer towerCustomer) { |
||||
|
if (towerCustomerService.updateById(towerCustomer)) { |
||||
|
return success("修改成功"); |
||||
|
} |
||||
|
return fail("修改失败"); |
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerCustomer:remove')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("删除客户管理") |
||||
|
@DeleteMapping("/{id}") |
||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) { |
||||
|
if (towerCustomerService.removeById(id)) { |
||||
|
return success("删除成功"); |
||||
|
} |
||||
|
return fail("删除失败"); |
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerCustomer:save')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("批量添加客户管理") |
||||
|
@PostMapping("/batch") |
||||
|
public ApiResult<?> saveBatch(@RequestBody List<TowerCustomer> list) { |
||||
|
if (towerCustomerService.saveBatch(list)) { |
||||
|
return success("添加成功"); |
||||
|
} |
||||
|
return fail("添加失败"); |
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerCustomer:update')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("批量修改客户管理") |
||||
|
@PutMapping("/batch") |
||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<TowerCustomer> batchParam) { |
||||
|
if (batchParam.update(towerCustomerService, "customer_id")) { |
||||
|
return success("修改成功"); |
||||
|
} |
||||
|
return fail("修改失败"); |
||||
|
} |
||||
|
|
||||
|
@PreAuthorize("hasAuthority('tower:towerCustomer:remove')") |
||||
|
@OperationLog |
||||
|
@ApiOperation("批量删除客户管理") |
||||
|
@DeleteMapping("/batch") |
||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) { |
||||
|
if (towerCustomerService.removeByIds(ids)) { |
||||
|
return success("删除成功"); |
||||
|
} |
||||
|
return fail("删除失败"); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,93 @@ |
|||||
|
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-08 22:36:47 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@ApiModel(value = "TowerContract对象", description = "合同存档") |
||||
|
public class TowerContract implements Serializable { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@TableId(value = "contract_id", type = IdType.AUTO) |
||||
|
private Integer contractId; |
||||
|
|
||||
|
@ApiModelProperty(value = "项目ID") |
||||
|
private Integer projectId; |
||||
|
|
||||
|
@ApiModelProperty(value = "出租单位") |
||||
|
private Integer companyId; |
||||
|
|
||||
|
@ApiModelProperty(value = "承租单位") |
||||
|
private Integer customerId; |
||||
|
|
||||
|
@ApiModelProperty(value = "业务负责人") |
||||
|
private String customerContact; |
||||
|
|
||||
|
@ApiModelProperty(value = "合同编号") |
||||
|
private String contactNumber; |
||||
|
|
||||
|
@ApiModelProperty(value = "签订日期") |
||||
|
private String signDate; |
||||
|
|
||||
|
@ApiModelProperty(value = "开始日期") |
||||
|
private String startDate; |
||||
|
|
||||
|
@ApiModelProperty(value = "截止日期") |
||||
|
private String endDate; |
||||
|
|
||||
|
@ApiModelProperty(value = "合同金额") |
||||
|
private BigDecimal contractAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "合同约定金额") |
||||
|
private BigDecimal contactAgreeAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "合同存档0未存档,1已存档") |
||||
|
private Boolean isInStock; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否自动结算") |
||||
|
private Boolean autoSettle; |
||||
|
|
||||
|
@ApiModelProperty(value = "所有人") |
||||
|
private Integer userId; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是") |
||||
|
@TableLogic |
||||
|
private Integer deleted; |
||||
|
|
||||
|
@ApiModelProperty(value = "已生成结算次数") |
||||
|
private Integer settleNum; |
||||
|
|
||||
|
@ApiModelProperty(value = "租户id") |
||||
|
private Integer tenantId; |
||||
|
|
||||
|
@ApiModelProperty(value = "创建时间") |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
@ApiModelProperty(value = "修改时间") |
||||
|
private LocalDateTime updateTime; |
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private String projectName; |
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private String companyName; |
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private String customerName; |
||||
|
} |
@ -0,0 +1,77 @@ |
|||||
|
package com.gxwebsoft.tower.entity; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||
|
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-09 13:42:20 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@ApiModel(value = "TowerContractEquipment对象", description = "合同设备清单") |
||||
|
public class TowerContractEquipment implements Serializable { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@TableId(value = "contract_equipment_id", type = IdType.AUTO) |
||||
|
private Integer contractEquipmentId; |
||||
|
|
||||
|
@ApiModelProperty(value = "合同ID") |
||||
|
private Integer contractId; |
||||
|
|
||||
|
@ApiModelProperty(value = "设备") |
||||
|
private String equipmentName; |
||||
|
|
||||
|
@ApiModelProperty(value = "型号") |
||||
|
private String equipmentModel; |
||||
|
|
||||
|
@ApiModelProperty(value = "签订数量") |
||||
|
private Integer num; |
||||
|
|
||||
|
@ApiModelProperty(value = "计划租期(月)") |
||||
|
private Integer planRentMonth; |
||||
|
|
||||
|
@ApiModelProperty(value = "租金") |
||||
|
private BigDecimal rentAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "进退场费") |
||||
|
private BigDecimal inOutAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "劳务费") |
||||
|
private BigDecimal workerAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "其他费用") |
||||
|
private BigDecimal otherAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "预埋费") |
||||
|
private BigDecimal preBuryAmount; |
||||
|
|
||||
|
private String remark; |
||||
|
|
||||
|
@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; |
||||
|
|
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
package com.gxwebsoft.tower.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||
|
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-09 13:42:20 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@ApiModel(value = "TowerContractFile对象", description = "合同附件") |
||||
|
public class TowerContractFile implements Serializable { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@TableId(value = "contract_file_id", type = IdType.AUTO) |
||||
|
private Integer contractFileId; |
||||
|
|
||||
|
@ApiModelProperty(value = "合同id") |
||||
|
private Integer contractId; |
||||
|
|
||||
|
@ApiModelProperty(value = "文件路径") |
||||
|
private String path; |
||||
|
|
||||
|
@ApiModelProperty(value = "文件类型") |
||||
|
private String type; |
||||
|
|
||||
|
@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; |
||||
|
|
||||
|
} |
@ -0,0 +1,73 @@ |
|||||
|
package com.gxwebsoft.tower.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||
|
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-08 21:04:27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@ApiModel(value = "TowerCustomer对象", description = "客户管理") |
||||
|
public class TowerCustomer implements Serializable { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@TableId(value = "customer_id", type = IdType.AUTO) |
||||
|
private Integer customerId; |
||||
|
|
||||
|
@ApiModelProperty(value = "客户名称") |
||||
|
private String name; |
||||
|
|
||||
|
@ApiModelProperty(value = "全称") |
||||
|
private String fullName; |
||||
|
|
||||
|
@ApiModelProperty(value = "客户标识") |
||||
|
private String creditCode; |
||||
|
|
||||
|
@ApiModelProperty(value = "地址") |
||||
|
private String address; |
||||
|
|
||||
|
@ApiModelProperty(value = "联系人") |
||||
|
private String contact; |
||||
|
|
||||
|
@ApiModelProperty(value = "座机") |
||||
|
private String phone; |
||||
|
|
||||
|
@ApiModelProperty(value = "手机") |
||||
|
private String telPhone; |
||||
|
|
||||
|
private Integer sortNumber; |
||||
|
|
||||
|
@ApiModelProperty(value = "头像") |
||||
|
private String avatar; |
||||
|
|
||||
|
@ApiModelProperty(value = "备注") |
||||
|
private String remark; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是") |
||||
|
@TableLogic |
||||
|
private Boolean deleted; |
||||
|
|
||||
|
@ApiModelProperty(value = "所有人") |
||||
|
private Integer userId; |
||||
|
|
||||
|
@ApiModelProperty(value = "租户id") |
||||
|
private Integer tenantId; |
||||
|
|
||||
|
@ApiModelProperty(value = "创建时间") |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
@ApiModelProperty(value = "修改时间") |
||||
|
private LocalDateTime updateTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.gxwebsoft.tower.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.gxwebsoft.tower.entity.TowerContractEquipment; |
||||
|
import com.gxwebsoft.tower.param.TowerContractEquipmentParam; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 合同设备清单Mapper |
||||
|
* |
||||
|
* @author 科技小王子 |
||||
|
* @since 2023-06-09 13:42:20 |
||||
|
*/ |
||||
|
public interface TowerContractEquipmentMapper extends BaseMapper<TowerContractEquipment> { |
||||
|
|
||||
|
/** |
||||
|
* 分页查询 |
||||
|
* |
||||
|
* @param page 分页对象 |
||||
|
* @param param 查询参数 |
||||
|
* @return List<TowerContractEquipment> |
||||
|
*/ |
||||
|
List<TowerContractEquipment> selectPageRel(@Param("page") IPage<TowerContractEquipment> page, |
||||
|
@Param("param") TowerContractEquipmentParam param); |
||||
|
|
||||
|
/** |
||||
|
* 查询全部 |
||||
|
* |
||||
|
* @param param 查询参数 |
||||
|
* @return List<User> |
||||
|
*/ |
||||
|
List<TowerContractEquipment> selectListRel(@Param("param") TowerContractEquipmentParam param); |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.gxwebsoft.tower.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.gxwebsoft.tower.entity.TowerContractFile; |
||||
|
import com.gxwebsoft.tower.param.TowerContractFileParam; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 合同附件Mapper |
||||
|
* |
||||
|
* @author 科技小王子 |
||||
|
* @since 2023-06-09 13:42:20 |
||||
|
*/ |
||||
|
public interface TowerContractFileMapper extends BaseMapper<TowerContractFile> { |
||||
|
|
||||
|
/** |
||||
|
* 分页查询 |
||||
|
* |
||||
|
* @param page 分页对象 |
||||
|
* @param param 查询参数 |
||||
|
* @return List<TowerContractFile> |
||||
|
*/ |
||||
|
List<TowerContractFile> selectPageRel(@Param("page") IPage<TowerContractFile> page, |
||||
|
@Param("param") TowerContractFileParam param); |
||||
|
|
||||
|
/** |
||||
|
* 查询全部 |
||||
|
* |
||||
|
* @param param 查询参数 |
||||
|
* @return List<User> |
||||
|
*/ |
||||
|
List<TowerContractFile> selectListRel(@Param("param") TowerContractFileParam 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.TowerContract; |
||||
|
import com.gxwebsoft.tower.param.TowerContractParam; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 合同存档Mapper |
||||
|
* |
||||
|
* @author 科技小王子 |
||||
|
* @since 2023-06-08 22:36:47 |
||||
|
*/ |
||||
|
public interface TowerContractMapper extends MPJBaseMapper<TowerContract> { |
||||
|
|
||||
|
/** |
||||
|
* 分页查询 |
||||
|
* |
||||
|
* @param page 分页对象 |
||||
|
* @param param 查询参数 |
||||
|
* @return List<TowerContract> |
||||
|
*/ |
||||
|
List<TowerContract> selectPageRel(@Param("page") IPage<TowerContract> page, |
||||
|
@Param("param") TowerContractParam param); |
||||
|
|
||||
|
/** |
||||
|
* 查询全部 |
||||
|
* |
||||
|
* @param param 查询参数 |
||||
|
* @return List<User> |
||||
|
*/ |
||||
|
List<TowerContract> selectListRel(@Param("param") TowerContractParam param); |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.gxwebsoft.tower.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.gxwebsoft.tower.entity.TowerCustomer; |
||||
|
import com.gxwebsoft.tower.param.TowerCustomerParam; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 客户管理Mapper |
||||
|
* |
||||
|
* @author 科技小王子 |
||||
|
* @since 2023-06-08 21:04:27 |
||||
|
*/ |
||||
|
public interface TowerCustomerMapper extends BaseMapper<TowerCustomer> { |
||||
|
|
||||
|
/** |
||||
|
* 分页查询 |
||||
|
* |
||||
|
* @param page 分页对象 |
||||
|
* @param param 查询参数 |
||||
|
* @return List<TowerCustomer> |
||||
|
*/ |
||||
|
List<TowerCustomer> selectPageRel(@Param("page") IPage<TowerCustomer> page, |
||||
|
@Param("param") TowerCustomerParam param); |
||||
|
|
||||
|
/** |
||||
|
* 查询全部 |
||||
|
* |
||||
|
* @param param 查询参数 |
||||
|
* @return List<User> |
||||
|
*/ |
||||
|
List<TowerCustomer> selectListRel(@Param("param") TowerCustomerParam param); |
||||
|
|
||||
|
} |
@ -0,0 +1,74 @@ |
|||||
|
<?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.TowerContractEquipmentMapper"> |
||||
|
|
||||
|
<!-- 关联查询sql --> |
||||
|
<sql id="selectSql"> |
||||
|
SELECT a.* |
||||
|
FROM tower_contract_equipment a |
||||
|
<where> |
||||
|
<if test="param.contractEquipmentId != null"> |
||||
|
AND a.contract_equipment_id = #{param.contractEquipmentId} |
||||
|
</if> |
||||
|
<if test="param.contractId != null"> |
||||
|
AND a.contract_id = #{param.contractId} |
||||
|
</if> |
||||
|
<if test="param.equipmentName != null"> |
||||
|
AND a.equipment_name LIKE CONCAT('%', #{param.equipmentName}, '%') |
||||
|
</if> |
||||
|
<if test="param.equipmentModel != null"> |
||||
|
AND a.equipment_model LIKE CONCAT('%', #{param.equipmentModel}, '%') |
||||
|
</if> |
||||
|
<if test="param.num != null"> |
||||
|
AND a.num = #{param.num} |
||||
|
</if> |
||||
|
<if test="param.planRentMonth != null"> |
||||
|
AND a.plan_rent_month = #{param.planRentMonth} |
||||
|
</if> |
||||
|
<if test="param.rentAmount != null"> |
||||
|
AND a.rent_amount = #{param.rentAmount} |
||||
|
</if> |
||||
|
<if test="param.inOutAmount != null"> |
||||
|
AND a.in_out_amount = #{param.inOutAmount} |
||||
|
</if> |
||||
|
<if test="param.workerAmount != null"> |
||||
|
AND a.worker_amount = #{param.workerAmount} |
||||
|
</if> |
||||
|
<if test="param.otherAmount != null"> |
||||
|
AND a.other_amount = #{param.otherAmount} |
||||
|
</if> |
||||
|
<if test="param.preBuryAmount != null"> |
||||
|
AND a.pre_bury_amount = #{param.preBuryAmount} |
||||
|
</if> |
||||
|
<if test="param.remark != null"> |
||||
|
AND a.remark LIKE CONCAT('%', #{param.remark}, '%') |
||||
|
</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.TowerContractEquipment"> |
||||
|
<include refid="selectSql"></include> |
||||
|
</select> |
||||
|
|
||||
|
<!-- 查询全部 --> |
||||
|
<select id="selectListRel" resultType="com.gxwebsoft.tower.entity.TowerContractEquipment"> |
||||
|
<include refid="selectSql"></include> |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,50 @@ |
|||||
|
<?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.TowerContractFileMapper"> |
||||
|
|
||||
|
<!-- 关联查询sql --> |
||||
|
<sql id="selectSql"> |
||||
|
SELECT a.* |
||||
|
FROM tower_contract_file a |
||||
|
<where> |
||||
|
<if test="param.contractFileId != null"> |
||||
|
AND a.contract_file_id = #{param.contractFileId} |
||||
|
</if> |
||||
|
<if test="param.contractId != null"> |
||||
|
AND a.contract_id = #{param.contractId} |
||||
|
</if> |
||||
|
<if test="param.path != null"> |
||||
|
AND a.path LIKE CONCAT('%', #{param.path}, '%') |
||||
|
</if> |
||||
|
<if test="param.type != null"> |
||||
|
AND a.type LIKE CONCAT('%', #{param.type}, '%') |
||||
|
</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.TowerContractFile"> |
||||
|
<include refid="selectSql"></include> |
||||
|
</select> |
||||
|
|
||||
|
<!-- 查询全部 --> |
||||
|
<select id="selectListRel" resultType="com.gxwebsoft.tower.entity.TowerContractFile"> |
||||
|
<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.TowerContractMapper"> |
||||
|
|
||||
|
<!-- 关联查询sql --> |
||||
|
<sql id="selectSql"> |
||||
|
SELECT a.* |
||||
|
FROM tower_contract a |
||||
|
<where> |
||||
|
<if test="param.contractId != null"> |
||||
|
AND a.contract_id = #{param.contractId} |
||||
|
</if> |
||||
|
<if test="param.projectId != null"> |
||||
|
AND a.project_id = #{param.projectId} |
||||
|
</if> |
||||
|
<if test="param.companyId != null"> |
||||
|
AND a.company_id = #{param.companyId} |
||||
|
</if> |
||||
|
<if test="param.customerId != null"> |
||||
|
AND a.customer_id = #{param.customerId} |
||||
|
</if> |
||||
|
<if test="param.customerContact != null"> |
||||
|
AND a.customer_contact LIKE CONCAT('%', #{param.customerContact}, '%') |
||||
|
</if> |
||||
|
<if test="param.contactNumber != null"> |
||||
|
AND a.contact_number LIKE CONCAT('%', #{param.contactNumber}, '%') |
||||
|
</if> |
||||
|
<if test="param.signDate != null"> |
||||
|
AND a.sign_date LIKE CONCAT('%', #{param.signDate}, '%') |
||||
|
</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.contractAmount != null"> |
||||
|
AND a.contract_amount = #{param.contractAmount} |
||||
|
</if> |
||||
|
<if test="param.contactAgreeAmount != null"> |
||||
|
AND a.contact_agree_amount = #{param.contactAgreeAmount} |
||||
|
</if> |
||||
|
<if test="param.isInStock != null"> |
||||
|
AND a.is_in_stock = #{param.isInStock} |
||||
|
</if> |
||||
|
<if test="param.autoSettle != null"> |
||||
|
AND a.auto_settle = #{param.autoSettle} |
||||
|
</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.TowerContract"> |
||||
|
<include refid="selectSql"></include> |
||||
|
</select> |
||||
|
|
||||
|
<!-- 查询全部 --> |
||||
|
<select id="selectListRel" resultType="com.gxwebsoft.tower.entity.TowerContract"> |
||||
|
<include refid="selectSql"></include> |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,71 @@ |
|||||
|
<?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.TowerCustomerMapper"> |
||||
|
|
||||
|
<!-- 关联查询sql --> |
||||
|
<sql id="selectSql"> |
||||
|
SELECT a.* |
||||
|
FROM tower_customer a |
||||
|
<where> |
||||
|
<if test="param.customerId != null"> |
||||
|
AND a.customer_id = #{param.customerId} |
||||
|
</if> |
||||
|
<if test="param.name != null"> |
||||
|
AND a.name LIKE CONCAT('%', #{param.name}, '%') |
||||
|
</if> |
||||
|
<if test="param.fullName != null"> |
||||
|
AND a.full_name LIKE CONCAT('%', #{param.fullName}, '%') |
||||
|
</if> |
||||
|
<if test="param.creditCode != null"> |
||||
|
AND a.credit_code LIKE CONCAT('%', #{param.creditCode}, '%') |
||||
|
</if> |
||||
|
<if test="param.address != null"> |
||||
|
AND a.address LIKE CONCAT('%', #{param.address}, '%') |
||||
|
</if> |
||||
|
<if test="param.contact != null"> |
||||
|
AND a.contact LIKE CONCAT('%', #{param.contact}, '%') |
||||
|
</if> |
||||
|
<if test="param.phone != null"> |
||||
|
AND a.phone LIKE CONCAT('%', #{param.phone}, '%') |
||||
|
</if> |
||||
|
<if test="param.telPhone != null"> |
||||
|
AND a.tel_phone LIKE CONCAT('%', #{param.telPhone}, '%') |
||||
|
</if> |
||||
|
<if test="param.sortNumber != null"> |
||||
|
AND a.sort_number = #{param.sortNumber} |
||||
|
</if> |
||||
|
<if test="param.avatar != null"> |
||||
|
AND a.avatar LIKE CONCAT('%', #{param.avatar}, '%') |
||||
|
</if> |
||||
|
<if test="param.remark != null"> |
||||
|
AND a.remark LIKE CONCAT('%', #{param.remark}, '%') |
||||
|
</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.userId != null"> |
||||
|
AND a.user_id = #{param.userId} |
||||
|
</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.TowerCustomer"> |
||||
|
<include refid="selectSql"></include> |
||||
|
</select> |
||||
|
|
||||
|
<!-- 查询全部 --> |
||||
|
<select id="selectListRel" resultType="com.gxwebsoft.tower.entity.TowerCustomer"> |
||||
|
<include refid="selectSql"></include> |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,78 @@ |
|||||
|
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-09 13:42:20 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
|
@ApiModel(value = "TowerContractEquipmentParam对象", description = "合同设备清单查询参数") |
||||
|
public class TowerContractEquipmentParam extends BaseParam { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer contractEquipmentId; |
||||
|
|
||||
|
@ApiModelProperty(value = "合同ID") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer contractId; |
||||
|
|
||||
|
@ApiModelProperty(value = "设备") |
||||
|
private String equipmentName; |
||||
|
|
||||
|
@ApiModelProperty(value = "型号") |
||||
|
private String equipmentModel; |
||||
|
|
||||
|
@ApiModelProperty(value = "签订数量") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer num; |
||||
|
|
||||
|
@ApiModelProperty(value = "计划租期(月)") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer planRentMonth; |
||||
|
|
||||
|
@ApiModelProperty(value = "租金") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private BigDecimal rentAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "进退场费") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private BigDecimal inOutAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "劳务费") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private BigDecimal workerAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "其他费用") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private BigDecimal otherAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "预埋费") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private BigDecimal preBuryAmount; |
||||
|
|
||||
|
private String remark; |
||||
|
|
||||
|
@ApiModelProperty(value = "所有人") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer userId; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer deleted; |
||||
|
|
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
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-09 13:42:20 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
|
@ApiModel(value = "TowerContractFileParam对象", description = "合同附件查询参数") |
||||
|
public class TowerContractFileParam extends BaseParam { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer contractFileId; |
||||
|
|
||||
|
@ApiModelProperty(value = "合同id") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer contractId; |
||||
|
|
||||
|
@ApiModelProperty(value = "文件路径") |
||||
|
private String path; |
||||
|
|
||||
|
@ApiModelProperty(value = "文件类型") |
||||
|
private String type; |
||||
|
|
||||
|
@ApiModelProperty(value = "所有人") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer userId; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer deleted; |
||||
|
|
||||
|
} |
@ -0,0 +1,85 @@ |
|||||
|
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-08 22:36:47 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
|
@ApiModel(value = "TowerContractParam对象", description = "合同存档查询参数") |
||||
|
public class TowerContractParam extends BaseParam { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer contractId; |
||||
|
|
||||
|
@ApiModelProperty(value = "项目ID") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer projectId; |
||||
|
|
||||
|
@ApiModelProperty(value = "出租单位") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer companyId; |
||||
|
|
||||
|
@ApiModelProperty(value = "承租单位") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer customerId; |
||||
|
|
||||
|
@ApiModelProperty(value = "业务负责人") |
||||
|
private String customerContact; |
||||
|
|
||||
|
@ApiModelProperty(value = "合同编号") |
||||
|
private String contactNumber; |
||||
|
|
||||
|
@ApiModelProperty(value = "签订日期") |
||||
|
private String signDate; |
||||
|
|
||||
|
@ApiModelProperty(value = "开始日期") |
||||
|
private String startDate; |
||||
|
|
||||
|
@ApiModelProperty(value = "截止日期") |
||||
|
private String endDate; |
||||
|
|
||||
|
@ApiModelProperty(value = "合同金额") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private BigDecimal contractAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "合同约定金额") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private BigDecimal contactAgreeAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "合同存档0未存档,1已存档") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Boolean isInStock; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否自动结算") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Boolean autoSettle; |
||||
|
|
||||
|
@ApiModelProperty(value = "已生成结算次数") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer settleNum; |
||||
|
|
||||
|
@ApiModelProperty(value = "所有人") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer userId; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer deleted; |
||||
|
|
||||
|
} |
@ -0,0 +1,66 @@ |
|||||
|
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-08 21:04:27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
|
@ApiModel(value = "TowerCustomerParam对象", description = "客户管理查询参数") |
||||
|
public class TowerCustomerParam extends BaseParam { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer customerId; |
||||
|
|
||||
|
@ApiModelProperty(value = "客户名称") |
||||
|
private String name; |
||||
|
|
||||
|
@ApiModelProperty(value = "全称") |
||||
|
private String fullName; |
||||
|
|
||||
|
@ApiModelProperty(value = "客户标识") |
||||
|
private String creditCode; |
||||
|
|
||||
|
@ApiModelProperty(value = "地址") |
||||
|
private String address; |
||||
|
|
||||
|
@ApiModelProperty(value = "联系人") |
||||
|
private String contact; |
||||
|
|
||||
|
@ApiModelProperty(value = "座机") |
||||
|
private String phone; |
||||
|
|
||||
|
@ApiModelProperty(value = "手机") |
||||
|
private String telPhone; |
||||
|
|
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer sortNumber; |
||||
|
|
||||
|
@ApiModelProperty(value = "头像") |
||||
|
private String avatar; |
||||
|
|
||||
|
@ApiModelProperty(value = "备注") |
||||
|
private String remark; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Boolean deleted; |
||||
|
|
||||
|
@ApiModelProperty(value = "所有人") |
||||
|
@QueryField(type = QueryType.EQ) |
||||
|
private Integer userId; |
||||
|
|
||||
|
} |
@ -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.TowerContractEquipment; |
||||
|
import com.gxwebsoft.tower.param.TowerContractEquipmentParam; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 合同设备清单Service |
||||
|
* |
||||
|
* @author 科技小王子 |
||||
|
* @since 2023-06-09 13:42:20 |
||||
|
*/ |
||||
|
public interface TowerContractEquipmentService extends IService<TowerContractEquipment> { |
||||
|
|
||||
|
/** |
||||
|
* 分页关联查询 |
||||
|
* |
||||
|
* @param param 查询参数 |
||||
|
* @return PageResult<TowerContractEquipment> |
||||
|
*/ |
||||
|
PageResult<TowerContractEquipment> pageRel(TowerContractEquipmentParam param); |
||||
|
|
||||
|
/** |
||||
|
* 关联查询全部 |
||||
|
* |
||||
|
* @param param 查询参数 |
||||
|
* @return List<TowerContractEquipment> |
||||
|
*/ |
||||
|
List<TowerContractEquipment> listRel(TowerContractEquipmentParam param); |
||||
|
|
||||
|
/** |
||||
|
* 根据id查询 |
||||
|
* |
||||
|
* @param contractEquipmentId |
||||
|
* @return TowerContractEquipment |
||||
|
*/ |
||||
|
TowerContractEquipment getByIdRel(Integer contractEquipmentId); |
||||
|
|
||||
|
} |
@ -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.TowerContractFile; |
||||
|
import com.gxwebsoft.tower.param.TowerContractFileParam; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 合同附件Service |
||||
|
* |
||||
|
* @author 科技小王子 |
||||
|
* @since 2023-06-09 13:42:20 |
||||
|
*/ |
||||
|
public interface TowerContractFileService extends IService<TowerContractFile> { |
||||
|
|
||||
|
/** |
||||
|
* 分页关联查询 |
||||
|
* |
||||
|
* @param param 查询参数 |
||||
|
* @return PageResult<TowerContractFile> |
||||
|
*/ |
||||
|
PageResult<TowerContractFile> pageRel(TowerContractFileParam param); |
||||
|
|
||||
|
/** |
||||
|
* 关联查询全部 |
||||
|
* |
||||
|
* @param param 查询参数 |
||||
|
* @return List<TowerContractFile> |
||||
|
*/ |
||||
|
List<TowerContractFile> listRel(TowerContractFileParam param); |
||||
|
|
||||
|
/** |
||||
|
* 根据id查询 |
||||
|
* |
||||
|
* @param contractFileId |
||||
|
* @return TowerContractFile |
||||
|
*/ |
||||
|
TowerContractFile getByIdRel(Integer contractFileId); |
||||
|
|
||||
|
} |
@ -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.TowerContract; |
||||
|
import com.gxwebsoft.tower.param.TowerContractParam; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 合同存档Service |
||||
|
* |
||||
|
* @author 科技小王子 |
||||
|
* @since 2023-06-08 22:36:47 |
||||
|
*/ |
||||
|
public interface TowerContractService extends IService<TowerContract> { |
||||
|
|
||||
|
/** |
||||
|
* 分页关联查询 |
||||
|
* |
||||
|
* @param param 查询参数 |
||||
|
* @return PageResult<TowerContract> |
||||
|
*/ |
||||
|
PageResult<TowerContract> pageRel(TowerContractParam param); |
||||
|
|
||||
|
/** |
||||
|
* 关联查询全部 |
||||
|
* |
||||
|
* @param param 查询参数 |
||||
|
* @return List<TowerContract> |
||||
|
*/ |
||||
|
List<TowerContract> listRel(TowerContractParam param); |
||||
|
|
||||
|
/** |
||||
|
* 根据id查询 |
||||
|
* |
||||
|
* @param contractId |
||||
|
* @return TowerContract |
||||
|
*/ |
||||
|
TowerContract getByIdRel(Integer contractId); |
||||
|
|
||||
|
} |
@ -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.TowerCustomer; |
||||
|
import com.gxwebsoft.tower.param.TowerCustomerParam; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 客户管理Service |
||||
|
* |
||||
|
* @author 科技小王子 |
||||
|
* @since 2023-06-08 21:04:27 |
||||
|
*/ |
||||
|
public interface TowerCustomerService extends IService<TowerCustomer> { |
||||
|
|
||||
|
/** |
||||
|
* 分页关联查询 |
||||
|
* |
||||
|
* @param param 查询参数 |
||||
|
* @return PageResult<TowerCustomer> |
||||
|
*/ |
||||
|
PageResult<TowerCustomer> pageRel(TowerCustomerParam param); |
||||
|
|
||||
|
/** |
||||
|
* 关联查询全部 |
||||
|
* |
||||
|
* @param param 查询参数 |
||||
|
* @return List<TowerCustomer> |
||||
|
*/ |
||||
|
List<TowerCustomer> listRel(TowerCustomerParam param); |
||||
|
|
||||
|
/** |
||||
|
* 根据id查询 |
||||
|
* |
||||
|
* @param customerId |
||||
|
* @return TowerCustomer |
||||
|
*/ |
||||
|
TowerCustomer getByIdRel(Integer customerId); |
||||
|
|
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
package com.gxwebsoft.tower.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.gxwebsoft.tower.mapper.TowerContractEquipmentMapper; |
||||
|
import com.gxwebsoft.tower.service.TowerContractEquipmentService; |
||||
|
import com.gxwebsoft.tower.entity.TowerContractEquipment; |
||||
|
import com.gxwebsoft.tower.param.TowerContractEquipmentParam; |
||||
|
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-09 13:42:20 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class TowerContractEquipmentServiceImpl extends ServiceImpl<TowerContractEquipmentMapper, TowerContractEquipment> implements TowerContractEquipmentService { |
||||
|
|
||||
|
@Override |
||||
|
public PageResult<TowerContractEquipment> pageRel(TowerContractEquipmentParam param) { |
||||
|
PageParam<TowerContractEquipment, TowerContractEquipmentParam> page = new PageParam<>(param); |
||||
|
//page.setDefaultOrder("create_time desc");
|
||||
|
List<TowerContractEquipment> list = baseMapper.selectPageRel(page, param); |
||||
|
return new PageResult<>(list, page.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<TowerContractEquipment> listRel(TowerContractEquipmentParam param) { |
||||
|
List<TowerContractEquipment> list = baseMapper.selectListRel(param); |
||||
|
// 排序
|
||||
|
PageParam<TowerContractEquipment, TowerContractEquipmentParam> page = new PageParam<>(); |
||||
|
//page.setDefaultOrder("create_time desc");
|
||||
|
return page.sortRecords(list); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public TowerContractEquipment getByIdRel(Integer contractEquipmentId) { |
||||
|
TowerContractEquipmentParam param = new TowerContractEquipmentParam(); |
||||
|
param.setContractEquipmentId(contractEquipmentId); |
||||
|
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.TowerContractFileMapper; |
||||
|
import com.gxwebsoft.tower.service.TowerContractFileService; |
||||
|
import com.gxwebsoft.tower.entity.TowerContractFile; |
||||
|
import com.gxwebsoft.tower.param.TowerContractFileParam; |
||||
|
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-09 13:42:20 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class TowerContractFileServiceImpl extends ServiceImpl<TowerContractFileMapper, TowerContractFile> implements TowerContractFileService { |
||||
|
|
||||
|
@Override |
||||
|
public PageResult<TowerContractFile> pageRel(TowerContractFileParam param) { |
||||
|
PageParam<TowerContractFile, TowerContractFileParam> page = new PageParam<>(param); |
||||
|
//page.setDefaultOrder("create_time desc");
|
||||
|
List<TowerContractFile> list = baseMapper.selectPageRel(page, param); |
||||
|
return new PageResult<>(list, page.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<TowerContractFile> listRel(TowerContractFileParam param) { |
||||
|
List<TowerContractFile> list = baseMapper.selectListRel(param); |
||||
|
// 排序
|
||||
|
PageParam<TowerContractFile, TowerContractFileParam> page = new PageParam<>(); |
||||
|
//page.setDefaultOrder("create_time desc");
|
||||
|
return page.sortRecords(list); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public TowerContractFile getByIdRel(Integer contractFileId) { |
||||
|
TowerContractFileParam param = new TowerContractFileParam(); |
||||
|
param.setContractFileId(contractFileId); |
||||
|
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.TowerContractMapper; |
||||
|
import com.gxwebsoft.tower.service.TowerContractService; |
||||
|
import com.gxwebsoft.tower.entity.TowerContract; |
||||
|
import com.gxwebsoft.tower.param.TowerContractParam; |
||||
|
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-08 22:36:47 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class TowerContractServiceImpl extends ServiceImpl<TowerContractMapper, TowerContract> implements TowerContractService { |
||||
|
|
||||
|
@Override |
||||
|
public PageResult<TowerContract> pageRel(TowerContractParam param) { |
||||
|
PageParam<TowerContract, TowerContractParam> page = new PageParam<>(param); |
||||
|
//page.setDefaultOrder("create_time desc");
|
||||
|
List<TowerContract> list = baseMapper.selectPageRel(page, param); |
||||
|
return new PageResult<>(list, page.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<TowerContract> listRel(TowerContractParam param) { |
||||
|
List<TowerContract> list = baseMapper.selectListRel(param); |
||||
|
// 排序
|
||||
|
PageParam<TowerContract, TowerContractParam> page = new PageParam<>(); |
||||
|
//page.setDefaultOrder("create_time desc");
|
||||
|
return page.sortRecords(list); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public TowerContract getByIdRel(Integer contractId) { |
||||
|
TowerContractParam param = new TowerContractParam(); |
||||
|
param.setContractId(contractId); |
||||
|
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.TowerCustomerMapper; |
||||
|
import com.gxwebsoft.tower.service.TowerCustomerService; |
||||
|
import com.gxwebsoft.tower.entity.TowerCustomer; |
||||
|
import com.gxwebsoft.tower.param.TowerCustomerParam; |
||||
|
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-08 21:04:27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class TowerCustomerServiceImpl extends ServiceImpl<TowerCustomerMapper, TowerCustomer> implements TowerCustomerService { |
||||
|
|
||||
|
@Override |
||||
|
public PageResult<TowerCustomer> pageRel(TowerCustomerParam param) { |
||||
|
PageParam<TowerCustomer, TowerCustomerParam> page = new PageParam<>(param); |
||||
|
//page.setDefaultOrder("create_time desc");
|
||||
|
List<TowerCustomer> list = baseMapper.selectPageRel(page, param); |
||||
|
return new PageResult<>(list, page.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<TowerCustomer> listRel(TowerCustomerParam param) { |
||||
|
List<TowerCustomer> list = baseMapper.selectListRel(param); |
||||
|
// 排序
|
||||
|
PageParam<TowerCustomer, TowerCustomerParam> page = new PageParam<>(); |
||||
|
//page.setDefaultOrder("create_time desc");
|
||||
|
return page.sortRecords(list); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public TowerCustomer getByIdRel(Integer customerId) { |
||||
|
TowerCustomerParam param = new TowerCustomerParam(); |
||||
|
param.setCustomerId(customerId); |
||||
|
return param.getOne(baseMapper.selectListRel(param)); |
||||
|
} |
||||
|
|
||||
|
} |
Loading…
Reference in new issue