¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | # 设å¤å°è´¦ |
| | | create table `product-inventory-management`.device_repair |
| | | ( |
| | | id bigint auto_increment |
| | | primary key, |
| | | device_ledger_id varchar(255) not null comment '设å¤å°è´¦id', |
| | | repair_time timestamp null comment 'æ¥ä¿®æ¥æ', |
| | | repair_name varchar(255) not null comment 'æ¥ä¿®äºº', |
| | | remark varchar(255) not null comment 'æ
éç°è±¡', |
| | | maintenance_name varchar not null comment '维修人', |
| | | maintenance_time timestamp null comment 'ç»´ä¿®æ¶é´', |
| | | maintenance_result varchar(255) null comment 'ç»´ä¿®ç»æ', |
| | | status int default 0 comment 'ç¶æ', |
| | | create_time datetime null comment 'å½å
¥æ¶é´', |
| | | update_time datetime null comment 'æ´æ°æ¶é´', |
| | | create_user varchar(255) not null comment 'å½å
¥äºº', |
| | | update_user varchar(255) not null comment 'æ´æ°äºº', |
| | | tenant_id bigint not null comment 'ç§æ·id' |
| | | ); |
| | | |
| | | # 设å¤ç»´ä¿® |
| | | create table `product-inventory-management`.device_ledger |
| | | ( |
| | | id bigint auto_increment |
| | | primary key, |
| | | device_name varchar(255) not null comment '设å¤åç§°', |
| | | device_model varchar(255) not null comment 'è§æ ¼åå·', |
| | | supplier_name varchar(255) not null comment 'ä¾åºå', |
| | | unit varchar(255) not null comment 'åä½', |
| | | number decimal not null comment 'æ°é', |
| | | tax_including_price_unit decimal not null comment 'å«ç¨åä»·', |
| | | tax_including_price_total decimal not null comment 'å«ç¨æ»ä»·', |
| | | tax_rate decimal not null comment 'ç¨ç', |
| | | un_tax_including_price_total decimal not null comment 'ä¸å«ç¨æ»ä»·', |
| | | create_time timestamp null comment 'å½å
¥æ¶é´', |
| | | update_time timestamp null comment 'æ´æ°æ¶é´', |
| | | create_user varchar(255) not null comment 'å½å
¥äºº', |
| | | update_user varchar(255) not null comment 'æ´æ°äºº', |
| | | tenant_id bigint not null comment 'ç§æ·id' |
| | | ); |
| | | |
| | | create table `product-inventory-management`.device_maintenance |
| | | ( |
| | | id bigint auto_increment |
| | | primary key, |
| | | device_ledger_id varchar(255) not null comment '设å¤å°è´¦id', |
| | | maintenance__plan_time timestamp null comment '计åä¿å
»æ¥æ', |
| | | maintenance_actually_name varchar(255) not null comment 'å®é
ä¿å
»äºº', |
| | | maintenance_actually_time timestamp null comment 'å®é
ä¿å
»æ¥æ', |
| | | maintenance_result int not null default 0 comment 'ä¿å
»ç»æ 0 ç»´ä¿® 1 å®å¥½', |
| | | status int not null default 0 comment 'ç¶æ 0 å¾
ä¿å
» 1 å®ç»', |
| | | create_time datetime null comment 'å½å
¥æ¶é´', |
| | | update_time datetime null comment 'æ´æ°æ¶é´', |
| | | create_user varchar(255) not null comment 'å½å
¥äºº', |
| | | update_user varchar(255) not null comment 'æ´æ°äºº', |
| | | tenant_id bigint not null comment 'ç§æ·id' |
| | | ); |
| | |
| | | IGNORE_TABLES.add("sys_oper_log"); |
| | | IGNORE_TABLES.add("sys_user_dept"); |
| | | IGNORE_TABLES.add("sys_job_log"); |
| | | IGNORE_TABLES.add("gen_table"); |
| | | IGNORE_TABLES.add("gen_table_column"); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.config; |
| | | |
| | | import org.apache.catalina.connector.Connector; |
| | | import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | // ä¿®æ¹tomcaté
ç½®ï¼å¯¹getä¸[]æ¾è¡ |
| | | @Configuration |
| | | public class TomcatConfig { |
| | | @Bean |
| | | public TomcatServletWebServerFactory webServerFactory() { |
| | | TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(); |
| | | factory.addConnectorCustomizers((Connector connector) -> { |
| | | connector.setProperty("relaxedPathChars", "\"<>[\\]^`{|}"); |
| | | connector.setProperty("relaxedQueryChars", "\"<>[\\]^`{|}"); |
| | | }); |
| | | return factory; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | |
| | | 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; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | |
| | | @Api(tags = "设å¤å°è´¦ç®¡ç") |
| | | @RequestMapping("/device/ledger") |
| | | @RestController |
| | | public class DeviceLedgerController { |
| | | |
| | | @Autowired |
| | | private IDeviceLedgerService deviceLedgerService; |
| | | |
| | | @ApiModelProperty("设å¤å°è´¦å表") |
| | | @GetMapping("/page") |
| | | public AjaxResult page(Page page , DeviceLedgerDto deviceLedger) { |
| | | return AjaxResult.success(deviceLedgerService.queryPage(page,deviceLedger)); |
| | | } |
| | | |
| | | @PostMapping() |
| | | @ApiModelProperty("æ·»å 设å¤å°è´¦") |
| | | public AjaxResult add(@RequestBody DeviceLedger deviceLedger) { |
| | | |
| | | return deviceLedgerService.saveDeviceLedger(deviceLedger); |
| | | } |
| | | |
| | | @ApiModelProperty("æ ¹æ®idæ¥è¯¢è®¾å¤å°è´¦") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult detail(@PathVariable Long id) { |
| | | return AjaxResult.success(deviceLedgerService.getById(id)); |
| | | } |
| | | |
| | | @PutMapping () |
| | | @ApiModelProperty("ä¿®æ¹è®¾å¤å°è´¦") |
| | | public AjaxResult update(@RequestBody DeviceLedger deviceLedger) { |
| | | return deviceLedgerService.updateDeviceLedger(deviceLedger); |
| | | } |
| | | |
| | | @DeleteMapping("/{ids}") |
| | | @ApiModelProperty("å é¤è®¾å¤å°è´¦") |
| | | public AjaxResult delete(@PathVariable("ids") ArrayList<Long> ids) { |
| | | boolean b = deviceLedgerService.removeBatchByIds(ids); |
| | | if (!b) { |
| | | return AjaxResult.error("å é¤å¤±è´¥"); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("export") |
| | | @ApiModelProperty("导åºè®¾å¤å°è´¦") |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | | deviceLedgerService.export(response, ids); |
| | | } |
| | | |
| | | @GetMapping("getDeviceLedger") |
| | | @ApiModelProperty("è·å设å¤å°è´¦") |
| | | public AjaxResult getDeviceLedger( ) { |
| | | return AjaxResult.success(deviceLedgerService.list(new QueryWrapper<DeviceLedger>().lambda() |
| | | .select(DeviceLedger::getId, DeviceLedger::getDeviceName,DeviceLedger::getDeviceModel))); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.dto.DeviceRepairDto; |
| | | import com.ruoyi.device.pojo.DeviceLedger; |
| | | import com.ruoyi.device.pojo.DeviceRepair; |
| | | import com.ruoyi.device.service.IDeviceLedgerService; |
| | | import com.ruoyi.device.service.IDeviceRepairService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | 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; |
| | | import java.util.Arrays; |
| | | |
| | | @Api(tags = "è®¾å¤æ¥ä¿®ç®¡ç") |
| | | @RequestMapping("/device/reppair") |
| | | @RestController |
| | | public class DeviceRepairController { |
| | | |
| | | @Autowired |
| | | private IDeviceRepairService deviceRepairService; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ¥ä¿®å表") |
| | | @GetMapping("/page") |
| | | public AjaxResult page(Page page , DeviceRepairDto deviceRepairDto) { |
| | | return AjaxResult.success(deviceRepairService.queryPage(page,deviceRepairDto)); |
| | | } |
| | | |
| | | @PostMapping() |
| | | @ApiModelProperty("æ·»å è®¾å¤æ¥ä¿®") |
| | | public AjaxResult add( @RequestBody DeviceRepair deviceRepair) { |
| | | return deviceRepairService.saveDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | | @ApiModelProperty("æ ¹æ®idæ¥è¯¢è®¾å¤æ¥ä¿®") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult detail(@PathVariable Long id) { |
| | | return AjaxResult.success(deviceRepairService.getById(id)); |
| | | } |
| | | |
| | | @PutMapping () |
| | | @ApiModelProperty("ä¿®æ¹è®¾å¤æ¥ä¿®") |
| | | public AjaxResult update( @RequestBody DeviceRepair deviceRepair) { |
| | | return deviceRepairService.updateDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | | @DeleteMapping("/{ids}") |
| | | @ApiModelProperty("å é¤è®¾å¤æ¥ä¿®") |
| | | public AjaxResult delete(@PathVariable("ids") Long[] ids) { |
| | | boolean b = deviceRepairService.removeBatchByIds(Arrays.asList(ids)); |
| | | if (!b) { |
| | | return AjaxResult.error("å é¤å¤±è´¥"); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("export") |
| | | @ApiModelProperty("导åºè®¾å¤æ¥ä¿®") |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | | deviceRepairService.export(response, ids); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.dto; |
| | | |
| | | 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.LocalDateTime; |
| | | |
| | | /** |
| | | * 设å¤å°è´¦å®ä½ç±» |
| | | */ |
| | | @Data |
| | | @TableName("device_ledger") |
| | | public class DeviceLedgerDto { |
| | | |
| | | /** |
| | | * 主é®IDï¼èªå¢ |
| | | */ |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 设å¤åç§° |
| | | */ |
| | | private String deviceName; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | private String deviceModel; |
| | | |
| | | /** |
| | | * ä¾åºååç§° |
| | | */ |
| | | private String supplierName; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | private String unit; |
| | | |
| | | /** |
| | | * æ°é |
| | | */ |
| | | private BigDecimal number; |
| | | |
| | | /** |
| | | * å«ç¨åä»· |
| | | */ |
| | | private BigDecimal taxIncludingPriceUnit; |
| | | |
| | | /** |
| | | * å«ç¨æ»ä»· |
| | | */ |
| | | private BigDecimal taxIncludingPriceTotal; |
| | | |
| | | /** |
| | | * ç¨ç |
| | | */ |
| | | private BigDecimal taxRate; |
| | | |
| | | /** |
| | | * ä¸å«ç¨æ»ä»· |
| | | */ |
| | | private BigDecimal unTaxIncludingPriceTotal; |
| | | |
| | | /** |
| | | * å½å
¥æ¶é´ |
| | | */ |
| | | @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; |
| | | |
| | | /** |
| | | * å½å
¥äºº |
| | | */ |
| | | private String createUser; |
| | | |
| | | /** |
| | | * æ´æ°äºº |
| | | */ |
| | | private String updateUser; |
| | | |
| | | /** |
| | | * ç§æ·ID |
| | | */ |
| | | 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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class DeviceRepairDto { |
| | | |
| | | @ApiModelProperty("è®¾å¤æ¥ä¿®id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("设å¤å°è´¦id") |
| | | private String deviceLedgerId; |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("设å¤åå·") |
| | | private String deviceModel; |
| | | |
| | | @ApiModelProperty("æ¥ä¿®æ¶é´") |
| | | private Date repairTime; |
| | | |
| | | @ApiModelProperty("æ¥ä¿®äºº") |
| | | private String repairName; |
| | | |
| | | @ApiModelProperty("æ¥ä¿®å
容") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("维修人") |
| | | private String maintenanceName; |
| | | |
| | | @ApiModelProperty("ç»´ä¿®æ¶é´") |
| | | private Date maintenanceTime; |
| | | |
| | | @ApiModelProperty("ç»´ä¿®ç»æ") |
| | | private String maintenanceResult; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private LocalDateTime 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; |
| | | |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class DeviceLedgerExeclDto { |
| | | |
| | | |
| | | /** |
| | | * 设å¤åç§° |
| | | */ |
| | | @Excel(name = "设å¤åç§°" ,sort = 1) |
| | | private String deviceName; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | @Excel(name = "è§æ ¼åå·" ,sort = 2) |
| | | private String deviceModel; |
| | | |
| | | /** |
| | | * ä¾åºååç§° |
| | | */ |
| | | @Excel(name = "ä¾åºååç§°",sort = 3) |
| | | private String supplierName; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | @Excel(name = "åä½",sort = 4) |
| | | private String unit; |
| | | |
| | | /** |
| | | * æ°é |
| | | */ |
| | | @Excel(name = "æ°é",sort = 5) |
| | | private BigDecimal number; |
| | | |
| | | /** |
| | | * å«ç¨åä»· |
| | | */ |
| | | @Excel(name = "å«ç¨åä»·",sort = 6) |
| | | private BigDecimal taxIncludingPriceUnit; |
| | | |
| | | /** |
| | | * å«ç¨æ»ä»· |
| | | */ |
| | | @Excel(name = "å«ç¨æ»ä»·",sort = 7) |
| | | private BigDecimal taxIncludingPriceTotal; |
| | | |
| | | /** |
| | | * ç¨ç |
| | | */ |
| | | @Excel(name = "ç¨ç",sort = 8) |
| | | private BigDecimal taxRate; |
| | | |
| | | /** |
| | | * ä¸å«ç¨æ»ä»· |
| | | */ |
| | | @Excel(name = "ä¸å«ç¨æ»ä»·",sort = 9) |
| | | private BigDecimal unTaxIncludingPriceTotal; |
| | | |
| | | /** |
| | | * å½å
¥æ¶é´ |
| | | * |
| | | */ |
| | | @Excel(name = "å½å
¥æ¶é´",sort = 10) |
| | | private LocalDateTime createTime; |
| | | |
| | | |
| | | |
| | | /** |
| | | * å½å
¥äºº |
| | | */ |
| | | @Excel(name = "å½å
¥äºº",sort = 9) |
| | | private String createUser; |
| | | |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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<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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.DeviceRepairDto; |
| | | import com.ruoyi.device.pojo.DeviceRepair; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface DeviceRepairMapper extends BaseMapper<DeviceRepair> { |
| | | IPage<DeviceRepairDto> queryPage(Page page, @Param("deviceRepairDto") DeviceRepairDto deviceRepairDto); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | 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; |
| | | |
| | | /** |
| | | * 设å¤å°è´¦å®ä½ç±» |
| | | */ |
| | | @Data |
| | | @TableName("device_ledger") |
| | | public class DeviceLedger { |
| | | |
| | | /** |
| | | * 主é®IDï¼èªå¢ |
| | | */ |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 设å¤åç§° |
| | | */ |
| | | private String deviceName; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | private String deviceModel; |
| | | |
| | | /** |
| | | * ä¾åºååç§° |
| | | */ |
| | | private String supplierName; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | private String unit; |
| | | |
| | | /** |
| | | * æ°é |
| | | */ |
| | | private BigDecimal number; |
| | | |
| | | /** |
| | | * å«ç¨åä»· |
| | | */ |
| | | private BigDecimal taxIncludingPriceUnit; |
| | | |
| | | /** |
| | | * å«ç¨æ»ä»· |
| | | */ |
| | | private BigDecimal taxIncludingPriceTotal; |
| | | |
| | | /** |
| | | * ç¨ç |
| | | */ |
| | | private BigDecimal taxRate; |
| | | |
| | | /** |
| | | * ä¸å«ç¨æ»ä»· |
| | | */ |
| | | private BigDecimal unTaxIncludingPriceTotal; |
| | | |
| | | /** |
| | | * å½å
¥æ¶é´ |
| | | */ |
| | | @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; |
| | | |
| | | /** |
| | | * å½å
¥äºº |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * æ´æ°äºº |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * ç§æ·ID |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.device.pojo; |
| | | |
| | | 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; |
| | | |
| | | @Data |
| | | @TableName("device_repair") |
| | | public class DeviceRepair { |
| | | |
| | | @ApiModelProperty("è®¾å¤æ¥ä¿®id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("设å¤å°è´¦id") |
| | | private String deviceLedgerId; |
| | | |
| | | @ApiModelProperty("æ¥ä¿®æ¶é´") |
| | | private Date repairTime; |
| | | |
| | | @ApiModelProperty("æ¥ä¿®äºº") |
| | | private String repairName; |
| | | |
| | | @ApiModelProperty("æ¥ä¿®å
容") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("维修人") |
| | | private String maintenanceName; |
| | | |
| | | @ApiModelProperty("ç»´ä¿®æ¶é´") |
| | | private Date maintenanceTime; |
| | | |
| | | @ApiModelProperty("ç»´ä¿®ç»æ") |
| | | private String 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("æ´æ°æ¶é´") |
| | | @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 Integer createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ç§æ·id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.DeviceLedgerDto; |
| | | import com.ruoyi.device.pojo.DeviceLedger; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | |
| | | public interface IDeviceLedgerService extends IService<DeviceLedger> { |
| | | IPage<DeviceLedgerDto> queryPage(Page page, DeviceLedgerDto deviceLedger); |
| | | |
| | | AjaxResult saveDeviceLedger(DeviceLedger deviceLedger); |
| | | |
| | | AjaxResult updateDeviceLedger(DeviceLedger deviceLedger); |
| | | |
| | | void export(HttpServletResponse response, Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.DeviceRepairDto; |
| | | import com.ruoyi.device.pojo.DeviceRepair; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | |
| | | public interface IDeviceRepairService extends IService<DeviceRepair> { |
| | | |
| | | IPage<DeviceRepairDto> queryPage(Page page, DeviceRepairDto deviceRepairDto); |
| | | |
| | | AjaxResult saveDeviceRepair(DeviceRepair deviceRepair); |
| | | |
| | | AjaxResult updateDeviceRepair(DeviceRepair deviceRepair); |
| | | |
| | | void export(HttpServletResponse response, Long[] ids); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | @Slf4j |
| | | public class DeviceLedgerServiceImpl extends ServiceImpl<DeviceLedgerMapper, DeviceLedger> implements IDeviceLedgerService { |
| | | |
| | | @Autowired |
| | | private DeviceLedgerMapper deviceLedgerMapper; |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Override |
| | | public IPage<DeviceLedgerDto> queryPage(Page page, DeviceLedgerDto deviceLedger) { |
| | | |
| | | return deviceLedgerMapper.queryPage(page, deviceLedger); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult saveDeviceLedger(DeviceLedger deviceLedger) { |
| | | boolean save = this.save(deviceLedger); |
| | | if (save){ |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult updateDeviceLedger(DeviceLedger deviceLedger) { |
| | | if (this.updateById(deviceLedger)) { |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | | |
| | | 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, "è®¾å¤æ¥ä¿®å¯¼åº"); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.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 com.ruoyi.framework.web.domain.AjaxResult; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | 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 |
| | | @AllArgsConstructor |
| | | @Slf4j |
| | | public class DeviceRepairServiceImpl extends ServiceImpl<DeviceRepairMapper, DeviceRepair> implements IDeviceRepairService { |
| | | |
| | | |
| | | @Autowired |
| | | private DeviceRepairMapper deviceRepairMapper; |
| | | |
| | | @Override |
| | | public IPage<DeviceRepairDto> queryPage(Page page, DeviceRepairDto deviceRepairDto) { |
| | | |
| | | return deviceRepairMapper.queryPage(page, deviceRepairDto); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult saveDeviceRepair(DeviceRepair deviceRepair) { |
| | | boolean save = this.save(deviceRepair); |
| | | if (save){ |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult updateDeviceRepair(DeviceRepair deviceRepair) { |
| | | if (this.updateById(deviceRepair)) { |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @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, "è®¾å¤æ¥ä¿®å¯¼åº"); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package inventory.domain; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName stock_in |
| | | */ |
| | | @Data |
| | | public class StockIn implements Serializable { |
| | | /** |
| | | * å
¥åºè®°å½ID |
| | | */ |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 产åid |
| | | */ |
| | | private Integer productId; |
| | | |
| | | /** |
| | | * å
¥åºæ¶é´ |
| | | */ |
| | | private Date inboundTime; |
| | | |
| | | /** |
| | | * å
¥åºæ¹æ¬¡ï¼å¦âç¬¬ä¸æ¹æ¬¡âï¼ |
| | | */ |
| | | private String inboundBatch; |
| | | |
| | | /** |
| | | * ä¾åºååç§° |
| | | */ |
| | | private String supplierName; |
| | | |
| | | /** |
| | | * å
¥åºæ°é |
| | | */ |
| | | private Integer inboundQuantity; |
| | | |
| | | /** |
| | | * å«ç¨åä»· |
| | | */ |
| | | private BigDecimal taxInclusivePrice; |
| | | |
| | | /** |
| | | * å«ç¨æ»ä»· |
| | | */ |
| | | private BigDecimal taxInclusiveTotal; |
| | | |
| | | /** |
| | | * ç¨ç |
| | | */ |
| | | private BigDecimal taxRate; |
| | | |
| | | /** |
| | | * ä¸å«ç¨æ»ä»· |
| | | */ |
| | | private BigDecimal taxExclusiveTotal; |
| | | |
| | | /** |
| | | * å
¥åºäºº |
| | | */ |
| | | private String inboundPerson; |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package inventory.domain; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName stock_management |
| | | */ |
| | | @Data |
| | | public class StockManagement implements Serializable { |
| | | /** |
| | | * åºåè®°å½ID |
| | | */ |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 产åid |
| | | */ |
| | | private Integer productId; |
| | | |
| | | /** |
| | | * å½ååºåé |
| | | */ |
| | | private Integer stockQuantity; |
| | | |
| | | /** |
| | | * å«ç¨åä»· |
| | | */ |
| | | private BigDecimal taxInclusivePrice; |
| | | |
| | | /** |
| | | * å«ç¨æ»ä»· |
| | | */ |
| | | private BigDecimal taxInclusiveTotal; |
| | | |
| | | /** |
| | | * ç¨ç |
| | | */ |
| | | private BigDecimal taxRate; |
| | | |
| | | /** |
| | | * ä¸å«ç¨æ»ä»· |
| | | */ |
| | | private BigDecimal taxExclusiveTotal; |
| | | |
| | | /** |
| | | * å
¥åºäºº |
| | | */ |
| | | private String inboundPerson; |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package inventory.domain; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName stock_out |
| | | */ |
| | | @Data |
| | | public class StockOut implements Serializable { |
| | | /** |
| | | * åºåºè®°å½ID |
| | | */ |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 产åid |
| | | */ |
| | | private Integer productId; |
| | | |
| | | /** |
| | | * åºåºæ¶é´ |
| | | */ |
| | | private Date inboundTime; |
| | | |
| | | /** |
| | | * åºåºæ¹æ¬¡ï¼å¦âç¬¬ä¸æ¹æ¬¡âï¼ |
| | | */ |
| | | private String inboundBatch; |
| | | |
| | | /** |
| | | * ä¾åºååç§° |
| | | */ |
| | | private String supplierName; |
| | | |
| | | /** |
| | | * å
¥åºæ°é |
| | | */ |
| | | private Integer inboundQuantity; |
| | | |
| | | /** |
| | | * å«ç¨åä»· |
| | | */ |
| | | private BigDecimal taxInclusivePrice; |
| | | |
| | | /** |
| | | * å«ç¨æ»ä»· |
| | | */ |
| | | private BigDecimal taxInclusiveTotal; |
| | | |
| | | /** |
| | | * ç¨ç |
| | | */ |
| | | private BigDecimal taxRate; |
| | | |
| | | /** |
| | | * ä¸å«ç¨æ»ä»· |
| | | */ |
| | | private BigDecimal taxExclusiveTotal; |
| | | |
| | | /** |
| | | * åºåºäºº |
| | | */ |
| | | private String inboundPerson; |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package inventory.domain; |
| | | |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName stock_product |
| | | */ |
| | | @Data |
| | | public class StockProduct implements Serializable { |
| | | /** |
| | | * 产åID |
| | | */ |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 产å大类ï¼å¦â产å1âï¼ |
| | | */ |
| | | private String productCategory; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | private String specModel; |
| | | |
| | | /** |
| | | * åä½ï¼å¦âå¨âï¼ |
| | | */ |
| | | private String unit; |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package inventory.mapper; |
| | | |
| | | import inventory.domain.StockIn; |
| | | |
| | | /** |
| | | * @author 86151 |
| | | * @description é对表ãstock_inãçæ°æ®åºæä½Mapper |
| | | * @createDate 2025-06-23 18:11:59 |
| | | * @Entity inventory.domain.StockIn |
| | | */ |
| | | public interface StockInMapper { |
| | | |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(StockIn record); |
| | | |
| | | int insertSelective(StockIn record); |
| | | |
| | | StockIn selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(StockIn record); |
| | | |
| | | int updateByPrimaryKey(StockIn record); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package inventory.mapper; |
| | | |
| | | import inventory.domain.StockManagement; |
| | | |
| | | /** |
| | | * @author 86151 |
| | | * @description é对表ãstock_managementãçæ°æ®åºæä½Mapper |
| | | * @createDate 2025-06-23 18:11:59 |
| | | * @Entity inventory.domain.StockManagement |
| | | */ |
| | | public interface StockManagementMapper { |
| | | |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(StockManagement record); |
| | | |
| | | int insertSelective(StockManagement record); |
| | | |
| | | StockManagement selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(StockManagement record); |
| | | |
| | | int updateByPrimaryKey(StockManagement record); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package inventory.mapper; |
| | | |
| | | import inventory.domain.StockOut; |
| | | |
| | | /** |
| | | * @author 86151 |
| | | * @description é对表ãstock_outãçæ°æ®åºæä½Mapper |
| | | * @createDate 2025-06-23 18:11:59 |
| | | * @Entity inventory.domain.StockOut |
| | | */ |
| | | public interface StockOutMapper { |
| | | |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(StockOut record); |
| | | |
| | | int insertSelective(StockOut record); |
| | | |
| | | StockOut selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(StockOut record); |
| | | |
| | | int updateByPrimaryKey(StockOut record); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package inventory.mapper; |
| | | |
| | | import inventory.domain.StockProduct; |
| | | |
| | | /** |
| | | * @author 86151 |
| | | * @description é对表ãstock_productãçæ°æ®åºæä½Mapper |
| | | * @createDate 2025-06-23 18:11:59 |
| | | * @Entity inventory.domain.StockProduct |
| | | */ |
| | | public interface StockProductMapper { |
| | | |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(StockProduct record); |
| | | |
| | | int insertSelective(StockProduct record); |
| | | |
| | | StockProduct selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(StockProduct record); |
| | | |
| | | int updateByPrimaryKey(StockProduct record); |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | public interface PurchaseLedgerMapper extends BaseMapper<PurchaseLedger> { |
| | | |
| | | int updateContractAmountById(@Param("id") Long id, @Param("totalTaxInclusiveAmount") BigDecimal totalTaxInclusiveAmount); |
| | | |
| | | IPage<PurchaseLedger> selectPurchaseLedgerListPage(IPage ipage, @Param("c") PurchaseLedger purchaseLedger); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | */ |
| | | private String phoneNumber; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("æ¥ç¥¨éé¢") |
| | | private String receiptPaymentAmount; |
| | | |
| | | @ApiModelProperty("æªæ¥ç¥¨éé¢") |
| | | @TableField(exist = false) |
| | | private String unReceiptPaymentAmount; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @Override |
| | | public IPage<PurchaseLedger> selectPurchaseLedgerListPage(IPage ipage, PurchaseLedger purchaseLedger) { |
| | | LambdaQueryWrapper<PurchaseLedger> queryWrapper = new LambdaQueryWrapper<>(); |
| | | if (StringUtils.isNotBlank(purchaseLedger.getPurchaseContractNumber())) { |
| | | queryWrapper.like(PurchaseLedger::getPurchaseContractNumber, purchaseLedger.getPurchaseContractNumber()); |
| | | } |
| | | return purchaseLedgerMapper.selectPage(ipage, queryWrapper); |
| | | |
| | | return purchaseLedgerMapper.selectPurchaseLedgerListPage(ipage, purchaseLedger); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.ruoyi.sales.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import com.ruoyi.sales.service.ReceiptPaymentService; |
| | | 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.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @RestController |
| | | @RequestMapping("/receiptPayment") |
| | |
| | | return AjaxResult.success(receiptPaymentService.bindInvoiceNoRegPage(page,receiptPaymentDto)); |
| | | } |
| | | |
| | | @ApiModelProperty("导åºå款ç»è®°") |
| | | @PostMapping("/export") |
| | | 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); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¼ç¥¨å°è´¦è¯¦æ
|
| | | * @param id |
| | |
| | | package com.ruoyi.sales.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | public class ReceiptPaymentDto extends ReceiptPayment { |
| | | |
| | | @ApiModelProperty(value = "客æ·ååå·") |
| | | @Excel(name = "客æ·ååå·") |
| | | private String customerContractNo; |
| | | |
| | | @ApiModelProperty(value = "客æ·åç§°") |
| | | @Excel(name = "客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty(value = "æ¥è¯¢ææ¬") |
| | | private String searchText; |
| | | |
| | | @ApiModelProperty(value = "éå®å°è´¦sales_ledger") |
| | | @Excel(isExport = false) |
| | | private Integer salesLedgerId; |
| | | |
| | | @ApiModelProperty(value = "éå®ååå·") |
| | | @Excel(name = "éå®ååå·") |
| | | private String salesContractNo; |
| | | |
| | | @ApiModelProperty(value = "客æ·åç§°ID") |
| | | @Excel(isExport = false) |
| | | private Integer customerId; |
| | | |
| | | @ApiModelProperty(value = "å票å·") |
| | | @Excel(name = "å票å·") |
| | | private String invoiceNo; |
| | | |
| | | @ApiModelProperty(value = "å票éé¢") |
| | | @Excel(name = "å票éé¢") |
| | | private BigDecimal invoiceTotal; |
| | | |
| | | @ApiModelProperty(value = "ç¨ç") |
| | | @ApiModelProperty(value = "ç¨çï¼%ï¼") |
| | | @Excel(name = "ç¨çï¼%ï¼") |
| | | private BigDecimal taxRate; |
| | | |
| | | @ApiModelProperty(value = "产å大类") |
| | | @Excel(name = "产å大类") |
| | | private String productCategory; |
| | | |
| | | @ApiModelProperty(value = "忬¾éé¢") |
| | | @Excel(name = "忬¾éé¢") |
| | | private BigDecimal receiptPaymentAmountTotal; |
| | | |
| | | @ApiModelProperty(value = "å¾
忬¾éé¢") |
| | | @Excel(name = "å¾
忬¾éé¢") |
| | | private BigDecimal noReceiptAmount; |
| | | |
| | | @TableField(exist = false) |
| | | @Excel(isExport = false) |
| | | private Boolean status; |
| | | |
| | | @TableField(exist = false) |
| | | @Excel(isExport = false) |
| | | private String receiptPaymentDateStart; |
| | | @TableField(exist = false) |
| | | @Excel(isExport = false) |
| | | private String receiptPaymentDateEnd; |
| | | |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | @Excel(name = "项ç®åç§°") |
| | | private String projectName; |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.sales.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | public class ReceiptPaymentExeclDto { |
| | | |
| | | @ApiModelProperty(value = "éå®ååå·") |
| | | @Excel(name = "éå®ååå·",sort = 1) |
| | | private String salesContractNo; |
| | | |
| | | @ApiModelProperty(value = "客æ·ååå·") |
| | | @Excel(name = "客æ·ååå·",sort = 2) |
| | | |
| | | private String customerContractNo; |
| | | |
| | | @ApiModelProperty(value = "客æ·åç§°") |
| | | @Excel(name = "客æ·åç§°",sort = 3) |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty(value = "产å大类") |
| | | @Excel(name = "产å大类",sort = 4) |
| | | private String productCategory; |
| | | |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | @Excel(name = "项ç®åç§°",sort = 5) |
| | | private String projectName; |
| | | |
| | | @ApiModelProperty(value = "å票å·") |
| | | @Excel(name = "å票å·",sort = 6) |
| | | private String invoiceNo; |
| | | |
| | | @ApiModelProperty(value = "å票éé¢") |
| | | @Excel(name = "å票éé¢",sort = 7) |
| | | private BigDecimal invoiceTotal; |
| | | |
| | | @ApiModelProperty(value = "ç¨çï¼%ï¼") |
| | | @Excel(name = "ç¨çï¼%ï¼",sort = 8) |
| | | private BigDecimal taxRate; |
| | | |
| | | @ApiModelProperty(value = "忬¾éé¢") |
| | | @Excel(name = "忬¾éé¢",sort = 9) |
| | | private BigDecimal receiptPaymentAmountTotal; |
| | | |
| | | @ApiModelProperty(value = "å¾
忬¾éé¢") |
| | | @Excel(name = "å¾
忬¾éé¢",sort = 10) |
| | | private BigDecimal noReceiptAmount; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.ruoyi.sales.dto.CustomerInteractionDto; |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentExeclDto; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public interface ReceiptPaymentMapper extends BaseMapper<ReceiptPayment> { |
| | |
| | | * @param receiptPaymentDto |
| | | * @return |
| | | */ |
| | | IPage<ReceiptPaymentDto> bindInvoiceNoRegPage(Page page, ReceiptPaymentDto receiptPaymentDto); |
| | | IPage<ReceiptPaymentDto> bindInvoiceNoRegPage(Page page, @Param("c") ReceiptPaymentDto receiptPaymentDto); |
| | | |
| | | /** |
| | | * å¼ç¥¨å°è´¦è¯¦æ
|
| | |
| | | * @return |
| | | */ |
| | | List<ReceiptPayment> receiptPaymentListByProdRegId(Integer invoiceRegistrationProductId); |
| | | |
| | | List<ReceiptPaymentDto> bindInvoiceNoRegListAll(); |
| | | |
| | | List<ReceiptPaymentExeclDto> bindInvoiceNoRegListByIds(List<Long> ids,Long tenantId); |
| | | |
| | | |
| | | } |
| | |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | * æ¥è¯¢å款记å½å页 |
| | | */ |
| | | List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto); |
| | | |
| | | /** |
| | | * å
¨å¯¼åºå款å表 |
| | | */ |
| | | void exportPaymentList(HttpServletResponse response); |
| | | |
| | | /** |
| | | * é¨å导åºå款å表 |
| | | */ |
| | | void exportPaymentList(HttpServletResponse response, List<Long> ids); |
| | | } |
| | |
| | | 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; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentExeclDto; |
| | | import com.ruoyi.sales.mapper.ReceiptPaymentMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.YearMonth; |
| | |
| | | public List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto) { |
| | | return receiptPaymentMapper.receiptPaymentHistoryListNoPage( receiptPaymentDto); |
| | | } |
| | | |
| | | @Override |
| | | public void exportPaymentList(HttpServletResponse response) { |
| | | List<ReceiptPaymentDto> receiptPaymentDtoList = receiptPaymentMapper.bindInvoiceNoRegListAll(); |
| | | ExcelUtil<ReceiptPaymentDto> util = new ExcelUtil<ReceiptPaymentDto>(ReceiptPaymentDto.class); |
| | | util.exportExcel(response, receiptPaymentDtoList, "忬¾ç»è®°"); |
| | | } |
| | | |
| | | @Override |
| | | public void exportPaymentList(HttpServletResponse response, List<Long> ids) { |
| | | 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, "忬¾ç»è®°"); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff_management.controller; |
| | | |
| | | |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff_management.domain.RyglAddEmployee; |
| | | import com.ruoyi.staff_management.service.RyglAddEmployeeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/staff_management") |
| | | public class RyglAddEmployeeController extends BaseController { |
| | | @Autowired |
| | | private RyglAddEmployeeService ryglAddEmployeeService; |
| | | |
| | | /** |
| | | * è·å人åå表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:dept:list')") |
| | | @GetMapping("/list") |
| | | public AjaxResult list() |
| | | { |
| | | List<RyglAddEmployee> allEmployees = ryglAddEmployeeService.getAllEmployees(); |
| | | return success(allEmployees); |
| | | } |
| | | /** |
| | | * æ ¹æ® ID è·ååå·¥ä¿¡æ¯ |
| | | * @param id åå·¥ ID |
| | | * @return åå·¥ä¿¡æ¯ |
| | | */ |
| | | @GetMapping("/{id}") |
| | | public AjaxResult getInfo(@PathVariable Long id) { |
| | | RyglAddEmployee employee = ryglAddEmployeeService.getById(id); |
| | | return success(employee); |
| | | } |
| | | /** |
| | | * æ ¹æ®å§åæ¥è¯¢åå·¥ä¿¡æ¯ |
| | | * @param name åå·¥å§å |
| | | * @return å工信æ¯å表 |
| | | */ |
| | | @GetMapping("/search") |
| | | public AjaxResult searchByName(@RequestParam String name) { |
| | | List<RyglAddEmployee> employees = ryglAddEmployeeService.searchByName(name); |
| | | return success(employees); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å åå·¥ä¿¡æ¯ |
| | | * @param employee åå·¥ä¿¡æ¯ |
| | | * @return æä½ç»æ |
| | | */ |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody RyglAddEmployee employee) { |
| | | boolean result = ryglAddEmployeeService.save(employee); |
| | | return result ? success() : error(); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åå·¥ä¿¡æ¯ |
| | | * @param employee åå·¥ä¿¡æ¯ |
| | | * @return æä½ç»æ |
| | | */ |
| | | @PutMapping |
| | | public AjaxResult update(@RequestBody RyglAddEmployee employee) { |
| | | boolean result = ryglAddEmployeeService.updateById(employee); |
| | | return result ? success() : error(); |
| | | } |
| | | |
| | | /** |
| | | * å é¤åå·¥ä¿¡æ¯ |
| | | * @param id åå·¥ ID |
| | | * @return æä½ç»æ |
| | | */ |
| | | @DeleteMapping("/{id}") |
| | | public AjaxResult delete(@PathVariable Long id) { |
| | | boolean result = ryglAddEmployeeService.removeById(id); |
| | | return result ? success() : error(); |
| | | } |
| | | |
| | | /** |
| | | * 导åºåå·¥ä¿¡æ¯ |
| | | * @return æä½ç»æ (Excel æä»¶) |
| | | */ |
| | | // @GetMapping("/export") |
| | | // public AjaxResult export() { |
| | | // // è°ç¨å¯¼åºæ¹æ³ |
| | | // ryglAddEmployeeService.export(); |
| | | // return success(); |
| | | // } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff_management.domain; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName rygl_add_employee |
| | | */ |
| | | @Data |
| | | public class RyglAddEmployee implements Serializable { |
| | | /** |
| | | * åºå· |
| | | */ |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 1å
¥è2离è |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * åå·¥ç¼å· |
| | | */ |
| | | private String employeeNumber; |
| | | |
| | | /** |
| | | * å§å |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * æ§å« |
| | | */ |
| | | private String sex; |
| | | |
| | | /** |
| | | * ç±è´¯ |
| | | */ |
| | | private String nativePlace; |
| | | |
| | | /** |
| | | * å²ä½ |
| | | */ |
| | | private String post; |
| | | |
| | | /** |
| | | * å®¶åºä½å |
| | | */ |
| | | private String homeAddress; |
| | | |
| | | /** |
| | | * 第ä¸å¦å |
| | | */ |
| | | private String firstDegree; |
| | | |
| | | /** |
| | | * ä¸ä¸ |
| | | */ |
| | | private String major; |
| | | |
| | | /** |
| | | * 身份è¯å· |
| | | */ |
| | | private Integer idNumber; |
| | | |
| | | /** |
| | | * å¹´é¾ |
| | | */ |
| | | private Integer age; |
| | | |
| | | /** |
| | | * èç³»çµè¯ |
| | | */ |
| | | private Integer contactNumber; |
| | | |
| | | /** |
| | | * ç´§æ¥è系人 |
| | | */ |
| | | private String emergencyContact; |
| | | |
| | | /** |
| | | * ç´§æ¥èç³»çµè¯ |
| | | */ |
| | | private Integer emergencyContactNumber; |
| | | |
| | | /** |
| | | * ååå¹´é |
| | | */ |
| | | private String contractTerm; |
| | | |
| | | /** |
| | | * ååå¼å§æ¥æ |
| | | */ |
| | | private Date contractStartDate; |
| | | |
| | | /** |
| | | * ååç»ææ¥æ |
| | | */ |
| | | private Date contractEndDate; |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff_management.mapper; |
| | | |
| | | import com.ruoyi.staff_management.domain.RyglAddEmployee; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author 86151 |
| | | * @description é对表ãrygl_add_employeeãçæ°æ®åºæä½Mapper |
| | | * @createDate 2025-06-23 16:05:34 |
| | | * @Entity staff_management.domain.RyglAddEmployee |
| | | */ |
| | | public interface RyglAddEmployeeMapper { |
| | | //è·åææåå·¥ä¿¡æ¯ |
| | | List<RyglAddEmployee> getAllEmployees(); |
| | | int deleteByPrimaryKey(Long id);//å é¤åå·¥ä¿¡æ¯ |
| | | |
| | | // int insert(RyglAddEmployee record);//æ·»å åå·¥ä¿¡æ¯ |
| | | |
| | | int insertSelective(RyglAddEmployee record);//æ·»å åå·¥ä¿¡æ¯ |
| | | |
| | | RyglAddEmployee selectByPrimaryKey(Long id);//æ ¹æ®idæ¥è¯¢åå·¥ä¿¡æ¯ |
| | | |
| | | int updateByPrimaryKeySelective(RyglAddEmployee record);//ä¿®æ¹åå·¥ä¿¡æ¯ |
| | | |
| | | List<RyglAddEmployee> searchByName(String name); |
| | | |
| | | // int updateByPrimaryKey(RyglAddEmployee record);//ä¿®æ¹åå·¥ä¿¡æ¯ |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff_management.service; |
| | | |
| | | import com.ruoyi.staff_management.domain.RyglAddEmployee; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface RyglAddEmployeeService { |
| | | List<RyglAddEmployee> getAllEmployees(); |
| | | |
| | | RyglAddEmployee getById(Long id); |
| | | |
| | | boolean save(RyglAddEmployee employee); |
| | | |
| | | boolean updateById(RyglAddEmployee employee); |
| | | |
| | | boolean removeById(Long id); |
| | | |
| | | List<RyglAddEmployee> searchByName(String name); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff_management.service.impl; |
| | | |
| | | import com.ruoyi.staff_management.domain.RyglAddEmployee; |
| | | import com.ruoyi.staff_management.mapper.RyglAddEmployeeMapper; |
| | | import com.ruoyi.staff_management.service.RyglAddEmployeeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class RyglAddEmployeeServiceImpl implements RyglAddEmployeeService { |
| | | @Autowired |
| | | private RyglAddEmployeeMapper ryglAddEmployeeMapper; |
| | | @Override |
| | | public List<RyglAddEmployee> getAllEmployees() { |
| | | List<RyglAddEmployee> allEmployees = ryglAddEmployeeMapper.getAllEmployees(); |
| | | return allEmployees; |
| | | } |
| | | |
| | | @Override |
| | | public RyglAddEmployee getById(Long id) { |
| | | RyglAddEmployee ryglAddEmployee = ryglAddEmployeeMapper.selectByPrimaryKey(id); |
| | | return ryglAddEmployee; |
| | | } |
| | | |
| | | @Override |
| | | public boolean save(RyglAddEmployee employee) { |
| | | int i = ryglAddEmployeeMapper.insertSelective(employee); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateById(RyglAddEmployee employee) { |
| | | int i = ryglAddEmployeeMapper.updateByPrimaryKeySelective(employee); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public boolean removeById(Long id) { |
| | | int i = ryglAddEmployeeMapper.deleteByPrimaryKey(id); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public List<RyglAddEmployee> searchByName(String name) { |
| | | List<RyglAddEmployee> ryglAddEmployees = ryglAddEmployeeMapper.searchByName(name); |
| | | return ryglAddEmployees; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | druid:
|
| | | # ä¸»åºæ°æ®æº
|
| | | master:
|
| | | # url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
| | | url: jdbc:mysql://114.132.189.42:9004/product-inventory-management?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
| | | # url: jdbc:mysql://localhost:3306/product-inventory-management?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
| | | url: jdbc:mysql://114.132.189.42:9004/product-inventory-management-copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
| | | username: root
|
| | | password: 123456
|
| | | # ä»åºæ°æ®æº
|
| | |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | password: root2022! |
| | | # password: root2022! |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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="inventory.mapper.StockInMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="inventory.domain.StockIn"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="productId" column="product_id" jdbcType="INTEGER"/> |
| | | <result property="inboundTime" column="inbound_time" jdbcType="TIMESTAMP"/> |
| | | <result property="inboundBatch" column="inbound_batch" jdbcType="VARCHAR"/> |
| | | <result property="supplierName" column="supplier_name" jdbcType="VARCHAR"/> |
| | | <result property="inboundQuantity" column="inbound_quantity" jdbcType="INTEGER"/> |
| | | <result property="taxInclusivePrice" column="tax_inclusive_price" jdbcType="DECIMAL"/> |
| | | <result property="taxInclusiveTotal" column="tax_inclusive_total" jdbcType="DECIMAL"/> |
| | | <result property="taxRate" column="tax_rate" jdbcType="DECIMAL"/> |
| | | <result property="taxExclusiveTotal" column="tax_exclusive_total" jdbcType="DECIMAL"/> |
| | | <result property="inboundPerson" column="inbound_person" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,product_id,inbound_time, |
| | | inbound_batch,supplier_name,inbound_quantity, |
| | | tax_inclusive_price,tax_inclusive_total,tax_rate, |
| | | tax_exclusive_total,inbound_person |
| | | </sql> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from stock_in |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from stock_in |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockIn" useGeneratedKeys="true"> |
| | | insert into stock_in |
| | | ( id,product_id,inbound_time |
| | | ,inbound_batch,supplier_name,inbound_quantity |
| | | ,tax_inclusive_price,tax_inclusive_total,tax_rate |
| | | ,tax_exclusive_total,inbound_person) |
| | | values (#{id,jdbcType=INTEGER},#{productId,jdbcType=INTEGER},#{inboundTime,jdbcType=TIMESTAMP} |
| | | ,#{inboundBatch,jdbcType=VARCHAR},#{supplierName,jdbcType=VARCHAR},#{inboundQuantity,jdbcType=INTEGER} |
| | | ,#{taxInclusivePrice,jdbcType=DECIMAL},#{taxInclusiveTotal,jdbcType=DECIMAL},#{taxRate,jdbcType=DECIMAL} |
| | | ,#{taxExclusiveTotal,jdbcType=DECIMAL},#{inboundPerson,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockIn" useGeneratedKeys="true"> |
| | | insert into stock_in |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="productId != null">product_id,</if> |
| | | <if test="inboundTime != null">inbound_time,</if> |
| | | <if test="inboundBatch != null">inbound_batch,</if> |
| | | <if test="supplierName != null">supplier_name,</if> |
| | | <if test="inboundQuantity != null">inbound_quantity,</if> |
| | | <if test="taxInclusivePrice != null">tax_inclusive_price,</if> |
| | | <if test="taxInclusiveTotal != null">tax_inclusive_total,</if> |
| | | <if test="taxRate != null">tax_rate,</if> |
| | | <if test="taxExclusiveTotal != null">tax_exclusive_total,</if> |
| | | <if test="inboundPerson != null">inbound_person,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=INTEGER},</if> |
| | | <if test="productId != null">#{productId,jdbcType=INTEGER},</if> |
| | | <if test="inboundTime != null">#{inboundTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="inboundBatch != null">#{inboundBatch,jdbcType=VARCHAR},</if> |
| | | <if test="supplierName != null">#{supplierName,jdbcType=VARCHAR},</if> |
| | | <if test="inboundQuantity != null">#{inboundQuantity,jdbcType=INTEGER},</if> |
| | | <if test="taxInclusivePrice != null">#{taxInclusivePrice,jdbcType=DECIMAL},</if> |
| | | <if test="taxInclusiveTotal != null">#{taxInclusiveTotal,jdbcType=DECIMAL},</if> |
| | | <if test="taxRate != null">#{taxRate,jdbcType=DECIMAL},</if> |
| | | <if test="taxExclusiveTotal != null">#{taxExclusiveTotal,jdbcType=DECIMAL},</if> |
| | | <if test="inboundPerson != null">#{inboundPerson,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockIn"> |
| | | update stock_in |
| | | <set> |
| | | <if test="productId != null"> |
| | | product_id = #{productId,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="inboundTime != null"> |
| | | inbound_time = #{inboundTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="inboundBatch != null"> |
| | | inbound_batch = #{inboundBatch,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="supplierName != null"> |
| | | supplier_name = #{supplierName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="inboundQuantity != null"> |
| | | inbound_quantity = #{inboundQuantity,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="taxInclusivePrice != null"> |
| | | tax_inclusive_price = #{taxInclusivePrice,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="taxInclusiveTotal != null"> |
| | | tax_inclusive_total = #{taxInclusiveTotal,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="taxRate != null"> |
| | | tax_rate = #{taxRate,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="taxExclusiveTotal != null"> |
| | | tax_exclusive_total = #{taxExclusiveTotal,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="inboundPerson != null"> |
| | | inbound_person = #{inboundPerson,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="inventory.domain.StockIn"> |
| | | update stock_in |
| | | set |
| | | product_id = #{productId,jdbcType=INTEGER}, |
| | | inbound_time = #{inboundTime,jdbcType=TIMESTAMP}, |
| | | inbound_batch = #{inboundBatch,jdbcType=VARCHAR}, |
| | | supplier_name = #{supplierName,jdbcType=VARCHAR}, |
| | | inbound_quantity = #{inboundQuantity,jdbcType=INTEGER}, |
| | | tax_inclusive_price = #{taxInclusivePrice,jdbcType=DECIMAL}, |
| | | tax_inclusive_total = #{taxInclusiveTotal,jdbcType=DECIMAL}, |
| | | tax_rate = #{taxRate,jdbcType=DECIMAL}, |
| | | tax_exclusive_total = #{taxExclusiveTotal,jdbcType=DECIMAL}, |
| | | inbound_person = #{inboundPerson,jdbcType=VARCHAR} |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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="inventory.mapper.StockManagementMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="inventory.domain.StockManagement"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="productId" column="product_id" jdbcType="INTEGER"/> |
| | | <result property="stockQuantity" column="stock_quantity" jdbcType="INTEGER"/> |
| | | <result property="taxInclusivePrice" column="tax_inclusive_price" jdbcType="DECIMAL"/> |
| | | <result property="taxInclusiveTotal" column="tax_inclusive_total" jdbcType="DECIMAL"/> |
| | | <result property="taxRate" column="tax_rate" jdbcType="DECIMAL"/> |
| | | <result property="taxExclusiveTotal" column="tax_exclusive_total" jdbcType="DECIMAL"/> |
| | | <result property="inboundPerson" column="inbound_person" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,product_id,stock_quantity, |
| | | tax_inclusive_price,tax_inclusive_total,tax_rate, |
| | | tax_exclusive_total,inbound_person |
| | | </sql> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from stock_management |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from stock_management |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockManagement" useGeneratedKeys="true"> |
| | | insert into stock_management |
| | | ( id,product_id,stock_quantity |
| | | ,tax_inclusive_price,tax_inclusive_total,tax_rate |
| | | ,tax_exclusive_total,inbound_person) |
| | | values (#{id,jdbcType=INTEGER},#{productId,jdbcType=INTEGER},#{stockQuantity,jdbcType=INTEGER} |
| | | ,#{taxInclusivePrice,jdbcType=DECIMAL},#{taxInclusiveTotal,jdbcType=DECIMAL},#{taxRate,jdbcType=DECIMAL} |
| | | ,#{taxExclusiveTotal,jdbcType=DECIMAL},#{inboundPerson,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockManagement" useGeneratedKeys="true"> |
| | | insert into stock_management |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="productId != null">product_id,</if> |
| | | <if test="stockQuantity != null">stock_quantity,</if> |
| | | <if test="taxInclusivePrice != null">tax_inclusive_price,</if> |
| | | <if test="taxInclusiveTotal != null">tax_inclusive_total,</if> |
| | | <if test="taxRate != null">tax_rate,</if> |
| | | <if test="taxExclusiveTotal != null">tax_exclusive_total,</if> |
| | | <if test="inboundPerson != null">inbound_person,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=INTEGER},</if> |
| | | <if test="productId != null">#{productId,jdbcType=INTEGER},</if> |
| | | <if test="stockQuantity != null">#{stockQuantity,jdbcType=INTEGER},</if> |
| | | <if test="taxInclusivePrice != null">#{taxInclusivePrice,jdbcType=DECIMAL},</if> |
| | | <if test="taxInclusiveTotal != null">#{taxInclusiveTotal,jdbcType=DECIMAL},</if> |
| | | <if test="taxRate != null">#{taxRate,jdbcType=DECIMAL},</if> |
| | | <if test="taxExclusiveTotal != null">#{taxExclusiveTotal,jdbcType=DECIMAL},</if> |
| | | <if test="inboundPerson != null">#{inboundPerson,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockManagement"> |
| | | update stock_management |
| | | <set> |
| | | <if test="productId != null"> |
| | | product_id = #{productId,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="stockQuantity != null"> |
| | | stock_quantity = #{stockQuantity,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="taxInclusivePrice != null"> |
| | | tax_inclusive_price = #{taxInclusivePrice,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="taxInclusiveTotal != null"> |
| | | tax_inclusive_total = #{taxInclusiveTotal,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="taxRate != null"> |
| | | tax_rate = #{taxRate,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="taxExclusiveTotal != null"> |
| | | tax_exclusive_total = #{taxExclusiveTotal,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="inboundPerson != null"> |
| | | inbound_person = #{inboundPerson,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="inventory.domain.StockManagement"> |
| | | update stock_management |
| | | set |
| | | product_id = #{productId,jdbcType=INTEGER}, |
| | | stock_quantity = #{stockQuantity,jdbcType=INTEGER}, |
| | | tax_inclusive_price = #{taxInclusivePrice,jdbcType=DECIMAL}, |
| | | tax_inclusive_total = #{taxInclusiveTotal,jdbcType=DECIMAL}, |
| | | tax_rate = #{taxRate,jdbcType=DECIMAL}, |
| | | tax_exclusive_total = #{taxExclusiveTotal,jdbcType=DECIMAL}, |
| | | inbound_person = #{inboundPerson,jdbcType=VARCHAR} |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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="inventory.mapper.StockOutMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="inventory.domain.StockOut"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="productId" column="product_id" jdbcType="INTEGER"/> |
| | | <result property="inboundTime" column="inbound_time" jdbcType="TIMESTAMP"/> |
| | | <result property="inboundBatch" column="inbound_batch" jdbcType="VARCHAR"/> |
| | | <result property="supplierName" column="supplier_name" jdbcType="VARCHAR"/> |
| | | <result property="inboundQuantity" column="inbound_quantity" jdbcType="INTEGER"/> |
| | | <result property="taxInclusivePrice" column="tax_inclusive_price" jdbcType="DECIMAL"/> |
| | | <result property="taxInclusiveTotal" column="tax_inclusive_total" jdbcType="DECIMAL"/> |
| | | <result property="taxRate" column="tax_rate" jdbcType="DECIMAL"/> |
| | | <result property="taxExclusiveTotal" column="tax_exclusive_total" jdbcType="DECIMAL"/> |
| | | <result property="inboundPerson" column="inbound_person" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,product_id,inbound_time, |
| | | inbound_batch,supplier_name,inbound_quantity, |
| | | tax_inclusive_price,tax_inclusive_total,tax_rate, |
| | | tax_exclusive_total,inbound_person |
| | | </sql> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from stock_out |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from stock_out |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockOut" useGeneratedKeys="true"> |
| | | insert into stock_out |
| | | ( id,product_id,inbound_time |
| | | ,inbound_batch,supplier_name,inbound_quantity |
| | | ,tax_inclusive_price,tax_inclusive_total,tax_rate |
| | | ,tax_exclusive_total,inbound_person) |
| | | values (#{id,jdbcType=INTEGER},#{productId,jdbcType=INTEGER},#{inboundTime,jdbcType=TIMESTAMP} |
| | | ,#{inboundBatch,jdbcType=VARCHAR},#{supplierName,jdbcType=VARCHAR},#{inboundQuantity,jdbcType=INTEGER} |
| | | ,#{taxInclusivePrice,jdbcType=DECIMAL},#{taxInclusiveTotal,jdbcType=DECIMAL},#{taxRate,jdbcType=DECIMAL} |
| | | ,#{taxExclusiveTotal,jdbcType=DECIMAL},#{inboundPerson,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockOut" useGeneratedKeys="true"> |
| | | insert into stock_out |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="productId != null">product_id,</if> |
| | | <if test="inboundTime != null">inbound_time,</if> |
| | | <if test="inboundBatch != null">inbound_batch,</if> |
| | | <if test="supplierName != null">supplier_name,</if> |
| | | <if test="inboundQuantity != null">inbound_quantity,</if> |
| | | <if test="taxInclusivePrice != null">tax_inclusive_price,</if> |
| | | <if test="taxInclusiveTotal != null">tax_inclusive_total,</if> |
| | | <if test="taxRate != null">tax_rate,</if> |
| | | <if test="taxExclusiveTotal != null">tax_exclusive_total,</if> |
| | | <if test="inboundPerson != null">inbound_person,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=INTEGER},</if> |
| | | <if test="productId != null">#{productId,jdbcType=INTEGER},</if> |
| | | <if test="inboundTime != null">#{inboundTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="inboundBatch != null">#{inboundBatch,jdbcType=VARCHAR},</if> |
| | | <if test="supplierName != null">#{supplierName,jdbcType=VARCHAR},</if> |
| | | <if test="inboundQuantity != null">#{inboundQuantity,jdbcType=INTEGER},</if> |
| | | <if test="taxInclusivePrice != null">#{taxInclusivePrice,jdbcType=DECIMAL},</if> |
| | | <if test="taxInclusiveTotal != null">#{taxInclusiveTotal,jdbcType=DECIMAL},</if> |
| | | <if test="taxRate != null">#{taxRate,jdbcType=DECIMAL},</if> |
| | | <if test="taxExclusiveTotal != null">#{taxExclusiveTotal,jdbcType=DECIMAL},</if> |
| | | <if test="inboundPerson != null">#{inboundPerson,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockOut"> |
| | | update stock_out |
| | | <set> |
| | | <if test="productId != null"> |
| | | product_id = #{productId,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="inboundTime != null"> |
| | | inbound_time = #{inboundTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="inboundBatch != null"> |
| | | inbound_batch = #{inboundBatch,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="supplierName != null"> |
| | | supplier_name = #{supplierName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="inboundQuantity != null"> |
| | | inbound_quantity = #{inboundQuantity,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="taxInclusivePrice != null"> |
| | | tax_inclusive_price = #{taxInclusivePrice,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="taxInclusiveTotal != null"> |
| | | tax_inclusive_total = #{taxInclusiveTotal,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="taxRate != null"> |
| | | tax_rate = #{taxRate,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="taxExclusiveTotal != null"> |
| | | tax_exclusive_total = #{taxExclusiveTotal,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="inboundPerson != null"> |
| | | inbound_person = #{inboundPerson,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="inventory.domain.StockOut"> |
| | | update stock_out |
| | | set |
| | | product_id = #{productId,jdbcType=INTEGER}, |
| | | inbound_time = #{inboundTime,jdbcType=TIMESTAMP}, |
| | | inbound_batch = #{inboundBatch,jdbcType=VARCHAR}, |
| | | supplier_name = #{supplierName,jdbcType=VARCHAR}, |
| | | inbound_quantity = #{inboundQuantity,jdbcType=INTEGER}, |
| | | tax_inclusive_price = #{taxInclusivePrice,jdbcType=DECIMAL}, |
| | | tax_inclusive_total = #{taxInclusiveTotal,jdbcType=DECIMAL}, |
| | | tax_rate = #{taxRate,jdbcType=DECIMAL}, |
| | | tax_exclusive_total = #{taxExclusiveTotal,jdbcType=DECIMAL}, |
| | | inbound_person = #{inboundPerson,jdbcType=VARCHAR} |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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="inventory.mapper.StockProductMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="inventory.domain.StockProduct"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="productCategory" column="product_category" jdbcType="VARCHAR"/> |
| | | <result property="specModel" column="spec_model" jdbcType="VARCHAR"/> |
| | | <result property="unit" column="unit" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,product_category,spec_model, |
| | | unit |
| | | </sql> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from stock_product |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from stock_product |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockProduct" useGeneratedKeys="true"> |
| | | insert into stock_product |
| | | ( id,product_category,spec_model |
| | | ,unit) |
| | | values (#{id,jdbcType=INTEGER},#{productCategory,jdbcType=VARCHAR},#{specModel,jdbcType=VARCHAR} |
| | | ,#{unit,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockProduct" useGeneratedKeys="true"> |
| | | insert into stock_product |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="productCategory != null">product_category,</if> |
| | | <if test="specModel != null">spec_model,</if> |
| | | <if test="unit != null">unit,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=INTEGER},</if> |
| | | <if test="productCategory != null">#{productCategory,jdbcType=VARCHAR},</if> |
| | | <if test="specModel != null">#{specModel,jdbcType=VARCHAR},</if> |
| | | <if test="unit != null">#{unit,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockProduct"> |
| | | update stock_product |
| | | <set> |
| | | <if test="productCategory != null"> |
| | | product_category = #{productCategory,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="specModel != null"> |
| | | spec_model = #{specModel,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="unit != null"> |
| | | unit = #{unit,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="inventory.domain.StockProduct"> |
| | | update stock_product |
| | | set |
| | | product_category = #{productCategory,jdbcType=VARCHAR}, |
| | | spec_model = #{specModel,jdbcType=VARCHAR}, |
| | | unit = #{unit,jdbcType=VARCHAR} |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.DeviceLedgerMapper"> |
| | | |
| | | <select id="queryPage" resultType="com.ruoyi.device.dto.DeviceLedgerDto"> |
| | | SELECT |
| | | 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 != ''"> |
| | | AND device_name LIKE CONCAT('%', #{deviceLedger.deviceName}, '%') |
| | | </if> |
| | | |
| | | <!-- è§æ ¼åå· --> |
| | | <if test="deviceLedger.deviceModel != null and deviceLedger.deviceModel != ''"> |
| | | AND device_model LIKE CONCAT('%', #{deviceLedger.deviceModel}, '%') |
| | | </if> |
| | | |
| | | <!-- ä¾åºååç§° --> |
| | | <if test="deviceLedger.supplierName != null and deviceLedger.supplierName != ''"> |
| | | AND supplier_name LIKE CONCAT('%', #{deviceLedger.supplierName}, '%') |
| | | </if> |
| | | |
| | | <!-- åä½ --> |
| | | <if test="deviceLedger.unit != null and deviceLedger.unit != ''"> |
| | | AND unit = #{deviceLedger.unit} |
| | | </if> |
| | | |
| | | <!-- å½å
¥äºº --> |
| | | <if test="deviceLedger.createUser != null and deviceLedger.createUser != ''"> |
| | | AND create_user LIKE CONCAT('%', #{deviceLedger.createUser}, '%') |
| | | </if> |
| | | |
| | | <!-- æ´æ°äºº --> |
| | | <if test="deviceLedger.updateUser != null and deviceLedger.updateUser != ''"> |
| | | AND update_user LIKE CONCAT('%', #{deviceLedger.updateUser}, '%') |
| | | </if> |
| | | |
| | | <!-- ç§æ·ID --> |
| | | <if test="deviceLedger.tenantId != null"> |
| | | AND tenant_id = #{deviceLedger.tenantId} |
| | | </if> |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | <select id="deviceLedgerExportList" resultType="com.ruoyi.device.execl.DeviceLedgerExeclDto"> |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.DeviceRepairMapper"> |
| | | |
| | | <select id="queryPage" resultType="com.ruoyi.device.dto.DeviceRepairDto"> |
| | | select dr.*, |
| | | dl.device_name, |
| | | dl.device_model |
| | | from device_repair dr |
| | | left join device_ledger dl on dr.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> |
| | |
| | | SET contract_amount = #{totalTaxInclusiveAmount} |
| | | WHERE id = #{id} |
| | | </update> |
| | | <select id="selectPurchaseLedgerListPage" resultType="com.ruoyi.purchase.pojo.PurchaseLedger"> |
| | | select |
| | | pl.id, |
| | | pl.purchase_contract_number , |
| | | pl.sales_contract_no, |
| | | pl.supplier_name, |
| | | pl.project_name, |
| | | pl.contract_amount, |
| | | sum(pr.tickets_amount)as receipt_payment_amount, |
| | | pl.contract_amount-sum(pr.tickets_amount) AS unReceipt_payment_amount, |
| | | pl.entry_date, |
| | | pl.recorder_name |
| | | from purchase_ledger pl |
| | | left join product_record pr on pl.id = pr.purchase_ledger_id |
| | | <where> |
| | | <if test="c.purchaseContractNumber != null and c.purchaseContractNumber != ''"> |
| | | pl.purchase_contract_number like concat('%',#{c.purchaseContractNumber},'%') |
| | | </if> |
| | | </where> |
| | | group by pl.id, pl.purchase_contract_number, pl.sales_contract_no, pl.supplier_name, |
| | | pl.project_name,pl.entry_date, |
| | | pl.recorder_name, |
| | | pl.contract_amount |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | <select id="bindInvoiceNoRegPage" resultType="com.ruoyi.sales.dto.ReceiptPaymentDto"> |
| | | 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 |
| | | ) T6 ON T1.id = T6.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> |
| | | <if test="c.customerName != null and c.customerName !=''"> |
| | | AND T3.customer_name LIKE CONCAT('%',#{c.customerName},'%') |
| | | </if> |
| | | <if test="c.customerContractNo != null and c.customerContractNo !=''"> |
| | | AND T3.customer_contract_no LIKE CONCAT('%',#{c.customerContractNo},'%') |
| | | </if> |
| | | <if test="c.projectName != null and c.projectName !=''"> |
| | | AND T3.project_name LIKE CONCAT('%',#{c.projectName},'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY T2.create_time DESC |
| | | </select> |
| | | |
| | |
| | | T1.receipt_payment_type, |
| | | T1.registrant, |
| | | T1.create_time, |
| | | T4.project_name |
| | | T4.project_name, |
| | | T4.sales_contract_no, |
| | | T4.customer_contract_no |
| | | FROM |
| | | receipt_payment T1 |
| | | LEFT JOIN |
| | |
| | | </if> |
| | | <if test="params.receiptPaymentDateEnd != null and params.receiptPaymentDateEnd != '' "> |
| | | AND T1.receipt_payment_date <= date_format(#{params.receiptPaymentDateEnd}, '%Y-%m-%d') |
| | | </if> |
| | | <if test="params.projectName != null and params.projectName != '' "> |
| | | AND T4.project_name LIKE CONCAT('%',#{params.projectName},'%') |
| | | </if> |
| | | <if test="params.customerContractNo != null and params.customerContractNo != '' "> |
| | | AND T4.customer_contract_no LIKE CONCAT('%',#{params.customerContractNo},'%') |
| | | </if> |
| | | <if test="params.salesContractNo != null and params.salesContractNo != '' "> |
| | | AND T4.sales_contract_no LIKE CONCAT('%',#{params.salesContractNo},'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY T1.receipt_payment_date DESC |
| | |
| | | WHERE |
| | | T2.invoice_registration_product_id = #{invoiceRegistrationProductId} |
| | | </select> |
| | | <select id="bindInvoiceNoRegListAll" resultType="com.ruoyi.sales.dto.ReceiptPaymentDto"> |
| | | 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 |
| | | 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 |
| | | ) 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 |
| | | ) T6 ON T1.id = T6.invoice_ledger_id |
| | | </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 |
| | | 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 |
| | | ) 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 |
| | | ) T6 ON T1.id = T6.invoice_ledger_id |
| | | <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> |
| | |
| | | <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> |
| | | T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.customerContractNo != null and salesLedgerDto.customerContractNo != '' "> |
| | | T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | <if test="salesLedgerDto.customerContractNo != null and salesLedgerDto.customerContractNo !='' "> |
| | | T1.customer_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.salesContractNo != null and salesLedgerDto.salesContractNo != '' "> |
| | | T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.salesContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.projectName != null and salesLedgerDto.projectName != '' "> |
| | | T1.project_name LIKE CONCAT('%',#{salesLedgerDto.projectName},'%') |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.staff_management.mapper.RyglAddEmployeeMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="staff_management.domain.RyglAddEmployee"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="status" column="status" jdbcType="INTEGER"/> |
| | | <result property="employeeNumber" column="employee_number" jdbcType="VARCHAR"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="sex" column="sex" jdbcType="VARCHAR"/> |
| | | <result property="nativePlace" column="native_place" jdbcType="VARCHAR"/> |
| | | <result property="post" column="post" jdbcType="VARCHAR"/> |
| | | <result property="homeAddress" column="home_address" jdbcType="VARCHAR"/> |
| | | <result property="firstDegree" column="first_degree" jdbcType="VARCHAR"/> |
| | | <result property="major" column="major" jdbcType="VARCHAR"/> |
| | | <result property="idNumber" column="id_number" jdbcType="INTEGER"/> |
| | | <result property="age" column="age" jdbcType="INTEGER"/> |
| | | <result property="contactNumber" column="contact_number" jdbcType="INTEGER"/> |
| | | <result property="emergencyContact" column="emergency_contact" jdbcType="VARCHAR"/> |
| | | <result property="emergencyContactNumber" column="emergency_contact_number" jdbcType="INTEGER"/> |
| | | <result property="contractTerm" column="contract_term" jdbcType="VARCHAR"/> |
| | | <result property="contractStartDate" column="contract_start_date" jdbcType="TIMESTAMP"/> |
| | | <result property="contractEndDate" column="contract_end_date" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,status,employee_number, |
| | | name,sex,native_place, |
| | | post,home_address,first_degree, |
| | | major,id_number,age, |
| | | contact_number,emergency_contact,emergency_contact_number, |
| | | contract_term,contract_start_date,contract_end_date |
| | | </sql> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from rygl_add_employee |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </select> |
| | | <select id="getAllEmployees" resultType="com.ruoyi.staff_management.domain.RyglAddEmployee"> |
| | | SELECT * FROM rygl_add_employee |
| | | </select> |
| | | <select id="searchByName" resultType="com.ruoyi.staff_management.domain.RyglAddEmployee"> |
| | | SELECT * FROM rygl_add_employee WHERE name LIKE CONCAT('%', #{name}, '%') |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from rygl_add_employee |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </delete> |
| | | |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="staff_management.domain.RyglAddEmployee" useGeneratedKeys="true"> |
| | | insert into rygl_add_employee |
| | | ( id,status,employee_number |
| | | ,name,sex,native_place |
| | | ,post,home_address,first_degree |
| | | ,major,id_number,age |
| | | ,contact_number,emergency_contact,emergency_contact_number |
| | | ,contract_term,contract_start_date,contract_end_date |
| | | ) |
| | | values (#{id,jdbcType=INTEGER},#{status,jdbcType=INTEGER},#{employeeNumber,jdbcType=VARCHAR} |
| | | ,#{name,jdbcType=VARCHAR},#{sex,jdbcType=VARCHAR},#{nativePlace,jdbcType=VARCHAR} |
| | | ,#{post,jdbcType=VARCHAR},#{homeAddress,jdbcType=VARCHAR},#{firstDegree,jdbcType=VARCHAR} |
| | | ,#{major,jdbcType=VARCHAR},#{idNumber,jdbcType=INTEGER},#{age,jdbcType=INTEGER} |
| | | ,#{contactNumber,jdbcType=INTEGER},#{emergencyContact,jdbcType=VARCHAR},#{emergencyContactNumber,jdbcType=INTEGER} |
| | | ,#{contractTerm,jdbcType=VARCHAR},#{contractStartDate,jdbcType=TIMESTAMP},#{contractEndDate,jdbcType=TIMESTAMP} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="staff_management.domain.RyglAddEmployee" useGeneratedKeys="true"> |
| | | insert into rygl_add_employee |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="employeeNumber != null">employee_number,</if> |
| | | <if test="name != null">name,</if> |
| | | <if test="sex != null">sex,</if> |
| | | <if test="nativePlace != null">native_place,</if> |
| | | <if test="post != null">post,</if> |
| | | <if test="homeAddress != null">home_address,</if> |
| | | <if test="firstDegree != null">first_degree,</if> |
| | | <if test="major != null">major,</if> |
| | | <if test="idNumber != null">id_number,</if> |
| | | <if test="age != null">age,</if> |
| | | <if test="contactNumber != null">contact_number,</if> |
| | | <if test="emergencyContact != null">emergency_contact,</if> |
| | | <if test="emergencyContactNumber != null">emergency_contact_number,</if> |
| | | <if test="contractTerm != null">contract_term,</if> |
| | | <if test="contractStartDate != null">contract_start_date,</if> |
| | | <if test="contractEndDate != null">contract_end_date,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=INTEGER},</if> |
| | | <if test="status != null">#{status,jdbcType=INTEGER},</if> |
| | | <if test="employeeNumber != null">#{employeeNumber,jdbcType=VARCHAR},</if> |
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if> |
| | | <if test="sex != null">#{sex,jdbcType=VARCHAR},</if> |
| | | <if test="nativePlace != null">#{nativePlace,jdbcType=VARCHAR},</if> |
| | | <if test="post != null">#{post,jdbcType=VARCHAR},</if> |
| | | <if test="homeAddress != null">#{homeAddress,jdbcType=VARCHAR},</if> |
| | | <if test="firstDegree != null">#{firstDegree,jdbcType=VARCHAR},</if> |
| | | <if test="major != null">#{major,jdbcType=VARCHAR},</if> |
| | | <if test="idNumber != null">#{idNumber,jdbcType=INTEGER},</if> |
| | | <if test="age != null">#{age,jdbcType=INTEGER},</if> |
| | | <if test="contactNumber != null">#{contactNumber,jdbcType=INTEGER},</if> |
| | | <if test="emergencyContact != null">#{emergencyContact,jdbcType=VARCHAR},</if> |
| | | <if test="emergencyContactNumber != null">#{emergencyContactNumber,jdbcType=INTEGER},</if> |
| | | <if test="contractTerm != null">#{contractTerm,jdbcType=VARCHAR},</if> |
| | | <if test="contractStartDate != null">#{contractStartDate,jdbcType=TIMESTAMP},</if> |
| | | <if test="contractEndDate != null">#{contractEndDate,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="staff_management.domain.RyglAddEmployee"> |
| | | update rygl_add_employee |
| | | <set> |
| | | <if test="status != null"> |
| | | status = #{status,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="employeeNumber != null"> |
| | | employee_number = #{employeeNumber,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="name != null"> |
| | | name = #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="sex != null"> |
| | | sex = #{sex,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="nativePlace != null"> |
| | | native_place = #{nativePlace,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="post != null"> |
| | | post = #{post,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="homeAddress != null"> |
| | | home_address = #{homeAddress,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="firstDegree != null"> |
| | | first_degree = #{firstDegree,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="major != null"> |
| | | major = #{major,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="idNumber != null"> |
| | | id_number = #{idNumber,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="age != null"> |
| | | age = #{age,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="contactNumber != null"> |
| | | contact_number = #{contactNumber,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="emergencyContact != null"> |
| | | emergency_contact = #{emergencyContact,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="emergencyContactNumber != null"> |
| | | emergency_contact_number = #{emergencyContactNumber,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="contractTerm != null"> |
| | | contract_term = #{contractTerm,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="contractStartDate != null"> |
| | | contract_start_date = #{contractStartDate,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="contractEndDate != null"> |
| | | contract_end_date = #{contractEndDate,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="staff_management.domain.RyglAddEmployee"> |
| | | update rygl_add_employee |
| | | set |
| | | status = #{status,jdbcType=INTEGER}, |
| | | employee_number = #{employeeNumber,jdbcType=VARCHAR}, |
| | | name = #{name,jdbcType=VARCHAR}, |
| | | sex = #{sex,jdbcType=VARCHAR}, |
| | | native_place = #{nativePlace,jdbcType=VARCHAR}, |
| | | post = #{post,jdbcType=VARCHAR}, |
| | | home_address = #{homeAddress,jdbcType=VARCHAR}, |
| | | first_degree = #{firstDegree,jdbcType=VARCHAR}, |
| | | major = #{major,jdbcType=VARCHAR}, |
| | | id_number = #{idNumber,jdbcType=INTEGER}, |
| | | age = #{age,jdbcType=INTEGER}, |
| | | contact_number = #{contactNumber,jdbcType=INTEGER}, |
| | | emergency_contact = #{emergencyContact,jdbcType=VARCHAR}, |
| | | emergency_contact_number = #{emergencyContactNumber,jdbcType=INTEGER}, |
| | | contract_term = #{contractTerm,jdbcType=VARCHAR}, |
| | | contract_start_date = #{contractStartDate,jdbcType=TIMESTAMP}, |
| | | contract_end_date = #{contractEndDate,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | </mapper> |