修改
This commit is contained in:
@ -0,0 +1,126 @@
|
||||
package com.xjrsoft.module.dayPlan.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
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.approve.ApproveDto;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.dayPlan.dto.LngLngApproPageDto;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngLngApproDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngLngAppro;
|
||||
import com.xjrsoft.module.dayPlan.service.ILngApproService;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngApproPageVo;
|
||||
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: LNG调度审批
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-16
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dayPlan" + "/lngAppro")
|
||||
@Api(value = "/dayPlan" + "/lngAppro",tags = "LNG调度审批代码")
|
||||
@AllArgsConstructor
|
||||
public class LngApproController {
|
||||
|
||||
|
||||
private final ILngApproService lngApproService;
|
||||
private final DatalogService dataService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngLngAppro列表(分页)")
|
||||
@SaCheckPermission("lngAppro:list")
|
||||
public R page(@Valid LngLngApproPageDto dto){
|
||||
|
||||
LambdaQueryWrapper<LngLngAppro> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.eq(ObjectUtil.isNotNull(dto.getId()),LngLngAppro::getId,dto.getId())
|
||||
.like(StrUtil.isNotBlank(dto.getCuCode()),LngLngAppro::getCuCode,dto.getCuCode())
|
||||
.like(StrUtil.isNotBlank(dto.getStaCode()),LngLngAppro::getStaCode,dto.getStaCode())
|
||||
.like(StrUtil.isNotBlank(dto.getNoTractor()),LngLngAppro::getNoTractor,dto.getNoTractor())
|
||||
.like(StrUtil.isNotBlank(dto.getNoTrailer()),LngLngAppro::getNoTrailer,dto.getNoTrailer())
|
||||
.like(StrUtil.isNotBlank(dto.getIdNoDriver()),LngLngAppro::getIdNoDriver,dto.getIdNoDriver())
|
||||
.like(StrUtil.isNotBlank(dto.getNameDriver()),LngLngAppro::getNameDriver,dto.getNameDriver())
|
||||
.like(StrUtil.isNotBlank(dto.getPhoneDriver()),LngLngAppro::getPhoneDriver,dto.getPhoneDriver())
|
||||
.like(StrUtil.isNotBlank(dto.getIdNoEscort()),LngLngAppro::getIdNoEscort,dto.getIdNoEscort())
|
||||
.like(StrUtil.isNotBlank(dto.getNameEscort()),LngLngAppro::getNameEscort,dto.getNameEscort())
|
||||
.like(StrUtil.isNotBlank(dto.getPhoneEscort()),LngLngAppro::getPhoneEscort,dto.getPhoneEscort())
|
||||
.like(StrUtil.isNotBlank(dto.getCarrCode()),LngLngAppro::getCarrCode,dto.getCarrCode())
|
||||
.eq(ObjectUtil.isNotNull(dto.getKsId()),LngLngAppro::getKsId,dto.getKsId())
|
||||
.like(StrUtil.isNotBlank(dto.getUnloadingName()),LngLngAppro::getUnloadingName,dto.getUnloadingName())
|
||||
.like(StrUtil.isNotBlank(dto.getAlterSign()),LngLngAppro::getAlterSign,dto.getAlterSign())
|
||||
.like(StrUtil.isNotBlank(dto.getApproCode()),LngLngAppro::getApproCode,dto.getApproCode())
|
||||
.orderByDesc(LngLngAppro::getId)
|
||||
.select(LngLngAppro.class,x -> VoToColumnUtil.fieldsToColumns(LngLngApproPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngLngAppro> page = lngApproService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngLngApproPageVo> pageOutput = ConventPage.getPageOutput(page, LngLngApproPageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngLngAppro信息")
|
||||
@SaCheckPermission("lngAppro:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
return R.ok(lngApproService.getInfoById(id));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngLngAppro数据详细日志")
|
||||
@SaCheckPermission("lngAppro:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngLngApproDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngLngAppro")
|
||||
@SaCheckPermission("lngAppro:add")
|
||||
public R add(@Valid @RequestBody UpdateLngLngApproDto dto){
|
||||
UpdateLngLngApproDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngLngAppro")
|
||||
@SaCheckPermission("lngAppro:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngLngApproDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "调度审批")
|
||||
@PostMapping(value = "/approve")
|
||||
@SaCheckPermission("lngAppro:approve")
|
||||
public R approveDD(@Valid @RequestBody ApproveDto<UpdateLngLngApproDto> dto){
|
||||
lngApproService.approveDD(dto);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@GetMapping(value="/compare")
|
||||
@ApiOperation(value = "对比LngLngAppro")
|
||||
@SaCheckPermission("lngAppro:compare")
|
||||
public R compare(@Valid @RequestParam Long orgId){
|
||||
return R.ok(lngApproService.compare(orgId));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("lngAppro:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngLngApproDto.class, ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,434 @@
|
||||
package com.xjrsoft.module.dayPlan.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.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.DataLogTools;
|
||||
import com.pictc.utils.StringUtils;
|
||||
import com.xjrsoft.common.exception.BusinessException;
|
||||
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.VoToColumnUtil;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.dayPlan.dto.LngLngDemandPageDto;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngLngApproDto;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngLngDemandDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngLngAppro;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngLngDemand;
|
||||
import com.xjrsoft.module.dayPlan.service.ILngApproService;
|
||||
import com.xjrsoft.module.dayPlan.service.ILngDemandService;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngDemandPageVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.ssssssss.magicapi.core.service.MagicAPIService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @title: LNG客户需求
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-16
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dayPlan" + "/lngDemand")
|
||||
@Api(value = "/dayPlan" + "/lngDemand",tags = "LNG客户需求代码")
|
||||
@AllArgsConstructor
|
||||
public class LngDemandController {
|
||||
|
||||
private final ILngDemandService lngDemandService;
|
||||
private final ILngApproService lngApproService;
|
||||
private final DatalogService dataService;
|
||||
private final MagicAPIService magicApiService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngLngDemand列表(分页)")
|
||||
@SaCheckPermission("lngDemand:list")
|
||||
public R page(@Valid LngLngDemandPageDto dto){
|
||||
|
||||
LambdaQueryWrapper<LngLngDemand> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.eq(ObjectUtil.isNotNull(dto.getId()),LngLngDemand::getId,dto.getId())
|
||||
.like(StrUtil.isNotBlank(dto.getStaCode()),LngLngDemand::getStaCode,dto.getStaCode())
|
||||
.like(StrUtil.isNotBlank(dto.getNoTractor()),LngLngDemand::getNoTractor,dto.getNoTractor())
|
||||
.like(StrUtil.isNotBlank(dto.getNoTrailer()),LngLngDemand::getNoTrailer,dto.getNoTrailer())
|
||||
.like(StrUtil.isNotBlank(dto.getIdNoDriver()),LngLngDemand::getIdNoDriver,dto.getIdNoDriver())
|
||||
.like(StrUtil.isNotBlank(dto.getNameDriver()),LngLngDemand::getNameDriver,dto.getNameDriver())
|
||||
.like(StrUtil.isNotBlank(dto.getPhoneDriver()),LngLngDemand::getPhoneDriver,dto.getPhoneDriver())
|
||||
.like(StrUtil.isNotBlank(dto.getIdNoEscort()),LngLngDemand::getIdNoEscort,dto.getIdNoEscort())
|
||||
.like(StrUtil.isNotBlank(dto.getNameEscort()),LngLngDemand::getNameEscort,dto.getNameEscort())
|
||||
.like(StrUtil.isNotBlank(dto.getPhoneEscort()),LngLngDemand::getPhoneEscort,dto.getPhoneEscort())
|
||||
.like(StrUtil.isNotBlank(dto.getCarrCode()),LngLngDemand::getCarrCode,dto.getCarrCode())
|
||||
.like(StrUtil.isNotBlank(dto.getKsId()),LngLngDemand::getKsId,dto.getKsId())
|
||||
.like(StrUtil.isNotBlank(dto.getAlterSign()),LngLngDemand::getAlterSign,dto.getAlterSign())
|
||||
.like(StrUtil.isNotBlank(dto.getApproCode()),LngLngDemand::getApproCode,dto.getApproCode())
|
||||
.orderByDesc(LngLngDemand::getId)
|
||||
.select(LngLngDemand.class,x -> VoToColumnUtil.fieldsToColumns(LngLngDemandPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngLngDemand> page = lngDemandService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngLngDemandPageVo> pageOutput = ConventPage.getPageOutput(page, LngLngDemandPageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngLngDemand信息")
|
||||
@SaCheckPermission("lngDemand:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
return R.ok(lngDemandService.getInfoById(id));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngLngDemand数据详细日志")
|
||||
@SaCheckPermission("lngDemand:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngLngDemandDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngLngDemand")
|
||||
@SaCheckPermission("lngDemand:add")
|
||||
public R add(@Valid @RequestBody UpdateLngLngDemandDto dto){
|
||||
dto.setId(IdUtil.getSnowflakeNextId());
|
||||
if (dto.getOrgId() == null) {
|
||||
dto.setOrgId(dto.getId());
|
||||
}
|
||||
if (dto.getVerNo() == null) {
|
||||
dto.setVerNo((byte) 1);
|
||||
}
|
||||
dto.setLastVerSign("Y");
|
||||
dto.setApproCode("WTJ");
|
||||
UpdateLngLngDemandDto res = dataService.insert(dto, new DataOperationListener<UpdateLngLngDemandDto>() {
|
||||
@Override
|
||||
public UpdateLngLngDemandDto before(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public UpdateLngLngDemandDto after(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
execAfter(content.getTableName(), "f_save", content.getIdValue(), "I");
|
||||
return content.getObj();
|
||||
}
|
||||
});
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
private void execAfter(String table, String funcName, Long id, String sign) {
|
||||
String sql = StringUtils.format("{? = call pc_{0}.{1}(?, ?)}", table, funcName);
|
||||
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 = "修改LngLngDemand")
|
||||
@SaCheckPermission("lngDemand:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngLngDemandDto dto){
|
||||
dto.setApproCode("WTJ");
|
||||
return R.ok(dataService.updateById(dto, new DataOperationListener<UpdateLngLngDemandDto>() {
|
||||
@Override
|
||||
public UpdateLngLngDemandDto before(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
LngLngDemand lngLngDemand = lngDemandService.getById(dto.getId());
|
||||
if (!"WTJ".equals(lngLngDemand.getApproCode()) && !"YBH".equals(lngLngDemand.getApproCode())) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(BusinessCode.of(10502,"保存失败:【{}】"),
|
||||
"审批状态变化,不能编辑"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public UpdateLngLngDemandDto after(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
execAfter(content.getTableName(), "f_save", content.getIdValue(), "U");
|
||||
return content.getObj();
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@PostMapping(value="/saveAndSubmit")
|
||||
@ApiOperation(value = "保存并提交LngLngDemand")
|
||||
@SaCheckPermission("lngDemand:saveAndSubmit")
|
||||
public R saveAndSubmit(@Valid @RequestBody UpdateLngLngDemandDto dto){
|
||||
if (Objects.isNull(dto.getId())) {
|
||||
dto.setId(IdUtil.getSnowflakeNextId());
|
||||
if (dto.getOrgId() == null) {
|
||||
dto.setOrgId(dto.getId());
|
||||
}
|
||||
if (dto.getVerNo() == null) {
|
||||
dto.setVerNo((byte) 1);
|
||||
}
|
||||
dto.setLastVerSign("Y");
|
||||
dto.setApproCode("SPZ");
|
||||
dto.setTimeSubmit(LocalDateTime.now());
|
||||
return R.ok(dataService.insert(dto, new DataOperationListener<UpdateLngLngDemandDto>() {
|
||||
@Override
|
||||
public UpdateLngLngDemandDto before(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public UpdateLngLngDemandDto after(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
execAfter(content.getTableName(), "f_save_submit", content.getIdValue(), "I");
|
||||
return content.getObj();
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
dto.setApproCode("SPZ");
|
||||
dto.setTimeSubmit(LocalDateTime.now());
|
||||
return R.ok(dataService.updateById(dto, new DataOperationListener<UpdateLngLngDemandDto>() {
|
||||
@Override
|
||||
public UpdateLngLngDemandDto before(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
LngLngDemand lngLngDemand = lngDemandService.getById(dto.getId());
|
||||
if (!"WTJ".equals(lngLngDemand.getApproCode()) && !"YBH".equals(lngLngDemand.getApproCode())) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(BusinessCode.of(10502,"保存失败:【{}】"),
|
||||
"审批状态变化,不能编辑"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public UpdateLngLngDemandDto after(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
execAfter(content.getTableName(), "f_save_submit", content.getIdValue(), "U");
|
||||
return content.getObj();
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value="/submit")
|
||||
@ApiOperation(value = "提交LngLngDemand")
|
||||
@SaCheckPermission("lngDemand:submit")
|
||||
public R submit(@Valid @RequestBody List<Long> ids){
|
||||
List<LngLngDemand> list = lngDemandService.list(new LambdaQueryWrapper<LngLngDemand>()
|
||||
.in(LngLngDemand::getId, ids));
|
||||
List<UpdateLngLngDemandDto> dtoList = BeanUtil.copyToList(list, UpdateLngLngDemandDto.class);
|
||||
for (UpdateLngLngDemandDto dto : dtoList) {
|
||||
dto.setApproCode("SPZ");
|
||||
dto.setTimeSubmit(LocalDateTime.now());
|
||||
}
|
||||
dataService.updateBatch(dtoList, new DataOperationListener<UpdateLngLngDemandDto>() {
|
||||
@Override
|
||||
public UpdateLngLngDemandDto before(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
LngLngDemand lngLngDemand = lngDemandService.getById(content.getIdValue());
|
||||
if (!"WTJ".equals(lngLngDemand.getApproCode()) && !"YBH".equals(lngLngDemand.getApproCode())) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(BusinessCode.of(10502,"保存失败:【{}】"),
|
||||
"审批状态变化,不能提交"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public UpdateLngLngDemandDto after(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
execAfter(content.getTableName(), "f_save_submit", content.getIdValue(), "U");
|
||||
return content.getObj();
|
||||
}
|
||||
});
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("lngDemand:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
List<LngLngDemand> list = lngDemandService.listByIds(ids);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
throw new BusinessException(BusinessCode.of(10500,"找不到此数据"));
|
||||
}
|
||||
Map<Long, LngLngDemand> map = list.stream().collect(Collectors.toMap(LngLngDemand::getId, Function.identity()));
|
||||
dataService.deleteByIds(UpdateLngLngDemandDto.class, ids, new DataOperationListener<UpdateLngLngDemandDto>() {
|
||||
@Override
|
||||
public UpdateLngLngDemandDto before(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
LngLngDemand lngLngDemand = lngDemandService.getById(content.getIdValue());
|
||||
if (!"WTJ".equals(lngLngDemand.getApproCode()) && !"YBH".equals(lngLngDemand.getApproCode())) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(BusinessCode.of(10502,"保存失败:【{}】"),
|
||||
"审批状态变化,不能删除"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngLngDemandDto after(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
LngLngDemand lngLngDemand = map.get(content.getIdValue());
|
||||
LngLngDemand preVer = lngDemandService.getOne(new LambdaQueryWrapper<LngLngDemand>()
|
||||
.eq(LngLngDemand::getOrgId, lngLngDemand.getOrgId())
|
||||
.eq(LngLngDemand::getVerNo, lngLngDemand.getVerNo() - 1));
|
||||
if (!Objects.isNull(preVer)) {
|
||||
preVer.setLastVerSign("Y");
|
||||
lngDemandService.updateById(preVer);
|
||||
}
|
||||
List<LngLngAppro> approList = lngApproService.list(new LambdaQueryWrapper<LngLngAppro>()
|
||||
.eq(LngLngAppro::getDemandId, content.getIdValue()));
|
||||
List<Long> idList = approList.stream().map(LngLngAppro::getId).collect(Collectors.toList());
|
||||
DataLogTools.deleteByIds(UpdateLngLngApproDto.class, idList,
|
||||
new DataOperationListener<UpdateLngLngApproDto>() {
|
||||
@Override
|
||||
public UpdateLngLngApproDto before(DataOperationContent<UpdateLngLngApproDto> content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngLngApproDto after(DataOperationContent<UpdateLngLngApproDto> content) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@GetMapping(value="/toChange")
|
||||
@ApiOperation(value = "变更LngLngDemand")
|
||||
@SaCheckPermission("lngDemand:toChange")
|
||||
public R toChange(@Valid @RequestParam Long id){
|
||||
return R.ok(lngDemandService.toChange(id));
|
||||
}
|
||||
|
||||
@GetMapping(value="/cancel")
|
||||
@ApiOperation(value = "取消LngLngDemand")
|
||||
@SaCheckPermission("lngDemand:cancel")
|
||||
public R cancel(@Valid @RequestParam Long id){
|
||||
LngLngDemand lngLngDemand = lngDemandService.getById(id);
|
||||
UpdateLngLngDemandDto dto = BeanUtil.toBean(lngLngDemand, UpdateLngLngDemandDto.class);
|
||||
dto.setId(null);
|
||||
dto.setVerNo((byte) (lngLngDemand.getVerNo() + (byte) 1));
|
||||
dto.setAlterSign("D");
|
||||
dto.setApproCode("WTJ");
|
||||
dto.setTimeSubmit(null);
|
||||
dto.setReply(null);
|
||||
dataService.insert(dto, new DataOperationListener<UpdateLngLngDemandDto>() {
|
||||
@Override
|
||||
public UpdateLngLngDemandDto before(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
if (!"YSP".equals(lngLngDemand.getApproCode())) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(BusinessCode.of(10502,"保存失败:【{}】"),
|
||||
"审批状态变化,不能取消"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public UpdateLngLngDemandDto after(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
lngLngDemand.setLastVerSign("N");
|
||||
lngDemandService.updateById(lngLngDemand);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@PostMapping(value="/withdraw")
|
||||
@ApiOperation(value = "撤回LngLngDemand")
|
||||
@SaCheckPermission("lngDemand:withdraw")
|
||||
public R withdraw(@Valid @RequestBody List<Long> ids){
|
||||
List<LngLngDemand> list = lngDemandService.list(new LambdaQueryWrapper<LngLngDemand>()
|
||||
.in(LngLngDemand::getId, ids));
|
||||
List<UpdateLngLngDemandDto> dtoList = BeanUtil.copyToList(list, UpdateLngLngDemandDto.class);
|
||||
for (UpdateLngLngDemandDto dto : dtoList) {
|
||||
dto.setApproCode("WTJ");
|
||||
}
|
||||
dataService.updateBatch(dtoList, new DataOperationListener<UpdateLngLngDemandDto>() {
|
||||
@Override
|
||||
public UpdateLngLngDemandDto before(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
LngLngDemand lngLngDemand = lngDemandService.getById(content.getIdValue());
|
||||
if (!"SPZ".equals(lngLngDemand.getApproCode())) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(BusinessCode.of(10502,"保存失败:【{}】"),
|
||||
"审批状态变化,不能撤回"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public UpdateLngLngDemandDto after(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
List<LngLngAppro> approList = lngApproService.list(new LambdaQueryWrapper<LngLngAppro>()
|
||||
.eq(LngLngAppro::getDemandId, content.getIdValue()));
|
||||
List<Long> idList = approList.stream().map(LngLngAppro::getId).collect(Collectors.toList());
|
||||
DataLogTools.deleteByIds(UpdateLngLngApproDto.class, idList,
|
||||
new DataOperationListener<UpdateLngLngApproDto>() {
|
||||
@Override
|
||||
public UpdateLngLngApproDto before(DataOperationContent<UpdateLngLngApproDto> content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngLngApproDto after(DataOperationContent<UpdateLngLngApproDto> content) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@GetMapping(value="/compare")
|
||||
@ApiOperation(value = "对比LngLngDemand")
|
||||
@SaCheckPermission("lngDemand:compare")
|
||||
public R compare(@Valid @RequestParam Long orgId){
|
||||
return R.ok(lngDemandService.compare(orgId));
|
||||
}
|
||||
|
||||
@PostMapping("/import")
|
||||
@ApiOperation(value = "导入")
|
||||
@SaCheckPermission("lngDemand:import")
|
||||
public R importData(@RequestParam MultipartFile file) throws IOException {
|
||||
List<LngLngDemandPageVo> savedDataList = EasyExcel.read(file.getInputStream()).head(LngLngDemandPageVo.class).sheet().doReadSync();
|
||||
List<UpdateLngLngDemandDto> list = lngDemandService.wrapperImportData(savedDataList);
|
||||
// ExcelUtil.transExcelData(savedDataList, true);
|
||||
dataService.insertBatch(list, new DataOperationListener<UpdateLngLngDemandDto>() {
|
||||
@Override
|
||||
public UpdateLngLngDemandDto before(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngLngDemandDto after(DataOperationContent<UpdateLngLngDemandDto> content) {
|
||||
execAfter(content.getTableName(), "f_save", content.getIdValue(), "I");
|
||||
return content.getObj();
|
||||
}
|
||||
});
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@GetMapping("/export")
|
||||
@ApiOperation(value = "导出")
|
||||
@SaCheckPermission("lngDemand:export")
|
||||
public ResponseEntity<byte[]> exportData(@Valid LngLngDemandPageDto dto, @RequestParam(defaultValue = "false") Boolean isTemplate) {
|
||||
List<LngLngDemandPageVo> customerList = lngDemandService.queryExportData(dto);
|
||||
ExcelUtil.transExcelData(customerList, false);
|
||||
ByteArrayOutputStream bot = new ByteArrayOutputStream();
|
||||
EasyExcel.write(bot, LngLngDemandPageVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
|
||||
ByteArrayOutputStream resultBot = ExcelUtil.renderExportRequiredHead(bot);
|
||||
|
||||
return R.fileStream(resultBot.toByteArray(), "LngDemand" + ExcelTypeEnum.XLSX.getValue());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,108 @@
|
||||
package com.xjrsoft.module.dayPlan.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
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.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.dayPlan.dto.LngLngSettleHdrPageDto;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngLngSettleHdrDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngLngSettleHdr;
|
||||
import com.xjrsoft.module.dayPlan.service.ILngSettleHdrService;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngSettleHdrPageVo;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngSettleHdrVo;
|
||||
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: LNG销售结算
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-19
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dayPlan" + "/lngSettleHdr")
|
||||
@Api(value = "/dayPlan" + "/lngSettleHdr",tags = "LNG销售结算代码")
|
||||
@AllArgsConstructor
|
||||
public class LngSettleHdrController {
|
||||
|
||||
|
||||
private final ILngSettleHdrService lngSettleHdrService;
|
||||
private final DatalogService dataService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngLngSettleHdr列表(分页)")
|
||||
@SaCheckPermission("lngSettleHdr:list")
|
||||
public R page(@Valid LngLngSettleHdrPageDto dto){
|
||||
|
||||
LambdaQueryWrapper<LngLngSettleHdr> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.eq(ObjectUtil.isNotNull(dto.getId()),LngLngSettleHdr::getId,dto.getId())
|
||||
.like(StrUtil.isNotBlank(dto.getCpCode()),LngLngSettleHdr::getCpCode,dto.getCpCode())
|
||||
.eq(ObjectUtil.isNotNull(dto.getQtySettleTon()),LngLngSettleHdr::getQtySettleTon,dto.getQtySettleTon())
|
||||
.eq(ObjectUtil.isNotNull(dto.getAmount()),LngLngSettleHdr::getAmount,dto.getAmount())
|
||||
.eq(ObjectUtil.isNotNull(dto.getComId()),LngLngSettleHdr::getComId,dto.getComId())
|
||||
.like(StrUtil.isNotBlank(dto.getSettleDesc()),LngLngSettleHdr::getSettleDesc,dto.getSettleDesc())
|
||||
.eq(ObjectUtil.isNotNull(dto.getDeptId()),LngLngSettleHdr::getDeptId,dto.getDeptId())
|
||||
.like(StrUtil.isNotBlank(dto.getApproCode()),LngLngSettleHdr::getApproCode,dto.getApproCode())
|
||||
.orderByDesc(LngLngSettleHdr::getId)
|
||||
.select(LngLngSettleHdr.class,x -> VoToColumnUtil.fieldsToColumns(LngLngSettleHdrPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngLngSettleHdr> page = lngSettleHdrService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngLngSettleHdrPageVo> pageOutput = ConventPage.getPageOutput(page, LngLngSettleHdrPageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngLngSettleHdr信息")
|
||||
@SaCheckPermission("lngSettleHdr:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngLngSettleHdr lngLngSettleHdr = lngSettleHdrService.getByIdDeep(id);
|
||||
if (lngLngSettleHdr == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngLngSettleHdr, LngLngSettleHdrVo.class));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngLngSettleHdr数据详细日志")
|
||||
@SaCheckPermission("lngSettleHdr:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngLngSettleHdrDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngLngSettleHdr")
|
||||
@SaCheckPermission("lngSettleHdr:add")
|
||||
public R add(@Valid @RequestBody UpdateLngLngSettleHdrDto dto){
|
||||
UpdateLngLngSettleHdrDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngLngSettleHdr")
|
||||
@SaCheckPermission("lngSettleHdr:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngLngSettleHdrDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("lngSettleHdr:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngLngSettleHdrDto.class, ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,354 @@
|
||||
package com.xjrsoft.module.dayPlan.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: LNG调度审批
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-16
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_lng_appro")
|
||||
@ApiModel(value = "LNG调度审批对象", description = "LNG调度审批")
|
||||
public class LngLngAppro implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键(与lng_lng_demand保持一致)
|
||||
*/
|
||||
@ApiModelProperty("主键(与lng_lng_demand保持一致)")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 客户需求计划主键
|
||||
*/
|
||||
@ApiModelProperty("客户需求计划主键")
|
||||
private Long demandId;
|
||||
|
||||
/**
|
||||
* 版本1主键(版本号为1的原始计划主键)
|
||||
*/
|
||||
@ApiModelProperty("版本1主键(版本号为1的原始计划主键)")
|
||||
private Long demandOrgId;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@ApiModelProperty("版本号")
|
||||
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("交易主体编码(天然气公司/惠贸)")
|
||||
private Long comId;
|
||||
|
||||
/**
|
||||
* 销售合同主键
|
||||
*/
|
||||
@ApiModelProperty("销售合同主键")
|
||||
private Long ksId;
|
||||
|
||||
/**
|
||||
* 接收站/气源地
|
||||
*/
|
||||
@ApiModelProperty("接收站/气源地")
|
||||
private String staCode;
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
@ApiModelProperty("供应商")
|
||||
private String suCode;
|
||||
|
||||
/**
|
||||
* 采购合同主键(隐藏,预留)
|
||||
*/
|
||||
@ApiModelProperty("采购合同主键(隐藏,预留)")
|
||||
private Long kpId;
|
||||
|
||||
/**
|
||||
* 是否自有设备(隐藏,系统处理)
|
||||
*/
|
||||
@ApiModelProperty("是否自有设备(隐藏,系统处理)")
|
||||
private String ownSign;
|
||||
|
||||
/**
|
||||
* 系统直连(Y-是,N-否)
|
||||
*/
|
||||
@ApiModelProperty("系统直连(Y-是,N-否)")
|
||||
private String onlineSign;
|
||||
|
||||
/**
|
||||
* 车头号(同日期、车头不能重复;带出承运商;车头、车挂需属于同一承运商)
|
||||
*/
|
||||
@ApiModelProperty("车头号(同日期、车头不能重复;带出承运商;车头、车挂需属于同一承运商)")
|
||||
private String noTractor;
|
||||
|
||||
/**
|
||||
* 挂车号(同日期、车挂不能重复;带出承运商;车头、车挂需属于同一承运商)
|
||||
*/
|
||||
@ApiModelProperty("挂车号(同日期、车挂不能重复;带出承运商;车头、车挂需属于同一承运商)")
|
||||
private String noTrailer;
|
||||
|
||||
/**
|
||||
* 承运商编码
|
||||
*/
|
||||
@ApiModelProperty("承运商编码")
|
||||
private String carrCode;
|
||||
|
||||
/**
|
||||
* 承运商名称
|
||||
*/
|
||||
@ApiModelProperty("承运商名称")
|
||||
private String carrName;
|
||||
|
||||
/**
|
||||
* 压力容器登记证号(只读)
|
||||
*/
|
||||
@ApiModelProperty("压力容器登记证号(只读)")
|
||||
private String noTank;
|
||||
|
||||
/**
|
||||
* 驾驶员身份证号(同日期、驾驶员不能重复)
|
||||
*/
|
||||
@ApiModelProperty("驾驶员身份证号(同日期、驾驶员不能重复)")
|
||||
private String idNoDriver;
|
||||
|
||||
/**
|
||||
* 驾驶员姓名(只读)
|
||||
*/
|
||||
@ApiModelProperty("驾驶员姓名(只读)")
|
||||
private String nameDriver;
|
||||
|
||||
/**
|
||||
* 驾驶员手机号(只读)
|
||||
*/
|
||||
@ApiModelProperty("驾驶员手机号(只读)")
|
||||
private String phoneDriver;
|
||||
|
||||
/**
|
||||
* 押运员身份证号(同日期、押运员不能重复)
|
||||
*/
|
||||
@ApiModelProperty("押运员身份证号(同日期、押运员不能重复)")
|
||||
private String idNoEscort;
|
||||
|
||||
/**
|
||||
* 押运员姓名(只读)
|
||||
*/
|
||||
@ApiModelProperty("押运员姓名(只读)")
|
||||
private String nameEscort;
|
||||
|
||||
/**
|
||||
* 押运员手机号(只读)
|
||||
*/
|
||||
@ApiModelProperty("押运员手机号(只读)")
|
||||
private String phoneEscort;
|
||||
|
||||
/**
|
||||
* 卸货站点编码(lng_b_place_lng_unload.code;隐藏)
|
||||
*/
|
||||
@ApiModelProperty("卸货站点编码(lng_b_place_lng_unload.code;隐藏)")
|
||||
private String unloadingCode;
|
||||
|
||||
/**
|
||||
* 卸货站点名称
|
||||
*/
|
||||
@ApiModelProperty("卸货站点名称")
|
||||
private String unloadingName;
|
||||
|
||||
/**
|
||||
* 预约时间段(1:第一阶段(08:00-13:59);2:第二阶段(14:00-19:59);3:第三阶段(20:00-01:59);4:第四阶段(02:00-次日07:59))
|
||||
*/
|
||||
@ApiModelProperty("预约时间段(1:第一阶段(08:00-13:59);2:第二阶段(14:00-19:59);3:第三阶段(20:00-01:59);4:第四阶段(02:00-次日07:59))")
|
||||
private String timePeriod;
|
||||
|
||||
/**
|
||||
* 预计卸货时间
|
||||
*/
|
||||
@ApiModelProperty("预计卸货时间")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Object timeUnloading;
|
||||
|
||||
/**
|
||||
* 车辆类型(可选“保供车辆”)
|
||||
*/
|
||||
@ApiModelProperty("车辆类型(可选“保供车辆”)")
|
||||
private String supplyCode;
|
||||
|
||||
/**
|
||||
* 充装量(吨)(海油模板固定为22;隐藏)
|
||||
*/
|
||||
@ApiModelProperty("充装量(吨)(海油模板固定为22;隐藏)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyTon;
|
||||
|
||||
/**
|
||||
* 月度计划总量(吨)(取自月度销售计划)
|
||||
*/
|
||||
@ApiModelProperty("月度计划总量(吨)(取自月度销售计划)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyMp;
|
||||
|
||||
/**
|
||||
* 月度累计量(吨)(汇总当月日计划量)
|
||||
*/
|
||||
@ApiModelProperty("月度累计量(吨)(汇总当月日计划量)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyMs;
|
||||
|
||||
/**
|
||||
* 采购价格(采购结算时金额倒除,结算前从LNG采购价格表中获取)
|
||||
*/
|
||||
@ApiModelProperty("采购价格(采购结算时金额倒除,结算前从LNG采购价格表中获取)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal pricePur;
|
||||
|
||||
/**
|
||||
* 采购金额(采购结算时写入,结算前自动计算)
|
||||
*/
|
||||
@ApiModelProperty("采购金额(采购结算时写入,结算前自动计算)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal amountPur;
|
||||
|
||||
/**
|
||||
* 销售价格(隐藏,从销售价格获取)
|
||||
*/
|
||||
@ApiModelProperty("销售价格(隐藏,从销售价格获取)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal priceSales;
|
||||
|
||||
/**
|
||||
* 销售金额(自动计算,扣减预付款用)
|
||||
*/
|
||||
@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("业务员所属部门编码(销售审批人所属部门编码)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long salesDeptId;
|
||||
|
||||
/**
|
||||
* 业务员编码(销售审批人编码)
|
||||
*/
|
||||
@ApiModelProperty("业务员编码(销售审批人编码)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long salesEmpId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@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,289 @@
|
||||
package com.xjrsoft.module.dayPlan.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: LNG客户需求
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-16
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_lng_demand")
|
||||
@ApiModel(value = "LNG客户需求对象", description = "LNG客户需求")
|
||||
public class LngLngDemand implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 版本1主键(版本号为1的原始计划主键,新计划为自身主键,变更时复制原记录的版本1主键)
|
||||
*/
|
||||
@ApiModelProperty("版本1主键(版本号为1的原始计划主键,新计划为自身主键,变更时复制原记录的版本1主键)")
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 版本号(初始为1,变更时+1)
|
||||
*/
|
||||
@ApiModelProperty("版本号(初始为1,变更时+1)")
|
||||
private Byte verNo;
|
||||
|
||||
/**
|
||||
* 最新版本标识(Y-是,N-否;版本1主键相同的记录中只有一个Y)
|
||||
*/
|
||||
@ApiModelProperty("最新版本标识(Y-是,N-否;版本1主键相同的记录中只有一个Y)")
|
||||
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("销售合同主键")
|
||||
private String ksId;
|
||||
|
||||
/**
|
||||
* 交易主体编码(天然气公司/惠贸)
|
||||
*/
|
||||
@ApiModelProperty("交易主体编码(天然气公司/惠贸)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long comId;
|
||||
|
||||
/**
|
||||
* 气源地
|
||||
*/
|
||||
@ApiModelProperty("气源地")
|
||||
private String staCode;
|
||||
|
||||
/**
|
||||
* 系统直连(Y-是,N-否)
|
||||
*/
|
||||
@ApiModelProperty("系统直连(Y-是,N-否)")
|
||||
private String onlineSign;
|
||||
|
||||
/**
|
||||
* 车头号(同日期、车头不能重复;带出承运商;车头、车挂需属于同一承运商)
|
||||
*/
|
||||
@ApiModelProperty("车头号(同日期、车头不能重复;带出承运商;车头、车挂需属于同一承运商)")
|
||||
private String noTractor;
|
||||
|
||||
/**
|
||||
* 挂车号(同日期、车挂不能重复;带出承运商;车头、车挂需属于同一承运商)
|
||||
*/
|
||||
@ApiModelProperty("挂车号(同日期、车挂不能重复;带出承运商;车头、车挂需属于同一承运商)")
|
||||
private String noTrailer;
|
||||
|
||||
/**
|
||||
* 承运商编码
|
||||
*/
|
||||
@ApiModelProperty("承运商编码")
|
||||
private String carrCode;
|
||||
|
||||
/**
|
||||
* 承运商名称
|
||||
*/
|
||||
@ApiModelProperty("承运商名称")
|
||||
private String carrName;
|
||||
|
||||
/**
|
||||
* 压力容器登记证号(只读)
|
||||
*/
|
||||
@ApiModelProperty("压力容器登记证号(只读)")
|
||||
private String noTank;
|
||||
|
||||
/**
|
||||
* 驾驶员身份证号(同日期、驾驶员不能重复)
|
||||
*/
|
||||
@ApiModelProperty("驾驶员身份证号(同日期、驾驶员不能重复)")
|
||||
private String idNoDriver;
|
||||
|
||||
/**
|
||||
* 驾驶员姓名(只读)
|
||||
*/
|
||||
@ApiModelProperty("驾驶员姓名(只读)")
|
||||
private String nameDriver;
|
||||
|
||||
/**
|
||||
* 驾驶员手机号(只读)
|
||||
*/
|
||||
@ApiModelProperty("驾驶员手机号(只读)")
|
||||
private String phoneDriver;
|
||||
|
||||
/**
|
||||
* 押运员身份证号(同日期、押运员不能重复)
|
||||
*/
|
||||
@ApiModelProperty("押运员身份证号(同日期、押运员不能重复)")
|
||||
private String idNoEscort;
|
||||
|
||||
/**
|
||||
* 押运员姓名(只读)
|
||||
*/
|
||||
@ApiModelProperty("押运员姓名(只读)")
|
||||
private String nameEscort;
|
||||
|
||||
/**
|
||||
* 押运员手机号(只读)
|
||||
*/
|
||||
@ApiModelProperty("押运员手机号(只读)")
|
||||
private String phoneEscort;
|
||||
|
||||
/**
|
||||
* 卸货站点编码(lng_b_place_lng_unload.code;隐藏)
|
||||
*/
|
||||
@ApiModelProperty("卸货站点编码(lng_b_place_lng_unload.code;隐藏)")
|
||||
private String unloadingCode;
|
||||
|
||||
/**
|
||||
* 卸货站点名称
|
||||
*/
|
||||
@ApiModelProperty("卸货站点名称")
|
||||
private String unloadingName;
|
||||
|
||||
/**
|
||||
* 预约时间段(1:第一阶段(08:00-13:59);2:第二阶段(14:00-19:59);3:第三阶段(20:00-01:59);4:第四阶段(02:00-次日07:59))
|
||||
*/
|
||||
@ApiModelProperty("预约时间段(1:第一阶段(08:00-13:59);2:第二阶段(14:00-19:59);3:第三阶段(20:00-01:59);4:第四阶段(02:00-次日07:59))")
|
||||
private String timePeriod;
|
||||
|
||||
/**
|
||||
* 预计卸货时间
|
||||
*/
|
||||
@ApiModelProperty("预计卸货时间")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Object timeUnloading;
|
||||
|
||||
/**
|
||||
* 车辆类型(可选“保供车辆”)
|
||||
*/
|
||||
@ApiModelProperty("车辆类型(可选“保供车辆”)")
|
||||
private String supplyCode;
|
||||
|
||||
/**
|
||||
* 充装量(吨)(海油模板固定为22;隐藏)
|
||||
*/
|
||||
@ApiModelProperty("充装量(吨)(海油模板固定为22;隐藏)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyTon;
|
||||
|
||||
/**
|
||||
* 销售价格(隐藏,从销售价格获取)
|
||||
*/
|
||||
@ApiModelProperty("销售价格(隐藏,从销售价格获取)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 销售金额(自动计算,扣减预付款用)
|
||||
*/
|
||||
@ApiModelProperty("销售金额(自动计算,扣减预付款用)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 审批状态(待提交/审批中/已审批/已驳回)
|
||||
*/
|
||||
@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;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,216 @@
|
||||
package com.xjrsoft.module.dayPlan.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: LNG销售结算
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-19
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_lng_settle")
|
||||
@ApiModel(value = "LNG销售结算对象", description = "LNG销售结算")
|
||||
public class LngLngSettle implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 结算-槽车-主表主键
|
||||
*/
|
||||
@ApiModelProperty("结算-槽车-主表主键")
|
||||
private Long settleHdrId;
|
||||
|
||||
/**
|
||||
* 销售日计划主键
|
||||
*/
|
||||
@ApiModelProperty("销售日计划主键")
|
||||
private Long salesId;
|
||||
|
||||
/**
|
||||
* 计量-槽车主键
|
||||
*/
|
||||
@ApiModelProperty("计量-槽车主键")
|
||||
private Long meaId;
|
||||
|
||||
/**
|
||||
* 计划日期(根据供应商、合同、上载点、窗口期、计划日期、审批状态汇总)
|
||||
*/
|
||||
@ApiModelProperty("计划日期(根据供应商、合同、上载点、窗口期、计划日期、审批状态汇总)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime datePlan;
|
||||
|
||||
/**
|
||||
* 结算类型(气费收入/气费成本)
|
||||
*/
|
||||
@ApiModelProperty("结算类型(气费收入/气费成本)")
|
||||
private String settleTypeCode;
|
||||
|
||||
/**
|
||||
* 供应商/客户(根据结算类型关联供应商/客户)
|
||||
*/
|
||||
@ApiModelProperty("供应商/客户(根据结算类型关联供应商/客户)")
|
||||
private String cpCode;
|
||||
|
||||
/**
|
||||
* 合同主键(根据结算类型,销售合同可从日计划获取;采购合同需要查找LNG采购合同,找到多个随便取一个,找不到提示,暂时空着)
|
||||
*/
|
||||
@ApiModelProperty("合同主键(根据结算类型,销售合同可从日计划获取;采购合同需要查找LNG采购合同,找到多个随便取一个,找不到提示,暂时空着)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 气源地
|
||||
*/
|
||||
@ApiModelProperty("气源地")
|
||||
private String staCode;
|
||||
|
||||
/**
|
||||
* 计量量(吨)
|
||||
*/
|
||||
@ApiModelProperty("计量量(吨)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyMeaTon;
|
||||
|
||||
/**
|
||||
* 计量量(吉焦)
|
||||
*/
|
||||
@ApiModelProperty("计量量(吉焦)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyMeaGj;
|
||||
|
||||
/**
|
||||
* 结算量(吨)(一次结算缺省=计量量,正常二次结算=0,清算调整=调整值)
|
||||
*/
|
||||
@ApiModelProperty("结算量(吨)(一次结算缺省=计量量,正常二次结算=0,清算调整=调整值)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtySettleTon;
|
||||
|
||||
/**
|
||||
* 结算量(吉焦)(缺省=计量量,正常二次结算=0,清算调整=调整值)
|
||||
*/
|
||||
@ApiModelProperty("结算量(吉焦)(缺省=计量量,正常二次结算=0,清算调整=调整值)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtySettleGj;
|
||||
|
||||
/**
|
||||
* 结算价格(元/吨)
|
||||
*/
|
||||
@ApiModelProperty("结算价格(元/吨)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal priceTon;
|
||||
|
||||
/**
|
||||
* 结算价格(元/吉焦)
|
||||
*/
|
||||
@ApiModelProperty("结算价格(元/吉焦)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal priceGj;
|
||||
|
||||
/**
|
||||
* 结算金额(结算量=0时,计量量*价格;结算量<>0时,结算量*价格)
|
||||
*/
|
||||
@ApiModelProperty("结算金额(结算量=0时,计量量*价格;结算量<>0时,结算量*价格)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 结算次数(第一次结算1,第二次结算2……)
|
||||
*/
|
||||
@ApiModelProperty("结算次数(第一次结算1,第二次结算2……)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Byte settleTimes;
|
||||
|
||||
/**
|
||||
* 进厂皮重时间(从计量表带)
|
||||
*/
|
||||
@ApiModelProperty("进厂皮重时间(从计量表带)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Object timeIn;
|
||||
|
||||
/**
|
||||
* 出厂毛重时间(从计量表带)
|
||||
*/
|
||||
@ApiModelProperty("出厂毛重时间(从计量表带)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Object timeOut;
|
||||
|
||||
/**
|
||||
* 优惠说明(录入)
|
||||
*/
|
||||
@ApiModelProperty("优惠说明(录入)")
|
||||
private String discDesc;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@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,183 @@
|
||||
package com.xjrsoft.module.dayPlan.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.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @title: LNG销售结算
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-19
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_lng_settle_hdr")
|
||||
@ApiModel(value = "LNG销售结算对象", description = "LNG销售结算")
|
||||
public class LngLngSettleHdr implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 交易主体编码(天然气公司/惠贸)
|
||||
*/
|
||||
@ApiModelProperty("交易主体编码(天然气公司/惠贸)")
|
||||
private Long comId;
|
||||
|
||||
/**
|
||||
* 结算月
|
||||
*/
|
||||
@ApiModelProperty("结算月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime settleMonth;
|
||||
|
||||
/**
|
||||
* 结算月开始日期
|
||||
*/
|
||||
@ApiModelProperty("结算月开始日期")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime dateFrom;
|
||||
|
||||
/**
|
||||
* 结算月结束日期
|
||||
*/
|
||||
@ApiModelProperty("结算月结束日期")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime dateTo;
|
||||
|
||||
/**
|
||||
* 结算类型(I-气费收入/C-气费成本/加工费)
|
||||
*/
|
||||
@ApiModelProperty("结算类型(I-气费收入/C-气费成本/加工费)")
|
||||
private String settleTypeCode;
|
||||
|
||||
/**
|
||||
* 供应商/客户(根据结算类型关联供应商/客户)
|
||||
*/
|
||||
@ApiModelProperty("供应商/客户(根据结算类型关联供应商/客户)")
|
||||
private String cpCode;
|
||||
|
||||
/**
|
||||
* 结算说明
|
||||
*/
|
||||
@ApiModelProperty("结算说明")
|
||||
private String settleDesc;
|
||||
|
||||
/**
|
||||
* 结算总数量(吨)(不包含二次结算的数量)
|
||||
*/
|
||||
@ApiModelProperty("结算总数量(吨)(不包含二次结算的数量)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtySettleTon;
|
||||
|
||||
/**
|
||||
* 结算总数量(吉焦)(不包含二次结算的数量)
|
||||
*/
|
||||
@ApiModelProperty("结算总数量(吉焦)(不包含二次结算的数量)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtySettleGj;
|
||||
|
||||
/**
|
||||
* 结算总金额
|
||||
*/
|
||||
@ApiModelProperty("结算总金额")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 对账单(不显示,挂对账单附件用)
|
||||
*/
|
||||
@ApiModelProperty("对账单(不显示,挂对账单附件用)")
|
||||
private String billAccount;
|
||||
|
||||
/**
|
||||
* 结算通知单(不显示,挂结算通知单附件用)
|
||||
*/
|
||||
@ApiModelProperty("结算通知单(不显示,挂结算通知单附件用)")
|
||||
private String billSettle;
|
||||
|
||||
/**
|
||||
* 审批状态(待提交/待审批/已审批/已驳回)
|
||||
*/
|
||||
@ApiModelProperty("审批状态(待提交/待审批/已审批/已驳回)")
|
||||
private String approCode;
|
||||
|
||||
/**
|
||||
* 创建人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;
|
||||
|
||||
|
||||
/**
|
||||
* lngLngSettle
|
||||
*/
|
||||
@ApiModelProperty("lngLngSettle子表")
|
||||
@TableField(exist = false)
|
||||
@EntityMapping(thisField = "id", joinField = "settleHdrId")
|
||||
private List<LngLngSettle> lngLngSettleList;
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.xjrsoft.module.dayPlan.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngLngAppro;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngApproVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-16
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngLngApproMapper extends BaseMapper<LngLngAppro> {
|
||||
|
||||
@Select("SELECT t1.*, t2.cu_sname AS cuSname, t3.k_name AS kName, t4.full_name AS staName," +
|
||||
" IFNULL(t5.short_name, t5.name) AS comName, dd_a.name AS approName" +
|
||||
" FROM lng_lng_appro t1" +
|
||||
" LEFT JOIN lng_customer t2 ON t2.cu_code = t1.cu_code" +
|
||||
" LEFT JOIN lng_contract t3 ON t3.id = t1.ks_id" +
|
||||
" LEFT JOIN lng_b_station_lng t4 ON t4.code = t1.sta_code" +
|
||||
" LEFT JOIN xjr_department t5 ON t5.id = t1.com_id" +
|
||||
" LEFT JOIN xjr_dictionary_item di_a on di_a.code = 'LNG_APPRO1'" +
|
||||
" LEFT JOIN xjr_dictionary_detail dd_a on dd_a.item_id = di_a.id AND dd_a.code = t1.appro_code" +
|
||||
" WHERE t1.id = #{id}")
|
||||
LngLngApproVo getInfoById(@Param("id") Long id);
|
||||
|
||||
@Select("SELECT t1.*, t2.cu_sname AS cuSname, t3.k_name AS kName, t4.full_name AS staName," +
|
||||
" IFNULL(t5.short_name, t5.name) AS comName, dd_a.name AS approName" +
|
||||
" FROM lng_lng_appro t1" +
|
||||
" LEFT JOIN lng_customer t2 ON t2.cu_code = t1.cu_code" +
|
||||
" LEFT JOIN lng_contract t3 ON t3.id = t1.ks_id" +
|
||||
" LEFT JOIN lng_b_station_lng t4 ON t4.code = t1.sta_code" +
|
||||
" LEFT JOIN xjr_department t5 ON t5.id = t1.com_id" +
|
||||
" LEFT JOIN xjr_dictionary_item di_a on di_a.code = 'LNG_APPRO1'" +
|
||||
" LEFT JOIN xjr_dictionary_detail dd_a on dd_a.item_id = di_a.id AND dd_a.code = t1.appro_code" +
|
||||
" WHERE t1.demand_org_id = #{orgId}")
|
||||
List<LngLngApproVo> queryByOrgId(@Param("orgId") Long orgId);
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.xjrsoft.module.dayPlan.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngContract;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngLngDemand;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngDemandPageVo;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngDemandVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-16
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngLngDemandMapper extends BaseMapper<LngLngDemand> {
|
||||
|
||||
@Select("SELECT t1.*, t2.k_name AS kName, t3.full_name AS staName," +
|
||||
" IFNULL(t4.short_name, t4.name) AS comName, dd_a.name as approName" +
|
||||
" FROM lng_lng_demand t1" +
|
||||
" LEFT JOIN lng_contract t2 ON t2.id = t1.ks_id" +
|
||||
" LEFT JOIN lng_b_station_lng t3 ON t3.code = t1.sta_code" +
|
||||
" LEFT JOIN xjr_department t4 ON t4.id = t1.com_id" +
|
||||
" 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=t1.appro_code" +
|
||||
" WHERE t1.id = #{id}")
|
||||
LngLngDemandVo getInfoById(@Param("id") Long id);
|
||||
|
||||
@Select("SELECT t1.*, t2.k_name AS kName, t3.full_name AS staName," +
|
||||
" IFNULL(t4.short_name, t4.name) AS comName, dd_a.name as approName" +
|
||||
" FROM lng_lng_demand t1" +
|
||||
" LEFT JOIN lng_contract t2 ON t2.id = t1.ks_id" +
|
||||
" LEFT JOIN lng_b_station_lng t3 ON t3.code = t1.sta_code" +
|
||||
" LEFT JOIN xjr_department t4 ON t4.id = t1.com_id" +
|
||||
" 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=t1.appro_code" +
|
||||
" WHERE t1.org_id = #{orgId}")
|
||||
List<LngLngDemandVo> queryByOrgId(@Param("orgId") Long orgId);
|
||||
|
||||
@Select("SELECT d.id, d.rule_user_id AS ruleUserId, d.create_user_id AS createUserId," +
|
||||
" d.cu_code AS cuCode, d.org_id AS orgId, d.ver_no AS verNo,"+
|
||||
" d.last_ver_sign AS lastVerSign, d.date_plan AS datePlan," +
|
||||
" (CASE d.date_plan - SYSDATE WHEN 0 THEN '当日' WHEN 1 THEN '次日'" +
|
||||
" ELSE IF(d.date_plan - SYSDATE < 0,'',d.date_plan - SYSDATE || '日后')" +
|
||||
" END) AS daysSign," +
|
||||
" sl.full_name AS staName, d.no_tractor AS noTractor, d.no_trailer AS noTrailer,"+
|
||||
" d.id_no_driver AS idNoDriver, d.name_driver AS nameDriver,"+
|
||||
" d.phone_driver AS phoneDriver, d.id_no_escort AS idNoEscort," +
|
||||
" d.name_escort AS nameEscort, d.phone_escort AS phoneEscort,"+
|
||||
" d.carr_name AS carrName, k.k_name AS kName, d.alter_sign AS alterSign," +
|
||||
" dd_iud.name AS alterName, d.reply, d.appro_code AS approCode," +
|
||||
" dd_a.name as approName" +
|
||||
" FROM lng_lng_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_lng sl ON sl.code=d.sta_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)")
|
||||
List<LngLngDemandPageVo> queryExportData(@Param("ew") QueryWrapper<LngContract> wrapper);
|
||||
}
|
||||
@ -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.LngLngSettleHdr;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-19
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngLngSettleHdrMapper extends MPJBaseMapper<LngLngSettleHdr>, BaseMapper<LngLngSettleHdr> {
|
||||
|
||||
}
|
||||
@ -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.LngLngSettle;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-19
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngLngSettleMapper extends MPJBaseMapper<LngLngSettle>, BaseMapper<LngLngSettle> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.xjrsoft.module.dayPlan.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjrsoft.module.approve.ApproveDto;
|
||||
import com.xjrsoft.module.datalog.vo.CompareResultVo;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngLngApproDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngLngAppro;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngApproVo;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-16
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface ILngApproService extends IService<LngLngAppro> {
|
||||
|
||||
LngLngApproVo getInfoById(Long id);
|
||||
|
||||
void approveDD(@Valid ApproveDto<UpdateLngLngApproDto> dto);
|
||||
|
||||
CompareResultVo<LngLngApproVo> compare(@Valid Long orgId);
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.xjrsoft.module.dayPlan.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjrsoft.module.datalog.vo.CompareResultVo;
|
||||
import com.xjrsoft.module.dayPlan.dto.LngLngDemandPageDto;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngLngDemandDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngLngDemand;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngDemandPageVo;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngDemandVo;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-16
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface ILngDemandService extends IService<LngLngDemand> {
|
||||
|
||||
LngLngDemandVo getInfoById(Long id);
|
||||
|
||||
LngLngDemandVo toChange(@Valid Long id);
|
||||
|
||||
CompareResultVo<LngLngDemandVo> compare(@Valid Long orgId);
|
||||
|
||||
List<UpdateLngLngDemandDto> wrapperImportData(List<LngLngDemandPageVo> savedDataList);
|
||||
|
||||
List<LngLngDemandPageVo> queryExportData(@Valid LngLngDemandPageDto dto);
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.dayPlan.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.module.dayPlan.entity.LngLngSettleHdr;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-19
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface ILngSettleHdrService extends MPJBaseService<LngLngSettleHdr>, MPJDeepService<LngLngSettleHdr>, MPJRelationService<LngLngSettleHdr> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
package com.xjrsoft.module.dayPlan.service.impl;
|
||||
|
||||
import cn.dev33.satoken.session.SaSession;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.api.client.util.Lists;
|
||||
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.ObjectDiffUtils;
|
||||
import com.pictc.utils.StringUtils;
|
||||
import com.xjrsoft.common.constant.GlobalConstant;
|
||||
import com.xjrsoft.common.exception.BusinessException;
|
||||
import com.xjrsoft.module.approve.ApproveDto;
|
||||
import com.xjrsoft.module.datalog.vo.CompareResultVo;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngLngApproDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngLngAppro;
|
||||
import com.xjrsoft.module.dayPlan.mapper.LngLngApproMapper;
|
||||
import com.xjrsoft.module.dayPlan.service.ILngApproService;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngApproVo;
|
||||
import com.xjrsoft.module.organization.dto.UserDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-16
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class LngApproServiceImpl extends ServiceImpl<LngLngApproMapper, LngLngAppro> implements ILngApproService {
|
||||
|
||||
private final LngLngApproMapper lngLngApproMapper;
|
||||
|
||||
@Override
|
||||
public LngLngApproVo getInfoById(Long id) {
|
||||
LngLngApproVo vo = lngLngApproMapper.getInfoById(id);
|
||||
if(vo == null) {
|
||||
throw new BusinessException(BusinessCode.of(10500,"找不到此数据"));
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void approveDD(ApproveDto<UpdateLngLngApproDto> dto) {
|
||||
List<UpdateLngLngApproDto> data = dto.getData();
|
||||
if (CollectionUtils.isEmpty(data)) {
|
||||
throw new BusinessException(BusinessCode.of(10500,"请选择审批数据"));
|
||||
}
|
||||
String sql = StringUtils.format("{? = call pc_{0}.f_approval(?, ?, ?, ?, ?)}",
|
||||
"lng_lng_appro");
|
||||
SaSession tokenSession = StpUtil.getTokenSession();
|
||||
UserDto user = tokenSession.get(GlobalConstant.LOGIN_USER_INFO_KEY, new UserDto());
|
||||
for (UpdateLngLngApproDto lngLngApproDto : data) {
|
||||
List<JdbcParam> params = Lists.newArrayList();
|
||||
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
|
||||
params.add(outParam);
|
||||
params.add(JdbcParam.ofLong(lngLngApproDto.getId()));
|
||||
params.add(JdbcParam.ofString("DD"));
|
||||
params.add(JdbcParam.ofString(dto.getResult()));
|
||||
params.add(JdbcParam.ofString(dto.getRemark()));
|
||||
params.add(JdbcParam.ofLong(user.getId()));
|
||||
JdbcTools.call(sql,params);
|
||||
String error = outParam.getStringValue();
|
||||
if (com.pictc.utils.StringUtils.isNotEmpty(error)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompareResultVo<LngLngApproVo> compare(Long orgId) {
|
||||
List<LngLngApproVo> list = lngLngApproMapper.queryByOrgId(orgId);
|
||||
if(CollectionUtils.isEmpty(list)) {
|
||||
throw new BusinessException(BusinessCode.of(10500,"找不到此数据"));
|
||||
}
|
||||
return ObjectDiffUtils.result(list);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,114 @@
|
||||
package com.xjrsoft.module.dayPlan.service.impl;
|
||||
|
||||
import cn.dev33.satoken.session.SaSession;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.pictc.enums.ApproveCodeEnum;
|
||||
import com.pictc.enums.BusinessCode;
|
||||
import com.pictc.utils.ObjectDiffUtils;
|
||||
import com.xjrsoft.common.constant.GlobalConstant;
|
||||
import com.xjrsoft.common.exception.BusinessException;
|
||||
import com.xjrsoft.module.contract.entity.LngContract;
|
||||
import com.xjrsoft.module.datalog.vo.CompareResultVo;
|
||||
import com.xjrsoft.module.dayPlan.dto.LngLngDemandPageDto;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngLngDemandDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngLngDemand;
|
||||
import com.xjrsoft.module.dayPlan.mapper.LngLngDemandMapper;
|
||||
import com.xjrsoft.module.dayPlan.service.ILngDemandService;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngDemandPageVo;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngLngDemandVo;
|
||||
import com.xjrsoft.module.organization.dto.UserDto;
|
||||
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: 2026-03-16
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class LngDemandServiceImpl extends ServiceImpl<LngLngDemandMapper, LngLngDemand> implements ILngDemandService {
|
||||
|
||||
private final LngLngDemandMapper lngLngDemandMapper;
|
||||
|
||||
@Override
|
||||
public LngLngDemandVo getInfoById(Long id) {
|
||||
LngLngDemandVo vo = lngLngDemandMapper.getInfoById(id);
|
||||
if(vo == null) {
|
||||
throw new BusinessException(BusinessCode.of(10500,"找不到此数据"));
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LngLngDemandVo toChange(Long id) {
|
||||
LngLngDemandVo vo = lngLngDemandMapper.getInfoById(id);
|
||||
if (vo == null) {
|
||||
throw new BusinessException(BusinessCode.of(10500,"找不到此数据!"));
|
||||
}
|
||||
vo.setId(null);
|
||||
vo.setVerNo((byte) (vo.getVerNo() + (byte) 1));
|
||||
vo.setLastVerSign("Y");
|
||||
vo.setAlterSign("U");
|
||||
vo.setApproCode(ApproveCodeEnum.WTJ.getCode());
|
||||
vo.setTimeSubmit(null);
|
||||
vo.setReply(null);
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompareResultVo<LngLngDemandVo> compare(Long orgId) {
|
||||
List<LngLngDemandVo> list = lngLngDemandMapper.queryByOrgId(orgId);
|
||||
if(CollectionUtils.isEmpty(list)) {
|
||||
throw new BusinessException(BusinessCode.of(10500,"找不到此数据"));
|
||||
}
|
||||
return ObjectDiffUtils.result(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UpdateLngLngDemandDto> wrapperImportData(List<LngLngDemandPageVo> savedDataList) {
|
||||
List<UpdateLngLngDemandDto> list = BeanUtil.copyToList(savedDataList, UpdateLngLngDemandDto.class);
|
||||
SaSession tokenSession = StpUtil.getTokenSession();
|
||||
UserDto user = tokenSession.get(GlobalConstant.LOGIN_USER_INFO_KEY, new UserDto());
|
||||
for (UpdateLngLngDemandDto dto : list) {
|
||||
dto.setId(IdUtil.getSnowflakeNextId());
|
||||
dto.setOrgId(dto.getId());
|
||||
dto.setVerNo((byte) 1);
|
||||
dto.setLastVerSign("Y");
|
||||
dto.setAlterSign("I");
|
||||
dto.setCuCode(user.getCuCode());
|
||||
dto.setApproCode("WTJ");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LngLngDemandPageVo> queryExportData(LngLngDemandPageDto dto) {
|
||||
QueryWrapper<LngContract> wrapper = new QueryWrapper<>();
|
||||
SaSession tokenSession = StpUtil.getTokenSession();
|
||||
UserDto user = tokenSession.get(GlobalConstant.LOGIN_USER_INFO_KEY, new UserDto());
|
||||
wrapper.eq("d.cu_code", user.getCuCode());
|
||||
wrapper.eq("d.last_ver_sign", "Y");
|
||||
wrapper.between(dto.getStartDate() != null && dto.getEndDate() != null,
|
||||
"d.date_plan", dto.getStartDate(), dto.getEndDate());
|
||||
wrapper.like(StringUtils.isNotBlank(dto.getNoTractor()), "d.no_tractor", dto.getNoTractor());
|
||||
wrapper.like(StringUtils.isNotBlank(dto.getNoTrailer()), "d.no_trailer", dto.getNoTrailer());
|
||||
wrapper.and(StringUtils.isNotBlank(dto.getKName()), r ->
|
||||
r.like("k.k_no", dto.getKName())
|
||||
.or()
|
||||
.like("k.k_name", dto.getKName()));
|
||||
wrapper.like(StringUtils.isNotBlank(dto.getStaName()), "sl.full_name", dto.getStaName());
|
||||
wrapper.like(StringUtils.isNotBlank(dto.getApproCode()), "d.appro_code", dto.getApproCode());
|
||||
List<LngLngDemandPageVo> list = lngLngDemandMapper.queryExportData(wrapper);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.xjrsoft.module.dayPlan.service.impl;
|
||||
|
||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngLngSettleHdr;
|
||||
import com.xjrsoft.module.dayPlan.mapper.LngLngSettleHdrMapper;
|
||||
import com.xjrsoft.module.dayPlan.service.ILngSettleHdrService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2026-03-19
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class LngSettleHdrServiceImpl extends MPJBaseServiceImpl<LngLngSettleHdrMapper, LngLngSettleHdr> implements ILngSettleHdrService {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user