This commit is contained in:
张秉卓
2026-03-19 18:02:09 +08:00
64 changed files with 7796 additions and 106 deletions

View File

@ -1,10 +1,6 @@
package com.xjrsoft.module.contract.controller;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import javax.validation.Valid;
@ -31,7 +27,6 @@ import com.xjrsoft.module.contract.dto.LngContractPageDto;
import com.xjrsoft.module.contract.dto.UpdateLngContractPurDto;
import com.xjrsoft.module.contract.dto.UpdateLngContractPurPngPointDto;
import com.xjrsoft.module.contract.dto.UpdateLngContractPurPngPointSalesDto;
import com.xjrsoft.module.contract.dto.UpdateLngContractSalesPngPointDto;
import com.xjrsoft.module.contract.service.IContractPurPngService;
import com.xjrsoft.module.contract.vo.LngContractPurPngPointSalesVo;
import com.xjrsoft.module.contract.vo.LngContractPurPngPointVo;

View File

@ -36,7 +36,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
/**
* @title: 国内管道气采购
* @title: 国内LNG销售
* @Author 管理员
* @Date: 2025-12-30
* @Version 1.0

View File

@ -0,0 +1,217 @@
package com.xjrsoft.module.dayPlan.controller;
import java.util.Date;
import java.util.List;
import javax.validation.Valid;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.api.client.util.Lists;
import com.pictc.datalog.DataOperationContent;
import com.pictc.datalog.DataOperationListener;
import com.pictc.enums.BusinessCode;
import com.pictc.enums.ExceptionCommonCode;
import com.pictc.jdbc.JdbcTools;
import com.pictc.jdbc.model.JdbcParam;
import com.pictc.utils.StringUtils;
import com.xjrsoft.common.exception.BusinessException;
import com.xjrsoft.common.model.result.R;
import com.xjrsoft.common.page.ConventPage;
import com.xjrsoft.common.page.PageOutput;
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.LngLngMeasurePurPageDto;
import com.xjrsoft.module.dayPlan.dto.UpdateLngLngMeasurePurDto;
import com.xjrsoft.module.dayPlan.entity.LngLngMeasurePur;
import com.xjrsoft.module.dayPlan.service.ILngMeasurePurService;
import com.xjrsoft.module.dayPlan.vo.LngLngMeasurePurPageVo;
import com.xjrsoft.module.dayPlan.vo.LngLngMeasurePurVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
/**
* @title: LNG计量(业务)
* @Author 管理员
* @Date: 2026-03-13
* @Version 1.0
*/
@RestController
@RequestMapping("/dayPlan/lngMeasurePur")
@Api(value = "/dayPlan" + "/lngMeasurePur",tags = "LNG计量(业务)代码")
@AllArgsConstructor
public class LngMeasurePurController {
private final ILngMeasurePurService lngMeasurePurService;
private final DatalogService dataService;
@GetMapping(value = "/page")
@ApiOperation(value="LngLngMeasure列表(分页)")
@SaCheckPermission("lngMeasurePur:list")
public R page(@Valid LngLngMeasurePurPageDto dto){
LambdaQueryWrapper<LngLngMeasurePur> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper
.eq(ObjectUtil.isNotNull(dto.getId()),LngLngMeasurePur::getId,dto.getId())
.like(StrUtil.isNotBlank(dto.getSuCode()),LngLngMeasurePur::getSuCode,dto.getSuCode())
.orderByDesc(LngLngMeasurePur::getId)
.select(LngLngMeasurePur.class,x -> VoToColumnUtil.fieldsToColumns(LngLngMeasurePurPageVo.class).contains(x.getProperty()));
IPage<LngLngMeasurePur> page = lngMeasurePurService.page(ConventPage.getPage(dto), queryWrapper);
PageOutput<LngLngMeasurePurPageVo> pageOutput = ConventPage.getPageOutput(page, LngLngMeasurePurPageVo.class);
return R.ok(pageOutput);
}
@GetMapping(value = "/info")
@ApiOperation(value="根据id查询LngLngMeasurePur信息")
@SaCheckPermission("lngMeasurePur:detail")
public R info(@RequestParam Long id){
LngLngMeasurePurVo LngLngMeasurePur = lngMeasurePurService.getInfoById(id);
return R.ok(LngLngMeasurePur);
}
@GetMapping(value = "/datalog")
@ApiOperation(value="根据id查询LngLngMeasurePur数据详细日志")
@SaCheckPermission("lngMeasurePur:datalog")
public R datalog(@RequestParam Long id){
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngLngMeasurePurDto.class,id);
return R.ok(logs);
}
@PostMapping(value = "/submit")
@ApiOperation(value = "确认LngLngMeasurePur")
@SaCheckPermission("lngMeasurePur:submit")
public R submit(@Valid @RequestBody List<Long> ids){
List<LngLngMeasurePur> list = lngMeasurePurService.getListByIds(ids);
for(LngLngMeasurePur temp: list) {
if(temp == null || !"JLZ".equals(temp.getStatusCode()) ) {
throw new BusinessException(BusinessCode.of(10500, "只有状态为计量中的数据才能进行确认!"));
}
temp.setCfmEmpId(SecureUtil.getCurrentUserId());
temp.setCfmEmpTime(new Date());
}
return R.ok(dataService.updateBatch(list,new DataOperationListener<LngLngMeasurePur>() {
@Override
public LngLngMeasurePur before(DataOperationContent<LngLngMeasurePur> content) {
return null;
}
@Override
public LngLngMeasurePur after(DataOperationContent<LngLngMeasurePur> content) {
String sql = StringUtils.format("{? = call pc_{0}.f_confirm(?)}",
content.getTableName());
List<JdbcParam> params = Lists.newArrayList();
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
params.add(outParam);
params.add(JdbcParam.ofLong(content.getIdValue()));
JdbcTools.call(sql,params);
String error = outParam.getStringValue();
if (StringUtils.isNotEmpty(error)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
}
return content.getObj();
}
}));
}
@PostMapping(value = "/cancel")
@ApiOperation(value = "取消确认LngLngMeasurePur")
@SaCheckPermission("lngMeasurePur:cancel")
public R cancel(@Valid @RequestBody List<Long> ids){
List<LngLngMeasurePur> list = lngMeasurePurService.getListByIds(ids);
for(LngLngMeasurePur temp: list) {
if(temp == null || !"JLWC".equals(temp.getStatusCode()) ) {
throw new BusinessException(BusinessCode.of(10500, "只有状态为计量完成的数据才能进行取消!"));
}
temp.setCfmCuUserId(null);
temp.setCfmCuUserTime(null);
temp.setCfmEmpId(null);
temp.setCfmEmpTime(null);
}
return R.ok(dataService.updateBatch(list,new DataOperationListener<LngLngMeasurePur>() {
@Override
public LngLngMeasurePur before(DataOperationContent<LngLngMeasurePur> content) {
return null;
}
@Override
public LngLngMeasurePur after(DataOperationContent<LngLngMeasurePur> content) {
String sql = StringUtils.format("{? = call pc_{0}.f_confirm_x(?)}",
content.getTableName());
List<JdbcParam> params = Lists.newArrayList();
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
params.add(outParam);
params.add(JdbcParam.ofLong(content.getIdValue()));
JdbcTools.call(sql,params);
String error = outParam.getStringValue();
if (StringUtils.isNotEmpty(error)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
}
return content.getObj();
}
}));
}
@PostMapping(value = "/reject")
@ApiOperation(value = "驳回LngLngMeasurePur")
@SaCheckPermission("lngMeasurePur:reject")
public R reject(@Valid @RequestBody UpdateLngLngMeasurePurDto params){
List<LngLngMeasurePur> list = lngMeasurePurService.getListByIds(params.getIds());
for(LngLngMeasurePur temp: list) {
if(temp != null && "JLZ".equals(temp.getStatusCode()) && temp.getCfmCuUserId() != null) {
temp.setCfmCuUserId(null);
temp.setCfmCuUserTime(null);
temp.setRejNote(params.getRejNote());
}else {
throw new BusinessException(BusinessCode.of(10500, "只有状态为计量中且客户已确认的数据才能进行驳回!"));
}
}
return R.ok(dataService.updateBatch(list,new DataOperationListener<LngLngMeasurePur>() {
@Override
public LngLngMeasurePur before(DataOperationContent<LngLngMeasurePur> content) {
return null;
}
@Override
public LngLngMeasurePur after(DataOperationContent<LngLngMeasurePur> content) {
return null;
}
}));
}
@DeleteMapping
@ApiOperation(value = "删除")
@SaCheckPermission("lngMeasurePur:delete")
public R delete(@Valid @RequestBody List<Long> ids){
return R.ok(dataService.deleteByIds(UpdateLngLngMeasurePurDto.class, ids));
}
}

View File

