Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
| | |
| | | job_data.remove("success"); |
| | | job_data.put("intakeId", intakeId); |
| | | job_data.put("rtuAddr", rtuAddr); |
| | | job_data.put("vcNum", job_param.getString("icCardNo")); |
| | | job_data.put("orderNo", job_param.getString("orderNo")); |
| | | |
| | | if(job_param != null) { |
| | | job_data.put("vcNum", job_param.getString("icCardNo")); |
| | | job_data.put("orderNo", job_param.getString("orderNo")); |
| | | } |
| | | response_CallBack = JSON.parseObject(job_response.toJSONString(), BaseResponse.class); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaUser; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import com.dy.pipIrrGlobal.voBa.VoSimpleUser; |
| | | import com.dy.pipIrrGlobal.voBa.VoUserInfo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | * @return |
| | | */ |
| | | List<String> getPhones(); |
| | | |
| | | /** |
| | | * 获取简单用户数据列表,数据列表查询条件中使用 |
| | | * @return |
| | | */ |
| | | List<VoSimpleUser> getSimpleUsers(); |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoOp; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeInspect; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:07 |
| | | * @LastEditTime 2024-09-24 10:07 |
| | | * @Description |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface OpeInspectMapper extends BaseMapper<OpeInspect> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(OpeInspect record); |
| | | |
| | | int insertSelective(OpeInspect record); |
| | | |
| | | OpeInspect selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(OpeInspect record); |
| | | |
| | | int updateByPrimaryKey(OpeInspect record); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoOp; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeTrack; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:08 |
| | | * @LastEditTime 2024-09-24 10:08 |
| | | * @Description |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface OpeTrackMapper extends BaseMapper<OpeTrack> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(OpeTrack record); |
| | | |
| | | int insertSelective(OpeTrack record); |
| | | |
| | | OpeTrack selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(OpeTrack record); |
| | | |
| | | int updateByPrimaryKey(OpeTrack record); |
| | | |
| | | /** |
| | | * 批量添加巡检轨迹 |
| | | * @param list |
| | | * @return |
| | | */ |
| | | int insertTracks(List<OpeTrack> list); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory; |
| | | import com.dy.pipIrrGlobal.voRm.VoExpend; |
| | | import com.dy.pipIrrGlobal.voRm.VoOpenCloseValve; |
| | | import com.dy.pipIrrGlobal.voSt.VoClient; |
| | | import com.dy.pipIrrGlobal.voSt.VoIntake; |
| | |
| | | * @return |
| | | */ |
| | | List<VoIntake> getNoOpenHaveCloseIntakes(Map<String, Object> params); |
| | | |
| | | /** |
| | | * 获取水卡消费记录数量,管理平台使用 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | Long getExpendsCount(Map<String, Object> params); |
| | | |
| | | /** |
| | | * 获取水卡消费记录,管理平台使用 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | List<VoExpend> getExpends(Map<String, Object> params); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeCardOperate; |
| | | import com.dy.pipIrrGlobal.voSe.*; |
| | | import com.dy.pipIrrGlobal.voSt.VoClient; |
| | | import com.dy.pipIrrGlobal.voSt.VoClientOpenCardCount; |
| | | import com.dy.pipIrrGlobal.voSt.VoClientRechargeTotal; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | */ |
| | | List<VoRecharge> getRecharges(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 获取充值记录数量,管理平台充值列表使用,APP未使用 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | Long getRechargesCountNew(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 获取充值记录,管理平台充值列表使用,APP未使用 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | List<VoRechargeNew> getRechargesNew(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 获取返还记录数量,管理平台充值列表使用 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | Long getRefundsCount(Map<?, ?> params); |
| | | /** |
| | | * 获取返还记录,管理平台充值列表使用 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | List<VoRefund> getRefunds(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 根据指定条件获取交易记录数 |
| | |
| | | import com.dy.pipIrrGlobal.voSe.VoCardInfo1; |
| | | import com.dy.pipIrrGlobal.voSe.VoCards; |
| | | import com.dy.pipIrrGlobal.voSe.VoCards2; |
| | | import com.dy.pipIrrGlobal.voSt.VoCardUsage; |
| | | import com.dy.pipIrrGlobal.voWe.VoCards3; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | * @return |
| | | */ |
| | | Long getCountByCardAddrAndState(String cardAddr); |
| | | |
| | | |
| | | /** |
| | | * 获取指定时间段水卡使用情况记录数量 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | List<VoCardUsage> getCardUsagesCount(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 获取指定时间段水卡使用情况:充值合计、消费合计、余额 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | List<VoCardUsage> getCardUsages(Map<?, ?> params); |
| | | |
| | | /** |
| | | * 获取指定时间段内水卡充值总计 |
| | | * @param timeStart |
| | | * @param timeStop |
| | | * @return |
| | | */ |
| | | Float getTotalRecharge(@Param("timeStart")String timeStart, @Param("timeStop")String timeStop); |
| | | |
| | | /** |
| | | * 获取指定时间段内水卡消费总计 |
| | | * @param timeStart |
| | | * @param timeStop |
| | | * @return |
| | | */ |
| | | Float getTotalConsumption(@Param("timeStart")String timeStart, @Param("timeStop")String timeStop); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoSe; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientTemp; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-26 14:57 |
| | | * @LastEditTime 2024-09-26 14:57 |
| | | * @Description |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface SeClientTempMapper extends BaseMapper<SeClientTemp> { |
| | | int deleteByPrimaryKey(Integer id); |
| | | |
| | | int insert(SeClientTemp record); |
| | | |
| | | int insertSelective(SeClientTemp record); |
| | | |
| | | SeClientTemp selectByPrimaryKey(Integer id); |
| | | |
| | | int updateByPrimaryKeySelective(SeClientTemp record); |
| | | |
| | | int updateByPrimaryKey(SeClientTemp record); |
| | | |
| | | /** |
| | | * 根据镇名获取农户 |
| | | * @param townName |
| | | * @return |
| | | */ |
| | | List<SeClientTemp> getClientsByTownName(String townName ); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoOp; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:07 |
| | | * @LastEditTime 2024-09-24 10:07 |
| | | * @Description |
| | | */ |
| | | /** |
| | | * 巡检表 |
| | | */ |
| | | |
| | | @TableName(value = "ope_inspect", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | public class OpeInspect implements BaseEntity { |
| | | public static final long serialVersionUID = 202409241013001L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 巡检员ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @NotNull(message = "巡检员ID不能为空") |
| | | private Long inspectorId; |
| | | |
| | | /** |
| | | * 开始巡检时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束巡检时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date stopTime; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoOp; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:08 |
| | | * @LastEditTime 2024-09-24 10:08 |
| | | * @Description |
| | | */ |
| | | /** |
| | | * 巡检轨迹表 |
| | | */ |
| | | |
| | | @TableName(value = "ope_track", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | public class OpeTrack implements BaseEntity { |
| | | public static final long serialVersionUID = 202409241013001L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 巡检ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @NotNull(message = "巡检ID不能为空") |
| | | private Long inspectId; |
| | | |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @NotNull(message = "经度不能为空") |
| | | private BigDecimal lng; |
| | | |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @NotNull(message = "纬度不能为空") |
| | | private BigDecimal lat; |
| | | |
| | | /** |
| | | * 打点时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date locateTime; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoSe; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-26 14:57 |
| | | * @LastEditTime 2024-09-26 14:57 |
| | | * @Description |
| | | */ |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import lombok.*; |
| | | |
| | | /** |
| | | * 农户临时表 |
| | | */ |
| | | |
| | | @TableName(value = "se_client_temp", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | public class SeClientTemp implements BaseEntity { |
| | | public static final long serialVersionUID = 202409261459001L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 镇 |
| | | */ |
| | | private String town; |
| | | |
| | | /** |
| | | * 村 |
| | | */ |
| | | private String village; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | private String idcard; |
| | | |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 街道及门牌号 |
| | | */ |
| | | private String address; |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.voBa; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-19 13:54 |
| | | * @LastEditTime 2024-09-19 13:54 |
| | | * @Description 简单用户视图:用户ID、用户名 |
| | | */ |
| | | |
| | | @Data |
| | | public class VoSimpleUser { |
| | | private static final long serialVersionUID = 202409191355001L; |
| | | |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 用户名 |
| | | */ |
| | | private String userName; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.voRm; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-14 17:17 |
| | | * @LastEditTime 2024-09-14 17:17 |
| | | * @Description 消耗视图对象,水卡消耗记录 |
| | | */ |
| | | @Data |
| | | @JsonPropertyOrder({"clientName", "clientNum", "cardNum", "intakeName", "rtuAddr", "moneyAmount", "waterAmount", "duration", "operateTime"}) |
| | | public class VoExpend { |
| | | private static final long serialVersionUID = 202409141721001L; |
| | | |
| | | /** |
| | | * 农户姓名 |
| | | */ |
| | | private String clientName; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | private String clientNum; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long cardNum; |
| | | |
| | | /** |
| | | * 取水口编号 |
| | | */ |
| | | private String intakeName; |
| | | |
| | | /** |
| | | * 阀控器地址 |
| | | */ |
| | | private String rtuAddr; |
| | | |
| | | /** |
| | | * 本次花费金额 |
| | | */ |
| | | private Float moneyAmount; |
| | | |
| | | /** |
| | | * 本次用水量 |
| | | */ |
| | | private Float waterAmount; |
| | | |
| | | /** |
| | | * 本次用水时长 |
| | | */ |
| | | private Integer duration; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date operateTime; |
| | | } |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Schema(title = "ID") |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long id; |
| | | |
| | | @Schema(title = "农户姓名") |
| | |
| | | @Schema(title = "补卡金额") |
| | | private Double reissueAmount; |
| | | |
| | | @Schema(title = "支付方式") |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long paymentId; |
| | | //@Schema(title = "支付方式") |
| | | //@JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | //private Long paymentId; |
| | | /** |
| | | * 支付方式名称 |
| | | */ |
| | | private String paymentName; |
| | | |
| | | @Schema(title = "操作人") |
| | | private String operator; |
| | |
| | | package com.dy.pipIrrGlobal.voSe; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | |
| | | */ |
| | | |
| | | @Data |
| | | @Schema(title = "收据视图对象") |
| | | public class VoReceipt { |
| | | private static final long serialVersionUID = 202402011037001L; |
| | | |
| | | @Schema(title = "收银员ID") |
| | | /** |
| | | * 收银员ID |
| | | */ |
| | | private String cashierId; |
| | | |
| | | @Schema(title = "订单号") |
| | | private String orderNumber; |
| | | /** |
| | | * 订单号 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long orderNumber; |
| | | |
| | | @Schema(title = "镇名称") |
| | | /** |
| | | * 镇名称 |
| | | */ |
| | | private String townName; |
| | | |
| | | @Schema(title = "村名称") |
| | | /** |
| | | * 村名称 |
| | | */ |
| | | private String villageName; |
| | | |
| | | @Schema(title = "农户姓名") |
| | | /** |
| | | * 农户姓名 |
| | | */ |
| | | private String name; |
| | | |
| | | @Schema(title = "电话") |
| | | /** |
| | | * 电话 |
| | | */ |
| | | private String phone; |
| | | |
| | | @Schema(title = "农户编号") |
| | | private String clientNum; |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long clientNum; |
| | | |
| | | @Schema(title = "水卡编号") |
| | | private String cardNum; |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long cardNum; |
| | | |
| | | @Schema(title = "业务类型") |
| | | /** |
| | | * 业务类型 |
| | | */ |
| | | private String operateType; |
| | | |
| | | @Schema(title = "购水金额") |
| | | /** |
| | | * 购水金额 |
| | | */ |
| | | private Double waterCost; |
| | | |
| | | @Schema(title = "购卡金额") |
| | | /** |
| | | * 赠送金额 |
| | | */ |
| | | private Double gift; |
| | | |
| | | /** |
| | | * 购卡金额 |
| | | */ |
| | | private Double cardCost; |
| | | |
| | | @Schema(title = "收费金额") |
| | | /** |
| | | * 收费金额 |
| | | */ |
| | | private Double amount; |
| | | |
| | | @Schema(title = "水卡余额") |
| | | /** |
| | | * 水卡余额 |
| | | */ |
| | | private Double money; |
| | | |
| | | @Schema(title = "支付方式") |
| | | /** |
| | | * 支付方式 |
| | | */ |
| | | private String paymentName; |
| | | |
| | | @Schema(title = "操作人") |
| | | /** |
| | | * 操作人 |
| | | */ |
| | | private String operatorName; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @Schema(title = "操作时间") |
| | | private Date operateTime; |
| | | |
| | | /** |
| | | * 当前时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @Schema(title = "当前时间") |
| | | private Date currentTime; |
| | | } |
| | |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | |
| | | */ |
| | | |
| | | @Data |
| | | @Schema(title = "充值记录视图对象") |
| | | @JsonPropertyOrder({ "opeId", "cardId", "clientName", "phone", "idCard", "clientNum", "villageName", "address", "money", "cardNum", "cardCost", "amount", "gift", "refundAmount", "afterRecharge", "paymentName", "price", "opr"}) |
| | | public class VoRecharge implements BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | private static final long serialVersionUID = 202409211025001L; |
| | | |
| | | //@Schema(title = "ID") |
| | | //private String id; |
| | | |
| | | /** |
| | | * 操作ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long opeId; |
| | | |
| | | /** |
| | | * 水卡ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long cardId; |
| | | |
| | | @Schema(title = "农户姓名") |
| | | /** |
| | | * 农户姓名 |
| | | */ |
| | | private String clientName; |
| | | |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | private String idCard; |
| | | |
| | | @Schema(title = "农户编号") |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | private String clientNum; |
| | | |
| | | /** |
| | | * 村委会名称 |
| | | */ |
| | | private String villageName; |
| | | |
| | | /** |
| | | * 居住地址 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | * 水卡余额 |
| | | * 水卡最终余额 |
| | | */ |
| | | private Float money; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long cardNum; |
| | | |
| | | /** |
| | | * 购卡费用 |
| | | */ |
| | | private Integer cardCost; |
| | | |
| | | @Schema(title = "充值金额") |
| | | /** |
| | | * 本次充值金额 |
| | | */ |
| | | private Float amount; |
| | | |
| | | @Schema(title = "返回金额") |
| | | /** |
| | | * 本次赠送金额 |
| | | */ |
| | | private Float gift; |
| | | |
| | | /** |
| | | * 返还金额 |
| | | */ |
| | | private Float refundAmount; |
| | | |
| | | @Schema(title = "充值后金额") |
| | | /** |
| | | * 充值后金额,充值时余额 + 本次充值金额 + 本次赠送金额 |
| | | */ |
| | | private Float afterRecharge; |
| | | |
| | | @Schema(title = "支付方式") |
| | | /** |
| | | * 支付方式 |
| | | */ |
| | | private String paymentName; |
| | | |
| | | @Schema(title = "水价") |
| | | /** |
| | | * 水价 |
| | | */ |
| | | private Float price; |
| | | |
| | | @Schema(title = "操作人") |
| | | /** |
| | | * 操作人 |
| | | */ |
| | | private String opr; |
| | | |
| | | /** |
| | | * 操作类型 |
| | | */ |
| | | private String operateType; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @Schema(title = "操作时间") |
| | | private Date operateDt; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.voSe; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-14 15:50 |
| | | * @LastEditTime 2024-09-14 15:50 |
| | | * @Description 充值记录视图对象,管理平台充值列表使用,APP未使用 |
| | | */ |
| | | |
| | | @Data |
| | | @JsonPropertyOrder({"clientName", "clientNum", "cardNum", "amount", "gift", "afterRecharge", "paymentName", "operator", "operateTime"}) |
| | | public class VoRechargeNew { |
| | | private static final long serialVersionUID = 202409141554001L; |
| | | |
| | | /** |
| | | * 农户姓名 |
| | | */ |
| | | private String clientName; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | private String clientNum; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long cardNum; |
| | | |
| | | /** |
| | | * 充值金额 |
| | | */ |
| | | private Float amount; |
| | | |
| | | /** |
| | | * 赠送金额 |
| | | */ |
| | | private Float gift; |
| | | |
| | | /** |
| | | * 充值后余额 |
| | | */ |
| | | private Float afterRecharge; |
| | | |
| | | /** |
| | | * 支付方式 |
| | | */ |
| | | private String paymentName; |
| | | |
| | | /** |
| | | * 操作人 |
| | | */ |
| | | private String operator; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date operateTime; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.voSe; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-18 15:04 |
| | | * @LastEditTime 2024-09-18 15:04 |
| | | * @Description 返还视图对象 |
| | | */ |
| | | |
| | | @Data |
| | | @JsonPropertyOrder({"clientName", "clientNum", "cardNum", "money", "refundAmount", "operator", "operateTime"}) |
| | | public class VoRefund { |
| | | private static final long serialVersionUID = 202409181505001L; |
| | | |
| | | /** |
| | | * 农户姓名 |
| | | */ |
| | | private String clientName; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | private String clientNum; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long cardNum; |
| | | |
| | | /** |
| | | * 返还前余额 |
| | | */ |
| | | private Float money; |
| | | |
| | | /** |
| | | * 返还金额 |
| | | */ |
| | | private Float refundAmount; |
| | | |
| | | /** |
| | | * 操作人 |
| | | */ |
| | | private String operator; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date operateTime; |
| | | } |
| | |
| | | /** |
| | | * 余额 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @ColumnWidth(15) |
| | | private Long money; |
| | | private Double money; |
| | | |
| | | /** |
| | | * 付款方式 |
New file |
| | |
| | | package com.dy.pipIrrGlobal.voSt; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-13 16:14 |
| | | * @LastEditTime 2024-09-13 16:14 |
| | | * @Description 水卡使用统计视图 |
| | | */ |
| | | |
| | | @Data |
| | | @JsonPropertyOrder({ "clientName", "cardNum", "totalRecharge", "totalConsumption", "balance"}) |
| | | public class VoCardUsage { |
| | | private static final long serialVersionUID = 202409131615001L; |
| | | |
| | | /** |
| | | * 农户姓名 |
| | | */ |
| | | private String clientName; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long cardNum; |
| | | |
| | | /** |
| | | * 充值金额合计 |
| | | */ |
| | | private Float totalRecharge; |
| | | |
| | | /** |
| | | * 消费金额合计 |
| | | */ |
| | | private Float totalConsumption; |
| | | |
| | | /** |
| | | * 余额 |
| | | */ |
| | | private Float balance; |
| | | } |
New file |
| | |
| | | # 数据源配置 |
| | | spring: |
| | | datasource: #配置数据源 |
| | | test: |
| | | #name: test |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | # url: jdbc:mysql://192.168.40.166:3306/pipIrr_test?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.130.130.233:3306/pipIrr_test?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | url: jdbc:mysql://127.0.0.1:3306/pipIrr_test?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | username: root |
| | | password: dysql,;.abc!@# |
| | | druid: |
| | | # 数据源名称:当存在多个数据源时,设置名字可以很方便的来进行区分,默认自动生成名称,格式是:"DataSource-" + System.identityHashCode(this) |
| | | name: druid-mysql-test |
| | | #配置初始化大小、最小、最大 |
| | | initialSize: 10 |
| | | minIdle: 10 |
| | | maxActive: 100 |
| | | # 获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置useUnfairLock属性为true使用非公平锁 |
| | | maxWait: 60000 |
| | | #配置间隔多久进行一次检测,检测需要关闭的空闲连接,单位毫秒。 默认是60s,太长可能会导致无法及时检测到连接中断 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | #配置一个连接在连接池中的最小生存时间、最大生存时间,超过最大生存时间会被移除,单位毫秒。 |
| | | minEvictableIdleTimeMillis: 300000 |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | #探活、验证链接有效性的查询,新版本默认使用mysqlPing代替 |
| | | #validation-query: select 1 #注释掉,采用默认的mysqlPing |
| | | #配置从连接池获取连接时,当连接空闲时间大于timeBetweenEvictionRunsMillis时是否检查连接有效性,true每次都检查;false不检查。 |
| | | testWhileIdle: true |
| | | #配置从连接池获取连接时和向连接池归还连接时,是否检查连接有效性 |
| | | #每次获取或归还连接都检测太频繁,除非特别重要或网络特别不可靠等情况,建议用testWhileIdle + timeBetweenEvictionRunsMillis代替。--> |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | #配置是否定期探活、探活间隔, 默认120s |
| | | keepAlive: true |
| | | #keepAliveBetweenTimeMillis must be greater than timeBetweenEvictionRunsMillis |
| | | keepAliveBetweenTimeMillis: 1200000 |
| | | #配置一个连接最大使用次数,避免长时间使用相同连接造成服务器端负载不均衡。 |
| | | phyMaxUseCount: 1000 |
| | | #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。 |
| | | poolPreparedStatements: false |
| | | #要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true。在Druid中,不会存在Oracle下PSCache占用内存过多的问题,可以把这个数值配置大一些,比如说100 |
| | | maxOpenPreparedStatements: -1 |
| | | #指定每个连接上PSCache的大小 |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | #属性类型是字符串,通过别名的方式配置扩展插件,常用的插件有: |
| | | #监控统计用的filter:stat,日志用的filter:log4j,防御sql注入的filter:wall |
| | | #filters: stat,wall,config |
| | | filters: wall,config |
| | | webStatFilter: |
| | | # 添加过滤规则 |
| | | urlPattern: /* |
| | | # 忽略过滤格式 |
| | | exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" |
| | | statViewServlet: |
| | | # 设置ip白名单 |
| | | # allow: 127.0.0.1 |
| | | # 设置ip黑名单,优先级高于白名单 |
| | | deny: |
| | | # 设置控制台管理用户 |
| | | # loginUsername: root |
| | | # loginPassword: root |
| | | # 是否可以重置数据 |
| | | resetEnable: false |
| | | # 开启druid监控页面 |
| | | #enabled: true |
| | | enabled: false |
| | | |
| | |
| | | allow-bean-definition-overriding: true #设置为true时,后定义的bean会覆盖之前定义的相同名称的bean |
| | | datasource: #配置数据源 |
| | | #多个数据源名称在此配置,要求与spring。datasource。[ym][pj]中的一致 |
| | | names: ym, pj |
| | | names: ym, pj, test |
| | |
| | | comSendUrl: "http://127.0.0.1:8071/rtuMw/com/send" |
| | | rtuLogFileUrl: "http://127.0.0.1:8071/rtuMw/com/rtuLogFile" |
| | | rtuLogTextUrl: "http://127.0.0.1:8071/rtuMw/com/rtuLogText" |
| | | test: |
| | | comSendUrl: "http://127.0.0.1:8072/rtuMw/com/send" |
| | | rtuLogFileUrl: "http://127.0.0.1:8072/rtuMw/com/rtuLogFile" |
| | | rtuLogTextUrl: "http://127.0.0.1:8072/rtuMw/com/rtuLogText" |
| | | #监测控制模块回调地址 |
| | | rtuCallbackUrl_rm: "http://127.0.0.1:8081/remote/comRes/receive" |
| | | #微信小程序回调地址 |
| | |
| | | </dictItem> |
| | | </dict> |
| | | </dictionaries> |
| | | <user name="超级管理员" phone="admin" password="admin" supperAdmin="1" /> |
| | | <user name="超级管理员" phone="admin" password="dyyjy" supperAdmin="1" /> |
| | | <payments> |
| | | <item1 name="现金"/> |
| | | <item2 name="微信支付"/> |
| | | <item3 name="支付宝支付"/> |
| | | <item4 name="银行转账"/> |
| | | <item2 name="POS机"/> |
| | | <item3 name="银行转账"/> |
| | | </payments> |
| | | <settings> |
| | | <item1 item_name="lng" item_value="101.87345" remarks="经度"/> |
| | | <item2 item_name="lat" item_value="25.70424" remarks="纬度"/> |
| | | <item1 item_name="lng" item_value="101.89878161146011" remarks="经度"/> |
| | | <item2 item_name="lat" item_value="25.673963608371185" remarks="纬度"/> |
| | | </settings> |
| | | <waterTypes> |
| | | <item1 typeName="灌溉用水"/> |
| | |
| | | <item8 defaultValue = "80" unit = "3" sort = "4" type = "2"/> |
| | | </irrigateProfile> |
| | | </org2> |
| | | <org3 tag="test" name="测试" enable="true"> |
| | | <districts> |
| | | <province name="天津市" num="12" level="0"> |
| | | <city name="市辖区" num="01" level="1"> |
| | | <country name="武清区" num="14" level="2" /> |
| | | </city> |
| | | </province> |
| | | </districts> |
| | | <dictionaries> |
| | | <dict code="protocol" title="协议" valueType="2"> |
| | | <dictItem> |
| | | <item1 dictCode="protocol" value="p206V1_0_1" name="老协议" status="1" sort="0" /> |
| | | <item2 dictCode="protocol" value="p206V202404" name="新协议" status="0" sort="1" /> |
| | | </dictItem> |
| | | </dict> |
| | | </dictionaries> |
| | | <user name="超级管理员" phone="admin" password="admin" supperAdmin="1" /> |
| | | <payments> |
| | | <item1 name="现金"/> |
| | | <item2 name="微信支付"/> |
| | | <item3 name="支付宝支付"/> |
| | | <item4 name="银行转账"/> |
| | | </payments> |
| | | <settings> |
| | | <item1 item_name="lng" item_value="101.87345" remarks="经度"/> |
| | | <item2 item_name="lat" item_value="25.70424" remarks="纬度"/> |
| | | </settings> |
| | | <waterTypes> |
| | | <item1 typeName="灌溉用水"/> |
| | | <item2 typeName="工业用水"/> |
| | | <item3 typeName="生活用水"/> |
| | | <item4 typeName="养殖用水"/> |
| | | <item5 typeName="绿化用水"/> |
| | | </waterTypes> |
| | | <waterPrice price="0.90" /> |
| | | <irrigateProfile> |
| | | <item1 defaultValue = "10" unit = "2" sort = "1" type = "1"/> |
| | | <item2 defaultValue = "20" unit = "2" sort = "2" type = "1" /> |
| | | <item3 defaultValue = "1" unit = "1" sort = "3" type = "1"/> |
| | | <item4 defaultValue = "2" unit = "1" sort = "4" type = "1"/> |
| | | <item5 defaultValue = "20" unit = "3" sort = "1" type = "2"/> |
| | | <item6 defaultValue = "30" unit = "3" sort = "2" type = "2"/> |
| | | <item7 defaultValue = "50" unit = "3" sort = "3" type = "2"/> |
| | | <item8 defaultValue = "80" unit = "3" sort = "4" type = "2"/> |
| | | </irrigateProfile> |
| | | </org3> |
| | | </orgs> |
| | | </config> |
| | |
| | | name AS userName, |
| | | disabled AS stateId, |
| | | (CASE |
| | | WHEN disabled = 0 THEN "正常" |
| | | WHEN disabled = 1 THEN "已禁用" |
| | | WHEN disabled = 0 THEN '正常' |
| | | WHEN disabled = 1 THEN '已禁用' |
| | | END) AS stateName, |
| | | CAST(blockId AS char) AS blockId, |
| | | (SELECT name FROM ba_block WHERE id = user.blockId) AS blockName |
| | |
| | | name AS userName, |
| | | disabled AS stateId, |
| | | (CASE |
| | | WHEN disabled = 0 THEN "正常" |
| | | WHEN disabled = 1 THEN "已禁用" |
| | | WHEN disabled = 0 THEN '正常' |
| | | WHEN disabled = 1 THEN '已禁用' |
| | | END) AS stateName, |
| | | CAST(blockId AS char) AS blockId, |
| | | (SELECT name FROM ba_block WHERE id = user.blockId) AS blockName |
| | |
| | | <select id="getPhones" resultType="java.lang.String"> |
| | | SELECT phone FROM ba_user WHERE deleted = 0 and disabled = 0 |
| | | </select> |
| | | |
| | | <!--获取简单用户数据列表--> |
| | | <select id="getSimpleUsers" resultType="com.dy.pipIrrGlobal.voBa.VoSimpleUser"> |
| | | SELECT |
| | | id AS userId, |
| | | name AS userName |
| | | FROM ba_user |
| | | WHERE disabled = 0 AND deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.dy.pipIrrGlobal.daoOp.OpeInspectMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoOp.OpeInspect"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table ope_inspect--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="inspector_id" jdbcType="BIGINT" property="inspectorId" /> |
| | | <result column="start_time" jdbcType="TIMESTAMP" property="startTime" /> |
| | | <result column="stop_time" jdbcType="TIMESTAMP" property="stopTime" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, inspector_id, start_time, stop_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from ope_inspect |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from ope_inspect |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeInspect"> |
| | | <!--@mbg.generated--> |
| | | insert into ope_inspect (id, inspector_id, start_time, |
| | | stop_time) |
| | | values (#{id,jdbcType=BIGINT}, #{inspectorId,jdbcType=BIGINT}, #{startTime,jdbcType=TIMESTAMP}, |
| | | #{stopTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeInspect"> |
| | | <!--@mbg.generated--> |
| | | insert into ope_inspect |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="inspectorId != null"> |
| | | inspector_id, |
| | | </if> |
| | | <if test="startTime != null"> |
| | | start_time, |
| | | </if> |
| | | <if test="stopTime != null"> |
| | | stop_time, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="inspectorId != null"> |
| | | #{inspectorId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="startTime != null"> |
| | | #{startTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="stopTime != null"> |
| | | #{stopTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeInspect"> |
| | | <!--@mbg.generated--> |
| | | update ope_inspect |
| | | <set> |
| | | <if test="inspectorId != null"> |
| | | inspector_id = #{inspectorId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="startTime != null"> |
| | | start_time = #{startTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="stopTime != null"> |
| | | stop_time = #{stopTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeInspect"> |
| | | <!--@mbg.generated--> |
| | | update ope_inspect |
| | | set inspector_id = #{inspectorId,jdbcType=BIGINT}, |
| | | start_time = #{startTime,jdbcType=TIMESTAMP}, |
| | | stop_time = #{stopTime,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?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.dy.pipIrrGlobal.daoOp.OpeTrackMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoOp.OpeTrack"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table ope_track--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="inspect_id" jdbcType="BIGINT" property="inspectId" /> |
| | | <result column="lng" jdbcType="DECIMAL" property="lng" /> |
| | | <result column="lat" jdbcType="DECIMAL" property="lat" /> |
| | | <result column="locate_time" jdbcType="TIMESTAMP" property="locateTime" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, inspect_id, lng, lat, locate_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from ope_track |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from ope_track |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeTrack"> |
| | | <!--@mbg.generated--> |
| | | insert into ope_track (id, inspect_id, lng, |
| | | lat, locate_time) |
| | | values (#{id,jdbcType=BIGINT}, #{inspectId,jdbcType=BIGINT}, #{lng,jdbcType=DECIMAL}, |
| | | #{lat,jdbcType=DECIMAL}, #{locateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeTrack"> |
| | | <!--@mbg.generated--> |
| | | insert into ope_track |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="inspectId != null"> |
| | | inspect_id, |
| | | </if> |
| | | <if test="lng != null"> |
| | | lng, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat, |
| | | </if> |
| | | <if test="locateTime != null"> |
| | | locate_time, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="inspectId != null"> |
| | | #{inspectId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="lng != null"> |
| | | #{lng,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | #{lat,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="locateTime != null"> |
| | | #{locateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeTrack"> |
| | | <!--@mbg.generated--> |
| | | update ope_track |
| | | <set> |
| | | <if test="inspectId != null"> |
| | | inspect_id = #{inspectId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="lng != null"> |
| | | lng = #{lng,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat = #{lat,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="locateTime != null"> |
| | | locate_time = #{locateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoOp.OpeTrack"> |
| | | <!--@mbg.generated--> |
| | | update ope_track |
| | | set inspect_id = #{inspectId,jdbcType=BIGINT}, |
| | | lng = #{lng,jdbcType=DECIMAL}, |
| | | lat = #{lat,jdbcType=DECIMAL}, |
| | | locate_time = #{locateTime,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <!--批量添加巡检轨迹--> |
| | | <insert id="insertTracks"> |
| | | INSERT INTO ope_track (id, inspect_id, lng, lat, locate_time) |
| | | VALUES |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.id}, #{item.inspectId}, #{item.lng}, #{item.lat}, #{item.locateTime}) |
| | | </foreach> |
| | | </insert> |
| | | </mapper> |
| | |
| | | |
| | | <!--根据控制器编号获取流浪控制器信息--> |
| | | <select id="getTrampControllerInfo" resultMap="BaseResultMap"> |
| | | SELECT rtuAddr, protocol, findDt FROM pr_controller_tramp WHERE id = #{controllerId} |
| | | SELECT rtuAddr, protocol, findDt, orgTag FROM pr_controller_tramp WHERE id = #{controllerId} |
| | | </select> |
| | | |
| | | <!-- 根据条件获取流浪控制器信息--> |
| | |
| | | AND protocol = #{protocol,jdbcType=VARCHAR} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | order by rtuAddr desc |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | <!-- 根据条件获取流浪控制器数量--> |
| | | <select id="getTrampControllersCount" resultType="java.lang.Long"> |
| | | select |
| | |
| | | <if test="intakeNum != null and intakeNum != ''"> |
| | | AND inta.name LIKE CONCAT('%', #{intakeNum}, '%') |
| | | </if> |
| | | <if test="clientName != null and clientName != ''"> |
| | | AND oh.client_name LIKE CONCAT('%', #{clientName}, '%') |
| | | </if> |
| | | <if test="rtuAddr != null and rtuAddr != ''"> |
| | | AND oh.rtu_addr LIKE CONCAT('%', #{rtuAddr}, '%') |
| | | </if> |
| | |
| | | </if> |
| | | <if test="intakeNum != null and intakeNum != ''"> |
| | | AND inta.name LIKE CONCAT('%', #{intakeNum}, '%') |
| | | </if> |
| | | <if test="clientName != null and clientName != ''"> |
| | | AND oh.client_name LIKE CONCAT('%', #{clientName}, '%') |
| | | </if> |
| | | <if test="rtuAddr != null and rtuAddr != ''"> |
| | | AND oh.rtu_addr LIKE CONCAT('%', #{rtuAddr}, '%') |
| | |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | <!--获取水卡消费记录数量,管理平台使用--> |
| | | <select id="getExpendsCount" resultType="java.lang.Long"> |
| | | SELECT COUNT(*) AS recordCount |
| | | FROM rm_open_close_valve_history och |
| | | INNER JOIN se_client cli ON cli.id = och.client_id |
| | | INNER JOIN pr_intake inta ON inta.id = och.intake_id |
| | | <where> |
| | | AND och.cl_ic_card_no IS NOT NULL AND och.client_id IS NOT NULL |
| | | AND och.cl_this_money> 0 |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "clientNum != null and clientNum > 0"> |
| | | AND cli.clientNum like CONCAT('%',#{clientNum},'%') |
| | | </if> |
| | | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND och.cl_ic_card_no like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--获取水卡消费记录,管理平台使用--> |
| | | <select id="getExpends" resultType="com.dy.pipIrrGlobal.voRm.VoExpend"> |
| | | SELECT |
| | | cli.name AS clientName, |
| | | cli.clientNum, |
| | | och.cl_ic_card_no AS cardNum, |
| | | inta.name AS intakeName, |
| | | och.rtu_addr AS rtuAddr, |
| | | och.cl_this_money AS moneyAmount, |
| | | och.cl_this_amount AS waterAmount, |
| | | och.cl_this_time AS duration, |
| | | och.cl_dt AS operateTime |
| | | FROM rm_open_close_valve_history och |
| | | INNER JOIN se_client cli ON cli.id = och.client_id |
| | | INNER JOIN pr_intake inta ON inta.id = och.intake_id |
| | | <where> |
| | | AND och.cl_ic_card_no IS NOT NULL AND och.client_id IS NOT NULL |
| | | AND och.cl_this_money> 0 |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "clientNum != null and clientNum > 0"> |
| | | AND cli.clientNum like CONCAT('%',#{clientNum},'%') |
| | | </if> |
| | | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND och.cl_ic_card_no like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY och.cl_dt DESC |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="intakeNum != null and intakeNum != ''"> |
| | | AND inta.name LIKE CONCAT('%', #{intakeNum}, '%') |
| | | </if> |
| | | <if test="clientName != null and clientName != ''"> |
| | | AND oh.client_name LIKE CONCAT('%', #{clientName}, '%') |
| | | </if> |
| | | <if test="rtuAddr != null and rtuAddr != ''"> |
| | | AND oh.rtu_addr LIKE CONCAT('%', #{rtuAddr}, '%') |
| | | </if> |
| | |
| | | <if test="intakeNum != null and intakeNum != ''"> |
| | | AND inta.name LIKE CONCAT('%', #{intakeNum}, '%') |
| | | </if> |
| | | <if test="clientName != null and clientName != ''"> |
| | | AND oh.client_name LIKE CONCAT('%', #{clientName}, '%') |
| | | </if> |
| | | <if test="rtuAddr != null and rtuAddr != ''"> |
| | | AND oh.rtu_addr LIKE CONCAT('%', #{rtuAddr}, '%') |
| | | </if> |
| | |
| | | AND oh.op_dt BETWEEN #{timeStart_open} AND #{timeStop_open} |
| | | </if> |
| | | <if test="timeStart_close != null and timeStart_close != '' and timeStop_close != null and timeStop_close != ''"> |
| | | AND oh.cl_dt BETWEEN #{timeStart_close} AND #{timeStop_close} |
| | | </if> |
| | | </where> |
| | | ORDER BY oh.op_dt DESC |
| | | <trim prefix="limit "> |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | <!--根据指定条件获取开关阀报最新记录--> |
| | | <select id="getOpenCloseValveReports_last" resultType="com.dy.pipIrrGlobal.voRm.VoOpenCloseValve"> |
| | | SELECT oh.intake_id AS intakeId, |
| | | inta.name AS intakeNum, |
| | | oh.rtu_addr AS rtuAddr, |
| | | oh.client_name AS clientName, |
| | | oh.op_ic_card_no AS openIcNum, |
| | | oh.op_ic_card_addr AS openIcAddr, |
| | | oh.op_dt AS openTime, |
| | | |
| | | CASE |
| | | WHEN oh.op_type = 1 THEN '刷卡开阀' |
| | | WHEN oh.op_type = 3 THEN '中心站开阀' |
| | | WHEN oh.op_type = 5 THEN '余额不足关阀' |
| | | WHEN oh.op_type = 8 THEN '用户远程开阀' |
| | | WHEN oh.op_type = 11 THEN '开关阀卡开阀' |
| | | ELSE '未知' |
| | | END AS openType, |
| | | oh.op_order_no AS openOrderNo, |
| | | oh.op_total_amount AS openTotalAmount, |
| | | oh.op_remain_money AS openRemainMoney, |
| | | oh.op_water_remain_user AS openWaterRemain, |
| | | oh.op_ele_total_amount AS openEleTotalAmount, |
| | | oh.cl_ic_card_no AS closeIcNum, |
| | | oh.cl_ic_card_addr AS closeIcAddr, |
| | | oh.cl_dt AS closeTime, |
| | | CASE |
| | | WHEN oh.cl_type = 2 THEN '刷卡关阀' |
| | | WHEN oh.cl_type = 4 THEN '中心站关阀' |
| | | WHEN oh.cl_type = 5 THEN '余额不足关阀' |
| | | WHEN oh.cl_type = 6 THEN '流量计故障关阀' |
| | | WHEN oh.cl_type = 7 THEN '紧急关阀' |
| | | WHEN oh.cl_type = 9 THEN '用户远程关阀' |
| | | WHEN oh.cl_type = 10 THEN '开关阀卡关阀' |
| | | WHEN oh.cl_type = 12 THEN '黑名单命令关阀' |
| | | WHEN oh.cl_type = 13 THEN '远程定时关阀' |
| | | WHEN oh.cl_type = 14 THEN '远程定量关阀' |
| | | ELSE '未知' |
| | | END AS closeType, |
| | | oh.cl_this_amount AS closeThisAmount, |
| | | oh.cl_this_time AS thisTime, |
| | | oh.cl_this_money AS thisMoney, |
| | | oh.cl_remain_money AS closeRemainMoney, |
| | | oh.cl_total_amount AS closeTotalAmount |
| | | FROM rm_open_close_valve_last oh |
| | | INNER JOIN pr_intake inta ON inta.id = oh.intake_id |
| | | <where> |
| | | <if test="intakeId != null and intakeId > 0"> |
| | | AND oh.intake_id = #{intakeId} |
| | | </if> |
| | | <if test="intakeNum != null and intakeNum != ''"> |
| | | AND inta.name LIKE CONCAT('%', #{intakeNum}, '%') |
| | | </if> |
| | | <if test="rtuAddr != null and rtuAddr != ''"> |
| | | AND oh.rtu_addr LIKE CONCAT('%', #{rtuAddr}, '%') |
| | | </if> |
| | | <if test="timeStart_open != null and timeStop_open != null"> |
| | | AND oh.op_dt BETWEEN #{timeStart_open} AND #{timeStop_open} |
| | | </if> |
| | | <if test="timeStart_close != null and timeStop_close != null"> |
| | | AND oh.cl_dt BETWEEN #{timeStart_close} AND #{timeStop_close} |
| | | </if> |
| | | </where> |
| | |
| | | cli.phone, |
| | | cli.idCard, |
| | | cli.clientNum, |
| | | dis.name AS villageName, |
| | | cli.address, |
| | | card.money, |
| | | cardNum, |
| | | <!-- CASE--> |
| | | <!-- WHEN card.cardNum LIKE '10%' THEN CONCAT(SUBSTRING(card.cardNum, 7, 6),SUBSTRING(card.cardNum, 14, 4))--> |
| | | <!-- ELSE card.cardNum--> |
| | | <!-- END AS cardNum,--> |
| | | IFNULL(ope.card_cost,0) AS cardCost, |
| | | IFNULL(ope.trade_amount, 0) AS amount, |
| | | IFNULL(ope.gift, 0) AS gift, |
| | | IFNULL(ope.refund_amount, 0) AS refundAmount, |
| | | (IFNULL(ope.money, 0) + IFNULL(ope.trade_amount, 0)) AS afterRecharge, |
| | | (IFNULL(ope.money, 0) + IFNULL(ope.trade_amount, 0) + IFNULL(ope.gift, 0)) AS afterRecharge, |
| | | pay.name AS paymentName, |
| | | ope.price, |
| | | us.name AS opr, |
| | |
| | | FROM se_card_operate ope |
| | | INNER JOIN se_client_card card ON ope.card_id = card.id |
| | | INNER JOIN se_client cli ON ope.client_id = cli.id |
| | | LEFT JOIN ba_district dis ON dis.id = cli.villageId |
| | | INNER JOIN ba_user us ON ope.operator = us.id |
| | | Left JOIN se_payment_method pay ON ope.payment_id = pay.id |
| | | <where> |
| | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <!-- <if test = "paymentId != null and paymentId > 0">--> |
| | | <!-- AND ope.payment_id = ${paymentId}--> |
| | | <!-- </if>--> |
| | | |
| | | <!-- <if test = "rechargeTimeStart != null and rechargeTimeStop != null">--> |
| | | <!-- AND ope.operate_dt BETWEEN #{rechargeTimeStart} AND #{rechargeTimeStop}--> |
| | | <!-- </if>--> |
| | | </where> |
| | | ORDER BY ope.operate_dt DESC |
| | | <trim prefix="limit " > |
| | |
| | | IFNULL(ope.card_cost,0.00) AS cardCost, |
| | | IFNULL(ope.gift,0.00) AS gift, |
| | | IFNULL(ope.refund_amount,0.00) AS refundAmount, |
| | | ope.money, |
| | | <!--ope.money,--> |
| | | (IFNULL(ope.money, 0) + IFNULL(ope.trade_amount, 0) + IFNULL(ope.gift, 0)) AS money, |
| | | pay.name AS paymentName, |
| | | ope.operate_dt as tradeTime, |
| | | us.id AS cashierId, |
| | |
| | | cli.districtTitle, |
| | | cli.villageId AS villageId |
| | | FROM se_card_operate ope |
| | | INNER JOIN se_client cli ON ope.client_id = cli.id |
| | | INNER JOIN se_client_card card ON card.id = ope.card_id |
| | | LEFT JOIN se_client cli ON ope.client_id = cli.id |
| | | LEFT JOIN se_client_card card ON card.id = ope.card_id |
| | | LEFT JOIN se_payment_method pay ON ope.payment_id = pay.id |
| | | INNER JOIN ba_user us ON ope.operator = us.id |
| | | LEFT JOIN ba_user us ON ope.operator = us.id |
| | | <where> |
| | | AND ope.operate_type IN(1,2,3,5) |
| | | |
| | |
| | | <!--根据指定条件获取开卡记录--> |
| | | <select id="getActiveCards" resultType="com.dy.pipIrrGlobal.voSe.VoActiveCard"> |
| | | SELECT |
| | | CAST(ope.id AS char) AS id , |
| | | cli.name AS clientName, |
| | | cli.clientNum AS clientNum, |
| | | card.cardNum AS cardNum, |
| | | card.state AS state, |
| | | (CASE |
| | | WHEN card.state = 1 THEN '正常' |
| | | WHEN card.state = 2 THEN '已注销' |
| | | WHEN card.state = 3 THEN '已挂失' |
| | | END) AS stateName, |
| | | ope.card_cost AS cardCost, |
| | | ope.payment_id AS paymentId, |
| | | (SELECT `name` FROM ba_user WHERE id = ope.operator) AS operator, |
| | | ope.operate_dt AS operateDt |
| | | ope.id, |
| | | cli.name AS clientName, |
| | | cli.clientNum AS clientNum, |
| | | card.cardNum AS cardNum, |
| | | card.state AS state, |
| | | (CASE |
| | | WHEN card.state = 1 THEN '正常' |
| | | WHEN card.state = 2 THEN '已注销' |
| | | WHEN card.state = 3 THEN '已挂失' |
| | | END) AS stateName, |
| | | ope.card_cost AS cardCost, |
| | | pay.name AS paymentName, |
| | | (SELECT `name` FROM ba_user WHERE id = ope.operator) AS operator, |
| | | ope.operate_dt AS operateDt |
| | | FROM se_card_operate ope |
| | | INNER JOIN se_client_card card ON ope.card_id = card.id |
| | | INNER JOIN se_client cli ON ope.client_id = cli.id |
| | | INNER JOIN se_client_card card ON ope.card_id = card.id |
| | | INNER JOIN se_client cli ON ope.client_id = cli.id |
| | | INNER JOIN se_payment_method pay ON pay.id = ope.payment_id |
| | | <where> |
| | | AND ope.operate_type = 1 |
| | | <if test = "clientName != null and clientName !=''"> |
| | |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "onlyGift != null and onlyGift ==true"> |
| | | AND ope.gift > 0 |
| | | </if> |
| | | |
| | | <if test = "cashierId != null and cashierId > 0"> |
| | | AND ope.operator = #{cashierId} |
| | | </if> |
| | | |
| | | <if test = "timeStart != null and timeStop != null"> |
| | | AND ope.operate_dt BETWEEN #{timeStart} AND #{timeStop} |
| | | </if> |
| | |
| | | <!--根据指定条件获取收据列表--> |
| | | <select id="getReceipts" resultType="com.dy.pipIrrGlobal.voSe.VoReceipt"> |
| | | SELECT |
| | | CAST(ope.id AS char) AS orderNumber, |
| | | tow.name AS townName, |
| | | vil.name AS villageName, |
| | | cli.`name`, |
| | | cli.phone, |
| | | CAST(cli.clientNum AS char) AS clientNum, |
| | | CAST(card.cardNum AS char) AS cardNum, |
| | | (CASE |
| | | WHEN ope.operate_type = 1 THEN '开卡' |
| | | WHEN ope.operate_type = 2 THEN '充值' |
| | | END) AS operateType, |
| | | IFNULL(ope.trade_amount,0) AS waterCost, |
| | | IFNULL(ope.card_cost,0) AS cardCost, |
| | | (IFNULL(ope.trade_amount,0) + IFNULL(ope.card_cost,0)) AS amount, |
| | | card.money, |
| | | pay.`name` AS paymentName, |
| | | us.`name` AS operatorName, |
| | | ope.operate_dt AS operateTime, |
| | | NOW() AS currentTime |
| | | ope.id AS orderNumber, |
| | | tow.name AS townName, |
| | | vil.name AS villageName, |
| | | cli.`name`, |
| | | cli.phone, |
| | | cli.clientNum, |
| | | card.cardNum, |
| | | (CASE |
| | | WHEN ope.operate_type = 1 THEN '开卡' |
| | | WHEN ope.operate_type = 2 THEN '充值' |
| | | END) AS operateType, |
| | | IFNULL(ope.trade_amount,0) AS waterCost, |
| | | IFNULL(ope.gift,0) AS gift, |
| | | IFNULL(ope.card_cost,0) AS cardCost, |
| | | (IFNULL(ope.trade_amount,0) + IFNULL(ope.card_cost,0)) AS amount, |
| | | card.money, |
| | | pay.`name` AS paymentName, |
| | | us.`name` AS operatorName, |
| | | ope.operate_dt AS operateTime, |
| | | ope.operator AS cashierId, |
| | | NOW() AS currentTime |
| | | FROM se_card_operate ope |
| | | INNER JOIN se_client cli ON ope.client_id = cli.id |
| | | INNER JOIN se_client_card card ON ope.card_id = card.id |
| | |
| | | |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "onlyGift != null and onlyGift ==true"> |
| | | AND ope.gift > 0 |
| | | </if> |
| | | |
| | | <if test = "cashierId != null and cashierId > 0"> |
| | | AND ope.operator = #{cashierId} |
| | | </if> |
| | | |
| | | <if test = "timeStart != null and timeStop != null"> |
| | |
| | | SELECT |
| | | SUM(IFNULL(ope.trade_amount,0) + IFNULL(ope.card_cost,0)) AS totalAmount |
| | | FROM se_card_operate ope |
| | | INNER JOIN se_client cli ON ope.client_id = cli.id |
| | | INNER JOIN se_client_card card ON ope.card_id = card.id |
| | | INNER JOIN se_payment_method pay ON ope.payment_id = pay.id |
| | | INNER JOIN ba_user us ON ope.operator = us.id |
| | | INNER JOIN ba_district vil ON cli.villageId = vil.id |
| | | INNER JOIN ba_district tow ON cli.townId = tow.id |
| | | LEFT JOIN se_client cli ON ope.client_id = cli.id |
| | | LEFT JOIN se_client_card card ON ope.card_id = card.id |
| | | LEFT JOIN se_payment_method pay ON ope.payment_id = pay.id |
| | | LEFT JOIN ba_user us ON ope.operator = us.id |
| | | LEFT JOIN ba_district vil ON cli.villageId = vil.id |
| | | LEFT JOIN ba_district tow ON cli.townId = tow.id |
| | | <where> |
| | | AND ope.operate_type IN(1,2) |
| | | <if test = "operateId != null and operateId > 0"> |
| | |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | <!--获取充值记录数量,管理平台充值列表使用,APP未使用--> |
| | | <select id="getRechargesCountNew" resultType="java.lang.Long"> |
| | | SELECT COUNT(*) AS recordCount |
| | | FROM se_client_card card |
| | | INNER JOIN se_client cli ON cli.id = card.clientId |
| | | LEFT JOIN se_recharge_history rch ON rch.cardId = card.id |
| | | LEFT JOIN se_payment_method pay ON pay.id = rch.paymentId |
| | | INNER JOIN ba_user us ON us.id = rch.operator |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "clientNum != null and clientNum > 0"> |
| | | AND cli.clientNum like CONCAT('%',#{clientNum},'%') |
| | | </if> |
| | | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--获取充值记录,管理平台充值列表使用,APP未使用--> |
| | | <select id="getRechargesNew" resultType="com.dy.pipIrrGlobal.voSe.VoRechargeNew"> |
| | | SELECT |
| | | cli.name AS clientName, |
| | | cli.clientNum, |
| | | card.cardNum, |
| | | IFNULL(rch.amount, 0) AS amount, |
| | | IFNULL(rch.gift, 0) AS gift, |
| | | IFNULL(rch.afterRecharge, 0) AS afterRecharge, |
| | | pay.name AS paymentName, |
| | | us.name AS operator, |
| | | rch.operateDt AS operateTime |
| | | FROM se_client_card card |
| | | INNER JOIN se_client cli ON cli.id = card.clientId |
| | | LEFT JOIN se_recharge_history rch ON rch.cardId = card.id |
| | | LEFT JOIN se_payment_method pay ON pay.id = rch.paymentId |
| | | INNER JOIN ba_user us ON us.id = rch.operator |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "clientNum != null and clientNum > 0"> |
| | | AND cli.clientNum like CONCAT('%',#{clientNum},'%') |
| | | </if> |
| | | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY rch.operateDt DESC |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | <!--获取返还记录数量,管理平台充值列表使用--> |
| | | <select id="getRefundsCount" resultType="java.lang.Long"> |
| | | SELECT COUNT(*) AS recordCount |
| | | FROM se_client_card card |
| | | INNER JOIN se_client cli ON cli.id = card.clientId |
| | | LEFT JOIN se_card_operate ope ON ope.card_id = card.id |
| | | INNER JOIN ba_user us ON us.id = ope.operator |
| | | <where> |
| | | AND ope.operate_type = 5 |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "clientNum != null and clientNum > 0"> |
| | | AND cli.clientNum like CONCAT('%',#{clientNum},'%') |
| | | </if> |
| | | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--获取返还记录,管理平台充值列表使用--> |
| | | <select id="getRefunds" resultType="com.dy.pipIrrGlobal.voSe.VoRefund"> |
| | | SELECT |
| | | cli.name AS clientName, |
| | | cli.clientNum, |
| | | card.cardNum, |
| | | IFNULL(ope.money, 0) AS money, |
| | | IFNULL(ope.refund_amount, 0) AS refundAmount, |
| | | us.name AS operator, |
| | | ope.operate_dt AS operateTime |
| | | FROM se_client_card card |
| | | INNER JOIN se_client cli ON cli.id = card.clientId |
| | | LEFT JOIN se_card_operate ope ON ope.card_id = card.id |
| | | INNER JOIN ba_user us ON us.id = ope.operator |
| | | <where> |
| | | AND ope.operate_type = 5 |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "clientNum != null and clientNum > 0"> |
| | | AND cli.clientNum like CONCAT('%',#{clientNum},'%') |
| | | </if> |
| | | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY ope.operate_dt DESC |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | </mapper> |
| | |
| | | WHERE cardAddr = #{cardAddr} |
| | | AND state IN (1, 3) |
| | | </select> |
| | | |
| | | <!--获取指定时间段水卡使用情况记录数量--> |
| | | <select id="getCardUsagesCount" resultType="com.dy.pipIrrGlobal.voSt.VoCardUsage"> |
| | | SELECT |
| | | cli.name AS clientName, |
| | | card.cardNum, |
| | | (SELECT ROUND(SUM(rch.amount),2) FROM se_recharge_history rch WHERE rch.cardId = card.id AND rch.operateDt BETWEEN #{timeStart} AND #{timeStop}) AS totalRecharge, |
| | | (SELECT ROUND(SUM(his.cl_this_money),2) FROM rm_open_close_valve_history his WHERE his.cl_ic_card_no = card.cardNum AND his.cl_dt BETWEEN #{timeStart} AND #{timeStop}) AS totalConsumption, |
| | | ROUND(card.money,2) AS balance |
| | | FROM se_client_card card |
| | | INNER JOIN se_client cli ON cli.id = card.clientId |
| | | INNER JOIN se_recharge_history rch ON rch.cardId = card.id |
| | | <where> |
| | | <if test="clientName != null and clientName != ''"> |
| | | AND cli.name like CONCAT('%', #{clientName}, '%') |
| | | </if> |
| | | |
| | | <if test="cardNum != null and cardNum != ''"> |
| | | AND card.cardNum like CONCAT('%', #{cardNum}, '%') |
| | | </if> |
| | | |
| | | <if test="clientNum != null and clientNum != ''"> |
| | | AND cli.clientNum like CONCAT('%', #{clientNum}, '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--获取指定时间段水卡使用情况:充值合计、消费合计、余额--> |
| | | <select id="getCardUsages" resultType="com.dy.pipIrrGlobal.voSt.VoCardUsage"> |
| | | SELECT |
| | | cli.name AS clientName, |
| | | card.cardNum, |
| | | (SELECT ROUND(SUM(rch.amount),2) FROM se_recharge_history rch WHERE rch.cardId = card.id AND rch.operateDt BETWEEN #{timeStart} AND #{timeStop}) AS totalRecharge, |
| | | (SELECT ROUND(SUM(his.cl_this_money),2) FROM rm_open_close_valve_history his WHERE his.cl_ic_card_no = card.cardNum AND his.cl_dt BETWEEN #{timeStart} AND #{timeStop}) AS totalConsumption, |
| | | ROUND(card.money,2) AS balance |
| | | FROM se_client_card card |
| | | INNER JOIN se_client cli ON cli.id = card.clientId |
| | | INNER JOIN se_recharge_history rch ON rch.cardId = card.id |
| | | <where> |
| | | <if test="clientName != null and clientName != ''"> |
| | | AND cli.name like CONCAT('%', #{clientName}, '%') |
| | | </if> |
| | | |
| | | <if test="cardNum != null and cardNum != ''"> |
| | | AND card.cardNum like CONCAT('%', #{cardNum}, '%') |
| | | </if> |
| | | |
| | | <if test="clientNum != null and clientNum != ''"> |
| | | AND cli.clientNum like CONCAT('%', #{clientNum}, '%') |
| | | </if> |
| | | </where> |
| | | ORDER BY cli.name, card.cardNum |
| | | <trim prefix="limit "> |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | <!--获取指定时间段内水卡充值总计--> |
| | | <select id="getTotalRecharge" resultType="java.lang.Float"> |
| | | SELECT ROUND(SUM(amount),2) AS totalRecharge |
| | | FROM se_recharge_history |
| | | WHERE operateDt BETWEEN #{timeStart} AND #{timeStop} |
| | | </select> |
| | | |
| | | <!--获取指定时间段内水卡消费总计--> |
| | | <select id="getTotalConsumption" resultType="java.lang.Float"> |
| | | SELECT ROUND(SUM(cl_this_money),2) AS totalConsumption |
| | | FROM rm_open_close_valve_history |
| | | WHERE cl_dt BETWEEN #{timeStart} AND #{timeStop} |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test = "address != null and address !=''"> |
| | | AND cli.address like CONCAT('%',#{address},'%') |
| | | </if> |
| | | |
| | | <if test = "villageId != null and villageId !=''"> |
| | | AND cli.villageId = #{villageId} |
| | | </if> |
| | | <if test = "blockId != null and blockId !=''"> |
| | | AND cli.blockId = #{blockId} |
| | | </if> |
| | | <if test = "divideId != null and divideId !=''"> |
| | | AND cli.divideId = #{divideId} |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | |
| | | <if test = "villageId != null and villageId !=''"> |
| | | AND cli.villageId = #{villageId} |
| | | </if> |
| | | <if test = "blockId != null and blockId !=''"> |
| | | AND cli.blockId = #{blockId} |
| | | </if> |
| | | <if test = "divideId != null and divideId !=''"> |
| | | AND cli.divideId = #{divideId} |
| | | </if> |
| | | </where> |
| | | ORDER BY cli.operateDt DESC |
| | | <trim prefix="limit " > |
New file |
| | |
| | | <?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.dy.pipIrrGlobal.daoSe.SeClientTempMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSe.SeClientTemp"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table se_client_temp--> |
| | | <id column="id" jdbcType="INTEGER" property="id" /> |
| | | <result column="town" jdbcType="VARCHAR" property="town" /> |
| | | <result column="village" jdbcType="VARCHAR" property="village" /> |
| | | <result column="name" jdbcType="VARCHAR" property="name" /> |
| | | <result column="idCard" jdbcType="VARCHAR" property="idcard" /> |
| | | <result column="phone" jdbcType="VARCHAR" property="phone" /> |
| | | <result column="address" jdbcType="VARCHAR" property="address" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, town, village, `name`, idCard, phone, address |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from se_client_temp |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |
| | | <!--@mbg.generated--> |
| | | delete from se_client_temp |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientTemp" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | | insert into se_client_temp (town, village, `name`, |
| | | idCard, phone, address |
| | | ) |
| | | values (#{town,jdbcType=VARCHAR}, #{village,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, |
| | | #{idcard,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientTemp" useGeneratedKeys="true"> |
| | | <!--@mbg.generated--> |
| | | insert into se_client_temp |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="town != null"> |
| | | town, |
| | | </if> |
| | | <if test="village != null"> |
| | | village, |
| | | </if> |
| | | <if test="name != null"> |
| | | `name`, |
| | | </if> |
| | | <if test="idcard != null"> |
| | | idCard, |
| | | </if> |
| | | <if test="phone != null"> |
| | | phone, |
| | | </if> |
| | | <if test="address != null"> |
| | | address, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="town != null"> |
| | | #{town,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="village != null"> |
| | | #{village,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="name != null"> |
| | | #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="idcard != null"> |
| | | #{idcard,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="phone != null"> |
| | | #{phone,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="address != null"> |
| | | #{address,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientTemp"> |
| | | <!--@mbg.generated--> |
| | | update se_client_temp |
| | | <set> |
| | | <if test="town != null"> |
| | | town = #{town,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="village != null"> |
| | | village = #{village,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="name != null"> |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="idcard != null"> |
| | | idCard = #{idcard,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="phone != null"> |
| | | phone = #{phone,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="address != null"> |
| | | address = #{address,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientTemp"> |
| | | <!--@mbg.generated--> |
| | | update se_client_temp |
| | | set town = #{town,jdbcType=VARCHAR}, |
| | | village = #{village,jdbcType=VARCHAR}, |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | idCard = #{idcard,jdbcType=VARCHAR}, |
| | | phone = #{phone,jdbcType=VARCHAR}, |
| | | address = #{address,jdbcType=VARCHAR} |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | |
| | | <!--根据镇名获取农户--> |
| | | <select id="getClientsByTownName" resultType="com.dy.pipIrrGlobal.pojoSe.SeClientTemp"> |
| | | SELECT * FROM se_client_temp WHERE town = #{townName} |
| | | </select> |
| | | </mapper> |
| | |
| | | SELECT |
| | | DISTINCT Date(ope.operate_dt) AS operateDate |
| | | FROM se_card_operate ope |
| | | WHERE Date(ope.operate_dt) NOT IN(SELECT operate_date FROM se_general) AND Date(ope.operate_dt) != CURDATE() |
| | | WHERE Date(ope.operate_dt) NOT IN(SELECT operate_date FROM se_general) |
| | | <!-- 取消当天限制--> |
| | | <!-- AND Date(ope.operate_dt) != CURDATE()--> |
| | | </select> |
| | | |
| | | <!--根据交易日期获取总账记录列表(待生成的) --> |
| | |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import com.dy.pipIrrGlobal.pojoRm.*; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClient; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientCard; |
| | | import com.dy.pipIrrGlobal.voSe.VoCardInfo1; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void savePrConctrollerTramp(PrControllerTramp po){ |
| | | if(po.getOrgTag().trim().length() > 2) { |
| | | po.setOrgTag("DY"); |
| | | } |
| | | this.prControllerTrampMapperDao.insert(po) ; |
| | | } |
| | | /** |
| | |
| | | package com.dy.rtuMw.server.rtuData.p206V1_0_0; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import com.dy.rtuMw.server.rtuData.TaskSurpport; |
| | | import com.dy.rtuMw.server.rtuData.dbSv.DbSv; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | |
| | |
| | | datasource: #配置数据源 |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | # url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.130.130.233:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | #url: jdbc:mysql://8.140.179.55:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.130.130.233:3306/pipIrr_test?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | username: root |
| | | password: dysql,;.abc!@# |
| | | druid: |
| | |
| | | }) |
| | | } |
| | | ) |
| | | @MapperScan(basePackages={"com.dy.pipIrrGlobal.daoRm", "com.dy.pipIrrGlobal.daoPr", "com.dy.pipIrrGlobal.daoSe", "com.dy.pipIrrGlobal.daoBa"}) |
| | | @MapperScan(basePackages={"com.dy.pipIrrGlobal.daoOp", "com.dy.pipIrrGlobal.daoBa"}) |
| | | public class PipIrrAppApplication { |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | package com.dy.pipIrrApp.captcha; |
| | | |
| | | import com.dy.common.multiDataSource.DataSourceContext; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.pipIrrApp.captcha.dto.CaptchaDomain; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaCaptcha; |
| | | import jakarta.servlet.ServletOutputStream; |
| | |
| | | */ |
| | | @GetMapping("/get") |
| | | @ResponseBody |
| | | public CaptchaDomain getCaptcha(HttpServletRequest request, @RequestParam(value = "type", required = false, defaultValue = "char") String type) { |
| | | public BaseResponse<CaptchaDomain> getCaptcha(HttpServletRequest request, @RequestParam(value = "type", required = false, defaultValue = "char") String type) { |
| | | // 配置数据源 |
| | | HttpServletRequest httpRequest = (HttpServletRequest) request; |
| | | String wxDataSourceName = httpRequest.getHeader("tag"); |
| | |
| | | captchaDomain.setText(null); |
| | | captchaDomain.setCode(null); |
| | | // 返回前端信息 |
| | | return captchaDomain; |
| | | return BaseResponseUtils.buildSuccess(captchaDomain); |
| | | } else { |
| | | return null; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrApp.inspect; |
| | | |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.util.IDLongGenerator; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.pipIrrApp.inspect.dto.Inspects; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeInspect; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeTrack; |
| | | import jakarta.validation.Valid; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:21 |
| | | * @LastEditTime 2024-09-24 10:21 |
| | | * @Description |
| | | */ |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping(path="inspect") |
| | | public class InspectCtrl { |
| | | @Autowired |
| | | private InspectSv inspectSv; |
| | | |
| | | private final IDLongGenerator idLongGenerator; |
| | | |
| | | public InspectCtrl(IDLongGenerator idLongGenerator) { |
| | | this.idLongGenerator = idLongGenerator; |
| | | } |
| | | |
| | | /** |
| | | * 添加巡检轨迹 |
| | | * @param list_Inspects 巡检对象数组 |
| | | * @param bindingResult |
| | | * @return |
| | | */ |
| | | @PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> save(@RequestBody @Valid List<Inspects> list_Inspects, BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | if(list_Inspects != null && list_Inspects.size() > 0) { |
| | | for (int i = 0; i < list_Inspects.size(); i++) { |
| | | Inspects inspects = list_Inspects.get(i); |
| | | |
| | | Long inspectorId = inspects.getInspectorId(); |
| | | Long inspectId = inspects.getInspectId(); |
| | | Date startTime = inspects.getStartTime(); |
| | | Date stopTime = inspects.getStopTime(); |
| | | List<OpeTrack> tracks = inspects.getTracks(); |
| | | |
| | | if(tracks == null || tracks.size() == 0) { |
| | | return BaseResponseUtils.buildErrorMsg("无巡检轨迹"); |
| | | } |
| | | |
| | | if(inspectId == null || inspectId.equals(0)) { |
| | | // 该巡检未上传过记录 |
| | | |
| | | // 添加巡检记录 |
| | | OpeInspect opeInspect = new OpeInspect(); |
| | | opeInspect.setInspectorId(inspects.getInspectorId()); |
| | | if(startTime != null) { |
| | | opeInspect.setStartTime(startTime); |
| | | } |
| | | if(stopTime != null) { |
| | | opeInspect.setStopTime(stopTime); |
| | | } |
| | | inspectId = inspectSv.addInspect(opeInspect); |
| | | if(inspectId == null) { |
| | | return BaseResponseUtils.buildErrorMsg("巡检记录添加失败"); |
| | | } |
| | | |
| | | for (int j = 0; j < tracks.size(); j++) { |
| | | tracks.get(j).setId(idLongGenerator.generate()); |
| | | tracks.get(j).setInspectId(inspectId); |
| | | } |
| | | Integer rec = inspectSv.insertTracks(tracks); |
| | | if(rec == null || rec == 0) { |
| | | return BaseResponseUtils.buildErrorMsg("巡检轨迹添加失败"); |
| | | } |
| | | }else { |
| | | // 该巡检已上传过记录,续传 |
| | | |
| | | } |
| | | } |
| | | return BaseResponseUtils.buildSuccess() ; |
| | | } |
| | | return BaseResponseUtils.buildErrorMsg("您提交的巡检轨迹为空"); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrApp.inspect; |
| | | |
| | | import com.dy.pipIrrGlobal.daoOp.OpeInspectMapper; |
| | | import com.dy.pipIrrGlobal.daoOp.OpeTrackMapper; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeInspect; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeTrack; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:21 |
| | | * @LastEditTime 2024-09-24 10:21 |
| | | * @Description |
| | | */ |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class InspectSv { |
| | | @Autowired |
| | | private OpeInspectMapper opeInspectMapper; |
| | | |
| | | @Autowired |
| | | private OpeTrackMapper opeTrackMapper; |
| | | |
| | | /** |
| | | * 添加巡检记录 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Long addInspect(OpeInspect po) { |
| | | opeInspectMapper.insert(po); |
| | | return po.getId(); |
| | | } |
| | | |
| | | /** |
| | | * 批量添加巡检轨迹 |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertTracks(List<OpeTrack> list) { |
| | | return opeTrackMapper.insertTracks(list); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrApp.inspect.dto; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeTrack; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 15:17 |
| | | * @LastEditTime 2024-09-24 15:17 |
| | | * @Description 巡检对象 |
| | | */ |
| | | |
| | | @Data |
| | | public class Inspects { |
| | | public static final long serialVersionUID = 202409241517001L; |
| | | |
| | | /** |
| | | * 巡检员ID |
| | | */ |
| | | @NotNull(message = "巡检员不能为空") |
| | | private Long inspectorId; |
| | | |
| | | /** |
| | | * 巡检ID,该次巡检已提交过记录时有值,主要用于后续打点。 |
| | | */ |
| | | private Long inspectId; |
| | | |
| | | /** |
| | | * 开始巡检时间 |
| | | */ |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束巡检时间 |
| | | */ |
| | | private Date stopTime; |
| | | |
| | | /** |
| | | * 巡检轨迹 |
| | | */ |
| | | @NotEmpty(message = "巡检轨迹不能为空") |
| | | private List<OpeTrack> tracks; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrApp.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:32 |
| | | * @LastEditTime 2024-09-24 10:32 |
| | | * @Description 开始巡检打点对象 |
| | | */ |
| | | |
| | | @Data |
| | | public class StartPoint { |
| | | public static final long serialVersionUID = 202409241034001L; |
| | | |
| | | /** |
| | | * 巡检员ID |
| | | */ |
| | | private Long inspectorId; |
| | | |
| | | /** |
| | | * 开始巡检时间 |
| | | */ |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 打卡点 |
| | | */ |
| | | private TrackPoint trackPoint; |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrApp.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:49 |
| | | * @LastEditTime 2024-09-24 10:49 |
| | | * @Description 结束巡检打点对象 |
| | | */ |
| | | |
| | | @Data |
| | | public class StopPoint { |
| | | public static final long serialVersionUID = 202409241053001L; |
| | | |
| | | /** |
| | | * 巡检ID |
| | | */ |
| | | private Long inspectId; |
| | | |
| | | /** |
| | | * 结束巡检时间 |
| | | */ |
| | | private Date stopTime; |
| | | |
| | | /** |
| | | * 打卡点 |
| | | */ |
| | | private TrackPoint trackPoint; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrApp.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-24 10:44 |
| | | * @LastEditTime 2024-09-24 10:44 |
| | | * @Description 打点对象 |
| | | */ |
| | | |
| | | @Data |
| | | public class TrackPoint { |
| | | public static final long serialVersionUID = 202409241045001L; |
| | | |
| | | /** |
| | | * 打点精度 |
| | | */ |
| | | private BigDecimal lng; |
| | | |
| | | /** |
| | | * 打点纬度 |
| | | */ |
| | | private BigDecimal lat; |
| | | |
| | | /** |
| | | * 打点时间 |
| | | */ |
| | | private Date locateTime; |
| | | } |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj |
| | | include: global, database, database-ym, database-pj, database-test |
| | | |
| | | #actutor的web端口 |
| | | management: |
| | |
| | | import com.dy.pipIrrBase.result.SystemResultCode; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaUser; |
| | | import com.dy.pipIrrGlobal.util.Constant; |
| | | import com.dy.pipIrrGlobal.voBa.VoSimpleUser; |
| | | import com.dy.pipIrrGlobal.voBa.VoUserInfo; |
| | | import com.mysql.cj.util.StringUtils; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取简单用户数据列表,数据列表查询条件中使用 |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "simple_users") |
| | | @SsoAop() |
| | | public BaseResponse<List<VoSimpleUser>> getSimpleUsers(){ |
| | | try { |
| | | return BaseResponseUtils.buildSuccess(sv.getSimpleUsers()); |
| | | } catch (Exception e) { |
| | | log.error("查询简单用户信息异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.dy.pipIrrGlobal.pojoBa.BaRolePermissions; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaUser; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaUserRole; |
| | | import com.dy.pipIrrGlobal.voBa.VoSimpleUser; |
| | | import com.dy.pipIrrGlobal.voBa.VoUserInfo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | |
| | | voUserInfo.setRoleIds(list_roleIds); |
| | | voUserInfo.setRoleNames(list_roleNames); |
| | | voUserInfo.setPermissions(array_permission); |
| | | |
| | | |
| | | return voUserInfo; |
| | | } |
| | | |
| | | /** |
| | | * 获取简单用户数据列表,数据列表查询条件中使用 |
| | | * @return |
| | | */ |
| | | public List<VoSimpleUser> getSimpleUsers() { |
| | | return dao.getSimpleUsers(); |
| | | } |
| | | |
| | | } |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj |
| | | include: global, database, database-ym, database-pj, database-test |
| | | user: |
| | | defaultTrueRandomFalsePassword: true #true:采用默认密码,false:系统产生随机密码 |
| | | defaultPassword: "abc_123" |
| | | # defaultPassword: "admin" |
| | | |
| | | #actutor的web端口 |
| | | management: |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj |
| | | include: global, database, database-ym, database-pj, database-test |
| | | |
| | | #actutor的web端口 |
| | | management: |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj |
| | | include: global, database, database-ym, database-pj, database-test |
| | | |
| | | #actutor的web端口 |
| | | management: |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj |
| | | include: global, database, database-ym, database-pj, database-test |
| | | |
| | | #actutor的web端口 |
| | | management: |
| | |
| | | package com.dy.pipIrrProject.intakeController; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | |
| | | @GetMapping(path = "/getTrampControllers") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<PrControllerTramp>>> getTrampControllers(TrampControllerQueryVo vo) { |
| | | |
| | | try { |
| | | QueryResultVo<List<PrControllerTramp>> res = intakeControllerSv.getTrampControllers(vo); |
| | | if (res.itemTotal != null && res.itemTotal > 0) { |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } else { |
| | | //请求成功但数据为空 |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } |
| | | //return BaseResponseUtils.buildSuccess(res); |
| | | //QueryResultVo<List<PrControllerTramp>> res = intakeControllerSv.getTrampControllers(vo); |
| | | //if (res.itemTotal != null && res.itemTotal > 0) { |
| | | // return BaseResponseUtils.buildSuccess(res); |
| | | //} else { |
| | | // //请求成功但数据为空 |
| | | // return BaseResponseUtils.buildSuccess(res); |
| | | //} |
| | | return BaseResponseUtils.buildSuccess(intakeControllerSv.getTrampControllers(vo)); |
| | | } catch (Exception e) { |
| | | log.error("获取流浪控制器记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj |
| | | include: global, database, database-ym, database-pj, database-test |
| | | |
| | | #actutor的web端口 |
| | | management: |
| | |
| | | if(timeStart_open != null && timeStart_open != "") { |
| | | timeStart_open = timeStart_open + " 00:00:00"; |
| | | } else { |
| | | timeStart_open = LocalDate.now() + " 00:00:00"; |
| | | timeStart_open = LocalDateTime.now().minusDays(30) + " 00:00:00"; |
| | | } |
| | | qo.setTimeStop_open(timeStart_open); |
| | | qo.setTimeStart_open(timeStart_open); |
| | | |
| | | if(timeStop_open != null && timeStop_open != "") { |
| | | timeStop_open = timeStop_open + " 23:59:59"; |
| | |
| | | if(timeStart_close != null && timeStart_close != "") { |
| | | timeStart_close = timeStart_close + " 00:00:00"; |
| | | } else { |
| | | timeStart_close = LocalDate.now() + " 00:00:00"; |
| | | timeStart_close = LocalDate.now().minusDays(30) + " 00:00:00"; |
| | | } |
| | | qo.setTimeStart_close(timeStart_close); |
| | | |
| | |
| | | String timeStop_open = qo.getTimeStop_open(); |
| | | if(timeStart_open != null) { |
| | | timeStart_open = timeStart_open + " 00:00:00"; |
| | | qo.setTimeStop_open(timeStart_open); |
| | | qo.setTimeStart_open(timeStart_open); |
| | | } |
| | | if(timeStop_open != null) { |
| | | timeStop_open = timeStop_open + " 23:59:59"; |
| | |
| | | private String intakeNum; |
| | | |
| | | /** |
| | | * 农户姓名 |
| | | */ |
| | | private String clientName; |
| | | |
| | | /** |
| | | * 阀控器地址 |
| | | */ |
| | | private String rtuAddr; |
| | |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.multiDataSource.DataSourceContext; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.CodeV1_0_1; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.downVos.*; |
| | | import com.dy.common.mw.protocol.p206V202404.CodeV202404; |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 获取功能码 |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 获取功能码 |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 获取功能码 |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 获取功能码 |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 获取功能码 |
| | |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.multiDataSource.DataSourceContext; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.CodeV1_0_1; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.downVos.*; |
| | | import com.dy.common.mw.protocol.p206V202404.CodeV202404; |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | |
| | | } |
| | | //Long intakeId = job_rtu.getLong("intakeId"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | String commandCode = null; |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage()); |
| | | } |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | String commandCode = null; |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | String orgTag = DataSourceContext.get(); |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj |
| | | include: global, database, database-ym, database-pj, database-test |
| | | |
| | | #actutor的web端口 |
| | | management: |
| | |
| | | }) |
| | | } |
| | | ) |
| | | @MapperScan({"com.dy.pipIrrGlobal.daoSe", "com.dy.pipIrrGlobal.daoBa", "com.dy.pipIrrGlobal.daoPr"}) |
| | | @MapperScan({"com.dy.pipIrrGlobal.daoSe", "com.dy.pipIrrGlobal.daoBa", "com.dy.pipIrrGlobal.daoPr", "com.dy.pipIrrGlobal.daoRm"}) |
| | | public class PipIrrSellApplication { |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientCard; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeManagerCard; |
| | | import com.dy.pipIrrGlobal.util.AmountToChinese; |
| | | import com.dy.pipIrrGlobal.voSe.VoActiveCard; |
| | | import com.dy.pipIrrGlobal.voSe.VoOperate; |
| | | import com.dy.pipIrrGlobal.voSe.VoRecharge; |
| | | import com.dy.pipIrrGlobal.voSe.VoReissueCard; |
| | | import com.dy.pipIrrGlobal.voRm.VoExpend; |
| | | import com.dy.pipIrrGlobal.voSe.*; |
| | | import com.dy.pipIrrSell.cardOperate.dto.*; |
| | | import com.dy.pipIrrSell.cardOperate.enums.OperateTypeENUM; |
| | | import com.dy.pipIrrSell.cardOperate.qo.*; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取充值记录,管理平台充值列表使用,APP未使用 |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "/getRechargesNew") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoRechargeNew>>> getRechargesNew(QoRecharge vo){ |
| | | try { |
| | | QueryResultVo<List<VoRechargeNew>> res = cardOperateSv.getRechargesNew(vo); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("获取充值记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取返还记录,管理平台充值列表使用 |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "/refunds") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoRefund>>> getRefunds(QoRecharge vo){ |
| | | try { |
| | | QueryResultVo<List<VoRefund>> res = cardOperateSv.getRefunds(vo); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("获取返还记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取水卡消费记录,管理平台使用 |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "/expends") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoExpend>>> getExpends(QoRecharge vo){ |
| | | try { |
| | | QueryResultVo<List<VoExpend>> res = cardOperateSv.getExpends(vo); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("获取消费记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据指定条件获取交易明细 |
| | | * @param vo |
| | | * @return |
| | |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoBa.BaSettingsMapper; |
| | | import com.dy.pipIrrGlobal.daoRm.RmOpenCloseValveHistoryMapper; |
| | | import com.dy.pipIrrGlobal.daoSe.*; |
| | | import com.dy.pipIrrGlobal.pojoSe.*; |
| | | import com.dy.pipIrrGlobal.voRm.VoExpend; |
| | | import com.dy.pipIrrGlobal.voSe.*; |
| | | import com.dy.pipIrrSell.cardOperate.dto.DtoRecharge; |
| | | import com.dy.pipIrrSell.cardOperate.enums.OperateTypeENUM; |
| | |
| | | |
| | | @Autowired |
| | | private SeRechargeHistoryMapper seRechargeHistoryMapper; |
| | | |
| | | @Autowired |
| | | private RmOpenCloseValveHistoryMapper rmOpenCloseValveHistoryMapper; |
| | | |
| | | @Value("${project.projectNo}") |
| | | private Integer projectNo; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取充值记录,管理平台充值列表使用,APP未使用 |
| | | * @param queryVo |
| | | * @return |
| | | */ |
| | | public QueryResultVo<List<VoRechargeNew>> getRechargesNew(QoRecharge queryVo) { |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); |
| | | |
| | | Long itemTotal = seCardOperateMapper.getRechargesCountNew(params); |
| | | |
| | | QueryResultVo<List<VoRechargeNew>> rsVo = new QueryResultVo<>() ; |
| | | rsVo.pageSize = queryVo.pageSize ; |
| | | rsVo.pageCurr = queryVo.pageCurr ; |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = seCardOperateMapper.getRechargesNew(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 获取返还记录,管理平台充值列表使用 |
| | | * @param queryVo |
| | | * @return |
| | | */ |
| | | public QueryResultVo<List<VoRefund>> getRefunds(QoRecharge queryVo) { |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); |
| | | |
| | | Long itemTotal = seCardOperateMapper.getRefundsCount(params); |
| | | |
| | | QueryResultVo<List<VoRefund>> rsVo = new QueryResultVo<>() ; |
| | | rsVo.pageSize = queryVo.pageSize ; |
| | | rsVo.pageCurr = queryVo.pageCurr ; |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = seCardOperateMapper.getRefunds(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 获取水卡消费记录,管理平台使用 |
| | | * @param queryVo |
| | | * @return |
| | | */ |
| | | public QueryResultVo<List<VoExpend>> getExpends(QoRecharge queryVo) { |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); |
| | | |
| | | Long itemTotal = rmOpenCloseValveHistoryMapper.getExpendsCount(params); |
| | | |
| | | QueryResultVo<List<VoExpend>> rsVo = new QueryResultVo<>() ; |
| | | rsVo.pageSize = queryVo.pageSize ; |
| | | rsVo.pageCurr = queryVo.pageCurr ; |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = rmOpenCloseValveHistoryMapper.getExpends(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 根据指定条件获取交易记录 |
| | | * @param vo |
| | | * @return |
| | |
| | | * @return |
| | | */ |
| | | public Map getReceipts(QoReceipt queryVo) { |
| | | if (queryVo.getTimeStart() != null && queryVo.getTimeStart() != ""){ |
| | | queryVo.setTimeStart(queryVo.getTimeStart() + " 00:00:00"); |
| | | } |
| | | if (queryVo.getTimeStop() != null && queryVo.getTimeStop() != ""){ |
| | | queryVo.setTimeStop(queryVo.getTimeStop() + " 23:59:59"); |
| | | } |
| | | |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); |
| | | |
| | | DecimalFormat df = new DecimalFormat("#.00"); |
| | |
| | | |
| | | @Schema(description = "充值机时间_结束") |
| | | public String timeStop; |
| | | |
| | | /** |
| | | * 是否仅存在赠送金额的 |
| | | */ |
| | | public Boolean onlyGift; |
| | | /** |
| | | * 收银员ID |
| | | */ |
| | | public String cashierId; |
| | | } |
| | |
| | | //@Schema(description = "村ID") |
| | | //public Long villageId ; |
| | | // |
| | | //@Schema(description = "片区ID") |
| | | //public Long blockId ; |
| | | @Schema(description = "片区ID") |
| | | public String blockId ; |
| | | |
| | | @Schema(description = "分水房ID") |
| | | public String divideId ; |
| | | |
| | | @Schema(description = "农户姓名") |
| | | public String name; |
New file |
| | |
| | | package com.dy.pipIrrSell.clientTemp; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClient; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientTemp; |
| | | import com.dy.pipIrrSell.client.ClientSv; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-26 15:03 |
| | | * @LastEditTime 2024-09-26 15:03 |
| | | * @Description |
| | | */ |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping(path = "client_temp") |
| | | @RequiredArgsConstructor |
| | | public class ClientTempCtrl { |
| | | private final ClientTempSv clientTempSv; |
| | | private final ClientSv clientSv; |
| | | |
| | | /** |
| | | * 导入农户 |
| | | * @param townName |
| | | * @return |
| | | */ |
| | | @PostMapping(path = "import") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> importClient(String townName){ |
| | | List<SeClientTemp> list_client = clientTempSv.getClientsByTownName(townName); |
| | | if(list_client != null && list_client.size() > 0) { |
| | | JSONArray array_Clients = (JSONArray) JSON.toJSON(list_client); |
| | | for (int i = 0; i < array_Clients.size(); i++) { |
| | | JSONObject job_client = array_Clients.getJSONObject(i); |
| | | String town = job_client.getString("town"); |
| | | String village = job_client.getString("village"); |
| | | String name = job_client.getString("name"); |
| | | String idCard = job_client.getString("idcard"); |
| | | String phone = job_client.getString("phone"); |
| | | if(phone != null && phone.length() > 11) { |
| | | phone = phone.substring(0,11); |
| | | } |
| | | String address = job_client.getString("address"); |
| | | |
| | | if(town.trim().equals("元马镇6号")) { |
| | | SeClient client = new SeClient(); |
| | | //client.setCountyid(28L); |
| | | //client.setTownid(101L); |
| | | //client.setVillageid(6L); |
| | | client.setCountyid(2024090516595200202L); |
| | | client.setTownid(2024090517240900002L); |
| | | client.setVillageid(2024090517284400002L); |
| | | client.setBlockid(2024090517155600002L); |
| | | client.setDivideid(2024090517323800007L); |
| | | client.setName(name); |
| | | client.setClientnum("28101006" + String.format("%04d", i+1)); |
| | | client.setDistrictnum(532328101006L); |
| | | client.setDistricttitle("元谋县元马镇清和社区居民委员会"); |
| | | client.setPhone(phone); |
| | | client.setIdcard(idCard); |
| | | client.setTypeid(2024090516595201402L); |
| | | client.setAddress(address); |
| | | client.setOperator (2024090516595200302L); |
| | | client.setOperatedt(new Date()); |
| | | client.setDisabled((byte)0); |
| | | client.setDeleted((byte)0); |
| | | |
| | | Integer rec = clientSv.addClient(client); |
| | | } else if(town.trim().equals("老城乡2号")) { |
| | | SeClient client = new SeClient(); |
| | | //client.setCountyid(28L); |
| | | //client.setTownid(202L); |
| | | //client.setVillageid(204L); |
| | | client.setCountyid(2024090516595200202L); |
| | | client.setTownid(2024090517252600002L); |
| | | client.setVillageid(2024090517294000002L); |
| | | client.setBlockid(2024090517155600002L); |
| | | client.setDivideid(2024090517355700007L); |
| | | client.setName(name); |
| | | client.setClientnum("28202204" + String.format("%04d", i)); |
| | | client.setDistrictnum(532328202204L); |
| | | client.setDistricttitle("元谋县老城乡挨小村民委员会"); |
| | | client.setPhone(phone); |
| | | client.setIdcard(idCard); |
| | | client.setTypeid(2024090516595201402L); |
| | | client.setAddress(address); |
| | | client.setOperator (2024090516595200302L); |
| | | client.setOperatedt(new Date()); |
| | | client.setDisabled((byte)0); |
| | | client.setDeleted((byte)0); |
| | | |
| | | Integer rec = clientSv.addClient(client); |
| | | } |
| | | |
| | | System.out.println("-----------------------------: " + i); |
| | | } |
| | | |
| | | } |
| | | return BaseResponseUtils.buildSuccess(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrSell.clientTemp; |
| | | |
| | | import com.dy.pipIrrGlobal.daoSe.SeClientMapper; |
| | | import com.dy.pipIrrGlobal.daoSe.SeClientTempMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientTemp; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-26 15:03 |
| | | * @LastEditTime 2024-09-26 15:03 |
| | | * @Description |
| | | */ |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class ClientTempSv { |
| | | @Autowired |
| | | private SeClientTempMapper seClientTempMapper; |
| | | |
| | | @Autowired |
| | | private SeClientMapper seClientMapper; |
| | | |
| | | public List<SeClientTemp> getClientsByTownName(String townName ) { |
| | | return seClientTempMapper.getClientsByTownName(townName); |
| | | } |
| | | } |
| | |
| | | |
| | | // 获取各支付方式ID |
| | | Long paymentId_cash = 0L; |
| | | Long paymentId_wechat = 0L; |
| | | Long paymentId_alipay = 0L; |
| | | //Long paymentId_wechat = 0L; |
| | | //Long paymentId_alipay = 0L; |
| | | Long paymentId_pos = 0L; |
| | | Long paymentId_transfer = 0L; |
| | | List<SePaymentMethod> list_payment = sePaymentMethodMapper.getPaymentMethods(); |
| | | for (int i = 0; i < list_payment.size(); i++) { |
| | |
| | | if(paymentMethod.getName().equals("现金")) { |
| | | paymentId_cash = paymentMethod.getId(); |
| | | } |
| | | if(paymentMethod.getName().equals("微信支付")) { |
| | | paymentId_wechat = paymentMethod.getId(); |
| | | } |
| | | if(paymentMethod.getName().equals("支付宝支付")) { |
| | | paymentId_alipay = paymentMethod.getId(); |
| | | //if(paymentMethod.getName().equals("微信支付")) { |
| | | // paymentId_wechat = paymentMethod.getId(); |
| | | //} |
| | | //if(paymentMethod.getName().equals("支付宝支付")) { |
| | | // paymentId_alipay = paymentMethod.getId(); |
| | | //} |
| | | if(paymentMethod.getName().equals("POS机")) { |
| | | paymentId_pos = paymentMethod.getId(); |
| | | } |
| | | if(paymentMethod.getName().equals("银行转账")) { |
| | | paymentId_transfer = paymentMethod.getId(); |
| | |
| | | String tradeDate = dateFormat.format(calendar.getTime()) ; |
| | | if(cashierId != 1000000L) { |
| | | Float receivedCash = Optional.ofNullable(seGeneralMapper.getPaymentSums(tradeDate, cashierId, paymentId_cash)).orElse(0f); |
| | | Float receivedWechat = Optional.ofNullable(seGeneralMapper.getPaymentSums(tradeDate, cashierId,paymentId_wechat)).orElse(0f); |
| | | Float receivedAlipay = Optional.ofNullable(seGeneralMapper.getPaymentSums(tradeDate, cashierId,paymentId_alipay)).orElse(0f); |
| | | //Float receivedWechat = Optional.ofNullable(seGeneralMapper.getPaymentSums(tradeDate, cashierId,paymentId_wechat)).orElse(0f); |
| | | //Float receivedAlipay = Optional.ofNullable(seGeneralMapper.getPaymentSums(tradeDate, cashierId,paymentId_alipay)).orElse(0f); |
| | | Float receivedPos = Optional.ofNullable(seGeneralMapper.getPaymentSums(tradeDate, cashierId,paymentId_pos)).orElse(0f); |
| | | Float receivedTransfer = Optional.ofNullable(seGeneralMapper.getPaymentSums(tradeDate, cashierId, paymentId_transfer)).orElse(0f); |
| | | |
| | | JSONObject job = new JSONObject(); |
| | | job.put("tradeDate", tradeDate); |
| | | job.put("receivedCash", receivedCash); |
| | | job.put("receivedWechat", receivedWechat); |
| | | job.put("receivedAlipay", receivedAlipay); |
| | | //job.put("receivedWechat", receivedWechat); |
| | | //job.put("receivedAlipay", receivedAlipay); |
| | | job.put("receivedPos", receivedPos); |
| | | job.put("receivedTransfer", receivedTransfer); |
| | | array_paymentSums.add(job); |
| | | |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj |
| | | include: global, database, database-ym, database-pj, database-test |
| | | |
| | | #actutor的web端口 |
| | | management: |
| | |
| | | String token = Optional.ofNullable(vo.getToken()).orElse(""); |
| | | String code = Optional.ofNullable(vo.getCode()).orElse(""); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | if(token.length() > 0 && code.length() > 0) { |
| | | // 从session中获取验证码 |
| | | //HttpSession session = (HttpSession) request.getSession(); |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj |
| | | include: global, database, database-ym, database-pj, database-test |
| | | |
| | | #actutor的web端口 |
| | | management: |
| | |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.voSt.VoCardUsage; |
| | | import com.dy.pipIrrGlobal.voSt.VoICCard; |
| | | import com.dy.pipIrrStatistics.card.IcCardqo.CommonQO; |
| | | import com.dy.pipIrrStatistics.card.qo.CardUsageQO; |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取指定时间段水卡使用情况:充值合计、消费合计、余额 |
| | | * @param qo |
| | | //* @param bindingResult |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "/card_usage") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoCardUsage>>> getCardUsages(@Valid CardUsageQO qo, BindingResult bindingResult) { |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | try { |
| | | return BaseResponseUtils.buildSuccess(icCardSv.getCardUsages(qo)); |
| | | } catch (Exception e) { |
| | | log.error("获取开卡记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取售水总计信息:充值金额总计、水表消费金额总计 |
| | | * @param qo |
| | | * @param bindingResult |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "/total_water_use") |
| | | @SsoAop() |
| | | public BaseResponse<Map> getTotalWaterUse(@Valid CardUsageQO qo, BindingResult bindingResult) { |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | try { |
| | | return BaseResponseUtils.buildSuccess(icCardSv.getTotalWaterUse(qo)); |
| | | } catch (Exception e) { |
| | | log.error("获取开卡记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoSe.SeCardOperateMapper; |
| | | import com.dy.pipIrrGlobal.daoSe.SeClientCardMapper; |
| | | import com.dy.pipIrrGlobal.voSt.VoCardUsage; |
| | | import com.dy.pipIrrGlobal.voSt.VoICCard; |
| | | import com.dy.pipIrrGlobal.voSt.VoIntakeAccumulateAmount; |
| | | import com.dy.pipIrrStatistics.card.IcCardqo.CommonQO; |
| | | import com.dy.pipIrrStatistics.card.qo.CardUsageQO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | Double totalMoney = seClientCardMapper.getTotalMoneyIcCards(); |
| | | return totalMoney ; |
| | | } |
| | | |
| | | /** |
| | | * 获取指定时间段水卡使用情况:充值合计、消费合计、余额 |
| | | * @param qo |
| | | * @return |
| | | */ |
| | | public QueryResultVo<List<VoCardUsage>> getCardUsages(CardUsageQO qo) { |
| | | |
| | | String timeStart = qo.getTimeStart(); |
| | | String timeStop = qo.getTimeStop(); |
| | | |
| | | if (timeStart != null && timeStart != ""){ |
| | | timeStart = timeStart + " 00:00:00"; |
| | | }else { |
| | | timeStart = LocalDate.now() + " 00:00:00"; |
| | | } |
| | | if (timeStop != null && timeStop != ""){ |
| | | timeStop = timeStop + " 23:59:59"; |
| | | }else { |
| | | timeStop = LocalDateTime.now().toString(); |
| | | } |
| | | qo.setTimeStart(timeStart); |
| | | qo.setTimeStop(timeStop); |
| | | |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo); |
| | | |
| | | //Long itemTotal = seCardOperateMapper.getOpenCountIcCardsCount(params); |
| | | Integer itemTotal = 0; |
| | | List<VoCardUsage> all = seClientCardMapper.getCardUsagesCount(params); |
| | | if(all != null && all.size() > 0) { |
| | | itemTotal = all.size(); |
| | | } |
| | | |
| | | QueryResultVo<List<VoCardUsage>> rsVo = new QueryResultVo<>() ; |
| | | rsVo.pageSize = qo.pageSize ; |
| | | rsVo.pageCurr = qo.pageCurr ; |
| | | |
| | | rsVo.calculateAndSet(Long.parseLong(itemTotal.toString()), params); |
| | | rsVo.obj = seClientCardMapper.getCardUsages(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 获取售水总计信息:充值金额总计、水表消费金额总计 |
| | | * @param qo |
| | | * @return |
| | | */ |
| | | public Map getTotalWaterUse(CardUsageQO qo) { |
| | | |
| | | String timeStart = qo.getTimeStart(); |
| | | String timeStop = qo.getTimeStop(); |
| | | |
| | | if (timeStart != null && timeStart != ""){ |
| | | timeStart = timeStart + " 00:00:00"; |
| | | }else { |
| | | timeStart = LocalDate.now() + " 00:00:00"; |
| | | } |
| | | if (timeStop != null && timeStop != ""){ |
| | | timeStop = timeStop + " 23:59:59"; |
| | | }else { |
| | | timeStop = LocalDateTime.now().toString(); |
| | | } |
| | | |
| | | Float totalRecharge = Optional.ofNullable(seClientCardMapper.getTotalRecharge(timeStart, timeStop)).orElse(0f); |
| | | Float totalConsumption = Optional.ofNullable(seClientCardMapper.getTotalConsumption(timeStart, timeStop)).orElse(0f); |
| | | Map mat_total = new HashMap(); |
| | | mat_total.put("totalRecharge", totalRecharge); |
| | | mat_total.put("totalConsumption", totalConsumption); |
| | | return mat_total; |
| | | } |
| | | } |
| | |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrStatistics.card.qo; |
| | | |
| | | import com.dy.common.webUtil.QueryConditionVo; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-09-13 16:27 |
| | | * @LastEditTime 2024-09-13 16:27 |
| | | * @Description 水卡使用情况查询对象 |
| | | */ |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class CardUsageQO extends QueryConditionVo { |
| | | |
| | | /** |
| | | * 查询开始时间 |
| | | */ |
| | | //@NotBlank(message = "查询开始时间不能为空") |
| | | private String timeStart; |
| | | |
| | | /** |
| | | * 查询结束时间 |
| | | */ |
| | | //@NotBlank(message = "查询结束时间不能为空") |
| | | private String timeStop; |
| | | |
| | | /** |
| | | * 农户姓名 |
| | | */ |
| | | private String clientName; |
| | | |
| | | /** |
| | | * 水卡编号 |
| | | */ |
| | | private Long cardNum; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | private String clientNum; |
| | | |
| | | |
| | | } |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj |
| | | include: global, database, database-ym, database-pj, database-test |
| | | |
| | | #actutor的web端口 |
| | | management: |
| | |
| | | package com.dy.pipIrrWechat.command; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.dy.common.multiDataSource.DataSourceContext; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.CodeV1_0_1; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.downVos.*; |
| | | import com.dy.common.mw.protocol.p206V202404.CodeV202404; |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | //comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | comSendUrl = env.getProperty(pro_mw + "." + DataSourceContext.get() + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | | String orderNo = generateOrderNo(); |
| | |
| | | } |
| | | Long intakeId = job_rtu.getLong("intakeId"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | //comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | comSendUrl = env.getProperty(pro_mw + "." + DataSourceContext.get() + "." + key_mw); |
| | | |
| | | String commandCode = null; |
| | | if (protocol.equals("p206V202404")) { |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | //comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | comSendUrl = env.getProperty(pro_mw + "." + DataSourceContext.get() + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | | String orderNo = generateOrderNo(); |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | //comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | comSendUrl = env.getProperty(pro_mw + "." + DataSourceContext.get() + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | | String orderNo = generateOrderNo(); |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | //comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | comSendUrl = env.getProperty(pro_mw + "." + DataSourceContext.get() + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | | String orderNo = generateOrderNo(); |
| | |
| | | } |
| | | String rtuAddr = job_rtu.getString("rtuAddr"); |
| | | String protocol = job_rtu.getString("protocol"); |
| | | String orgTag = job_rtu.getString("orgTag"); |
| | | if(orgTag == null) { |
| | | return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | } |
| | | comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | //String orgTag = job_rtu.getString("orgTag"); |
| | | //if(orgTag == null) { |
| | | // return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage()); |
| | | //} |
| | | //comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw); |
| | | comSendUrl = env.getProperty(pro_mw + "." + DataSourceContext.get() + "." + key_mw); |
| | | |
| | | // 生成订单号 |
| | | String orderNo = generateOrderNo(); |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj |
| | | include: global, database, database-ym, database-pj, database-test |
| | | |
| | | #actutor的web端口 |
| | | management: |