Commit fa1ac393 authored by tianbo's avatar tianbo

```

feat(openapi): 气瓶对接调整优化 - 重构 CylinderFilling与 CylinderFillingCheck 实体类,继承自公共基类 CylinderFillingBaseEntity - 扩展 tz_cylinder_filling 表及 tz_cylinder_filling_record 表字段,新增多个安全检查项和充装信息
parent bf240d8e
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* 通用气瓶字段校验枚举示例
* 支持多种气瓶类型,每种类型可以有不同的必填和唯一性要求
*/
public class CylinderFieldValidationExample {
/**
* 字段校验接口
*/
public interface FieldValidation {
boolean isRequired();
boolean isUnique();
String getFieldName();
}
/**
* 通用气瓶字段枚举
*/
public enum CylinderField implements FieldValidation {
// 通用字段
SEQUENCE_CODE("sequenceCode", true, true),
CREDIT_CODE("creditCode", true, false),
FILLING_UNIT_NAME("fillingUnitName", true, false),
INSPECTOR_USER("inspectorUser", true, false),
INSPECTION_DATE("inspectionDate", true, false),
IS_VALID("isValid", false, false),
IS_SAME("same", false, false),
IS_REGULATIONS("isRegulations", false, false),
IS_COMPLIANCE_WITH_GBT("isComplianceWithGBT", false, false),
HAVE_STILL_PRESSURE("haveStillPressure", false, false),
IS_COMPLETE("isComplete", false, false),
HAVE_SECURITY_DOCUMENTS("haveSecurityDocuments", false, false),
FILL_BEFORE_ITEM("fillBeforeItem", false, false),
CHECK_RESULTS("checkResults", false, false),
NONCONFORMANCES("nonconformances", false, false),
SYNC_DATE("syncDate", false, false),
SYNC_STATE("syncState", false, false);
private final String fieldName;
private final boolean required;
private final boolean unique;
CylinderField(String fieldName, boolean required, boolean unique) {
this.fieldName = fieldName;
this.required = required;
this.unique = unique;
}
@Override
public boolean isRequired() {
return required;
}
@Override
public boolean isUnique() {
return unique;
}
@Override
public String getFieldName() {
return fieldName;
}
public static List<String> getRequiredFields() {
return Arrays.stream(values())
.filter(FieldValidation::isRequired)
.map(FieldValidation::getFieldName)
.collect(Collectors.toList());
}
public static List<String> getUniqueFields() {
return Arrays.stream(values())
.filter(FieldValidation::isUnique)
.map(FieldValidation::getFieldName)
.collect(Collectors.toList());
}
}
/**
* 气瓶类型枚举
*/
public enum CylinderType {
INDUSTRIAL_GAS_CYLINDER("工业气瓶"),
LIQUEFIED_GAS_CYLINDER("液化石油气瓶"),
OTHER_CYLINDER("其他气瓶");
private final String description;
CylinderType(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
}
/**
* 特定气瓶类型的字段校验枚举
* 通过组合模式支持不同类型气瓶的特殊要求
*/
public enum CylinderTypeFieldValidation {
// 工业气瓶特殊要求
INDUSTRIAL_CYLINDER_UNIQUE_FIELD(CylinderType.INDUSTRIAL_GAS_CYLINDER, "manufactureDate", false, true),
INDUSTRIAL_CYLINDER_REQUIRED_FIELD(CylinderType.INDUSTRIAL_GAS_CYLINDER, "materialType", true, false),
// 液化石油气瓶特殊要求
LIQUEFIED_GAS_CYLINDER_UNIQUE_FIELD(CylinderType.LIQUEFIED_GAS_CYLINDER, "volume", false, true),
LIQUEFIED_GAS_CYLINDER_REQUIRED_FIELD(CylinderType.LIQUEFIED_GAS_CYLINDER, "wallThickness", true, false),
// 其他气瓶特殊要求
OTHER_CYLINDER_UNIQUE_FIELD(CylinderType.OTHER_CYLINDER, "customId", false, true),
OTHER_CYLINDER_REQUIRED_FIELD(CylinderType.OTHER_CYLINDER, "specification", true, false);
private final CylinderType cylinderType;
private final String fieldName;
private final boolean required;
private final boolean unique;
CylinderTypeFieldValidation(CylinderType cylinderType, String fieldName, boolean required, boolean unique) {
this.cylinderType = cylinderType;
this.fieldName = fieldName;
this.required = required;
this.unique = unique;
}
public CylinderType getCylinderType() {
return cylinderType;
}
public String getFieldName() {
return fieldName;
}
public boolean isRequired() {
return required;
}
public boolean isUnique() {
return unique;
}
/**
* 获取指定气瓶类型的所有必填字段
* @param type 气瓶类型
* @return 必填字段列表
*/
public static List<String> getRequiredFieldsForType(CylinderType type) {
// 先获取通用必填字段
List<String> requiredFields = CylinderField.getRequiredFields();
// 再添加特定类型必填字段
requiredFields.addAll(Arrays.stream(values())
.filter(validation -> validation.cylinderType == type)
.filter(CylinderTypeFieldValidation::isRequired)
.map(CylinderTypeFieldValidation::getFieldName)
.collect(Collectors.toList()));
return requiredFields;
}
/**
* 获取指定气瓶类型的所有唯一字段
* @param type 气瓶类型
* @return 唯一字段列表
*/
public static List<String> getUniqueFieldsForType(CylinderType type) {
// 先获取通用唯一字段
List<String> uniqueFields = CylinderField.getUniqueFields();
// 再添加特定类型唯一字段
uniqueFields.addAll(Arrays.stream(values())
.filter(validation -> validation.cylinderType == type)
.filter(CylinderTypeFieldValidation::isUnique)
.map(CylinderTypeFieldValidation::getFieldName)
.collect(Collectors.toList()));
return uniqueFields;
}
}
public static void main(String[] args) {
System.out.println("=== 通用气瓶字段校验 ===");
System.out.println("通用必填字段: " + CylinderField.getRequiredFields());
System.out.println("通用唯一字段: " + CylinderField.getUniqueFields());
System.out.println("\n=== 工业气瓶字段校验 ===");
System.out.println("必填字段: " + CylinderTypeFieldValidation.getRequiredFieldsForType(CylinderType.INDUSTRIAL_GAS_CYLINDER));
System.out.println("唯一字段: " + CylinderTypeFieldValidation.getUniqueFieldsForType(CylinderType.INDUSTRIAL_GAS_CYLINDER));
System.out.println("\n=== 液化石油气瓶字段校验 ===");
System.out.println("必填字段: " + CylinderTypeFieldValidation.getRequiredFieldsForType(CylinderType.LIQUEFIED_GAS_CYLINDER));
System.out.println("唯一字段: " + CylinderTypeFieldValidation.getUniqueFieldsForType(CylinderType.LIQUEFIED_GAS_CYLINDER));
System.out.println("\n=== 其他气瓶字段校验 ===");
System.out.println("必填字段: " + CylinderTypeFieldValidation.getRequiredFieldsForType(CylinderType.OTHER_CYLINDER));
System.out.println("唯一字段: " + CylinderTypeFieldValidation.getUniqueFieldsForType(CylinderType.OTHER_CYLINDER));
}
}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.enums;
import com.yeejoin.amos.api.openapi.validation.FieldValidation;
import lombok.Getter;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* 通用气瓶字段枚举
*/
@Getter
public enum CylinderField implements FieldValidation {
// 通用字段
sequenceCode(new String[]{FillStage.ALL.getCode()}, "sequenceCode", true, true, "气瓶唯一标识码"),
cylinderType(new String[]{FillStage.ALL.getCode()}, "cylinderType", true, false, "气瓶类型"),
fillingBeforeId(new String[]{FillStage.ALL.getCode()}, "fillingBeforeId", true, true, "充装前检查Id"),
inspectorUserNum(new String[]{FillStage.ALL.getCode()}, "inspectorUserNum", true, false, "作业人员证书编号"),
inspectorUser(new String[]{FillStage.ALL.getCode()}, "inspectorUser", true, false, "作业人员姓名"),
inspectionDate(new String[]{FillStage.BEFORE.getCode(), FillStage.AFTER.getCode()}, "inspectionDate", true, false, "检测时间"),
gunNumber(new String[]{FillStage.FILLING.getCode()}, "gunNumber", true, false, "充装枪编号"),
fillingStartTime(new String[]{FillStage.FILLING.getCode()}, "fillingStartTime", true, false, "充装开始时间"),
fillingEndTime(new String[]{FillStage.FILLING.getCode()}, "fillingEndTime", true, false, "充装结束时间");
@Getter
public enum FillStage {
BEFORE("before", "充装前"),
FILLING("filling", "充装中"),
AFTER("after", "充装后"),
ALL("all", "所有");
private final String code;
private final String desc;
FillStage(String code, String desc) {
this.code = code;
this.desc = desc;
}
}
private final String[] stage;
private final String fieldName;
private final boolean required;
private final boolean unique;
private final String desc;
CylinderField(String[] stage, String fieldName, boolean required, boolean unique, String desc) {
this.stage = stage;
this.fieldName = fieldName;
this.required = required;
this.unique = unique;
this.desc = desc;
}
@Override
public boolean isRequired() {
return required;
}
@Override
public boolean isUnique() {
return unique;
}
@Override
public String getFieldName() {
return fieldName;
}
public static List<String> getRequiredFields(String stage) {
return Arrays.stream(values())
.filter(field -> (Arrays.asList(field.stage).contains(stage) || Arrays.stream(field.stage).anyMatch(s -> s.equals(FillStage.ALL.getCode()))))
.filter(FieldValidation::isRequired)
.map(FieldValidation::getFieldName)
.collect(Collectors.toList());
}
public static List<String> getRequiredFields() {
return Arrays.stream(values())
.filter(FieldValidation::isRequired)
.map(FieldValidation::getFieldName)
.collect(Collectors.toList());
}
public static List<String> getUniqueFields(String stage) {
return Arrays.stream(values())
.filter(field -> (Arrays.asList(field.stage).contains(stage) || Arrays.stream(field.stage).anyMatch(s -> s.equals(FillStage.ALL.getCode()))))
.filter(FieldValidation::isUnique)
.map(FieldValidation::getFieldName)
.collect(Collectors.toList());
}
public static List<String> getUniqueFields() {
return Arrays.stream(values())
.filter(FieldValidation::isUnique)
.map(FieldValidation::getFieldName)
.collect(Collectors.toList());
}
public static void main(String[] args) {
System.out.println(CylinderField.getRequiredFields(FillStage.BEFORE.code));
System.out.println(CylinderField.getRequiredFields(FillStage.AFTER.code));
System.out.println(CylinderField.getUniqueFields(FillStage.AFTER.code));
}
}
package com.yeejoin.amos.api.openapi.enums;
import lombok.Getter;
/**
* 气瓶类型枚举
*/
@Getter
public enum CylinderType {
VEHICLE_CNG_LNG_H2("VEHICLE_CNG_LNG_H2", "车用气瓶(CNG/LNG/氢气)"),
LIQUEFIED_GAS_LPG("LIQUEFIED_GAS_LPG", "液化石油气瓶"),
COMPRESSED_GAS("COMPRESSED_GAS", "压缩气体气瓶"),
DISSOLVED_ACETYLENE("DISSOLVED_ACETYLENE", "溶解乙炔气瓶"),
MIXED_GAS("MIXED_GAS", "混合气体气瓶"),
CRYOGENIC_INSULATED("CRYOGENIC_INSULATED", "低温绝热气瓶"),
LIQUEFIED_GAS_EXCLUDING_LPG("LIQUEFIED_GAS_EXCLUDING_LPG", "液化气体(LPG除外)气瓶");
private final String code;
private final String name;
CylinderType(String code, String name) {
this.code = code;
this.name = name;
}
public static CylinderType getByCode(String code) {
for (CylinderType cylinderType : CylinderType.values()) {
if (cylinderType.code.equals(code)) {
return cylinderType;
}
}
return null;
}
}
package com.yeejoin.amos.api.openapi.face.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.typroject.tyboot.core.rdbms.model.BaseModel;
......@@ -8,22 +9,24 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@Data
public abstract class AbstractBaseModel extends BaseModel{
/**
*
*/
public abstract class AbstractBaseModel extends BaseModel {
private static final long serialVersionUID = 1L;
protected Date syncDate;//同步时间 yyyy-MM-dd HH24:mi:ss
protected int syncState;//同步状态(0-新增 1-更新 2-删除)
/**
* 对接公司编码
*/
protected String appId;
/**
* 对接接口版本
*/
protected String version = "v1";
@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;
@ApiModelProperty(value = "对接接口版本")
private String version = "v1";
@ApiModelProperty(value = "更新人员")
private String recUserName;
}
......@@ -35,4 +35,9 @@ public class BizTokenModel implements Serializable{
* 对接公司编码
*/
private String apiCompanyCode;
/**
* 对接公司名称
*/
private String apiCompanyName;
}
package com.yeejoin.amos.api.openapi.face.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public abstract class CylinderAbstractBaseModel extends AbstractBaseModel {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "气瓶唯一标识码,制造单位统一信用代码-出厂编号")
private String sequenceCode;
@ApiModelProperty(value = "气瓶类型")
private String cylinderType;
@ApiModelProperty(value = "充装前检查Id")
private String fillingBeforeId;
@ApiModelProperty(value = "作业人员证书编号")
private String inspectorUserNum;
@ApiModelProperty(value = "作业人员姓名")
private String inspectorUser;
@ApiModelProperty(value = "充装企业名称")
private String fillingUnitName;
@ApiModelProperty(value = "充装企业统一社会信用代码")
private String fillingUnitCreditCode;
}
package com.yeejoin.amos.api.openapi.face.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@Data
public class TmCylinderFillingCheckModel extends AbstractBaseModel{
/**
*
*/
public class TmCylinderFillingCheckModel extends CylinderAbstractBaseModel {
private static final long serialVersionUID = 1L;
private String sequenceCode; //气瓶唯一标识码*
private String fillingCheckId; //充装后复查ID
private int withinScope; //充装量在规定范围内*
private int sealedState; //瓶阀及其与瓶口连接的密封良好*
private int defective; //瓶体未出现鼓包变形或泄露等严重缺陷*
private int abnormalTemperature; //瓶体温度没有异常升高的迹象*
private int warningSign; //气瓶粘贴警示标签和充装标签*
private String compliance; //液化气瓶充装量符合有关规定,充装后逐瓶称重
private String inspector; //检查人员姓名*
private String inspectionDate; //检查时间*
private String checkResults;
private String nonconformances;
/**
* 对接文档已发布字段,需要将此字段赋值给系统数据库中的字段:abnormalTemperature
*/
private int abnormaLTemperature;
public int getAbnormaLTemperature() {
return abnormalTemperature;
}
public void setAbnormaLTemperature(int abnormaLTemperature) {
this.abnormalTemperature = abnormaLTemperature;
}
public int getAbnormalTemperature() {
return abnormalTemperature;
}
public void setAbnormalTemperature(int abnormalTemperature) {
this.abnormalTemperature = abnormalTemperature;
}
@ApiModelProperty(value = "检查时间")
private Date inspectionDate;
@ApiModelProperty(value = "瓶体未出现鼓包变形或泄漏等严重缺陷")
private String isNoBulgingOrLeakage;
@ApiModelProperty(value = "瓶内压力正常")
private String isPressureNormal;
@ApiModelProperty(value = "瓶体温度没有异常升高的迹象")
private String isTemperatureNormal;
@ApiModelProperty(value = "瓶阀及其与瓶口连接的密封良好")
private String valveSealIsGood;
@ApiModelProperty(value = "气瓶粘贴警示标签和充装标签)")
private String hasWarningAndFillingLabels;
@ApiModelProperty(value = "充装量复秤未超重")
private String reweighedWithinLimit;
@ApiModelProperty(value = "瓶内压力(充装量)及质量符合安全技术规范及相关标准的要求")
private String pressureAndMassMeetRegulations;
@ApiModelProperty(value = "瓶帽、充装标签、警示标签完整")
private String capsAndLabelsAreIntact;
@ApiModelProperty(value = "瓶阀出气口螺纹及其密封面良好")
private String valveSealedWell;
@ApiModelProperty(value = "静置后压力符合规定")
private String pressureAfterRestingComplies;
@ApiModelProperty(value = "气瓶未发生泄漏等问题")
private String noLeakageIssuesDetected;
@ApiModelProperty(value = "处理结果是否合格")
private String isTreatmentResultQualified;
@ApiModelProperty(value = "充装量(压力或质量)符合要求")
private String fillingAmountMeetsRequirement;
@ApiModelProperty(value = "密封良好无泄漏")
private String sealsIntactNoLeakage;
@ApiModelProperty(value = "气瓶无变形等缺陷")
private String noDeformationOrDefects;
@ApiModelProperty(value = "瓶体温升无异常")
private String temperatureRiseNormal;
@ApiModelProperty(value = "气瓶附件完整齐全")
private String cylinderAccessoriesComplete;
@ApiModelProperty(value = "阀门已关闭,管路及各附件无漏气")
private String valveClosedNoLeakageInPipingAndAccessories;
@ApiModelProperty(value = "气瓶外观无结霜、结露")
private String noFrostOrCondensationOnCylinder;
}
package com.yeejoin.amos.api.openapi.face.model;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@Data
public class TmCylinderFillingModel extends AbstractBaseModel{
/**
*
*/
public class TmCylinderFillingModel extends CylinderAbstractBaseModel {
private static final long serialVersionUID = 1L;
private String sequenceCode; //气瓶唯一标识码*
private String fillingUnitName; //充装企业名称*
private String inspectorUser; //检查人员姓名*
private String inspectionDate; //检查时间*
private String creditCode; //统一社会信用代码
private String isValid; //是否在检验有效期以内,严禁充装超期未检气瓶、非法改装或翻新及报废气瓶
private int same; //警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致*
private int isRegulations; //气瓶外表面的颜色标志是否符合规定*
@JSONField(name = "isComplianceWithGBT")
private int isComplianceWithgbt; //气瓶瓶阀的出气口螺纹型式是否符合GB/T15383的规定,即可燃气体用的瓶阀,出口螺纹应是内螺纹(左旋)*
private int haveStillPressure; //气瓶内有无剩余压力*
private int isComplete; //气瓶外表面有无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷*
private int haveSecurityDocuments; //气瓶的安全附件齐全并符合安全要求
private String fillBeforeItem; // 新投入使用气瓶或经检验后首次投入使用气瓶,充装前应按照规定先置换瓶内空气,并经分析合格后方可充气
private String checkResults; //检查结果
private String nonconformances; //不合格项
/**
* 充装前检查id
*/
private String fillingBeforeId;
@ApiModelProperty(value = "检查时间")
private Date inspectionDate;
@ApiModelProperty(value = "车牌号码")
private String carNumber;
@ApiModelProperty(value = "充装气体与气瓶允许充装气体一致")
private String isCylinderGasConsistent;
@ApiModelProperty(value = "充装介质")
private String fillingMedium;
@ApiModelProperty(value = "气瓶外表面有划伤、裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷")
private String hasSevereExternalDamage;
@ApiModelProperty(value = "气瓶内有剩余压力")
private String hasResidualPressure;
@ApiModelProperty(value = "无气体泄漏")
private String isGasLeak;
@ApiModelProperty(value = "气瓶附件齐全并符合安全要求")
private String areAccessoriesCompleteAndSafe;
@ApiModelProperty(value = "排除超期未检气瓶、非法改装或翻新及报废气瓶")
private String excludeOverdueRefurbishedScrappedCylinders;
@ApiModelProperty(value = "警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致")
private String isWarningLabelGasNameConsistentWithStamp;
@ApiModelProperty(value = "气瓶外表面的颜色标志是否符合规定")
private String isColorMarkingCompliant;
@ApiModelProperty(value = "瓶阀符合GB7512规定")
@JSONField(name = "valveCompliesGB7512")
private String valveCompliesGB7512;
@ApiModelProperty(value = "气瓶外表面无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷")
private String hasNoSevereExternalDamage;
@ApiModelProperty(value = "新投入使用气瓶或经检验后首次投入使用气瓶,充装前按照规定先置换瓶内空气,并经分析合格后方可充气")
private String isNewOrInspectedOk;
@ApiModelProperty(value = "充装介质与气瓶钢印标志气体名称是否一致")
private String isFillingMediumConsistentWithStamp;
@ApiModelProperty(value = "气瓶瓶阀的出气口螺纹型式是符合GB/T15383的规定")
@JSONField(name = "outletThreadTypeCompliesGB15383")
private String outletThreadTypeCompliesGB15383;
@ApiModelProperty(value = "充装可燃、氧化性气体,如无余压保持阀,重复充装前应先进行抽真空处理")
private String isVacuumProcessed;
@ApiModelProperty(value = "气瓶外表面无严重腐蚀")
private String hasNoSevereCorrosion;
@ApiModelProperty(value = "气瓶外表面无损伤缺陷")
private String hasNoSurfaceDefects;
@ApiModelProperty(value = "气瓶外表面的颜色标志符合GB/T7144的规定、且清晰易认")
@JSONField(name = "colorMeetsGB7144")
private String colorMeetsGB7144;
@ApiModelProperty(value = "气瓶外表面无裂纹")
private String hasNoCracks;
@ApiModelProperty(value = "气瓶外表面无明显变形")
private String hasNoObviousDeformation;
@ApiModelProperty(value = "瓶体、瓶阀无沾染油脂或其他可燃物")
private String noOilOrFlammableSubstances;
@ApiModelProperty(value = "瓶体无腐蚀、机械损伤等表面缺陷、是否满足GB13076标准报废")
@JSONField(name = "meetsGB13076AndMechanicalDamage")
private String meetsGB13076AndMechanicalDamage;
@ApiModelProperty(value = "易熔合金无融熔、流失、损伤的")
private String fusiblePlugUndamaged;
@ApiModelProperty(value = "钢印标记完整且能够识别")
private String stampMarkingsClearAndComplete;
@ApiModelProperty(value = "附件完整且符合规定")
private String accessoriesCompleteAndConforming;
@ApiModelProperty(value = "瓶阀侧接嘴处积无炭黑或焦油等异物")
private String noCarbonBlackOrTarAtValvePort;
@ApiModelProperty(value = "瓶内的填料、溶剂的质量没有问题")
private String fillerAndSolventQualityOK;
@ApiModelProperty(value = "无其他影响安全使用缺陷的")
private String noOtherSafetyAffectingDefects;
@ApiModelProperty(value = "充装间温度")
private Double fillingRoomTemperature;
@ApiModelProperty(value = "剩余压力")
private Double residualPressure;
@ApiModelProperty(value = "丙酮补加量")
private Double acetoneSupplementAmount;
@ApiModelProperty(value = "钢印、警示标签与待充介质名称一致")
private String isStampAndLabelConsistentWithMedium;
@ApiModelProperty(value = "外表面颜色标志符合规定")
private String externalColorMarkingCompliant;
@ApiModelProperty(value = "瓶阀出气口螺纹符合要求")
private String valveOutletThreadComplies;
@ApiModelProperty(value = "外表面无严重损伤缺陷")
private String hasNoSevereSurfaceDefects;
@ApiModelProperty(value = "气瓶附件符合要求")
private String cylinderAccessoriesMeetRequirements;
@ApiModelProperty(value = "氧化性混合气体的瓶体、瓶阀未沾染油脂")
private String oxidizingGasCylinderFreeOfOil;
@ApiModelProperty(value = "气瓶经预处理(抽真空、烘干、置换或组合)合格")
private String preTreatedSuccessfully;
@ApiModelProperty(value = "气瓶表面无油污、无严重损伤")
private String surfaceFreeOfOilAndDamage;
@ApiModelProperty(value = "瓶阀完好、接头洁净无水或冰")
private String valveInGoodConditionCleanConnection;
@ApiModelProperty(value = "无余压的瓶用洁净的待充气体吹扫(易燃的先用液氮置换)")
private String emptyPressureCylinderPurgedWithCleanGas;
@ApiModelProperty(value = "瓶阀出气口为内螺纹(左旋)")
private String valveOutletInternalThreadLeftHanded;
@ApiModelProperty(value = "有余压的经定性鉴别且与待充介质一致")
private String qualitativeTestPassedForResidualGas;
@ApiModelProperty(value = "无余压的经卸阀内检合格")
private String internalValveInspectionPassed;
@ApiModelProperty(value = "气瓶安全附件齐全并符合安全要求")
private String safetyAccessoriesCompleteAndSafe;
@ApiModelProperty(value = "首充气瓶已置换瓶内空气")
private String newCylinderAirReplacedBeforeFirstUse;
}
package com.yeejoin.amos.api.openapi.face.model;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@Data
public class TmCylinderFillingRecordModel extends AbstractBaseModel{
/**
*
*/
public class TmCylinderFillingRecordModel extends CylinderAbstractBaseModel {
private static final long serialVersionUID = 1L;
private String sequenceCode; //气瓶唯一标识码*
private String fillingRecordId; //充装记录Id*
private String fillingStartTime; //充装开始时间*
private String fillingEndTime; //充装结束时间*
private String fillingUser; //充装人员姓名*
private double fillingQuantity; //充装量(Kg)*
private double temperature; //室温*
private int abnormal; //异常情况*
private String inspectorName; // 检查人员姓名
private String fillingBeforeId; // 充装信息审核ID
private String fillingCheckId; // 充装后复查ID
private String fillingExamineId; // 充装信息审核ID
@ApiModelProperty(value = "充装枪编号")
private String gunNumber;
@ApiModelProperty(value = "充装开始时间")
@TableField("filling_start_time")
private Date fillingStartTime;
@ApiModelProperty(value = "充装结束时间")
@TableField("filling_end_time")
private Date fillingEndTime;
@ApiModelProperty(value = "充装量m3/(kg)")
private Double fillingAmount;
@ApiModelProperty(value = "压力")
private Double pressure;
@ApiModelProperty(value = "室温")
private Double ambientTemperature;
@ApiModelProperty(value = "异常情况")
private String abnormalConditions;
@ApiModelProperty(value = "瓶体温度无异常升高")
private String isNoAbnormalTemperatureRise;
@ApiModelProperty(value = "充装压力")
private Double fillingPressure;
@ApiModelProperty(value = "瓶体温度一致")
private String temperatureConsistent;
@ApiModelProperty(value = "瓶内无异常音响")
private String noAbnormalSoundInside;
@ApiModelProperty(value = "瓶阀及各连接部位的密封良好")
private String valveSealedWell;
@ApiModelProperty(value = "充装压力≤2.5 MPa")
private String fillingPressureLessThan;
@ApiModelProperty(value = "乙炔充装量")
private Double acetyleneFillingAmount;
@ApiModelProperty(value = "各组分含量")
private Double componentContents;
@ApiModelProperty(value = "标称皮重")
private Double tareWeightNominal;
@ApiModelProperty(value = "充装后质量")
private Double filledWeight;
@ApiModelProperty(value = "实际充装量")
private Double actualFillingAmount;
@ApiModelProperty(value = "含余气皮重")
private Double tareWeightIncludingResidualGas;
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.yeejoin.amos.boot.module.cylinder.api.entity.ESCylinderFillingInfoDto;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface ESCylinderFillingInfoRepository extends PagingAndSortingRepository<ESCylinderFillingInfoDto, Long> {
}
......@@ -24,6 +24,7 @@ public interface MidEquipRegistrationInfoMapper extends BaseMapper<MidEquipRegis
"(SELECT concat ( fi.\"PRODUCE_UNIT_CREDIT_CODE\", '-', fi.\"FACTORY_NUM\" ) sequenceCode " +
"FROM idx_biz_jg_factory_info fi, idx_biz_jg_other_info oi " +
"WHERE oi.\"RECORD\" = fi.\"RECORD\" " +
" AND oi.\"SUPERVISORY_CODE\" IS NOT NULL " +
" AND oi.\"CLAIM_STATUS\" = '已认领' " +
" AND fi.\"PRODUCE_UNIT_CREDIT_CODE\" IS NOT NULL " +
" AND fi.\"FACTORY_NUM\" IS NOT NULL) WHERE sequenceCode in " +
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
......@@ -8,19 +8,25 @@ import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@Data
public abstract class AbstractBaseEntity extends BaseEntity{
public abstract class AbstractBaseEntity extends BaseEntity {
/**
*
*/
private static final long serialVersionUID = 1L;
@TableField("sync_date")
protected Date syncDate;//同步时间 yyyy-MM-dd HH24:mi:ss
@TableField("sync_state")
protected int syncState;//同步状态(0-新增 1-更新 2-删除)
/**
* 对接公司编码
*/
@TableField("app_Id")
protected String appId;
@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;
@ApiModelProperty(value = "对接接口版本")
private String version = "v1";
@ApiModelProperty(value = "更新人员")
private String recUserName;
}
package com.yeejoin.amos.api.openapi.face.orm.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public abstract class CylinderAbstractBaseEntity extends AbstractBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "气瓶唯一标识码,制造单位统一信用代码-出厂编号")
private String sequenceCode;
@ApiModelProperty(value = "气瓶类型")
private String cylinderType;
@ApiModelProperty(value = "充装前检查Id")
private String fillingBeforeId;
@ApiModelProperty(value = "作业人员证书编号")
private String inspectorUserNum;
@ApiModelProperty(value = "作业人员姓名")
private String inspectorUser;
@ApiModelProperty(value = "充装企业名称")
private String fillingUnitName;
@ApiModelProperty(value = "充装企业统一社会信用代码")
private String fillingUnitCreditCode;
}
......@@ -2,10 +2,12 @@ package com.yeejoin.amos.api.openapi.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 气瓶充装信息--充装前检查
* @author kinky
......@@ -14,46 +16,154 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tm_cylinder_filling")
public class TmCylinderFilling extends AbstractBaseEntity{/**
*
*/
public class TmCylinderFilling extends CylinderAbstractBaseEntity {
private static final long serialVersionUID = 1L;
@TableField("credit_code")
private String creditCode;
@TableField("filling_unit_name")
private String fillingUnitName; //充装企业名称*
@TableField("fill_before_item")
private String fillBeforeItem;
@TableField("sequence_code")
private String sequenceCode; //气瓶唯一标识码*
@TableField("is_valid")
private String isValid; //是否在检验有效期以内,严禁充装超期未检气瓶、非法改装或翻新及报废气瓶
@TableField("same")
private int same; //警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致*
@TableField("is_regulations")
private int isRegulations; //气瓶外表面的颜色标志是否符合规定*
@TableField("is_compliance_withGBT")
private int isComplianceWithGBT; //气瓶瓶阀的出气口螺纹型式是否符合GB/T15383的规定,即可燃气体用的瓶阀,出口螺纹应是内螺纹(左旋)*
@TableField("have_still_pressure")
private int haveStillPressure; //气瓶内有无剩余压力*
@TableField("is_complete")
private int isComplete; //气瓶外表面有无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷*
@TableField("have_security_documents")
private int haveSecurityDocuments; //气瓶的安全附件齐全并符合安全要求
@TableField("inspector_user")
private String inspectorUser; //检查人员姓名*
@TableField("inspection_date")
private String inspectionDate; //检查时间*
@TableField("nonconformances")
private String nonconformances;
@TableField("check_results")
private String checkResults;
/**
* 充装前检查id
*/
@TableField("filling_before_id")
private String fillingBeforeId;
@ApiModelProperty(value = "对接接口版本")
protected String version = "v1";
@ApiModelProperty(value = "检查时间")
private Date inspectionDate;
@ApiModelProperty(value = "车牌号码")
private String carNumber;
@ApiModelProperty(value = "充装气体与气瓶允许充装气体一致")
private String isCylinderGasConsistent;
@ApiModelProperty(value = "充装介质")
private String fillingMedium;
@ApiModelProperty(value = "气瓶外表面有划伤、裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷")
private String hasSevereExternalDamage;
@ApiModelProperty(value = "气瓶内有剩余压力")
private String hasResidualPressure;
@ApiModelProperty(value = "无气体泄漏")
private String isGasLeak;
@ApiModelProperty(value = "气瓶附件齐全并符合安全要求")
private String areAccessoriesCompleteAndSafe;
@ApiModelProperty(value = "排除超期未检气瓶、非法改装或翻新及报废气瓶")
private String excludeOverdueRefurbishedScrappedCylinders;
@ApiModelProperty(value = "警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致")
private String isWarningLabelGasNameConsistentWithStamp;
@ApiModelProperty(value = "气瓶外表面的颜色标志是否符合规定")
private String isColorMarkingCompliant;
@ApiModelProperty(value = "瓶阀符合GB7512规定")
@TableField(value = "valve_complies_gb7512")
private String valveCompliesGB7512;
@ApiModelProperty(value = "气瓶外表面无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷")
private String hasNoSevereExternalDamage;
@ApiModelProperty(value = "新投入使用气瓶或经检验后首次投入使用气瓶,充装前按照规定先置换瓶内空气,并经分析合格后方可充气")
private String isNewOrInspectedOk;
@ApiModelProperty(value = "充装介质与气瓶钢印标志气体名称是否一致")
private String isFillingMediumConsistentWithStamp;
@ApiModelProperty(value = "气瓶瓶阀的出气口螺纹型式是符合GB/T15383的规定")
@TableField(value = "outlet_thread_type_complies_gb15383")
private String outletThreadTypeCompliesGB15383;
@ApiModelProperty(value = "充装可燃、氧化性气体,如无余压保持阀,重复充装前应先进行抽真空处理")
private String isVacuumProcessed;
@ApiModelProperty(value = "气瓶外表面无严重腐蚀")
private String hasNoSevereCorrosion;
@ApiModelProperty(value = "气瓶外表面无损伤缺陷")
private String hasNoSurfaceDefects;
@ApiModelProperty(value = "气瓶外表面的颜色标志符合GB/T7144的规定、且清晰易认")
@TableField(value = "color_meets_gb7144")
private String colorMeetsGB7144;
@ApiModelProperty(value = "气瓶外表面无裂纹")
private String hasNoCracks;
@ApiModelProperty(value = "气瓶外表面无明显变形")
private String hasNoObviousDeformation;
@ApiModelProperty(value = "瓶体、瓶阀无沾染油脂或其他可燃物")
private String noOilOrFlammableSubstances;
@ApiModelProperty(value = "瓶体无腐蚀、机械损伤等表面缺陷、是否满足GB13076标准报废")
@TableField(value = "meets_gb13076_and_mechanical_damage")
private String meetsGB13076AndMechanicalDamage;
@ApiModelProperty(value = "易熔合金无融熔、流失、损伤的")
private String fusiblePlugUndamaged;
@ApiModelProperty(value = "钢印标记完整且能够识别")
private String stampMarkingsClearAndComplete;
@ApiModelProperty(value = "附件完整且符合规定")
private String accessoriesCompleteAndConforming;
@ApiModelProperty(value = "瓶阀侧接嘴处积无炭黑或焦油等异物")
private String noCarbonBlackOrTarAtValvePort;
@ApiModelProperty(value = "瓶内的填料、溶剂的质量没有问题")
private String fillerAndSolventQualityOk;
@ApiModelProperty(value = "无其他影响安全使用缺陷的")
private String noOtherSafetyAffectingDefects;
@ApiModelProperty(value = "充装间温度")
private Double fillingRoomTemperature;
@ApiModelProperty(value = "剩余压力")
private Double residualPressure;
@ApiModelProperty(value = "丙酮补加量")
private Double acetoneSupplementAmount;
@ApiModelProperty(value = "钢印、警示标签与待充介质名称一致")
private String isStampAndLabelConsistentWithMedium;
@ApiModelProperty(value = "外表面颜色标志符合规定")
private String externalColorMarkingCompliant;
@ApiModelProperty(value = "瓶阀出气口螺纹符合要求")
private String valveOutletThreadComplies;
@ApiModelProperty(value = "外表面无严重损伤缺陷")
private String hasNoSevereSurfaceDefects;
@ApiModelProperty(value = "气瓶附件符合要求")
private String cylinderAccessoriesMeetRequirements;
@ApiModelProperty(value = "氧化性混合气体的瓶体、瓶阀未沾染油脂")
private String oxidizingGasCylinderFreeOfOil;
@ApiModelProperty(value = "气瓶经预处理(抽真空、烘干、置换或组合)合格")
private String preTreatedSuccessfully;
@ApiModelProperty(value = "气瓶表面无油污、无严重损伤")
private String surfaceFreeOfOilAndDamage;
@ApiModelProperty(value = "瓶阀完好、接头洁净无水或冰")
private String valveInGoodConditionCleanConnection;
@ApiModelProperty(value = "无余压的瓶用洁净的待充气体吹扫(易燃的先用液氮置换)")
private String emptyPressureCylinderPurgedWithCleanGas;
@ApiModelProperty(value = "瓶阀出气口为内螺纹(左旋)")
private String valveOutletInternalThreadLeftHanded;
@ApiModelProperty(value = "有余压的经定性鉴别且与待充介质一致")
private String qualitativeTestPassedForResidualGas;
@ApiModelProperty(value = "无余压的经卸阀内检合格")
private String internalValveInspectionPassed;
@ApiModelProperty(value = "气瓶安全附件齐全并符合安全要求")
private String safetyAccessoriesCompleteAndSafe;
@ApiModelProperty(value = "首充气瓶已置换瓶内空气")
private String newCylinderAirReplacedBeforeFirstUse;
}
package com.yeejoin.amos.api.openapi.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 液化气体气瓶充装信息-充装后复查
* 气瓶充装信息-充装后复查
* @author kinky
*
*/
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tm_cylinder_filling_check")
public class TmCylinderFillingCheck extends AbstractBaseEntity{/**
*
*/
public class TmCylinderFillingCheck extends CylinderAbstractBaseEntity {
private static final long serialVersionUID = 1L;
@TableField("sequence_code")
private String sequenceCode; //气瓶唯一标识码*
@TableField("filling_check_id")
private String fillingCheckId; //充装后复查ID
@TableField("within_scope")
private int withinScope; //充装量在规定范围内*
@TableField("sealed_state")
private int sealedState; //瓶阀及其与瓶口连接的密封良好*
@TableField("defective")
private int defective; //瓶体未出现鼓包变形或泄露等严重缺陷*
@TableField("abnormal_temperature")
private int abnormalTemperature; //瓶体温度没有异常升高的迹象*
@TableField("warning_sign")
private int warningSign; //气瓶粘贴警示标签和充装标签*
@TableField("compliance")
private String compliance; //液化气瓶充装量符合有关规定,充装后逐瓶称重
@TableField("inspector")
private String inspector; //检查人员姓名*
@TableField("inspection_date")
private String inspectionDate; //检查时间*
@TableField("check_results")
private String checkResults;
@TableField("nonconformances")
private String nonconformances;
@ApiModelProperty(value = "对接接口版本")
protected String version = "v1";
@ApiModelProperty(value = "检查时间")
private Date inspectionDate;
@ApiModelProperty(value = "瓶体未出现鼓包变形或泄漏等严重缺陷")
private String isNoBulgingOrLeakage;
@ApiModelProperty(value = "瓶内压力正常")
private String isPressureNormal;
@ApiModelProperty(value = "瓶体温度没有异常升高的迹象")
private String isTemperatureNormal;
@ApiModelProperty(value = "瓶阀及其与瓶口连接的密封良好")
private String valveSealIsGood;
@ApiModelProperty(value = "气瓶粘贴警示标签和充装标签)")
private String hasWarningAndFillingLabels;
@ApiModelProperty(value = "充装量复秤未超重")
private String reweighedWithinLimit;
@ApiModelProperty(value = "瓶内压力(充装量)及质量符合安全技术规范及相关标准的要求")
private String pressureAndMassMeetRegulations;
@ApiModelProperty(value = "瓶帽、充装标签、警示标签完整")
private String capsAndLabelsAreIntact;
@ApiModelProperty(value = "瓶阀出气口螺纹及其密封面良好")
private String valveSealedWell;
@ApiModelProperty(value = "静置后压力符合规定")
private String pressureAfterRestingComplies;
@ApiModelProperty(value = "气瓶未发生泄漏等问题")
private String noLeakageIssuesDetected;
@ApiModelProperty(value = "处理结果是否合格")
private String isTreatmentResultQualified;
@ApiModelProperty(value = "充装量(压力或质量)符合要求")
private String fillingAmountMeetsRequirement;
@ApiModelProperty(value = "密封良好无泄漏")
private String sealsIntactNoLeakage;
@ApiModelProperty(value = "气瓶无变形等缺陷")
private String noDeformationOrDefects;
@ApiModelProperty(value = "瓶体温升无异常")
private String temperatureRiseNormal;
@ApiModelProperty(value = "气瓶附件完整齐全")
private String cylinderAccessoriesComplete;
@ApiModelProperty(value = "阀门已关闭,管路及各附件无漏气")
private String valveClosedNoLeakageInPipingAndAccessories;
@ApiModelProperty(value = "气瓶外观无结霜、结露")
private String noFrostOrCondensationOnCylinder;
}
......@@ -2,47 +2,79 @@ package com.yeejoin.amos.api.openapi.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 液化气体气瓶充装信息-充装记录
* @author kinky
*
* @author kinky
*/
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tm_cylinder_filling_record")
public class TmCylinderFillingRecord extends AbstractBaseEntity{/**
*
*/
private static final long serialVersionUID = 1L;
@TableField("sequence_code")
private String sequenceCode; //气瓶唯一标识码*
@TableField("filling_record_id")
private String fillingRecordId; //充装记录Id*
@TableField("filling_starttime")
private String fillingStartTime; //充装开始时间*
@TableField("filling_endtime")
private String fillingEndTime; //充装结束时间*
@TableField("filling_user")
private String fillingUser; //充装人员姓名*
@TableField("filling_quantity")
private double fillingQuantity; //充装量(Kg)*
@TableField("temperature")
private double temperature; //室温*
@TableField("abnormal")
private int abnormal; //异常情况*
@TableField("inspector_name")
private String inspectorName;
@TableField("filling_before_id")
private String fillingBeforeId;
@TableField("filling_check_id")
private String fillingCheckId;
@TableField("filling_examine_id")
private String fillingExamineId;
@ApiModelProperty(value = "对接接口版本")
protected String version = "v1";
public class TmCylinderFillingRecord extends CylinderAbstractBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "充装枪编号")
private String gunNumber;
@ApiModelProperty(value = "充装开始时间")
@TableField("filling_start_time")
private Date fillingStartTime;
@ApiModelProperty(value = "充装结束时间")
@TableField("filling_end_time")
private Date fillingEndTime;
@ApiModelProperty(value = "充装量m3/(kg)")
private Double fillingAmount;
@ApiModelProperty(value = "压力")
private Double pressure;
@ApiModelProperty(value = "室温")
private Double ambientTemperature;
@ApiModelProperty(value = "异常情况")
private String abnormalConditions;
@ApiModelProperty(value = "瓶体温度无异常升高")
private String isNoAbnormalTemperatureRise;
@ApiModelProperty(value = "充装压力")
private Double fillingPressure;
@ApiModelProperty(value = "瓶体温度一致")
private String temperatureConsistent;
@ApiModelProperty(value = "瓶内无异常音响")
private String noAbnormalSoundInside;
@ApiModelProperty(value = "瓶阀及各连接部位的密封良好")
private String valveSealedWell;
@ApiModelProperty(value = "充装压力≤2.5 MPa")
private String fillingPressureLessThan;
@ApiModelProperty(value = "乙炔充装量")
private Double acetyleneFillingAmount;
@ApiModelProperty(value = "各组分含量")
private Double componentContents;
@ApiModelProperty(value = "标称皮重")
private Double tareWeightNominal;
@ApiModelProperty(value = "充装后质量")
private Double filledWeight;
@ApiModelProperty(value = "实际充装量")
private Double actualFillingAmount;
@ApiModelProperty(value = "含余气皮重")
private Double tareWeightIncludingResidualGas;
}
......@@ -7,21 +7,10 @@ import com.yeejoin.amos.api.openapi.face.model.BizTokenModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderDateInfoModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderTableModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderDateInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderDateInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFilling;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingCheck;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingExamine;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingRecord;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderInspection;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderTags;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderUnit;
import com.yeejoin.amos.api.openapi.face.orm.entity.OpenapiBizToken;
import com.yeejoin.amos.api.openapi.face.orm.entity.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.component.cache.Redis;
import org.typroject.tyboot.core.foundation.context.RequestContext;
......@@ -415,7 +404,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
@Scheduled(cron = "0 0 2 * * ?") //每天凌晨两点执行
// @Scheduled(cron = "0 0 2 * * ?") //每天凌晨两点执行
public void fixedDelayJob(){
// 每天更新或者添加昨天的数据
......
......@@ -56,7 +56,8 @@ public class OpenapiBizTokenService extends BaseService<OpenapiBizTokenModel, Op
bizTokenModel.setToken(token);
RequestContext.setToken(token);
AgencyUserModel user = Privilege.agencyUserClient.getme().getResult();
bizTokenModel.setApiCompanyCode(user.getCompanys().get(0).getOrgCode());
bizTokenModel.setApiCompanyCode(user.getCompanys().get(0).getCompanyCode()); // 当前一个人只能有一个单位
bizTokenModel.setApiCompanyName(user.getCompanys().get(0).getCompanyName()); // 当前一个人只能有一个单位
String tokenKey = Redis.genKey(Constant.TOKEN_PREFIX, token);
this.redisTemplate.opsForValue().set(tokenKey, bizTokenModel);
return token;
......
......@@ -27,6 +27,7 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import java.text.ParseException;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@Component
......@@ -117,9 +118,6 @@ public class SyncCylinderDataService {
public void syncCylinderFillingRecord(List<TmCylinderFillingRecordModel> cylinderFillingRecordDtos) {
List<CylinderFillingRecord> cylinderFillingRecordList = Bean.toModels(cylinderFillingRecordDtos, CylinderFillingRecord.class);
cylinderFillingRecordList.forEach(cylinderFillingRecord -> {
cylinderFillingRecord.setAbnormal(Objects.requireNonNull(CylDictEnum.getEnum(cylinderFillingRecord.getAbnormal(), CylDictEnum.abnormal_0.getKey())).getSeqNbr());
});
cylCylinderFillingCheckMapper.batchInsertOrUpdate(cylinderFillingRecordList);
}
......@@ -139,38 +137,11 @@ public class SyncCylinderDataService {
public void syncCylinderFillingBefore(List<TmCylinderFillingModel> cylinderFillingDtos) {
List<CylinderFilling> cylinderFillingList = Bean.toModels(cylinderFillingDtos, CylinderFilling.class);
cylinderFillingList.forEach(cylinderFilling -> {
cylinderFilling.setIsValid(String.valueOf(Objects.requireNonNull(CylDictEnum.getEnum(Integer.valueOf(cylinderFilling.getIsValid()), CylDictEnum.isValid_0.getKey()))));
cylinderFilling.setSame(Objects.requireNonNull(CylDictEnum.getEnum(cylinderFilling.getSame(),
CylDictEnum.same_0.getKey())).getSeqNbr());
cylinderFilling.setIsRegulations(Objects.requireNonNull(CylDictEnum.getEnum(cylinderFilling.getIsRegulations(),
CylDictEnum.isRegulations_0.getKey())).getSeqNbr());
cylinderFilling.setIsComplianceWithgbt(Objects.requireNonNull(CylDictEnum.getEnum(cylinderFilling.getIsComplianceWithgbt(),
CylDictEnum.isComplianceWithGBT_0.getKey())).getSeqNbr());
cylinderFilling.setHaveStillPressure(Objects.requireNonNull(CylDictEnum.getEnum(cylinderFilling.getHaveStillPressure(),
CylDictEnum.haveStillPressure_0.getKey())).getSeqNbr());
cylinderFilling.setIsComplete(Objects.requireNonNull(CylDictEnum.getEnum(cylinderFilling.getIsComplete(),
CylDictEnum.isComplete_0.getKey())).getSeqNbr());
cylinderFilling.setHaveSecurityDocuments(Objects.requireNonNull(CylDictEnum.getEnum(cylinderFilling.getHaveSecurityDocuments(),
CylDictEnum.SecurityDocuments_0.getKey())).getSeqNbr());
});
cylCylinderFillingCheckMapper.saveAndBatchInsert(cylinderFillingList);
}
public void syncCylinderFillingAfter(List<TmCylinderFillingCheckModel> cylinderFillingCheckDtos) {
List<CylinderFillingCheck> cylinderFillingChecList = Bean.toModels(cylinderFillingCheckDtos, CylinderFillingCheck.class);
cylinderFillingChecList.forEach(cylinderFillingCheck -> {
cylinderFillingCheck.setAbnormalTemperature(Objects.requireNonNull(CylDictEnum.getEnum(cylinderFillingCheck.getAbnormalTemperature(),
CylDictEnum.abnormalTemperature_0.getKey())).getSeqNbr());
cylinderFillingCheck.setSealedState(Objects.requireNonNull(CylDictEnum.getEnum(cylinderFillingCheck.getSealedState(),
CylDictEnum.sealedState_0.getKey())).getSeqNbr());
cylinderFillingCheck.setWarningSign(Objects.requireNonNull(CylDictEnum.getEnum(cylinderFillingCheck.getWarningSign(),
CylDictEnum.warningSign_0.getKey())).getSeqNbr());
cylinderFillingCheck.setDefective(Objects.requireNonNull(CylDictEnum.getEnum(cylinderFillingCheck.getDefective(),
CylDictEnum.defective_0.getKey())).getSeqNbr());
cylinderFillingCheck.setWithinScope(Objects.requireNonNull(CylDictEnum.getEnum(cylinderFillingCheck.getWithinScope(),
CylDictEnum.withinScope_0.getKey())).getSeqNbr());
});
cylinderFillingCheckMapper.saveOrUpdateByCondition(cylinderFillingChecList);
}
......@@ -178,33 +149,6 @@ public class SyncCylinderDataService {
@DS("tzs")
public void createCylinderFillingRecord(List<ESCylinderFillingRecordDto> cylinderFillingRecord) {
if (!ObjectUtils.isEmpty(cylinderFillingRecord)) {
// List<String> appIds = cylinderFillingRecord.stream().map(ESCylinderFillingRecordDto::getAppId).collect(Collectors.toList());
// List<String> sequenceCodeS = cylinderFillingRecord.stream().map(ESCylinderFillingRecordDto::getSequenceCode).collect(Collectors.toList());
// List<ESCylinderFillingRecordDto> cylinderFillingRecordInfo = cylinderFillingRecordMapper.getCylinderFillingRecordInfo(appIds, sequenceCodeS);
// cylinderFillingRecord.stream().map(item -> {
// List<ESCylinderFillingRecordDto> collect = cylinderFillingRecordInfo.stream().filter(e -> item.getAppIdAndSequenceCode().equals(e.getAppIdAndSequenceCode())).collect(Collectors.toList());
// if (!ObjectUtils.isEmpty(collect)) {
// item.setSequenceNbr(collect.get(0).getSequenceNbr());
// item.setUnitName(collect.get(0).getUnitName());
// item.setFactoryNum(collect.get(0).getFactoryNum());
// item.setCylinderVariety(collect.get(0).getCylinderVariety());
// item.setCylinderVarietyName(collect.get(0).getCylinderVarietyName());
// item.setUnitInnerCode(collect.get(0).getUnitInnerCode());
// item.setSequenceCode(collect.get(0).getSequenceCode());
// item.setQrCode(collect.get(0).getQrCode());
// item.setElectronicLabelCode(collect.get(0).getElectronicLabelCode());
// item.setAppId(collect.get(0).getAppId());
// item.setCreditCode(collect.get(0).getCreditCode());
// item.setRegionCode(collect.get(0).getRegionCode());
// try {
// item.setInspectionDateMs(ObjectUtils.isEmpty(item.getFillingStartTime()) ? 0L : DateUtils.dateParseWithPattern(item.getFillingStartTime()).getTime());
// item.setInspectionDateAfterMS(ObjectUtils.isEmpty(item.getFillingEndTime()) ? 0L : DateUtils.dateParseWithPattern(item.getFillingEndTime()).getTime());
// } catch (ParseException e) {
// throw new RuntimeException(e);
// }
// }
// return item;
// });
cylinderFillingRecord.forEach(item -> {
String sequenceCode = item.getSequenceCode();
System.out.println("Processing sequenceCode: " + sequenceCode);
......@@ -311,4 +255,11 @@ public class SyncCylinderDataService {
List<CylinderOffloading> cylinderOffloadingList = Bean.toModels(tmCylinderOffloadingList, CylinderOffloading.class);
cylinderOffloadingMapper.saveOrUpdateBatch(cylinderOffloadingList);
}
public List<Map<String, String>> queryTzsCylinderInfo(Set<String> sequenceCodeList) {
// 将sequenceCodeList按-分割成两个列表
Set<String> produceUnitCreditCodes = sequenceCodeList.stream().map(sequenceCode -> sequenceCode.split("-", 2)[0]).collect(Collectors.toSet());
Set<String> factoryNums = sequenceCodeList.stream().map(sequenceCode -> sequenceCode.split("-", 2)[1]).collect(Collectors.toSet());
return cylinderInfoMapper.queryTzsCylinderInfo(produceUnitCreditCodes, factoryNums);
}
}
......@@ -8,9 +8,9 @@ import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderFillingCheckMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingCheck;
import com.yeejoin.amos.api.openapi.service.MyBaseServiceImpl;
import com.yeejoin.amos.api.openapi.util.MultiFieldKey;
import com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.Bean;
import java.util.Date;
......@@ -20,7 +20,7 @@ import java.util.List;
/**
*
* <pre>
* 液化气体气瓶充装信息-充装后复查 服务类
* 气瓶充装信息-充装后复查 服务类
* </pre>
*
* @author gwb
......@@ -32,12 +32,15 @@ public class TmCylinderFillingCheckService extends MyBaseServiceImpl<TmCylinderF
@Autowired
private SyncCylinderDataService syncCylinderDataService;
@Autowired
private SnowflakeIdUtil sequence;
@DSTransactional
public void createCylinderFillingAfter(List<TmCylinderFillingCheckModel> model) {
String appId = getAppId();
Date now = new Date();
for (TmCylinderFillingCheckModel cylinderFillingCheckModel : model) {
cylinderFillingCheckModel.setSequenceNbr(null);
cylinderFillingCheckModel.setSequenceNbr(sequence.nextId());
cylinderFillingCheckModel.setRecDate(now);
cylinderFillingCheckModel.setAppId(appId);
}
......@@ -50,11 +53,11 @@ public class TmCylinderFillingCheckService extends MyBaseServiceImpl<TmCylinderF
tmCylinderFillingCheck -> new LambdaQueryWrapper<TmCylinderFillingCheck>()
.eq(TmCylinderFillingCheck::getAppId, tmCylinderFillingCheck.getAppId())
.eq(TmCylinderFillingCheck::getSequenceCode, tmCylinderFillingCheck.getSequenceCode())
.eq(TmCylinderFillingCheck::getFillingCheckId, tmCylinderFillingCheck.getFillingCheckId()),
entity -> new MultiFieldKey(entity.getFillingCheckId()),
.eq(TmCylinderFillingCheck::getFillingBeforeId, tmCylinderFillingCheck.getFillingBeforeId()),
entity -> new MultiFieldKey(entity.getAppId(), entity.getSequenceCode(), entity.getFillingBeforeId()),
"appId",
"sequenceCode",
"fillingCheckId");
"fillBeforeId");
}
private void syncCylinderFillingAfter(List<TmCylinderFillingCheckModel> model) {
......
......@@ -10,15 +10,12 @@ import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderFillingRecordMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingRecord;
import com.yeejoin.amos.api.openapi.service.MyBaseServiceImpl;
import com.yeejoin.amos.api.openapi.util.MultiFieldKey;
import com.yeejoin.amos.boot.module.cylinder.api.entity.ESCylinderFillingRecordDto;
import com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil;
import com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylinderFillingRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.Bean;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -34,8 +31,6 @@ import java.util.List;
*/
@Component
public class TmCylinderFillingRecordService extends MyBaseServiceImpl<TmCylinderFillingRecordModel, TmCylinderFillingRecord, TmCylinderFillingRecordMapper> {
@Autowired
private RedisTemplate redisTemplate;
@Autowired
CylinderFillingRecordMapper cylinderFillingRecordMapper;
......@@ -46,12 +41,15 @@ public class TmCylinderFillingRecordService extends MyBaseServiceImpl<TmCylinder
@Autowired
private SyncCylinderDataService syncCylinderDataService;
@Autowired
private SnowflakeIdUtil sequence;
@DSTransactional
public void createCylinderFilling(List<TmCylinderFillingRecordModel> model) {
Date now = new Date();
String appId = getAppId();
for (TmCylinderFillingRecordModel cylinderFillingRecordModel : model) {
cylinderFillingRecordModel.setSequenceNbr(null);
cylinderFillingRecordModel.setSequenceNbr(sequence.nextId());
cylinderFillingRecordModel.setRecDate(now);
cylinderFillingRecordModel.setAppId(appId);
}
......@@ -64,8 +62,8 @@ public class TmCylinderFillingRecordService extends MyBaseServiceImpl<TmCylinder
tmCylinderFillingRecord -> new LambdaQueryWrapper<TmCylinderFillingRecord>()
.eq(TmCylinderFillingRecord::getAppId, tmCylinderFillingRecord.getAppId())
.eq(TmCylinderFillingRecord::getSequenceCode, tmCylinderFillingRecord.getSequenceCode())
.eq(TmCylinderFillingRecord::getFillingRecordId, tmCylinderFillingRecord.getFillingRecordId()),
entity -> new MultiFieldKey(entity.getAppId(), entity.getSequenceCode(), entity.getFillingRecordId()),
.eq(TmCylinderFillingRecord::getFillingBeforeId, tmCylinderFillingRecord.getFillingBeforeId()),
entity -> new MultiFieldKey(entity.getAppId(), entity.getSequenceCode(), entity.getFillingBeforeId()),
"appId",
"sequenceCode",
"fillingRecordId"
......@@ -76,8 +74,8 @@ public class TmCylinderFillingRecordService extends MyBaseServiceImpl<TmCylinder
public void syncCylinderFilling(List<TmCylinderFillingRecordModel> model) {
syncCylinderDataService.syncCylinderFillingRecord(model);
ArrayList<ESCylinderFillingRecordDto> models = Bean.toModels(model, ESCylinderFillingRecordDto.class);
syncCylinderDataService.createCylinderFillingRecord(models);
// ArrayList<ESCylinderFillingRecordDto> models = Bean.toModels(model, ESCylinderFillingRecordDto.class);
// syncCylinderDataService.createCylinderFillingRecord(models);
}
public List<String> getDateList() {
......
......@@ -8,6 +8,7 @@ import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderFillingMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFilling;
import com.yeejoin.amos.api.openapi.service.MyBaseServiceImpl;
import com.yeejoin.amos.api.openapi.util.MultiFieldKey;
import com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.core.foundation.utils.Bean;
......@@ -33,6 +34,9 @@ public class TmCylinderFillingService extends MyBaseServiceImpl<TmCylinderFillin
@Autowired
private TmCylinderFillingService self;
@Autowired
private SnowflakeIdUtil sequence;
public TmCylinderFillingService(SyncCylinderDataService syncCylinderDataService) {
this.syncCylinderDataService = syncCylinderDataService;
}
......@@ -42,7 +46,7 @@ public class TmCylinderFillingService extends MyBaseServiceImpl<TmCylinderFillin
Date now = new Date();
String appId = getAppId();
for (TmCylinderFillingModel cylinderFillingModel : model) {
cylinderFillingModel.setSequenceNbr(null);
cylinderFillingModel.setSequenceNbr(sequence.nextId());
cylinderFillingModel.setRecDate(now);
cylinderFillingModel.setAppId(appId);
}
......
package com.yeejoin.amos.api.openapi.validation;
/**
* 描述: 字段校验接口
*
*/
public interface FieldValidation {
boolean isRequired();
boolean isUnique();
String getFieldName();
}
......@@ -9,5 +9,6 @@ public class CylinderFillingMessage {
private Integer cylinderNumber;
private String message;
private String appId;
private String orgCode;
private String fillingCompanyCode;
private String rawData;
}
......@@ -10,6 +10,7 @@ public class CylinderFillingMessageModel extends BaseModel {
private Integer cylinderNumber;
private String message;
private String appId;
private String orgCode;
private String fillingCompanyCode;
private String useUnitCode;
private String rawData;
}
......@@ -7,7 +7,6 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import java.util.Date;
......@@ -22,76 +21,156 @@ import java.util.Date;
@Accessors(chain = true)
@TableName("tz_cylinder_filling")
@ApiModel(value="TzCylinderFilling对象", description="气瓶充装信息--充装前检查")
public class CylinderFilling extends BaseEntity {
public class CylinderFilling extends CylinderFillingBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "检查时间")
private Date inspectionDate;
@ApiModelProperty(value = "车牌号码")
@TableField(value = "car_number")
private String carNumber;
@ApiModelProperty(value = "充装气体与气瓶允许充装气体一致")
private String isCylinderGasConsistent;
@ApiModelProperty(value = "充装介质")
private String fillingMedium;
@ApiModelProperty(value = "气瓶外表面有划伤、裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷")
private String hasSevereExternalDamage;
@ApiModelProperty(value = "充装前检查Id")
private String fillingBeforeId;
@ApiModelProperty(value = "气瓶内有剩余压力")
private String hasResidualPressure;
@ApiModelProperty(value = "充装企业名称")
private String fillingUnitName;
@ApiModelProperty(value = "无气体泄漏")
private String isGasLeak;
@ApiModelProperty(value = "气瓶唯一标识码")
private String sequenceCode;
@ApiModelProperty(value = "气瓶附件齐全并符合安全要求")
private String areAccessoriesCompleteAndSafe;
@ApiModelProperty(value = "是否在检验有效期以内")
private String isValid;
@ApiModelProperty(value = "排除超期未检气瓶、非法改装或翻新及报废气瓶")
private String excludeOverdueRefurbishedScrappedCylinders;
@ApiModelProperty(value = "警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致")
private Integer same;
private String isWarningLabelGasNameConsistentWithStamp;
@ApiModelProperty(value = "气瓶外表面的颜色标志是否符合规定")
private Integer isRegulations;
private String isColorMarkingCompliant;
@ApiModelProperty(value = "气瓶瓶阀的出气口螺纹型式是否符合GB/T15383")
@TableField("is_compliance_withGBT")
private Integer isComplianceWithgbt;
@ApiModelProperty(value = "瓶阀符合GB7512规定")
@TableField(value = "valve_complies_gb7512")
private String valveCompliesGB7512;
@ApiModelProperty(value = "气瓶内有无剩余压力")
private Integer haveStillPressure;
@ApiModelProperty(value = "气瓶外表面无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷")
private String hasNoSevereExternalDamage;
@ApiModelProperty(value = "气瓶外表面有无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷")
private Integer isComplete;
@ApiModelProperty(value = "新投入使用气瓶或经检验后首次投入使用气瓶,充装前按照规定先置换瓶内空气,并经分析合格后方可充气")
private String isNewOrInspectedOk;
@ApiModelProperty(value = "气瓶的安全附件齐全并符合安全要求")
private Integer haveSecurityDocuments;
@ApiModelProperty(value = "充装介质与气瓶钢印标志气体名称是否一致")
private String isFillingMediumConsistentWithStamp;
@ApiModelProperty(value = "检查人员姓名")
private String inspectorUser;
@ApiModelProperty(value = "气瓶瓶阀的出气口螺纹型式是符合GB/T15383的规定")
@TableField(value = "outlet_thread_type_complies_gb15383")
private String outletThreadTypeCompliesGB15383;
@ApiModelProperty(value = "检查时间")
private String inspectionDate;
@ApiModelProperty(value = "充装可燃、氧化性气体,如无余压保持阀,重复充装前应先进行抽真空处理")
private String isVacuumProcessed;
@ApiModelProperty(value = "气瓶外表面无严重腐蚀")
private String hasNoSevereCorrosion;
@ApiModelProperty(value = "气瓶外表面无损伤缺陷")
private String hasNoSurfaceDefects;
@ApiModelProperty(value = "气瓶外表面的颜色标志符合GB/T7144的规定、且清晰易认")
@TableField(value = "color_meets_gb7144")
private String colorMeetsGB7144;
@ApiModelProperty(value = "气瓶外表面无裂纹")
private String hasNoCracks;
@ApiModelProperty(value = "气瓶外表面无明显变形")
private String hasNoObviousDeformation;
@ApiModelProperty(value = "瓶体、瓶阀无沾染油脂或其他可燃物")
private String noOilOrFlammableSubstances;
@ApiModelProperty(value = "瓶体无腐蚀、机械损伤等表面缺陷、是否满足GB13076标准报废")
@TableField(value = "meets_gb13076_and_mechanical_damage")
private String meetsGB13076AndMechanicalDamage;
@ApiModelProperty(value = "易熔合金无融熔、流失、损伤的")
private String fusiblePlugUndamaged;
@ApiModelProperty(value = "钢印标记完整且能够识别")
private String stampMarkingsClearAndComplete;
@ApiModelProperty(value = "附件完整且符合规定")
private String accessoriesCompleteAndConforming;
@ApiModelProperty(value = "瓶阀侧接嘴处积无炭黑或焦油等异物")
private String noCarbonBlackOrTarAtValvePort;
@ApiModelProperty(value = "瓶内的填料、溶剂的质量没有问题")
private String fillerAndSolventQualityOk;
@ApiModelProperty(value = "无其他影响安全使用缺陷的")
private String noOtherSafetyAffectingDefects;
@ApiModelProperty(value = "充装间温度")
private Double fillingRoomTemperature;
@ApiModelProperty(value = "剩余压力")
private Double residualPressure;
@ApiModelProperty(value = "丙酮补加量")
private Double acetoneSupplementAmount;
@ApiModelProperty(value = "钢印、警示标签与待充介质名称一致")
private String isStampAndLabelConsistentWithMedium;
@ApiModelProperty(value = "外表面颜色标志符合规定")
private String externalColorMarkingCompliant;
@ApiModelProperty(value = "瓶阀出气口螺纹符合要求")
private String valveOutletThreadComplies;
@ApiModelProperty(value = "外表面无严重损伤缺陷")
private String hasNoSevereSurfaceDefects;
@ApiModelProperty(value = "气瓶附件符合要求")
private String cylinderAccessoriesMeetRequirements;
@ApiModelProperty(value = "氧化性混合气体的瓶体、瓶阀未沾染油脂")
private String oxidizingGasCylinderFreeOfOil;
@ApiModelProperty(value = "同步时间 yyyy-MM-dd HH24:mi:ss")
private Date syncDate;
@ApiModelProperty(value = "气瓶经预处理(抽真空、烘干、置换或组合)合格")
private String preTreatedSuccessfully;
@ApiModelProperty(value = "0-新增 1-更新 2-删除")
private Integer syncState;
@ApiModelProperty(value = "气瓶表面无油污、无严重损伤")
private String surfaceFreeOfOilAndDamage;
@ApiModelProperty(value = "对接公司编码")
private String appId;
@ApiModelProperty(value = "瓶阀完好、接头洁净无水或冰")
private String valveInGoodConditionCleanConnection;
@ApiModelProperty(value = "数据完整度")
private Double integrity;
@ApiModelProperty(value = "无余压的瓶用洁净的待充气体吹扫(易燃的先用液氮置换)")
private String emptyPressureCylinderPurgedWithCleanGas;
@ApiModelProperty(value = "统一社会信用代码")
private String creditCode;
@ApiModelProperty(value = "瓶阀出气口为内螺纹(左旋)")
private String valveOutletInternalThreadLeftHanded;
@ApiModelProperty(value = "新投入使用气瓶或经检验后首次投入使用气瓶,充装前应按照规定先置换瓶内空气,并经分析合格后方可充气")
private String fillBeforeItem;
@ApiModelProperty(value = "有余压的经定性鉴别且与待充介质一致")
private String qualitativeTestPassedForResidualGas;
@ApiModelProperty(value = "检查结果")
private String checkResults;
@ApiModelProperty(value = "无余压的经卸阀内检合格")
private String internalValveInspectionPassed;
@ApiModelProperty(value = "不合格项")
private String nonconformances;
@ApiModelProperty(value = "气瓶安全附件齐全并符合安全要求")
private String safetyAccessoriesCompleteAndSafe;
@ApiModelProperty(value = "对接接口版本")
private String version = "v1";
@ApiModelProperty(value = "首充气瓶已置换瓶内空气")
private String newCylinderAirReplacedBeforeFirstUse;
}
package com.yeejoin.amos.boot.module.cylinder.flc.api.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import java.util.Date;
/**
* 气瓶充装信息--充装前检查
*
* @author duanwei
* @date 2022-08-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class CylinderFillingBaseEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "气瓶唯一标识码,制造单位统一信用代码-出厂编号")
private String sequenceCode;
@ApiModelProperty(value = "气瓶类型")
private String cylinderType;
@ApiModelProperty(value = "充装前检查Id")
private String fillingBeforeId;
@ApiModelProperty(value = "作业人员证书编号")
private String inspectorUserNum;
@ApiModelProperty(value = "作业人员姓名")
private String inspectorUser;
@ApiModelProperty(value = "充装企业名称")
private String fillingUnitName;
@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;
@ApiModelProperty(value = "充装企业统一社会信用代码")
private String fillingUnitCreditCode;
@ApiModelProperty(value = "对接接口版本")
private String version = "v1";
@ApiModelProperty(value = "更新人员")
private String recUserName;
@ApiModelProperty(value = "是否删除")
private boolean isDelete;
}
......@@ -6,7 +6,6 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import java.util.Date;
......@@ -21,58 +20,68 @@ import java.util.Date;
@Accessors(chain = true)
@TableName("tz_cylinder_filling_check")
@ApiModel(value="TzCylinderFillingCheck对象", description="液化气体气瓶充装信息-充装后复查")
public class CylinderFillingCheck extends BaseEntity {
public class CylinderFillingCheck extends CylinderFillingBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "气瓶唯一标识码")
private String sequenceCode;
@ApiModelProperty(value = "检查时间")
private Date inspectionDate;
@ApiModelProperty(value = "瓶体未出现鼓包变形或泄漏等严重缺陷")
private String isNoBulgingOrLeakage;
@ApiModelProperty(value = "充装后复查ID")
private String fillingCheckId;
@ApiModelProperty(value = "瓶内压力正常")
private String isPressureNormal;
@ApiModelProperty(value = "充装量在规定范围内")
private Integer withinScope;
@ApiModelProperty(value = "瓶体温度没有异常升高的迹象")
private String isTemperatureNormal;
@ApiModelProperty(value = "瓶阀及其与瓶口连接的密封良好")
private Integer sealedState;
private String valveSealIsGood;
@ApiModelProperty(value = "瓶体未出现鼓包变形或泄露等严重缺陷")
private Integer defective;
@ApiModelProperty(value = "气瓶粘贴警示标签和充装标签)")
private String hasWarningAndFillingLabels;
@ApiModelProperty(value = "瓶体温度没有异常升高的迹象")
private Integer abnormalTemperature;
@ApiModelProperty(value = "充装量复秤未超重")
private String reweighedWithinLimit;
@ApiModelProperty(value = "气瓶粘贴警示标签和充装标签")
private Integer warningSign;
@ApiModelProperty(value = "瓶内压力(充装量)及质量符合安全技术规范及相关标准的要求")
private String pressureAndMassMeetRegulations;
@ApiModelProperty(value = "液化气瓶充装量符合有关规定,充装后逐瓶称重")
private String compliance;
@ApiModelProperty(value = "瓶帽、充装标签、警示标签完整")
private String capsAndLabelsAreIntact;
@ApiModelProperty(value = "检查人员姓名")
private String inspector;
@ApiModelProperty(value = "瓶阀出气口螺纹及其密封面良好")
private String valveSealedWell;
@ApiModelProperty(value = "检查时间")
private String inspectionDate;
@ApiModelProperty(value = "静置后压力符合规定")
private String pressureAfterRestingComplies;
@ApiModelProperty(value = "气瓶未发生泄漏等问题")
private String noLeakageIssuesDetected;
@ApiModelProperty(value = "处理结果是否合格")
private String isTreatmentResultQualified;
@ApiModelProperty(value = "充装量(压力或质量)符合要求")
private String fillingAmountMeetsRequirement;
@ApiModelProperty(value = "同步时间 yyyy-MM-dd HH24:mi:ss")
private Date syncDate;
@ApiModelProperty(value = "密封良好无泄漏")
private String sealsIntactNoLeakage;
@ApiModelProperty(value = "0-新增 1-更新 2-删除")
private Integer syncState;
@ApiModelProperty(value = "气瓶无变形等缺陷")
private String noDeformationOrDefects;
@ApiModelProperty(value = "对接公司编码")
private String appId;
@ApiModelProperty(value = "瓶体温升无异常")
private String temperatureRiseNormal;
@ApiModelProperty(value = "数据完整度")
private Double integrity;
@ApiModelProperty(value = "气瓶附件完整齐全")
private String cylinderAccessoriesComplete;
@ApiModelProperty(value = "检查结果")
private String checkResults;
@ApiModelProperty(value = "阀门已关闭,管路及各附件无漏气")
private String valveClosedNoLeakageInPipingAndAccessories;
@ApiModelProperty(value = "不合格项")
private String nonconformances;
@ApiModelProperty(value = "气瓶外观无结霜、结露")
private String noFrostOrCondensationOnCylinder;
@ApiModelProperty(value = "对接接口版本")
private String version = "v1";
}
......@@ -7,7 +7,6 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import java.util.Date;
......@@ -22,63 +21,66 @@ import java.util.Date;
@Accessors(chain = true)
@TableName("tz_cylinder_filling_record")
@ApiModel(value="TzCylinderFillingRecord对象", description="液化气体气瓶充装信息-充装记录")
public class CylinderFillingRecord extends BaseEntity {
public class CylinderFillingRecord extends CylinderFillingBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "充装记录Id")
private String fillingRecordId;
@ApiModelProperty(value = "充装枪编号")
private String gunNumber;
@ApiModelProperty(value = "充装开始时间")
@TableField("filling_starttime")
private String fillingStarttime;
@TableField("filling_start_time")
private Date fillingStartTime;
@ApiModelProperty(value = "充装结束时间")
@TableField("filling_endtime")
private String fillingEndtime;
@TableField("filling_end_time")
private Date fillingEndTime;
@ApiModelProperty(value = "充装人员姓名")
private String fillingUser;
@ApiModelProperty(value = "充装量m3/(kg)")
private Double fillingAmount;
@ApiModelProperty(value = "充装量(Kg)")
private Double fillingQuantity;
@ApiModelProperty(value = "压力")
private Double pressure;
@ApiModelProperty(value = "室温")
private Double temperature;
private Double ambientTemperature;
@ApiModelProperty(value = "异常情况")
private Integer abnormal;
private String abnormalConditions;
@ApiModelProperty(value = "同步时间 yyyy-MM-dd HH24:mi:ss")
private Date syncDate;
@ApiModelProperty(value = "瓶体温度无异常升高")
private String isNoAbnormalTemperatureRise;
@ApiModelProperty(value = "1初次同步数据 2上层系统已同步数据 0已删除数据")
private Integer syncState;
@ApiModelProperty(value = "充装压力")
private Double fillingPressure;
@ApiModelProperty(value = "对接公司编码")
private String appId;
@ApiModelProperty(value = "瓶体温度一致")
private String temperatureConsistent;
@ApiModelProperty(value = "数据完整度")
private Double integrity;
@ApiModelProperty(value = "瓶内无异常音响")
private String noAbnormalSoundInside;
@ApiModelProperty(value = "不能与充装人员姓名相同")
private String inspectorName;
@ApiModelProperty(value = "瓶阀及各连接部位的密封良好")
private String valveSealedWell;
@ApiModelProperty(value = "充装前检查Id")
private String fillingBeforeId;
@ApiModelProperty(value = "充装压力≤2.5 MPa")
private String fillingPressureLessThan;
@ApiModelProperty(value = "充装后复查ID")
private String fillingCheckId;
@ApiModelProperty(value = "乙炔充装量")
private Double acetyleneFillingAmount;
@ApiModelProperty(value = "充装信息审核ID")
private String fillingExamineId;
@ApiModelProperty(value = "各组分含量")
private Double componentContents;
@ApiModelProperty(value = "是否保存到es(1标识已经保存过)")
private String isNotEs;
@ApiModelProperty(value = "标称皮重")
private Double tareWeightNominal;
@ApiModelProperty(value = "气瓶唯一标识码")
private String sequenceCode;
@ApiModelProperty(value = "充装后质量")
private Double filledWeight;
@ApiModelProperty(value = "对接接口版本")
private String version = "v1";
@ApiModelProperty(value = "实际充装量")
private Double actualFillingAmount;
@ApiModelProperty(value = "含余气皮重")
private Double tareWeightIncludingResidualGas;
}
......@@ -9,6 +9,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 气瓶基本信息 Mapper 接口
......@@ -126,5 +127,7 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
List<CylinderFillingRecordStatisticsDto> queryFillingRecordByOrgCode(@Param("orgCode") String orgCode, @Param("startTime") String startTime);
List<CylinderFillingRecordStatisticsDto> queryoffloadingByOrgCode(@Param("orgCode") String orgCode, @Param("startTime") String startTime);
List<Map<String, String>> queryTzsCylinderInfo(@Param("produceUnitCreditCodes") Set<String> produceUnitCreditCodes, @Param("factoryNums") Set<String> factoryNums);
}
<?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.cylinder.flc.api.mapper.CylinderFillingCheckMapper">
<insert id="saveOrUpdateByCondition">
<insert id="saveOrUpdateByCondition">
INSERT INTO "amos_tzs_biz"."tz_cylinder_filling_check" (
"sequence_nbr",
"filling_check_id",
"within_scope",
"sealed_state",
"defective",
"abnormal_temperature",
"warning_sign",
"compliance",
"inspector",
"inspection_date",
"rec_date",
"rec_user_id",
"rec_user_name",
"is_delete",
"sequence_code",
"cylinder_type",
"filling_before_id",
"inspector_user_num",
"inspector_user",
"filling_unit_name",
"sync_date",
"sync_state",
"app_id",
"integrity",
"check_results",
"nonconformances",
"sequence_code",
"version"
"filling_unit_credit_code",
"version",
"inspection_date",
"is_no_bulging_or_leakage",
"is_pressure_normal",
"is_temperature_normal",
"valve_seal_is_good",
"has_warning_and_filling_labels",
"reweighed_within_limit",
"pressure_and_mass_meet_regulations",
"caps_and_labels_are_intact",
"valve_sealed_well",
"pressure_after_resting_complies",
"no_leakage_issues_detected",
"is_treatment_result_qualified",
"filling_amount_meets_requirement",
"seals_intact_no_leakage",
"no_deformation_or_defects",
"temperature_rise_normal",
"cylinder_accessories_complete",
"valve_closed_no_leakage_in_piping_and_accessories",
"no_frost_or_condensation_on_cylinder"
)
VALUES
<foreach collection ="list" item="item" index= "index" separator =",">
(
#{item.sequenceNbr},
#{item.fillingCheckId},
#{item.withinScope},
#{item.sealedState},
#{item.defective},
#{item.abnormalTemperature},
#{item.warningSign},
#{item.compliance},
#{item.inspector},
#{item.inspectionDate},
#{item.recDate},
#{item.recUserId},
#{item.recUserName},
#{item.isDelete},
#{item.sequenceCode},
#{item.cylinderType},
#{item.fillingBeforeId},
#{item.inspectorUserNum},
#{item.inspectorUser},
#{item.fillingUnitName},
#{item.syncDate},
#{item.syncState},
#{item.appId},
#{item.integrity},
#{item.checkResults},
#{item.nonconformances},
#{item.sequenceCode},
#{item.version}
#{item.fillingUnitCreditCode},
#{item.version},
#{item.inspectionDate},
#{item.isNoBulgingOrLeakage},
#{item.isPressureNormal},
#{item.isTemperatureNormal},
#{item.valveSealIsGood},
#{item.hasWarningAndFillingLabels},
#{item.reweighedWithinLimit},
#{item.pressureAndMassMeetRegulations},
#{item.capsAndLabelsAreIntact},
#{item.valveSealedWell},
#{item.pressureAfterRestingComplies},
#{item.noLeakageIssuesDetected},
#{item.isTreatmentResultQualified},
#{item.fillingAmountMeetsRequirement},
#{item.sealsIntactNoLeakage},
#{item.noDeformationOrDefects},
#{item.temperatureRiseNormal},
#{item.cylinderAccessoriesComplete},
#{item.valveClosedNoLeakageInPipingAndAccessories},
#{item.noFrostOrCondensationOnCylinder}
)
</foreach>
ON conflict (app_id, sequence_code, filling_check_id) DO
ON conflict (app_id, sequence_code) DO
UPDATE
SET "sequence_nbr" = EXCLUDED."sequence_nbr",
"filling_check_id" = EXCLUDED."filling_check_id",
"within_scope" = EXCLUDED."within_scope",
"sealed_state" = EXCLUDED."sealed_state",
"defective" = EXCLUDED."defective",
"abnormal_temperature" = EXCLUDED."abnormal_temperature",
"warning_sign" = EXCLUDED."warning_sign",
"compliance" = EXCLUDED."compliance",
"inspector" = EXCLUDED."inspector",
"inspection_date" = EXCLUDED."inspection_date",
"rec_date" = EXCLUDED."rec_date",
SET "rec_date" = EXCLUDED."rec_date",
"rec_user_id" = EXCLUDED."rec_user_id",
"rec_user_name" = EXCLUDED."rec_user_name",
"is_delete" = EXCLUDED."is_delete",
"sequence_code" = EXCLUDED."sequence_code",
"cylinder_type" = EXCLUDED."cylinder_type",
"filling_before_id" = EXCLUDED."filling_before_id",
"inspector_user_num" = EXCLUDED."inspector_user_num",
"inspector_user" = EXCLUDED."inspector_user",
"filling_unit_name" = EXCLUDED."filling_unit_name",
"sync_date" = EXCLUDED."sync_date",
"sync_state" = EXCLUDED."sync_state",
"app_id" = EXCLUDED."app_id",
"integrity" = EXCLUDED."integrity",
"check_results" = EXCLUDED."check_results",
"nonconformances" = EXCLUDED."nonconformances",
"sequence_code" = EXCLUDED."sequence_code",
"version" = EXCLUDED."version"
"filling_unit_credit_code" = EXCLUDED."filling_unit_credit_code",
"version" = EXCLUDED."version",
"inspection_date" = EXCLUDED."inspection_date",
"is_no_bulging_or_leakage" = EXCLUDED."is_no_bulging_or_leakage",
"is_pressure_normal" = EXCLUDED."is_pressure_normal",
"is_temperature_normal" = EXCLUDED."is_temperature_normal",
"valve_seal_is_good" = EXCLUDED."valve_seal_is_good",
"has_warning_and_filling_labels" = EXCLUDED."has_warning_and_filling_labels",
"reweighed_within_limit" = EXCLUDED."reweighed_within_limit",
"pressure_and_mass_meet_regulations" = EXCLUDED."pressure_and_mass_meet_regulations",
"caps_and_labels_are_intact" = EXCLUDED."caps_and_labels_are_intact",
"valve_sealed_well" = EXCLUDED."valve_sealed_well",
"pressure_after_resting_complies" = EXCLUDED."pressure_after_resting_complies",
"no_leakage_issues_detected" = EXCLUDED."no_leakage_issues_detected",
"is_treatment_result_qualified" = EXCLUDED."is_treatment_result_qualified",
"filling_amount_meets_requirement" = EXCLUDED."filling_amount_meets_requirement",
"seals_intact_no_leakage" = EXCLUDED."seals_intact_no_leakage",
"no_deformation_or_defects" = EXCLUDED."no_deformation_or_defects",
"temperature_rise_normal" = EXCLUDED."temperature_rise_normal",
"cylinder_accessories_complete" = EXCLUDED."cylinder_accessories_complete",
"valve_closed_no_leakage_in_piping_and_accessories" = EXCLUDED."valve_closed_no_leakage_in_piping_and_accessories",
"no_frost_or_condensation_on_cylinder" = EXCLUDED."no_frost_or_condensation_on_cylinder"
</insert>
<select id="queryIntegirtyByAppId" resultType="java.lang.Double">
SELECT AVG(integrity) AS score_avg FROM tz_cylinder_filling_check t where t.app_id = #{appId} AND
DATE_SUB(CURDATE(), INTERVAL 30 DAY) <![CDATA[ <= ]]> date_format(t.sync_date,'%Y-%M-%d');
......
......@@ -647,4 +647,39 @@
ORDER BY
filling_time DESC
</select>
<select id="queryTzsCylinderInfo" resultType="java.util.Map">
SELECT
ui."RECORD" record,
ui."ESTATE_UNIT_NAME" estateUnitName,
ui."EQU_STATE" cylinderStatus,
(select name from cb_data_dictionary where type = 'SHZT' and code = ui."EQU_STATE") cylinderStatusName,
ri."USE_ORG_CODE" useOrgCode,
ri."EQU_DEFINE" equDefine,
(select name from tz_equipment_category where code = ri."EQU_DEFINE") equDefineName,
ui."USE_INNER_CODE" unitInnerCode,
fi."FACTORY_NUM" factoryNum,
oi."ORG_BRANCH_CODE" orgBranchCode,
oi."ORG_BRANCH_NAME" orgBranchName,
concat ( fi."PRODUCE_UNIT_CREDIT_CODE", '-', fi."FACTORY_NUM" ) sequenceCode
FROM
idx_biz_jg_use_info ui
LEFT JOIN idx_biz_jg_factory_info fi ON fi."RECORD" = ui."RECORD"
LEFT JOIN idx_biz_jg_register_info ri ON ri."RECORD" = ui."RECORD"
LEFT JOIN idx_biz_jg_supervision_info oi ON oi."RECORD" = ui."RECORD"
WHERE
ri."EQU_CATEGORY" = '2300'
and ri."USE_ORG_CODE" is not null
and fi."PRODUCE_UNIT_CREDIT_CODE" = ANY(ARRAY[
<foreach collection="produceUnitCreditCodes" item="code" index="index" separator=",">
#{code}
</foreach>
])
and fi."FACTORY_NUM" = ANY(ARRAY[
<foreach collection="factoryNums" item="num" index="index" separator=",">
#{num}
</foreach>
])
and ui."IS_INTO_MANAGEMENT" = true
</select>
</mapper>
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