Merge branch 'dev' of http://47.94.165.164:13000/geg-gas/geg-gas-pcitc into dev
This commit is contained in:
@ -608,6 +608,9 @@ public class DataLogTools {
|
||||
if(idValue2==null || idValue2 <=0) {
|
||||
joinTable.setIdValue(item, IdWorker.getId());
|
||||
}
|
||||
System.out.println(" field:"+joinColumn.field());
|
||||
System.out.println(" relatedField:"+joinColumn.relatedField());
|
||||
System.out.println(" joinFieldValue:"+joinFieldValue);
|
||||
joinTable.setFieldValue(item, joinColumn.relatedField(), joinFieldValue);
|
||||
Set<Class<?>> joinClasses = SetUtils.ofCollection(classes);
|
||||
initJoinValue(item,joinTable,joinClasses);
|
||||
@ -646,12 +649,21 @@ public class DataLogTools {
|
||||
if(CollectionUtils.isNotEmpty(listValue)) {
|
||||
if(type==OperationType.INSERT || type==OperationType.DELETE) {
|
||||
if(type==OperationType.INSERT) {
|
||||
|
||||
for (Object item : listValue) {
|
||||
Long idValue = joinTable.getIdValue(item);
|
||||
DataChangeLog datalog = createLog(join.getTargetClass(),type,parent);
|
||||
mapper.insert(joinTable.toEntity(item));
|
||||
saveAttrs(joinTable,item);
|
||||
buildFields(datalog,joinTable,item,null);
|
||||
List<LogJoinInfo> jtjoins = joinTable.getJoins();
|
||||
if(CollectionUtils.isNotEmpty(jtjoins)) {
|
||||
for (LogJoinInfo temp : jtjoins) {
|
||||
if(temp.getJoin().caseType()==JoinCaseType.FULL) {
|
||||
buildJoins(logs, datalog, OperationType.INSERT, joinTable, temp, item); // 传递父级实体
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (Object item : listValue) {
|
||||
@ -660,6 +672,14 @@ public class DataLogTools {
|
||||
delete(item, joinTable, mapper);
|
||||
saveAttrs(joinTable,item,true);
|
||||
buildFields(datalog,joinTable,item,null);
|
||||
List<LogJoinInfo> jtjoins = joinTable.getJoins();
|
||||
if(CollectionUtils.isNotEmpty(jtjoins)) {
|
||||
for (LogJoinInfo temp : jtjoins) {
|
||||
if(temp.getJoin().caseType()==JoinCaseType.FULL) {
|
||||
buildJoins(logs, datalog, OperationType.DELETE, joinTable, temp, item); // 传递父级实体
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
@ -675,11 +695,28 @@ public class DataLogTools {
|
||||
datalog.setOperationType(OperationType.INSERT);
|
||||
mapper.insert(joinTable.toEntity(item));
|
||||
buildFields(datalog,joinTable,item,null);
|
||||
List<LogJoinInfo> jtjoins = joinTable.getJoins();
|
||||
if(CollectionUtils.isNotEmpty(jtjoins)) {
|
||||
for (LogJoinInfo temp : jtjoins) {
|
||||
if(temp.getJoin().caseType()==JoinCaseType.FULL) {
|
||||
buildJoins(logs, datalog, OperationType.INSERT, joinTable, temp, item); // 传递父级实体
|
||||
}
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}else {
|
||||
datalog.setOperationType(OperationType.UPDATE);
|
||||
mapper.updateById(joinTable.toEntity(item));
|
||||
buildFields(datalog,joinTable,item,old);
|
||||
List<LogJoinInfo> jtjoins = joinTable.getJoins();
|
||||
if(CollectionUtils.isNotEmpty(jtjoins)) {
|
||||
for (LogJoinInfo temp : jtjoins) {
|
||||
if(temp.getJoin().caseType()==JoinCaseType.FULL) {
|
||||
buildJoins(logs, datalog, OperationType.UPDATE, joinTable, temp, item); // 传递父级实体
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//删除旧数据
|
||||
@ -693,6 +730,14 @@ public class DataLogTools {
|
||||
delete(pojo, joinTable, mapper);
|
||||
saveAttrs(joinTable,item,true);
|
||||
buildFields(datalog,joinTable,item,null);
|
||||
List<LogJoinInfo> jtjoins = joinTable.getJoins();
|
||||
if(CollectionUtils.isNotEmpty(jtjoins)) {
|
||||
for (LogJoinInfo temp : jtjoins) {
|
||||
if(temp.getJoin().caseType()==JoinCaseType.FULL) {
|
||||
buildJoins(logs, datalog, OperationType.DELETE, joinTable, temp, item); // 传递父级实体
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -709,6 +754,14 @@ public class DataLogTools {
|
||||
delete(pojo, joinTable, mapper);
|
||||
saveAttrs(joinTable,item,true);
|
||||
buildFields(datalog,joinTable,item,null);
|
||||
List<LogJoinInfo> jtjoins = joinTable.getJoins();
|
||||
if(CollectionUtils.isNotEmpty(jtjoins)) {
|
||||
for (LogJoinInfo temp : jtjoins) {
|
||||
if(temp.getJoin().caseType()==JoinCaseType.FULL) {
|
||||
buildJoins(logs, datalog, OperationType.DELETE, joinTable, temp, item); // 传递父级实体
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -749,6 +802,7 @@ public class DataLogTools {
|
||||
delete(dto, joinTable, mapper);
|
||||
saveAttrs(joinTable,dto,true);
|
||||
buildFields(datalog,joinTable,dto,null);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,154 @@
|
||||
package com.xjrsoft.module.contract.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class AddLngContractDto extends com.xjrsoft.common.model.base.BaseModel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 合同主体ID(天然气公司/惠贸)
|
||||
*/
|
||||
@ApiModelProperty("合同主体ID(天然气公司/惠贸)")
|
||||
private Long comId;
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
@ApiModelProperty("合同号")
|
||||
private String kNo;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ApiModelProperty("合同名称")
|
||||
private String kName;
|
||||
/**
|
||||
* 业务类型(PI-国际采购/SI-国际销售/PP-国内PNG采购/SL-国内LNG销售/SP-国内PNG销售/T-管道运输/P-加工服务)
|
||||
*/
|
||||
@ApiModelProperty("业务类型(PI-国际采购/SI-国际销售/PP-国内PNG采购/SL-国内LNG销售/SP-国内PNG销售/T-管道运输/P-加工服务)")
|
||||
private String typeCode;
|
||||
/**
|
||||
* 是否线上(竞拍)合同(Y-是,N-否;线上合同不需要审批)
|
||||
*/
|
||||
@ApiModelProperty("是否线上(竞拍)合同(Y-是,N-否;线上合同不需要审批)")
|
||||
private String onlineSign;
|
||||
/**
|
||||
* 交易对手类型(lng_supplier-供应商,lng_customer-客户;不显示)
|
||||
*/
|
||||
@ApiModelProperty("交易对手类型(lng_supplier-供应商,lng_customer-客户;不显示)")
|
||||
private String cpTableName;
|
||||
/**
|
||||
* 主交易对手编码
|
||||
*/
|
||||
@ApiModelProperty("主交易对手编码")
|
||||
private String cpCode;
|
||||
/**
|
||||
* 主交易对手名称
|
||||
*/
|
||||
@ApiModelProperty("主交易对手名称")
|
||||
private String cpName;
|
||||
/**
|
||||
* 合同期限
|
||||
*/
|
||||
@ApiModelProperty("合同期限")
|
||||
private String kPeriod;
|
||||
/**
|
||||
* 合同签订日期
|
||||
*/
|
||||
@ApiModelProperty("合同签订日期")
|
||||
private LocalDateTime dateSign;
|
||||
/**
|
||||
* 有效期开始
|
||||
*/
|
||||
@ApiModelProperty("有效期开始")
|
||||
private LocalDateTime dateFrom;
|
||||
/**
|
||||
* 有效期结束
|
||||
*/
|
||||
@ApiModelProperty("有效期结束")
|
||||
private LocalDateTime dateTo;
|
||||
/**
|
||||
* 确认函开始日
|
||||
*/
|
||||
@ApiModelProperty("确认函开始日")
|
||||
private LocalDateTime dateCfmFrom;
|
||||
/**
|
||||
* 确认函结束日
|
||||
*/
|
||||
@ApiModelProperty("确认函结束日")
|
||||
private LocalDateTime dateCfmTo;
|
||||
/**
|
||||
* 币种
|
||||
*/
|
||||
@ApiModelProperty("币种")
|
||||
private String curCode;
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
@ApiModelProperty("合同金额")
|
||||
private String amountDesc;
|
||||
/**
|
||||
* 我方联系人
|
||||
*/
|
||||
@ApiModelProperty("我方联系人")
|
||||
private Long empId;
|
||||
/**
|
||||
* 业务部门ID
|
||||
*/
|
||||
@ApiModelProperty("业务部门ID")
|
||||
private Long bDeptId;
|
||||
/**
|
||||
* 状态(未提交/审批中/已审批/已驳回)
|
||||
*/
|
||||
@ApiModelProperty("状态(未提交/审批中/已审批/已驳回)")
|
||||
private String approCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* lngContractSalesPng
|
||||
*/
|
||||
@ApiModelProperty("lngContractSalesPng子表")
|
||||
private List<AddLngContractSalesPngDto> lngContractSalesPngList;
|
||||
/**
|
||||
* lngContractSalesPngPoint
|
||||
*/
|
||||
@ApiModelProperty("lngContractSalesPngPoint子表")
|
||||
private List<AddLngContractSalesPngPointDto> lngContractSalesPngPointList;
|
||||
/**
|
||||
* lngContractSalesPngQty
|
||||
*/
|
||||
@ApiModelProperty("lngContractSalesPngQty子表")
|
||||
private List<AddLngContractSalesPngQtyDto> lngContractSalesPngQtyList;
|
||||
/**
|
||||
* lngContractFactRel
|
||||
*/
|
||||
@ApiModelProperty("lngContractFactRel子表")
|
||||
private List<AddLngContractFactRelDto> lngContractFactRelList;
|
||||
/**
|
||||
* lngContractApproRel
|
||||
*/
|
||||
@ApiModelProperty("lngContractApproRel子表")
|
||||
private List<AddLngContractApproRelDto> lngContractApproRelList;
|
||||
}
|
||||
@ -12,7 +12,7 @@ import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气采购
|
||||
* @title: 国内管道气
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
package com.xjrsoft.module.contract.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class AddLngContractSalesPngDto extends com.xjrsoft.common.model.base.BaseModel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 合同-档案主键
|
||||
*/
|
||||
@ApiModelProperty("合同-档案主键")
|
||||
private Long kId;
|
||||
/**
|
||||
* 定价机制(固定价/公式价/对标价/无)
|
||||
*/
|
||||
@ApiModelProperty("定价机制(固定价/公式价/对标价/无)")
|
||||
private String prcTypeCode;
|
||||
/**
|
||||
* 量价周期(1-自然月,-1-自然月往前1日)
|
||||
*/
|
||||
@ApiModelProperty("量价周期(1-自然月,-1-自然月往前1日)")
|
||||
private String periodTypeCode;
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
@ApiModelProperty("计量单位")
|
||||
private String uomCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
package com.xjrsoft.module.contract.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class AddLngContractSalesPngPointDto extends com.xjrsoft.common.model.base.BaseModel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 合同-档案主键
|
||||
*/
|
||||
@ApiModelProperty("合同-档案主键")
|
||||
private Long kId;
|
||||
/**
|
||||
* 计量交割点编码(通常为下载点,客户托运时为上载点)
|
||||
*/
|
||||
@ApiModelProperty("计量交割点编码(通常为下载点,客户托运时为上载点)")
|
||||
private String pointDelyCode;
|
||||
/**
|
||||
* 交气点编码(送达点,例如先到达计量交割点,仍要再送到交气点)
|
||||
*/
|
||||
@ApiModelProperty("交气点编码(送达点,例如先到达计量交割点,仍要再送到交气点)")
|
||||
private String pointTransCode;
|
||||
/**
|
||||
* 自主托运(Y-是,N-否)
|
||||
*/
|
||||
@ApiModelProperty("自主托运(Y-是,N-否)")
|
||||
private String transSign;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.xjrsoft.module.contract.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class AddLngContractSalesPngQtyDto extends com.xjrsoft.common.model.base.BaseModel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 合同-档案主键
|
||||
*/
|
||||
@ApiModelProperty("合同-档案主键")
|
||||
private Long kId;
|
||||
/**
|
||||
* 开始日期(需要校验周期)
|
||||
*/
|
||||
@ApiModelProperty("开始日期(需要校验周期)")
|
||||
private LocalDateTime dateFrom;
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
@ApiModelProperty("结束日期")
|
||||
private LocalDateTime dateTo;
|
||||
/**
|
||||
* 基础量/增量(基础量/增量1/增量2)
|
||||
*/
|
||||
@ApiModelProperty("基础量/增量(基础量/增量1/增量2)")
|
||||
private String baseInc;
|
||||
/**
|
||||
* 优先级(必须录入)
|
||||
*/
|
||||
@ApiModelProperty("优先级(必须录入)")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 比值(方/吉焦)
|
||||
*/
|
||||
@ApiModelProperty("比值(方/吉焦)")
|
||||
private BigDecimal rateM3Gj;
|
||||
/**
|
||||
* 月气量(吉焦)(qty_m3_month*rate_m3_mj/1000)
|
||||
*/
|
||||
@ApiModelProperty("月气量(吉焦)(qty_m3_month*rate_m3_mj/1000)")
|
||||
private BigDecimal qtyGjMonth;
|
||||
/**
|
||||
* 月气量(方)(qty_gj_month*1000/rate_m3_mj)
|
||||
*/
|
||||
@ApiModelProperty("月气量(方)(qty_gj_month*1000/rate_m3_mj)")
|
||||
private BigDecimal qtyM3Month;
|
||||
/**
|
||||
* 日气量(吉焦)(根据当月天数自动计算)
|
||||
*/
|
||||
@ApiModelProperty("日气量(吉焦)(根据当月天数自动计算)")
|
||||
private BigDecimal qtyGjDay;
|
||||
/**
|
||||
* 日气量(方)(根据当月天数自动计算)
|
||||
*/
|
||||
@ApiModelProperty("日气量(方)(根据当月天数自动计算)")
|
||||
private BigDecimal qtyM3Day;
|
||||
/**
|
||||
* 照付不议类型(P-比例/M3-方/GJ-吉焦)
|
||||
*/
|
||||
@ApiModelProperty("照付不议类型(P-比例/M3-方/GJ-吉焦)")
|
||||
private String zfbyTypeCode;
|
||||
/**
|
||||
* 照付不议比例%/量数值
|
||||
*/
|
||||
@ApiModelProperty("照付不议比例%/量数值")
|
||||
private BigDecimal zfbyValue;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
|
||||
}
|
||||
@ -6,9 +6,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
@ -59,16 +57,16 @@ public class LngContractPageDto extends PageInput {
|
||||
@ApiModelProperty("状态(未提交/审批中/已审批/已驳回)")
|
||||
private String approCode;
|
||||
/**
|
||||
* 交易对手类型(lng_supplier-供应商,lng_customer-客户;不显示)
|
||||
*/
|
||||
@ApiModelProperty("交易对手类型(lng_supplier-供应商,lng_customer-客户;不显示)")
|
||||
private String cpTableName;
|
||||
/**
|
||||
* 是否线上(竞拍)合同(Y-是,N-否;线上合同不需要审批)
|
||||
*/
|
||||
@ApiModelProperty("是否线上(竞拍)合同(Y-是,N-否;线上合同不需要审批)")
|
||||
private String onlineSign;
|
||||
/**
|
||||
* 交易对手类型(lng_supplier-供应商,lng_customer-客户;不显示)
|
||||
*/
|
||||
@ApiModelProperty("交易对手类型(lng_supplier-供应商,lng_customer-客户;不显示)")
|
||||
private String cpTableName;
|
||||
/**
|
||||
* 合同主体ID(天然气公司/惠贸)
|
||||
*/
|
||||
@ApiModelProperty("合同主体ID(天然气公司/惠贸)")
|
||||
@ -79,4 +77,17 @@ public class LngContractPageDto extends PageInput {
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("上载点名称")
|
||||
private String pointUpName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("自主托运")
|
||||
private String transName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,238 @@
|
||||
package com.xjrsoft.module.contract.dto;
|
||||
|
||||
import com.pictc.annotations.datalog.*;
|
||||
import com.xjrsoft.module.system.dto.UpdateLngFileUploadDto;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@LogTable(source="lng_contract",name="国内管道气销售")
|
||||
public class UpdateLngContractDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@LogField(name="主键",index=0)
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同主体ID(天然气公司/惠贸)
|
||||
*/
|
||||
@LogField(name="合同主体ID(天然气公司/惠贸)",index=1)
|
||||
@ApiModelProperty("合同主体ID(天然气公司/惠贸)")
|
||||
private Long comId;
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
@LogField(name="合同号",index=2)
|
||||
@ApiModelProperty("合同号")
|
||||
private String kNo;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@LogField(name="合同名称",index=3)
|
||||
@ApiModelProperty("合同名称")
|
||||
private String kName;
|
||||
|
||||
/**
|
||||
* 业务类型(PI-国际采购/SI-国际销售/PP-国内PNG采购/SL-国内LNG销售/SP-国内PNG销售/T-管道运输/P-加工服务)
|
||||
*/
|
||||
@LogField(name="业务类型",index=4)
|
||||
@ApiModelProperty("业务类型(PI-国际采购/SI-国际销售/PP-国内PNG采购/SL-国内LNG销售/SP-国内PNG销售/T-管道运输/P-加工服务)")
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 是否线上(竞拍)合同(Y-是,N-否;线上合同不需要审批)
|
||||
*/
|
||||
@LogField(name="是否线上(竞拍)合同",index=5)
|
||||
@ApiModelProperty("是否线上(竞拍)合同(Y-是,N-否;线上合同不需要审批)")
|
||||
private String onlineSign;
|
||||
|
||||
/**
|
||||
* 交易对手类型(lng_supplier-供应商,lng_customer-客户;不显示)
|
||||
*/
|
||||
@LogField(name="交易对手类型",index=6)
|
||||
@ApiModelProperty("交易对手类型(lng_supplier-供应商,lng_customer-客户;不显示)")
|
||||
private String cpTableName;
|
||||
|
||||
/**
|
||||
* 主交易对手编码
|
||||
*/
|
||||
@LogField(name="主交易对手编码",index=7)
|
||||
@ApiModelProperty("主交易对手编码")
|
||||
private String cpCode;
|
||||
|
||||
/**
|
||||
* 主交易对手名称
|
||||
*/
|
||||
@LogField(name="主交易对手名称",index=8)
|
||||
@ApiModelProperty("主交易对手名称")
|
||||
private String cpName;
|
||||
|
||||
/**
|
||||
* 合同期限
|
||||
*/
|
||||
@LogField(name="合同期限",index=9)
|
||||
@ApiModelProperty("合同期限")
|
||||
private String kPeriod;
|
||||
|
||||
/**
|
||||
* 合同签订日期
|
||||
*/
|
||||
@LogField(name="合同签订日期",index=10)
|
||||
@ApiModelProperty("合同签订日期")
|
||||
private LocalDateTime dateSign;
|
||||
|
||||
/**
|
||||
* 有效期开始
|
||||
*/
|
||||
@LogField(name="有效期开始",index=11)
|
||||
@ApiModelProperty("有效期开始")
|
||||
private LocalDateTime dateFrom;
|
||||
|
||||
/**
|
||||
* 有效期结束
|
||||
*/
|
||||
@LogField(name="有效期结束",index=12)
|
||||
@ApiModelProperty("有效期结束")
|
||||
private LocalDateTime dateTo;
|
||||
|
||||
/**
|
||||
* 确认函开始日
|
||||
*/
|
||||
@LogField(name="确认函开始日",index=13)
|
||||
@ApiModelProperty("确认函开始日")
|
||||
private LocalDateTime dateCfmFrom;
|
||||
|
||||
/**
|
||||
* 确认函结束日
|
||||
*/
|
||||
@LogField(name="确认函结束日",index=14)
|
||||
@ApiModelProperty("确认函结束日")
|
||||
private LocalDateTime dateCfmTo;
|
||||
|
||||
/**
|
||||
* 币种
|
||||
*/
|
||||
@LogField(name="币种",index=15)
|
||||
@ApiModelProperty("币种")
|
||||
private String curCode;
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
@LogField(name="合同金额",index=16)
|
||||
@ApiModelProperty("合同金额")
|
||||
private String amountDesc;
|
||||
|
||||
/**
|
||||
* 我方联系人
|
||||
*/
|
||||
@LogField(name="我方联系人",index=17)
|
||||
@ApiModelProperty("我方联系人")
|
||||
private Long empId;
|
||||
|
||||
/**
|
||||
* 业务部门ID
|
||||
*/
|
||||
@LogField(name="业务部门ID",index=18)
|
||||
@ApiModelProperty("业务部门ID")
|
||||
private Long bDeptId;
|
||||
|
||||
/**
|
||||
* 状态(未提交/审批中/已审批/已驳回)
|
||||
*/
|
||||
@LogField(name="状态",index=19)
|
||||
@ApiModelProperty("状态(未提交/审批中/已审批/已驳回)")
|
||||
private String approCode;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@LogField(name="备注",index=20)
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@LogField(name="租户id",index=21)
|
||||
@ApiModelProperty("租户id")
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
/**
|
||||
* lngContractSalesPng
|
||||
*/
|
||||
@ApiModelProperty("lngContractSalesPng子表")
|
||||
@LogJoin(name = "lngContractSalesPng子表",
|
||||
columns = {
|
||||
@LogJoinColumn(field = "id",relatedField = "kId", valueDirection = ValueDirectionType.RIGHT)
|
||||
},
|
||||
caseType = JoinCaseType.FULL, target = UpdateLngContractSalesPngDto.class, type = JoinType.MANY)
|
||||
private List<UpdateLngContractSalesPngDto> lngContractSalesPngList;
|
||||
/**
|
||||
* lngContractSalesPngPoint
|
||||
*/
|
||||
@ApiModelProperty("lngContractSalesPngPoint子表")
|
||||
@LogJoin(name = "lngContractSalesPngPoint子表",
|
||||
columns = {
|
||||
@LogJoinColumn(field = "id",relatedField = "kId", valueDirection = ValueDirectionType.RIGHT)
|
||||
},
|
||||
caseType = JoinCaseType.FULL, target = UpdateLngContractSalesPngPointDto.class, type = JoinType.MANY)
|
||||
private List<UpdateLngContractSalesPngPointDto> lngContractSalesPngPointList;
|
||||
/**
|
||||
* lngContractSalesPngQty
|
||||
*/
|
||||
@ApiModelProperty("lngContractSalesPngQty子表")
|
||||
@LogJoin(name = "lngContractSalesPngQty子表",
|
||||
columns = {
|
||||
@LogJoinColumn(field = "id",relatedField = "kId", valueDirection = ValueDirectionType.RIGHT)
|
||||
},
|
||||
caseType = JoinCaseType.FULL, target = UpdateLngContractSalesPngQtyDto.class, type = JoinType.MANY)
|
||||
private List<UpdateLngContractSalesPngQtyDto> lngContractSalesPngQtyList;
|
||||
/**
|
||||
* lngContractFactRel
|
||||
*/
|
||||
@ApiModelProperty("lngContractFactRel子表")
|
||||
@LogJoin(name = "lngContractFactRel子表",
|
||||
columns = {
|
||||
@LogJoinColumn(field = "id",relatedField = "kId", valueDirection = ValueDirectionType.RIGHT)
|
||||
},
|
||||
caseType = JoinCaseType.FULL, target = UpdateLngContractFactRelDto.class, type = JoinType.MANY)
|
||||
private List<UpdateLngContractFactRelDto> lngContractFactRelList;
|
||||
/**
|
||||
* lngContractApproRel
|
||||
*/
|
||||
@ApiModelProperty("lngContractApproRel子表")
|
||||
@LogJoin(name = "lngContractApproRel子表",
|
||||
columns = {
|
||||
@LogJoinColumn(field = "id",relatedField = "tableId", valueDirection = ValueDirectionType.RIGHT)
|
||||
},
|
||||
caseType = JoinCaseType.FULL, target = UpdateLngContractApproRelDto.class, type = JoinType.MANY)
|
||||
private List<UpdateLngContractApproRelDto> lngContractApproRelList;
|
||||
|
||||
/**
|
||||
* lngFileUpload
|
||||
*/
|
||||
@ApiModelProperty("lngFileUpload子表")
|
||||
@LogAttrField
|
||||
private List<UpdateLngFileUploadDto> lngFileUploadList;
|
||||
}
|
||||
@ -1,34 +1,23 @@
|
||||
package com.xjrsoft.module.contract.dto;
|
||||
|
||||
import com.pictc.annotations.datalog.LogField;
|
||||
import com.pictc.annotations.datalog.LogTable;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.List;
|
||||
|
||||
import com.pictc.annotations.datalog.LogTable;
|
||||
import com.pictc.annotations.datalog.LogField;
|
||||
import com.pictc.annotations.datalog.LogJoin;
|
||||
import com.pictc.annotations.datalog.LogJoinColumn;
|
||||
import com.pictc.annotations.datalog.JoinCaseType;
|
||||
import com.pictc.annotations.datalog.JoinType;
|
||||
import com.pictc.annotations.datalog.ValueDirectionType;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气采购
|
||||
* @title: 国内管道气采购/销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@LogTable(source="lng_contract_fact_rel",name="国内管道气采购")
|
||||
@LogTable(source="lng_contract_fact_rel",name="国内管道气采购/销售")
|
||||
public class UpdateLngContractFactRelDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -43,14 +32,14 @@ public class UpdateLngContractFactRelDto implements Serializable {
|
||||
/**
|
||||
* 合同-档案主键(关联时写入)
|
||||
*/
|
||||
@LogField(name="合同-档案主键(关联时写入)",index=1)
|
||||
@LogField(name="合同-档案主键",index=1)
|
||||
@ApiModelProperty("合同-档案主键(关联时写入)")
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 合同-合同系统主键(关联时写入)
|
||||
*/
|
||||
@LogField(name="合同-合同系统主键(关联时写入)",index=2)
|
||||
@LogField(name="合同-合同系统主键",index=2)
|
||||
@ApiModelProperty("合同-合同系统主键(关联时写入)")
|
||||
private Long kFactId;
|
||||
|
||||
|
||||
@ -81,7 +81,10 @@ public class UpdateLngContractPurPngPointDto implements Serializable {
|
||||
@ApiModelProperty("lngContractPurPngPoint子表")
|
||||
@LogJoin(name = "lngContractPurPngPoint子表",
|
||||
columns = {
|
||||
@LogJoinColumn(field = "kpppId",relatedField = "id", valueDirection = ValueDirectionType.RIGHT)
|
||||
@LogJoinColumn(field = "kId",relatedField = "kId", valueDirection = ValueDirectionType.RIGHT),
|
||||
@LogJoinColumn(field = "id",relatedField = "kpppId", valueDirection = ValueDirectionType.RIGHT)
|
||||
|
||||
|
||||
},
|
||||
caseType = JoinCaseType.FULL, target = UpdateLngContractPurPngPointSalesDto.class, type = JoinType.MANY)
|
||||
private List<UpdateLngContractPurPngPointSalesDto> lngContractPurPngPointSalesList;
|
||||
|
||||
@ -0,0 +1,75 @@
|
||||
package com.xjrsoft.module.contract.dto;
|
||||
|
||||
import com.pictc.annotations.datalog.LogField;
|
||||
import com.pictc.annotations.datalog.LogTable;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@LogTable(source="lng_contract_sales_png",name="国内管道气销售")
|
||||
public class UpdateLngContractSalesPngDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@LogField(name="主键",index=0)
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同-档案主键
|
||||
*/
|
||||
@LogField(name="合同-档案主键",index=1)
|
||||
@ApiModelProperty("合同-档案主键")
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 定价机制(固定价/公式价/对标价/无)
|
||||
*/
|
||||
@LogField(name="定价机制",index=2)
|
||||
@ApiModelProperty("定价机制(固定价/公式价/对标价/无)")
|
||||
private String prcTypeCode;
|
||||
|
||||
/**
|
||||
* 量价周期(1-自然月,-1-自然月往前1日)
|
||||
*/
|
||||
@LogField(name="量价周期",index=3)
|
||||
@ApiModelProperty("量价周期(1-自然月,-1-自然月往前1日)")
|
||||
private String periodTypeCode;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
@LogField(name="计量单位",index=4)
|
||||
@ApiModelProperty("计量单位")
|
||||
private String uomCode;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@LogField(name="备注",index=5)
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@LogField(name="租户id",index=6)
|
||||
@ApiModelProperty("租户id")
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package com.xjrsoft.module.contract.dto;
|
||||
|
||||
import com.pictc.annotations.datalog.LogField;
|
||||
import com.pictc.annotations.datalog.LogTable;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@LogTable(source="lng_contract_sales_png_point",name="国内管道气销售")
|
||||
public class UpdateLngContractSalesPngPointDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@LogField(name="主键",index=0)
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同-档案主键
|
||||
*/
|
||||
@LogField(name="合同-档案主键",index=1)
|
||||
@ApiModelProperty("合同-档案主键")
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 计量交割点编码(通常为下载点,客户托运时为上载点)
|
||||
*/
|
||||
@LogField(name="计量交割点编码",index=2)
|
||||
@ApiModelProperty("计量交割点编码(通常为下载点,客户托运时为上载点)")
|
||||
private String pointDelyCode;
|
||||
|
||||
/**
|
||||
* 交气点编码(送达点,例如先到达计量交割点,仍要再送到交气点)
|
||||
*/
|
||||
@LogField(name="交气点编码",index=3)
|
||||
@ApiModelProperty("交气点编码(送达点,例如先到达计量交割点,仍要再送到交气点)")
|
||||
private String pointTransCode;
|
||||
|
||||
/**
|
||||
* 自主托运(Y-是,N-否)
|
||||
*/
|
||||
@LogField(name="自主托运",index=4)
|
||||
@ApiModelProperty("自主托运(Y-是,N-否)")
|
||||
private String transSign;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@LogField(name="备注",index=5)
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@LogField(name="租户id",index=6)
|
||||
@ApiModelProperty("租户id")
|
||||
private Long tenantId;
|
||||
|
||||
private Boolean hasDel;
|
||||
}
|
||||
@ -0,0 +1,133 @@
|
||||
package com.xjrsoft.module.contract.dto;
|
||||
|
||||
import com.pictc.annotations.datalog.LogField;
|
||||
import com.pictc.annotations.datalog.LogTable;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@LogTable(source="lng_contract_sales_png_qty",name="国内管道气销售")
|
||||
public class UpdateLngContractSalesPngQtyDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@LogField(name="主键",index=0)
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同-档案主键
|
||||
*/
|
||||
@LogField(name="合同-档案主键",index=1)
|
||||
@ApiModelProperty("合同-档案主键")
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 开始日期(需要校验周期)
|
||||
*/
|
||||
@LogField(name="开始日期",index=2)
|
||||
@ApiModelProperty("开始日期(需要校验周期)")
|
||||
private LocalDateTime dateFrom;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
@LogField(name="结束日期",index=3)
|
||||
@ApiModelProperty("结束日期")
|
||||
private LocalDateTime dateTo;
|
||||
|
||||
/**
|
||||
* 基础量/增量(基础量/增量1/增量2)
|
||||
*/
|
||||
@LogField(name="基础量/增量",index=4)
|
||||
@ApiModelProperty("基础量/增量(基础量/增量1/增量2)")
|
||||
private String baseInc;
|
||||
|
||||
/**
|
||||
* 优先级(必须录入)
|
||||
*/
|
||||
@LogField(name="优先级",index=5)
|
||||
@ApiModelProperty("优先级(必须录入)")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 比值(方/吉焦)
|
||||
*/
|
||||
@LogField(name="比值",index=6)
|
||||
@ApiModelProperty("比值(方/吉焦)")
|
||||
private BigDecimal rateM3Gj;
|
||||
|
||||
/**
|
||||
* 月气量(吉焦)(qty_m3_month*rate_m3_mj/1000)
|
||||
*/
|
||||
@LogField(name="月气量(吉焦)",index=7)
|
||||
@ApiModelProperty("月气量(吉焦)(qty_m3_month*rate_m3_mj/1000)")
|
||||
private BigDecimal qtyGjMonth;
|
||||
|
||||
/**
|
||||
* 月气量(方)(qty_gj_month*1000/rate_m3_mj)
|
||||
*/
|
||||
@LogField(name="月气量(方)",index=8)
|
||||
@ApiModelProperty("月气量(方)(qty_gj_month*1000/rate_m3_mj)")
|
||||
private BigDecimal qtyM3Month;
|
||||
|
||||
/**
|
||||
* 日气量(吉焦)(根据当月天数自动计算)
|
||||
*/
|
||||
@LogField(name="日气量(吉焦)",index=9)
|
||||
@ApiModelProperty("日气量(吉焦)(根据当月天数自动计算)")
|
||||
private BigDecimal qtyGjDay;
|
||||
|
||||
/**
|
||||
* 日气量(方)(根据当月天数自动计算)
|
||||
*/
|
||||
@LogField(name="日气量(方)",index=10)
|
||||
@ApiModelProperty("日气量(方)(根据当月天数自动计算)")
|
||||
private BigDecimal qtyM3Day;
|
||||
|
||||
/**
|
||||
* 照付不议类型(P-比例/M3-方/GJ-吉焦)
|
||||
*/
|
||||
@LogField(name="照付不议类型",index=11)
|
||||
@ApiModelProperty("照付不议类型(P-比例/M3-方/GJ-吉焦)")
|
||||
private String zfbyTypeCode;
|
||||
|
||||
/**
|
||||
* 照付不议比例%/量数值
|
||||
*/
|
||||
@LogField(name="照付不议比例%/量数值",index=12)
|
||||
@ApiModelProperty("照付不议比例%/量数值")
|
||||
private BigDecimal zfbyValue;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@LogField(name="备注",index=13)
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@LogField(name="租户id",index=14)
|
||||
@ApiModelProperty("租户id")
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
}
|
||||
@ -3,11 +3,13 @@ package com.xjrsoft.module.contract.vo;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xjrsoft.common.annotation.Trans;
|
||||
import com.xjrsoft.common.enums.TransType;
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: 分页列表出参
|
||||
@ -22,7 +24,7 @@ public class LngContractFactPageVo {
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
private String id;
|
||||
private Long id;
|
||||
/**
|
||||
* 合同主体ID(天然气公司/惠贸)
|
||||
*/
|
||||
@ -201,4 +203,9 @@ public class LngContractFactPageVo {
|
||||
@ApiModelProperty("修改时间")
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* lngFileUpload
|
||||
*/
|
||||
@ApiModelProperty("lngFileUpload子表")
|
||||
private List<LngFileUploadVo> lngFileUploadList;
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package com.xjrsoft.module.contract.vo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @title: 表单出参
|
||||
* @Author 管理员
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
package com.xjrsoft.module.contract.vo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @title: 分页列表出参
|
||||
* @Author 管理员
|
||||
@ -12,7 +13,7 @@ import lombok.Data;
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class LngContractPurPageVo {
|
||||
public class LngContractPageVo {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
@ -24,6 +25,11 @@ public class LngContractPurPageVo {
|
||||
*/
|
||||
@ApiModelProperty("合同主体ID(天然气公司/惠贸)")
|
||||
private Long comId;
|
||||
/**
|
||||
* 合同主体
|
||||
*/
|
||||
@ApiModelProperty("合同主体")
|
||||
private String comName;
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
@ -53,21 +59,42 @@ public class LngContractPurPageVo {
|
||||
* 有效期开始
|
||||
*/
|
||||
@ApiModelProperty("有效期开始")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime dateFrom;
|
||||
/**
|
||||
* 有效期结束
|
||||
*/
|
||||
@ApiModelProperty("有效期结束")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime dateTo;
|
||||
/**
|
||||
* 状态(未提交/审批中/已审批/已驳回)
|
||||
*/
|
||||
@ApiModelProperty("状态(未提交/审批中/已审批/已驳回)")
|
||||
private String approCode;
|
||||
/**
|
||||
* 状态(未提交/审批中/已审批/已驳回)
|
||||
*/
|
||||
@ApiModelProperty("状态(未提交/审批中/已审批/已驳回)")
|
||||
private String approName;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
private Long ruleUserId;
|
||||
/**
|
||||
* 交割点名称
|
||||
*/
|
||||
@ApiModelProperty("交割点名称")
|
||||
private String pointUpName;
|
||||
/**
|
||||
* 自主托运
|
||||
*/
|
||||
@ApiModelProperty("自主托运")
|
||||
private String transName;
|
||||
}
|
||||
@ -0,0 +1,117 @@
|
||||
package com.xjrsoft.module.contract.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @title: 表单出参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class LngContractSalesPngPointVo {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 合同-档案主键
|
||||
*/
|
||||
@ApiModelProperty("合同-档案主键")
|
||||
private Long kId;
|
||||
|
||||
|
||||
/**
|
||||
* 计量交割点编码(通常为下载点,客户托运时为上载点)
|
||||
*/
|
||||
@ApiModelProperty("计量交割点编码(通常为下载点,客户托运时为上载点)")
|
||||
private String pointDelyCode;
|
||||
|
||||
|
||||
/**
|
||||
* 交气点编码(送达点,例如先到达计量交割点,仍要再送到交气点)
|
||||
*/
|
||||
@ApiModelProperty("交气点编码(送达点,例如先到达计量交割点,仍要再送到交气点)")
|
||||
private String pointTransCode;
|
||||
|
||||
|
||||
/**
|
||||
* 自主托运(Y-是,N-否)
|
||||
*/
|
||||
@ApiModelProperty("自主托运(Y-是,N-否)")
|
||||
private String transSign;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
private Long createUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
private Long modifyUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
private Long deptId;
|
||||
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,174 @@
|
||||
package com.xjrsoft.module.contract.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @title: 表单出参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class LngContractSalesPngQtyVo {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 合同-档案主键
|
||||
*/
|
||||
@ApiModelProperty("合同-档案主键")
|
||||
private Long kId;
|
||||
|
||||
|
||||
/**
|
||||
* 开始日期(需要校验周期)
|
||||
*/
|
||||
@ApiModelProperty("开始日期(需要校验周期)")
|
||||
private LocalDateTime dateFrom;
|
||||
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
@ApiModelProperty("结束日期")
|
||||
private LocalDateTime dateTo;
|
||||
|
||||
|
||||
/**
|
||||
* 基础量/增量(基础量/增量1/增量2)
|
||||
*/
|
||||
@ApiModelProperty("基础量/增量(基础量/增量1/增量2)")
|
||||
private String baseInc;
|
||||
|
||||
|
||||
/**
|
||||
* 优先级(必须录入)
|
||||
*/
|
||||
@ApiModelProperty("优先级(必须录入)")
|
||||
private Integer sort;
|
||||
|
||||
|
||||
/**
|
||||
* 比值(方/吉焦)
|
||||
*/
|
||||
@ApiModelProperty("比值(方/吉焦)")
|
||||
private BigDecimal rateM3Gj;
|
||||
|
||||
|
||||
/**
|
||||
* 月气量(吉焦)(qty_m3_month*rate_m3_mj/1000)
|
||||
*/
|
||||
@ApiModelProperty("月气量(吉焦)(qty_m3_month*rate_m3_mj/1000)")
|
||||
private BigDecimal qtyGjMonth;
|
||||
|
||||
|
||||
/**
|
||||
* 月气量(方)(qty_gj_month*1000/rate_m3_mj)
|
||||
*/
|
||||
@ApiModelProperty("月气量(方)(qty_gj_month*1000/rate_m3_mj)")
|
||||
private BigDecimal qtyM3Month;
|
||||
|
||||
|
||||
/**
|
||||
* 日气量(吉焦)(根据当月天数自动计算)
|
||||
*/
|
||||
@ApiModelProperty("日气量(吉焦)(根据当月天数自动计算)")
|
||||
private BigDecimal qtyGjDay;
|
||||
|
||||
|
||||
/**
|
||||
* 日气量(方)(根据当月天数自动计算)
|
||||
*/
|
||||
@ApiModelProperty("日气量(方)(根据当月天数自动计算)")
|
||||
private BigDecimal qtyM3Day;
|
||||
|
||||
|
||||
/**
|
||||
* 照付不议类型(P-比例/M3-方/GJ-吉焦)
|
||||
*/
|
||||
@ApiModelProperty("照付不议类型(P-比例/M3-方/GJ-吉焦)")
|
||||
private String zfbyTypeCode;
|
||||
|
||||
|
||||
/**
|
||||
* 照付不议比例%/量数值
|
||||
*/
|
||||
@ApiModelProperty("照付不议比例%/量数值")
|
||||
private BigDecimal zfbyValue;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
private Long createUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
private Long modifyUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
private Long deptId;
|
||||
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,117 @@
|
||||
package com.xjrsoft.module.contract.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @title: 表单出参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class LngContractSalesPngVo {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 合同-档案主键
|
||||
*/
|
||||
@ApiModelProperty("合同-档案主键")
|
||||
private Long kId;
|
||||
|
||||
|
||||
/**
|
||||
* 定价机制(固定价/公式价/对标价/无)
|
||||
*/
|
||||
@ApiModelProperty("定价机制(固定价/公式价/对标价/无)")
|
||||
private String prcTypeCode;
|
||||
|
||||
|
||||
/**
|
||||
* 量价周期(1-自然月,-1-自然月往前1日)
|
||||
*/
|
||||
@ApiModelProperty("量价周期(1-自然月,-1-自然月往前1日)")
|
||||
private String periodTypeCode;
|
||||
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
@ApiModelProperty("计量单位")
|
||||
private String uomCode;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
private Long createUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
private Long modifyUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
private Long deptId;
|
||||
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,267 @@
|
||||
package com.xjrsoft.module.contract.vo;
|
||||
|
||||
import com.xjrsoft.module.sales.vo.LngApproVo;
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: 表单出参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class LngContractVo {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 合同主体ID(天然气公司/惠贸)
|
||||
*/
|
||||
@ApiModelProperty("合同主体ID(天然气公司/惠贸)")
|
||||
private Long comId;
|
||||
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
@ApiModelProperty("合同号")
|
||||
private String kNo;
|
||||
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ApiModelProperty("合同名称")
|
||||
private String kName;
|
||||
|
||||
|
||||
/**
|
||||
* 业务类型(PI-国际采购/SI-国际销售/PP-国内PNG采购/SL-国内LNG销售/SP-国内PNG销售/T-管道运输/P-加工服务)
|
||||
*/
|
||||
@ApiModelProperty("业务类型(PI-国际采购/SI-国际销售/PP-国内PNG采购/SL-国内LNG销售/SP-国内PNG销售/T-管道运输/P-加工服务)")
|
||||
private String typeCode;
|
||||
|
||||
|
||||
/**
|
||||
* 是否线上(竞拍)合同(Y-是,N-否;线上合同不需要审批)
|
||||
*/
|
||||
@ApiModelProperty("是否线上(竞拍)合同(Y-是,N-否;线上合同不需要审批)")
|
||||
private String onlineSign;
|
||||
|
||||
|
||||
/**
|
||||
* 交易对手类型(lng_supplier-供应商,lng_customer-客户;不显示)
|
||||
*/
|
||||
@ApiModelProperty("交易对手类型(lng_supplier-供应商,lng_customer-客户;不显示)")
|
||||
private String cpTableName;
|
||||
|
||||
|
||||
/**
|
||||
* 主交易对手编码
|
||||
*/
|
||||
@ApiModelProperty("主交易对手编码")
|
||||
private String cpCode;
|
||||
|
||||
|
||||
/**
|
||||
* 主交易对手名称
|
||||
*/
|
||||
@ApiModelProperty("主交易对手名称")
|
||||
private String cpName;
|
||||
|
||||
|
||||
/**
|
||||
* 合同期限
|
||||
*/
|
||||
@ApiModelProperty("合同期限")
|
||||
private String kPeriod;
|
||||
|
||||
|
||||
/**
|
||||
* 合同签订日期
|
||||
*/
|
||||
@ApiModelProperty("合同签订日期")
|
||||
private LocalDateTime dateSign;
|
||||
|
||||
|
||||
/**
|
||||
* 有效期开始
|
||||
*/
|
||||
@ApiModelProperty("有效期开始")
|
||||
private LocalDateTime dateFrom;
|
||||
|
||||
|
||||
/**
|
||||
* 有效期结束
|
||||
*/
|
||||
@ApiModelProperty("有效期结束")
|
||||
private LocalDateTime dateTo;
|
||||
|
||||
|
||||
/**
|
||||
* 确认函开始日
|
||||
*/
|
||||
@ApiModelProperty("确认函开始日")
|
||||
private LocalDateTime dateCfmFrom;
|
||||
|
||||
|
||||
/**
|
||||
* 确认函结束日
|
||||
*/
|
||||
@ApiModelProperty("确认函结束日")
|
||||
private LocalDateTime dateCfmTo;
|
||||
|
||||
|
||||
/**
|
||||
* 币种
|
||||
*/
|
||||
@ApiModelProperty("币种")
|
||||
private String curCode;
|
||||
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
@ApiModelProperty("合同金额")
|
||||
private String amountDesc;
|
||||
|
||||
|
||||
/**
|
||||
* 我方联系人
|
||||
*/
|
||||
@ApiModelProperty("我方联系人")
|
||||
private Long empId;
|
||||
|
||||
|
||||
/**
|
||||
* 业务部门ID
|
||||
*/
|
||||
@ApiModelProperty("业务部门ID")
|
||||
private Long bDeptId;
|
||||
|
||||
|
||||
/**
|
||||
* 状态(未提交/审批中/已审批/已驳回)
|
||||
*/
|
||||
@ApiModelProperty("状态(未提交/审批中/已审批/已驳回)")
|
||||
private String approCode;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
private Long createUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
private Long modifyUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
private Long deptId;
|
||||
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* lngContractSalesPng
|
||||
*/
|
||||
@ApiModelProperty("lngContractSalesPng子表")
|
||||
private List<LngContractSalesPngVo> lngContractSalesPngList;
|
||||
/**
|
||||
* lngContractSalesPngPoint
|
||||
*/
|
||||
@ApiModelProperty("lngContractSalesPngPoint子表")
|
||||
private List<LngContractSalesPngPointVo> lngContractSalesPngPointList;
|
||||
/**
|
||||
* lngContractSalesPngQty
|
||||
*/
|
||||
@ApiModelProperty("lngContractSalesPngQty子表")
|
||||
private List<LngContractSalesPngQtyVo> lngContractSalesPngQtyList;
|
||||
/**
|
||||
* lngContractFactRel
|
||||
*/
|
||||
@ApiModelProperty("lngContractFactRel子表")
|
||||
private List<LngContractFactRelVo> lngContractFactRelList;
|
||||
/**
|
||||
* lngContractApproRel
|
||||
*/
|
||||
@ApiModelProperty("lngContractApproRel子表")
|
||||
private List<LngContractApproRelVo> lngContractApproRelList;
|
||||
/**
|
||||
* lngContractApproRel
|
||||
*/
|
||||
@ApiModelProperty("lngContractApproRel子表")
|
||||
private List<LngContractFactVo> lngContractFactList;
|
||||
|
||||
/**
|
||||
* lngApproVoList
|
||||
*/
|
||||
@ApiModelProperty("lngApproVoList子表")
|
||||
private List<LngApproVo> lngApproVoList;
|
||||
|
||||
/**
|
||||
* lngFileUpload
|
||||
*/
|
||||
@ApiModelProperty("lngFileUpload子表")
|
||||
private List<LngFileUploadVo> lngFileUploadList;
|
||||
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xjrsoft.module.sales.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xjrsoft.common.annotation.Trans;
|
||||
import com.xjrsoft.common.enums.TransType;
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
@ -62,6 +63,7 @@ public class LngApproPageVo {
|
||||
* 拟稿日期
|
||||
*/
|
||||
@ApiModelProperty("拟稿日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private String dateAppro;
|
||||
/**
|
||||
* 拟稿人(xjr_user.id)
|
||||
|
||||
@ -24,9 +24,12 @@ import com.xjrsoft.module.contract.service.IContractFactService;
|
||||
import com.xjrsoft.module.contract.vo.LngContractFactPageVo;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.system.client.IFileClient;
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
@ -47,6 +50,7 @@ public class ContractFactController {
|
||||
|
||||
private final IContractFactService contractFactService;
|
||||
private final DatalogService dataService;
|
||||
private final IFileClient fileClient;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngContractFact列表(分页)")
|
||||
@ -61,10 +65,18 @@ public class ContractFactController {
|
||||
.like(LngContractFact::getKName, dto.getKName())
|
||||
)
|
||||
.eq(StrUtil.isNotBlank(dto.getRelTypeCode()), LngContractFact::getRelTypeCode,dto.getRelTypeCode())
|
||||
.orderByDesc(LngContractFact::getId)
|
||||
.orderByDesc(LngContractFact::getDateDraft, LngContractFact::getKNo)
|
||||
.select(LngContractFact.class,x -> VoToColumnUtil.fieldsToColumns(LngContractFactPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngContractFact> page = contractFactService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngContractFactPageVo> pageOutput = ConventPage.getPageOutput(page, LngContractFactPageVo.class);
|
||||
List<LngContractFactPageVo> list = pageOutput.list;
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
list.forEach(x -> {
|
||||
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_contract_fact",
|
||||
"lngFileUploadList", x.getId());
|
||||
x.setLngFileUploadList(fileList);
|
||||
});
|
||||
}
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
|
||||
@ -13,25 +13,16 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.pictc.datalog.DataOperationContent;
|
||||
import com.pictc.datalog.DataOperationListener;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||
import com.xjrsoft.module.contract.dto.LngContractPageDto;
|
||||
import com.xjrsoft.module.contract.dto.UpdateLngContractPurDto;
|
||||
import com.xjrsoft.module.contract.entity.LngContractPur;
|
||||
import com.xjrsoft.module.contract.service.IContractPurPngService;
|
||||
import com.xjrsoft.module.contract.vo.LngContractPurPageVo;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
@ -56,25 +47,8 @@ public class ContractPurPngController {
|
||||
@ApiOperation(value="LngContract列表(分页)")
|
||||
@SaCheckPermission("contractPurPng:list")
|
||||
public R page(@Valid LngContractPageDto dto){
|
||||
return R.ok(contractPurPngService.queryPage(dto));
|
||||
|
||||
LambdaQueryWrapper<LngContractPur> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.eq(ObjectUtil.isNotNull(dto.getId()),LngContractPur::getId,dto.getId())
|
||||
.like(StrUtil.isNotBlank(dto.getKNo()),LngContractPur::getKNo,dto.getKNo())
|
||||
.like(StrUtil.isNotBlank(dto.getKName()),LngContractPur::getKName,dto.getKName())
|
||||
.like(StrUtil.isNotBlank(dto.getCpName()),LngContractPur::getCpName,dto.getCpName())
|
||||
//.between(ObjectUtil.isNotNull(dto.getDateFromStart()) && ObjectUtil.isNotNull(dto.getDateFromEnd()),LngContract::getDateFrom,dto.getDateFromStart(),dto.getDateFromEnd())
|
||||
//.between(ObjectUtil.isNotNull(dto.getDateToStart()) && ObjectUtil.isNotNull(dto.getDateToEnd()),LngContract::getDateTo,dto.getDateToStart(),dto.getDateToEnd())
|
||||
.like(StrUtil.isNotBlank(dto.getApproCode()),LngContractPur::getApproCode,dto.getApproCode())
|
||||
.like(StrUtil.isNotBlank(dto.getCpTableName()),LngContractPur::getCpTableName,dto.getCpTableName())
|
||||
.like(StrUtil.isNotBlank(dto.getOnlineSign()),LngContractPur::getOnlineSign,dto.getOnlineSign())
|
||||
.eq(ObjectUtil.isNotNull(dto.getComId()),LngContractPur::getComId,dto.getComId())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngContractPur::getNote,dto.getNote())
|
||||
.orderByDesc(LngContractPur::getId)
|
||||
.select(LngContractPur.class,x -> VoToColumnUtil.fieldsToColumns(LngContractPurPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngContractPur> page = contractPurPngService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngContractPurPageVo> pageOutput = ConventPage.getPageOutput(page, LngContractPurPageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ -118,7 +92,7 @@ public class ContractPurPngController {
|
||||
@SaCheckPermission("contractPurPng:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngContractPurDto dto){
|
||||
//return R.ok(dataService.updateById(dto));
|
||||
UpdateLngContractPurDto res = dataService.insert(dto, new DataOperationListener<UpdateLngContractPurDto>() {
|
||||
boolean res = dataService.updateById(dto, new DataOperationListener<UpdateLngContractPurDto>() {
|
||||
@Override
|
||||
public UpdateLngContractPurDto before(DataOperationContent<UpdateLngContractPurDto> content) {
|
||||
return null;
|
||||
@ -136,9 +110,20 @@ public class ContractPurPngController {
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("contractPurPng:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngContractPurDto.class, ids));
|
||||
|
||||
boolean res = dataService.deleteByIds(UpdateLngContractPurDto.class,ids, new DataOperationListener<UpdateLngContractPurDto>() {
|
||||
@Override
|
||||
public UpdateLngContractPurDto before(DataOperationContent<UpdateLngContractPurDto> content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngContractPurDto after(DataOperationContent<UpdateLngContractPurDto> content) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,160 @@
|
||||
package com.xjrsoft.module.contract.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.google.api.client.util.Lists;
|
||||
import com.pictc.datalog.DataOperationContent;
|
||||
import com.pictc.datalog.DataOperationListener;
|
||||
import com.pictc.enums.BusinessCode;
|
||||
import com.pictc.enums.ExceptionCommonCode;
|
||||
import com.pictc.jdbc.JdbcTools;
|
||||
import com.pictc.jdbc.model.JdbcParam;
|
||||
import com.pictc.utils.StringUtils;
|
||||
import com.xjrsoft.common.exception.BusinessException;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.module.contract.dto.LngContractPageDto;
|
||||
import com.xjrsoft.module.contract.dto.UpdateLngContractDto;
|
||||
import com.xjrsoft.module.contract.dto.UpdateLngContractSalesPngPointDto;
|
||||
import com.xjrsoft.module.contract.service.IContractSalesService;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/contract" + "/contractSales")
|
||||
@Api(value = "/contract" + "/contractSales",tags = "国内管道气销售代码")
|
||||
@AllArgsConstructor
|
||||
public class ContractSalesController {
|
||||
|
||||
|
||||
private final IContractSalesService contractSalesService;
|
||||
private final DatalogService dataService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngContract列表(分页)")
|
||||
@SaCheckPermission("contractSales:list")
|
||||
public R page(@Valid LngContractPageDto dto){
|
||||
return R.ok(contractSalesService.queryPage(dto));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngContract信息")
|
||||
@SaCheckPermission("contractSales:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
return R.ok(contractSalesService.getInfoById(id));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngContract数据详细日志")
|
||||
@SaCheckPermission("contractSales:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngContractDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngContract")
|
||||
@SaCheckPermission("contractSales:add")
|
||||
public R add(@Valid @RequestBody UpdateLngContractDto dto){
|
||||
UpdateLngContractDto res = dataService.insert(dto, new DataOperationListener<UpdateLngContractDto>() {
|
||||
@Override
|
||||
public UpdateLngContractDto before(DataOperationContent<UpdateLngContractDto> content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngContractDto after(DataOperationContent<UpdateLngContractDto> content) {
|
||||
execAfter(content.getTableName(), content.getIdValue(), "I");
|
||||
return content.getObj();
|
||||
}
|
||||
});
|
||||
return R.ok(res.getId());
|
||||
}
|
||||
|
||||
private void execAfter(String table, Long id, String sign) {
|
||||
String sql = StringUtils.format("{? = call pc_{0}.f_save(?, ?)}", table);
|
||||
List<JdbcParam> params = Lists.newArrayList();
|
||||
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
|
||||
params.add(outParam);
|
||||
params.add(JdbcParam.ofLong(id));
|
||||
params.add(JdbcParam.ofString(sign));
|
||||
JdbcTools.call(sql,params);
|
||||
String error = outParam.getStringValue();
|
||||
if (StringUtils.isNotEmpty(error)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_SAVE_EXEC_ERROR, error));
|
||||
}
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngContract")
|
||||
@SaCheckPermission("contractSales:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngContractDto dto){
|
||||
return R.ok(dataService.updateById(dto, new DataOperationListener<UpdateLngContractDto>() {
|
||||
@Override
|
||||
public UpdateLngContractDto before(DataOperationContent<UpdateLngContractDto> content) {
|
||||
List<UpdateLngContractSalesPngPointDto> list = dto.getLngContractSalesPngPointList();
|
||||
for (UpdateLngContractSalesPngPointDto dto : list) {
|
||||
if (dto.getHasDel()) {
|
||||
String sql = StringUtils.format("{? = call pc_{0}.f before_delete_point(?)}",
|
||||
"pc_lng_contract_sales_png");
|
||||
List<JdbcParam> params = Lists.newArrayList();
|
||||
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
|
||||
params.add(outParam);
|
||||
params.add(JdbcParam.ofLong(dto.getId()));
|
||||
JdbcTools.call(sql,params);
|
||||
String error = outParam.getStringValue();
|
||||
if (StringUtils.isNotEmpty(error)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
|
||||
}
|
||||
}
|
||||
}
|
||||
return content.getObj();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngContractDto after(DataOperationContent<UpdateLngContractDto> content) {
|
||||
execAfter(content.getTableName(), content.getIdValue(), "U");
|
||||
return content.getObj();
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("contractSales:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngContractDto.class, ids, new DataOperationListener<UpdateLngContractDto>() {
|
||||
@Override
|
||||
public UpdateLngContractDto before(DataOperationContent<UpdateLngContractDto> content) {
|
||||
String sql = StringUtils.format("{? = call pc_{0}.f_before_delete(?)}", content.getTableName());
|
||||
List<JdbcParam> params = Lists.newArrayList();
|
||||
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
|
||||
params.add(outParam);
|
||||
params.add(JdbcParam.ofLong(content.getIdValue()));
|
||||
JdbcTools.call(sql,params);
|
||||
String error = outParam.getStringValue();
|
||||
if (StringUtils.isNotEmpty(error)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
|
||||
}
|
||||
return content.getObj();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngContractDto after(DataOperationContent<UpdateLngContractDto> content) {
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,247 @@
|
||||
package com.xjrsoft.module.contract.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.github.yulichang.annotation.EntityMapping;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_contract")
|
||||
@ApiModel(value = "国内管道气销售对象", description = "国内管道气销售")
|
||||
public class LngContract implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同主体ID(天然气公司/惠贸)
|
||||
*/
|
||||
@ApiModelProperty("合同主体ID(天然气公司/惠贸)")
|
||||
private Long comId;
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
@ApiModelProperty("合同号")
|
||||
private String kNo;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ApiModelProperty("合同名称")
|
||||
private String kName;
|
||||
|
||||
/**
|
||||
* 业务类型(PI-国际采购/SI-国际销售/PP-国内PNG采购/SL-国内LNG销售/SP-国内PNG销售/T-管道运输/P-加工服务)
|
||||
*/
|
||||
@ApiModelProperty("业务类型(PI-国际采购/SI-国际销售/PP-国内PNG采购/SL-国内LNG销售/SP-国内PNG销售/T-管道运输/P-加工服务)")
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 是否线上(竞拍)合同(Y-是,N-否;线上合同不需要审批)
|
||||
*/
|
||||
@ApiModelProperty("是否线上(竞拍)合同(Y-是,N-否;线上合同不需要审批)")
|
||||
private String onlineSign;
|
||||
|
||||
/**
|
||||
* 交易对手类型(lng_supplier-供应商,lng_customer-客户;不显示)
|
||||
*/
|
||||
@ApiModelProperty("交易对手类型(lng_supplier-供应商,lng_customer-客户;不显示)")
|
||||
private String cpTableName;
|
||||
|
||||
/**
|
||||
* 主交易对手编码
|
||||
*/
|
||||
@ApiModelProperty("主交易对手编码")
|
||||
private String cpCode;
|
||||
|
||||
/**
|
||||
* 主交易对手名称
|
||||
*/
|
||||
@ApiModelProperty("主交易对手名称")
|
||||
private String cpName;
|
||||
|
||||
/**
|
||||
* 合同期限
|
||||
*/
|
||||
@ApiModelProperty("合同期限")
|
||||
private String kPeriod;
|
||||
|
||||
/**
|
||||
* 合同签订日期
|
||||
*/
|
||||
@ApiModelProperty("合同签订日期")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime dateSign;
|
||||
|
||||
/**
|
||||
* 有效期开始
|
||||
*/
|
||||
@ApiModelProperty("有效期开始")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime dateFrom;
|
||||
|
||||
/**
|
||||
* 有效期结束
|
||||
*/
|
||||
@ApiModelProperty("有效期结束")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime dateTo;
|
||||
|
||||
/**
|
||||
* 确认函开始日
|
||||
*/
|
||||
@ApiModelProperty("确认函开始日")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime dateCfmFrom;
|
||||
|
||||
/**
|
||||
* 确认函结束日
|
||||
*/
|
||||
@ApiModelProperty("确认函结束日")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime dateCfmTo;
|
||||
|
||||
/**
|
||||
* 币种
|
||||
*/
|
||||
@ApiModelProperty("币种")
|
||||
private String curCode;
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
@ApiModelProperty("合同金额")
|
||||
private String amountDesc;
|
||||
|
||||
/**
|
||||
* 我方联系人
|
||||
*/
|
||||
@ApiModelProperty("我方联系人")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long empId;
|
||||
|
||||
/**
|
||||
* 业务部门ID
|
||||
*/
|
||||
@ApiModelProperty("业务部门ID")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long bDeptId;
|
||||
|
||||
/**
|
||||
* 状态(未提交/审批中/已审批/已驳回)
|
||||
*/
|
||||
@ApiModelProperty("状态(未提交/审批中/已审批/已驳回)")
|
||||
private String approCode;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
/**
|
||||
* lngContractSalesPng
|
||||
*/
|
||||
@ApiModelProperty("lngContractSalesPng子表")
|
||||
@TableField(exist = false)
|
||||
@EntityMapping(thisField = "id", joinField = "kId")
|
||||
private List<LngContractSalesPng> lngContractSalesPngList;
|
||||
/**
|
||||
* lngContractSalesPngPoint
|
||||
*/
|
||||
@ApiModelProperty("lngContractSalesPngPoint子表")
|
||||
@TableField(exist = false)
|
||||
@EntityMapping(thisField = "id", joinField = "kId")
|
||||
private List<LngContractSalesPngPoint> lngContractSalesPngPointList;
|
||||
/**
|
||||
* lngContractSalesPngQty
|
||||
*/
|
||||
@ApiModelProperty("lngContractSalesPngQty子表")
|
||||
@TableField(exist = false)
|
||||
@EntityMapping(thisField = "id", joinField = "kId")
|
||||
private List<LngContractSalesPngQty> lngContractSalesPngQtyList;
|
||||
/**
|
||||
* lngContractFactRel
|
||||
*/
|
||||
@ApiModelProperty("lngContractFactRel子表")
|
||||
@TableField(exist = false)
|
||||
@EntityMapping(thisField = "id", joinField = "kId")
|
||||
private List<LngContractFactRel> lngContractFactRelList;
|
||||
/**
|
||||
* lngContractApproRel
|
||||
*/
|
||||
@ApiModelProperty("lngContractApproRel子表")
|
||||
@TableField(exist = false)
|
||||
@EntityMapping(thisField = "id", joinField = "tableId")
|
||||
private List<LngContractApproRel> lngContractApproRelList;
|
||||
|
||||
}
|
||||
@ -1,32 +1,23 @@
|
||||
package com.xjrsoft.module.contract.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.github.yulichang.annotation.EntityMapping;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气采购
|
||||
* @title: 国内管道气
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_contract_fact_rel")
|
||||
@ApiModel(value = "国内管道气采购对象", description = "国内管道气采购")
|
||||
@ApiModel(value = "国内管道气采购/销售对象", description = "国内管道气采购")
|
||||
public class LngContractFactRel implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -35,10 +26,6 @@ public class LngContractFactRel implements Serializable {
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
@ -46,29 +33,18 @@ public class LngContractFactRel implements Serializable {
|
||||
* 合同-档案主键(关联时写入)
|
||||
*/
|
||||
@ApiModelProperty("合同-档案主键(关联时写入)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 合同-合同系统主键(关联时写入)
|
||||
*/
|
||||
@ApiModelProperty("合同-合同系统主键(关联时写入)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long kFactId;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@ApiModelProperty("显示顺序")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Short sort;
|
||||
|
||||
@ -76,9 +52,6 @@ public class LngContractFactRel implements Serializable {
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
|
||||
|
||||
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
@ -86,9 +59,6 @@ public class LngContractFactRel implements Serializable {
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
|
||||
|
||||
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
@ -96,9 +66,6 @@ public class LngContractFactRel implements Serializable {
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
|
||||
|
||||
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
@ -106,9 +73,6 @@ public class LngContractFactRel implements Serializable {
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
|
||||
|
||||
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
@ -116,9 +80,6 @@ public class LngContractFactRel implements Serializable {
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
@ -126,9 +87,6 @@ public class LngContractFactRel implements Serializable {
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
|
||||
|
||||
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
@ -136,9 +94,6 @@ public class LngContractFactRel implements Serializable {
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
|
||||
|
||||
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
@ -0,0 +1,114 @@
|
||||
package com.xjrsoft.module.contract.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_contract_sales_png")
|
||||
@ApiModel(value = "国内管道气销售对象", description = "国内管道气销售")
|
||||
public class LngContractSalesPng implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同-档案主键
|
||||
*/
|
||||
@ApiModelProperty("合同-档案主键")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 定价机制(固定价/公式价/对标价/无)
|
||||
*/
|
||||
@ApiModelProperty("定价机制(固定价/公式价/对标价/无)")
|
||||
private String prcTypeCode;
|
||||
|
||||
/**
|
||||
* 量价周期(1-自然月,-1-自然月往前1日)
|
||||
*/
|
||||
@ApiModelProperty("量价周期(1-自然月,-1-自然月往前1日)")
|
||||
private String periodTypeCode;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
@ApiModelProperty("计量单位")
|
||||
private String uomCode;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,113 @@
|
||||
package com.xjrsoft.module.contract.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_contract_sales_png_point")
|
||||
@ApiModel(value = "国内管道气销售对象", description = "国内管道气销售")
|
||||
public class LngContractSalesPngPoint implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同-档案主键
|
||||
*/
|
||||
@ApiModelProperty("合同-档案主键")
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 计量交割点编码(通常为下载点,客户托运时为上载点)
|
||||
*/
|
||||
@ApiModelProperty("计量交割点编码(通常为下载点,客户托运时为上载点)")
|
||||
private String pointDelyCode;
|
||||
|
||||
/**
|
||||
* 交气点编码(送达点,例如先到达计量交割点,仍要再送到交气点)
|
||||
*/
|
||||
@ApiModelProperty("交气点编码(送达点,例如先到达计量交割点,仍要再送到交气点)")
|
||||
private String pointTransCode;
|
||||
|
||||
/**
|
||||
* 自主托运(Y-是,N-否)
|
||||
*/
|
||||
@ApiModelProperty("自主托运(Y-是,N-否)")
|
||||
private String transSign;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,171 @@
|
||||
package com.xjrsoft.module.contract.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 国内管道气销售
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_contract_sales_png_qty")
|
||||
@ApiModel(value = "国内管道气销售对象", description = "国内管道气销售")
|
||||
public class LngContractSalesPngQty implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同-档案主键
|
||||
*/
|
||||
@ApiModelProperty("合同-档案主键")
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 开始日期(需要校验周期)
|
||||
*/
|
||||
@ApiModelProperty("开始日期(需要校验周期)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime dateFrom;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
@ApiModelProperty("结束日期")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime dateTo;
|
||||
|
||||
/**
|
||||
* 基础量/增量(基础量/增量1/增量2)
|
||||
*/
|
||||
@ApiModelProperty("基础量/增量(基础量/增量1/增量2)")
|
||||
private String baseInc;
|
||||
|
||||
/**
|
||||
* 优先级(必须录入)
|
||||
*/
|
||||
@ApiModelProperty("优先级(必须录入)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 比值(方/吉焦)
|
||||
*/
|
||||
@ApiModelProperty("比值(方/吉焦)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal rateM3Gj;
|
||||
|
||||
/**
|
||||
* 月气量(吉焦)(qty_m3_month*rate_m3_mj/1000)
|
||||
*/
|
||||
@ApiModelProperty("月气量(吉焦)(qty_m3_month*rate_m3_mj/1000)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyGjMonth;
|
||||
|
||||
/**
|
||||
* 月气量(方)(qty_gj_month*1000/rate_m3_mj)
|
||||
*/
|
||||
@ApiModelProperty("月气量(方)(qty_gj_month*1000/rate_m3_mj)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyM3Month;
|
||||
|
||||
/**
|
||||
* 日气量(吉焦)(根据当月天数自动计算)
|
||||
*/
|
||||
@ApiModelProperty("日气量(吉焦)(根据当月天数自动计算)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyGjDay;
|
||||
|
||||
/**
|
||||
* 日气量(方)(根据当月天数自动计算)
|
||||
*/
|
||||
@ApiModelProperty("日气量(方)(根据当月天数自动计算)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyM3Day;
|
||||
|
||||
/**
|
||||
* 照付不议类型(P-比例/M3-方/GJ-吉焦)
|
||||
*/
|
||||
@ApiModelProperty("照付不议类型(P-比例/M3-方/GJ-吉焦)")
|
||||
private String zfbyTypeCode;
|
||||
|
||||
/**
|
||||
* 照付不议比例%/量数值
|
||||
*/
|
||||
@ApiModelProperty("照付不议比例%/量数值")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal zfbyValue;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,10 +1,9 @@
|
||||
package com.xjrsoft.module.contract.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngContractFactRel;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
package com.xjrsoft.module.contract.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.dto.LngContractPageDto;
|
||||
import com.xjrsoft.module.contract.entity.LngContract;
|
||||
import com.xjrsoft.module.contract.vo.LngContractPageVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngContractMapper extends MPJBaseMapper<LngContract>, BaseMapper<LngContract> {
|
||||
|
||||
|
||||
@Select("SELECT k.id, k.rule_user_id, k.k_no, k.k_name, cu.cu_sname AS cp_name, k.date_from," +
|
||||
" k.date_to, GROUP_CONCAT(DISTINCT p.full_name) AS point_up_name," +
|
||||
" GROUP_CONCAT(DISTINCT di_trans.name) AS trans_name, com.name as com_name," +
|
||||
" k.appro_code, dd_a.name as appro_name, k.note" +
|
||||
" FROM lng_contract k" +
|
||||
" JOIN lng_contract_sales_png_point kppp ON kppp.k_id=k.id" +
|
||||
" LEFT JOIN lng_customer cu on cu.cu_code=k.cp_code" +
|
||||
" LEFT JOIN lng_b_station_png p on p.code=kppp.point_dely_code" +
|
||||
" LEFT JOIN xjr_dictionary_item di_trans on di_trans.code='LNG_YN'" +
|
||||
" LEFT JOIN xjr_dictionary_detail dd_tran on dd_tran.item_id=di_trans.id AND dd_tran.code=kppp.trans_sign" +
|
||||
" LEFT JOIN xjr_dictionary_item di_a on di_a.code='LNG_APPRO'" +
|
||||
" LEFT JOIN xjr_dictionary_detail dd_a on dd_a.item_id=di_a.id AND dd_a.code=k.appro_code" +
|
||||
" LEFT JOIN xjr_department com on com.id=k.com_id" +
|
||||
" ${ew.customSqlSegment}" +
|
||||
" GROUP BY k.id, k.k_no, k.k_name, cu.cu_sname, k.date_from, k.date_to,com.name, dd_a.name" +
|
||||
" ORDER BY k.date_from DESC, k.k_no DESC")
|
||||
IPage<LngContractPageVo> queryPage(IPage<LngContractPageDto> page, QueryWrapper<LngContract> queryWrapper);
|
||||
}
|
||||
@ -1,9 +1,17 @@
|
||||
package com.xjrsoft.module.contract.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngContractPur;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.dto.LngContractPageDto;
|
||||
import com.xjrsoft.module.contract.entity.LngContractPur;
|
||||
import com.xjrsoft.module.contract.vo.LngContractPageVo;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
@ -14,4 +22,23 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface LngContractPurMapper extends MPJBaseMapper<LngContractPur>, BaseMapper<LngContractPur> {
|
||||
|
||||
|
||||
@Select("SELECT k.id, k.rule_user_id, k.k_no, k.k_name, su.su_sname AS cp_name, k.date_from," +
|
||||
" k.date_to, GROUP_CONCAT(DISTINCT p.full_name) AS point_up_name," +
|
||||
" GROUP_CONCAT(DISTINCT di_trans.name) AS trans_name, com.name as com_name," +
|
||||
" k.appro_code, dd_a.name as appro_name, k.note" +
|
||||
" FROM lng_contract k" +
|
||||
" JOIN lng_contract_pur_png_point kppp ON kppp.k_id=k.id" +
|
||||
" LEFT JOIN lng_supplier su on su.su_code=k.cp_code" +
|
||||
" LEFT JOIN lng_b_station_png p on p.code=kppp.point_up_code" +
|
||||
" LEFT JOIN xjr_dictionary_item di_trans on di_trans.code='LNG_YN'" +
|
||||
" LEFT JOIN xjr_dictionary_detail dd_tran on dd_tran.item_id=di_trans.id AND dd_tran.code=kppp.trans_sign" +
|
||||
" LEFT JOIN xjr_dictionary_item di_a on di_a.code='LNG_APPRO'" +
|
||||
" LEFT JOIN xjr_dictionary_detail dd_a on dd_a.item_id=di_a.id AND dd_a.code=k.appro_code" +
|
||||
" LEFT JOIN xjr_department com on com.id=k.com_id" +
|
||||
" ${ew.customSqlSegment}" +
|
||||
" GROUP BY k.id, k.k_no, k.k_name, su.su_sname, k.date_from, k.date_to,com.name, dd_a.name" +
|
||||
" ORDER BY k.date_from DESC, k.k_no DESC")
|
||||
IPage<LngContractPageVo> queryPage(IPage<LngContractPageDto> page,@Param(Constants.WRAPPER) QueryWrapper<LngContractPur> queryWrapper);
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.contract.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngContractSalesPng;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngContractSalesPngMapper extends MPJBaseMapper<LngContractSalesPng>, BaseMapper<LngContractSalesPng> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.contract.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngContractSalesPngPoint;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngContractSalesPngPointMapper extends MPJBaseMapper<LngContractSalesPngPoint>, BaseMapper<LngContractSalesPngPoint> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.contract.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngContractSalesPngQty;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngContractSalesPngQtyMapper extends MPJBaseMapper<LngContractSalesPngQty>, BaseMapper<LngContractSalesPngQty> {
|
||||
|
||||
}
|
||||
@ -4,7 +4,10 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.github.yulichang.base.MPJBaseService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.module.contract.dto.LngContractPageDto;
|
||||
import com.xjrsoft.module.contract.entity.LngContractPur;
|
||||
import com.xjrsoft.module.contract.vo.LngContractPageVo;
|
||||
import com.xjrsoft.module.contract.vo.LngContractPurVo;
|
||||
|
||||
import lombok.Data;
|
||||
@ -21,4 +24,6 @@ public interface IContractPurPngService extends MPJBaseService<LngContractPur>,
|
||||
|
||||
LngContractPurVo getInfoById(Long id);
|
||||
|
||||
PageOutput<LngContractPageVo> queryPage(LngContractPageDto dto);
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package com.xjrsoft.module.contract.service;
|
||||
|
||||
import com.github.yulichang.base.MPJBaseService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.module.contract.dto.LngContractPageDto;
|
||||
import com.xjrsoft.module.contract.entity.LngContract;
|
||||
import com.xjrsoft.module.contract.vo.LngContractPageVo;
|
||||
import com.xjrsoft.module.contract.vo.LngContractVo;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface IContractSalesService extends MPJBaseService<LngContract>, MPJDeepService<LngContract>, MPJRelationService<LngContract> {
|
||||
|
||||
|
||||
PageOutput<LngContractPageVo> queryPage(LngContractPageDto dto);
|
||||
|
||||
LngContractVo getInfoById(Long id);
|
||||
}
|
||||
@ -2,19 +2,24 @@ package com.xjrsoft.module.contract.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.module.contract.dto.LngContractPageDto;
|
||||
import com.xjrsoft.module.contract.entity.LngContractPur;
|
||||
import com.xjrsoft.module.contract.entity.LngContractPurPngPoint;
|
||||
import com.xjrsoft.module.contract.entity.LngContractPurPngPointSales;
|
||||
import com.xjrsoft.module.contract.mapper.LngContractPurMapper;
|
||||
import com.xjrsoft.module.contract.mapper.LngContractPurPngPointSalesMapper;
|
||||
import com.xjrsoft.module.contract.service.IContractPurPngService;
|
||||
import com.xjrsoft.module.contract.vo.LngContractPurPngPointVo;
|
||||
import com.xjrsoft.module.contract.vo.LngContractPageVo;
|
||||
import com.xjrsoft.module.contract.vo.LngContractPurVo;
|
||||
import com.xjrsoft.module.sales.entity.LngCustomer;
|
||||
import com.xjrsoft.module.system.client.IFileClient;
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
|
||||
@ -35,6 +40,21 @@ public class ContractPurPngServiceImpl extends MPJBaseServiceImpl<LngContractPur
|
||||
|
||||
private final LngContractPurPngPointSalesMapper lngContractPurPngPointSalesMapper;
|
||||
|
||||
@Override
|
||||
public PageOutput<LngContractPageVo> queryPage(LngContractPageDto dto) {
|
||||
QueryWrapper<LngContractPur> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper
|
||||
.and(StringUtils.isNotBlank(dto.getKName()), r ->
|
||||
r.like("k.k_no", dto.getKName())
|
||||
.or()
|
||||
.like("k.k_name", dto.getKName())
|
||||
)
|
||||
.like(StringUtils.isNotBlank(dto.getCpName()), "su.su_sname", dto.getCpName());
|
||||
IPage<LngContractPageVo> page = this.baseMapper.queryPage(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngContractPageVo> pageOutput = ConventPage.getPageOutput(page, LngContractPageVo.class);
|
||||
return pageOutput;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LngContractPurVo getInfoById(Long id) {
|
||||
LngContractPur lngContractPur = this.getByIdDeep(id);
|
||||
|
||||
@ -0,0 +1,124 @@
|
||||
package com.xjrsoft.module.contract.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.pictc.enums.BusinessCode;
|
||||
import com.xjrsoft.common.exception.BusinessException;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.module.contract.dto.LngContractPageDto;
|
||||
import com.xjrsoft.module.contract.entity.*;
|
||||
import com.xjrsoft.module.contract.mapper.*;
|
||||
import com.xjrsoft.module.contract.service.IContractSalesService;
|
||||
import com.xjrsoft.module.contract.vo.*;
|
||||
import com.xjrsoft.module.sales.vo.LngApproVo;
|
||||
import com.xjrsoft.module.system.client.IFileClient;
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-12-30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class ContractSalesServiceImpl extends MPJBaseServiceImpl<LngContractMapper, LngContract> implements IContractSalesService {
|
||||
|
||||
private final LngContractSalesPngMapper lngContractSalesPngMapper;
|
||||
private final LngContractSalesPngPointMapper lngContractSalesPngPointMapper;
|
||||
private final LngContractSalesPngQtyMapper lngContractSalesPngQtyMapper;
|
||||
private final LngContractFactRelMapper lngContractFactRelMapper;
|
||||
private final LngContractFactMapper lngContractFactMapper;
|
||||
private final LngContractApproRelMapper lngContractApproRelMapper;
|
||||
private final IFileClient fileClient;
|
||||
|
||||
@Override
|
||||
public PageOutput<LngContractPageVo> queryPage(LngContractPageDto dto) {
|
||||
QueryWrapper<LngContract> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper
|
||||
.and(StringUtils.isNotBlank(dto.getKName()), r ->
|
||||
r.like("k.k_no", dto.getKName())
|
||||
.or()
|
||||
.like("k.k_name", dto.getKName())
|
||||
)
|
||||
.like(StringUtils.isNotBlank(dto.getCpName()), "cu.cu_sname", dto.getCpName());
|
||||
IPage<LngContractPageVo> page = this.baseMapper.queryPage(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngContractPageVo> pageOutput = ConventPage.getPageOutput(page, LngContractPageVo.class);
|
||||
return pageOutput;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LngContractVo getInfoById(Long id) {
|
||||
LngContract lngContract = this.getById(id);
|
||||
if(lngContract == null) {
|
||||
new BusinessException(BusinessCode.of(10500,"找不到此数据"));
|
||||
|
||||
}
|
||||
LngContractVo vo = BeanUtil.toBean(lngContract, LngContractVo.class);
|
||||
List<LngContractSalesPng> lngContractSalesPngList = lngContractSalesPngMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractSalesPng>()
|
||||
.eq(LngContractSalesPng::getKId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngContractSalesPngList)) {
|
||||
vo.setLngContractSalesPngList(BeanUtil.copyToList(lngContractSalesPngList,
|
||||
LngContractSalesPngVo.class));
|
||||
}
|
||||
List<LngContractSalesPngPoint> lngContractSalesPngPointList = lngContractSalesPngPointMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractSalesPngPoint>()
|
||||
.eq(LngContractSalesPngPoint::getKId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngContractSalesPngPointList)) {
|
||||
vo.setLngContractSalesPngPointList(BeanUtil.copyToList(lngContractSalesPngPointList,
|
||||
LngContractSalesPngPointVo.class));
|
||||
}
|
||||
List<LngContractSalesPngQty> lngContractSalesPngQtyList = lngContractSalesPngQtyMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractSalesPngQty>()
|
||||
.eq(LngContractSalesPngQty::getKId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngContractSalesPngQtyList)) {
|
||||
vo.setLngContractSalesPngQtyList(BeanUtil.copyToList(lngContractSalesPngQtyList,
|
||||
LngContractSalesPngQtyVo.class));
|
||||
}
|
||||
List<LngContractFactRel> lngContractFactRelList = lngContractFactRelMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractFactRel>()
|
||||
.eq(LngContractFactRel::getKId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngContractFactRelList)) {
|
||||
List<LngContractFactVo> lngContractFactVoList = Lists.newArrayList();
|
||||
lngContractFactRelList.forEach(x -> {
|
||||
LngContractFact lngContractFact = lngContractFactMapper.selectById(x.getKFactId());
|
||||
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_contract_fact",
|
||||
"lngFileUploadList", lngContractFact.getId());
|
||||
LngContractFactVo lngContractFactVo = BeanUtil.toBean(lngContractFact, LngContractFactVo.class);
|
||||
lngContractFactVo.setLngFileUploadList(fileList);
|
||||
lngContractFactVoList.add(lngContractFactVo);
|
||||
});
|
||||
vo.setLngContractFactList(lngContractFactVoList);
|
||||
}
|
||||
List<LngContractApproRel> lngContractApproRelList = lngContractApproRelMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractApproRel>()
|
||||
.eq(LngContractApproRel::getTableId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngContractApproRelList)) {
|
||||
List<LngApproVo> approVoList = Lists.newArrayList();
|
||||
lngContractApproRelList.forEach(x -> {
|
||||
LngApproVo approVo = lngContractFactMapper.getLngApproVo(x.getApproId());
|
||||
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_appro",
|
||||
"lngFileUploadList", approVo.getId());
|
||||
approVo.setLngFileUploadList(fileList);
|
||||
approVoList.add(approVo);
|
||||
});
|
||||
vo.setLngApproVoList(approVoList);
|
||||
}
|
||||
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_contract",
|
||||
"lngFileUploadList", vo.getId());
|
||||
vo.setLngFileUploadList(fileList);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user