Merge branch 'dev' of http://47.94.165.164:13000/geg-gas/geg-gas-pcitc into dev
This commit is contained in:
@ -0,0 +1,130 @@
|
||||
package com.xjrsoft.module.dayPlan.controller;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.support.ExcelTypeEnum;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.common.utils.ExcelUtil;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.dayPlan.dto.LngPngDemandPageDto;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngPngDemand;
|
||||
import com.xjrsoft.module.dayPlan.service.IDemandService;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
* @title: 日计划-客户需求
|
||||
* @Author test01
|
||||
* @Date: 2026-01-15
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dayPlan/demand")
|
||||
@Api(value = "/dayPlan" + "/demand",tags = "日计划-客户需求代码")
|
||||
@AllArgsConstructor
|
||||
public class DemandController {
|
||||
|
||||
|
||||
private final IDemandService demandService;
|
||||
private final DatalogService dataService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngPngDemand列表(分页)")
|
||||
@SaCheckPermission("demand:list")
|
||||
public R page(@Valid LngPngDemandPageDto dto){
|
||||
|
||||
return R.ok(demandService.queryPage(dto));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngPngDemand信息")
|
||||
@SaCheckPermission("demand:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngPngDemand lngPngDemand = demandService.getByIdDeep(id);
|
||||
if (lngPngDemand == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngPngDemand, LngPngDemandVo.class));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngPngDemand数据详细日志")
|
||||
@SaCheckPermission("demand:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngPngDemandDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngPngDemand")
|
||||
@SaCheckPermission("demand:add")
|
||||
public R add(@Valid @RequestBody UpdateLngPngDemandDto dto){
|
||||
UpdateLngPngDemandDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngPngDemand")
|
||||
@SaCheckPermission("demand:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngPngDemandDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("demand:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngPngDemandDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/import")
|
||||
@ApiOperation(value = "导入")
|
||||
@SaCheckPermission("demand:import")
|
||||
public R importData(@RequestParam MultipartFile file) throws IOException {
|
||||
List<LngPngDemandPageVo> savedDataList = EasyExcel.read(file.getInputStream()).head(LngPngDemandPageVo.class).sheet().doReadSync();
|
||||
ExcelUtil.transExcelData(savedDataList, true);
|
||||
dataService.insertBatch(BeanUtil.copyToList(savedDataList,UpdateLngPngDemandDto.class));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@GetMapping("/export")
|
||||
@ApiOperation(value = "导出")
|
||||
@SaCheckPermission("demand:export")
|
||||
public ResponseEntity<byte[]> exportData(@Valid LngPngDemandPageDto dto, @RequestParam(defaultValue = "false") Boolean isTemplate) {
|
||||
List<LngPngDemandPageVo> customerList = isTemplate != null && isTemplate ? new ArrayList<>() : ((PageOutput<LngPngDemandPageVo>) page(dto).getData()).getList();
|
||||
ExcelUtil.transExcelData(customerList, false);
|
||||
ByteArrayOutputStream bot = new ByteArrayOutputStream();
|
||||
EasyExcel.write(bot, LngPngDemandPageVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
|
||||
ByteArrayOutputStream resultBot = ExcelUtil.renderExportRequiredHead(bot);
|
||||
|
||||
return R.fileStream(resultBot.toByteArray(), "Demand" + ExcelTypeEnum.XLSX.getValue());
|
||||
}
|
||||
}
|
||||
@ -73,11 +73,6 @@ public class PngMeasureSalesPurController {
|
||||
.like(StrUtil.isNotBlank(dto.getSuCode()),LngPngMeasureSalesPur::getSuCode,dto.getSuCode())
|
||||
.like(StrUtil.isNotBlank(dto.getPointUpCode()),LngPngMeasureSalesPur::getPointUpCode,dto.getPointUpCode())
|
||||
.like(StrUtil.isNotBlank(dto.getPointDelyCode()),LngPngMeasureSalesPur::getPointDelyCode,dto.getPointDelyCode())
|
||||
.eq(ObjectUtil.isNotNull(dto.getQtySalesGj()),LngPngMeasureSalesPur::getQtySalesGj,dto.getQtySalesGj())
|
||||
.eq(ObjectUtil.isNotNull(dto.getQtySalesM3()),LngPngMeasureSalesPur::getQtySalesM3,dto.getQtySalesM3())
|
||||
.eq(ObjectUtil.isNotNull(dto.getQtyMeaGj()),LngPngMeasureSalesPur::getQtyMeaGj,dto.getQtyMeaGj())
|
||||
.eq(ObjectUtil.isNotNull(dto.getQtyMeaM3()),LngPngMeasureSalesPur::getQtyMeaM3,dto.getQtyMeaM3())
|
||||
.eq(ObjectUtil.isNotNull(dto.getRateM3Gj()),LngPngMeasureSalesPur::getRateM3Gj,dto.getRateM3Gj())
|
||||
.eq(ObjectUtil.isNotNull(dto.getCfmCuUserId()),LngPngMeasureSalesPur::getCfmCuUserId,dto.getCfmCuUserId())
|
||||
//.like(StrUtil.isNotBlank(dto.getCfmCuUserTime()),LngPngMeasureSalesPur::getCfmCuUserTime,dto.getCfmCuUserTime())
|
||||
.eq(ObjectUtil.isNotNull(dto.getCfmEmpId()),LngPngMeasureSalesPur::getCfmEmpId,dto.getCfmEmpId())
|
||||
@ -85,8 +80,7 @@ public class PngMeasureSalesPurController {
|
||||
.eq(ObjectUtil.isNotNull(dto.getKpId()),LngPngMeasureSalesPur::getKpId,dto.getKpId())
|
||||
.like(StrUtil.isNotBlank(dto.getTransSign()),LngPngMeasureSalesPur::getTransSign,dto.getTransSign())
|
||||
//.between(ObjectUtil.isNotNull(dto.getCreateDateStart()) && ObjectUtil.isNotNull(dto.getCreateDateEnd()),LngPngMeasureSalesPur::getCreateDate,dto.getCreateDateStart(),dto.getCreateDateEnd())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngPngMeasureSalesPur::getNote,dto.getNote())
|
||||
.orderByDesc(LngPngMeasureSalesPur::getId)
|
||||
.orderByDesc(LngPngMeasureSalesPur::getId)
|
||||
.select(LngPngMeasureSalesPur.class,x -> VoToColumnUtil.fieldsToColumns(LngPngMeasureSalesPurPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngPngMeasureSalesPur> page = pngMeasureSalesPurService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngPngMeasureSalesPurPageVo> pageOutput = ConventPage.getPageOutput(page, LngPngMeasureSalesPurPageVo.class);
|
||||
@ -97,11 +91,8 @@ public class PngMeasureSalesPurController {
|
||||
@ApiOperation(value="根据id查询LngPngMeasureSalesPur信息")
|
||||
@SaCheckPermission("pngMeasureSalesPur:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngPngMeasureSalesPur lngPngMeasureSalesPur = pngMeasureSalesPurService.getById(id);
|
||||
if (lngPngMeasureSalesPur == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngPngMeasureSalesPur, LngPngMeasureSalesPurVo.class));
|
||||
LngPngMeasureSalesPurVo lngPngMeasureSalesPur = pngMeasureSalesPurService.getInfoById(id);
|
||||
return R.ok(lngPngMeasureSalesPur);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ -114,19 +105,19 @@ public class PngMeasureSalesPurController {
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngPngMeasureSalesPur")
|
||||
@ApiOperation(value = "保存LngPngMeasureSalesPur")
|
||||
@SaCheckPermission("pngMeasureSalesPur:add")
|
||||
public R add(@Valid @RequestBody UpdateLngPngMeasureSalesPurDto dto){
|
||||
UpdateLngPngMeasureSalesPurDto res = dataService.insert(dto);
|
||||
UpdateLngPngMeasureSalesPurDto res = null;
|
||||
if(dto.getId() == null) {
|
||||
res = dataService.insert(dto);
|
||||
}else {
|
||||
dataService.updateById(dto);
|
||||
res = dto;
|
||||
}
|
||||
return R.ok(res.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngPngMeasureSalesPur")
|
||||
@SaCheckPermission("pngMeasureSalesPur:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngPngMeasureSalesPurDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
|
||||
@ -0,0 +1,343 @@
|
||||
package com.xjrsoft.module.dayPlan.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 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: 日计划-客户需求
|
||||
* @Author test01
|
||||
* @Date: 2026-01-15
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_png_demand")
|
||||
@ApiModel(value = "日计划-客户需求对象", description = "日计划-客户需求")
|
||||
public class LngPngDemand implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 版本1主键(版本号为1的原始计划主键,新计划为自身主键,变更时复制原记录的版本1主键)
|
||||
*/
|
||||
@ApiModelProperty("版本1主键(版本号为1的原始计划主键,新计划为自身主键,变更时复制原记录的版本1主键)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 版本号(初始为1,变更时+1)
|
||||
*/
|
||||
@ApiModelProperty("版本号(初始为1,变更时+1)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Byte verNo;
|
||||
|
||||
/**
|
||||
* 最新版本标识(Y-是,N-否;版本1主键相同的记录中只有一个Y;版本变更时将版本1主键相同的其他记录置为N)
|
||||
*/
|
||||
@ApiModelProperty("最新版本标识(Y-是,N-否;版本1主键相同的记录中只有一个Y;版本变更时将版本1主键相同的其他记录置为N)")
|
||||
private String lastVerSign;
|
||||
|
||||
/**
|
||||
* 变更标识(I/U/D对原始计划的增改删)
|
||||
*/
|
||||
@ApiModelProperty("变更标识(I/U/D对原始计划的增改删)")
|
||||
private String alterSign;
|
||||
|
||||
/**
|
||||
* 计划日期(次日计划为次日;当日计划为当日;同日、同客户、同销售合同交割点、同上载点、同供应商不能重复(仅检查最新版并去掉变更标识为删除的))
|
||||
*/
|
||||
@ApiModelProperty("计划日期(次日计划为次日;当日计划为当日;同日、同客户、同销售合同交割点、同上载点、同供应商不能重复(仅检查最新版并去掉变更标识为删除的))")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime datePlan;
|
||||
|
||||
/**
|
||||
* 客户编码
|
||||
*/
|
||||
@ApiModelProperty("客户编码")
|
||||
private String cuCode;
|
||||
|
||||
/**
|
||||
* 交易主体编码(天然气公司/惠贸;只读从合同带)
|
||||
*/
|
||||
@ApiModelProperty("交易主体编码(天然气公司/惠贸;只读从合同带)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long comId;
|
||||
|
||||
/**
|
||||
* 合同-主信息主键(销售)(lng_contract)
|
||||
*/
|
||||
@ApiModelProperty("合同-主信息主键(销售)(lng_contract)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ksId;
|
||||
|
||||
/**
|
||||
* 合同-国内销售-管道气-交割点主键(lng_contract_sales_png_point)
|
||||
*/
|
||||
@ApiModelProperty("合同-国内销售-管道气-交割点主键(lng_contract_sales_png_point)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ksppId;
|
||||
|
||||
/**
|
||||
* 交割点编码
|
||||
*/
|
||||
@ApiModelProperty("交割点编码")
|
||||
private String pointDelyCode;
|
||||
|
||||
/**
|
||||
* 电厂开机方式-连运机组数(电厂用户填报开机方式)
|
||||
*/
|
||||
@ApiModelProperty("电厂开机方式-连运机组数(电厂用户填报开机方式)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Short powerCont;
|
||||
|
||||
/**
|
||||
* 电厂开机方式-调峰机组数(电厂用户填报开机方式)
|
||||
*/
|
||||
@ApiModelProperty("电厂开机方式-调峰机组数(电厂用户填报开机方式)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Short powerPeak;
|
||||
|
||||
/**
|
||||
* 电厂开机方式-停机机组数(电厂用户填报开机方式)
|
||||
*/
|
||||
@ApiModelProperty("电厂开机方式-停机机组数(电厂用户填报开机方式)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Short powerStop;
|
||||
|
||||
/**
|
||||
* 电厂开机方式-其他机组数(电厂用户填报开机方式)
|
||||
*/
|
||||
@ApiModelProperty("电厂开机方式-其他机组数(电厂用户填报开机方式)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Short powerOther;
|
||||
|
||||
/**
|
||||
* 比值(方/吉焦)(只读,从参数设置带过来;1立方=37.3兆焦;)
|
||||
*/
|
||||
@ApiModelProperty("比值(方/吉焦)(只读,从参数设置带过来;1立方=37.3兆焦;)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal rateM3Gj;
|
||||
|
||||
/**
|
||||
* 日合同量(吉焦)(只读,从合同带过来)
|
||||
*/
|
||||
@ApiModelProperty("日合同量(吉焦)(只读,从合同带过来)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyContractGj;
|
||||
|
||||
/**
|
||||
* 日合同量(方)(只读,从合同带过来)
|
||||
*/
|
||||
@ApiModelProperty("日合同量(方)(只读,从合同带过来)")
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyContractM3;
|
||||
|
||||
/**
|
||||
* 日计划量(吉焦)(只读,从月度分日计划带过来)
|
||||
*/
|
||||
@ApiModelProperty("日计划量(吉焦)(只读,从月度分日计划带过来)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyPlanGj;
|
||||
|
||||
/**
|
||||
* 日计划量(方)(只读,从月度分日计划带过来)
|
||||
*/
|
||||
@ApiModelProperty("日计划量(方)(只读,从月度分日计划带过来)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyPlanM3;
|
||||
|
||||
/**
|
||||
* 日指定量(吉焦)(只读;>0,<预付款范围内的量;等于lng_png_demand_pur合计)
|
||||
*/
|
||||
@ApiModelProperty("日指定量(吉焦)(只读;>0,<预付款范围内的量;等于lng_png_demand_pur合计)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyDemandGj;
|
||||
|
||||
/**
|
||||
* 日指定量(方)(只读;>0,<预付款范围内的量;等于lng_png_demand_pur合计)
|
||||
*/
|
||||
@ApiModelProperty("日指定量(方)(只读;>0,<预付款范围内的量;等于lng_png_demand_pur合计)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyDemandM3;
|
||||
|
||||
/**
|
||||
* 日批复量(吉焦)(只读)
|
||||
*/
|
||||
@ApiModelProperty("日批复量(吉焦)(只读)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtySalesGj;
|
||||
|
||||
/**
|
||||
* 日批复量(方)(只读)
|
||||
*/
|
||||
@ApiModelProperty("日批复量(方)(只读)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtySalesM3;
|
||||
|
||||
/**
|
||||
* 销售价格(元/吉焦)(提交时获取)
|
||||
*/
|
||||
@ApiModelProperty("销售价格(元/吉焦)(提交时获取)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal priceSalesGj;
|
||||
|
||||
/**
|
||||
* 销售价格(元/方)(提交时获取)
|
||||
*/
|
||||
@ApiModelProperty("销售价格(元/方)(提交时获取)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal priceSalesM3;
|
||||
|
||||
/**
|
||||
* 销售金额(自动计算,扣减预付款用)
|
||||
*/
|
||||
@ApiModelProperty("销售金额(自动计算,扣减预付款用)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal amountSales;
|
||||
|
||||
/**
|
||||
* 审批状态(待提交/审批中/已审批/已驳回)
|
||||
*/
|
||||
@ApiModelProperty("审批状态(待提交/审批中/已审批/已驳回)")
|
||||
private String approCode;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
@ApiModelProperty("提交时间")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime timeSubmit;
|
||||
|
||||
/**
|
||||
* 批复意见
|
||||
*/
|
||||
@ApiModelProperty("批复意见")
|
||||
private String reply;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@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;
|
||||
|
||||
|
||||
/**
|
||||
* lngPngDemandPur
|
||||
*/
|
||||
@ApiModelProperty("lngPngDemandPur子表")
|
||||
@TableField(exist = false)
|
||||
@EntityMapping(thisField = "id", joinField = "demandId")
|
||||
private List<LngPngDemandPur> lngPngDemandPurList;
|
||||
|
||||
}
|
||||
@ -0,0 +1,213 @@
|
||||
package com.xjrsoft.module.dayPlan.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 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: 日计划-客户需求
|
||||
* @Author test01
|
||||
* @Date: 2026-01-15
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_png_demand_pur")
|
||||
@ApiModel(value = "日计划-客户需求对象", description = "日计划-客户需求")
|
||||
public class LngPngDemandPur implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 日计划-管道气-客户需求主键
|
||||
*/
|
||||
@ApiModelProperty("日计划-管道气-客户需求主键")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long demandId;
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
@ApiModelProperty("供应商")
|
||||
private String suCode;
|
||||
|
||||
/**
|
||||
* 采购合同-主信息主键
|
||||
*/
|
||||
@ApiModelProperty("采购合同-主信息主键")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long kpId;
|
||||
|
||||
/**
|
||||
* 合同-国内采购-管道气-上载点主键
|
||||
*/
|
||||
@ApiModelProperty("合同-国内采购-管道气-上载点主键")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long kpppId;
|
||||
|
||||
/**
|
||||
* 上载点
|
||||
*/
|
||||
@ApiModelProperty("上载点")
|
||||
private String pointUpCode;
|
||||
|
||||
/**
|
||||
* 自主托运(Y-是,N-否)
|
||||
*/
|
||||
@ApiModelProperty("自主托运(Y-是,N-否)")
|
||||
private String transSign;
|
||||
|
||||
/**
|
||||
* 比值(方/吉焦)
|
||||
*/
|
||||
@ApiModelProperty("比值(方/吉焦)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal rateM3Gj;
|
||||
|
||||
/**
|
||||
* 日指定量(吉焦)(客户填报)
|
||||
*/
|
||||
@ApiModelProperty("日指定量(吉焦)(客户填报)")
|
||||
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyDemandGj;
|
||||
|
||||
/**
|
||||
* 日指定量(方)(客户填报)
|
||||
*/
|
||||
@ApiModelProperty("日指定量(方)(客户填报)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyDemandM3;
|
||||
|
||||
/**
|
||||
* 日批复量(吉焦)(销售批复回写)
|
||||
*/
|
||||
@ApiModelProperty("日批复量(吉焦)(销售批复回写)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtySalesGj;
|
||||
|
||||
/**
|
||||
* 日批复量(方)(销售批复回写)
|
||||
*/
|
||||
@ApiModelProperty("日批复量(方)(销售批复回写)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtySalesM3;
|
||||
|
||||
/**
|
||||
* 顺序
|
||||
*/
|
||||
@ApiModelProperty("顺序")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Short sort;
|
||||
|
||||
/**
|
||||
* 批复添加标识(Y-批复时增加的记录,N-客户填报记录;缺省N;系统字段)
|
||||
*/
|
||||
@ApiModelProperty("批复添加标识(Y-批复时增加的记录,N-客户填报记录;缺省N;系统字段)")
|
||||
private String addSign;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@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,40 @@
|
||||
package com.xjrsoft.module.dayPlan.mapper;
|
||||
|
||||
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.dayPlan.dto.LngPngDemandPageDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngPngDemand;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author test01
|
||||
* @Date: 2026-01-15
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngPngDemandMapper extends MPJBaseMapper<LngPngDemand>,BaseMapper<LngPngDemand> {
|
||||
|
||||
@Select("SELECT d.id, d.rule_user_id, d.cu_code, d.org_id, d.ver_no, k.date_from,d.last_ver_sign,d.date_plan," +
|
||||
" (CASE d.date_plan - SYSDATE WHEN 0 THEN '当日' WHEN 1 THEN '次日' ELSE IF(d.date_plan - SYSDATE < 0,'',d.date_plan - SYSDATE || '日后') END) days_sign," +
|
||||
" sp.full_name AS point_dely_name, d.qty_demand_gj, d.qty_demand_m3,d.qty_sales_gj,d.qty_sales_m3,d.qty_sales_gj," +
|
||||
" d.qty_sales_m3, k.k_name, d.alter_sign,dd_iud.name as alter_name,d.reply,d.appro_code,dd_a.name as appro_name" +
|
||||
" FROM lng_png_demand d " +
|
||||
" LEFT JOIN lng_contract k ON k.id=d.ks_id " +
|
||||
" LEFT JOIN xjr_dictionary_item di_iud on di_iud.code='LNG_ALTER' " +
|
||||
" LEFT JOIN xjr_dictionary_detail dd_iud on dd_iud.item_id=di_iud.id AND dd_iud.code=d.alter_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=d.appro_code " +
|
||||
" LEFT JOIN lng_b_station_png sp ON sp.code=d.point_dely_code " +
|
||||
" ${ew.customSqlSegment}" +
|
||||
" ORDER BY d.date_plan DESC, (CASE d.appro_code WHEN 'WTJ' THEN 1 WHEN 'YBH' THEN 2 WHEN 'SPZ' THEN 3 WHEN 'YSP' THEN 4 ELSE 5 END) " )
|
||||
IPage<LngPngDemandPageVo> queryPage(IPage<LngPngDemandPageDto> page,@Param(Constants.WRAPPER) QueryWrapper<LngPngDemand> queryWrapper);
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.dayPlan.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngPngDemandPur;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author test01
|
||||
* @Date: 2026-01-15
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngPngDemandPurMapper extends MPJBaseMapper<LngPngDemandPur> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.xjrsoft.module.dayPlan.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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.dayPlan.dto.LngPngDemandPageDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngPngDemand;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author test01
|
||||
* @Date: 2026-01-15
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface IDemandService extends MPJBaseService<LngPngDemand>, MPJDeepService<LngPngDemand>, MPJRelationService<LngPngDemand> {
|
||||
|
||||
PageOutput<LngPngDemandPageVo> queryPage(LngPngDemandPageDto dto);
|
||||
|
||||
|
||||
}
|
||||
@ -1,12 +1,8 @@
|
||||
package com.xjrsoft.module.dayPlan.service;
|
||||
|
||||
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.module.dayPlan.entity.LngPngMeasureSalesPur;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngPngMeasureSalesPurVo;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
@ -16,4 +12,6 @@ import java.util.List;
|
||||
*/
|
||||
|
||||
public interface IPngMeasureSalesPurService extends IService<LngPngMeasureSalesPur> {
|
||||
|
||||
LngPngMeasureSalesPurVo getInfoById(Long id);
|
||||
}
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
package com.xjrsoft.module.dayPlan.service.impl;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
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.dayPlan.dto.LngPngDemandPageDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngPngDemand;
|
||||
import com.xjrsoft.module.dayPlan.mapper.LngPngDemandMapper;
|
||||
import com.xjrsoft.module.dayPlan.mapper.LngPngDemandPurMapper;
|
||||
import com.xjrsoft.module.dayPlan.service.IDemandService;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author test01
|
||||
* @Date: 2026-01-15
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class DemandServiceImpl extends MPJBaseServiceImpl<LngPngDemandMapper, LngPngDemand> implements IDemandService {
|
||||
|
||||
private final LngPngDemandMapper demandLngPngDemandMapper;
|
||||
|
||||
private final LngPngDemandPurMapper demandLngPngDemandPurMapper;
|
||||
|
||||
@Override
|
||||
public PageOutput<LngPngDemandPageVo> queryPage(LngPngDemandPageDto dto) {
|
||||
QueryWrapper<LngPngDemand> 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.getPointDelyName()), "sp.full_name", dto.getPointDelyName())
|
||||
.eq("d.last_ver_sign", "Y");
|
||||
IPage<LngPngDemandPageVo> page = this.baseMapper.queryPage(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngPngDemandPageVo> pageOutput = ConventPage.getPageOutput(page, LngPngDemandPageVo.class);
|
||||
return pageOutput;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,12 +1,20 @@
|
||||
package com.xjrsoft.module.dayPlan.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.pictc.enums.BusinessCode;
|
||||
import com.xjrsoft.common.exception.BusinessException;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngPngMeasureSalesPur;
|
||||
import com.xjrsoft.module.dayPlan.mapper.LngPngMeasureSalesPurMapper;
|
||||
import com.xjrsoft.module.dayPlan.service.IPngMeasureSalesPurService;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngPngMeasureSalesPurVo;
|
||||
import com.xjrsoft.module.system.client.IFileClient;
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
@ -18,4 +26,19 @@ import lombok.AllArgsConstructor;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class PngMeasureSalesPurServiceImpl extends ServiceImpl<LngPngMeasureSalesPurMapper, LngPngMeasureSalesPur> implements IPngMeasureSalesPurService {
|
||||
|
||||
|
||||
private final IFileClient fileClient;
|
||||
|
||||
@Override
|
||||
public LngPngMeasureSalesPurVo getInfoById(Long id) {
|
||||
LngPngMeasureSalesPur lngPngMeasureSalesPur = this.getById(id);
|
||||
if(lngPngMeasureSalesPur == null) {
|
||||
throw new BusinessException(BusinessCode.of(10500, "找不到此数据!"));
|
||||
}
|
||||
LngPngMeasureSalesPurVo vo = BeanUtil.toBean(lngPngMeasureSalesPur, LngPngMeasureSalesPurVo.class);
|
||||
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_png_measure_sales_pur", "fileList", vo.getId());
|
||||
vo.setFileList(fileList);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,6 +11,8 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||
import com.pictc.enums.BusinessCode;
|
||||
import com.xjrsoft.common.exception.BusinessException;
|
||||
import com.xjrsoft.module.mdm.client.ILngBankClient;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBBankDto;
|
||||
import com.xjrsoft.module.sales.entity.LngCustomer;
|
||||
@ -77,7 +79,7 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
|
||||
|
||||
LngCustomer lngCustomer = this.getByIdDeep(id);
|
||||
if(lngCustomer == null) {
|
||||
return null;
|
||||
throw new BusinessException(BusinessCode.of(10500, "找不到此数据!"));
|
||||
}
|
||||
|
||||
LngCustomerVo vo = BeanUtil.toBean(lngCustomer, LngCustomerVo.class);
|
||||
|
||||
Reference in New Issue
Block a user