@ -0,0 +1,262 @@
package com.xjrsoft.module.dayPlan.controller;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import javax.validation.Valid;
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 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.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.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.LngLngMeasurePageDto;
import com.xjrsoft.module.dayPlan.dto.UpdateLngLngMeasureDto;
import com.xjrsoft.module.dayPlan.entity.LngLngMeasure;
import com.xjrsoft.module.dayPlan.service.ILngMeasureSalesService;
import com.xjrsoft.module.dayPlan.vo.LngLngMeasurePageVo;
import com.xjrsoft.module.dayPlan.vo.LngLngMeasureVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
/**
* @title: LNG计量(客户)
* @Author 管理员
* @Date: 2026-03-13
* @Version 1.0
*/
@RestController
@RequestMapping("/dayPlan/lngMeasureSales")
@Api(value = "/dayPlan" + "/lngMeasureSales",tags = "LNG计量(客户)代码")
@AllArgsConstructor
public class LngMeasureSalesController {
private final ILngMeasureSalesService lngMeasureService;
private final DatalogService dataService;
@GetMapping(value = "/page")
@ApiOperation(value="LngLngMeasure列表(分页)")
@SaCheckPermission("lngMeasureSales:list")
public R page(@Valid LngLngMeasurePageDto dto){
LambdaQueryWrapper<LngLngMeasure> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper
.eq(ObjectUtil.isNotNull(dto.getId()),LngLngMeasure::getId,dto.getId())
//.between(ObjectUtil.isNotNull(dto.getDatePlanStart()) && ObjectUtil.isNotNull(dto.getDatePlanEnd()),LngLngMeasure::getDatePlan,dto.getDatePlanStart(),dto.getDatePlanEnd())
.like(StrUtil.isNotBlank(dto.getStaCode()),LngLngMeasure::getStaCode,dto.getStaCode())
.eq(ObjectUtil.isNotNull(dto.getRuleUserId()),LngLngMeasure::getRuleUserId,dto.getRuleUserId())
.eq(ObjectUtil.isNotNull(dto.getDeptId()),LngLngMeasure::getDeptId,dto.getDeptId())
.eq(ObjectUtil.isNotNull(dto.getQtyTonLoading()),LngLngMeasure::getQtyTonLoading,dto.getQtyTonLoading())
.like(StrUtil.isNotBlank(dto.getXCode()),LngLngMeasure::getXCode,dto.getXCode())
.eq(ObjectUtil.isNotNull(dto.getTenantId()),LngLngMeasure::getTenantId,dto.getTenantId())
.eq(ObjectUtil.isNotNull(dto.getCreateUserId()),LngLngMeasure::getCreateUserId,dto.getCreateUserId())
.eq(ObjectUtil.isNotNull(dto.getCfmCuUserId()),LngLngMeasure::getCfmCuUserId,dto.getCfmCuUserId())
.eq(ObjectUtil.isNotNull(dto.getCfmEmpId()),LngLngMeasure::getCfmEmpId,dto.getCfmEmpId())
.like(StrUtil.isNotBlank(dto.getSuCode()),LngLngMeasure::getSuCode,dto.getSuCode())
.eq(ObjectUtil.isNotNull(dto.getKsId()),LngLngMeasure::getKsId,dto.getKsId())
.like(StrUtil.isNotBlank(dto.getRejNote()),LngLngMeasure::getRejNote,dto.getRejNote())
.orderByDesc(LngLngMeasure::getId)
.select(LngLngMeasure.class,x -> VoToColumnUtil.fieldsToColumns(LngLngMeasurePageVo.class).contains(x.getProperty()));
IPage<LngLngMeasure> page = lngMeasureService.page(ConventPage.getPage(dto), queryWrapper);
PageOutput<LngLngMeasurePageVo> pageOutput = ConventPage.getPageOutput(page, LngLngMeasurePageVo.class);
return R.ok(pageOutput);
}
@GetMapping(value = "/info")
@ApiOperation(value="根据id查询LngPngMeasureSalesPur信息")
@SaCheckPermission("lngMeasureSales:detail")
public R info(@RequestParam Long id){
LngLngMeasureVo lngPngMeasureSalesPur = lngMeasureService.getInfoById(id);
return R.ok(lngPngMeasureSalesPur);
}
@GetMapping(value = "/datalog")
@ApiOperation(value="根据id查询LngPngMeasureSalesPur数据详细日志")
@SaCheckPermission("lngMeasureSales:datalog")
public R datalog(@RequestParam Long id){
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngLngMeasureDto.class,id);
return R.ok(logs);
}
@PostMapping
@ApiOperation(value = "保存LngPngMeasureSalesPur")
@SaCheckPermission("lngMeasureSales:save")
public R save(@Valid @RequestBody List<UpdateLngLngMeasureDto> dtoList){
List<Long> ids = dtoList.stream().map(UpdateLngLngMeasureDto::getId).collect(Collectors.toList());
List<LngLngMeasure> list = lngMeasureService.getListByIds(ids);
for(LngLngMeasure temp: list) {
if(temp != null && "JLZ".equals(temp.getStatusCode()) && temp.getCfmCuUserId() == null && temp.getDataSource() == null ) {
}else {
throw new BusinessException(BusinessCode.of(10500, "只有状态为计量中、且客户未确认且来源不为空的数据才能进行保存!"));
}
}
return R.ok(dataService.insertBatch(dtoList,new DataOperationListener<UpdateLngLngMeasureDto>() {
@Override
public UpdateLngLngMeasureDto before(DataOperationContent<UpdateLngLngMeasureDto> content) {
return null;
}
@Override
public UpdateLngLngMeasureDto after(DataOperationContent<UpdateLngLngMeasureDto> content) {
String sql = StringUtils.format("{? = call pc_{0}.f_save(?,?)}",
content.getTableName());
List<JdbcParam> params = Lists.newArrayList();
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
params.add(outParam);
params.add(JdbcParam.ofLong(content.getIdValue()));
if(ids.contains(content.getIdValue())){
params.add(JdbcParam.ofString("U"));
}else {
params.add(JdbcParam.ofString("I"));
}
JdbcTools.call(sql,params);
String error = outParam.getStringValue();
if (StringUtils.isNotEmpty(error)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
}
return content.getObj();
}
}));
}
@PutMapping
@ApiOperation(value = "保存并确认LngPngMeasureSalesPur")
@SaCheckPermission("lngMeasureSales:submit")
public R submit(@Valid @RequestBody List<UpdateLngLngMeasureDto> dtoList){
List<Long> ids = dtoList.stream().map(UpdateLngLngMeasureDto::getId).collect(Collectors.toList());
List<LngLngMeasure> list = lngMeasureService.getListByIds(ids);
for(LngLngMeasure temp: list) {
if(temp != null && "JLZ".equals(temp.getStatusCode()) && temp.getCfmCuUserId() == null) {
}else {
throw new BusinessException(BusinessCode.of(10500, "只有状态为计量中且客户未确认的数据才能进行确认!"));
}
}
for(UpdateLngLngMeasureDto dto: dtoList) {
dto.setCfmCuUserId(SecureUtil.getCurrentUserId());
dto.setCfmCuUserTime(new Date());
}
return R.ok(dataService.insertBatch(dtoList,new DataOperationListener<UpdateLngLngMeasureDto>() {
@Override
public UpdateLngLngMeasureDto before(DataOperationContent<UpdateLngLngMeasureDto> content) {
return null;
}
@Override
public UpdateLngLngMeasureDto after(DataOperationContent<UpdateLngLngMeasureDto> content) {
String sql = StringUtils.format("{? = call pc_{0}.f_save(?,?)}",
content.getTableName());
List<JdbcParam> params = Lists.newArrayList();
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
params.add(outParam);
params.add(JdbcParam.ofLong(content.getIdValue()));
params.add(JdbcParam.ofString("U"));
JdbcTools.call(sql,params);
String error = outParam.getStringValue();
if (StringUtils.isNotEmpty(error)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
}
return content.getObj();
}
}));
}
@PostMapping(value = "/cancel")
@ApiOperation(value = "取消确认LngPngMeasureSalesPur")
@SaCheckPermission("lngMeasureSales:cancel")
public R cancel(@Valid @RequestBody List<UpdateLngLngMeasureDto> dtoList){
List<Long> ids = dtoList.stream().map(UpdateLngLngMeasureDto::getId).collect(Collectors.toList());
List<LngLngMeasure> list = lngMeasureService.getListByIds(ids);
for(LngLngMeasure temp: list) {
if(temp != null && "JLZ".equals(temp.getStatusCode()) && temp.getCfmCuUserId() != null) {
}else {
throw new BusinessException(BusinessCode.of(10500, "只有状态为计量中且客户已确认的数据才能进行取消确认!"));
}
}
for(UpdateLngLngMeasureDto dto: dtoList) {
dto.setCfmCuUserId(null);
dto.setCfmCuUserTime(null);
}
return R.ok(dataService.insertBatch(dtoList,new DataOperationListener<UpdateLngLngMeasureDto>() {
@Override
public UpdateLngLngMeasureDto before(DataOperationContent<UpdateLngLngMeasureDto> content) {
return null;
}
@Override
public UpdateLngLngMeasureDto after(DataOperationContent<UpdateLngLngMeasureDto> content) {
return null;
}
}));
}
@DeleteMapping
@ApiOperation(value = "删除")
@SaCheckPermission("lngMeasureSales:delete")
public R delete(@Valid @RequestBody List<Long> ids){
List<LngLngMeasure> list = lngMeasureService.getListByIds(ids);
for(LngLngMeasure temp: list) {
if(temp != null && "JLZ".equals(temp.getStatusCode()) && temp.getDataSource() == null) {
}else {
throw new BusinessException(BusinessCode.of(10500, "只有状态是计量中的手工录入记录可以删除!"));
}
}
return R.ok(dataService.deleteByIds(UpdateLngLngMeasureDto.class, ids,new DataOperationListener<UpdateLngLngMeasureDto>() {
@Override
public UpdateLngLngMeasureDto before(DataOperationContent<UpdateLngLngMeasureDto> content) {
return null;
}
@Override
public UpdateLngLngMeasureDto after(DataOperationContent<UpdateLngLngMeasureDto> content) {
return null;
}
}));
}
}

View File

