日计划管理-客户需求

This commit is contained in:
2026-01-16 17:34:54 +08:00
parent db1e49ff51
commit 4b63caba3a
4 changed files with 165 additions and 13 deletions

View File

@ -12,6 +12,9 @@ import java.time.LocalDateTime;
import java.math.BigDecimal;
import java.util.List;
import com.xjrsoft.common.annotation.Trans;
import com.xjrsoft.common.enums.TransType;
/**
* @title: 表单出参
* @Author test01
@ -39,8 +42,9 @@ public class LngPngDemandPurVo extends com.xjrsoft.common.model.base.BaseModel{
* 供应商
*/
@ApiModelProperty("供应商")
@Trans(type = TransType.SUPPLIER, transToFieldName = "suName")
private String suCode;
private String suName;
/**
* 采购合同-主信息主键
@ -60,8 +64,9 @@ public class LngPngDemandPurVo extends com.xjrsoft.common.model.base.BaseModel{
* 上载点
*/
@ApiModelProperty("上载点")
@Trans(type = TransType.LNG_STATION, transToFieldName = "pointUpName")
private String pointUpCode;
private String pointUpName;
/**
* 自主托运(Y-是N-否)

View File

@ -4,6 +4,9 @@ import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import com.xjrsoft.common.annotation.Trans;
import com.xjrsoft.common.enums.TransType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
@ -66,15 +69,17 @@ public class LngPngDemandVo extends com.xjrsoft.common.model.base.BaseModel{
* 客户编码
*/
@ApiModelProperty("客户编码")
@Trans(type = TransType.CUSTOMER, transToFieldName = "cuName")
private String cuCode;
private String cuName;
/**
* 交易主体编码(天然气公司/惠贸;只读从合同带)
*/
@ApiModelProperty("交易主体编码(天然气公司/惠贸;只读从合同带)")
@Trans(type = TransType.DEPT, transToFieldName = "comName")
private Long comId;
private String comName;
/**
* 合同-主信息主键(销售)(lng_contract)

View File

@ -29,9 +29,11 @@ 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.dto.UpdateLngPngDemandPurDto;
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.LngPngDemandPurVo;
import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
@ -105,7 +107,7 @@ public class DemandController {
}
@PutMapping
@ApiOperation(value = "修改LngPngDemand")
@ApiOperation(value = "编辑LngPngDemand")
@SaCheckPermission("demand:edit")
public R update(@Valid @RequestBody UpdateLngPngDemandDto dto){
return R.ok(dataService.updateById(dto,new DataOperationListener<UpdateLngPngDemandDto>() {
@ -123,6 +125,74 @@ public class DemandController {
}));
}
@PostMapping(value="/toChange")
@ApiOperation(value = "变更LngPngDemand")
//@SaCheckPermission("demand:toChange")
public R toChange(@Valid @RequestParam Long id){
LngPngDemand lngPngDemand = demandService.getByIdDeep(id);
if (lngPngDemand == null) {
return R.error("找不到此数据!");
}
LngPngDemandVo res = BeanUtil.toBean(lngPngDemand, LngPngDemandVo.class);
res.setId(null);
res.setAlterSign("U");
res.setApproCode("WTJ");
res.setLastVerSign("Y");
res.setTimeSubmit(null);
res.setReply(null);
res.setQtySalesGj(null);
res.setQtySalesM3(null);
res.setRateM3Gj(null);
res.setQtyContractGj(null);
res.setQtyContractM3(null);
res.setQtyPlanGj(null);
res.setQtyPlanM3(null);
res.setOrgId(id);
if(res.getLngPngDemandPurList() != null) {
for(LngPngDemandPurVo pdp: res.getLngPngDemandPurList()) {
pdp.setId(null);
pdp.setDemandId(null);
pdp.setQtySalesGj(null);
pdp.setQtySalesM3(null);
pdp.setAddSign("N");
}
}
return R.ok(res);
}
@PostMapping(value="/cancel")
@ApiOperation(value = "取消LngPngDemand")
//@SaCheckPermission("demand:cancel")
public R cancel(@Valid @RequestParam Long id){
LngPngDemand lngPngDemand = demandService.getByIdDeep(id);
if (lngPngDemand == null) {
return R.error("找不到此数据!");
}
UpdateLngPngDemandDto temp = BeanUtil.toBean(lngPngDemand, UpdateLngPngDemandDto.class);
temp.setId(null);
temp.setAlterSign("D");
temp.setApproCode("WTJ");
temp.setTimeSubmit(null);
temp.setReply(null);
if(temp.getLngPngDemandPurList() != null) {
for(UpdateLngPngDemandPurDto pdp: temp.getLngPngDemandPurList()) {
pdp.setId(null);
pdp.setDemandId(null);
pdp.setAddSign("N");
}
}
return add(temp);
}
@GetMapping(value="/compare")
@ApiOperation(value = "对比LngPngDemand")
//@SaCheckPermission("demand:toChange")
public R compare(@Valid @RequestParam Long id){
return null;
}
@DeleteMapping
@ApiOperation(value = "删除")
@SaCheckPermission("demand:delete")

View File

@ -3,6 +3,7 @@ package com.xjrsoft.module.dayPlan.controller;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.validation.Valid;
@ -22,14 +23,19 @@ import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.support.ExcelTypeEnum;
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.pictc.datalog.DefaultDataOperationListener;
import com.xjrsoft.common.model.result.R;
import com.xjrsoft.common.page.ConventPage;
import com.xjrsoft.common.page.PageOutput;
import com.xjrsoft.common.utils.ExcelUtil;
import com.xjrsoft.common.utils.SecureUtil;
import com.xjrsoft.common.utils.VoToColumnUtil;
import com.xjrsoft.module.datalog.service.DatalogService;
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
import com.xjrsoft.module.dayPlan.dto.LngPngMeasureSalesPurPageDto;
import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandDto;
import com.xjrsoft.module.dayPlan.dto.UpdateLngPngMeasureSalesPurDto;
import com.xjrsoft.module.dayPlan.entity.LngPngMeasureSalesPur;
import com.xjrsoft.module.dayPlan.service.IPngMeasureSalesPurService;
@ -106,18 +112,84 @@ public class PngMeasureSalesPurController {
@PostMapping
@ApiOperation(value = "保存LngPngMeasureSalesPur")
@SaCheckPermission("pngMeasureSalesPur:add")
public R add(@Valid @RequestBody UpdateLngPngMeasureSalesPurDto dto){
@SaCheckPermission("pngMeasureSalesPur:save")
public R save(@Valid @RequestBody UpdateLngPngMeasureSalesPurDto dto){
UpdateLngPngMeasureSalesPurDto res = null;
if(dto.getId() == null) {
res = dataService.insert(dto);
}else {
dataService.updateById(dto);
res = dto;
}
res = dataService.insert(dto);
return R.ok(res.getId());
}
@PutMapping
@ApiOperation(value = "保存并确认LngPngMeasureSalesPur")
@SaCheckPermission("pngMeasureSalesPur:submit")
public R submit(@Valid @RequestBody List<UpdateLngPngMeasureSalesPurDto> dtoList){
for(UpdateLngPngMeasureSalesPurDto dto: dtoList) {
dto.setCfmCuUserId(SecureUtil.getCurrentUserId());
dto.setCfmCuUserTime(new Date());
}
return R.ok(dataService.insertBatch(dtoList,new DataOperationListener<UpdateLngPngMeasureSalesPurDto>() {
@Override
public UpdateLngPngMeasureSalesPurDto before(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
return null;
}
@Override
public UpdateLngPngMeasureSalesPurDto after(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
return null;
}
}));
}
@PostMapping(value = "/cancel")
@ApiOperation(value = "取消确认LngPngMeasureSalesPur")
@SaCheckPermission("pngMeasureSalesPur:cancel")
public R cancel(@Valid @RequestBody List<UpdateLngPngMeasureSalesPurDto> dtoList){
for(UpdateLngPngMeasureSalesPurDto dto: dtoList) {
dto.setCfmCuUserId(null);
dto.setCfmCuUserTime(null);
dto.setCfmEmpId(null);
dto.setCfmEmpTime(null);
}
return R.ok(dataService.insertBatch(dtoList,new DataOperationListener<UpdateLngPngMeasureSalesPurDto>() {
@Override
public UpdateLngPngMeasureSalesPurDto before(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
return null;
}
@Override
public UpdateLngPngMeasureSalesPurDto after(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
return null;
}
}));
}
@PostMapping(value = "/reject")
@ApiOperation(value = "驳回LngPngMeasureSalesPur")
@SaCheckPermission("pngMeasureSalesPur:reject")
public R reject(@Valid @RequestBody List<UpdateLngPngMeasureSalesPurDto> dtoList){
for(UpdateLngPngMeasureSalesPurDto dto: dtoList) {
dto.setCfmEmpId(null);
dto.setCfmEmpTime(null);
}
return R.ok(dataService.insertBatch(dtoList,new DataOperationListener<UpdateLngPngMeasureSalesPurDto>() {
@Override
public UpdateLngPngMeasureSalesPurDto before(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
return null;
}
@Override
public UpdateLngPngMeasureSalesPurDto after(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
return null;
}
}));
}
@DeleteMapping
@ApiOperation(value = "删除")