LNG计量
This commit is contained in:
@ -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));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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);
|
||||
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user