@ -0,0 +1,219 @@
package com.xjrsoft.module.dayPlan.controller;
import java.util.Date;
import java.util.List;
import javax.validation.Valid;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.api.client.util.Lists;
import com.pictc.datalog.DataOperationContent;
import com.pictc.datalog.DataOperationListener;
import com.pictc.enums.BusinessCode;
import com.pictc.enums.ExceptionCommonCode;
import com.pictc.jdbc.JdbcTools;
import com.pictc.jdbc.model.JdbcParam;
import com.pictc.utils.StringUtils;
import com.xjrsoft.common.exception.BusinessException;
import com.xjrsoft.common.model.result.R;
import com.xjrsoft.common.page.ConventPage;
import com.xjrsoft.common.page.PageOutput;
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.LngPngMeasurePurPageDto;
import com.xjrsoft.module.dayPlan.dto.UpdateLngPngMeasurePurDto;
import com.xjrsoft.module.dayPlan.entity.LngPngMeasurePur;
import com.xjrsoft.module.dayPlan.service.IPngMeasurePurService;
import com.xjrsoft.module.dayPlan.vo.LngPngMeasurePurPageVo;
import com.xjrsoft.module.dayPlan.vo.LngPngMeasurePurVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
/**
* @title: 管道气计量(内部)
* @Author 管理员
* @Date: 2026-03-12
* @Version 1.0
*/
@RestController
@RequestMapping("/dayPlan/pngMeasurePur")
@Api(value = "/dayPlan" + "/pngMeasurePur",tags = "管道气计量(内部)代码")
@AllArgsConstructor
public class PngMeasurePurController {
private final IPngMeasurePurService pngMeasurePurService;
private final DatalogService dataService;
@GetMapping(value = "/page")
@ApiOperation(value="LngPngMeasurePur列表(分页)")
@SaCheckPermission("pngMeasurePur:list")
public R page(@Valid LngPngMeasurePurPageDto dto){
LambdaQueryWrapper<LngPngMeasurePur> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper
.eq(ObjectUtil.isNotNull(dto.getId()),LngPngMeasurePur::getId,dto.getId())
//.between(ObjectUtil.isNotNull(dto.getDatePlanStart()) && ObjectUtil.isNotNull(dto.getDatePlanEnd()),LngPngMeasurePur::getDatePlan,dto.getDatePlanStart(),dto.getDatePlanEnd())
//.between(ObjectUtil.isNotNull(dto.getDateMeaStart()) && ObjectUtil.isNotNull(dto.getDateMeaEnd()),LngPngMeasurePur::getDateMea,dto.getDateMeaStart(),dto.getDateMeaEnd())
//.like(StrUtil.isNotBlank(dto.getCuCode()),LngPngMeasurePur::getCuCode,dto.getCuCode())
.like(StrUtil.isNotBlank(dto.getPointDelyCode()),LngPngMeasurePur::getPointDelyCode,dto.getPointDelyCode())
.like(StrUtil.isNotBlank(dto.getSuCode()),LngPngMeasurePur::getSuCode,dto.getSuCode())
.like(StrUtil.isNotBlank(dto.getPointUpCode()),LngPngMeasurePur::getPointUpCode,dto.getPointUpCode())
.orderByDesc(LngPngMeasurePur::getId)
.select(LngPngMeasurePur.class,x -> VoToColumnUtil.fieldsToColumns(LngPngMeasurePurPageVo.class).contains(x.getProperty()));
IPage<LngPngMeasurePur> page = pngMeasurePurService.page(ConventPage.getPage(dto), queryWrapper);
PageOutput<LngPngMeasurePurPageVo> pageOutput = ConventPage.getPageOutput(page, LngPngMeasurePurPageVo.class);
return R.ok(pageOutput);
}
@GetMapping(value = "/info")
@ApiOperation(value="根据id查询LngPngMeasurePur信息")
@SaCheckPermission("pngMeasurePur:detail")
public R info(@RequestParam Long id){
LngPngMeasurePurVo LngPngMeasurePur = pngMeasurePurService.getInfoById(id);
return R.ok(LngPngMeasurePur);
}
@GetMapping(value = "/datalog")
@ApiOperation(value="根据id查询LngPngMeasurePur数据详细日志")
@SaCheckPermission("pngMeasurePur:datalog")
public R datalog(@RequestParam Long id){
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngPngMeasurePurDto.class,id);
return R.ok(logs);
}
@PostMapping(value = "/submit")
@ApiOperation(value = "确认LngPngMeasurePur")
@SaCheckPermission("pngMeasurePur:submit")
public R submit(@Valid @RequestBody List<Long> ids){
List<LngPngMeasurePur> list = pngMeasurePurService.getListByIds(ids);
for(LngPngMeasurePur temp: list) {
if(temp == null || !"JLZ".equals(temp.getStatusCode()) ) {
throw new BusinessException(BusinessCode.of(10500, "只有状态为计量中的数据才能进行确认!"));
}
temp.setCfmEmpId(SecureUtil.getCurrentUserId());
temp.setCfmEmpTime(new Date());
}
return R.ok(dataService.updateBatch(list,new DataOperationListener<LngPngMeasurePur>() {
@Override
public LngPngMeasurePur before(DataOperationContent<LngPngMeasurePur> content) {
return null;
}
@Override
public LngPngMeasurePur after(DataOperationContent<LngPngMeasurePur> content) {
String sql = StringUtils.format("{? = call pc_{0}.f_confirm(?)}",
content.getTableName());
List<JdbcParam> params = Lists.newArrayList();
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
params.add(outParam);
params.add(JdbcParam.ofLong(content.getIdValue()));
JdbcTools.call(sql,params);
String error = outParam.getStringValue();
if (StringUtils.isNotEmpty(error)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
}
return content.getObj();
}
}));
}
@PostMapping(value = "/cancel")
@ApiOperation(value = "取消确认LngPngMeasurePur")
@SaCheckPermission("pngMeasurePur:cancel")
public R cancel(@Valid @RequestBody List<Long> ids){
List<LngPngMeasurePur> list = pngMeasurePurService.getListByIds(ids);
for(LngPngMeasurePur temp: list) {
if(temp == null || !"JLWC".equals(temp.getStatusCode()) ) {
throw new BusinessException(BusinessCode.of(10500, "只有状态为计量完成的数据才能进行取消!"));
}
temp.setCfmCuUserId(null);
temp.setCfmCuUserTime(null);
temp.setCfmEmpId(null);
temp.setCfmEmpTime(null);
}
return R.ok(dataService.updateBatch(list,new DataOperationListener<LngPngMeasurePur>() {
@Override
public LngPngMeasurePur before(DataOperationContent<LngPngMeasurePur> content) {
return null;
}
@Override
public LngPngMeasurePur after(DataOperationContent<LngPngMeasurePur> content) {
String sql = StringUtils.format("{? = call pc_{0}.f_confirm_x(?)}",
content.getTableName());
List<JdbcParam> params = Lists.newArrayList();
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
params.add(outParam);
params.add(JdbcParam.ofLong(content.getIdValue()));
JdbcTools.call(sql,params);
String error = outParam.getStringValue();
if (StringUtils.isNotEmpty(error)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
}
return content.getObj();
}
}));
}
@PostMapping(value = "/reject")
@ApiOperation(value = "驳回LngPngMeasurePur")
@SaCheckPermission("pngMeasurePur:reject")
public R reject(@Valid @RequestBody UpdateLngPngMeasurePurDto params){
List<LngPngMeasurePur> list = pngMeasurePurService.getListByIds(params.getIds());
for(LngPngMeasurePur temp: list) {
if(temp != null && "JLZ".equals(temp.getStatusCode()) && temp.getCfmCuUserId() != null) {
temp.setCfmCuUserId(null);
temp.setCfmCuUserTime(null);
temp.setRejNote(params.getRejNote());
}else {
throw new BusinessException(BusinessCode.of(10500, "只有状态为计量中且客户已确认的数据才能进行驳回!"));
}
}
return R.ok(dataService.updateBatch(list,new DataOperationListener<LngPngMeasurePur>() {
@Override
public LngPngMeasurePur before(DataOperationContent<LngPngMeasurePur> content) {
return null;
}
@Override
public LngPngMeasurePur after(DataOperationContent<LngPngMeasurePur> content) {
return null;
}
}));
}
@DeleteMapping
@ApiOperation(value = "删除")
@SaCheckPermission("pngMeasurePur:delete")
public R delete(@Valid @RequestBody List<Long> ids){
return R.ok(dataService.deleteByIds(UpdateLngPngMeasurePurDto.class, ids));
}
}

View File

@ -5,6 +5,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import javax.validation.Valid;
@ -23,8 +24,15 @@ 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.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;
@ -35,6 +43,7 @@ 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.UpdateLngPngMeasureSalesPurDto;
import com.xjrsoft.module.dayPlan.entity.LngPngMeasurePur;
import com.xjrsoft.module.dayPlan.entity.LngPngMeasureSalesPur;
import com.xjrsoft.module.dayPlan.service.IPngMeasureSalesPurService;
import com.xjrsoft.module.dayPlan.vo.LngPngMeasureSalesPurPageVo;
@ -112,7 +121,15 @@ public class PngMeasureSalesPurController {
@ApiOperation(value = "保存LngPngMeasureSalesPur")
@SaCheckPermission("pngMeasureSalesPur:save")
public R save(@Valid @RequestBody List<UpdateLngPngMeasureSalesPurDto> dtoList){
List<Long> ids = dtoList.stream().map(UpdateLngPngMeasureSalesPurDto::getId).collect(Collectors.toList());
List<LngPngMeasureSalesPur> list = pngMeasureSalesPurService.getListByIds(ids);
for(LngPngMeasureSalesPur temp: list) {
if(temp != null && "JLZ".equals(temp.getStatusCode()) && temp.getCfmCuUserId() == null && temp.getDataSource() == null ) {
}else {
throw new BusinessException(BusinessCode.of(10500, "只有状态为计量中、且客户未确认且来源不为空的数据才能进行保存!"));
}
}
return R.ok(dataService.insertBatch(dtoList,new DataOperationListener<UpdateLngPngMeasureSalesPurDto>() {
@Override
@ -122,8 +139,24 @@ public class PngMeasureSalesPurController {
@Override
public UpdateLngPngMeasureSalesPurDto after(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
return null;
String sql = StringUtils.format("{? = call pc_{0}.f_save(?,?)}",
content.getTableName());
List<JdbcParam> params = Lists.newArrayList();
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
params.add(outParam);
params.add(JdbcParam.ofLong(content.getIdValue()));
if(ids.contains(content.getIdValue())){
params.add(JdbcParam.ofString("U"));
}else {
params.add(JdbcParam.ofString("I"));
}
JdbcTools.call(sql,params);
String error = outParam.getStringValue();
if (StringUtils.isNotEmpty(error)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
}
return content.getObj();
}
}));
}
@ -132,6 +165,15 @@ public class PngMeasureSalesPurController {
@ApiOperation(value = "保存并确认LngPngMeasureSalesPur")
@SaCheckPermission("pngMeasureSalesPur:submit")
public R submit(@Valid @RequestBody List<UpdateLngPngMeasureSalesPurDto> dtoList){
List<Long> ids = dtoList.stream().map(UpdateLngPngMeasureSalesPurDto::getId).collect(Collectors.toList());
List<LngPngMeasureSalesPur> list = pngMeasureSalesPurService.getListByIds(ids);
for(LngPngMeasureSalesPur temp: list) {
if(temp != null && "JLZ".equals(temp.getStatusCode()) && temp.getCfmCuUserId() == null) {
}else {
throw new BusinessException(BusinessCode.of(10500, "只有状态为计量中且客户未确认的数据才能进行确认!"));
}
}
for(UpdateLngPngMeasureSalesPurDto dto: dtoList) {
dto.setCfmCuUserId(SecureUtil.getCurrentUserId());
dto.setCfmCuUserTime(new Date());
@ -145,8 +187,19 @@ public class PngMeasureSalesPurController {
@Override
public UpdateLngPngMeasureSalesPurDto after(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
return null;
String sql = StringUtils.format("{? = call pc_{0}.f_save(?,?)}",
content.getTableName());
List<JdbcParam> params = Lists.newArrayList();
JdbcParam outParam = JdbcParam.ofString(null).setOut(true);
params.add(outParam);
params.add(JdbcParam.ofLong(content.getIdValue()));
params.add(JdbcParam.ofString("U"));
JdbcTools.call(sql,params);
String error = outParam.getStringValue();
if (StringUtils.isNotEmpty(error)) {
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error));
}
return content.getObj();
}
}));
}
@ -155,11 +208,18 @@ public class PngMeasureSalesPurController {
@ApiOperation(value = "取消确认LngPngMeasureSalesPur")
@SaCheckPermission("pngMeasureSalesPur:cancel")
public R cancel(@Valid @RequestBody List<UpdateLngPngMeasureSalesPurDto> dtoList){
List<Long> ids = dtoList.stream().map(UpdateLngPngMeasureSalesPurDto::getId).collect(Collectors.toList());
List<LngPngMeasureSalesPur> list = pngMeasureSalesPurService.getListByIds(ids);
for(LngPngMeasureSalesPur temp: list) {
if(temp != null && "JLZ".equals(temp.getStatusCode()) && temp.getCfmCuUserId() != null) {
}else {
throw new BusinessException(BusinessCode.of(10500, "只有状态为计量中且客户已确认的数据才能进行取消确认!"));
}
}
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>() {
@ -176,58 +236,32 @@ public class PngMeasureSalesPurController {
}));
}
@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 = "删除")
@SaCheckPermission("pngMeasureSalesPur:delete")
public R delete(@Valid @RequestBody List<Long> ids){
return R.ok(dataService.deleteByIds(UpdateLngPngMeasureSalesPurDto.class, ids));
List<LngPngMeasureSalesPur> list = pngMeasureSalesPurService.getListByIds(ids);
for(LngPngMeasureSalesPur temp: list) {
if(temp != null && "JLZ".equals(temp.getStatusCode()) && temp.getDataSource() == null) {
}else {
throw new BusinessException(BusinessCode.of(10500, "只有状态是计量中的手工录入记录可以删除!"));
}
}
return R.ok(dataService.deleteByIds(UpdateLngPngMeasureSalesPurDto.class, ids,new DataOperationListener<UpdateLngPngMeasureSalesPurDto>() {
@Override
public UpdateLngPngMeasureSalesPurDto before(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
return null;
}
@Override
public UpdateLngPngMeasureSalesPurDto after(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
return null;
}
}));
}
@PostMapping("/import")
@ApiOperation(value = "导入")
@SaCheckPermission("pngMeasureSalesPur:import")
public R importData(@RequestParam MultipartFile file) throws IOException {
List<LngPngMeasureSalesPurPageVo> savedDataList = EasyExcel.read(file.getInputStream()).head(LngPngMeasureSalesPurPageVo.class).sheet().doReadSync();
ExcelUtil.transExcelData(savedDataList, true);
dataService.insertBatch(BeanUtil.copyToList(savedDataList,UpdateLngPngMeasureSalesPurDto.class));
return R.ok();
}
@GetMapping("/export")
@ApiOperation(value = "导出")
@SaCheckPermission("pngMeasureSalesPur:export")
public ResponseEntity<byte[]> exportData(@Valid LngPngMeasureSalesPurPageDto dto, @RequestParam(defaultValue = "false") Boolean isTemplate) {
List<LngPngMeasureSalesPurPageVo> customerList = isTemplate != null && isTemplate ? new ArrayList<>() : ((PageOutput<LngPngMeasureSalesPurPageVo>) page(dto).getData()).getList();
ExcelUtil.transExcelData(customerList, false);
ByteArrayOutputStream bot = new ByteArrayOutputStream();
EasyExcel.write(bot, LngPngMeasureSalesPurPageVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
ByteArrayOutputStream resultBot = ExcelUtil.renderExportRequiredHead(bot);
return R.fileStream(resultBot.toByteArray(), "PngMeasureSalesPur" + ExcelTypeEnum.XLSX.getValue());
}
}

