出库入库

This commit is contained in:
2026-03-19 17:55:28 +08:00
parent 7b4e8690eb
commit 173ff58639
25 changed files with 2754 additions and 47 deletions

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;
}
}