diff --git a/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgIrrigationControllersController.java b/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgIrrigationControllersController.java new file mode 100644 index 0000000..c486b70 --- /dev/null +++ b/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgIrrigationControllersController.java @@ -0,0 +1,110 @@ +package com.fastbee.data.controller.userRecharge; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.fastbee.common.annotation.Log; +import com.fastbee.common.core.controller.BaseController; +import com.fastbee.common.core.domain.AjaxResult; +import com.fastbee.common.enums.BusinessType; +import com.fastbee.rechargecard.domain.NgIrrigationControllers; +import com.fastbee.rechargecard.service.INgIrrigationControllersService; +import com.fastbee.common.utils.poi.ExcelUtil; +import com.fastbee.common.core.page.TableDataInfo; + +/** + * 灌溉控制器信息Controller + * + * @author kerwincui + * @date 2024-12-19 + */ +@RestController +@RequestMapping("/rechargecard/controllers") +@Api(tags = "灌溉控制器信息") +public class NgIrrigationControllersController extends BaseController +{ + @Autowired + private INgIrrigationControllersService ngIrrigationControllersService; + + /** + * 查询灌溉控制器信息列表 + */ + @PreAuthorize("@ss.hasPermi('rechargecard:controllers:list')") + @GetMapping("/list") + @ApiOperation("查询灌溉控制器信息列表") + public TableDataInfo list(NgIrrigationControllers ngIrrigationControllers) + { + startPage(); + List list = ngIrrigationControllersService.selectNgIrrigationControllersList(ngIrrigationControllers); + return getDataTable(list); + } + + /** + * 导出灌溉控制器信息列表 + */ + @ApiOperation("导出灌溉控制器信息列表") + @PreAuthorize("@ss.hasPermi('rechargecard:controllers:export')") + @PostMapping("/export") + public void export(HttpServletResponse response, NgIrrigationControllers ngIrrigationControllers) + { + List list = ngIrrigationControllersService.selectNgIrrigationControllersList(ngIrrigationControllers); + ExcelUtil util = new ExcelUtil(NgIrrigationControllers.class); + util.exportExcel(response, list, "灌溉控制器信息数据"); + } + + /** + * 获取灌溉控制器信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('rechargecard:controllers:query')") + @GetMapping(value = "/{id}") + @ApiOperation("获取灌溉控制器信息详细信息") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(ngIrrigationControllersService.selectNgIrrigationControllersById(id)); + } + + /** + * 新增灌溉控制器信息 + */ + @PreAuthorize("@ss.hasPermi('rechargecard:controllers:add')") + @PostMapping + @ApiOperation("新增灌溉控制器信息") + public AjaxResult add(@RequestBody NgIrrigationControllers ngIrrigationControllers) + { + return toAjax(ngIrrigationControllersService.insertNgIrrigationControllers(ngIrrigationControllers)); + } + + /** + * 修改灌溉控制器信息 + */ + @PreAuthorize("@ss.hasPermi('rechargecard:controllers:edit')") + @PutMapping + @ApiOperation("修改灌溉控制器信息") + public AjaxResult edit(@RequestBody NgIrrigationControllers ngIrrigationControllers) + { + return toAjax(ngIrrigationControllersService.updateNgIrrigationControllers(ngIrrigationControllers)); + } + + /** + * 删除灌溉控制器信息 + */ + @PreAuthorize("@ss.hasPermi('rechargecard:controllers:remove')") + @DeleteMapping("/{ids}") + @ApiOperation("删除灌溉控制器信息") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(ngIrrigationControllersService.deleteNgIrrigationControllersByIds(ids)); + } +} diff --git a/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/UserIrrigationRecordController.java b/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/UserIrrigationRecordController.java index 2581259..59ef354 100644 --- a/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/UserIrrigationRecordController.java +++ b/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/UserIrrigationRecordController.java @@ -3,6 +3,7 @@ package com.fastbee.data.controller.userRecharge; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.fastbee.rechargecard.domain.dto.UserIrrigationRecordDto; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -65,12 +66,28 @@ public class UserIrrigationRecordController extends BaseController /** * 获取用户灌溉记录展示详细信息列表 */ - /*@PreAuthorize("@ss.hasPermi('rechargecard:record:query')") - @GetMapping(value = "/list/show/{cardNumber}") - @ApiOperation("获取灌溉记录详细信息") - public AjaxResult getShowInfo(@PathVariable("cardNumber") String cardNumber) + @PreAuthorize("@ss.hasPermi('rechargecard:record:list')") + @GetMapping("/list/show") + @ApiOperation("查询灌溉记录列表") + public TableDataInfo Showlist(UserIrrigationRecord userIrrigationRecord) { - return success(userIrrigationRecordService.selectUserIrrigationRecordListShowBycardNumber(cardNumber)); + startPage(); + List list = userIrrigationRecordService.selectUserIrrigationRecordShowList(userIrrigationRecord); + return getDataTable(list); + } + /** + * 获取用户灌溉记录展示详细信息列表 + */ + /*@PreAuthorize("@ss.hasPermi('rechargecard:record:list')") + @GetMapping("/list/show/{cardNumber}") + @ApiOperation("查询灌溉记录列表") + public TableDataInfo ShowlistByCardNumber(@PathVariable("cardNumber") String cardNumber) + { + startPage(); + UserIrrigationRecord userIrrigationRecord=new UserIrrigationRecord(); + userIrrigationRecord.setCardNumber(cardNumber); + List list = userIrrigationRecordService.selectUserIrrigationRecordShowList(userIrrigationRecord); + return getDataTable(list); }*/ /** diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgIrrigationControllers.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgIrrigationControllers.java new file mode 100644 index 0000000..58fa9f6 --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgIrrigationControllers.java @@ -0,0 +1,67 @@ +package com.fastbee.rechargecard.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.fastbee.common.annotation.Excel; +import com.fastbee.common.core.domain.BaseEntity; + +/** + * 灌溉控制器信息对象 ng_irrigation_controllers + * + * @author kerwincui + * @date 2024-12-19 + */ +@ApiModel(value = "NgIrrigationControllers",description = "灌溉控制器信息 ng_irrigation_controllers") +@Data +@EqualsAndHashCode(callSuper = true) +public class NgIrrigationControllers extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 控制器编码 */ + @Excel(name = "控制器编码") + @ApiModelProperty("控制器编码") + private String serialNumber; + + /** 控制器名称 */ + @Excel(name = "控制器名称") + @ApiModelProperty("控制器名称") + private String controllerName; + + /** 控制器型号 */ + @Excel(name = "控制器型号") + @ApiModelProperty("控制器型号") + private String controllerModel; + + /** 安装日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "安装日期", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty("安装日期") + private Date installationDate; + + /** 控制器状态,0=开启,1=关闭,2=维护中 */ + @Excel(name = "控制器状态,0=开启,1=关闭,2=维护中") + @ApiModelProperty("控制器状态,0=开启,1=关闭,2=维护中") + private Integer status; + + /** 上次维护日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "上次维护日期", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty("上次维护日期") + private Date lastMaintenance; + + /** 区域码 */ + @Excel(name = "区域码") + @ApiModelProperty("区域码") + private String areaCode; + +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgRechargeMachines.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgRechargeMachines.java index c3edb47..d2b4a6a 100644 --- a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgRechargeMachines.java +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgRechargeMachines.java @@ -68,9 +68,9 @@ public class NgRechargeMachines extends BaseEntity @ApiModelProperty("联系电话") private String contactPhone; - /** 备注 */ - @Excel(name = "备注") - @ApiModelProperty("备注") - private String remark; + /** 充值机名称 */ + @Excel(name = "充值机名称") + @ApiModelProperty("充值机名称") + private String deviceName; } diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgUserRechargeRecords.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgUserRechargeRecords.java index 8cd924b..0e4ef61 100644 --- a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgUserRechargeRecords.java +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgUserRechargeRecords.java @@ -79,14 +79,9 @@ public class NgUserRechargeRecords extends BaseEntity @ApiModelProperty("充值状态,0=成功,1=失败") private Integer status; - /** 充值机id */ - @Excel(name = "充值机id") - @ApiModelProperty("充值机id") - private Long deviceId; - - /** 备注 */ - @Excel(name = "备注") - @ApiModelProperty("备注") - private String remark; + /** 充值机编码 */ + @Excel(name = "充值机编码") + @ApiModelProperty("充值机编码") + private String serialNumber; } diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/UserConsumptionDetails.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/UserConsumptionDetails.java index 0077f48..d28fd0e 100644 --- a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/UserConsumptionDetails.java +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/UserConsumptionDetails.java @@ -99,19 +99,19 @@ public class UserConsumptionDetails extends BaseEntity private BigDecimal billingPeriodDuration; /** 账单生成的日期 */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS") @Excel(name = "账单生成的日期", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty("账单生成的日期") private Date billingDate; /** 开泵时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS") @Excel(name = "开泵时间", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty("开泵时间") private Date startTime; /** 关泵时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS") @Excel(name = "关泵时间", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty("关泵时间") private Date endTime; @@ -127,7 +127,7 @@ public class UserConsumptionDetails extends BaseEntity private Integer paymentMethod; /** 账单支付的时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS") @Excel(name = " 账单支付的时间", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty(" 账单支付的时间") private Date paymentTime; diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/UserIrrigationRecord.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/UserIrrigationRecord.java index 8138c34..96cd945 100644 --- a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/UserIrrigationRecord.java +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/UserIrrigationRecord.java @@ -74,13 +74,13 @@ public class UserIrrigationRecord extends BaseEntity private BigDecimal balance; /** 开泵时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS") @Excel(name = "开泵时间", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty("开泵时间") private Date startTime; /** 关泵时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS") @Excel(name = "关泵时间", width = 30, dateFormat = "yyyy-MM-dd") @ApiModelProperty("关泵时间") private Date endTime; diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/dto/UserIrrigationRecordDto.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/dto/UserIrrigationRecordDto.java index b57b06e..53a2d29 100644 --- a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/dto/UserIrrigationRecordDto.java +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/dto/UserIrrigationRecordDto.java @@ -2,6 +2,7 @@ package com.fastbee.rechargecard.domain.dto; import cn.hutool.core.date.DateTime; import com.fastbee.rechargecard.domain.UserIrrigationRecord; +import com.fasterxml.jackson.annotation.JsonFormat; import java.math.BigDecimal; import java.util.Date; @@ -13,6 +14,8 @@ public class UserIrrigationRecordDto public String deviceName; public String cardNumber; public BigDecimal flow; + @JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS") public Date startTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS") public Date endTime; } diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgIrrigationControllersMapper.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgIrrigationControllersMapper.java new file mode 100644 index 0000000..19d8840 --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgIrrigationControllersMapper.java @@ -0,0 +1,63 @@ +package com.fastbee.rechargecard.mapper; + +import java.util.List; +import com.fastbee.rechargecard.domain.NgIrrigationControllers; +import org.apache.ibatis.annotations.Mapper; + +/** + * 灌溉控制器信息Mapper接口 + * + * @author kerwincui + * @date 2024-12-19 + */ +@Mapper +public interface NgIrrigationControllersMapper +{ + /** + * 查询灌溉控制器信息 + * + * @param id 灌溉控制器信息主键 + * @return 灌溉控制器信息 + */ + public NgIrrigationControllers selectNgIrrigationControllersById(Long id); + + /** + * 查询灌溉控制器信息列表 + * + * @param ngIrrigationControllers 灌溉控制器信息 + * @return 灌溉控制器信息集合 + */ + public List selectNgIrrigationControllersList(NgIrrigationControllers ngIrrigationControllers); + + /** + * 新增灌溉控制器信息 + * + * @param ngIrrigationControllers 灌溉控制器信息 + * @return 结果 + */ + public int insertNgIrrigationControllers(NgIrrigationControllers ngIrrigationControllers); + + /** + * 修改灌溉控制器信息 + * + * @param ngIrrigationControllers 灌溉控制器信息 + * @return 结果 + */ + public int updateNgIrrigationControllers(NgIrrigationControllers ngIrrigationControllers); + + /** + * 删除灌溉控制器信息 + * + * @param id 灌溉控制器信息主键 + * @return 结果 + */ + public int deleteNgIrrigationControllersById(Long id); + + /** + * 批量删除灌溉控制器信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteNgIrrigationControllersByIds(Long[] ids); +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgIrrigationControllersService.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgIrrigationControllersService.java new file mode 100644 index 0000000..fe5f9f2 --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgIrrigationControllersService.java @@ -0,0 +1,61 @@ +package com.fastbee.rechargecard.service; + +import java.util.List; +import com.fastbee.rechargecard.domain.NgIrrigationControllers; + +/** + * 灌溉控制器信息Service接口 + * + * @author kerwincui + * @date 2024-12-19 + */ +public interface INgIrrigationControllersService +{ + /** + * 查询灌溉控制器信息 + * + * @param id 灌溉控制器信息主键 + * @return 灌溉控制器信息 + */ + public NgIrrigationControllers selectNgIrrigationControllersById(Long id); + + /** + * 查询灌溉控制器信息列表 + * + * @param ngIrrigationControllers 灌溉控制器信息 + * @return 灌溉控制器信息集合 + */ + public List selectNgIrrigationControllersList(NgIrrigationControllers ngIrrigationControllers); + + /** + * 新增灌溉控制器信息 + * + * @param ngIrrigationControllers 灌溉控制器信息 + * @return 结果 + */ + public int insertNgIrrigationControllers(NgIrrigationControllers ngIrrigationControllers); + + /** + * 修改灌溉控制器信息 + * + * @param ngIrrigationControllers 灌溉控制器信息 + * @return 结果 + */ + public int updateNgIrrigationControllers(NgIrrigationControllers ngIrrigationControllers); + + /** + * 批量删除灌溉控制器信息 + * + * @param ids 需要删除的灌溉控制器信息主键集合 + * @return 结果 + */ + public int deleteNgIrrigationControllersByIds(Long[] ids); + + /** + * 删除灌溉控制器信息信息 + * + * @param id 灌溉控制器信息主键 + * @return 结果 + */ + public int deleteNgIrrigationControllersById(Long id); +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/IUserIrrigationRecordService.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/IUserIrrigationRecordService.java index 76705d4..5c828a6 100644 --- a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/IUserIrrigationRecordService.java +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/IUserIrrigationRecordService.java @@ -20,6 +20,14 @@ public interface IUserIrrigationRecordService */ //public List selectUserIrrigationRecordListShowBycardNumber(String cardNumber); + /** + * 查询展示灌溉记录列表 + * + * @param userIrrigationRecord 灌溉记录 + * @return 灌溉记录集合 + */ + public List selectUserIrrigationRecordShowList(UserIrrigationRecord userIrrigationRecord); + /** * 查询用户灌溉记录列表 * diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/NgIrrigationControllersServiceImpl.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/NgIrrigationControllersServiceImpl.java new file mode 100644 index 0000000..bcec343 --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/NgIrrigationControllersServiceImpl.java @@ -0,0 +1,96 @@ +package com.fastbee.rechargecard.service.impl; + +import java.util.List; +import com.fastbee.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.fastbee.rechargecard.mapper.NgIrrigationControllersMapper; +import com.fastbee.rechargecard.domain.NgIrrigationControllers; +import com.fastbee.rechargecard.service.INgIrrigationControllersService; + +/** + * 灌溉控制器信息Service业务层处理 + * + * @author kerwincui + * @date 2024-12-19 + */ +@Service +public class NgIrrigationControllersServiceImpl implements INgIrrigationControllersService +{ + @Autowired + private NgIrrigationControllersMapper ngIrrigationControllersMapper; + + /** + * 查询灌溉控制器信息 + * + * @param id 灌溉控制器信息主键 + * @return 灌溉控制器信息 + */ + @Override + public NgIrrigationControllers selectNgIrrigationControllersById(Long id) + { + return ngIrrigationControllersMapper.selectNgIrrigationControllersById(id); + } + + /** + * 查询灌溉控制器信息列表 + * + * @param ngIrrigationControllers 灌溉控制器信息 + * @return 灌溉控制器信息 + */ + @Override + public List selectNgIrrigationControllersList(NgIrrigationControllers ngIrrigationControllers) + { + return ngIrrigationControllersMapper.selectNgIrrigationControllersList(ngIrrigationControllers); + } + + /** + * 新增灌溉控制器信息 + * + * @param ngIrrigationControllers 灌溉控制器信息 + * @return 结果 + */ + @Override + public int insertNgIrrigationControllers(NgIrrigationControllers ngIrrigationControllers) + { + ngIrrigationControllers.setCreateTime(DateUtils.getNowDate()); + return ngIrrigationControllersMapper.insertNgIrrigationControllers(ngIrrigationControllers); + } + + /** + * 修改灌溉控制器信息 + * + * @param ngIrrigationControllers 灌溉控制器信息 + * @return 结果 + */ + @Override + public int updateNgIrrigationControllers(NgIrrigationControllers ngIrrigationControllers) + { + ngIrrigationControllers.setUpdateTime(DateUtils.getNowDate()); + return ngIrrigationControllersMapper.updateNgIrrigationControllers(ngIrrigationControllers); + } + + /** + * 批量删除灌溉控制器信息 + * + * @param ids 需要删除的灌溉控制器信息主键 + * @return 结果 + */ + @Override + public int deleteNgIrrigationControllersByIds(Long[] ids) + { + return ngIrrigationControllersMapper.deleteNgIrrigationControllersByIds(ids); + } + + /** + * 删除灌溉控制器信息信息 + * + * @param id 灌溉控制器信息主键 + * @return 结果 + */ + @Override + public int deleteNgIrrigationControllersById(Long id) + { + return ngIrrigationControllersMapper.deleteNgIrrigationControllersById(id); + } +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/UserIrrigationRecordServiceImpl.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/UserIrrigationRecordServiceImpl.java index 862ffd4..9c33b7d 100644 --- a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/UserIrrigationRecordServiceImpl.java +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/UserIrrigationRecordServiceImpl.java @@ -1,5 +1,6 @@ package com.fastbee.rechargecard.service.impl; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.fastbee.common.utils.DateUtils; @@ -28,6 +29,26 @@ public class UserIrrigationRecordServiceImpl implements IUserIrrigationRecordSer @Autowired private DeviceMapper deviceMapper; + @Override + public List selectUserIrrigationRecordShowList(UserIrrigationRecord userIrrigationRecord) { + List result=new ArrayList<>(); + List list=userIrrigationRecordMapper.selectUserIrrigationRecordList(userIrrigationRecord); + for(int i=0;i + + + + + + + + + + + + + + + + + + + + + select id, serial_number, controller_name, controller_model, installation_date, status, last_maintenance, area_code, remark, create_time, update_time, create_by, update_by from ng_irrigation_controllers + + + + + + + + insert into ng_irrigation_controllers + + serial_number, + controller_name, + controller_model, + installation_date, + status, + last_maintenance, + area_code, + remark, + create_time, + update_time, + create_by, + update_by, + + + #{serialNumber}, + #{controllerName}, + #{controllerModel}, + #{installationDate}, + #{status}, + #{lastMaintenance}, + #{areaCode}, + #{remark}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + + + + + update ng_irrigation_controllers + + serial_number = #{serialNumber}, + controller_name = #{controllerName}, + controller_model = #{controllerModel}, + installation_date = #{installationDate}, + status = #{status}, + last_maintenance = #{lastMaintenance}, + area_code = #{areaCode}, + remark = #{remark}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from ng_irrigation_controllers where id = #{id} + + + + delete from ng_irrigation_controllers where id in + + #{id} + + + \ No newline at end of file diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgRechargeMachinesMapper.xml b/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgRechargeMachinesMapper.xml index 6a79058..d7d1659 100644 --- a/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgRechargeMachinesMapper.xml +++ b/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgRechargeMachinesMapper.xml @@ -19,10 +19,11 @@ + - select id, location, device_model, serial_number, area_code, installation_date, status, contact_person, contact_phone, remark, create_time, update_time, create_by, update_by from ng_recharge_machines + select id, location, device_model, serial_number, area_code, installation_date, status, contact_person, contact_phone, remark, create_time, update_time, create_by, update_by, device_name from ng_recharge_machines @@ -60,6 +62,7 @@ update_time, create_by, update_by, + device_name, #{location}, @@ -75,6 +78,7 @@ #{updateTime}, #{createBy}, #{updateBy}, + #{deviceName}, @@ -94,6 +98,7 @@ update_time = #{updateTime}, create_by = #{createBy}, update_by = #{updateBy}, + device_name = #{deviceName}, where id = #{id} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgUserRechargeRecordsMapper.xml b/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgUserRechargeRecordsMapper.xml index b145330..8dda524 100644 --- a/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgUserRechargeRecordsMapper.xml +++ b/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgUserRechargeRecordsMapper.xml @@ -16,7 +16,7 @@ - + @@ -25,7 +25,7 @@ - select id, user_id, user_name, card_number, area_code, type, amount, balance, recharge_time, recharge_code, status, device_id, remark, create_time, update_time, create_by, update_by from ng_user_recharge_records + select id, user_id, user_name, card_number, area_code, type, amount, balance, recharge_time, recharge_code, status, serial_number, remark, create_time, update_time, create_by, update_by from ng_user_recharge_records @@ -63,7 +63,7 @@ recharge_time, recharge_code, status, - device_id, + serial_number, remark, create_time, update_time, @@ -81,7 +81,7 @@ #{rechargeTime}, #{rechargeCode}, #{status}, - #{deviceId}, + #{serialNumber}, #{remark}, #{createTime}, #{updateTime}, @@ -103,7 +103,7 @@ recharge_time = #{rechargeTime}, recharge_code = #{rechargeCode}, status = #{status}, - device_id = #{deviceId}, + serial_number = #{serialNumber}, remark = #{remark}, create_time = #{createTime}, update_time = #{updateTime},