修改pad接口返回值
This commit is contained in:
parent
6896e46b58
commit
ac0e8094d3
|
|
@ -39,6 +39,7 @@
|
|||
<groupId>com.github.wxpay</groupId>
|
||||
<artifactId>wxpay-sdk</artifactId>
|
||||
<version>0.0.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,9 @@ public class NuBaseInfoEntity implements Serializable {
|
|||
private BigDecimal balance;
|
||||
//摄像头信息
|
||||
private List<CameraInfoEntity> cameraInfo;
|
||||
//客户信息
|
||||
private CustomerInfoEntity customerInfo;
|
||||
//指令信息
|
||||
private List<CustomerDirectiveEntity> customerDirectiveDtoList;
|
||||
//温湿度信息 正常一个nuid对应一条数据
|
||||
private List<HumidDeviceEntity> humidDeviceList;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,174 @@
|
|||
package com.nu.modules.cgd.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdInfo;
|
||||
import com.nu.modules.cgd.service.INuInvoicingCgdInfoService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: nu_invoicing_cgd_info
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="nu_invoicing_cgd_info")
|
||||
@RestController
|
||||
@RequestMapping("/cgd/nuInvoicingCgdInfo")
|
||||
@Slf4j
|
||||
public class NuInvoicingCgdInfoController extends JeecgController<NuInvoicingCgdInfo, INuInvoicingCgdInfoService> {
|
||||
@Autowired
|
||||
private INuInvoicingCgdInfoService nuInvoicingCgdInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuInvoicingCgdInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "nu_invoicing_cgd_info-分页列表查询")
|
||||
@ApiOperation(value="nu_invoicing_cgd_info-分页列表查询", notes="nu_invoicing_cgd_info-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuInvoicingCgdInfo>> queryPageList(NuInvoicingCgdInfo nuInvoicingCgdInfo,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuInvoicingCgdInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingCgdInfo, req.getParameterMap());
|
||||
Page<NuInvoicingCgdInfo> page = new Page<NuInvoicingCgdInfo>(pageNo, pageSize);
|
||||
IPage<NuInvoicingCgdInfo> pageList = nuInvoicingCgdInfoService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuInvoicingCgdInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_invoicing_cgd_info-添加")
|
||||
@ApiOperation(value="nu_invoicing_cgd_info-添加", notes="nu_invoicing_cgd_info-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuInvoicingCgdInfo nuInvoicingCgdInfo) {
|
||||
nuInvoicingCgdInfoService.save(nuInvoicingCgdInfo);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuInvoicingCgdInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_invoicing_cgd_info-编辑")
|
||||
@ApiOperation(value="nu_invoicing_cgd_info-编辑", notes="nu_invoicing_cgd_info-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuInvoicingCgdInfo nuInvoicingCgdInfo) {
|
||||
nuInvoicingCgdInfoService.updateById(nuInvoicingCgdInfo);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_invoicing_cgd_info-通过id删除")
|
||||
@ApiOperation(value="nu_invoicing_cgd_info-通过id删除", notes="nu_invoicing_cgd_info-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuInvoicingCgdInfoService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_invoicing_cgd_info-批量删除")
|
||||
@ApiOperation(value="nu_invoicing_cgd_info-批量删除", notes="nu_invoicing_cgd_info-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuInvoicingCgdInfoService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "nu_invoicing_cgd_info-通过id查询")
|
||||
@ApiOperation(value="nu_invoicing_cgd_info-通过id查询", notes="nu_invoicing_cgd_info-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuInvoicingCgdInfo> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuInvoicingCgdInfo nuInvoicingCgdInfo = nuInvoicingCgdInfoService.getById(id);
|
||||
if(nuInvoicingCgdInfo==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuInvoicingCgdInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuInvoicingCgdInfo
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuInvoicingCgdInfo nuInvoicingCgdInfo) {
|
||||
return super.exportXls(request, nuInvoicingCgdInfo, NuInvoicingCgdInfo.class, "nu_invoicing_cgd_info");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuInvoicingCgdInfo.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
package com.nu.modules.cgd.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdMain;
|
||||
import com.nu.modules.cgd.service.INuInvoicingCgdMainService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: nu_invoicing_cgd_main
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="nu_invoicing_cgd_main")
|
||||
@RestController
|
||||
@RequestMapping("/cgd/nuInvoicingCgdMain")
|
||||
@Slf4j
|
||||
public class NuInvoicingCgdMainController extends JeecgController<NuInvoicingCgdMain, INuInvoicingCgdMainService> {
|
||||
@Autowired
|
||||
private INuInvoicingCgdMainService nuInvoicingCgdMainService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuInvoicingCgdMain
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "nu_invoicing_cgd_main-分页列表查询")
|
||||
@ApiOperation(value="nu_invoicing_cgd_main-分页列表查询", notes="nu_invoicing_cgd_main-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuInvoicingCgdMain>> queryPageList(NuInvoicingCgdMain nuInvoicingCgdMain,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuInvoicingCgdMain> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingCgdMain, req.getParameterMap());
|
||||
Page<NuInvoicingCgdMain> page = new Page<NuInvoicingCgdMain>(pageNo, pageSize);
|
||||
IPage<NuInvoicingCgdMain> pageList = nuInvoicingCgdMainService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuInvoicingCgdMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_invoicing_cgd_main-添加")
|
||||
@ApiOperation(value="nu_invoicing_cgd_main-添加", notes="nu_invoicing_cgd_main-添加")
|
||||
@RequiresPermissions("cgd:nu_invoicing_cgd_main:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuInvoicingCgdMain nuInvoicingCgdMain) {
|
||||
nuInvoicingCgdMainService.save(nuInvoicingCgdMain);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuInvoicingCgdMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_invoicing_cgd_main-编辑")
|
||||
@ApiOperation(value="nu_invoicing_cgd_main-编辑", notes="nu_invoicing_cgd_main-编辑")
|
||||
@RequiresPermissions("cgd:nu_invoicing_cgd_main:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuInvoicingCgdMain nuInvoicingCgdMain) {
|
||||
nuInvoicingCgdMainService.updateById(nuInvoicingCgdMain);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_invoicing_cgd_main-通过id删除")
|
||||
@ApiOperation(value="nu_invoicing_cgd_main-通过id删除", notes="nu_invoicing_cgd_main-通过id删除")
|
||||
@RequiresPermissions("cgd:nu_invoicing_cgd_main:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuInvoicingCgdMainService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "nu_invoicing_cgd_main-批量删除")
|
||||
@ApiOperation(value="nu_invoicing_cgd_main-批量删除", notes="nu_invoicing_cgd_main-批量删除")
|
||||
@RequiresPermissions("cgd:nu_invoicing_cgd_main:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuInvoicingCgdMainService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "nu_invoicing_cgd_main-通过id查询")
|
||||
@ApiOperation(value="nu_invoicing_cgd_main-通过id查询", notes="nu_invoicing_cgd_main-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuInvoicingCgdMain> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuInvoicingCgdMain nuInvoicingCgdMain = nuInvoicingCgdMainService.getById(id);
|
||||
if(nuInvoicingCgdMain==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuInvoicingCgdMain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuInvoicingCgdMain
|
||||
*/
|
||||
@RequiresPermissions("cgd:nu_invoicing_cgd_main:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuInvoicingCgdMain nuInvoicingCgdMain) {
|
||||
return super.exportXls(request, nuInvoicingCgdMain, NuInvoicingCgdMain.class, "nu_invoicing_cgd_main");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("cgd:nu_invoicing_cgd_main:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuInvoicingCgdMain.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
package com.nu.modules.cgd.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: nu_invoicing_cgd_info
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_invoicing_cgd_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_invoicing_cgd_info对象", description="nu_invoicing_cgd_info")
|
||||
public class NuInvoicingCgdInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private Date createTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private Date updateTime;
|
||||
/**sysOrgCode*/
|
||||
@ApiModelProperty(value = "sysOrgCode")
|
||||
private String sysOrgCode;
|
||||
/**请购单id*/
|
||||
@Excel(name = "请购单id", width = 15)
|
||||
@ApiModelProperty(value = "请购单id")
|
||||
private String mainId;
|
||||
/**采购单id*/
|
||||
@Excel(name = "采购单id", width = 15)
|
||||
@ApiModelProperty(value = "采购单id")
|
||||
private String cgdId;
|
||||
/**物料id*/
|
||||
@Excel(name = "物料id", width = 15)
|
||||
@ApiModelProperty(value = "物料id")
|
||||
private String wlId;
|
||||
/**物料编码*/
|
||||
@Excel(name = "物料编码", width = 15)
|
||||
@ApiModelProperty(value = "物料编码")
|
||||
private String wlMaterialNo;
|
||||
/**物料名称*/
|
||||
@Excel(name = "物料名称", width = 15)
|
||||
@ApiModelProperty(value = "物料名称")
|
||||
private String wlName;
|
||||
/**采购单位*/
|
||||
@Excel(name = "采购单位", width = 15)
|
||||
@ApiModelProperty(value = "采购单位")
|
||||
private String wlUnits;
|
||||
/**规格型号*/
|
||||
@Excel(name = "规格型号", width = 15)
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
private String wlSpecificationModel;
|
||||
/**上限*/
|
||||
@Excel(name = "上限", width = 15)
|
||||
@ApiModelProperty(value = "上限")
|
||||
private String wlUpperLimit;
|
||||
/**下限*/
|
||||
@Excel(name = "下限", width = 15)
|
||||
@ApiModelProperty(value = "下限")
|
||||
private String wlLowerLimit;
|
||||
/**供应商id*/
|
||||
@Excel(name = "供应商id", width = 15)
|
||||
@ApiModelProperty(value = "供应商id")
|
||||
private String suppliersId;
|
||||
/**供应商名称*/
|
||||
@Excel(name = "供应商名称", width = 15)
|
||||
@ApiModelProperty(value = "供应商名称")
|
||||
private String suppliersName;
|
||||
/**请购数量*/
|
||||
@Excel(name = "请购数量", width = 15)
|
||||
@ApiModelProperty(value = "请购数量")
|
||||
private Integer purchaseQuantity;
|
||||
/**银行*/
|
||||
@Excel(name = "银行", width = 15)
|
||||
@ApiModelProperty(value = "银行")
|
||||
private String brand;
|
||||
/**库房*/
|
||||
@Excel(name = "库房", width = 15)
|
||||
@ApiModelProperty(value = "库房")
|
||||
private String nuId;
|
||||
/**入库数量*/
|
||||
@Excel(name = "入库数量", width = 15)
|
||||
@ApiModelProperty(value = "入库数量")
|
||||
private String rksl;
|
||||
/**未入库数量*/
|
||||
@Excel(name = "未入库数量", width = 15)
|
||||
@ApiModelProperty(value = "未入库数量")
|
||||
private String wrksl;
|
||||
/**采购单价*/
|
||||
@Excel(name = "采购单价", width = 15)
|
||||
@ApiModelProperty(value = "采购单价")
|
||||
private String procurementPrice;
|
||||
/**到货单间*/
|
||||
@Excel(name = "到货单间", width = 15)
|
||||
@ApiModelProperty(value = "到货单间")
|
||||
private String arrivalPrice;
|
||||
}
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
package com.nu.modules.cgd.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: nu_invoicing_cgd_main
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_invoicing_cgd_main")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_invoicing_cgd_main对象", description="nu_invoicing_cgd_main")
|
||||
public class NuInvoicingCgdMain implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private Date createTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private Date updateTime;
|
||||
/**请购单id*/
|
||||
@Excel(name = "请购单id", width = 15)
|
||||
@ApiModelProperty(value = "请购单id")
|
||||
private String qgdId;
|
||||
/**采购单单号*/
|
||||
@Excel(name = "采购单单号", width = 15)
|
||||
@ApiModelProperty(value = "采购单单号")
|
||||
private String cgdNo;
|
||||
/**供应商id*/
|
||||
@Excel(name = "供应商id", width = 15)
|
||||
@ApiModelProperty(value = "供应商id")
|
||||
@Dict(dicCode = "id", dictTable = "nu_config_suppliers_info",dicText = "suppliers_name")
|
||||
private String gysId;
|
||||
/**请购时间*/
|
||||
@Excel(name = "请购时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "请购时间")
|
||||
private Date qgDate;
|
||||
/**请购人*/
|
||||
@Excel(name = "请购人", width = 15)
|
||||
@ApiModelProperty(value = "请购人")
|
||||
private String qgBy;
|
||||
/**供应商联系人*/
|
||||
@Excel(name = "供应商联系人", width = 15)
|
||||
@ApiModelProperty(value = "供应商联系人")
|
||||
private String gysLxr;
|
||||
/**供应商联系电话*/
|
||||
@Excel(name = "供应商联系电话", width = 15)
|
||||
@ApiModelProperty(value = "供应商联系电话")
|
||||
private String gysLxrdh;
|
||||
/**供应商openId*/
|
||||
@Excel(name = "供应商openId", width = 15)
|
||||
@ApiModelProperty(value = "供应商openId")
|
||||
private String gysOpenId;
|
||||
/**付款方式*/
|
||||
@Excel(name = "付款方式", width = 15)
|
||||
@ApiModelProperty(value = "付款方式")
|
||||
private String gysFkfs;
|
||||
/**状态 0:待采购 1:采购中 2采购完成 3作废*/
|
||||
@Excel(name = "状态 0:待采购 1:采购中 2采购完成 3作废", width = 15)
|
||||
@ApiModelProperty(value = "状态 0:待采购 1:采购中 2采购完成 3作废")
|
||||
private String status;
|
||||
/**采购单类型 0采购单 1挂帐单 2作废*/
|
||||
@Excel(name = "采购单类型 0采购单 1挂帐单 2作废", width = 15)
|
||||
@ApiModelProperty(value = "采购单类型 0采购单 1挂帐单 2作废")
|
||||
private String cgdType;
|
||||
/**随行单*/
|
||||
@Excel(name = "随行单", width = 15)
|
||||
@ApiModelProperty(value = "随行单")
|
||||
private String sxdPath;
|
||||
/**销账单*/
|
||||
@Excel(name = "销账单", width = 15)
|
||||
@ApiModelProperty(value = "销账单")
|
||||
private String xzdPath;
|
||||
/**结账单*/
|
||||
@Excel(name = "结账单", width = 15)
|
||||
@ApiModelProperty(value = "结账单")
|
||||
private String jzdPath;
|
||||
/**审核人*/
|
||||
@Excel(name = "审核人", width = 15)
|
||||
@ApiModelProperty(value = "审核人")
|
||||
private String reviewedBy;
|
||||
/**审核时间*/
|
||||
@Excel(name = "审核时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "审核时间")
|
||||
private Date reviewedTime;
|
||||
/**审核备注*/
|
||||
@Excel(name = "审核备注", width = 15)
|
||||
@ApiModelProperty(value = "审核备注")
|
||||
private String content;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.cgd.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: nu_invoicing_cgd_info
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuInvoicingCgdInfoMapper extends BaseMapper<NuInvoicingCgdInfo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.cgd.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdMain;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: nu_invoicing_cgd_main
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuInvoicingCgdMainMapper extends BaseMapper<NuInvoicingCgdMain> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.cgd.mapper.NuInvoicingCgdInfoMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.cgd.mapper.NuInvoicingCgdMainMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.cgd.service;
|
||||
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: nu_invoicing_cgd_info
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuInvoicingCgdInfoService extends IService<NuInvoicingCgdInfo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.cgd.service;
|
||||
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdMain;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: nu_invoicing_cgd_main
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuInvoicingCgdMainService extends IService<NuInvoicingCgdMain> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.cgd.service.impl;
|
||||
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdInfo;
|
||||
import com.nu.modules.cgd.mapper.NuInvoicingCgdInfoMapper;
|
||||
import com.nu.modules.cgd.service.INuInvoicingCgdInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: nu_invoicing_cgd_info
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuInvoicingCgdInfoServiceImpl extends ServiceImpl<NuInvoicingCgdInfoMapper, NuInvoicingCgdInfo> implements INuInvoicingCgdInfoService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.cgd.service.impl;
|
||||
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdMain;
|
||||
import com.nu.modules.cgd.mapper.NuInvoicingCgdMainMapper;
|
||||
import com.nu.modules.cgd.service.INuInvoicingCgdMainService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: nu_invoicing_cgd_main
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-09-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMainMapper, NuInvoicingCgdMain> implements INuInvoicingCgdMainService {
|
||||
|
||||
}
|
||||
|
|
@ -5,6 +5,8 @@ import java.util.List;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.nu.modules.cgd.service.INuInvoicingCgdInfoService;
|
||||
import com.nu.modules.cgd.service.INuInvoicingCgdMainService;
|
||||
import com.nu.modules.qgd.entity.QgdMain;
|
||||
import com.nu.modules.qgd.service.IQgdMainService;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
|
|
@ -45,6 +47,10 @@ public class QgdInfoController extends JeecgController<QgdInfo, IQgdInfoService>
|
|||
|
||||
@Autowired
|
||||
private IQgdMainService nuInvoicingQgdMainService;
|
||||
@Autowired
|
||||
private INuInvoicingCgdMainService nuInvoicingCgdMainService;
|
||||
@Autowired
|
||||
private INuInvoicingCgdInfoService nuInvoicingCgdInfoService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
|
@ -152,4 +158,10 @@ public class QgdInfoController extends JeecgController<QgdInfo, IQgdInfoService>
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(value = "/addCgdByUser")
|
||||
public Result<String> addCgd(QgdInfo nuInvoicingQgdInfo, HttpServletRequest req) {
|
||||
nuInvoicingQgdMainService.addCgdByUser(nuInvoicingQgdInfo);
|
||||
return Result.OK("已提交采购信息");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.nu.modules.qgd.service;
|
||||
|
||||
import com.nu.modules.qgd.entity.QgdInfo;
|
||||
import com.nu.modules.qgd.entity.QgdMain;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
|
@ -11,4 +12,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
*/
|
||||
public interface IQgdMainService extends IService<QgdMain> {
|
||||
|
||||
String addCgdByUser(QgdInfo nuInvoicingQgdInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,26 @@
|
|||
package com.nu.modules.qgd.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nu.modules.qgd.entity.QgdInfo;
|
||||
import com.nu.modules.qgd.entity.QgdMain;
|
||||
import com.nu.modules.qgd.mapper.QgdInfoMapper;
|
||||
import com.nu.modules.qgd.mapper.QgdMainMapper;
|
||||
import com.nu.modules.qgd.service.IQgdMainService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 请购单
|
||||
* @Author: jeecg-boot
|
||||
|
|
@ -16,4 +30,49 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
@Service
|
||||
public class QgdMainServiceImpl extends ServiceImpl<QgdMainMapper, QgdMain> implements IQgdMainService {
|
||||
|
||||
@Autowired
|
||||
private QgdInfoMapper qgdInfoMapper;
|
||||
|
||||
@Override
|
||||
public String addCgdByUser(QgdInfo nuInvoicingQgdInfo) {
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//查询当前人是否有请购数据
|
||||
QueryWrapper<QgdMain> mainQueryWrapper = new QueryWrapper<>();
|
||||
mainQueryWrapper.eq("create_by",sysUser.getUsername());
|
||||
mainQueryWrapper.eq("status",0);
|
||||
QgdMain qgdMain = baseMapper.selectOne(mainQueryWrapper);
|
||||
if(qgdMain == null){
|
||||
return "0";
|
||||
}
|
||||
//查询请购详细信息
|
||||
QueryWrapper<QgdInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("main_id",qgdMain.getId());
|
||||
List<QgdInfo> qgdInfoList = qgdInfoMapper.selectList(queryWrapper);
|
||||
|
||||
List<Map<String,Object>> mapList = new ArrayList<>();
|
||||
// 创建一个临时Map来按suppliersId分组
|
||||
Map<String, List<QgdInfo>> tempMap = new HashMap<>();
|
||||
|
||||
for (QgdInfo qgdInfo : qgdInfoList) {
|
||||
String suppliersId = qgdInfo.getSuppliersId();
|
||||
if (!tempMap.containsKey(suppliersId)) {
|
||||
tempMap.put(suppliersId, new ArrayList<>());
|
||||
}
|
||||
tempMap.get(suppliersId).add(qgdInfo);
|
||||
}
|
||||
|
||||
// 将临时Map转换为需要的mapList结构
|
||||
for (Map.Entry<String, List<QgdInfo>> entry : tempMap.entrySet()) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String suppliersId = entry.getKey();//供应商id
|
||||
List<QgdInfo> infoList = entry.getValue();//请购的物料列表
|
||||
map.put("suppliersId", entry.getKey());
|
||||
map.put("qgdInfoList", entry.getValue());
|
||||
mapList.add(map);
|
||||
}
|
||||
System.out.println(mapList);
|
||||
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import com.nu.entity.CameraInfoEntity;
|
||||
import com.nu.entity.CustomerDirectiveEntity;
|
||||
import com.nu.entity.CustomerInfoEntity;
|
||||
import com.nu.entity.ElderInfoEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -155,8 +156,10 @@ public class NuBaseInfo implements Serializable {
|
|||
//摄像头信息
|
||||
@TableField(exist = false)
|
||||
private List<CameraInfoEntity> cameraInfo;
|
||||
//客户信息
|
||||
@TableField(exist = false)
|
||||
private CustomerInfoEntity customerInfo;
|
||||
private ElderInfoEntity elderInfo;
|
||||
//客户指令信息
|
||||
@TableField(exist = false)
|
||||
private List<CustomerDirectiveEntity> customerDirectiveDtoList;
|
||||
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ public class NuBaseInfoServiceImpl extends ServiceImpl<NuBaseInfoMapper, NuBaseI
|
|||
IPage<NuBaseInfo> list = baseMapper.queryPadPageList(page, queryWrapper);
|
||||
//查询相应的摄像头信息
|
||||
List<CameraInfoEntity> cameraList = cameraInfoApiService.getCameraInfoList();
|
||||
|
||||
//查询未退住的老人
|
||||
List<ElderInfoEntity> customerList = elderInfoApi.selectCurrentState3();
|
||||
|
||||
|
|
@ -153,9 +154,9 @@ public class NuBaseInfoServiceImpl extends ServiceImpl<NuBaseInfoMapper, NuBaseI
|
|||
//赋值老人信息
|
||||
customerList.forEach(nuBizCustomerInfo -> {
|
||||
if (StringUtils.equals(ni.getNuId(), nuBizCustomerInfo.getNuId())) {
|
||||
CustomerInfoEntity customerInfo = new CustomerInfoEntity();
|
||||
ElderInfoEntity customerInfo = new ElderInfoEntity();
|
||||
BeanUtils.copyProperties(nuBizCustomerInfo, customerInfo);
|
||||
ni.setCustomerInfo(customerInfo);
|
||||
ni.setElderInfo(customerInfo);
|
||||
//根据客户id查询服务指令
|
||||
// List<NuCustomerDirective> customerDirectiveList = nuCustomerDirectiveService.list(new QueryWrapper<NuCustomerDirective>().lambda().eq(NuCustomerDirective::getCustomerId,customerInfo.getId()));
|
||||
// if(customerDirectiveList != null && customerDirectiveList.size() > 0){
|
||||
|
|
|
|||
Loading…
Reference in New Issue