View File

@ -0,0 +1,278 @@
package com.xjrsoft.module.dayPlan.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @title: LNG计量(客户)
* @Author 管理员
* @Date: 2026-03-13
* @Version 1.0
*/
@Data
@TableName("lng_lng_measure")
@ApiModel(value = "LNG计量(客户)对象", description = "LNG计量(客户)")
public class LngLngMeasure implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
@TableId
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long id;
/**
* 销售日计划主键
*/
@ApiModelProperty("销售日计划主键")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long salesId;
/**
* 计划日期
*/
@ApiModelProperty("计划日期")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime datePlan;
/**
* 客户
*/
@ApiModelProperty("客户")
private String cuCode;
/**
* 交易主体编码(天然气公司/惠贸)
*/
@ApiModelProperty("交易主体编码(天然气公司/惠贸)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long comId;
/**
* 销售合同主键(窗口期可空)
*/
@ApiModelProperty("销售合同主键(窗口期可空)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long ksId;
/**
* 气源地
*/
@ApiModelProperty("气源地")
private String staCode;
/**
* 供应商
*/
@ApiModelProperty("供应商")
private String suCode;
/**
* 采购合同主键
*/
@ApiModelProperty("采购合同主键")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long kpId;
/**
* 吨/吉焦(计量时写入)
*/
@ApiModelProperty("吨/吉焦(计量时写入)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal rateTonGj;
/**
* 装车量(吨)(隐藏,预留)
*/
@ApiModelProperty("装车量(吨)(隐藏,预留)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyTonLoading;
/**
* 卸车量(吨)(隐藏,预留)
*/
@ApiModelProperty("卸车量(吨)(隐藏,预留)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyTonUnloading;
/**
* 采购计量量(吨)(隐藏,预留)
*/
@ApiModelProperty("采购计量量(吨)(隐藏,预留)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaTonPur;
/**
* 采购计量量(吉焦)(隐藏,预留)
*/
@ApiModelProperty("采购计量量(吉焦)(隐藏,预留)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaGjPur;
/**
* 采购计量量(方)(隐藏,预留)
*/
@ApiModelProperty("采购计量量(方)(隐藏,预留)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaM3Pur;
/**
* 销售计量量(吨)
*/
@ApiModelProperty("销售计量量(吨)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaTonSales;
/**
* 销售计量量(吉焦)
*/
@ApiModelProperty("销售计量量(吉焦)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaGjSales;
/**
* 销售计量量(方)
*/
@ApiModelProperty("销售计量量(方)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaM3Sales;
/**
* 进厂皮重时间/装车时间
*/
@ApiModelProperty("进厂皮重时间/装车时间")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Object timeIn;
/**
* 出厂毛重时间/卸车时间
*/
@ApiModelProperty("出厂毛重时间/卸车时间")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Object timeOut;
/**
* 取消/脱装(QX-取消TZ-脱装,空-正常计量)
*/
@ApiModelProperty("取消/脱装(QX-取消TZ-脱装,空-正常计量)")
private String xCode;
/**
* 客户确认人
*/
@ApiModelProperty("客户确认人")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long cfmCuUserId;
/**
* 客户确认时间
*/
@ApiModelProperty("客户确认时间")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Object cfmCuUserTime;
/**
* 内部确认人
*/
@ApiModelProperty("内部确认人")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long cfmEmpId;
/**
* 内部确认时间
*/
@ApiModelProperty("内部确认时间")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Object cfmEmpTime;
/**
* 驳回意见
*/
@ApiModelProperty("驳回意见")
private String rejNote;
/**
* 来源(外来接口数据主键)
*/
@ApiModelProperty("来源(外来接口数据主键)")
private String dataSource;
/**
* 磅单号
*/
@ApiModelProperty("磅单号")
private String billNo;
/**
* 备注
*/
@ApiModelProperty("备注")
private String note;
/**
* 创建人id
*/
@ApiModelProperty("创建人id")
@TableField(fill = FieldFill.INSERT)
private Long createUserId;
/**
* 创建时间
*/
@ApiModelProperty("创建时间")
@TableField(fill = FieldFill.INSERT)
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;
@TableField(exist = false)
private String statusCode;
}

View File

@ -0,0 +1,312 @@
package com.xjrsoft.module.dayPlan.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pictc.annotations.datalog.LogField;
import com.pictc.annotations.datalog.LogTable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @title: LNG计量(业务)
* @Author 管理员
* @Date: 2026-03-13
* @Version 1.0
*/
@Data
@TableName("lng_lng_measure")
@LogTable(source="lng_lng_measure",name="LNG计量(业务)")
@ApiModel(value = "LNG计量(业务)对象", description = "LNG计量(业务)")
public class LngLngMeasurePur implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
@TableId
@LogField(name="主键",index=0)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long id;
/**
* 销售日计划主键
*/
@ApiModelProperty("销售日计划主键")
@LogField(name="销售日计划主键",index=1)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long salesId;
/**
* 计划日期
*/
@ApiModelProperty("计划日期")
@LogField(name="计划日期",index=2)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime datePlan;
/**
* 客户
*/
@ApiModelProperty("客户")
@LogField(name="客户",index=3)
private String cuCode;
/**
* 交易主体编码(天然气公司/惠贸)
*/
@ApiModelProperty("交易主体编码(天然气公司/惠贸)")
@LogField(name="交易主体编码(天然气公司/惠贸)",index=4)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long comId;
/**
* 销售合同主键(窗口期可空)
*/
@ApiModelProperty("销售合同主键(窗口期可空)")
@LogField(name="销售合同主键(窗口期可空)",index=5)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long ksId;
/**
* 气源地
*/
@ApiModelProperty("气源地")
@LogField(name="气源地",index=6)
private String staCode;
/**
* 供应商
*/
@ApiModelProperty("供应商")
@LogField(name="供应商",index=7)
private String suCode;
/**
* 采购合同主键
*/
@ApiModelProperty("采购合同主键")
@LogField(name="采购合同主键",index=8)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long kpId;
/**
* 吨/吉焦(计量时写入)
*/
@ApiModelProperty("吨/吉焦(计量时写入)")
@LogField(name="吨/吉焦(计量时写入)",index=9)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal rateTonGj;
/**
* 装车量(吨)(隐藏,预留)
*/
@ApiModelProperty("装车量(吨)(隐藏,预留)")
@LogField(name="装车量(吨)(隐藏,预留)",index=10)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyTonLoading;
/**
* 卸车量(吨)(隐藏,预留)
*/
@ApiModelProperty("卸车量(吨)(隐藏,预留)")
@LogField(name="卸车量(吨)(隐藏,预留)",index=11)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyTonUnloading;
/**
* 采购计量量(吨)(隐藏,预留)
*/
@ApiModelProperty("采购计量量(吨)(隐藏,预留)")
@LogField(name="采购计量量(吨)(隐藏,预留)",index=12)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaTonPur;
/**
* 采购计量量(吉焦)(隐藏,预留)
*/
@ApiModelProperty("采购计量量(吉焦)(隐藏,预留)")
@LogField(name="采购计量量",index=13)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaGjPur;
/**
* 采购计量量(方)(隐藏,预留)
*/
@ApiModelProperty("采购计量量(方)(隐藏,预留)")
@LogField(name="采购计量量",index=14)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaM3Pur;
/**
* 销售计量量(吨)
*/
@ApiModelProperty("销售计量量(吨)")
@LogField(name="销售计量量(吨)",index=15)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaTonSales;
/**
* 销售计量量(吉焦)
*/
@ApiModelProperty("销售计量量(吉焦)")
@LogField(name="销售计量量(吉焦)",index=16)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaGjSales;
/**
* 销售计量量(方)
*/
@ApiModelProperty("销售计量量(方)")
@LogField(name="销售计量量(方)",index=17)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaM3Sales;
/**
* 进厂皮重时间/装车时间
*/
@ApiModelProperty("进厂皮重时间/装车时间")
@LogField(name="进厂皮重时间/装车时间",index=18)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Object timeIn;
/**
* 出厂毛重时间/卸车时间
*/
@ApiModelProperty("出厂毛重时间/卸车时间")
@LogField(name="出厂毛重时间/卸车时间",index=19)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Object timeOut;
/**
* 取消/脱装(QX-取消TZ-脱装,空-正常计量)
*/
@ApiModelProperty("取消/脱装(QX-取消TZ-脱装,空-正常计量)")
@LogField(name="取消/脱装(QX-取消TZ-脱装,空-正常计量)",index=20)
private String xCode;
/**
* 客户确认人
*/
@ApiModelProperty("客户确认人")
@LogField(name="客户确认人",index=21)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long cfmCuUserId;
/**
* 客户确认时间
*/
@ApiModelProperty("客户确认时间")
@LogField(name="客户确认时间",index=22)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Object cfmCuUserTime;
/**
* 内部确认人
*/
@ApiModelProperty("内部确认人")
@LogField(name="内部确认人",index=23)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long cfmEmpId;
/**
* 内部确认时间
*/
@ApiModelProperty("内部确认时间")
@LogField(name="内部确认时间",index=24)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Object cfmEmpTime;
/**
* 驳回意见
*/
@ApiModelProperty("驳回意见")
@LogField(name="驳回意见",index=25)
private String rejNote;
/**
* 来源(外来接口数据主键)
*/
@ApiModelProperty("来源(外来接口数据主键)")
@LogField(name="来源(外来接口数据主键)",index=26)
private String dataSource;
/**
* 磅单号
*/
@ApiModelProperty("磅单号")
@LogField(name="磅单号",index=27)
private String billNo;
/**
* 备注
*/
@ApiModelProperty("备注")
@LogField(name="备注",index=28)
private String note;
/**
* 创建人id
*/
@ApiModelProperty("创建人id")
@TableField(fill = FieldFill.INSERT)
private Long createUserId;
/**
* 创建时间
*/
@ApiModelProperty("创建时间")
@TableField(fill = FieldFill.INSERT)
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")
@LogField(name="租户id",index=29)
//@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;
@TableField(exist = false)
private String statusCode;
}

View File

@ -0,0 +1,313 @@
package com.xjrsoft.module.dayPlan.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pictc.annotations.datalog.LogField;
import com.pictc.annotations.datalog.LogTable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @title: 管道气计量(内部)
* @Author 管理员
* @Date: 2026-03-12
* @Version 1.0
*/
@Data
@TableName("lng_png_measure_sales_pur")
@LogTable(source="lng_png_measure_sales_pur",name="管道气计量(内部)")
@ApiModel(value = "管道气计量(内部)对象", description = "管道气计量(内部)")
public class LngPngMeasurePur implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
@TableId
@LogField(name="主键",index=0)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long id;
/**
* 日计划-管道气-销售主键(lng_png_sales.id)
*/
@ApiModelProperty("日计划-管道气-销售主键(lng_png_sales.id)")
@LogField(name="日计划-管道气-销售主键(lng_png_sales.id)",index=1)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long salesId;
/**
* 日计划-管道气-销售-采购主键(lng_png_sales_pur.id)
*/
@ApiModelProperty("日计划-管道气-销售-采购主键(lng_png_sales_pur.id)")
@LogField(name="日计划-管道气-销售-采购主键(lng_png_sales_pur.id)",index=2)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long salesPurId;
/**
* 计划日期
*/
@ApiModelProperty("计划日期")
@LogField(name="计划日期",index=3)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime datePlan;
/**
* 计量日期(缺省=计划日期+1)
*/
@ApiModelProperty("计量日期(缺省=计划日期+1)")
@LogField(name="计量日期(缺省=计划日期+1)",index=4)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime dateMea;
/**
* 客户编码
*/
@ApiModelProperty("客户编码")
@LogField(name="客户编码",index=5)
private String cuCode;
/**
* 交易主体编码(天然气公司/惠贸)
*/
@ApiModelProperty("交易主体编码(天然气公司/惠贸)")
@LogField(name="交易主体编码(天然气公司/惠贸)",index=6)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long comId;
/**
* 合同-主信息主键(销售)(lng_contract)
*/
@ApiModelProperty("合同-主信息主键(销售)(lng_contract)")
@LogField(name="合同-主信息主键",index=7)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long ksId;
/**
* 合同-国内销售-管道气-交割点主键(lng_contract_sales_png_sta)
*/
@ApiModelProperty("合同-国内销售-管道气-交割点主键(lng_contract_sales_png_sta)")
@LogField(name="合同-国内销售-管道气-交割点主键",index=8)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long ksppId;
/**
* 交割点编码
*/
@ApiModelProperty("交割点编码")
@LogField(name="交割点编码",index=9)
private String pointDelyCode;
/**
* 供应商
*/
@ApiModelProperty("供应商")
@LogField(name="供应商",index=10)
private String suCode;
/**
* 采购合同-主信息主键
*/
@ApiModelProperty("采购合同-主信息主键")
@LogField(name="采购合同-主信息主键",index=11)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long kpId;
/**
* 合同-国内采购-管道气-上载点主键
*/
@ApiModelProperty("合同-国内采购-管道气-上载点主键")
@LogField(name="合同-国内采购-管道气-上载点主键",index=12)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long kpppId;
/**
* 上载点
*/
@ApiModelProperty("上载点")
@LogField(name="上载点",index=13)
private String pointUpCode;
/**
* 自主托运(Y-是N-否)
*/
@ApiModelProperty("自主托运(Y-是N-否)")
@LogField(name="自主托运(Y-是N-否)",index=14)
private String transSign;
/**
* 比值(方/吉焦)
*/
@ApiModelProperty("比值(方/吉焦)")
@LogField(name="比值(方/吉焦)",index=15)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal rateM3Gj;
/**
* 日批复量(吉焦)
*/
@ApiModelProperty("日批复量(吉焦)")
@LogField(name="日批复量(吉焦)",index=16)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtySalesGj;
/**
* 日批复量(方)
*/
@ApiModelProperty("日批复量(方)")
@LogField(name="日批复量(方)",index=17)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtySalesM3;
/**
* 日完成量(吉焦)
*/
@ApiModelProperty("日完成量(吉焦)")
@LogField(name="日完成量(吉焦)",index=18)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaGj;
/**
* 日完成量(方)
*/
@ApiModelProperty("日完成量(方)")
@LogField(name="日完成量(方)",index=19)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMeaM3;
/**
* 客户确认人
*/
@ApiModelProperty("客户确认人")
@LogField(name="客户确认人",index=20)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long cfmCuUserId;
/**
* 客户确认时间
*/
@ApiModelProperty("客户确认时间")
@LogField(name="客户确认时间",index=21)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Object cfmCuUserTime;
/**
* 内部确认人
*/
@ApiModelProperty("内部确认人")
@LogField(name="内部确认人",index=22)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long cfmEmpId;
/**
* 内部确认时间
*/
@ApiModelProperty("内部确认时间")
@LogField(name="内部确认时间",index=23)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Object cfmEmpTime;
/**
* 驳回意见
*/
@ApiModelProperty("驳回意见")
@LogField(name="驳回意见",index=24)
private String rejNote;
/**
* 顺序
*/
@ApiModelProperty("顺序")
@LogField(name="顺序",index=25)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Short sort;
/**
* 来源(外来接口数据主键)
*/
@ApiModelProperty("来源(外来接口数据主键)")
@LogField(name="来源(外来接口数据主键)",index=26)
private String dataSource;
/**
* 计量单号(外来接口数据主键)
*/
@ApiModelProperty("计量单号(外来接口数据主键)")
@LogField(name="计量单号(外来接口数据主键)",index=27)
private String billNo;
/**
* 备注
*/
@ApiModelProperty("备注")
@LogField(name="备注",index=28)
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)
@LogField(name="租户id",index=29)
private Long tenantId;
/**
* 部门id
*/
@ApiModelProperty("部门id")
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
@LogField(name="部门id",index=30)
private Long deptId;
/**
* 数据权限id
*/
@ApiModelProperty("数据权限id")
@LogField(name="数据权限id",index=31)
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
private Long ruleUserId;
@TableField(exist = false)
private String statusCode;
}

View File

@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pictc.annotations.datalog.LogField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -247,6 +248,35 @@ public class LngPngMeasureSalesPur implements Serializable {
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
private Long ruleUserId;
/**
* 拒绝原因
*/
@ApiModelProperty("拒绝原因")
private String rejNote;
@TableField(exist = false)
private String statusCode;
/**
* 顺序
*/
@ApiModelProperty("顺序")
@LogField(name="顺序",index=25)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Short sort;
/**
* 来源(外来接口数据主键)
*/
@ApiModelProperty("来源(外来接口数据主键)")
@LogField(name="来源(外来接口数据主键)",index=26)
private String dataSource;
/**
* 计量单号(外来接口数据主键)
*/
@ApiModelProperty("计量单号(外来接口数据主键)")
@LogField(name="计量单号(外来接口数据主键)",index=27)
private String billNo;
}

View File

@ -1,21 +1,20 @@
package com.xjrsoft.module.dayPlan.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
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.baomidou.mybatisplus.annotation.TableName;
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;
/**

View File

@ -0,0 +1,32 @@
package com.xjrsoft.module.dayPlan.mapper;
import java.util.List;
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.xjrsoft.module.dayPlan.entity.LngLngMeasure;
/**
* @title: mapper
* @Author 管理员
* @Date: 2026-03-13
* @Version 1.0
*/
@Mapper
public interface LngLngMeasureMapper extends BaseMapper<LngLngMeasure> {
@Select("SELECT m.*, IF(sh.appro_code='YSP','YJS',if(sh.id IS NOT NULL,'JSZ',IF(m.cfm_emp_id IS NOT NULL,'JLWC','JLZ'))) AS status_code " +
" FROM lng_lng_measure m "+
" LEFT JOIN lng_lng_sales s ON s.id=m.sales_id "+
" LEFT JOIN lng_lng_settle ls ON ls.sales_id=m.sales_id AND ls.settle_times=1 "+
" LEFT JOIN lng_lng_settle_hdr sh ON sh.id=ls.settle_hdr_id" +
" ${ew.customSqlSegment} " +
" ORDER BY date_plan, status_code, cu_code, su_code ")
List<LngLngMeasure> queryLngMeasureListByIds(List<Long> ids,
@Param("ew") QueryWrapper<LngLngMeasure> queryWrapper);
}

View File

@ -0,0 +1,31 @@
package com.xjrsoft.module.dayPlan.mapper;
import java.util.List;
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.xjrsoft.module.dayPlan.entity.LngLngMeasurePur;
/**
* @title: mapper
* @Author 管理员
* @Date: 2026-03-13
* @Version 1.0
*/
@Mapper
public interface LngLngMeasurePurMapper extends BaseMapper<LngLngMeasurePur> {
@Select("SELECT m.*, IF(sh.appro_code='YSP','YJS',if(sh.id IS NOT NULL,'JSZ',IF(m.cfm_emp_id IS NOT NULL,'JLWC','JLZ'))) AS status_code " +
" FROM lng_lng_measure m "+
" LEFT JOIN lng_lng_sales s ON s.id=m.sales_id "+
" LEFT JOIN lng_lng_settle ls ON ls.sales_id=m.sales_id AND ls.settle_times=1 "+
" LEFT JOIN lng_lng_settle_hdr sh ON sh.id=ls.settle_hdr_id" +
" ${ew.customSqlSegment} " +
" ORDER BY date_plan, status_code, cu_code, su_code ")
List<LngLngMeasurePur> queryLngMeasurePurListByIds(List<Long> ids,
@Param("ew") QueryWrapper<LngLngMeasurePur> queryWrapper);
}

View File

@ -0,0 +1,37 @@
package com.xjrsoft.module.dayPlan.mapper;
import java.util.List;
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.xjrsoft.module.contract.entity.LngContract;
import com.xjrsoft.module.dayPlan.entity.LngPngMeasurePur;
/**
* @title: mapper
* @Author 管理员
* @Date: 2026-03-12
* @Version 1.0
*/
@Mapper
public interface LngPngMeasurePurMapper extends BaseMapper<LngPngMeasurePur> {
@Select("SELECT msp.*, IF(sh.appro_code='YSP','YJS',if(sh.id IS NOT NULL,'JSZ',IF(msp.cfm_emp_id IS NOT NULL,'JLWC','JLZ'))) AS status_code " +
" FROM lng_png_measure_sales_pur msp "+
" LEFT JOIN lng_png_settle_pur sp ON sp.sales_pur_id=msp.sales_pur_id "+
" AND sp.settle_times=1 "+
" LEFT JOIN lng_png_settle_hdr sh ON sh.id=sp.settle_hdr_id "+
" ${ew.customSqlSegment} " +
" ORDER BY date_plan, status_code, cu_code, su_code ")
//LngPngMeasurePur> queryLngPngMeasurePurById(@Param("id")Long id);
List<LngPngMeasurePur> queryLngPngMeasurePurListByIds(List<Long> ids,@Param("ew") QueryWrapper<LngPngMeasurePur> queryWrapper);
}

View File

@ -1,9 +1,15 @@
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.LngPngMeasureSalesPur;
import java.util.List;
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.xjrsoft.module.contract.entity.LngContract;
import com.xjrsoft.module.dayPlan.entity.LngPngMeasureSalesPur;
/**
* @title: mapper
@ -13,5 +19,15 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface LngPngMeasureSalesPurMapper extends BaseMapper<LngPngMeasureSalesPur> {
@Select("SELECT msp.*, IF(sh.appro_code='YSP','YJS',if(sh.id IS NOT NULL,'JSZ',IF(msp.cfm_emp_id IS NOT NULL,'JLWC','JLZ'))) AS status_code " +
" FROM lng_png_measure_sales_pur msp "+
" LEFT JOIN lng_png_settle_pur sp ON sp.sales_pur_id=msp.sales_pur_id "+
" AND sp.settle_times=1 "+
" LEFT JOIN lng_png_settle_hdr sh ON sh.id=sp.settle_hdr_id "+
" ${ew.customSqlSegment} " +
" ORDER BY date_plan, status_code, cu_code, su_code ")
List<LngPngMeasureSalesPur> queryLngPngMeasureSalesPurListByIds(List<Long> ids,
@Param("ew") QueryWrapper<LngPngMeasureSalesPur> queryWrapper);
}

View File

@ -0,0 +1,21 @@
package com.xjrsoft.module.dayPlan.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xjrsoft.module.dayPlan.entity.LngLngMeasurePur;
import com.xjrsoft.module.dayPlan.vo.LngLngMeasurePurVo;
/**
* @title: service
* @Author 管理员
* @Date: 2026-03-13
* @Version 1.0
*/
public interface ILngMeasurePurService extends IService<LngLngMeasurePur> {
LngLngMeasurePurVo getInfoById(Long id);
List<LngLngMeasurePur> getListByIds(List<Long> ids);
}

View File

@ -0,0 +1,22 @@
package com.xjrsoft.module.dayPlan.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xjrsoft.module.dayPlan.entity.LngLngMeasure;
import com.xjrsoft.module.dayPlan.vo.LngLngMeasurePurVo;
import com.xjrsoft.module.dayPlan.vo.LngLngMeasureVo;
/**
* @title: service
* @Author 管理员
* @Date: 2026-03-13
* @Version 1.0
*/
public interface ILngMeasureSalesService extends IService<LngLngMeasure> {
List<LngLngMeasure> getListByIds(List<Long> ids);
LngLngMeasureVo getInfoById(Long id);
}

View File

@ -0,0 +1,21 @@
package com.xjrsoft.module.dayPlan.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xjrsoft.module.dayPlan.entity.LngPngMeasurePur;
import com.xjrsoft.module.dayPlan.vo.LngPngMeasurePurVo;
/**
* @title: service
* @Author 管理员
* @Date: 2026-03-12
* @Version 1.0
*/
public interface IPngMeasurePurService extends IService<LngPngMeasurePur> {
LngPngMeasurePurVo getInfoById(Long id);
List<LngPngMeasurePur> getListByIds(List<Long> ids);
}

View File

@ -1,5 +1,7 @@
package com.xjrsoft.module.dayPlan.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xjrsoft.module.dayPlan.entity.LngPngMeasureSalesPur;
import com.xjrsoft.module.dayPlan.vo.LngPngMeasureSalesPurVo;
@ -14,4 +16,6 @@ import com.xjrsoft.module.dayPlan.vo.LngPngMeasureSalesPurVo;
public interface IPngMeasureSalesPurService extends IService<LngPngMeasureSalesPur> {
LngPngMeasureSalesPurVo getInfoById(Long id);
List<LngPngMeasureSalesPur> getListByIds(List<Long> ids);
}

View File

@ -0,0 +1,56 @@
package com.xjrsoft.module.dayPlan.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.LngLngMeasurePur;
import com.xjrsoft.module.dayPlan.entity.LngPngMeasureSalesPur;
import com.xjrsoft.module.dayPlan.mapper.LngLngMeasurePurMapper;
import com.xjrsoft.module.dayPlan.service.ILngMeasurePurService;
import com.xjrsoft.module.dayPlan.vo.LngLngMeasurePurVo;
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;
/**
* @title: service
* @Author 管理员
* @Date: 2026-03-13
* @Version 1.0
*/
@Service
@AllArgsConstructor
public class LngMeasurePurServiceImpl extends ServiceImpl<LngLngMeasurePurMapper, LngLngMeasurePur> implements ILngMeasurePurService {
private final IFileClient fileClient;
@Override
public LngLngMeasurePurVo getInfoById(Long id) {
LngLngMeasurePur lngLngMeasurePur = this.getById(id);
if(lngLngMeasurePur == null) {
throw new BusinessException(BusinessCode.of(10500, "找不到此数据!"));
}
LngLngMeasurePurVo vo = BeanUtil.toBean(lngLngMeasurePur, LngLngMeasurePurVo.class);
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_lng_measure", "lngFileUploadList", vo.getId());
vo.setLngFileUploadList(fileList);
return vo;
}
@Override
public List<LngLngMeasurePur> getListByIds(List<Long> ids) {
QueryWrapper<LngLngMeasurePur> queryWrapper = new QueryWrapper<>();
queryWrapper.in("m.id", ids);
return this.baseMapper.queryLngMeasurePurListByIds(ids, queryWrapper);
}
}

View File

@ -0,0 +1,56 @@
package com.xjrsoft.module.dayPlan.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.LngLngMeasure;
import com.xjrsoft.module.dayPlan.entity.LngPngMeasureSalesPur;
import com.xjrsoft.module.dayPlan.mapper.LngLngMeasureMapper;
import com.xjrsoft.module.dayPlan.service.ILngMeasureSalesService;
import com.xjrsoft.module.dayPlan.vo.LngLngMeasurePurVo;
import com.xjrsoft.module.dayPlan.vo.LngLngMeasureVo;
import com.xjrsoft.module.dayPlan.vo.LngPngMeasurePurVo;
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;
/**
* @title: service
* @Author 管理员
* @Date: 2026-03-13
* @Version 1.0
*/
@Service
@AllArgsConstructor
public class LngMeasureSalesServiceImpl extends ServiceImpl<LngLngMeasureMapper, LngLngMeasure> implements ILngMeasureSalesService {
private final IFileClient fileClient;
@Override
public LngLngMeasureVo getInfoById(Long id) {
LngLngMeasure lngLngMeasure = this.getById(id);
if(lngLngMeasure == null) {
throw new BusinessException(BusinessCode.of(10500, "找不到此数据!"));
}
LngLngMeasureVo vo = BeanUtil.toBean(lngLngMeasure, LngLngMeasureVo.class);
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_lng_measure", "lngFileUploadList", vo.getId());
vo.setLngFileUploadList(fileList);
return vo;
}
@Override
public List<LngLngMeasure> getListByIds(List<Long> ids) {
QueryWrapper<LngLngMeasure> queryWrapper = new QueryWrapper<>();
queryWrapper.in("m.id", ids);
return this.baseMapper.queryLngMeasureListByIds(ids, queryWrapper);
}
}

View File

@ -0,0 +1,52 @@
package com.xjrsoft.module.dayPlan.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.LngPngMeasurePur;
import com.xjrsoft.module.dayPlan.mapper.LngPngMeasurePurMapper;
import com.xjrsoft.module.dayPlan.service.IPngMeasurePurService;
import com.xjrsoft.module.dayPlan.vo.LngPngMeasurePurVo;
import com.xjrsoft.module.system.client.IFileClient;
import com.xjrsoft.module.system.vo.LngFileUploadVo;
import cn.hutool.core.bean.BeanUtil;
import lombok.AllArgsConstructor;
/**
* @title: service
* @Author 管理员
* @Date: 2026-03-12
* @Version 1.0
*/
@Service
@AllArgsConstructor
public class PngMeasurePurServiceImpl extends ServiceImpl<LngPngMeasurePurMapper, LngPngMeasurePur> implements IPngMeasurePurService {
private final IFileClient fileClient;
@Override
public LngPngMeasurePurVo getInfoById(Long id) {
LngPngMeasurePur lngPngMeasurePur = this.getById(id);
if(lngPngMeasurePur == null) {
throw new BusinessException(BusinessCode.of(10500, "找不到此数据!"));
}
LngPngMeasurePurVo vo = BeanUtil.toBean(lngPngMeasurePur, LngPngMeasurePurVo.class);
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_png_measure_sales_pur", "lngFileUploadList", vo.getId());
vo.setLngFileUploadList(fileList);
return vo;
}
@Override
public List<LngPngMeasurePur> getListByIds(List<Long> ids) {
QueryWrapper<LngPngMeasurePur> queryWrapper = new QueryWrapper<>();
queryWrapper.in("msp.id", ids);
return this.baseMapper.queryLngPngMeasurePurListByIds(ids, queryWrapper);
}
}

View File

@ -4,6 +4,7 @@ import java.util.List;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pictc.enums.BusinessCode;
import com.xjrsoft.common.exception.BusinessException;
@ -37,8 +38,16 @@ public class PngMeasureSalesPurServiceImpl extends ServiceImpl<LngPngMeasureSale
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);
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_png_measure_sales_pur", "lngFileUploadList", vo.getId());
vo.setLngFileUploadList(fileList);
return vo;
}
@Override
public List<LngPngMeasureSalesPur> getListByIds(List<Long> ids) {
QueryWrapper<LngPngMeasureSalesPur> queryWrapper = new QueryWrapper<>();
queryWrapper.in("msp.id", ids);
return this.baseMapper.queryLngPngMeasureSalesPurListByIds(ids, queryWrapper);
}
}

View File

@ -0,0 +1,112 @@
package com.xjrsoft.module.inventory.controller;
import java.util.List;
import javax.validation.Valid;
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 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.inventory.dto.LngInventoryInPageDto;
import com.xjrsoft.module.inventory.dto.UpdateLngInventoryInDto;
import com.xjrsoft.module.inventory.entity.LngInventoryIn;
import com.xjrsoft.module.inventory.service.ILngInventoryInService;
import com.xjrsoft.module.inventory.vo.LngInventoryInPageVo;
import com.xjrsoft.module.inventory.vo.LngInventoryInVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
/**
* @title: 入库
* @Author 管理员
* @Date: 2026-03-19
* @Version 1.0
*/
@RestController
@RequestMapping("/inventory/lngInventoryIn")
@Api(value = "/inventory" + "/lngInventoryIn",tags = "入库代码")
@AllArgsConstructor
public class LngInventoryInController {
private final ILngInventoryInService lngInventoryInService;
private final DatalogService dataService;
@GetMapping(value = "/page")
@ApiOperation(value="LngInventoryIn列表(分页)")
@SaCheckPermission("lngInventoryIn:list")
public R page(@Valid LngInventoryInPageDto dto){
LambdaQueryWrapper<LngInventoryIn> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper
.like(StrUtil.isNotBlank(dto.getTypeCode()),LngInventoryIn::getTypeCode,dto.getTypeCode())
.like(StrUtil.isNotBlank(dto.getStaCode()),LngInventoryIn::getStaCode,dto.getStaCode())
//.between(ObjectUtil.isNotNull(dto.getDateInStart()) && ObjectUtil.isNotNull(dto.getDateInEnd()),LngInventoryIn::getDateIn,dto.getDateInStart(),dto.getDateInEnd())
.like(StrUtil.isNotBlank(dto.getSuCode()),LngInventoryIn::getSuCode,dto.getSuCode())
.orderByDesc(LngInventoryIn::getId)
.select(LngInventoryIn.class,x -> VoToColumnUtil.fieldsToColumns(LngInventoryInPageVo.class).contains(x.getProperty()));
IPage<LngInventoryIn> page = lngInventoryInService.page(ConventPage.getPage(dto), queryWrapper);
PageOutput<LngInventoryInPageVo> pageOutput = ConventPage.getPageOutput(page, LngInventoryInPageVo.class);
return R.ok(pageOutput);
}
@GetMapping(value = "/info")
@ApiOperation(value="根据id查询LngInventoryIn信息")
@SaCheckPermission("lngInventoryIn:detail")
public R info(@RequestParam Long id){
return R.ok(lngInventoryInService.getInfoById(id));
}
@GetMapping(value = "/datalog")
@ApiOperation(value="根据id查询LngInventoryIn数据详细日志")
@SaCheckPermission("lngInventoryIn:datalog")
public R datalog(@RequestParam Long id){
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngInventoryInDto.class,id);
return R.ok(logs);
}
@PostMapping
@ApiOperation(value = "新增LngInventoryIn")
@SaCheckPermission("lngInventoryIn:add")
public R add(@Valid @RequestBody UpdateLngInventoryInDto dto){
UpdateLngInventoryInDto res = dataService.insert(dto);
return R.ok(res.getId());
}
@PutMapping
@ApiOperation(value = "修改LngInventoryIn")
@SaCheckPermission("lngInventoryIn:edit")
public R update(@Valid @RequestBody UpdateLngInventoryInDto dto){
return R.ok(dataService.updateById(dto));
}
@DeleteMapping
@ApiOperation(value = "删除")
@SaCheckPermission("lngInventoryIn:delete")
public R delete(@Valid @RequestBody List<Long> ids){
return R.ok(dataService.deleteByIds(UpdateLngInventoryInDto.class, ids));
}
}

View File

@ -0,0 +1,109 @@
package com.xjrsoft.module.inventory.controller;
import java.util.List;
import javax.validation.Valid;
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 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.inventory.dto.LngInventoryOutPageDto;
import com.xjrsoft.module.inventory.dto.UpdateLngInventoryOutDto;
import com.xjrsoft.module.inventory.entity.LngInventoryOut;
import com.xjrsoft.module.inventory.service.ILngInventoryOutService;
import com.xjrsoft.module.inventory.vo.LngInventoryOutPageVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
/**
* @title: 出库
* @Author 管理员
* @Date: 2026-03-19
* @Version 1.0
*/
@RestController
@RequestMapping("/inventory/lngInventoryOut")
@Api(value = "/inventory" + "/lngInventoryOut",tags = "出库代码")
@AllArgsConstructor
public class LngInventoryOutController {
private final ILngInventoryOutService lngInventoryOutService;
private final DatalogService dataService;
@GetMapping(value = "/page")
@ApiOperation(value="LngInventoryOut列表(分页)")
@SaCheckPermission("lngInventoryOut:list")
public R page(@Valid LngInventoryOutPageDto dto){
LambdaQueryWrapper<LngInventoryOut> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper
.like(StrUtil.isNotBlank(dto.getTypeCode()),LngInventoryOut::getTypeCode,dto.getTypeCode())
.like(StrUtil.isNotBlank(dto.getStaCode()),LngInventoryOut::getStaCode,dto.getStaCode())
//.between(ObjectUtil.isNotNull(dto.getDateOutStart()) && ObjectUtil.isNotNull(dto.getDateOutEnd()),LngInventoryOut::getDateOut,dto.getDateOutStart(),dto.getDateOutEnd())
.orderByDesc(LngInventoryOut::getId)
.select(LngInventoryOut.class,x -> VoToColumnUtil.fieldsToColumns(LngInventoryOutPageVo.class).contains(x.getProperty()));
IPage<LngInventoryOut> page = lngInventoryOutService.page(ConventPage.getPage(dto), queryWrapper);
PageOutput<LngInventoryOutPageVo> pageOutput = ConventPage.getPageOutput(page, LngInventoryOutPageVo.class);
return R.ok(pageOutput);
}
@GetMapping(value = "/info")
@ApiOperation(value="根据id查询LngInventoryOut信息")
@SaCheckPermission("lngInventoryOut:detail")
public R info(@RequestParam Long id){
return R.ok(lngInventoryOutService.getInfoById(id));
}
@GetMapping(value = "/datalog")
@ApiOperation(value="根据id查询LngInventoryOut数据详细日志")
@SaCheckPermission("lngInventoryOut:datalog")
public R datalog(@RequestParam Long id){
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngInventoryOutDto.class,id);
return R.ok(logs);
}
@PostMapping
@ApiOperation(value = "新增LngInventoryOut")
@SaCheckPermission("lngInventoryOut:add")
public R add(@Valid @RequestBody UpdateLngInventoryOutDto dto){
UpdateLngInventoryOutDto res = dataService.insert(dto);
return R.ok(res.getId());
}
@PutMapping
@ApiOperation(value = "修改LngInventoryOut")
@SaCheckPermission("lngInventoryOut:edit")
public R update(@Valid @RequestBody UpdateLngInventoryOutDto dto){
return R.ok(dataService.updateById(dto));
}
@DeleteMapping
@ApiOperation(value = "删除")
@SaCheckPermission("lngInventoryOut:delete")
public R delete(@Valid @RequestBody List<Long> ids){
return R.ok(dataService.deleteByIds(UpdateLngInventoryOutDto.class, ids));
}
}

View File

@ -0,0 +1,377 @@
package com.xjrsoft.module.inventory.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @title: 入库
* @Author 管理员
* @Date: 2026-03-19
* @Version 1.0
*/
@Data
@TableName("lng_inventory_in")
@ApiModel(value = "入库对象", description = "入库")
public class LngInventoryIn implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
@TableId
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long id;
/**
* 公司编码(天然气公司/惠贸)
*/
@ApiModelProperty("公司编码(天然气公司/惠贸)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long comId;
/**
* 接收站
*/
@ApiModelProperty("接收站")
private String staCode;
/**
* 入库类型编码(CQ-船期计划/ZN-站内交易CQ先选采购执行带出船期计划ID、合同IDZN选船期计划和合同)
*/
@ApiModelProperty("入库类型编码(CQ-船期计划/ZN-站内交易CQ先选采购执行带出船期计划ID、合同IDZN选船期计划和合同)")
private String typeCode;
/**
* 品种(缺省LNG)
*/
@ApiModelProperty("品种(缺省LNG)")
private String catCode;
/**
* 采购执行主键(type_code=CQ时选采购执行带出船期计划、采购合同、供应商ZN时空)
*/
@ApiModelProperty("采购执行主键(type_code=CQ时选采购执行带出船期计划、采购合同、供应商ZN时空)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long opsId;
/**
* 船期计划主键(type_code=CQ时自动带出来只读ZN时从代加工的船期计划选)
*/
@ApiModelProperty("船期计划主键(type_code=CQ时自动带出来只读ZN时从代加工的船期计划选)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long ssId;
/**
* 采购合同主键(国内/国际)(type_code=CQ时自动带出来只读ZN时选择)
*/
@ApiModelProperty("采购合同主键(国内/国际)(type_code=CQ时自动带出来只读ZN时选择)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long kId;
/**
* 供应商编码(根据采购合同带出来;只读)
*/
@ApiModelProperty("供应商编码(根据采购合同带出来;只读)")
private String suCode;
/**
* 入库日期(在合同有效期内)
*/
@ApiModelProperty("入库日期(在合同有效期内)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime dateIn;
/**
* 卸港热值MMBtu
*/
@ApiModelProperty("卸港热值MMBtu")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyUnloadMmbtu;
/**
* 卸港重量(吨)
*/
@ApiModelProperty("卸港重量(吨)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyUnloadTon;
/**
* 卸港体积(标方)
*/
@ApiModelProperty("卸港体积(标方)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyUnloadM3L;
/**
* 卸港体积(方)
*/
@ApiModelProperty("卸港体积(方)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyUnloadM3;
/**
* 卸港热值(吉焦)
*/
@ApiModelProperty("卸港热值(吉焦)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyUnloadGj;
/**
* 损耗比例%
*/
@ApiModelProperty("损耗比例%")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal rateLost;
/**
* 损耗热值MMBtu
*/
@ApiModelProperty("损耗热值MMBtu")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyLostMmbtu;
/**
* 损耗重量(吨)
*/
@ApiModelProperty("损耗重量(吨)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyLostTon;
/**
* 损耗体积(标方)
*/
@ApiModelProperty("损耗体积(标方)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyLostM3L;
/**
* 损耗体积(方)
*/
@ApiModelProperty("损耗体积(方)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyLostM3;
/**
* 损耗热值(吉焦)
*/
@ApiModelProperty("损耗热值(吉焦)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyLostGj;
/**
* 入库热值MMBtu
*/
@ApiModelProperty("入库热值MMBtu")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyMmbtu;
/**
* 入库重量(吨)
*/
@ApiModelProperty("入库重量(吨)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyTon;
/**
* 入库体积(标方)
*/
@ApiModelProperty("入库体积(标方)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyM3L;
/**
* 入库体积(方)
*/
@ApiModelProperty("入库体积(方)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyM3;
/**
* 入库热值(吉焦)
*/
@ApiModelProperty("入库热值(吉焦)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyGj;
/**
* 入库价格(元/吨)
*/
@ApiModelProperty("入库价格(元/吨)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal priceTon;
/**
* 入库价格(元/吉焦)
*/
@ApiModelProperty("入库价格(元/吉焦)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal priceGj;
/**
* 入库金额/纯货值(元)(人民币=结算币种金额*购汇汇率)
*/
@ApiModelProperty("入库金额/纯货值(元)(人民币=结算币种金额*购汇汇率)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal amount;
/**
* 结算币种(录入)
*/
@ApiModelProperty("结算币种(录入)")
private String currCode;
/**
* 结算币种单价(/MMBtu)(录入)
*/
@ApiModelProperty("结算币种单价(/MMBtu)(录入)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal priceMmbtu;
/**
* 结算币种金额(=结算币种单价(/MMBtu)*货量(MMBtu))
*/
@ApiModelProperty("结算币种金额(=结算币种单价(/MMBtu)*货量(MMBtu))")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal amountCurr;
/**
* 购汇汇率(录入)
*/
@ApiModelProperty("购汇汇率(录入)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal rateExPur;
/**
* 海关计征汇率(录入)
*/
@ApiModelProperty("海关计征汇率(录入)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal rateExCalc;
/**
* 进口增值税率(固定0.09)
*/
@ApiModelProperty("进口增值税率(固定0.09)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal rateVat;
/**
* 返税参考基准值(元/GJ)(固定28.06)
*/
@ApiModelProperty("返税参考基准值(元/GJ)(固定28.06)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal benchmark;
/**
* 进口增值税(元)(=入库金额(元)*进口增值税率)
*/
@ApiModelProperty("进口增值税(元)(=入库金额(元)*进口增值税率)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal amountImpVat;
/**
* 进口完税金额(元)(=结算币种金额*海关计征汇率)
*/
@ApiModelProperty("进口完税金额(元)(=结算币种金额*海关计征汇率)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal amountCalc;
/**
* 返税(=(进口完税金额(元)/进口热值GJ-返税参考基准值(元/GJ))/(进口完税金额(元)/进口热值GJ)*进口增值税(元))
*/
@ApiModelProperty("返税(=(进口完税金额(元)/进口热值GJ-返税参考基准值(元/GJ))/(进口完税金额(元)/进口热值GJ)*进口增值税(元))")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal tax;
/**
* 来源(接口写入;空-自提)
*/
@ApiModelProperty("来源(接口写入;空-自提)")
private String dataSource;
/**
* 实际付款不含税金额(元)(财务录入)
*/
@ApiModelProperty("实际付款不含税金额(元)(财务录入)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal amountFin;
/**
* 结算月(被库存成本计算引用的最小月份)
*/
@ApiModelProperty("结算月(被库存成本计算引用的最小月份)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime settleMonth;
/**
* 备注
*/
@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;
}

View File

@ -0,0 +1,220 @@
package com.xjrsoft.module.inventory.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 管理员
* @Date: 2026-03-19
* @Version 1.0
*/
@Data
@TableName("lng_inventory_out")
@ApiModel(value = "出库对象", description = "出库")
public class LngInventoryOut implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
@TableId
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long id;
/**
* 公司编码(天然气公司/惠贸)
*/
@ApiModelProperty("公司编码(天然气公司/惠贸)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long comId;
/**
* 接收站
*/
@ApiModelProperty("接收站")
private String staCode;
/**
* 出库类型编码(ZN-销售(站内交易)可扩展SH-损耗/PD-盘点)
*/
@ApiModelProperty("出库类型编码(ZN-销售(站内交易)可扩展SH-损耗/PD-盘点)")
private String typeCode;
/**
* 品种
*/
@ApiModelProperty("品种")
private String catCode;
/**
* 销售合同主键(type_code=ZN时必须其他空)
*/
@ApiModelProperty("销售合同主键(type_code=ZN时必须其他空)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Long kId;
/**
* 客户编码(type_code=ZN时必须从销售合同带其他空)
*/
@ApiModelProperty("客户编码(type_code=ZN时必须从销售合同带其他空)")
private String cuCode;
/**
* 计量单位
*/
@ApiModelProperty("计量单位")
private String uomCode;
/**
* 出库日期(在合同有效期内)
*/
@ApiModelProperty("出库日期(在合同有效期内)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime dateOut;
/**
* 比值(吨/吉焦)
*/
@ApiModelProperty("比值(吨/吉焦)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal rateTonGj;
/**
* 比值(方/吉焦)
*/
@ApiModelProperty("比值(方/吉焦)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal rateM3Gj;
/**
* 出库量(吉焦)
*/
@ApiModelProperty("出库量(吉焦)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyGj;
/**
* 出库量(吨)
*/
@ApiModelProperty("出库量(吨)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyTon;
/**
* 出库量(方)
*/
@ApiModelProperty("出库量(方)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal qtyM3;
/**
* 出库价格(元/吉焦)(本币)
*/
@ApiModelProperty("出库价格(元/吉焦)(本币)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal priceGj;
/**
* 出库价格(元/吨)
*/
@ApiModelProperty("出库价格(元/吨)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal priceTon;
/**
* 出库价格(元/方)(本币)
*/
@ApiModelProperty("出库价格(元/方)(本币)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal priceM3;
/**
* 出库金额(元)(本币)
*/
@ApiModelProperty("出库金额(元)(本币)")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private BigDecimal amount;
/**
* 结算月
*/
@ApiModelProperty("结算月")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime settleMonth;
/**
* 备注
*/
@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;
}

View File

@ -0,0 +1,37 @@
package com.xjrsoft.module.inventory.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xjrsoft.module.inventory.entity.LngInventoryIn;
import com.xjrsoft.module.inventory.vo.LngInventoryInVo;
/**
* @title: mapper
* @Author 管理员
* @Date: 2026-03-19
* @Version 1.0
*/
@Mapper
public interface LngInventoryInMapper extends BaseMapper<LngInventoryIn> {
@Select("SELECT ii.*, dd_ii.name AS type_name, "+
" opi.ss_no AS ssNo , sl.full_name AS staName , "+
" k.k_name AS k_name ,"+
" su.su_name AS su_name , "+
" NVL(com.short_name,com.name) AS com_name "+
" FROM lng_inventory_in ii "+
" LEFT JOIN lng_ops_pur_int opi ON opi.id=ii.ops_id "+
" LEFT JOIN lng_contract k ON k.id=ii.k_id "+
" LEFT JOIN lng_supplier su ON su.su_code=ii.su_code "+
" LEFT JOIN xjr_dictionary_item di_ii on di_ii.code='LNG_INV_I' "+
" LEFT JOIN xjr_dictionary_detail dd_ii on dd_ii.item_id=di_ii.id AND dd_ii.code=ii.type_code "+
" LEFT JOIN lng_b_station_lng sl ON sl.code=ii.sta_code "+
" LEFT JOIN xjr_department com ON com.id=ii.com_id "+
" WHERE ii.id = #{id}")
LngInventoryInVo getInfoBygId(@Param("id") Long id);
}

View File

@ -0,0 +1,32 @@
package com.xjrsoft.module.inventory.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xjrsoft.module.inventory.entity.LngInventoryOut;
import com.xjrsoft.module.inventory.vo.LngInventoryInVo;
import com.xjrsoft.module.inventory.vo.LngInventoryOutVo;
/**
* @title: mapper
* @Author 管理员
* @Date: 2026-03-19
* @Version 1.0
*/
@Mapper
public interface LngInventoryOutMapper extends BaseMapper<LngInventoryOut> {
@Select("SELECT io.*, sl.full_name AS staName ,"+
" k.k_name as kName , "+
" cu.cu_name as cuName ,NVL(com.short_name,com.name) AS com_name "+
" FROM lng_inventory_out io "+
" LEFT JOIN lng_contract k ON k.id=io.k_id "+
" LEFT JOIN lng_customer cu ON cu.cu_code=io.cu_code "+
" LEFT JOIN lng_b_station_lng sl ON sl.code=io.sta_code "+
" LEFT JOIN xjr_department com ON com.id=io.com_id "+
" WHERE io.id = #{id}")
LngInventoryOutVo getInfoBygId(@Param("id") Long id);
}

View File

@ -0,0 +1,17 @@
package com.xjrsoft.module.inventory.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xjrsoft.module.inventory.entity.LngInventoryIn;
import com.xjrsoft.module.inventory.vo.LngInventoryInVo;
/**
* @title: service
* @Author 管理员
* @Date: 2026-03-19
* @Version 1.0
*/
public interface ILngInventoryInService extends IService<LngInventoryIn> {
LngInventoryInVo getInfoById(Long id);
}

View File

@ -0,0 +1,17 @@
package com.xjrsoft.module.inventory.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xjrsoft.module.inventory.entity.LngInventoryOut;
import com.xjrsoft.module.inventory.vo.LngInventoryOutVo;
/**
* @title: service
* @Author 管理员
* @Date: 2026-03-19
* @Version 1.0
*/
public interface ILngInventoryOutService extends IService<LngInventoryOut> {
LngInventoryOutVo getInfoById(Long id);
}

View File

@ -0,0 +1,41 @@
package com.xjrsoft.module.inventory.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.inventory.entity.LngInventoryIn;
import com.xjrsoft.module.inventory.mapper.LngInventoryInMapper;
import com.xjrsoft.module.inventory.service.ILngInventoryInService;
import com.xjrsoft.module.inventory.vo.LngInventoryInVo;
import com.xjrsoft.module.system.client.IFileClient;
import com.xjrsoft.module.system.vo.LngFileUploadVo;
import lombok.AllArgsConstructor;
/**
* @title: service
* @Author 管理员
* @Date: 2026-03-19
* @Version 1.0
*/
@Service
@AllArgsConstructor
public class LngInventoryInServiceImpl extends ServiceImpl<LngInventoryInMapper, LngInventoryIn> implements ILngInventoryInService {
private final IFileClient fileClient;
@Override
public LngInventoryInVo getInfoById(Long id) {
LngInventoryInVo vo = this.baseMapper.getInfoBygId(id);
if (vo == null) {
throw new BusinessException(BusinessCode.of(10500, "找不到此数据!"));
}
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_inventory_in", "lngFileUploadList", vo.getId());
vo.setLngFileUploadList(fileList);
return vo;
}
}

View File

@ -0,0 +1,42 @@
package com.xjrsoft.module.inventory.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.inventory.entity.LngInventoryOut;
import com.xjrsoft.module.inventory.mapper.LngInventoryOutMapper;
import com.xjrsoft.module.inventory.service.ILngInventoryOutService;
import com.xjrsoft.module.inventory.vo.LngInventoryInVo;
import com.xjrsoft.module.inventory.vo.LngInventoryOutVo;
import com.xjrsoft.module.system.client.IFileClient;
import com.xjrsoft.module.system.vo.LngFileUploadVo;
import lombok.AllArgsConstructor;
/**
* @title: service
* @Author 管理员
* @Date: 2026-03-19
* @Version 1.0
*/
@Service
@AllArgsConstructor
public class LngInventoryOutServiceImpl extends ServiceImpl<LngInventoryOutMapper, LngInventoryOut> implements ILngInventoryOutService {
private final IFileClient fileClient;
@Override
public LngInventoryOutVo getInfoById(Long id) {
LngInventoryOutVo vo = this.baseMapper.getInfoBygId(id);
if (vo == null) {
throw new BusinessException(BusinessCode.of(10500, "找不到此数据!"));
}
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_inventory_in", "lngFileUploadList", vo.getId());
vo.setLngFileUploadList(fileList);
return vo;
}
}