已修改13个文件
已复制1个文件
已重命名1个文件
已添加9个文件
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.dto.DeviceLedgerDto; |
| | | import com.ruoyi.device.pojo.DeviceLedger; |
| | | import com.ruoyi.device.service.IDeviceLedgerService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | |
| | | |
| | | @ApiModelProperty("设å¤å°è´¦å表") |
| | | @GetMapping("/page") |
| | | public AjaxResult page(Page page , DeviceLedger deviceLedger) { |
| | | public AjaxResult page(Page page , DeviceLedgerDto deviceLedger) { |
| | | return AjaxResult.success(deviceLedgerService.queryPage(page,deviceLedger)); |
| | | } |
| | | |
| | | @PostMapping() |
| | | @ApiModelProperty("æ·»å 设å¤å°è´¦") |
| | | public AjaxResult add(DeviceLedger deviceLedger) { |
| | | public AjaxResult add(@RequestBody DeviceLedger deviceLedger) { |
| | | |
| | | return deviceLedgerService.saveDeviceLedger(deviceLedger); |
| | | } |
| | |
| | | |
| | | @PutMapping () |
| | | @ApiModelProperty("ä¿®æ¹è®¾å¤å°è´¦") |
| | | public AjaxResult update(DeviceLedger deviceLedger) { |
| | | |
| | | public AjaxResult update(@RequestBody DeviceLedger deviceLedger) { |
| | | return deviceLedgerService.updateDeviceLedger(deviceLedger); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @DeleteMapping("/{ids}") |
| | | @ApiModelProperty("å é¤è®¾å¤å°è´¦") |
| | | public AjaxResult delete(@PathVariable ArrayList<Long> ids) { |
| | | public AjaxResult delete(@PathVariable("ids") ArrayList<Long> ids) { |
| | | boolean b = deviceLedgerService.removeBatchByIds(ids); |
| | | if (!b) { |
| | | return AjaxResult.error("å é¤å¤±è´¥"); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.dto.DeviceMaintenanceDto; |
| | | import com.ruoyi.device.dto.DeviceRepairDto; |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import com.ruoyi.device.pojo.DeviceRepair; |
| | | import com.ruoyi.device.service.IDeviceMaintenanceService; |
| | | import com.ruoyi.device.service.IDeviceRepairService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | |
| | | |
| | | @RestController |
| | | @RequestMapping("/device/maintenance") |
| | | public class DeviceMaintenanceController { |
| | | |
| | | |
| | | @Autowired |
| | | private IDeviceMaintenanceService deviceMaintenanceService; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ¥ä¿®å表") |
| | | @GetMapping("/page") |
| | | public AjaxResult page(Page page , DeviceMaintenanceDto deviceMaintenanceDto) { |
| | | return AjaxResult.success(deviceMaintenanceService.queryPage(page,deviceMaintenanceDto)); |
| | | } |
| | | |
| | | @PostMapping() |
| | | @ApiModelProperty("æ·»å è®¾å¤æ¥ä¿®") |
| | | public AjaxResult add(@RequestBody DeviceMaintenance deviceRepair) { |
| | | return deviceMaintenanceService.saveDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | | @ApiModelProperty("æ ¹æ®idæ¥è¯¢è®¾å¤æ¥ä¿®") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult detail(@PathVariable Long id) { |
| | | return AjaxResult.success(deviceMaintenanceService.getById(id)); |
| | | } |
| | | |
| | | @PutMapping () |
| | | @ApiModelProperty("ä¿®æ¹è®¾å¤æ¥ä¿®") |
| | | public AjaxResult update(@RequestBody DeviceMaintenance deviceMaintenance) { |
| | | return deviceMaintenanceService.updateDeviceRepair(deviceMaintenance); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiModelProperty("å é¤è®¾å¤æ¥ä¿®") |
| | | public AjaxResult delete(@PathVariable ArrayList<Long> ids) { |
| | | boolean b = deviceMaintenanceService.removeBatchByIds(ids); |
| | | if (!b) { |
| | | return AjaxResult.error("å é¤å¤±è´¥"); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("export") |
| | | @ApiModelProperty("导åºè®¾å¤æ¥ä¿®") |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | | deviceMaintenanceService.export(response, ids); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | |
| | | @Api(tags = "è®¾å¤æ¥ä¿®ç®¡ç") |
| | | @RequestMapping("/device/reppair") |
| | |
| | | |
| | | @PostMapping() |
| | | @ApiModelProperty("æ·»å è®¾å¤æ¥ä¿®") |
| | | public AjaxResult add(DeviceRepair deviceRepair) { |
| | | public AjaxResult add( @RequestBody DeviceRepair deviceRepair) { |
| | | return deviceRepairService.saveDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | |
| | | |
| | | @PutMapping () |
| | | @ApiModelProperty("ä¿®æ¹è®¾å¤æ¥ä¿®") |
| | | public AjaxResult update(DeviceRepair deviceRepair) { |
| | | public AjaxResult update( @RequestBody DeviceRepair deviceRepair) { |
| | | return deviceRepairService.updateDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @DeleteMapping("/{ids}") |
| | | @ApiModelProperty("å é¤è®¾å¤æ¥ä¿®") |
| | | public AjaxResult delete(@PathVariable ArrayList<Long> ids) { |
| | | boolean b = deviceRepairService.removeBatchByIds(ids); |
| | | public AjaxResult delete(@PathVariable("ids") Long[] ids) { |
| | | boolean b = deviceRepairService.removeBatchByIds(Arrays.asList(ids)); |
| | | if (!b) { |
| | | return AjaxResult.error("å é¤å¤±è´¥"); |
| | | } |
copy from src/main/java/com/ruoyi/device/dto/DeviceLedgerExeclDto.java
copy to src/main/java/com/ruoyi/device/dto/DeviceLedgerDto.java
Îļþ´Ó src/main/java/com/ruoyi/device/dto/DeviceLedgerExeclDto.java ¸´ÖÆ |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 设å¤å°è´¦å®ä½ç±» |
| | | */ |
| | | @Data |
| | | public class DeviceLedgerExeclDto { |
| | | @TableName("device_ledger") |
| | | public class DeviceLedgerDto { |
| | | |
| | | /** |
| | | * 主é®IDï¼èªå¢ |
| | | */ |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 设å¤åç§° |
| | | */ |
| | | @Excel(name = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | @Excel(name = "è§æ ¼åå·") |
| | | private String deviceModel; |
| | | |
| | | /** |
| | | * ä¾åºååç§° |
| | | */ |
| | | @Excel(name = "ä¾åºååç§°") |
| | | private String supplierName; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | @Excel(name = "åä½") |
| | | private String unit; |
| | | |
| | | /** |
| | | * æ°é |
| | | */ |
| | | @Excel(name = "æ°é") |
| | | private BigDecimal number; |
| | | |
| | | /** |
| | | * å«ç¨åä»· |
| | | */ |
| | | @Excel(name = "å«ç¨åä»·") |
| | | private BigDecimal taxIncludingPriceUnit; |
| | | |
| | | /** |
| | | * å«ç¨æ»ä»· |
| | | */ |
| | | @Excel(name = "å«ç¨æ»ä»·") |
| | | private BigDecimal taxIncludingPriceTotal; |
| | | |
| | | /** |
| | | * ç¨ç |
| | | */ |
| | | @Excel(name = "ç¨ç") |
| | | private BigDecimal taxRate; |
| | | |
| | | /** |
| | | * ä¸å«ç¨æ»ä»· |
| | | */ |
| | | @Excel(name = "ä¸å«ç¨æ»ä»·") |
| | | private BigDecimal unTaxIncludingPriceTotal; |
| | | |
| | | /** |
| | | * å½å
¥æ¶é´ |
| | | * |
| | | */ |
| | | @Excel(name = "å½å
¥æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * å½å
¥äºº |
| | | */ |
| | | @Excel(name = "å½å
¥äºº") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | |
| | | /** |
| | | * æ´æ°äºº |
| | | */ |
| | | private String updateUser; |
| | | |
| | | /** |
| | | * ç§æ·ID |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class DeviceMaintenanceDto { |
| | | |
| | | |
| | | @ApiModelProperty("设å¤ä¿å
»id") |
| | | |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("设å¤å°è´¦id") |
| | | private String deviceLedgerId; |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("è§æ ¼åå·") |
| | | private String deviceModel; |
| | | |
| | | @ApiModelProperty("计åä¿å
»æ¥æ") |
| | | private Date maintenancePlanTime; |
| | | |
| | | @ApiModelProperty("å®é
ä¿å
»äºº") |
| | | private String maintenanceActuallyName; |
| | | |
| | | @ApiModelProperty("å®é
ä¿å
»æ¥æ") |
| | | private Date maintenanceActuallyTime; |
| | | |
| | | @ApiModelProperty("ä¿å
»ç»æ 0 ç»´ä¿® 1 å®å¥½") |
| | | private Integer maintenanceResult; |
| | | |
| | | @ApiModelProperty("ç¶æ 0 å¾
ä¿å
» 1 å®ç»") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private String updateUser; |
| | | |
| | | @ApiModelProperty("ç§æ·id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | } |
ÎļþÃû´Ó src/main/java/com/ruoyi/device/dto/DeviceLedgerExeclDto.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.device.dto; |
| | | package com.ruoyi.device.execl; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | |
| | | /** |
| | | * 设å¤åç§° |
| | | */ |
| | | @Excel(name = "设å¤åç§°") |
| | | @Excel(name = "设å¤åç§°" ,sort = 1) |
| | | private String deviceName; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | @Excel(name = "è§æ ¼åå·") |
| | | @Excel(name = "è§æ ¼åå·" ,sort = 2) |
| | | private String deviceModel; |
| | | |
| | | /** |
| | | * ä¾åºååç§° |
| | | */ |
| | | @Excel(name = "ä¾åºååç§°") |
| | | @Excel(name = "ä¾åºååç§°",sort = 3) |
| | | private String supplierName; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | @Excel(name = "åä½") |
| | | @Excel(name = "åä½",sort = 4) |
| | | private String unit; |
| | | |
| | | /** |
| | | * æ°é |
| | | */ |
| | | @Excel(name = "æ°é") |
| | | @Excel(name = "æ°é",sort = 5) |
| | | private BigDecimal number; |
| | | |
| | | /** |
| | | * å«ç¨åä»· |
| | | */ |
| | | @Excel(name = "å«ç¨åä»·") |
| | | @Excel(name = "å«ç¨åä»·",sort = 6) |
| | | private BigDecimal taxIncludingPriceUnit; |
| | | |
| | | /** |
| | | * å«ç¨æ»ä»· |
| | | */ |
| | | @Excel(name = "å«ç¨æ»ä»·") |
| | | @Excel(name = "å«ç¨æ»ä»·",sort = 7) |
| | | private BigDecimal taxIncludingPriceTotal; |
| | | |
| | | /** |
| | | * ç¨ç |
| | | */ |
| | | @Excel(name = "ç¨ç") |
| | | @Excel(name = "ç¨ç",sort = 8) |
| | | private BigDecimal taxRate; |
| | | |
| | | /** |
| | | * ä¸å«ç¨æ»ä»· |
| | | */ |
| | | @Excel(name = "ä¸å«ç¨æ»ä»·") |
| | | @Excel(name = "ä¸å«ç¨æ»ä»·",sort = 9) |
| | | private BigDecimal unTaxIncludingPriceTotal; |
| | | |
| | | /** |
| | | * å½å
¥æ¶é´ |
| | | * |
| | | */ |
| | | @Excel(name = "å½å
¥æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @Excel(name = "å½å
¥æ¶é´",sort = 10) |
| | | private LocalDateTime createTime; |
| | | |
| | | |
| | |
| | | /** |
| | | * å½å
¥äºº |
| | | */ |
| | | @Excel(name = "å½å
¥äºº") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @Excel(name = "å½å
¥äºº",sort = 9) |
| | | private String createUser; |
| | | |
| | | |
| | | |
| | | /** |
| | | * ç§æ·ID |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.execl; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class DeviceMaintenanceExeclDto { |
| | | |
| | | |
| | | |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | @Excel(name = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @Excel(name = "è§æ ¼åå·") |
| | | @ApiModelProperty("è§æ ¼åå·") |
| | | private String deviceModel; |
| | | |
| | | @Excel(name = "计åä¿å
»æ¥æ") |
| | | @ApiModelProperty("计åä¿å
»æ¥æ") |
| | | private Date maintenancePlanTime; |
| | | |
| | | @ApiModelProperty("å®é
ä¿å
»äºº") |
| | | @Excel(name = "å®é
ä¿å
»äºº") |
| | | private String maintenanceActuallyName; |
| | | |
| | | @ApiModelProperty("å®é
ä¿å
»æ¥æ") |
| | | @Excel(name = "å®é
ä¿å
»æ¥æ") |
| | | private LocalDateTime maintenanceActuallyTime; |
| | | |
| | | @ApiModelProperty("ä¿å
»ç»æ 0 ç»´ä¿® 1 å®å¥½") |
| | | @Excel(name = "ä¿å
ȍȾ") |
| | | private String maintenanceResult; |
| | | |
| | | @ApiModelProperty("ç¶æ 0 å¾
ä¿å
» 1 å®ç»") |
| | | @Excel(name = "ç¶æ") |
| | | private String status; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @Excel(name = "å½å
¥æ¶é´") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @Excel(name = "å½å
¥äºº") |
| | | private String createUser; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.execl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class DeviceRepairExeclDto { |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | @Excel(name = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("设å¤åå·") |
| | | @Excel(name = "设å¤åå·") |
| | | private String deviceModel; |
| | | |
| | | @ApiModelProperty("æ¥ä¿®æ¶é´") |
| | | @Excel(name = "æ¥ä¿®æ¶é´") |
| | | private Date repairTime; |
| | | |
| | | @ApiModelProperty("æ¥ä¿®äºº") |
| | | @Excel(name = "æ¥ä¿®äºº") |
| | | private String repairName; |
| | | |
| | | @ApiModelProperty("æ¥ä¿®å
容") |
| | | @Excel(name = "æ¥ä¿®å
容") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("维修人") |
| | | @Excel(name = "维修人") |
| | | private String maintenanceName; |
| | | |
| | | @ApiModelProperty("ç»´ä¿®æ¶é´") |
| | | @Excel(name = "ç»´ä¿®æ¶é´") |
| | | private Date maintenanceTime; |
| | | |
| | | @ApiModelProperty("ç»´ä¿®ç»æ") |
| | | @Excel(name = "ç»´ä¿®ç»æ") |
| | | private String maintenanceResult; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | @Excel(name = "ç¶æ") |
| | | private String statusStr; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @Excel(name = "å½å
¥æ¶é´") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Excel(name = "å½å
¥äºº") |
| | | @ApiModelProperty("å建人") |
| | | private String createUser; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.dto.DeviceLedgerExeclDto; |
| | | import com.ruoyi.device.dto.DeviceLedgerDto; |
| | | import com.ruoyi.device.execl.DeviceLedgerExeclDto; |
| | | import com.ruoyi.device.pojo.DeviceLedger; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface DeviceLedgerMapper extends BaseMapper<DeviceLedger> { |
| | | |
| | | IPage<DeviceLedger> queryPage(Page page, DeviceLedger deviceLedger); |
| | | IPage<DeviceLedgerDto> queryPage(Page page, @Param("deviceLedger") DeviceLedgerDto deviceLedgerDto); |
| | | |
| | | List<DeviceLedgerExeclDto> deviceLedgerExportList(DeviceLedger deviceLedger); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.dto.DeviceMaintenanceDto; |
| | | import com.ruoyi.device.dto.DeviceRepairDto; |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DeviceMaintenanceMapper extends BaseMapper<DeviceMaintenance> { |
| | | |
| | | IPage<DeviceMaintenanceDto> queryPage(Page page, DeviceMaintenanceDto deviceMaintenanceDto); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | |
| | | * å½å
¥æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * å½å
¥äºº |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * æ´æ°äºº |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private String updateUser; |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * ç§æ·ID |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("device_maintenance") |
| | | @ApiModel("设å¤ä¿å
»è®°å½") |
| | | public class DeviceMaintenance { |
| | | |
| | | @ApiModelProperty("设å¤ä¿å
»id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("设å¤å°è´¦id") |
| | | private String deviceLedgerId; |
| | | |
| | | @ApiModelProperty("计åä¿å
»æ¥æ") |
| | | private Date maintenancePlanTime; |
| | | |
| | | @ApiModelProperty("å®é
ä¿å
»äºº") |
| | | private String maintenanceActuallyName; |
| | | |
| | | @ApiModelProperty("å®é
ä¿å
»æ¥æ") |
| | | private Date maintenanceActuallyTime; |
| | | |
| | | @ApiModelProperty("ä¿å
»ç»æ 0 ç»´ä¿® 1 å®å¥½") |
| | | private Integer maintenanceResult; |
| | | |
| | | @ApiModelProperty("ç¶æ 0 å¾
ä¿å
» 1 å®ç»") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ç§æ·id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import nonapi.io.github.classgraph.json.Id; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private String updateUser; |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ç§æ·id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.dto.DeviceLedgerDto; |
| | | import com.ruoyi.device.pojo.DeviceLedger; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | |
| | |
| | | import java.util.ArrayList; |
| | | |
| | | public interface IDeviceLedgerService extends IService<DeviceLedger> { |
| | | IPage<DeviceLedger> queryPage(Page page, DeviceLedger deviceLedger); |
| | | IPage<DeviceLedgerDto> queryPage(Page page, DeviceLedgerDto deviceLedger); |
| | | |
| | | AjaxResult saveDeviceLedger(DeviceLedger deviceLedger); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.device.dto.DeviceMaintenanceDto; |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | public interface IDeviceMaintenanceService extends IService<DeviceMaintenance> { |
| | | |
| | | IPage<DeviceMaintenanceDto> queryPage(Page page, DeviceMaintenanceDto deviceMaintenanceDto); |
| | | |
| | | AjaxResult saveDeviceRepair(DeviceMaintenance deviceMaintenance); |
| | | |
| | | AjaxResult updateDeviceRepair(DeviceMaintenance deviceMaintenance); |
| | | |
| | | void export(HttpServletResponse response, Long[] ids); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.device.dto.DeviceLedgerExeclDto; |
| | | import com.ruoyi.device.dto.DeviceLedgerDto; |
| | | import com.ruoyi.device.execl.DeviceLedgerExeclDto; |
| | | import com.ruoyi.device.mapper.DeviceLedgerMapper; |
| | | import com.ruoyi.device.pojo.DeviceLedger; |
| | | import com.ruoyi.device.service.IDeviceLedgerService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private DeviceLedgerMapper deviceLedgerMapper; |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Override |
| | | public IPage<DeviceLedger> queryPage(Page page, DeviceLedger deviceLedger) { |
| | | public IPage<DeviceLedgerDto> queryPage(Page page, DeviceLedgerDto deviceLedger) { |
| | | |
| | | return deviceLedgerMapper.queryPage(page, deviceLedger); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | | ArrayList<Long> arrayList = new ArrayList<>(); |
| | | Arrays.stream(ids).map(id -> { |
| | | return arrayList.add( id); |
| | | }); |
| | | List<DeviceLedger> supplierManageList = deviceLedgerMapper.selectBatchIds(arrayList); |
| | | ArrayList<DeviceLedgerExeclDto> deviceLedgerExeclDtos = new ArrayList<>(); |
| | | supplierManageList.stream().forEach(deviceLedger -> { |
| | | DeviceLedgerExeclDto deviceLedgerExeclDto = new DeviceLedgerExeclDto(); |
| | | BeanUtils.copyProperties(deviceLedger,deviceLedgerExeclDto); |
| | | deviceLedgerExeclDtos.add(deviceLedgerExeclDto); |
| | | }); |
| | | ExcelUtil<DeviceLedgerExeclDto> util = new ExcelUtil<DeviceLedgerExeclDto>(DeviceLedgerExeclDto.class); |
| | | util.exportExcel(response, deviceLedgerExeclDtos, "设å¤å°è´¦å¯¼åº"); |
| | | |
| | | if (ids == null || ids.length == 0) { |
| | | List<DeviceLedger> supplierManageList = this.list(); |
| | | |
| | | ArrayList<DeviceLedgerExeclDto> deviceLedgerExeclDtos = new ArrayList<>(); |
| | | supplierManageList.stream().forEach(deviceLedger -> { |
| | | DeviceLedgerExeclDto deviceLedgerExeclDto = new DeviceLedgerExeclDto(); |
| | | BeanUtils.copyProperties(deviceLedger,deviceLedgerExeclDto); |
| | | deviceLedgerExeclDto.setCreateUser(sysUserMapper.selectUserById(Long.valueOf(deviceLedger.getCreateUser().toString())).getUserName()); |
| | | deviceLedgerExeclDtos.add(deviceLedgerExeclDto); |
| | | }); |
| | | ExcelUtil<DeviceLedgerExeclDto> util = new ExcelUtil<DeviceLedgerExeclDto>(DeviceLedgerExeclDto.class); |
| | | util.exportExcel(response, deviceLedgerExeclDtos, "设å¤å°è´¦å¯¼åº"); |
| | | }else { |
| | | ArrayList<Long> arrayList = new ArrayList<>(); |
| | | Arrays.stream(ids).map(id -> { |
| | | return arrayList.add( id); |
| | | }); |
| | | List<DeviceLedger> supplierManageList = deviceLedgerMapper.selectBatchIds(arrayList); |
| | | ArrayList<DeviceLedgerExeclDto> deviceLedgerExeclDtos = new ArrayList<>(); |
| | | supplierManageList.stream().forEach(deviceLedger -> { |
| | | DeviceLedgerExeclDto deviceLedgerExeclDto = new DeviceLedgerExeclDto(); |
| | | BeanUtils.copyProperties(deviceLedger,deviceLedgerExeclDto); |
| | | deviceLedgerExeclDto.setCreateUser(sysUserMapper.selectUserById(Long.valueOf(deviceLedger.getCreateUser().toString())).getUserName()); |
| | | deviceLedgerExeclDtos.add(deviceLedgerExeclDto); |
| | | }); |
| | | ExcelUtil<DeviceLedgerExeclDto> util = new ExcelUtil<DeviceLedgerExeclDto>(DeviceLedgerExeclDto.class); |
| | | util.exportExcel(response, deviceLedgerExeclDtos, "设å¤å°è´¦å¯¼åº"); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.device.dto.DeviceMaintenanceDto; |
| | | import com.ruoyi.device.execl.DeviceMaintenanceExeclDto; |
| | | import com.ruoyi.device.mapper.DeviceMaintenanceMapper; |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import com.ruoyi.device.service.IDeviceMaintenanceService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | |
| | | @Service |
| | | public class DeviceMaintenanceServiceImpl extends ServiceImpl<DeviceMaintenanceMapper, DeviceMaintenance> implements IDeviceMaintenanceService { |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private DeviceMaintenanceMapper deviceMaintenanceMapper; |
| | | |
| | | @Override |
| | | public IPage<DeviceMaintenanceDto> queryPage(Page page, DeviceMaintenanceDto deviceMaintenanceDto) { |
| | | |
| | | return deviceMaintenanceMapper.queryPage(page, deviceMaintenanceDto); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult saveDeviceRepair(DeviceMaintenance deviceRepair) { |
| | | boolean save = this.save(deviceRepair); |
| | | if (save){ |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult updateDeviceRepair(DeviceMaintenance deviceRepair) { |
| | | if (this.updateById(deviceRepair)) { |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | | ArrayList<Long> arrayList = new ArrayList<>(); |
| | | Arrays.stream(ids).map(id -> { |
| | | return arrayList.add( id); |
| | | }); |
| | | List<DeviceMaintenance> supplierManageList = deviceMaintenanceMapper.selectBatchIds(arrayList); |
| | | ArrayList<DeviceMaintenanceExeclDto> deviceLedgerExeclDtos = new ArrayList<>(); |
| | | supplierManageList.stream().forEach(deviceMaintenance -> { |
| | | DeviceMaintenanceExeclDto deviceRepairExeclDto = new DeviceMaintenanceExeclDto(); |
| | | BeanUtils.copyProperties(deviceMaintenance,deviceRepairExeclDto); |
| | | deviceRepairExeclDto.setStatus(deviceMaintenance.getStatus() == 0 ? "å¾
ç»´ä¿®" : "å®ç»"); |
| | | deviceRepairExeclDto.setMaintenanceResult(deviceMaintenance.getMaintenanceResult() == 0 ? "ç»´ä¿®" : "å®å¥½"); |
| | | |
| | | deviceLedgerExeclDtos.add(deviceRepairExeclDto); |
| | | }); |
| | | ExcelUtil<DeviceMaintenanceExeclDto> util = new ExcelUtil<DeviceMaintenanceExeclDto>(DeviceMaintenanceExeclDto.class); |
| | | util.exportExcel(response, deviceLedgerExeclDtos, "è®¾å¤æ¥ä¿®å¯¼åº"); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.device.dto.DeviceRepairDto; |
| | | import com.ruoyi.device.execl.DeviceRepairExeclDto; |
| | | import com.ruoyi.device.mapper.DeviceRepairMapper; |
| | | import com.ruoyi.device.pojo.DeviceRepair; |
| | | import com.ruoyi.device.service.IDeviceRepairService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | | if (ids == null || ids.length == 0) { |
| | | List<DeviceRepair> supplierManageList = this.list(); |
| | | ArrayList<DeviceRepairExeclDto> deviceLedgerExeclDtos = new ArrayList<>(); |
| | | supplierManageList.stream().forEach(deviceRepair -> { |
| | | DeviceRepairExeclDto deviceRepairExeclDto = new DeviceRepairExeclDto(); |
| | | BeanUtils.copyProperties(deviceRepair,deviceRepairExeclDto); |
| | | deviceRepairExeclDto.setStatusStr(deviceRepair.getStatus() == 0 ? "å¾
ç»´ä¿®" : "å®ç»"); |
| | | |
| | | deviceLedgerExeclDtos.add(deviceRepairExeclDto); |
| | | }); |
| | | ExcelUtil<DeviceRepairExeclDto> util = new ExcelUtil<DeviceRepairExeclDto>(DeviceRepairExeclDto.class); |
| | | util.exportExcel(response, deviceLedgerExeclDtos, "è®¾å¤æ¥ä¿®å¯¼åº"); |
| | | }else { |
| | | ArrayList<Long> arrayList = new ArrayList<>(); |
| | | Arrays.stream(ids).map(id -> { |
| | | return arrayList.add( id); |
| | | }); |
| | | List<DeviceRepair> supplierManageList = deviceRepairMapper.selectBatchIds(arrayList); |
| | | ArrayList<DeviceRepairExeclDto> deviceLedgerExeclDtos = new ArrayList<>(); |
| | | supplierManageList.stream().forEach(deviceRepair -> { |
| | | DeviceRepairExeclDto deviceRepairExeclDto = new DeviceRepairExeclDto(); |
| | | BeanUtils.copyProperties(deviceRepair,deviceRepairExeclDto); |
| | | deviceRepairExeclDto.setStatusStr(deviceRepair.getStatus() == 0 ? "å¾
ç»´ä¿®" : "å®ç»"); |
| | | |
| | | deviceLedgerExeclDtos.add(deviceRepairExeclDto); |
| | | }); |
| | | ExcelUtil<DeviceRepairExeclDto> util = new ExcelUtil<DeviceRepairExeclDto>(DeviceRepairExeclDto.class); |
| | | util.exportExcel(response, deviceLedgerExeclDtos, "è®¾å¤æ¥ä¿®å¯¼åº"); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | @ApiModelProperty("导åºå款ç»è®°") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, @RequestParam("ids") String idsStr) { |
| | | if (idsStr == null || idsStr.trim().isEmpty()) { |
| | | throw new RuntimeException("è¯·éæ©è¦å¯¼åºçè®°å½"); |
| | | public void export(HttpServletResponse response, String ids) { |
| | | if (ids == null || ids.isEmpty()) { |
| | | receiptPaymentService.exportPaymentList(response, null); |
| | | } else { |
| | | ArrayList<Long> idList = (ArrayList<Long>) Arrays.stream(ids.split(",")) |
| | | .map(s -> s.replaceAll("[\\[\\]]", "").trim()) |
| | | .map(Long::valueOf) |
| | | .collect(Collectors.toList()); |
| | | receiptPaymentService.exportPaymentList(response, idList); |
| | | } |
| | | |
| | | ArrayList<Long> ids = (ArrayList<Long>) Arrays.stream(idsStr.split(",")) |
| | | .map(s -> s.replaceAll("[\\[\\]]", "").trim()) |
| | | .map(Long::valueOf) |
| | | .collect(Collectors.toList()); |
| | | |
| | | |
| | | receiptPaymentService.exportPaymentList(response, ids); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | List<ReceiptPaymentDto> bindInvoiceNoRegListAll(); |
| | | |
| | | List<ReceiptPaymentExeclDto> bindInvoiceNoRegListByIds(List<Long> ids); |
| | | List<ReceiptPaymentExeclDto> bindInvoiceNoRegListByIds(List<Long> ids,Long tenantId); |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.sales.dto.CustomerInteractionDto; |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | |
| | | |
| | | @Override |
| | | public void exportPaymentList(HttpServletResponse response, List<Long> ids) { |
| | | List<ReceiptPaymentExeclDto> receiptPaymentDtoList = receiptPaymentMapper.bindInvoiceNoRegListByIds(ids); |
| | | ExcelUtil<ReceiptPaymentExeclDto> util = new ExcelUtil<ReceiptPaymentExeclDto>(ReceiptPaymentExeclDto.class); |
| | | util.exportExcel(response, receiptPaymentDtoList, "忬¾ç»è®°"); |
| | | if (ids == null) { |
| | | List<ReceiptPaymentExeclDto> receiptPaymentDtoList = receiptPaymentMapper.bindInvoiceNoRegListByIds(new ArrayList<>(), SecurityUtils.getLoginUser().getTenantId()); |
| | | ExcelUtil<ReceiptPaymentExeclDto> util = new ExcelUtil<ReceiptPaymentExeclDto>(ReceiptPaymentExeclDto.class); |
| | | util.exportExcel(response, receiptPaymentDtoList, "忬¾ç»è®°"); |
| | | }else { |
| | | List<ReceiptPaymentExeclDto> receiptPaymentDtoList = receiptPaymentMapper.bindInvoiceNoRegListByIds(ids,SecurityUtils.getLoginUser().getTenantId()); |
| | | ExcelUtil<ReceiptPaymentExeclDto> util = new ExcelUtil<ReceiptPaymentExeclDto>(ReceiptPaymentExeclDto.class); |
| | | util.exportExcel(response, receiptPaymentDtoList, "忬¾ç»è®°"); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | <mapper namespace="com.ruoyi.device.mapper.DeviceLedgerMapper"> |
| | | |
| | | <select id="queryPage" resultType="com.ruoyi.device.pojo.DeviceLedger"> |
| | | <select id="queryPage" resultType="com.ruoyi.device.dto.DeviceLedgerDto"> |
| | | SELECT |
| | | id, |
| | | device_name AS deviceName, |
| | | device_model AS deviceModel, |
| | | supplier_name AS supplierName, |
| | | unit, |
| | | number, |
| | | tax_including_price_unit AS taxIncludingPriceUnit, |
| | | tax_including_price_total AS taxIncludingPriceTotal, |
| | | tax_rate AS taxRate, |
| | | un_tax_including_price_total AS unTaxIncludingPriceTotal, |
| | | create_time AS createTime, |
| | | update_time AS updateTime, |
| | | create_user AS createUser, |
| | | update_user AS updateUser, |
| | | tenant_id AS tenantId |
| | | FROM device_ledger |
| | | dl.id, |
| | | dl.device_name, |
| | | dl.device_model, |
| | | dl.supplier_name, |
| | | dl.unit, |
| | | dl.number, |
| | | dl.tax_including_price_unit, |
| | | dl.tax_including_price_total, |
| | | dl.tax_rate, |
| | | dl.un_tax_including_price_total, |
| | | dl.create_time, |
| | | dl.update_time , |
| | | su.user_name AS createUser, |
| | | dl.update_user, |
| | | dl.tenant_id |
| | | FROM device_ledger dl |
| | | left join sys_user su on dl.create_user = su.user_id |
| | | <where> |
| | | <!-- 设å¤åç§° --> |
| | | <if test="deviceLedger.deviceName != null and deviceLedger.deviceName != ''"> |
| | |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | <select id="deviceLedgerExportList" resultType="com.ruoyi.device.dto.DeviceLedgerExeclDto"> |
| | | <select id="deviceLedgerExportList" resultType="com.ruoyi.device.execl.DeviceLedgerExeclDto"> |
| | | |
| | | </select> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.device.mapper.DeviceMaintenanceMapper"> |
| | | |
| | | <select id="queryPage" resultType="com.ruoyi.device.dto.DeviceMaintenanceDto"> |
| | | select dm.*, |
| | | dl.device_name, |
| | | dl.device_model |
| | | from device_maintenance dm |
| | | left join device_ledger dl on dm.device_ledger_id = dl.id |
| | | <where> |
| | | <if test="deviceRepairDto.deviceName != null"> |
| | | and dl.device_name like concat('%',#{deviceRepairDto.deviceName},'%') |
| | | </if> |
| | | <if test="deviceRepairDto.deviceModel != null"> |
| | | and dl.device_model like concat('%',#{deviceRepairDto.deviceModel},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </select> |
| | | <select id="bindInvoiceNoRegListByIds" resultType="com.ruoyi.sales.dto.ReceiptPaymentExeclDto"> |
| | | SELECT |
| | | T1.id , |
| | | T1.invoice_no , |
| | | T1.invoice_total , |
| | | T3.project_name, |
| | | T1.invoice_person , |
| | | T1.invoice_date , |
| | | T1.create_time , |
| | | T1.create_user , |
| | | T1.update_time , |
| | | T1.update_user , |
| | | T1.tenant_id , |
| | | T2.tax_rate, |
| | | T3.sales_contract_no, |
| | | T3.customer_contract_no, |
| | | T3.customer_name, |
| | | T4.invoiceFileName, |
| | | T5.product_category, |
| | | IFNULL(T6.receipt_payment_amount_total ,0) AS receipt_payment_amount_total, |
| | | (T1.invoice_total - IFNULL(T6.receipt_payment_amount_total ,0)) AS no_receipt_amount |
| | | T1.id , |
| | | T1.invoice_no , |
| | | T1.invoice_total , |
| | | T3.project_name, |
| | | T1.invoice_person , |
| | | T1.invoice_date , |
| | | T1.create_time , |
| | | T1.create_user , |
| | | T1.update_time , |
| | | T1.update_user , |
| | | T1.tenant_id , |
| | | T2.tax_rate, |
| | | T3.sales_contract_no, |
| | | T3.customer_contract_no, |
| | | T3.customer_name, |
| | | T4.invoiceFileName, |
| | | T5.product_category, |
| | | IFNULL(T6.receipt_payment_amount_total ,0) AS receipt_payment_amount_total, |
| | | (T1.invoice_total - IFNULL(T6.receipt_payment_amount_total ,0)) AS no_receipt_amount |
| | | FROM invoice_ledger T1 |
| | | LEFT JOIN invoice_registration_product T2 ON T2.id = T1.invoice_registration_product_id |
| | | LEFT JOIN sales_ledger T3 ON T3.id = T2.sales_ledger_id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | invoice_ledger_id, |
| | | GROUP_CONCAT( name ORDER BY id ASC SEPARATOR ' | ') AS invoiceFileName |
| | | FROM invoice_ledger_file GROUP BY invoice_ledger_id |
| | | LEFT JOIN invoice_registration_product T2 ON T2.id = T1.invoice_registration_product_id |
| | | LEFT JOIN sales_ledger T3 ON T3.id = T2.sales_ledger_id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | invoice_ledger_id, |
| | | GROUP_CONCAT( name ORDER BY id ASC SEPARATOR ' | ') AS invoiceFileName |
| | | FROM invoice_ledger_file GROUP BY invoice_ledger_id |
| | | ) T4 ON T4.invoice_ledger_id = T1.id |
| | | LEFT JOIN sales_ledger_product T5 ON T2.sales_ledger_product_id = T5.id |
| | | LEFT JOIN ( |
| | | SELECT SUM(receipt_payment_amount) AS receipt_payment_amount_total,invoice_ledger_id FROM receipt_payment GROUP |
| | | BY invoice_ledger_id |
| | | LEFT JOIN sales_ledger_product T5 ON T2.sales_ledger_product_id = T5.id |
| | | LEFT JOIN ( |
| | | SELECT SUM(receipt_payment_amount) AS receipt_payment_amount_total,invoice_ledger_id FROM receipt_payment GROUP |
| | | BY invoice_ledger_id |
| | | ) T6 ON T1.id = T6.invoice_ledger_id |
| | | WHERE T1.id IN |
| | | <foreach item="item" collection="ids" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | <where> |
| | | <if test="ids.size() > 0"> |
| | | T1.id IN |
| | | <foreach item="item" collection="ids" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="tenantId != null " > |
| | | AND T1.tenant_id = #{tenantId} |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | </mapper> |