年度计划
This commit is contained in:
@ -0,0 +1,102 @@
|
||||
package com.xjrsoft.module.plan.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.xjrsoft.common.constant.GlobalConstant;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||
import com.xjrsoft.module.plan.dto.AddLngPlanYearDemandHdrDto;
|
||||
import com.xjrsoft.module.plan.dto.UpdateLngPlanYearDemandHdrDto;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
|
||||
import com.xjrsoft.module.plan.dto.LngPlanYearDemandHdrPageDto;
|
||||
import com.xjrsoft.module.plan.entity.LngPlanYearDemandHdr;
|
||||
import com.xjrsoft.module.plan.service.IPlanYearDemandHdrService;
|
||||
import com.xjrsoft.module.plan.vo.LngPlanYearDemandHdrPageVo;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.plan.vo.LngPlanYearDemandHdrVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: 客户年度需求提报
|
||||
* @Author 管理员
|
||||
* @Date: 2026-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/plan/planYearDemandHdr")
|
||||
@Api(value = "/plan" + "/planYearDemandHdr",tags = "客户年度需求提报代码")
|
||||
@AllArgsConstructor
|
||||
public class PlanYearDemandHdrController {
|
||||
|
||||
|
||||
private final IPlanYearDemandHdrService planYearDemandHdrService;
|
||||
private final DatalogService dataService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngPlanYearDemandHdr列表(分页)")
|
||||
@SaCheckPermission("planYearDemandHdr:list")
|
||||
public R page(@Valid LngPlanYearDemandHdrPageDto dto){
|
||||
|
||||
LambdaQueryWrapper<LngPlanYearDemandHdr> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.eq(ObjectUtil.isNotNull(dto.getId()),LngPlanYearDemandHdr::getId,dto.getId())
|
||||
//.like(StrUtil.isNotBlank(dto.getPlanYear()),LngPlanYearDemandHdr::getPlanYear,dto.getPlanYear())
|
||||
//.like(StrUtil.isNotBlank(dto.getDemandVerNo()),LngPlanYearDemandHdr::getDemandVerNo,dto.getDemandVerNo())
|
||||
.like(StrUtil.isNotBlank(dto.getCuCode()),LngPlanYearDemandHdr::getCuCode,dto.getCuCode())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngPlanYearDemandHdr::getNote,dto.getNote())
|
||||
.like(StrUtil.isNotBlank(dto.getReply()),LngPlanYearDemandHdr::getReply,dto.getReply())
|
||||
.like(StrUtil.isNotBlank(dto.getApproCode()),LngPlanYearDemandHdr::getApproCode,dto.getApproCode())
|
||||
.orderByDesc(LngPlanYearDemandHdr::getId)
|
||||
.select(LngPlanYearDemandHdr.class,x -> VoToColumnUtil.fieldsToColumns(LngPlanYearDemandHdrPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngPlanYearDemandHdr> page = planYearDemandHdrService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngPlanYearDemandHdrPageVo> pageOutput = ConventPage.getPageOutput(page, LngPlanYearDemandHdrPageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngPlanYearDemandHdr信息")
|
||||
@SaCheckPermission("planYearDemandHdr:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngPlanYearDemandHdr lngPlanYearDemandHdr = planYearDemandHdrService.getById(id);
|
||||
if (lngPlanYearDemandHdr == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngPlanYearDemandHdr, LngPlanYearDemandHdrVo.class));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngPlanYearDemandHdr数据详细日志")
|
||||
@SaCheckPermission("planYearDemandHdr:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngPlanYearDemandHdrDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngPlanYearDemandHdr")
|
||||
@SaCheckPermission("planYearDemandHdr:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngPlanYearDemandHdrDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,139 @@
|
||||
package com.xjrsoft.module.plan.controller;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.http.ResponseEntity;
|
||||
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.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.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.common.utils.ExcelUtil;
|
||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.plan.dto.LngPlanYearDemandHdrPageDto;
|
||||
import com.xjrsoft.module.plan.dto.UpdateLngPlanYearDemandHdrDto;
|
||||
import com.xjrsoft.module.plan.dto.UpdateLngPlanYearDemandHdrEcDto;
|
||||
import com.xjrsoft.module.plan.entity.LngPlanYearDemandHdrEc;
|
||||
import com.xjrsoft.module.plan.service.IPlanYearDemandHdrEcService;
|
||||
import com.xjrsoft.module.plan.vo.LngPlanYearDemandHdrEcPageVo;
|
||||
import com.xjrsoft.module.plan.vo.LngPlanYearDemandHdrPageVo;
|
||||
import com.xjrsoft.module.plan.vo.LngPlanYearDemandHdrVo;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
* @title: 客户年度需求提报--电商
|
||||
* @Author 管理员
|
||||
* @Date: 2026-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/plan" + "/planYearDemandHdrEc")
|
||||
@Api(value = "/plan" + "/planYearDemandHdrEc",tags = "客户年度需求提报--电商代码")
|
||||
@AllArgsConstructor
|
||||
public class PlanYearDemandHdrEcController {
|
||||
|
||||
|
||||
private final IPlanYearDemandHdrEcService planYearDemandHdrEcService;
|
||||
private final DatalogService dataService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngPlanYearDemandHdr列表(分页)")
|
||||
@SaCheckPermission("planYearDemandHdrEc:list")
|
||||
public R page(@Valid LngPlanYearDemandHdrPageDto dto){
|
||||
|
||||
LambdaQueryWrapper<LngPlanYearDemandHdrEc> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.eq(ObjectUtil.isNotNull(dto.getId()),LngPlanYearDemandHdrEc::getId,dto.getId())
|
||||
//.like(StrUtil.isNotBlank(dto.getPlanYear()),LngPlanYearDemandHdrEc::getPlanYear,dto.getPlanYear())
|
||||
//.like(StrUtil.isNotBlank(dto.getDemandVerNo()),LngPlanYearDemandHdrEc::getDemandVerNo,dto.getDemandVerNo())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngPlanYearDemandHdrEc::getNote,dto.getNote())
|
||||
.like(StrUtil.isNotBlank(dto.getReply()),LngPlanYearDemandHdrEc::getReply,dto.getReply())
|
||||
.like(StrUtil.isNotBlank(dto.getApproCode()),LngPlanYearDemandHdrEc::getApproCode,dto.getApproCode())
|
||||
.orderByDesc(LngPlanYearDemandHdrEc::getId)
|
||||
.select(LngPlanYearDemandHdrEc.class,x -> VoToColumnUtil.fieldsToColumns(LngPlanYearDemandHdrEcPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngPlanYearDemandHdrEc> page = planYearDemandHdrEcService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngPlanYearDemandHdrEcPageVo> pageOutput = ConventPage.getPageOutput(page, LngPlanYearDemandHdrEcPageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngPlanYearDemandHdr信息")
|
||||
@SaCheckPermission("planYearDemandHdrEc:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngPlanYearDemandHdrEc lngPlanYearDemandHdr = planYearDemandHdrEcService.getById(id);
|
||||
if (lngPlanYearDemandHdr == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngPlanYearDemandHdr, LngPlanYearDemandHdrVo.class));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngPlanYearDemandHdr数据详细日志")
|
||||
@SaCheckPermission("planYearDemandHdrEc:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngPlanYearDemandHdrDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngPlanYearDemandHdr")
|
||||
@SaCheckPermission("planYearDemandHdrEc:add")
|
||||
public R add(@Valid @RequestBody UpdateLngPlanYearDemandHdrEcDto dto){
|
||||
UpdateLngPlanYearDemandHdrEcDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngPlanYearDemandHdr")
|
||||
@SaCheckPermission("planYearDemandHdrEc:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngPlanYearDemandHdrEcDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("planYearDemandHdrEc:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngPlanYearDemandHdrEcDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/export")
|
||||
@ApiOperation(value = "导出")
|
||||
@SaCheckPermission("planYearDemandHdrEc:export")
|
||||
public ResponseEntity<byte[]> exportData(@Valid LngPlanYearDemandHdrPageDto dto, @RequestParam(defaultValue = "false") Boolean isTemplate) {
|
||||
List<LngPlanYearDemandHdrPageVo> customerList = isTemplate != null && isTemplate ? new ArrayList<>() : ((PageOutput<LngPlanYearDemandHdrPageVo>) page(dto).getData()).getList();
|
||||
ExcelUtil.transExcelData(customerList, false);
|
||||
ByteArrayOutputStream bot = new ByteArrayOutputStream();
|
||||
EasyExcel.write(bot, LngPlanYearDemandHdrPageVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
|
||||
ByteArrayOutputStream resultBot = ExcelUtil.renderExportRequiredHead(bot);
|
||||
|
||||
return R.fileStream(resultBot.toByteArray(), "PlanYearDemandHdrEc" + ExcelTypeEnum.XLSX.getValue());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,223 @@
|
||||
package com.xjrsoft.module.plan.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-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_plan_year_demand")
|
||||
@ApiModel(value = "客户年度需求提报对象", description = "客户年度需求提报")
|
||||
public class LngPlanYearDemand implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 年度计划-需求-主表主键(lng_plan_year_demand_hdr.id)
|
||||
*/
|
||||
@ApiModelProperty("年度计划-需求-主表主键(lng_plan_year_demand_hdr.id)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long pydhId;
|
||||
|
||||
/**
|
||||
* 品种
|
||||
*/
|
||||
@ApiModelProperty("品种")
|
||||
private String catCode;
|
||||
|
||||
/**
|
||||
* 单位(隐藏)
|
||||
*/
|
||||
@ApiModelProperty("单位(隐藏)")
|
||||
private String uomCode;
|
||||
|
||||
/**
|
||||
* 1月
|
||||
*/
|
||||
@ApiModelProperty("1月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty01;
|
||||
|
||||
/**
|
||||
* 2月
|
||||
*/
|
||||
@ApiModelProperty("2月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty02;
|
||||
|
||||
/**
|
||||
* 3月
|
||||
*/
|
||||
@ApiModelProperty("3月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty03;
|
||||
|
||||
/**
|
||||
* 4月
|
||||
*/
|
||||
@ApiModelProperty("4月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty04;
|
||||
|
||||
/**
|
||||
* 5月
|
||||
*/
|
||||
@ApiModelProperty("5月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty05;
|
||||
|
||||
/**
|
||||
* 6月
|
||||
*/
|
||||
@ApiModelProperty("6月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty06;
|
||||
|
||||
/**
|
||||
* 7月
|
||||
*/
|
||||
@ApiModelProperty("7月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty07;
|
||||
|
||||
/**
|
||||
* 8月
|
||||
*/
|
||||
@ApiModelProperty("8月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty08;
|
||||
|
||||
/**
|
||||
* 9月
|
||||
*/
|
||||
@ApiModelProperty("9月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty09;
|
||||
|
||||
/**
|
||||
* 10月
|
||||
*/
|
||||
@ApiModelProperty("10月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty10;
|
||||
|
||||
/**
|
||||
* 11月
|
||||
*/
|
||||
@ApiModelProperty("11月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty11;
|
||||
|
||||
/**
|
||||
* 12月
|
||||
*/
|
||||
@ApiModelProperty("12月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty12;
|
||||
|
||||
/**
|
||||
* 次年1月
|
||||
*/
|
||||
@ApiModelProperty("次年1月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyN1;
|
||||
|
||||
/**
|
||||
* 次年2月
|
||||
*/
|
||||
@ApiModelProperty("次年2月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyN2;
|
||||
|
||||
/**
|
||||
* 次年3月
|
||||
*/
|
||||
@ApiModelProperty("次年3月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyN3;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,220 @@
|
||||
package com.xjrsoft.module.plan.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-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_plan_year_demand")
|
||||
@ApiModel(value = "客户年度需求提报对象", description = "客户年度需求提报")
|
||||
public class LngPlanYearDemandEc implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 年度计划-需求-主表主键(lng_plan_year_demand_hdr.id)
|
||||
*/
|
||||
@ApiModelProperty("年度计划-需求-主表主键(lng_plan_year_demand_hdr.id)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long pydhId;
|
||||
|
||||
/**
|
||||
* 品种
|
||||
*/
|
||||
@ApiModelProperty("品种")
|
||||
private String catCode;
|
||||
|
||||
/**
|
||||
* 单位(隐藏)
|
||||
*/
|
||||
@ApiModelProperty("单位(隐藏)")
|
||||
private String uomCode;
|
||||
|
||||
/**
|
||||
* 1月
|
||||
*/
|
||||
@ApiModelProperty("1月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty01;
|
||||
|
||||
/**
|
||||
* 2月
|
||||
*/
|
||||
@ApiModelProperty("2月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty02;
|
||||
|
||||
/**
|
||||
* 3月
|
||||
*/
|
||||
@ApiModelProperty("3月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty03;
|
||||
|
||||
/**
|
||||
* 4月
|
||||
*/
|
||||
@ApiModelProperty("4月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty04;
|
||||
|
||||
/**
|
||||
* 5月
|
||||
*/
|
||||
@ApiModelProperty("5月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty05;
|
||||
|
||||
/**
|
||||
* 6月
|
||||
*/
|
||||
@ApiModelProperty("6月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty06;
|
||||
|
||||
/**
|
||||
* 7月
|
||||
*/
|
||||
@ApiModelProperty("7月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty07;
|
||||
|
||||
/**
|
||||
* 8月
|
||||
*/
|
||||
@ApiModelProperty("8月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty08;
|
||||
|
||||
/**
|
||||
* 9月
|
||||
*/
|
||||
@ApiModelProperty("9月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty09;
|
||||
|
||||
/**
|
||||
* 10月
|
||||
*/
|
||||
@ApiModelProperty("10月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty10;
|
||||
|
||||
/**
|
||||
* 11月
|
||||
*/
|
||||
@ApiModelProperty("11月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty11;
|
||||
|
||||
/**
|
||||
* 12月
|
||||
*/
|
||||
@ApiModelProperty("12月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qty12;
|
||||
|
||||
/**
|
||||
* 次年1月
|
||||
*/
|
||||
@ApiModelProperty("次年1月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyN1;
|
||||
|
||||
/**
|
||||
* 次年2月
|
||||
*/
|
||||
@ApiModelProperty("次年2月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyN2;
|
||||
|
||||
/**
|
||||
* 次年3月
|
||||
*/
|
||||
@ApiModelProperty("次年3月")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyN3;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,133 @@
|
||||
package com.xjrsoft.module.plan.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
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-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_plan_year_demand_hdr")
|
||||
@ApiModel(value = "客户年度需求提报对象", description = "客户年度需求提报")
|
||||
public class LngPlanYearDemandHdr implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 客户编码
|
||||
*/
|
||||
@ApiModelProperty("客户编码")
|
||||
private String cuCode;
|
||||
|
||||
/**
|
||||
* 年度
|
||||
*/
|
||||
@ApiModelProperty("年度")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Short planYear;
|
||||
|
||||
/**
|
||||
* 版本(自动生成,每客户每年从1开始)
|
||||
*/
|
||||
@ApiModelProperty("版本(自动生成,每客户每年从1开始)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Byte demandVerNo;
|
||||
|
||||
/**
|
||||
* 最新版(Y-是,N-否;每客户每年只有一个Y)
|
||||
*/
|
||||
@ApiModelProperty("最新版(Y-是,N-否;每客户每年只有一个Y)")
|
||||
private String lastSign;
|
||||
|
||||
/**
|
||||
* 审批状态(WTJ-未提交/YTJ-已提交/YBH-已驳回)
|
||||
*/
|
||||
@ApiModelProperty("审批状态(WTJ-未提交/YTJ-已提交/YBH-已驳回)")
|
||||
private String approCode;
|
||||
|
||||
/**
|
||||
* 批复意见
|
||||
*/
|
||||
@ApiModelProperty("批复意见")
|
||||
private String reply;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,137 @@
|
||||
package com.xjrsoft.module.plan.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-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_plan_year_demand_hdr")
|
||||
@ApiModel(value = "客户年度需求提报--电商对象", description = "客户年度需求提报--电商")
|
||||
public class LngPlanYearDemandHdrEc implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 客户编码
|
||||
*/
|
||||
@ApiModelProperty("客户编码")
|
||||
private String cuCode;
|
||||
|
||||
/**
|
||||
* 年度
|
||||
*/
|
||||
@ApiModelProperty("年度")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Short planYear;
|
||||
|
||||
/**
|
||||
* 版本(自动生成,每客户每年从1开始)
|
||||
*/
|
||||
@ApiModelProperty("版本(自动生成,每客户每年从1开始)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Byte demandVerNo;
|
||||
|
||||
/**
|
||||
* 最新版(Y-是,N-否;每客户每年只有一个Y)
|
||||
*/
|
||||
@ApiModelProperty("最新版(Y-是,N-否;每客户每年只有一个Y)")
|
||||
private String lastSign;
|
||||
|
||||
/**
|
||||
* 审批状态(WTJ-未提交/YTJ-已提交/YBH-已驳回)
|
||||
*/
|
||||
@ApiModelProperty("审批状态(WTJ-未提交/YTJ-已提交/YBH-已驳回)")
|
||||
private String approCode;
|
||||
|
||||
/**
|
||||
* 批复意见
|
||||
*/
|
||||
@ApiModelProperty("批复意见")
|
||||
private String reply;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.plan.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xjrsoft.module.plan.entity.LngPlanYearDemandHdrEc;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2026-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngPlanYearDemandHdrEcMapper extends BaseMapper<LngPlanYearDemandHdrEc> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.plan.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.plan.entity.LngPlanYearDemandHdr;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2026-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngPlanYearDemandHdrMapper extends BaseMapper<LngPlanYearDemandHdr> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.plan.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.plan.entity.LngPlanYearDemand;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2026-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngPlanYearDemandMapper extends MPJBaseMapper<LngPlanYearDemand> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.xjrsoft.module.plan.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjrsoft.module.plan.entity.LngPlanYearDemandHdrEc;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2026-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface IPlanYearDemandHdrEcService extends IService<LngPlanYearDemandHdrEc> {
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.xjrsoft.module.plan.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.github.yulichang.base.MPJBaseService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||
import com.xjrsoft.module.plan.entity.LngPlanYearDemandHdr;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2026-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface IPlanYearDemandHdrService extends IService<LngPlanYearDemandHdr> {
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.xjrsoft.module.plan.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjrsoft.module.plan.entity.LngPlanYearDemandHdrEc;
|
||||
import com.xjrsoft.module.plan.mapper.LngPlanYearDemandHdrEcMapper;
|
||||
import com.xjrsoft.module.plan.service.IPlanYearDemandHdrEcService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2026-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class PlanYearDemandHdrEcServiceImpl extends ServiceImpl<LngPlanYearDemandHdrEcMapper, LngPlanYearDemandHdrEc> implements IPlanYearDemandHdrEcService {
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.xjrsoft.module.plan.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||
import com.xjrsoft.module.plan.entity.LngPlanYearDemandHdr;
|
||||
import com.xjrsoft.module.plan.mapper.LngPlanYearDemandHdrMapper;
|
||||
import com.xjrsoft.module.plan.service.IPlanYearDemandHdrService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2026-04-09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class PlanYearDemandHdrServiceImpl extends ServiceImpl<LngPlanYearDemandHdrMapper, LngPlanYearDemandHdr> implements IPlanYearDemandHdrService {
|
||||
}
|
||||
Reference in New Issue
Block a user