12 changed files with 863 additions and 0 deletions
@ -0,0 +1,131 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.basic.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import java.util.Date; |
||||
import java.math.BigDecimal; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
/** |
||||
* pda维修记录 实体类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-05-09 |
||||
*/ |
||||
@Data |
||||
@TableName("logpm_basic_pdarecords") |
||||
@ApiModel(value = "BasicPdarecords对象", description = "pda维修记录") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class BasicPdarecordsEntity extends TenantEntity { |
||||
|
||||
/** |
||||
* 预留1 |
||||
*/ |
||||
@ApiModelProperty(value = "预留1") |
||||
private String reserve1; |
||||
/** |
||||
* 预留2 |
||||
*/ |
||||
@ApiModelProperty(value = "预留2") |
||||
private String reserve2; |
||||
/** |
||||
* 预留3 |
||||
*/ |
||||
@ApiModelProperty(value = "预留3") |
||||
private String reserve3; |
||||
/** |
||||
* 预留4 |
||||
*/ |
||||
@ApiModelProperty(value = "预留4") |
||||
private String reserve4; |
||||
/** |
||||
* 预留5 |
||||
*/ |
||||
@ApiModelProperty(value = "预留5") |
||||
private String reserve5; |
||||
/** |
||||
* 关联pdaid |
||||
*/ |
||||
@ApiModelProperty(value = "关联pdaid") |
||||
private String masterId; |
||||
/** |
||||
* 反馈日期 |
||||
*/ |
||||
@ApiModelProperty(value = "反馈日期") |
||||
private Date feedbackTime; |
||||
/** |
||||
* 营业部 |
||||
*/ |
||||
@ApiModelProperty(value = "营业部") |
||||
private String businessDepartment; |
||||
/** |
||||
* 维修PDA品牌/SN |
||||
*/ |
||||
@ApiModelProperty(value = "维修PDA品牌/SN") |
||||
private String brand; |
||||
/** |
||||
* 采买经销商 |
||||
*/ |
||||
@ApiModelProperty(value = "采买经销商") |
||||
private String dealer; |
||||
/** |
||||
* 维修公司 |
||||
*/ |
||||
@ApiModelProperty(value = "维修公司") |
||||
private String maintenanceCompany; |
||||
/** |
||||
* 寄检修快递单号 |
||||
*/ |
||||
@ApiModelProperty(value = "寄检修快递单号") |
||||
private String repairTrackingNub; |
||||
/** |
||||
* 是否保修期;1-否,2-是 |
||||
*/ |
||||
@ApiModelProperty(value = "是否保修期;1-否,2-是") |
||||
private String isLiability; |
||||
/** |
||||
* 问题描述 |
||||
*/ |
||||
@ApiModelProperty(value = "问题描述") |
||||
private String problemDescription; |
||||
/** |
||||
* 维修费用;单位(元) |
||||
*/ |
||||
@ApiModelProperty(value = "维修费用;单位(元)") |
||||
private BigDecimal maintenanceCosts; |
||||
/** |
||||
* 寄回日期 |
||||
*/ |
||||
@ApiModelProperty(value = "寄回日期") |
||||
private Date returnDate; |
||||
/** |
||||
* 维修寄回单号 |
||||
*/ |
||||
@ApiModelProperty(value = "维修寄回单号") |
||||
private String returnOrderNub; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@ApiModelProperty(value = "备注") |
||||
private String notes; |
||||
|
||||
} |
@ -0,0 +1,50 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.basic.feign; |
||||
|
||||
import org.springblade.common.constant.LauncherConstant; |
||||
import org.springblade.core.mp.support.BladePage; |
||||
import com.logpm.basic.entity.BasicPdarecordsEntity; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
||||
/** |
||||
* pda维修记录 Feign接口类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-05-09 |
||||
*/ |
||||
@FeignClient( |
||||
value = LauncherConstant.APPLICATION_BASIC_NAME |
||||
) |
||||
public interface IBasicPdarecordsClient { |
||||
|
||||
String API_PREFIX = "pdarecords/client"; |
||||
String TOP = API_PREFIX + "/top"; |
||||
|
||||
/** |
||||
* 获取pda维修记录列表 |
||||
* |
||||
* @param current 页号 |
||||
* @param size 页数 |
||||
* @return BladePage |
||||
*/ |
||||
@GetMapping(TOP) |
||||
BladePage<BasicPdarecordsEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size); |
||||
|
||||
} |
@ -0,0 +1,35 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.basic.vo; |
||||
|
||||
import com.logpm.basic.entity.BasicPdarecordsEntity; |
||||
import org.springblade.core.tool.node.INode; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
/** |
||||
* pda维修记录 视图实体类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-05-09 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class BasicPdarecordsVO extends BasicPdarecordsEntity { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
@ -0,0 +1,150 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.basic.controller; |
||||
|
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import io.swagger.annotations.ApiParam; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import lombok.AllArgsConstructor; |
||||
import javax.validation.Valid; |
||||
|
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.logpm.basic.entity.BasicPdarecordsEntity; |
||||
import com.logpm.basic.vo.BasicPdarecordsVO; |
||||
import com.logpm.basic.excel.BasicPdarecordsExcel; |
||||
import com.logpm.basic.service.IBasicPdarecordsService; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.excel.util.ExcelUtil; |
||||
import org.springblade.core.tool.constant.BladeConstant; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
import java.util.Map; |
||||
import java.util.List; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
|
||||
/** |
||||
* pda维修记录 控制器 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-05-09 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/basicPdarecords") |
||||
@Api(value = "pda维修记录", tags = "pda维修记录接口") |
||||
public class BasicPdarecordsController extends BladeController { |
||||
|
||||
private final IBasicPdarecordsService basicPdarecordsService; |
||||
|
||||
/** |
||||
* pda维修记录 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "详情", notes = "传入basicPdarecords") |
||||
public R<BasicPdarecordsEntity> detail(BasicPdarecordsEntity basicPdarecords) { |
||||
BasicPdarecordsEntity detail = basicPdarecordsService.getOne(Condition.getQueryWrapper(basicPdarecords)); |
||||
return R.data(detail); |
||||
} |
||||
/** |
||||
* pda维修记录 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "分页", notes = "传入basicPdarecords") |
||||
public R<IPage<BasicPdarecordsEntity>> list(@ApiIgnore @RequestParam Map<String, Object> basicPdarecords, Query query) { |
||||
IPage<BasicPdarecordsEntity> pages = basicPdarecordsService.page(Condition.getPage(query), Condition.getQueryWrapper(basicPdarecords, BasicPdarecordsEntity.class)); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* pda维修记录 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@ApiOperation(value = "分页", notes = "传入basicPdarecords") |
||||
public R<IPage<BasicPdarecordsVO>> page(BasicPdarecordsVO basicPdarecords, Query query) { |
||||
IPage<BasicPdarecordsVO> pages = basicPdarecordsService.selectBasicPdarecordsPage(Condition.getPage(query), basicPdarecords); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* pda维修记录 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@ApiOperation(value = "新增", notes = "传入basicPdarecords") |
||||
public R save(@Valid @RequestBody BasicPdarecordsEntity basicPdarecords) { |
||||
return R.status(basicPdarecordsService.save(basicPdarecords)); |
||||
} |
||||
|
||||
/** |
||||
* pda维修记录 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@ApiOperation(value = "修改", notes = "传入basicPdarecords") |
||||
public R update(@Valid @RequestBody BasicPdarecordsEntity basicPdarecords) { |
||||
return R.status(basicPdarecordsService.updateById(basicPdarecords)); |
||||
} |
||||
|
||||
/** |
||||
* pda维修记录 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@ApiOperation(value = "新增或修改", notes = "传入basicPdarecords") |
||||
public R submit(@Valid @RequestBody BasicPdarecordsEntity basicPdarecords) { |
||||
return R.status(basicPdarecordsService.saveOrUpdate(basicPdarecords)); |
||||
} |
||||
|
||||
/** |
||||
* pda维修记录 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(basicPdarecordsService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@GetMapping("/export-basicPdarecords") |
||||
@ApiOperationSupport(order = 9) |
||||
@ApiOperation(value = "导出数据", notes = "传入basicPdarecords") |
||||
public void exportBasicPdarecords(@ApiIgnore @RequestParam Map<String, Object> basicPdarecords, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<BasicPdarecordsEntity> queryWrapper = Condition.getQueryWrapper(basicPdarecords, BasicPdarecordsEntity.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(BasicPdarecords::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
queryWrapper.lambda().eq(BasicPdarecordsEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
||||
List<BasicPdarecordsExcel> list = basicPdarecordsService.exportBasicPdarecords(queryWrapper); |
||||
ExcelUtil.export(response, "pda维修记录数据" + DateUtil.time(), "pda维修记录数据表", list, BasicPdarecordsExcel.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,34 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.basic.dto; |
||||
|
||||
import com.logpm.basic.entity.BasicPdarecordsEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
/** |
||||
* pda维修记录 数据传输对象实体类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-05-09 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class BasicPdarecordsDTO extends BasicPdarecordsEntity { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
@ -0,0 +1,166 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.basic.excel; |
||||
|
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
import java.math.BigDecimal; |
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import java.io.Serializable; |
||||
|
||||
|
||||
/** |
||||
* pda维修记录 Excel实体类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-05-09 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class BasicPdarecordsExcel implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 租户号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("租户号") |
||||
private String tenantId; |
||||
/** |
||||
* 是否已删除 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("是否已删除") |
||||
private Integer isDeleted; |
||||
/** |
||||
* 预留1 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留1") |
||||
private String reserve1; |
||||
/** |
||||
* 预留2 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留2") |
||||
private String reserve2; |
||||
/** |
||||
* 预留3 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留3") |
||||
private String reserve3; |
||||
/** |
||||
* 预留4 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留4") |
||||
private String reserve4; |
||||
/** |
||||
* 预留5 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留5") |
||||
private String reserve5; |
||||
/** |
||||
* 关联pdaid |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("关联pdaid") |
||||
private String masterId; |
||||
/** |
||||
* 反馈日期 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("反馈日期") |
||||
private Date feedbackTime; |
||||
/** |
||||
* 营业部 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("营业部") |
||||
private String businessDepartment; |
||||
/** |
||||
* 维修PDA品牌/SN |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("维修PDA品牌/SN") |
||||
private String brand; |
||||
/** |
||||
* 采买经销商 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("采买经销商") |
||||
private String dealer; |
||||
/** |
||||
* 维修公司 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("维修公司") |
||||
private String maintenanceCompany; |
||||
/** |
||||
* 寄检修快递单号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("寄检修快递单号") |
||||
private String repairTrackingNub; |
||||
/** |
||||
* 是否保修期;1-否,2-是 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("是否保修期;1-否,2-是") |
||||
private String isLiability; |
||||
/** |
||||
* 问题描述 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("问题描述") |
||||
private String problemDescription; |
||||
/** |
||||
* 维修费用;单位(元) |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("维修费用;单位(元)") |
||||
private BigDecimal maintenanceCosts; |
||||
/** |
||||
* 寄回日期 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("寄回日期") |
||||
private Date returnDate; |
||||
/** |
||||
* 维修寄回单号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("维修寄回单号") |
||||
private String returnOrderNub; |
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("备注") |
||||
private String notes; |
||||
|
||||
} |
@ -0,0 +1,53 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.basic.feign; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.mp.support.BladePage; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import com.logpm.basic.entity.BasicPdarecordsEntity; |
||||
import com.logpm.basic.service.IBasicPdarecordsService; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
/** |
||||
* pda维修记录 Feign实现类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-05-09 |
||||
*/ |
||||
@ApiIgnore() |
||||
@RestController |
||||
@AllArgsConstructor |
||||
public class BasicPdarecordsClient implements IBasicPdarecordsClient { |
||||
|
||||
private final IBasicPdarecordsService basicPdarecordsService; |
||||
|
||||
@Override |
||||
@GetMapping(TOP) |
||||
public BladePage<BasicPdarecordsEntity> top(Integer current, Integer size) { |
||||
Query query = new Query(); |
||||
query.setCurrent(current); |
||||
query.setSize(size); |
||||
IPage<BasicPdarecordsEntity> page = basicPdarecordsService.page(Condition.getPage(query)); |
||||
return BladePage.of(page); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,54 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.basic.mapper; |
||||
|
||||
import com.logpm.basic.entity.BasicPdarecordsEntity; |
||||
import com.logpm.basic.vo.BasicPdarecordsVO; |
||||
import com.logpm.basic.excel.BasicPdarecordsExcel; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* pda维修记录 Mapper 接口 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-05-09 |
||||
*/ |
||||
public interface BasicPdarecordsMapper extends BaseMapper<BasicPdarecordsEntity> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page |
||||
* @param basicPdarecords |
||||
* @return |
||||
*/ |
||||
List<BasicPdarecordsVO> selectBasicPdarecordsPage(IPage page, BasicPdarecordsVO basicPdarecords); |
||||
|
||||
|
||||
/** |
||||
* 获取导出数据 |
||||
* |
||||
* @param queryWrapper |
||||
* @return |
||||
*/ |
||||
List<BasicPdarecordsExcel> exportBasicPdarecords(@Param("ew") Wrapper<BasicPdarecordsEntity> queryWrapper); |
||||
|
||||
} |
@ -0,0 +1,46 @@
|
||||
<?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.logpm.basic.mapper.BasicPdarecordsMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="basicPdarecordsResultMap" type="com.logpm.basic.entity.BasicPdarecordsEntity"> |
||||
<result column="id" property="id"/> |
||||
<result column="tenant_id" property="tenantId"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="status" property="status"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="create_dept" property="createDept"/> |
||||
<result column="reserve1" property="reserve1"/> |
||||
<result column="reserve2" property="reserve2"/> |
||||
<result column="reserve3" property="reserve3"/> |
||||
<result column="reserve4" property="reserve4"/> |
||||
<result column="reserve5" property="reserve5"/> |
||||
<result column="master_id" property="masterId"/> |
||||
<result column="feedback_time" property="feedbackTime"/> |
||||
<result column="business_department" property="businessDepartment"/> |
||||
<result column="brand" property="brand"/> |
||||
<result column="dealer" property="dealer"/> |
||||
<result column="maintenance_company" property="maintenanceCompany"/> |
||||
<result column="repair_tracking_nub" property="repairTrackingNub"/> |
||||
<result column="is_liability" property="isLiability"/> |
||||
<result column="problem_description" property="problemDescription"/> |
||||
<result column="maintenance_costs" property="maintenanceCosts"/> |
||||
<result column="return_date" property="returnDate"/> |
||||
<result column="return_order_nub" property="returnOrderNub"/> |
||||
<result column="notes" property="notes"/> |
||||
</resultMap> |
||||
|
||||
|
||||
<select id="selectBasicPdarecordsPage" resultMap="basicPdarecordsResultMap"> |
||||
select * from logpm_basic_pdarecords where is_deleted = 0 |
||||
</select> |
||||
|
||||
|
||||
<select id="exportBasicPdarecords" resultType="com.logpm.basic.excel.BasicPdarecordsExcel"> |
||||
SELECT * FROM logpm_basic_pdarecords ${ew.customSqlSegment} |
||||
</select> |
||||
|
||||
</mapper> |
@ -0,0 +1,52 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.basic.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.logpm.basic.entity.BasicPdarecordsEntity; |
||||
import com.logpm.basic.vo.BasicPdarecordsVO; |
||||
import com.logpm.basic.excel.BasicPdarecordsExcel; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* pda维修记录 服务类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-05-09 |
||||
*/ |
||||
public interface IBasicPdarecordsService extends BaseService<BasicPdarecordsEntity> { |
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page |
||||
* @param basicPdarecords |
||||
* @return |
||||
*/ |
||||
IPage<BasicPdarecordsVO> selectBasicPdarecordsPage(IPage<BasicPdarecordsVO> page, BasicPdarecordsVO basicPdarecords); |
||||
|
||||
|
||||
/** |
||||
* 导出数据 |
||||
* |
||||
* @param queryWrapper |
||||
* @return |
||||
*/ |
||||
List<BasicPdarecordsExcel> exportBasicPdarecords(Wrapper<BasicPdarecordsEntity> queryWrapper); |
||||
|
||||
} |
@ -0,0 +1,54 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.basic.service.impl; |
||||
|
||||
import com.logpm.basic.entity.BasicPdarecordsEntity; |
||||
import com.logpm.basic.vo.BasicPdarecordsVO; |
||||
import com.logpm.basic.excel.BasicPdarecordsExcel; |
||||
import com.logpm.basic.mapper.BasicPdarecordsMapper; |
||||
import com.logpm.basic.service.IBasicPdarecordsService; |
||||
import org.springframework.stereotype.Service; |
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* pda维修记录 服务实现类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-05-09 |
||||
*/ |
||||
@Service |
||||
public class BasicPdarecordsServiceImpl extends BaseServiceImpl<BasicPdarecordsMapper, BasicPdarecordsEntity> implements IBasicPdarecordsService { |
||||
|
||||
@Override |
||||
public IPage<BasicPdarecordsVO> selectBasicPdarecordsPage(IPage<BasicPdarecordsVO> page, BasicPdarecordsVO basicPdarecords) { |
||||
return page.setRecords(baseMapper.selectBasicPdarecordsPage(page, basicPdarecords)); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public List<BasicPdarecordsExcel> exportBasicPdarecords(Wrapper<BasicPdarecordsEntity> queryWrapper) { |
||||
List<BasicPdarecordsExcel> basicPdarecordsList = baseMapper.exportBasicPdarecords(queryWrapper); |
||||
//basicPdarecordsList.forEach(basicPdarecords -> {
|
||||
// basicPdarecords.setTypeName(DictCache.getValue(DictEnum.YES_NO, BasicPdarecords.getType()));
|
||||
//});
|
||||
return basicPdarecordsList; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,38 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.basicdata.config; |
||||
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan; |
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties; |
||||
import org.springframework.cloud.openfeign.EnableFeignClients; |
||||
import org.springframework.context.annotation.ComponentScan; |
||||
import org.springframework.context.annotation.Configuration; |
||||
|
||||
/** |
||||
* 配置feign、mybatis包名、properties |
||||
* |
||||
* @author chaos |
||||
*/ |
||||
@Configuration(proxyBeanMethods = false) |
||||
@ComponentScan({"org.springblade", "com.logpm"}) |
||||
@EnableFeignClients({"org.springblade", "com.logpm"}) |
||||
@MapperScan({"org.springblade.**.mapper.**", "com.logpm.**.mapper.**"}) |
||||
@EnableConfigurationProperties(BasicDataProperties.class) |
||||
public class BasicDataProperties { |
||||
|
||||
} |
Loading…
Reference in new issue