Commit 54e37749 authored by zhangyingbin's avatar zhangyingbin

燃气气瓶列表及追溯详情接口设计

parent 5334667f
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class TzCylinderAfterCheckDto {
@ApiModelProperty(value = "充装量在规定范围内")
private Integer withinScope;
@ApiModelProperty(value = "瓶阀及其与瓶口连接的密封良好")
private Integer sealedState;
@ApiModelProperty(value = "瓶体未出现鼓包变形或泄露等严重缺陷")
private Integer defective;
@ApiModelProperty(value = "瓶体温度没有异常升高的迹象")
private Integer abnormalTemperature;
@ApiModelProperty(value = "气瓶粘贴警示标签和充装标签")
private Integer warningSign;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 充装前检查结果DTO
*/
@Data
public class TzCylinderBeforeCheckDto {
@ApiModelProperty(value = "是否在检验有效期以内")
/**
* 是否在检验有效期以内
*/
private String isValid;
@ApiModelProperty(value = "警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致")
/**
* 警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致
*/
private Integer same;
@ApiModelProperty(value = "气瓶外表面的颜色标志是否符合规定")
/**
* 气瓶外表面的颜色标志是否符合规定
*/
private Integer isRegulations;
@ApiModelProperty(value = "气瓶瓶阀的出气口螺纹型式是否符合GB/T15383")
/**
* 气瓶瓶阀的出气口螺纹型式是否符合GB/T15383
*/
private Integer isComplianceWithgbt;
@ApiModelProperty(value = "气瓶内有无剩余压力")
/**
* 气瓶内有无剩余压力
*/
private Integer haveStillPressure;
@ApiModelProperty(value = "气瓶外表面有无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷")
/**
* 气瓶外表面有无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷
*/
private Integer isComplete;
@ApiModelProperty(value = "气瓶的安全附件齐全并符合安全要求")
/**
* 气瓶的安全附件齐全并符合安全要求
*/
private Integer haveSecurityDocuments;
@ApiModelProperty(value = "新投入使用气瓶或经检验后首次投入使用气瓶,充装前应按照规定先置换瓶内空气,并经分析合格后方可充气")
/**
* 新投入使用气瓶或经检验后首次投入使用气瓶,充装前应按照规定先置换瓶内空气,并经分析合格后方可充气
*/
private String fillBeforeItem;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
/**
* 充装检查前检查内容
*/
public class TzCylinderCheckDto {
/**
* 检查项英文名称
*/
private String item;
/**
* 检查项中文名称
*/
private String explain;
/**
* 检查结果
*/
private String result;
public TzCylinderCheckDto(String item, String explain, String result) {
this.item = item;
this.explain = explain;
this.result = result;
}
public String getItem() {
return item;
}
public void setItem(String item) {
this.item = item;
}
public String getExplain() {
return explain;
}
public void setExplain(String explain) {
this.explain = explain;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
}
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 液化气体气瓶充装信息-充装记录Dto
*
* @author duanwei
* @date 2022-08-11
*/
@Data
public class TzCylinderFillingDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
/**
* id
*/
private String sequenceNbr;
/**
* 充装量
*/
private String fillingQuantity;
/**
* 气瓶唯一标识编码
*/
private String sequenceCode;
/**
* 气瓶充装前检查id
*/
private String fillingBeforeId;
/**
* 气瓶充装后检查id
*/
private String fillingCheckId;
@ApiModelProperty(value = "充装记录Id")
/**
* 充装记录Id
*/
private String fillingRecordId;
@ApiModelProperty(value = "充装开始时间")
/**
* 充装开始时间
*/
private String fillingStarttime;
@ApiModelProperty(value = "充装结束时间")
/**
* 充装结束时间
*/
private String fillingEndtime;
@ApiModelProperty(value = "充装人员姓名")
/**
* 充装人员姓名
*/
private String fillingUser;
@ApiModelProperty(value = "不能与充装人员姓名相同")
/**
* 不能与充装人员姓名相同
*/
private String inspectorName;
@ApiModelProperty(value = "室温")
/**
* 室温
*/
private Double temperature;
@ApiModelProperty(value = "异常情况")
/**
* 异常情况
*/
private Integer abnormal;
/**
* 充装前检查结果
*/
private String checkResultsBefore;
/**
* 充装后检查结果
*/
private String checkResultsAfter;
private List<TzCylinderCheckDto> tzCylinderCheckDtoList;
private List<TzCylinderCheckDto> tzCylinderAfterCheckDtoList;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
import java.util.Date;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 气瓶基本信息列表Dto
*
* @author duanwei
* @date 2022-08-11
*/
@Data
public class TzCylinderInfoDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
/**
* id
*/
private String sequenceNbr;
@ApiModelProperty(value = "产权单位名称")
/**
* 产权单位名称
*/
private String unitName;
@ApiModelProperty(value = "设备品种")
/**
* 设备品种
*/
private Integer cylinderVariety;
@ApiModelProperty(value = "产品名称")
/**
* 产品名称
*/
private String productName;
@ApiModelProperty(value = "产品编号")
/**
* 产品编号
*/
private String factoryNum;
@ApiModelProperty(value = "单位内部编号")
/**
* 单位内部编号
*/
private String unitInnerCode;
@ApiModelProperty(value = "充装介质")
/**
* 充装介质
*/
private String fillingMedia;
@ApiModelProperty(value = "气瓶制造单位")
/**
* 气瓶制造单位
*/
private String manufacturingUnit;
@ApiModelProperty(value = "制造日期")
/**
* 制造日期
*/
private String manufacturingDate;
@ApiModelProperty(value = "气瓶状态")
/**
* 气瓶状态
*/
private Integer cylinderStatus;
@ApiModelProperty(value = "阀门制造单位")
/**
* 阀门制造单位
*/
private String valveManufacturUnit;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
import java.util.Date;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 气瓶检验信息Dto
*
* @author duanwei
* @date 2022-08-11
*/
@Data
public class TzCylinderInspectionDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
/**
* id
*/
private String sequenceNbr;
@ApiModelProperty(value = "气瓶唯一标识码")
/**
* 气瓶唯一标识码
*/
private String sequenceCode;
@ApiModelProperty(value = "检验单位")
/**
* 检验单位
*/
private String inspectionUnit;
@ApiModelProperty(value = "检验日期")
/**
* 检验日期
*/
private String inspectionDate;
@ApiModelProperty(value = "检验结果")
/**
* 检验结果
*/
private String inspectionResult;
@ApiModelProperty(value = "不合格报废数量")
/**
* 不合格报废数量
*/
private String scrapQuantity;
@ApiModelProperty(value = "下次检验日期")
/**
* 下次检验日期
*/
private String nextInspectionDate;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 燃气气瓶追溯生产制造Dto
* @author duanwei
*/
@Data
public class TzCylinderProduceDto {
/**
* id
*/
private String sequenceNbr;
/**
* 气瓶制造单位
*/
private String manufacturingUnit;
/**
* 制造日期
*/
private String manufacturingDate;
/**
*阀门制造单位
*/
private String valveManufacturUnit;
/**
*公称工作压力(MPa)
*/
private String nominalWorkPressure;
/**
*容积(L)
*/
private String volume;
/**
*产品合格证
*/
private String productQualified;
/**
*质量证明书
*/
private String proofQuality;
/**
*监督检验证书
*/
private String supervisionInspec;
/**
*型式实验证书
*/
private String typeExperiments;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
import java.util.Date;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 气瓶标签信息Dto
*
* @author duanwei
* @date 2022-08-11
*/
@Data
public class TzCylinderTagsDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "气瓶唯一标识码")
/**
* 气瓶唯一标识码
*/
private String sequenceCode;
@ApiModelProperty(value = "二维码编号")
/**
* 二维码编号
*/
private String qrCode;
@ApiModelProperty(value = "电子标签编号")
/**
* 电子标签编号
*/
private String electronicLabelCode;
@ApiModelProperty(value = "气瓶钢印标识")
/**
* 气瓶钢印标识
*/
private String gasCylinderStamp;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
import lombok.Data;
import java.util.List;
/**
* 燃气气瓶追溯详情合计
* @author duanwei
*/
@Data
public class TzCylinderTraceDto {
TzCylinderProduceDto tzCylinderProduceDto;
TzCylinderInfoDto tzCylinderInfoDto;
TzCylinderTagsDto tzCylinderTagsDto;
List<TzCylinderInspectionDto> tzCylinderInspectionDto;
List<TzCylinderFillingDto> tzCylinderFillingDto;
public TzCylinderTraceDto(TzCylinderProduceDto tzCylinderProduceDto, TzCylinderInfoDto tzCylinderInfoDto, TzCylinderTagsDto tzCylinderTagsDto, List<TzCylinderInspectionDto> tzCylinderInspectionDto, List<TzCylinderFillingDto> tzCylinderFillingDto) {
this.tzCylinderProduceDto = tzCylinderProduceDto;
this.tzCylinderInfoDto = tzCylinderInfoDto;
this.tzCylinderTagsDto = tzCylinderTagsDto;
this.tzCylinderInspectionDto = tzCylinderInspectionDto;
this.tzCylinderFillingDto = tzCylinderFillingDto;
}
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
/**
* 气瓶充装信息--充装前检查
*
* @author duanwei
* @date 2022-08-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tz_cylinder_filling")
@ApiModel(value="TzCylinderFilling对象", description="气瓶充装信息--充装前检查")
public class TzCylinderFilling extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "气瓶唯一标识码")
private String sequenceCode;
@ApiModelProperty(value = "充装企业名称")
private String fillingUnitName;
@ApiModelProperty(value = "检查人员姓名")
private String inspectorUser;
@ApiModelProperty(value = "检查时间")
private String inspectionDate;
@ApiModelProperty(value = "统一社会信用代码")
private String creditCode;
@ApiModelProperty(value = "是否在检验有效期以内")
private String isValid;
@ApiModelProperty(value = "警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致")
private Integer same;
@ApiModelProperty(value = "气瓶外表面的颜色标志是否符合规定")
private Integer isRegulations;
@ApiModelProperty(value = "气瓶瓶阀的出气口螺纹型式是否符合GB/T15383")
@TableField("is_compliance_withGBT")
private Integer isComplianceWithgbt;
@ApiModelProperty(value = "气瓶内有无剩余压力")
private Integer haveStillPressure;
@ApiModelProperty(value = "气瓶外表面有无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷")
private Integer isComplete;
@ApiModelProperty(value = "气瓶的安全附件齐全并符合安全要求")
private Integer haveSecurityDocuments;
@ApiModelProperty(value = "新投入使用气瓶或经检验后首次投入使用气瓶,充装前应按照规定先置换瓶内空气,并经分析合格后方可充气")
private String fillBeforeItem;
@ApiModelProperty(value = "检查结果")
private String checkResults;
@ApiModelProperty(value = "不合格项")
private String nonconformances;
@ApiModelProperty(value = "同步时间 yyyy-MM-dd HH24:mi:ss")
private Date syncDate;
@ApiModelProperty(value = "0-新增 1-更新 2-删除")
private Integer syncState;
@ApiModelProperty(value = "对接公司编码")
private String appId;
@ApiModelProperty(value = "数据完整度")
private Double integrity;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
/**
* 液化气体气瓶充装信息-充装后复查
*
* @author duanwei
* @date 2022-08-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tz_cylinder_filling_check")
@ApiModel(value="TzCylinderFillingCheck对象", description="液化气体气瓶充装信息-充装后复查")
public class TzCylinderFillingCheck extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "充装后复查ID")
private String fillingCheckId;
@ApiModelProperty(value = "充装量在规定范围内")
private Integer withinScope;
@ApiModelProperty(value = "瓶阀及其与瓶口连接的密封良好")
private Integer sealedState;
@ApiModelProperty(value = "瓶体未出现鼓包变形或泄露等严重缺陷")
private Integer defective;
@ApiModelProperty(value = "瓶体温度没有异常升高的迹象")
private Integer abnormalTemperature;
@ApiModelProperty(value = "气瓶粘贴警示标签和充装标签")
private Integer warningSign;
@ApiModelProperty(value = "液化气瓶充装量符合有关规定,充装后逐瓶称重")
private String compliance;
@ApiModelProperty(value = "检查结果")
private String checkResults;
@ApiModelProperty(value = "不合格项")
private String nonconformances;
@ApiModelProperty(value = "检查人员姓名")
private String inspector;
@ApiModelProperty(value = "检查时间")
private String inspectionDate;
@ApiModelProperty(value = "同步时间 yyyy-MM-dd HH24:mi:ss")
private Date syncDate;
@ApiModelProperty(value = "0-新增 1-更新 2-删除")
private Integer syncState;
@ApiModelProperty(value = "对接公司编码")
private String appId;
@ApiModelProperty(value = "数据完整度")
private Double integrity;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
/**
* 液化气体气瓶充装信息审核
*
* @author duanwei
* @date 2022-08-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tz_cylinder_filling_examine")
@ApiModel(value="TzCylinderFillingExamine对象", description="液化气体气瓶充装信息审核")
public class TzCylinderFillingExamine extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "充装信息审核ID")
private String fillingExamineId;
@ApiModelProperty(value = "报表生成时间")
private String fillingAuditDate;
@ApiModelProperty(value = "充装审核报表附件地址")
private String fillingAuditUrl;
@ApiModelProperty(value = "充装审核报表附件名称")
private String fillingAuditName;
@ApiModelProperty(value = "同步时间 yyyy-MM-dd HH24:mi:ss")
private Date syncDate;
@ApiModelProperty(value = "0-新增 1-更新 2-删除")
private Integer syncState;
@ApiModelProperty(value = "对接公司编码")
private String appId;
@ApiModelProperty(value = "数据完整度")
private Double integrity;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
/**
* 液化气体气瓶充装信息-充装记录
*
* @author duanwei
* @date 2022-08-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tz_cylinder_filling_record")
@ApiModel(value="TzCylinderFillingRecord对象", description="液化气体气瓶充装信息-充装记录")
public class TzCylinderFillingRecord extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "充装记录Id")
private String fillingRecordId;
@ApiModelProperty(value = "充装前检查Id")
private String fillingBeforeId;
@ApiModelProperty(value = "充装后复查ID")
private String fillingCheckId;
@ApiModelProperty(value = "充装信息审核ID")
private String fillingExamineId;
@ApiModelProperty(value = "充装开始时间")
@TableField("filling_startTime")
private String fillingStarttime;
@ApiModelProperty(value = "充装结束时间")
@TableField("filling_endTime")
private String fillingEndtime;
@ApiModelProperty(value = "充装人员姓名")
private String fillingUser;
@ApiModelProperty(value = "不能与充装人员姓名相同")
private String inspectorName;
@ApiModelProperty(value = "充装量(Kg)")
private Double fillingQuantity;
@ApiModelProperty(value = "室温")
private Double temperature;
@ApiModelProperty(value = "异常情况")
private Integer abnormal;
@ApiModelProperty(value = "同步时间 yyyy-MM-dd HH24:mi:ss")
private Date syncDate;
@ApiModelProperty(value = "1初次同步数据 2上层系统已同步数据 0已删除数据")
private Integer syncState;
@ApiModelProperty(value = "对接公司编码")
private String appId;
@ApiModelProperty(value = "数据完整度")
private Double integrity;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
/**
* 气瓶基本信息
*
* @author duanwei
* @date 2022-08-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tz_cylinder_info")
@ApiModel(value="TzCylinderInfo对象", description="气瓶基本信息")
public class TzCylinderInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "统一社会信用代码")
private String creditCode;
@ApiModelProperty(value = "产权单位名称")
private String unitName;
@ApiModelProperty(value = "气瓶唯一标识码")
private String sequenceCode;
@ApiModelProperty(value = "设备品种")
private Integer cylinderVariety;
@ApiModelProperty(value = "单位内部编号")
private String unitInnerCode;
@ApiModelProperty(value = "充装介质")
private String fillingMedia;
@ApiModelProperty(value = "气瓶制造单位")
private String manufacturingUnit;
@ApiModelProperty(value = "制造日期")
private String manufacturingDate;
@ApiModelProperty(value = "产品名称")
private String productName;
@ApiModelProperty(value = "产品编号")
private String factoryNum;
@ApiModelProperty(value = "容积(L)")
private Double volume;
@ApiModelProperty(value = "产品合格证")
private String productQualified;
@ApiModelProperty(value = "质量证明书")
private String proofQuality;
@ApiModelProperty(value = "监督检验证书")
private String supervisionInspec;
@ApiModelProperty(value = "型式实验证书")
private String typeExperiments;
@ApiModelProperty(value = "气瓶状态")
private Integer cylinderStatus;
@ApiModelProperty(value = "阀门制造单位")
private String valveManufacturUnit;
@ApiModelProperty(value = "公称工作压力(MPa)")
private Double nominalWorkPressure;
@ApiModelProperty(value = "同步时间 yyyy-MM-dd HH24:mi:ss")
private Date syncDate;
@ApiModelProperty(value = "0-新增 1-更新 2-删除")
private Integer syncState;
@ApiModelProperty(value = "对接公司编码")
private String appId;
@ApiModelProperty(value = "数据完整度")
private Double integrity;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
/**
* 气瓶检验信息
*
* @author duanwei
* @date 2022-08-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tz_cylinder_inspection")
@ApiModel(value="TzCylinderInspection对象", description="气瓶检验信息")
public class TzCylinderInspection extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "气瓶唯一标识码")
private String sequenceCode;
@ApiModelProperty(value = "检验单位")
private String inspectionUnit;
@ApiModelProperty(value = "检验日期")
private String inspectionDate;
@ApiModelProperty(value = "检验结果")
private String inspectionResult;
@ApiModelProperty(value = "下次检验日期")
private String nextInspectionDate;
@ApiModelProperty(value = "不合格报废数量")
private String scrapQuantity;
@ApiModelProperty(value = "同步时间 yyyy-MM-dd HH24:mi:ss")
private Date syncDate;
@ApiModelProperty(value = "0-新增 1-更新 2-删除")
private Integer syncState;
@ApiModelProperty(value = "对接公司编码")
private String appId;
@ApiModelProperty(value = "数据完整度")
private Double integrity;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
/**
* 气瓶标签信息
*
* @author duanwei
* @date 2022-08-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tz_cylinder_tags")
@ApiModel(value="TzCylinderTags对象", description="气瓶标签信息")
public class TzCylinderTags extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "气瓶唯一标识码")
private String sequenceCode;
@ApiModelProperty(value = "二维码编号")
@TableField("qrCode")
private String qrCode;
@ApiModelProperty(value = "电子标签编号")
private String electronicLabelCode;
@ApiModelProperty(value = "气瓶钢印标识")
private String gasCylinderStamp;
@ApiModelProperty(value = "同步时间 yyyy-MM-dd HH24:mi:ss")
private Date syncDate;
@ApiModelProperty(value = "0-新增 1-更新 2-删除")
private Integer syncState;
@ApiModelProperty(value = "对接公司编码")
private String appId;
@ApiModelProperty(value = "数据完整度")
private Double integrity;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
/**
* 气瓶企业信息
*
* @author duanwei
* @date 2022-08-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tz_cylinder_unit")
@ApiModel(value="TzCylinderUnit对象", description="气瓶企业信息")
public class TzCylinderUnit extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "单位ID")
private String unitId;
@ApiModelProperty(value = "所属区域")
private String regionCode;
@ApiModelProperty(value = "单位名称")
private String unitName;
@ApiModelProperty(value = "统一社会信用代码")
private String creditCode;
@ApiModelProperty(value = "详细地址")
private String address;
@ApiModelProperty(value = "企业负责人")
private String unitPerson;
@ApiModelProperty(value = "企业负责人手机")
private String personMobilePhone;
@ApiModelProperty(value = "企业负责人固定电话")
private String personTelephone;
@ApiModelProperty(value = "安全管理员")
private String securityAdm;
@ApiModelProperty(value = "安全管理员手机")
private String securityAdmPhone;
@ApiModelProperty(value = "企业邮编")
private String postalCode;
@ApiModelProperty(value = "同步时间 yyyy-MM-dd HH24:mi:ss")
private Date syncDate;
@ApiModelProperty(value = "0-新增 1-更新 2-删除")
private Integer syncState;
@ApiModelProperty(value = "对接公司编码")
private String appId;
@ApiModelProperty(value = "数据完整度")
private Double integrity;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.*;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.TzCylinderInfo;
import java.util.List;
/**
* 气瓶基本信息 Mapper 接口
*
* @author duanwei
* @date 2022-08-11
*/
public interface TzCylinderMapper extends BaseMapper<TzCylinderInfo> {
IPage<TzCylinderInfoDto> getTzCylinderInfoList(Page<TzCylinderInfoDto> page, TzCylinderInfoDto tzCylinderInfoDto, String superviseOrgCode);
TzCylinderInfoDto getTzCylinderInfoDto(String sequenceNbr);
String getSequencCode(String sequenceNbr);
TzCylinderProduceDto getTzCylinderProduceDto(String SequenceCode);
TzCylinderTagsDto getTzCylinderTagsDto(String sequenceCode);
List<TzCylinderInspectionDto> getTzCylinderInspectionDto(String sequenceCode);
List<TzCylinderFillingDto> getTzCylinderFillingDto(String sequenceCode);
TzCylinderBeforeCheckDto getTzCylinderBeforeCheck(String fillingBeforeId);
List<TzCylinderCheckDto> getTzCylinderCheckItem();
TzCylinderAfterCheckDto getTzCylinderAfterCheck(String fillingCheckId);
List<TzCylinderCheckDto> getTzCylinderAfterCheckItem();
}
package com.yeejoin.amos.boot.module.tzs.flc.api.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.tzs.api.entity.PageParam;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderInfoDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderTraceDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.TzCylinderInfo;
/**
* 气瓶基本信息 服务类
*
* @author duanwei
* @date 2022-08-11
*/
public interface ITzCylinderService extends IService<TzCylinderInfo> {
IPage<TzCylinderInfoDto> getCylinderInfoDtoList(PageParam pageParam, TzCylinderInfoDto idxBizCarcylUserCompany, String key);
TzCylinderTraceDto getCylinderTraceDto(String sequenceNbr);
}
<?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.yeejoin.amos.boot.module.tzs.flc.api.mapper.TzCylinderMapper">
<select id="getTzCylinderInfoList" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderInfoDto">
SELECT
CI.sequence_nbr,
CI.unit_name,
CI.cylinder_variety,
CI.product_name,
CI.factory_num,
CI.unit_inner_code,
CI.filling_media,
CI.manufacturing_unit,
CI.manufacturing_date,
CI.valve_manufactur_unit,
CI.cylinder_status
FROM
tz_cylinder_info AS CI
LEFT JOIN
tz_base_enterprise_info AS EI ON CI.credit_code=EI.use_code
<where>
<if
test="superviseOrgCode!=null and superviseOrgCode!='' ">
AND EI.supervise_org_code LIKE
CONCAT('%',#{superviseOrgCode},'%')
</if>
<if
test="tzCylinderInfoDto.unitName!=null and tzCylinderInfoDto.unitName!='' ">
AND CI.unit_name LIKE
CONCAT('%',#{tzCylinderInfoDto.unitName},'%')
</if>
<if
test="tzCylinderInfoDto.cylinderVariety!=null and tzCylinderInfoDto.cylinderVariety!='' ">
AND CI.cylinder_variety LIKE
CONCAT('%',#{tzCylinderInfoDto.cylinderVariety},'%')
</if>
<if
test="tzCylinderInfoDto.productName!=null and tzCylinderInfoDto.productName!='' ">
AND CI.product_name LIKE
CONCAT('%',#{tzCylinderInfoDto.productName},'%')
</if>
<if
test="tzCylinderInfoDto.factoryNum!=null and tzCylinderInfoDto.factoryNum!='' ">
AND CI.factory_num LIKE
CONCAT('%',#{tzCylinderInfoDto.factoryNum},'%')
</if>
<if
test="tzCylinderInfoDto.unitInnerCode!=null and tzCylinderInfoDto.unitInnerCode!='' ">
AND CI.unit_inner_code LIKE
CONCAT('%',#{tzCylinderInfoDto.unitInnerCode},'%')
</if>
<if
test="tzCylinderInfoDto.fillingMedia!=null and tzCylinderInfoDto.fillingMedia!='' ">
AND CI.filling_media LIKE
CONCAT('%',#{tzCylinderInfoDto.fillingMedia},'%')
</if>
<if
test="tzCylinderInfoDto.manufacturingUnit!=null and tzCylinderInfoDto.manufacturingUnit!='' ">
AND CI.manufacturing_unit LIKE
CONCAT('%',#{tzCylinderInfoDto.manufacturingUnit},'%')
</if>
<if
test="tzCylinderInfoDto.manufacturingDate!=null and tzCylinderInfoDto.manufacturingDate!='' ">
AND CI.manufacturing_date LIKE
CONCAT('%',#{tzCylinderInfoDto.manufacturingDate},'%')
</if>
<if
test="tzCylinderInfoDto.valveManufacturUnit!=null and tzCylinderInfoDto.valveManufacturUnit!='' ">
AND CI.valve_manufactur_unit LIKE
CONCAT('%',#{tzCylinderInfoDto.valveManufacturUnit},'%')
</if>
<if
test="tzCylinderInfoDto.cylinderStatus!=null and tzCylinderInfoDto.cylinderStatus!='' ">
AND CI.cylinder_status LIKE
CONCAT('%',#{tzCylinderInfoDto.cylinderStatus},'%')
</if>
</where>
</select>
<select id="getTzCylinderInfoDto" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderInfoDto">
SELECT
CI.sequence_nbr,
CI.unit_name,
CI.cylinder_variety,
CI.product_name,
CI.factory_num,
CI.unit_inner_code,
CI.filling_media,
CI.manufacturing_unit,
CI.manufacturing_date,
CI.valve_manufactur_unit,
CI.cylinder_status
FROM
tz_cylinder_info AS CI
WHERE CI.sequence_nbr = #{sequenceNbr}
</select>
<select id="getSequencCode" resultType="java.lang.String">
SELECT sequence_code FROM tz_cylinder_info WHERE sequence_nbr=#{sequenceNbr}
</select>
<select id="getTzCylinderProduceDto" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderProduceDto">
SELECT
CI.sequence_nbr,
CI.manufacturing_unit,
CI.manufacturing_date,
CI.valve_manufactur_unit,
CI.nominal_work_pressure,
CI.volume,
CI.product_qualified,
CI.proof_quality,
CI.supervision_inspec,
CI.type_experiments
FROM
tz_cylinder_info CI
WHERE CI.sequence_code =#{SequenceCode}
</select>
<select id="getTzCylinderTagsDto" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderTagsDto">
SELECT
CT.sequence_nbr,
CT.sequence_code,
CT.qrCode,
CT.electronic_label_code,
CT.gas_cylinder_stamp
FROM tz_cylinder_tags CT
WHERE CT.sequence_code = #{SequenceCode}
</select>
<select id="getTzCylinderInspectionDto" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderInspectionDto">
SELECT
CI.sequence_nbr,
CI.sequence_code,
CI.inspection_unit,
CI.inspection_date,
CI.inspection_result,
CI.scrap_quantity,
CI.next_inspection_date
FROM tz_cylinder_inspection CI
WHERE CI.sequence_code = #{SequenceCode}
ORDER BY CI.inspection_date DESC
</select>
<select id="getTzCylinderFillingDto" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderFillingDto">
SELECT
FR.sequence_nbr,
FC.filling_check_id,
FR.filling_quantity,
CF.sequence_code,
FR.filling_before_id,
FR.filling_startTime,
FR.filling_endTime,
FR.filling_user,
FR.inspector_name,
FR.temperature,
FR.abnormal,
CF.check_results AS check_results_before,
FC.check_results AS check_results_after
FROM
tz_cylinder_filling_record AS FR
LEFT JOIN tz_cylinder_filling AS CF ON CF.filling_before_id = FR.filling_before_id
LEFT JOIN tz_cylinder_filling_check AS FC ON FC.filling_check_id = FR.filling_check_id
WHERE
CF.sequence_code = #{sequence_code}
ORDER BY FR.filling_startTime DESC
</select>
<select id="getTzCylinderBeforeCheck" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderBeforeCheckDto">
SELECT
CF.is_valid,
CF.same,
CF.is_regulations,
CF.is_compliance_withGBT,
CF.have_still_pressure,
CF.is_complete,
CF.have_security_documents,
CF.fill_before_item
FROM tz_cylinder_filling AS CF
WHERE CF.filling_before_id=#{fillingBeforeId}
</select>
<select id="getTzCylinderCheckItem" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderCheckDto">
SELECT
item,
`explain`,
`result`
FROM
tz_cylinder_check_item
WHERE item!=''
</select>
<select id="getTzCylinderAfterCheck" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderAfterCheckDto">
SELECT
FC.within_scope,
FC.sealed_state,
FC.defective,
FC.abnormal_temperature,
FC.warning_sign
FROM tz_cylinder_filling_check AS FC
WHERE FC.filling_check_id=#{fillingCheckId}
</select>
<select id="getTzCylinderAfterCheckItem" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderCheckDto">
SELECT
after_item AS item,
after_explain AS `explain`,
after_result AS `result`
FROM
tz_cylinder_check_item
WHERE after_item!=''
</select>
</mapper>
package com.yeejoin.amos.boot.module.tzs.flc.biz.controller;
import com.yeejoin.amos.boot.module.tzs.api.entity.PageParam;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderInfoDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderTraceDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.TzCylinderInfo;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.ITzCylinderService;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
@RestController
@Api(tags = "燃气气瓶Api")
@RequestMapping(value = "/cylinder")
public class TzCylinderController {
@Autowired
ITzCylinderService iTzCylinderService;
/**
* 气瓶基本信息列表分页查询
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "气瓶基本信息列表分页查询", notes = "气瓶基本信息列表分页查询")
public ResponseModel<IPage<TzCylinderInfoDto>> listPage(PageParam pageParam, TzCylinderInfoDto tzCylinderInfoDto, String key){
return ResponseHelper.buildResponse(iTzCylinderService.getCylinderInfoDtoList(pageParam,tzCylinderInfoDto,key));
}
/**
* 根据id查询追溯详情
* @param sequenceNbr 气瓶基本信息的sequenceNbr
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/trace/{sequenceNbr}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询追溯详情", notes = "根据sequenceNbr查询追溯详情")
public ResponseModel<TzCylinderTraceDto> selectById(HttpServletRequest request, @PathVariable String sequenceNbr){
return ResponseHelper.buildResponse(iTzCylinderService.getCylinderTraceDto(sequenceNbr));
}
}
package com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.api.entity.PageParam;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.*;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.TzCylinderInfo;
import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.TzCylinderMapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.ITzCylinderService;
import com.yeejoin.amos.feign.privilege.Privilege;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 气瓶基本信息 服务实现类
*
* @author duanwei
* @date 2022-08-11
*/
@Service
public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, TzCylinderInfo, TzCylinderMapper> implements ITzCylinderService {
@Autowired
private TzCylinderMapper tzCylinderMapper;
@Override
public IPage<TzCylinderInfoDto> getCylinderInfoDtoList(PageParam pageParam, TzCylinderInfoDto tzCylinderInfoDto, String key) {
Page<TzCylinderInfoDto> page = new Page<>(pageParam.getCurrent(), pageParam.getSize());
System.out.println("key有值:"+key);
String superviseOrgCode = Privilege.companyClient.seleteOne(Long.valueOf(key)).getResult().getOrgCode();
return tzCylinderMapper.getTzCylinderInfoList(page, tzCylinderInfoDto, superviseOrgCode);
}
@Override
public TzCylinderTraceDto getCylinderTraceDto(String sequenceNbr) {
String orgCode = tzCylinderMapper.getSequencCode(sequenceNbr);
TzCylinderProduceDto tzCylinderProduceDto = tzCylinderMapper.getTzCylinderProduceDto(orgCode);
TzCylinderInfoDto tzCylinderInfoDto = tzCylinderMapper.getTzCylinderInfoDto(sequenceNbr);
TzCylinderTagsDto tzCylinderTagsDto = tzCylinderMapper.getTzCylinderTagsDto(orgCode);
List<TzCylinderInspectionDto> tzCylinderInspectionDtoList = tzCylinderMapper.getTzCylinderInspectionDto(orgCode);
List<TzCylinderFillingDto> tzCylinderFillingDtoList = tzCylinderMapper.getTzCylinderFillingDto(orgCode);
/**
* 取气瓶追溯详情 充装前检查项 名称和结果列表
*/
List<TzCylinderCheckDto> tzCylinderCheckDtoList = tzCylinderMapper.getTzCylinderCheckItem();
Map<String,String> map = new HashMap<>();
for(TzCylinderCheckDto tzCylinderCheckDto : tzCylinderCheckDtoList){
map.put(tzCylinderCheckDto.getItem(), tzCylinderCheckDto.getExplain());
}
for(TzCylinderFillingDto tzCylinderFillingDto : tzCylinderFillingDtoList){
List<TzCylinderCheckDto> tzCylinderCheckDtoListResult = new ArrayList<>();
TzCylinderBeforeCheckDto tzcylinderBeforeCheckDto = tzCylinderMapper.getTzCylinderBeforeCheck(tzCylinderFillingDto.getFillingBeforeId());
JSONObject obj = JSONObject.parseObject(JSONObject.toJSONString(tzcylinderBeforeCheckDto));
for( String str : obj.keySet())
{
String explain = map.get(str);
String value = String.valueOf(obj.get(str)) ;
TzCylinderCheckDto tzcylinderCheckDto = new TzCylinderCheckDto(str,explain,value);
tzCylinderCheckDtoListResult.add(tzcylinderCheckDto);
}
tzCylinderFillingDto.setTzCylinderCheckDtoList(tzCylinderCheckDtoListResult);
}
/**
* 取气瓶追溯详情 充装后检查项 名称和结果列表
*/
List<TzCylinderCheckDto> tzCylinderAfterCheckDtoList = tzCylinderMapper.getTzCylinderAfterCheckItem();
Map<String,String> afterMap = new HashMap<>();
for(TzCylinderCheckDto tzCylinderCheckDto : tzCylinderAfterCheckDtoList){
afterMap.put(tzCylinderCheckDto.getItem(), tzCylinderCheckDto.getExplain());
}
for(TzCylinderFillingDto tzCylinderFillingDto : tzCylinderFillingDtoList){
List<TzCylinderCheckDto> tzCylinderAfterCheckDtoListResult = new ArrayList<>();
TzCylinderAfterCheckDto tzcylinderAfterCheckDto = tzCylinderMapper.getTzCylinderAfterCheck(tzCylinderFillingDto.getFillingCheckId());
JSONObject obj = JSONObject.parseObject(JSONObject.toJSONString(tzcylinderAfterCheckDto));
for( String str : obj.keySet())
{
String explain = afterMap.get(str);
String value = String.valueOf(obj.get(str)) ;
TzCylinderCheckDto tzcylinderCheckDto = new TzCylinderCheckDto(str,explain,value);
tzCylinderAfterCheckDtoListResult.add(tzcylinderCheckDto);
}
tzCylinderFillingDto.setTzCylinderAfterCheckDtoList(tzCylinderAfterCheckDtoListResult);
}
return new TzCylinderTraceDto(tzCylinderProduceDto,tzCylinderInfoDto,tzCylinderTagsDto,tzCylinderInspectionDtoList,tzCylinderFillingDtoList);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment