@ -0,0 +1,187 @@ |
||||
package org.jeecg.modules.demo.depadminlx.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.apache.shiro.SecurityUtils; |
||||
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.system.vo.LoginUser; |
||||
import org.jeecg.common.util.oConvertUtils; |
||||
import org.jeecg.modules.demo.depadminlx.entity.Depadminlx; |
||||
import org.jeecg.modules.demo.depadminlx.service.IDepadminlxService; |
||||
|
||||
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; |
||||
|
||||
/** |
||||
* @Description: 单位基本情况联系人 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="单位基本情况联系人") |
||||
@RestController |
||||
@RequestMapping("/depadminlx/depadminlx") |
||||
@Slf4j |
||||
public class DepadminlxController extends JeecgController<Depadminlx, IDepadminlxService> { |
||||
@Autowired |
||||
private IDepadminlxService depadminlxService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param depadminlx |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "单位基本情况联系人-分页列表查询")
|
||||
@ApiOperation(value="单位基本情况联系人-分页列表查询", notes="单位基本情况联系人-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<IPage<Depadminlx>> queryPageList(Depadminlx depadminlx, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
||||
QueryWrapper<Depadminlx> queryWrapper = QueryGenerator.initQueryWrapper(depadminlx, req.getParameterMap()); |
||||
queryWrapper.eq("userid",user.getId()); |
||||
Page<Depadminlx> page = new Page<Depadminlx>(pageNo, pageSize); |
||||
IPage<Depadminlx> pageList = depadminlxService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param depadminlx |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "单位基本情况联系人-添加") |
||||
@ApiOperation(value="单位基本情况联系人-添加", notes="单位基本情况联系人-添加") |
||||
@PostMapping(value = "/add") |
||||
public Result<String> add(@RequestBody Depadminlx depadminlx) { |
||||
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
||||
String depiid = depadminlxService.getdepid(user.getId()); |
||||
List<Depadminlx> depadminlxes = depadminlxService.query().eq("depid",depiid).list(); |
||||
if (depadminlxes.size()>0){ |
||||
return Result.error("已经添加过了!"); |
||||
}else { |
||||
depadminlx.setUserid(user.getId()); |
||||
depadminlx.setDepid(depiid); |
||||
depadminlxService.save(depadminlx); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param depadminlx |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "单位基本情况联系人-编辑") |
||||
@ApiOperation(value="单位基本情况联系人-编辑", notes="单位基本情况联系人-编辑") |
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
||||
public Result<String> edit(@RequestBody Depadminlx depadminlx) { |
||||
depadminlxService.updateById(depadminlx); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "单位基本情况联系人-通过id删除") |
||||
@ApiOperation(value="单位基本情况联系人-通过id删除", notes="单位基本情况联系人-通过id删除") |
||||
@DeleteMapping(value = "/delete") |
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
||||
depadminlxService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "单位基本情况联系人-批量删除") |
||||
@ApiOperation(value="单位基本情况联系人-批量删除", notes="单位基本情况联系人-批量删除") |
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
||||
this.depadminlxService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "单位基本情况联系人-通过id查询")
|
||||
@ApiOperation(value="单位基本情况联系人-通过id查询", notes="单位基本情况联系人-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<Depadminlx> queryById(@RequestParam(name="id",required=true) String id) { |
||||
Depadminlx depadminlx = depadminlxService.getById(id); |
||||
if(depadminlx==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(depadminlx); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param depadminlx |
||||
*/ |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, Depadminlx depadminlx) { |
||||
return super.exportXls(request, depadminlx, Depadminlx.class, "单位基本情况联系人"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, Depadminlx.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,106 @@ |
||||
package org.jeecg.modules.demo.depadminlx.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: 单位基本情况联系人 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("depadminlx") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="depadminlx对象", description="单位基本情况联系人") |
||||
public class Depadminlx implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/**所属部门*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
private String sysOrgCode; |
||||
/**编制数*/ |
||||
@Excel(name = "编制数", width = 15) |
||||
@ApiModelProperty(value = "编制数") |
||||
private String bzs; |
||||
/**在职职工人数:*/ |
||||
@Excel(name = "在职职工人数:", width = 15) |
||||
@ApiModelProperty(value = "在职职工人数:") |
||||
private String zzzgrs; |
||||
/**中级职称以上研究人员数*/ |
||||
@Excel(name = "中级职称以上研究人员数", width = 15) |
||||
@ApiModelProperty(value = "中级职称以上研究人员数") |
||||
private String zjzcysyjrys; |
||||
/**单位联系人姓名*/ |
||||
@Excel(name = "单位联系人姓名", width = 15) |
||||
@ApiModelProperty(value = "单位联系人姓名") |
||||
private String dwlxrxm; |
||||
/**单位联系人职称*/ |
||||
@Excel(name = "单位联系人职称", width = 15) |
||||
@ApiModelProperty(value = "单位联系人职称") |
||||
private String dwlxrzc; |
||||
/**单位联系人职务*/ |
||||
@Excel(name = "单位联系人职务", width = 15) |
||||
@ApiModelProperty(value = "单位联系人职务") |
||||
private String dwlxrzw; |
||||
/**单位联系人电话*/ |
||||
@Excel(name = "单位联系人电话", width = 15) |
||||
@ApiModelProperty(value = "单位联系人电话") |
||||
private String dwlxrdh; |
||||
/**单位联系人手机*/ |
||||
@Excel(name = "单位联系人手机", width = 15) |
||||
@ApiModelProperty(value = "单位联系人手机") |
||||
private String dwlxrsj; |
||||
/**单位联系人邮箱*/ |
||||
@Excel(name = "单位联系人邮箱", width = 15) |
||||
@ApiModelProperty(value = "单位联系人邮箱") |
||||
private String dwlxryx; |
||||
/**部门*/ |
||||
@Excel(name = "部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") |
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") |
||||
@ApiModelProperty(value = "部门") |
||||
private String depid; |
||||
|
||||
/**用户id*/ |
||||
@Excel(name = "用户id", width = 15) |
||||
@ApiModelProperty(value = "用户id") |
||||
private java.lang.String userid; |
||||
} |
@ -0,0 +1,20 @@ |
||||
package org.jeecg.modules.demo.depadminlx.mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.apache.ibatis.annotations.Select; |
||||
import org.jeecg.modules.demo.depadminlx.entity.Depadminlx; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: 单位基本情况联系人 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface DepadminlxMapper extends BaseMapper<Depadminlx> { |
||||
|
||||
@Select("select dep_id from sys_user_depart where user_id=#{id}") |
||||
String getdepid(String id); |
||||
} |
@ -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="org.jeecg.modules.demo.depadminlx.mapper.DepadminlxMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,15 @@ |
||||
package org.jeecg.modules.demo.depadminlx.service; |
||||
|
||||
import org.jeecg.modules.demo.depadminlx.entity.Depadminlx; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: 单位基本情况联系人 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IDepadminlxService extends IService<Depadminlx> { |
||||
|
||||
String getdepid(String id); |
||||
} |
@ -0,0 +1,26 @@ |
||||
package org.jeecg.modules.demo.depadminlx.service.impl; |
||||
|
||||
import org.jeecg.modules.demo.depadminlx.entity.Depadminlx; |
||||
import org.jeecg.modules.demo.depadminlx.mapper.DepadminlxMapper; |
||||
import org.jeecg.modules.demo.depadminlx.service.IDepadminlxService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 单位基本情况联系人 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class DepadminlxServiceImpl extends ServiceImpl<DepadminlxMapper, Depadminlx> implements IDepadminlxService { |
||||
|
||||
@Autowired |
||||
private DepadminlxMapper depadminlxMapper; |
||||
@Override |
||||
public String getdepid(String id) { |
||||
return depadminlxMapper.getdepid(id); |
||||
} |
||||
} |
@ -0,0 +1,231 @@ |
||||
package org.jeecg.modules.demo.depfile.controller; |
||||
|
||||
import java.io.File; |
||||
import java.net.URL; |
||||
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 com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import org.apache.shiro.SecurityUtils; |
||||
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.system.vo.LoginUser; |
||||
import org.jeecg.common.util.oConvertUtils; |
||||
import org.jeecg.modules.demo.depadminlx.service.IDepadminlxService; |
||||
import org.jeecg.modules.demo.depfile.entity.Depfile; |
||||
import org.jeecg.modules.demo.depfile.service.IDepfileService; |
||||
|
||||
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.jeecg.modules.system.entity.SysDepart; |
||||
import org.jeecg.modules.system.service.ISysDepartService; |
||||
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; |
||||
|
||||
/** |
||||
* @Description: 单位技术研究资质情况 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="单位技术研究资质情况") |
||||
@RestController |
||||
@RequestMapping("/depfile/depfile") |
||||
@Slf4j |
||||
public class DepfileController extends JeecgController<Depfile, IDepfileService> { |
||||
@Autowired |
||||
private IDepfileService depfileService; |
||||
|
||||
@Autowired |
||||
private IDepadminlxService depadminlxService; |
||||
|
||||
@Autowired |
||||
private ISysDepartService iSysDepartService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param depfile |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "单位技术研究资质情况-分页列表查询")
|
||||
@ApiOperation(value="单位技术研究资质情况-分页列表查询", notes="单位技术研究资质情况-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<IPage<Depfile>> queryPageList(Depfile depfile, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
||||
QueryWrapper<Depfile> queryWrapper = QueryGenerator.initQueryWrapper(depfile, req.getParameterMap()); |
||||
queryWrapper.eq("userid",user.getId()); |
||||
Page<Depfile> page = new Page<Depfile>(pageNo, pageSize); |
||||
IPage<Depfile> pageList = depfileService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* @description: 申报书-单位管理员上传附件查询 |
||||
* @param: [depfile, pageNo, pageSize, req] |
||||
* @return: org.jeecg.common.api.vo.Result<com.baomidou.mybatisplus.core.metadata.IPage<org.jeecg.modules.demo.depfile.entity.Depfile>> |
||||
* @author: z.h.c |
||||
* @date: 24/11/1 16:38 |
||||
*/ |
||||
@ApiOperation(value="申报书-单位管理员上传附件查询", notes="申报书-单位管理员上传附件查询") |
||||
@GetMapping(value = "/getDepFileList") |
||||
public Result<IPage<Depfile>> getDepFileList(Depfile depfile, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode, depfile.getDepid())); |
||||
depfile.setDepid(sysDepart.getId()); |
||||
QueryWrapper<Depfile> queryWrapper = QueryGenerator.initQueryWrapper(depfile, req.getParameterMap()); |
||||
Page<Depfile> page = new Page<Depfile>(pageNo, pageSize); |
||||
IPage<Depfile> pageList = depfileService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param depfile |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "单位技术研究资质情况-添加") |
||||
@ApiOperation(value="单位技术研究资质情况-添加", notes="单位技术研究资质情况-添加") |
||||
@PostMapping(value = "/add") |
||||
public Result<String> add(@RequestBody Depfile depfile) { |
||||
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
||||
depfile.setUserid(user.getId()); |
||||
String depiid = depadminlxService.getdepid(user.getId()); |
||||
depfile.setDepid(depiid); |
||||
String extension = getFileExtensionFromUrl(depfile.getUpfile()); |
||||
System.out.println(depfile.getUpfile()); |
||||
System.out.println(depfile.getUpfile()); |
||||
depfile.setFilehz(extension); |
||||
depfileService.save(depfile); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param depfile |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "单位技术研究资质情况-编辑") |
||||
@ApiOperation(value="单位技术研究资质情况-编辑", notes="单位技术研究资质情况-编辑") |
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
||||
public Result<String> edit(@RequestBody Depfile depfile) { |
||||
String extension = getFileExtensionFromUrl(depfile.getUpfile()); |
||||
depfile.setFilehz(extension); |
||||
System.out.println(depfile.getUpfile()); |
||||
System.out.println(depfile.getUpfile()); |
||||
depfileService.updateById(depfile); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "单位技术研究资质情况-通过id删除") |
||||
@ApiOperation(value="单位技术研究资质情况-通过id删除", notes="单位技术研究资质情况-通过id删除") |
||||
@DeleteMapping(value = "/delete") |
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
||||
depfileService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "单位技术研究资质情况-批量删除") |
||||
@ApiOperation(value="单位技术研究资质情况-批量删除", notes="单位技术研究资质情况-批量删除") |
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
||||
this.depfileService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "单位技术研究资质情况-通过id查询")
|
||||
@ApiOperation(value="单位技术研究资质情况-通过id查询", notes="单位技术研究资质情况-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<Depfile> queryById(@RequestParam(name="id",required=true) String id) { |
||||
Depfile depfile = depfileService.getById(id); |
||||
if(depfile==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(depfile); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param depfile |
||||
*/ |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, Depfile depfile) { |
||||
return super.exportXls(request, depfile, Depfile.class, "单位技术研究资质情况"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, Depfile.class); |
||||
|
||||
|
||||
} |
||||
public static String getFileExtensionFromUrl(String fileUrl) { |
||||
|
||||
File file = new File(fileUrl); |
||||
String fileName = file.getName(); |
||||
String extension = fileName.substring(fileName.lastIndexOf(".") + 1); |
||||
return extension; |
||||
} |
||||
} |
@ -0,0 +1,98 @@ |
||||
package org.jeecg.modules.demo.depfile.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: 单位技术研究资质情况 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("depfile") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="depfile对象", description="单位技术研究资质情况") |
||||
public class Depfile implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/**所属部门*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
private String sysOrgCode; |
||||
/**部门名称*/ |
||||
@Excel(name = "部门名称", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") |
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") |
||||
@ApiModelProperty(value = "部门名称") |
||||
private String depid; |
||||
/**名称*/ |
||||
@Excel(name = "名称", width = 15) |
||||
@ApiModelProperty(value = "名称") |
||||
private String filename; |
||||
/**认定部门及批号*/ |
||||
@Excel(name = "认定部门及批号", width = 15) |
||||
@ApiModelProperty(value = "认定部门及批号") |
||||
private String depnumber; |
||||
/**认定时间*/ |
||||
@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 rdtime; |
||||
/**文件*/ |
||||
@Excel(name = "文件", width = 15) |
||||
@ApiModelProperty(value = "文件") |
||||
private String upfile; |
||||
|
||||
/**用户id*/ |
||||
@Excel(name = "用户id", width = 15) |
||||
@ApiModelProperty(value = "用户id") |
||||
private java.lang.String userid; |
||||
|
||||
/**文件后缀*/ |
||||
@Excel(name = "文件后缀", width = 15) |
||||
@ApiModelProperty(value = "文件后缀") |
||||
private java.lang.String filehz; |
||||
/**文件类型*/ |
||||
@Excel(name = "文件类型", width = 15, dicCode = "filetext") |
||||
@Dict(dicCode = "filetext") |
||||
@ApiModelProperty(value = "文件类型") |
||||
private java.lang.String filelx; |
||||
} |
@ -0,0 +1,17 @@ |
||||
package org.jeecg.modules.demo.depfile.mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.jeecg.modules.demo.depfile.entity.Depfile; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: 单位技术研究资质情况 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface DepfileMapper extends BaseMapper<Depfile> { |
||||
|
||||
} |
@ -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="org.jeecg.modules.demo.depfile.mapper.DepfileMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.demo.depfile.service; |
||||
|
||||
import org.jeecg.modules.demo.depfile.entity.Depfile; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: 单位技术研究资质情况 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IDepfileService extends IService<Depfile> { |
||||
|
||||
} |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.demo.depfile.service.impl; |
||||
|
||||
import org.jeecg.modules.demo.depfile.entity.Depfile; |
||||
import org.jeecg.modules.demo.depfile.mapper.DepfileMapper; |
||||
import org.jeecg.modules.demo.depfile.service.IDepfileService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 单位技术研究资质情况 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class DepfileServiceImpl extends ServiceImpl<DepfileMapper, Depfile> implements IDepfileService { |
||||
|
||||
} |
@ -0,0 +1,228 @@ |
||||
package org.jeecg.modules.demo.depsbncz.controller; |
||||
|
||||
import java.time.LocalDate; |
||||
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 com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import org.apache.shiro.SecurityUtils; |
||||
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.system.vo.LoginUser; |
||||
import org.jeecg.common.util.oConvertUtils; |
||||
import org.jeecg.modules.demo.annual.entity.Annual; |
||||
import org.jeecg.modules.demo.annual.service.IAnnualService; |
||||
import org.jeecg.modules.demo.depadminlx.service.IDepadminlxService; |
||||
import org.jeecg.modules.demo.depsbncz.entity.Depsbncz; |
||||
import org.jeecg.modules.demo.depsbncz.service.IDepsbnczService; |
||||
|
||||
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.jeecg.modules.system.entity.SysDepart; |
||||
import org.jeecg.modules.system.service.ISysDepartService; |
||||
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; |
||||
|
||||
|
||||
/** |
||||
* @Description: 上年度(末)主要财务数据 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="上年度(末)主要财务数据") |
||||
@RestController |
||||
@RequestMapping("/depsbncz/depsbncz") |
||||
@Slf4j |
||||
public class DepsbnczController extends JeecgController<Depsbncz, IDepsbnczService> { |
||||
@Autowired |
||||
private IDepsbnczService depsbnczService; |
||||
@Autowired |
||||
private IDepadminlxService depadminlxService; |
||||
@Autowired |
||||
private IAnnualService annualService; |
||||
@Autowired |
||||
private ISysDepartService iSysDepartService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param depsbncz |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "上年度(末)主要财务数据-分页列表查询")
|
||||
@ApiOperation(value="上年度(末)主要财务数据-分页列表查询", notes="上年度(末)主要财务数据-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<IPage<Depsbncz>> queryPageList(Depsbncz depsbncz, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
||||
QueryWrapper<Depsbncz> queryWrapper = QueryGenerator.initQueryWrapper(depsbncz, req.getParameterMap()); |
||||
queryWrapper.eq("userid",user.getId()); |
||||
Page<Depsbncz> page = new Page<Depsbncz>(pageNo, pageSize); |
||||
IPage<Depsbncz> pageList = depsbnczService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
@ApiOperation(value="预算书-部门基本情况-上年度(末)主要财务数据", notes="预算书-部门基本情况-上年度(末)主要财务数据") |
||||
@GetMapping(value = "/getBydepid") |
||||
public Result<IPage<Depsbncz>> getBydepid(Depsbncz depsbncz, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode, depsbncz.getDepid())); |
||||
depsbncz.setDepid(sysDepart.getId()); |
||||
QueryWrapper<Depsbncz> queryWrapper = QueryGenerator.initQueryWrapper(depsbncz, req.getParameterMap()); |
||||
Page<Depsbncz> page = new Page<Depsbncz>(pageNo, pageSize); |
||||
IPage<Depsbncz> pageList = depsbnczService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param depsbncz |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "上年度(末)主要财务数据-添加") |
||||
@ApiOperation(value="上年度(末)主要财务数据-添加", notes="上年度(末)主要财务数据-添加") |
||||
@PostMapping(value = "/add") |
||||
public Result<String> add(@RequestBody Depsbncz depsbncz) { |
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
||||
depsbncz.setUserid(user.getId()); |
||||
String depiid = depadminlxService.getdepid(user.getId()); |
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now(); |
||||
// 获取当前年份并直接转换为字符串
|
||||
String currentYearString = String.valueOf(currentDate.getYear()); |
||||
Annual annual = annualService.query().eq("annual_name",currentYearString).one(); |
||||
List<Depsbncz> depsbnczs=depsbnczService.query().eq("annualid",annual.getId()).eq("depid",depiid).list(); |
||||
if (depsbnczs.size()>0){ |
||||
return Result.error("本年度已经添加过了"); |
||||
}else { |
||||
depsbncz.setAnnualid(annual.getId()); |
||||
depsbncz.setDepid(depiid); |
||||
depsbnczService.save(depsbncz); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param depsbncz |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "上年度(末)主要财务数据-编辑") |
||||
@ApiOperation(value="上年度(末)主要财务数据-编辑", notes="上年度(末)主要财务数据-编辑") |
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
||||
public Result<String> edit(@RequestBody Depsbncz depsbncz) { |
||||
depsbnczService.updateById(depsbncz); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "上年度(末)主要财务数据-通过id删除") |
||||
@ApiOperation(value="上年度(末)主要财务数据-通过id删除", notes="上年度(末)主要财务数据-通过id删除") |
||||
@DeleteMapping(value = "/delete") |
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
||||
depsbnczService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "上年度(末)主要财务数据-批量删除") |
||||
@ApiOperation(value="上年度(末)主要财务数据-批量删除", notes="上年度(末)主要财务数据-批量删除") |
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
||||
this.depsbnczService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "上年度(末)主要财务数据-通过id查询")
|
||||
@ApiOperation(value="上年度(末)主要财务数据-通过id查询", notes="上年度(末)主要财务数据-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<Depsbncz> queryById(@RequestParam(name="id",required=true) String id) { |
||||
Depsbncz depsbncz = depsbnczService.getById(id); |
||||
if(depsbncz==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(depsbncz); |
||||
} |
||||
|
||||
@ApiOperation(value="上年度(末)主要财务数据-通过depid查询", notes="上年度(末)主要财务数据-通过depid查询") |
||||
@GetMapping(value = "/queryBydepid/{depid}") |
||||
public Result<List<Depsbncz>> queryBydepid(@PathVariable("depid") String depid) { |
||||
List<Depsbncz> list = depsbnczService.list(new LambdaQueryWrapper<Depsbncz>().eq(Depsbncz::getDepid, depid)); |
||||
return Result.OK(list); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param depsbncz |
||||
*/ |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, Depsbncz depsbncz) { |
||||
return super.exportXls(request, depsbncz, Depsbncz.class, "上年度(末)主要财务数据"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, Depsbncz.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,116 @@ |
||||
package org.jeecg.modules.demo.depsbncz.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: 上年度(末)主要财务数据 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("depsbncz") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="depsbncz对象", description="上年度(末)主要财务数据") |
||||
public class Depsbncz implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/**所属部门*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
private String sysOrgCode; |
||||
/**部门*/ |
||||
@Excel(name = "部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") |
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") |
||||
@ApiModelProperty(value = "部门") |
||||
private String depid; |
||||
/**单位开办费*/ |
||||
@Excel(name = "单位开办费", width = 15) |
||||
@ApiModelProperty(value = "单位开办费") |
||||
private String dwkbf; |
||||
/**资产合计*/ |
||||
@Excel(name = "资产合计", width = 15) |
||||
@ApiModelProperty(value = "资产合计") |
||||
private String zchj; |
||||
/**负债合计*/ |
||||
@Excel(name = "负债合计", width = 15) |
||||
@ApiModelProperty(value = "负债合计") |
||||
private String fzhj; |
||||
/**净资产*/ |
||||
@Excel(name = "净资产", width = 15) |
||||
@ApiModelProperty(value = "净资产") |
||||
private String jzc; |
||||
/**财政拨款*/ |
||||
@Excel(name = "财政拨款", width = 15) |
||||
@ApiModelProperty(value = "财政拨款") |
||||
private String czbk; |
||||
/**财政拨款专项支出*/ |
||||
@Excel(name = "财政拨款专项支出", width = 15) |
||||
@ApiModelProperty(value = "财政拨款专项支出") |
||||
private String czbkzxzc; |
||||
/**经营收入*/ |
||||
@Excel(name = "经营收入", width = 15) |
||||
@ApiModelProperty(value = "经营收入") |
||||
private String jysr; |
||||
/**经营支出*/ |
||||
@Excel(name = "经营支出", width = 15) |
||||
@ApiModelProperty(value = "经营支出") |
||||
private String jyzc; |
||||
/**经营结余*/ |
||||
@Excel(name = "经营结余", width = 15) |
||||
@ApiModelProperty(value = "经营结余") |
||||
private String jyjy; |
||||
/**纳税总额*/ |
||||
@Excel(name = "纳税总额", width = 15) |
||||
@ApiModelProperty(value = "纳税总额") |
||||
private String nsze; |
||||
|
||||
/**用户id*/ |
||||
@Excel(name = "用户id", width = 15) |
||||
@ApiModelProperty(value = "用户id") |
||||
private java.lang.String userid; |
||||
|
||||
/**年度*/ |
||||
@Excel(name = "年度", width = 15, dictTable = "annual", dicText = "annual_name", dicCode = "id") |
||||
@Dict(dictTable = "annual", dicText = "annual_name", dicCode = "id") |
||||
@ApiModelProperty(value = "年度") |
||||
private java.lang.String annualid; |
||||
} |
@ -0,0 +1,17 @@ |
||||
package org.jeecg.modules.demo.depsbncz.mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.jeecg.modules.demo.depsbncz.entity.Depsbncz; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: 上年度(末)主要财务数据 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface DepsbnczMapper extends BaseMapper<Depsbncz> { |
||||
|
||||
} |
@ -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="org.jeecg.modules.demo.depsbncz.mapper.DepsbnczMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.demo.depsbncz.service; |
||||
|
||||
import org.jeecg.modules.demo.depsbncz.entity.Depsbncz; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: 上年度(末)主要财务数据 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IDepsbnczService extends IService<Depsbncz> { |
||||
|
||||
} |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.demo.depsbncz.service.impl; |
||||
|
||||
import org.jeecg.modules.demo.depsbncz.entity.Depsbncz; |
||||
import org.jeecg.modules.demo.depsbncz.mapper.DepsbnczMapper; |
||||
import org.jeecg.modules.demo.depsbncz.service.IDepsbnczService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 上年度(末)主要财务数据 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-01 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class DepsbnczServiceImpl extends ServiceImpl<DepsbnczMapper, Depsbncz> implements IDepsbnczService { |
||||
|
||||
} |
@ -0,0 +1,10 @@ |
||||
package org.jeecg.modules.demo.expert.entity; |
||||
|
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class ExpCmsVo { |
||||
private String realname; |
||||
private String avatar; |
||||
private String userinfo; |
||||
} |
@ -0,0 +1,9 @@ |
||||
package org.jeecg.modules.demo.expert.entity; |
||||
|
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class ExpdefVo { |
||||
private String name; |
||||
private Integer number; |
||||
} |
@ -0,0 +1,15 @@ |
||||
[ |
||||
{"budgetSubject":"设备费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""}, |
||||
{"budgetSubject":"材料费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} |
||||
{"budgetSubject":"测试化验加工费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} |
||||
{"budgetSubject":"燃料动力费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} |
||||
{"budgetSubject":"差旅费/会议费/国际合作与交流费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} |
||||
{"budgetSubject":"出版/文献/信息传播/知识产权事务费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} |
||||
{"budgetSubject":"劳务费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} |
||||
{"budgetSubject":"专家咨询费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} |
||||
{"budgetSubject":"其他支出","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} |
||||
{"budgetSubject":"本次申请省财政经费支持","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} |
||||
{"budgetSubject":"其他财政拨款","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} |
||||
{"budgetSubject":"单位自有货币资金","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} |
||||
{"budgetSubject":"其他资金","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} |
||||
] |
@ -0,0 +1,70 @@ |
||||
package org.jeecg.modules.demo.project.dto; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
|
||||
/** |
||||
* @Description: TODO |
||||
* @Author: Z.H.C |
||||
* @CreateTime: 2024-10-24 11:09 |
||||
* @Version: 1.0 |
||||
*/ |
||||
@Data |
||||
public class DepartExtDto2 extends DepartExtDto { |
||||
|
||||
|
||||
@Excel(name = "编制数", width = 15) |
||||
@ApiModelProperty(value = "编制数") |
||||
private String bzs; |
||||
/** |
||||
* 在职职工人数: |
||||
*/ |
||||
@Excel(name = "在职职工人数:", width = 15) |
||||
@ApiModelProperty(value = "在职职工人数:") |
||||
private String zzzgrs; |
||||
/** |
||||
* 中级职称以上研究人员数 |
||||
*/ |
||||
@Excel(name = "中级职称以上研究人员数", width = 15) |
||||
@ApiModelProperty(value = "中级职称以上研究人员数") |
||||
private String zjzcysyjrys; |
||||
/** |
||||
* 单位联系人姓名 |
||||
*/ |
||||
@Excel(name = "单位联系人姓名", width = 15) |
||||
@ApiModelProperty(value = "单位联系人姓名") |
||||
private String dwlxrxm; |
||||
/** |
||||
* 单位联系人职称 |
||||
*/ |
||||
@Excel(name = "单位联系人职称", width = 15) |
||||
@ApiModelProperty(value = "单位联系人职称") |
||||
private String dwlxrzc; |
||||
/** |
||||
* 单位联系人职务 |
||||
*/ |
||||
@Excel(name = "单位联系人职务", width = 15) |
||||
@ApiModelProperty(value = "单位联系人职务") |
||||
private String dwlxrzw; |
||||
/** |
||||
* 单位联系人电话 |
||||
*/ |
||||
@Excel(name = "单位联系人电话", width = 15) |
||||
@ApiModelProperty(value = "单位联系人电话") |
||||
private String dwlxrdh; |
||||
/** |
||||
* 单位联系人手机 |
||||
*/ |
||||
@Excel(name = "单位联系人手机", width = 15) |
||||
@ApiModelProperty(value = "单位联系人手机") |
||||
private String dwlxrsj; |
||||
/** |
||||
* 单位联系人邮箱 |
||||
*/ |
||||
@Excel(name = "单位联系人邮箱", width = 15) |
||||
@ApiModelProperty(value = "单位联系人邮箱") |
||||
private String dwlxryx; |
||||
|
||||
|
||||
} |
@ -0,0 +1,188 @@ |
||||
package org.jeecg.modules.demo.projectAnnualBudget.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
||||
import org.jeecg.common.api.vo.Result; |
||||
import org.jeecg.common.aspect.annotation.AutoLog; |
||||
import org.jeecg.common.exception.JeecgBootException; |
||||
import org.jeecg.common.system.base.controller.JeecgController; |
||||
import org.jeecg.common.system.query.QueryGenerator; |
||||
import org.jeecg.modules.demo.project.entity.Project; |
||||
import org.jeecg.modules.demo.project.service.IProjectService; |
||||
import org.jeecg.modules.demo.projectAnnualBudget.entity.ProjectAnnualBudget; |
||||
import org.jeecg.modules.demo.projectAnnualBudget.service.IProjectAnnualBudgetService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.math.BigDecimal; |
||||
import java.util.Arrays; |
||||
import java.util.LinkedList; |
||||
import java.util.List; |
||||
import java.util.Optional; |
||||
|
||||
/** |
||||
* @Description: 财政拨款分单位年度预算 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-10-31 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags = "财政拨款分单位年度预算") |
||||
@RestController |
||||
@RequestMapping("/projectAnnualBudget/projectAnnualBudget") |
||||
@Slf4j |
||||
public class ProjectAnnualBudgetController extends JeecgController<ProjectAnnualBudget, IProjectAnnualBudgetService> { |
||||
@Autowired |
||||
private IProjectAnnualBudgetService projectAnnualBudgetService; |
||||
|
||||
@Autowired |
||||
private IProjectService iProjectService; |
||||
|
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param projectAnnualBudget |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "财政拨款分单位年度预算-分页列表查询")
|
||||
@ApiOperation(value = "财政拨款分单位年度预算-分页列表查询", notes = "财政拨款分单位年度预算-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<IPage<ProjectAnnualBudget>> queryPageList(ProjectAnnualBudget projectAnnualBudget, |
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
QueryWrapper<ProjectAnnualBudget> queryWrapper = QueryGenerator.initQueryWrapper(projectAnnualBudget, req.getParameterMap()); |
||||
Page<ProjectAnnualBudget> page = new Page<ProjectAnnualBudget>(pageNo, pageSize); |
||||
IPage<ProjectAnnualBudget> pageList = projectAnnualBudgetService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "财政拨款分单位年度预算-添加") |
||||
@ApiOperation(value = "财政拨款分单位年度预算-添加", notes = "财政拨款分单位年度预算-添加") |
||||
// @RequiresPermissions("projectAnnualBudget:project_annual_budget:add")
|
||||
@PostMapping(value = "/add/{projectId}") |
||||
public Result<String> add(@PathVariable("projectId") String projectId, @RequestBody ProjectAnnualBudget projectAnnualBudget) { |
||||
Project project = iProjectService.getById(projectId); |
||||
Optional.ofNullable(project).orElseThrow(() -> new JeecgBootException("项目不存在")); |
||||
projectAnnualBudgetService.remove(new LambdaQueryWrapper<ProjectAnnualBudget>().eq(ProjectAnnualBudget::getProjectId, projectId)); |
||||
projectAnnualBudgetService.save(projectAnnualBudget); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param projectAnnualBudget |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "财政拨款分单位年度预算-编辑") |
||||
@ApiOperation(value = "财政拨款分单位年度预算-编辑", notes = "财政拨款分单位年度预算-编辑") |
||||
// @RequiresPermissions("projectAnnualBudget:project_annual_budget:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
||||
public Result<String> edit(@RequestBody ProjectAnnualBudget projectAnnualBudget) { |
||||
projectAnnualBudgetService.updateById(projectAnnualBudget); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "财政拨款分单位年度预算-通过id删除") |
||||
@ApiOperation(value = "财政拨款分单位年度预算-通过id删除", notes = "财政拨款分单位年度预算-通过id删除") |
||||
// @RequiresPermissions("projectAnnualBudget:project_annual_budget:delete")
|
||||
@DeleteMapping(value = "/delete") |
||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) { |
||||
projectAnnualBudgetService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "财政拨款分单位年度预算-批量删除") |
||||
@ApiOperation(value = "财政拨款分单位年度预算-批量删除", notes = "财政拨款分单位年度预算-批量删除") |
||||
// @RequiresPermissions("projectAnnualBudget:project_annual_budget:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
||||
this.projectAnnualBudgetService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "财政拨款分单位年度预算-通过id查询")
|
||||
@ApiOperation(value = "财政拨款分单位年度预算-通过id查询", notes = "财政拨款分单位年度预算-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<ProjectAnnualBudget> queryById(@RequestParam(name = "id", required = true) String id) { |
||||
ProjectAnnualBudget projectAnnualBudget = projectAnnualBudgetService.getById(id); |
||||
if (projectAnnualBudget == null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(projectAnnualBudget); |
||||
} |
||||
|
||||
@ApiOperation(value = "财政拨款分单位年度预算-通过id查询", notes = "财政拨款分单位年度预算-通过id查询") |
||||
@GetMapping(value = "/queryByProjectId/{projectId}") |
||||
public Result<ProjectAnnualBudget> queryByProjectId(@PathVariable("projectId") String projectId) { |
||||
ProjectAnnualBudget projectAnnualBudget = projectAnnualBudgetService.getOne(new LambdaQueryWrapper<ProjectAnnualBudget>().eq(ProjectAnnualBudget::getProjectId,projectId)); |
||||
if (projectAnnualBudget == null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(projectAnnualBudget); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param projectAnnualBudget |
||||
*/ |
||||
// @RequiresPermissions("projectAnnualBudget:project_annual_budget:exportXls")
|
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectAnnualBudget projectAnnualBudget) { |
||||
return super.exportXls(request, projectAnnualBudget, ProjectAnnualBudget.class, "财政拨款分单位年度预算"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
@RequiresPermissions("projectAnnualBudget:project_annual_budget:importExcel") |
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, ProjectAnnualBudget.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,120 @@ |
||||
package org.jeecg.modules.demo.projectAnnualBudget.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @Description: 财政拨款分单位年度预算 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-10-31 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("project_annual_budget") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value = "project_annual_budget对象", description = "财政拨款分单位年度预算") |
||||
public class ProjectAnnualBudget implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 主键 |
||||
*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/** |
||||
* 创建人 |
||||
*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/** |
||||
* 创建日期 |
||||
*/ |
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/** |
||||
* 更新人 |
||||
*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/** |
||||
* 更新日期 |
||||
*/ |
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/** |
||||
* 所属部门 |
||||
*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
private String sysOrgCode; |
||||
/** |
||||
* 项目id |
||||
*/ |
||||
@Excel(name = "项目id", width = 15) |
||||
@ApiModelProperty(value = "项目id") |
||||
private String projectId; |
||||
|
||||
@Excel(name = "年度1", width = 15) |
||||
@ApiModelProperty(value = "年度1") |
||||
private String year1; |
||||
/** |
||||
* 年度2 |
||||
*/ |
||||
@Excel(name = "年度2", width = 15) |
||||
@ApiModelProperty(value = "年度2") |
||||
private String year2; |
||||
/** |
||||
* 年度3 |
||||
*/ |
||||
@Excel(name = "年度3", width = 15) |
||||
@ApiModelProperty(value = "年度3") |
||||
private String year3; |
||||
|
||||
@Excel(name = "年度1", width = 15) |
||||
@ApiModelProperty(value = "年度1") |
||||
private String year1Value; |
||||
/** |
||||
* 年度2 |
||||
*/ |
||||
@Excel(name = "年度2", width = 15) |
||||
@ApiModelProperty(value = "年度2") |
||||
private String year2Value; |
||||
/** |
||||
* 年度3 |
||||
*/ |
||||
@Excel(name = "年度3", width = 15) |
||||
@ApiModelProperty(value = "年度3") |
||||
private String year3Value; |
||||
|
||||
|
||||
/** |
||||
* 部门名称 |
||||
*/ |
||||
@Excel(name = "部门名称", width = 15) |
||||
@ApiModelProperty(value = "部门名称") |
||||
private String departName; |
||||
/** |
||||
* 总金额 |
||||
*/ |
||||
@Excel(name = "总金额", width = 15) |
||||
@ApiModelProperty(value = "总金额") |
||||
private BigDecimal totalAmount; |
||||
} |
@ -0,0 +1,17 @@ |
||||
package org.jeecg.modules.demo.projectAnnualBudget.mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.jeecg.modules.demo.projectAnnualBudget.entity.ProjectAnnualBudget; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: 财政拨款分单位年度预算 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-10-31 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface ProjectAnnualBudgetMapper extends BaseMapper<ProjectAnnualBudget> { |
||||
|
||||
} |
@ -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="org.jeecg.modules.demo.projectAnnualBudget.mapper.ProjectAnnualBudgetMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.demo.projectAnnualBudget.service; |
||||
|
||||
import org.jeecg.modules.demo.projectAnnualBudget.entity.ProjectAnnualBudget; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: 财政拨款分单位年度预算 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-10-31 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IProjectAnnualBudgetService extends IService<ProjectAnnualBudget> { |
||||
|
||||
} |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.demo.projectAnnualBudget.service.impl; |
||||
|
||||
import org.jeecg.modules.demo.projectAnnualBudget.entity.ProjectAnnualBudget; |
||||
import org.jeecg.modules.demo.projectAnnualBudget.mapper.ProjectAnnualBudgetMapper; |
||||
import org.jeecg.modules.demo.projectAnnualBudget.service.IProjectAnnualBudgetService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 财政拨款分单位年度预算 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-10-31 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class ProjectAnnualBudgetServiceImpl extends ServiceImpl<ProjectAnnualBudgetMapper, ProjectAnnualBudget> implements IProjectAnnualBudgetService { |
||||
|
||||
} |
@ -0,0 +1,202 @@ |
||||
package org.jeecg.modules.demo.projectFeeBudget.controller; |
||||
|
||||
import com.alibaba.fastjson.JSONArray; |
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
||||
import org.jeecg.common.api.vo.Result; |
||||
import org.jeecg.common.aspect.annotation.AutoLog; |
||||
import org.jeecg.common.exception.JeecgBootException; |
||||
import org.jeecg.common.system.base.controller.JeecgController; |
||||
import org.jeecg.common.system.query.QueryGenerator; |
||||
import org.jeecg.common.util.UUIDGenerator; |
||||
import org.jeecg.modules.demo.project.entity.Project; |
||||
import org.jeecg.modules.demo.project.service.IProjectService; |
||||
import org.jeecg.modules.demo.projectFeeBudget.entity.ProjectFeeBudget; |
||||
import org.jeecg.modules.demo.projectFeeBudget.service.IProjectFeeBudgetService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.math.BigDecimal; |
||||
import java.util.Arrays; |
||||
import java.util.LinkedList; |
||||
import java.util.List; |
||||
import java.util.Optional; |
||||
|
||||
/** |
||||
* @Description: 项目经费预算 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-10-29 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags = "项目经费预算") |
||||
@RestController |
||||
@RequestMapping("/projectFeeBudget/projectFeeBudget") |
||||
@Slf4j |
||||
public class ProjectFeeBudgetController extends JeecgController<ProjectFeeBudget, IProjectFeeBudgetService> { |
||||
@Autowired |
||||
private IProjectFeeBudgetService projectFeeBudgetService; |
||||
|
||||
@Autowired |
||||
private IProjectService iProjectService; |
||||
|
||||
/** |
||||
* @description: 保存项目经费预算 |
||||
* @param: [projectId, tableData] |
||||
* @return: org.jeecg.common.api.vo.Result |
||||
* @author: z.h.c |
||||
* @date: 24/10/29 16:10 |
||||
*/ |
||||
@PostMapping("/saveAll/{projectId}") |
||||
public Result saveAll(@PathVariable("projectId") String projectId, @RequestBody JSONArray tableData) { |
||||
Project project = iProjectService.getById(projectId); |
||||
Optional.ofNullable(project).orElseThrow(() -> new JeecgBootException("项目不存在")); |
||||
|
||||
List<ProjectFeeBudget> list = JSONArray.parseArray(tableData.toJSONString(), ProjectFeeBudget.class); |
||||
list.forEach(obj -> { |
||||
obj.setProjectId(projectId); |
||||
obj.setId(UUIDGenerator.generate()); |
||||
}); |
||||
BigDecimal sumFee = Optional.ofNullable(list).orElse(new LinkedList<>()).stream().map(ProjectFeeBudget::getTotalFee).reduce(BigDecimal.ZERO, BigDecimal::add); |
||||
//申请财政拨款与经费明细总各比较,不相等 异常退出
|
||||
if(project.getApplyFund().compareTo(sumFee) != 0){ |
||||
throw new JeecgBootException("申请财政拨款("+project.getApplyFund()+"万元),与项目经费预算表合计金额不等,请核对!"); |
||||
} |
||||
projectFeeBudgetService.remove(new LambdaQueryWrapper<ProjectFeeBudget>().eq(ProjectFeeBudget::getProjectId, projectId)); |
||||
projectFeeBudgetService.saveBatch(list); |
||||
return Result.ok(); |
||||
} |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param projectFeeBudget |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "项目经费预算-分页列表查询")
|
||||
@ApiOperation(value = "项目经费预算-分页列表查询", notes = "项目经费预算-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<IPage<ProjectFeeBudget>> queryPageList(ProjectFeeBudget projectFeeBudget, |
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
QueryWrapper<ProjectFeeBudget> queryWrapper = QueryGenerator.initQueryWrapper(projectFeeBudget, req.getParameterMap()); |
||||
Page<ProjectFeeBudget> page = new Page<ProjectFeeBudget>(pageNo, pageSize); |
||||
IPage<ProjectFeeBudget> pageList = projectFeeBudgetService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param projectFeeBudget |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "项目经费预算-添加") |
||||
@ApiOperation(value = "项目经费预算-添加", notes = "项目经费预算-添加") |
||||
// @RequiresPermissions("projectFeeBudget:project_fee_budget:add")
|
||||
@PostMapping(value = "/add") |
||||
public Result<String> add(@RequestBody ProjectFeeBudget projectFeeBudget) { |
||||
projectFeeBudgetService.save(projectFeeBudget); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param projectFeeBudget |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "项目经费预算-编辑") |
||||
@ApiOperation(value = "项目经费预算-编辑", notes = "项目经费预算-编辑") |
||||
// @RequiresPermissions("projectFeeBudget:project_fee_budget:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
||||
public Result<String> edit(@RequestBody ProjectFeeBudget projectFeeBudget) { |
||||
projectFeeBudgetService.updateById(projectFeeBudget); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "项目经费预算-通过id删除") |
||||
@ApiOperation(value = "项目经费预算-通过id删除", notes = "项目经费预算-通过id删除") |
||||
// @RequiresPermissions("projectFeeBudget:project_fee_budget:delete")
|
||||
@DeleteMapping(value = "/delete") |
||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) { |
||||
projectFeeBudgetService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "项目经费预算-批量删除") |
||||
@ApiOperation(value = "项目经费预算-批量删除", notes = "项目经费预算-批量删除") |
||||
// @RequiresPermissions("projectFeeBudget:project_fee_budget:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
||||
this.projectFeeBudgetService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "项目经费预算-通过id查询")
|
||||
@ApiOperation(value = "项目经费预算-通过id查询", notes = "项目经费预算-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<ProjectFeeBudget> queryById(@RequestParam(name = "id", required = true) String id) { |
||||
ProjectFeeBudget projectFeeBudget = projectFeeBudgetService.getById(id); |
||||
if (projectFeeBudget == null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(projectFeeBudget); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param projectFeeBudget |
||||
*/ |
||||
// @RequiresPermissions("projectFeeBudget:project_fee_budget:exportXls")
|
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectFeeBudget projectFeeBudget) { |
||||
return super.exportXls(request, projectFeeBudget, ProjectFeeBudget.class, "项目经费预算"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
@RequiresPermissions("projectFeeBudget:project_fee_budget:importExcel") |
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, ProjectFeeBudget.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,104 @@ |
||||
package org.jeecg.modules.demo.projectFeeBudget.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @Description: 项目经费预算 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-10-29 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("project_fee_budget") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value = "project_fee_budget对象", description = "项目经费预算") |
||||
public class ProjectFeeBudget implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 主键 |
||||
*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/** |
||||
* 创建人 |
||||
*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/** |
||||
* 创建日期 |
||||
*/ |
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/** |
||||
* 更新人 |
||||
*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/** |
||||
* 更新日期 |
||||
*/ |
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/** |
||||
* 所属部门 |
||||
*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
private String sysOrgCode; |
||||
/** |
||||
* 项目id |
||||
*/ |
||||
@Excel(name = "项目id", width = 15) |
||||
@ApiModelProperty(value = "项目id") |
||||
private String projectId; |
||||
/** |
||||
* 预算科目 |
||||
*/ |
||||
@Excel(name = "预算科目", width = 15) |
||||
@ApiModelProperty(value = "预算科目") |
||||
private String budgetSubject; |
||||
/** |
||||
* 合计 |
||||
*/ |
||||
@Excel(name = "合计", width = 15) |
||||
@ApiModelProperty(value = "合计") |
||||
private BigDecimal totalFee; |
||||
/** |
||||
* 专项经费 |
||||
*/ |
||||
@Excel(name = "专项经费", width = 15) |
||||
@ApiModelProperty(value = "专项经费") |
||||
private BigDecimal specialFee; |
||||
/** |
||||
* 自筹经费 |
||||
*/ |
||||
@Excel(name = "自筹经费", width = 15) |
||||
@ApiModelProperty(value = "自筹经费") |
||||
private BigDecimal selfFee; |
||||
/** |
||||
* 专项经费说明 |
||||
*/ |
||||
@Excel(name = "专项经费说明", width = 15) |
||||
@ApiModelProperty(value = "专项经费说明") |
||||
private String specialFeeMark; |
||||
} |
@ -0,0 +1,17 @@ |
||||
package org.jeecg.modules.demo.projectFeeBudget.mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.jeecg.modules.demo.projectFeeBudget.entity.ProjectFeeBudget; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: 项目经费预算 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-10-29 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface ProjectFeeBudgetMapper extends BaseMapper<ProjectFeeBudget> { |
||||
|
||||
} |
@ -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="org.jeecg.modules.demo.projectFeeBudget.mapper.ProjectFeeBudgetMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.demo.projectFeeBudget.service; |
||||
|
||||
import org.jeecg.modules.demo.projectFeeBudget.entity.ProjectFeeBudget; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: 项目经费预算 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-10-29 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IProjectFeeBudgetService extends IService<ProjectFeeBudget> { |
||||
|
||||
} |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.demo.projectFeeBudget.service.impl; |
||||
|
||||
import org.jeecg.modules.demo.projectFeeBudget.entity.ProjectFeeBudget; |
||||
import org.jeecg.modules.demo.projectFeeBudget.mapper.ProjectFeeBudgetMapper; |
||||
import org.jeecg.modules.demo.projectFeeBudget.service.IProjectFeeBudgetService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 项目经费预算 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-10-29 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class ProjectFeeBudgetServiceImpl extends ServiceImpl<ProjectFeeBudgetMapper, ProjectFeeBudget> implements IProjectFeeBudgetService { |
||||
|
||||
} |
@ -0,0 +1,163 @@ |
||||
package org.jeecg.modules.demo.projectLog.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
||||
import org.jeecg.common.api.vo.Result; |
||||
import org.jeecg.common.aspect.annotation.AutoLog; |
||||
import org.jeecg.common.system.base.controller.JeecgController; |
||||
import org.jeecg.common.system.query.QueryGenerator; |
||||
import org.jeecg.modules.demo.projectLog.entity.ProjectLog; |
||||
import org.jeecg.modules.demo.projectLog.service.IProjectLogService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @Description: 项目操作日志 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-04 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags = "项目操作日志") |
||||
@RestController |
||||
@RequestMapping("/projectLog/projectLog") |
||||
@Slf4j |
||||
public class ProjectLogController extends JeecgController<ProjectLog, IProjectLogService> { |
||||
@Autowired |
||||
private IProjectLogService projectLogService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param projectLog |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "项目操作日志-分页列表查询")
|
||||
@ApiOperation(value = "项目操作日志-分页列表查询", notes = "项目操作日志-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<IPage<ProjectLog>> queryPageList(ProjectLog projectLog, |
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
QueryWrapper<ProjectLog> queryWrapper = QueryGenerator.initQueryWrapper(projectLog, req.getParameterMap()); |
||||
Page<ProjectLog> page = new Page<ProjectLog>(pageNo, pageSize); |
||||
queryWrapper.orderByDesc("operation_time"); |
||||
IPage<ProjectLog> pageList = projectLogService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param projectLog |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "项目操作日志-添加") |
||||
@ApiOperation(value = "项目操作日志-添加", notes = "项目操作日志-添加") |
||||
@RequiresPermissions("projectLog:project_log:add") |
||||
@PostMapping(value = "/add") |
||||
public Result<String> add(@RequestBody ProjectLog projectLog) { |
||||
projectLogService.save(projectLog); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param projectLog |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "项目操作日志-编辑") |
||||
@ApiOperation(value = "项目操作日志-编辑", notes = "项目操作日志-编辑") |
||||
@RequiresPermissions("projectLog:project_log:edit") |
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
||||
public Result<String> edit(@RequestBody ProjectLog projectLog) { |
||||
projectLogService.updateById(projectLog); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "项目操作日志-通过id删除") |
||||
@ApiOperation(value = "项目操作日志-通过id删除", notes = "项目操作日志-通过id删除") |
||||
@RequiresPermissions("projectLog:project_log:delete") |
||||
@DeleteMapping(value = "/delete") |
||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) { |
||||
projectLogService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "项目操作日志-批量删除") |
||||
@ApiOperation(value = "项目操作日志-批量删除", notes = "项目操作日志-批量删除") |
||||
@RequiresPermissions("projectLog:project_log:deleteBatch") |
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
||||
this.projectLogService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "项目操作日志-通过id查询")
|
||||
@ApiOperation(value = "项目操作日志-通过id查询", notes = "项目操作日志-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<ProjectLog> queryById(@RequestParam(name = "id", required = true) String id) { |
||||
ProjectLog projectLog = projectLogService.getById(id); |
||||
if (projectLog == null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(projectLog); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param projectLog |
||||
*/ |
||||
@RequiresPermissions("projectLog:project_log:exportXls") |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectLog projectLog) { |
||||
return super.exportXls(request, projectLog, ProjectLog.class, "项目操作日志"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
@RequiresPermissions("projectLog:project_log:importExcel") |
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, ProjectLog.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,120 @@ |
||||
package org.jeecg.modules.demo.projectLog.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
import org.jeecg.common.aspect.annotation.Dict; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @Description: 项目操作日志 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-04 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("project_log") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value = "project_log对象", description = "项目操作日志") |
||||
public class ProjectLog implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 主键 |
||||
*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/** |
||||
* 创建人 |
||||
*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/** |
||||
* 创建日期 |
||||
*/ |
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/** |
||||
* 更新人 |
||||
*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/** |
||||
* 更新日期 |
||||
*/ |
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/** |
||||
* 所属部门 |
||||
*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
private String sysOrgCode; |
||||
/** |
||||
* 项目id |
||||
*/ |
||||
@Excel(name = "项目id", width = 15) |
||||
@ApiModelProperty(value = "项目id") |
||||
private String projectId; |
||||
/** |
||||
* 项目名称 |
||||
*/ |
||||
@Excel(name = "项目名称", width = 15) |
||||
@ApiModelProperty(value = "项目名称") |
||||
private String projectName; |
||||
/** |
||||
* 操作说明 |
||||
*/ |
||||
@Excel(name = "操作说明", width = 15) |
||||
@ApiModelProperty(value = "操作说明") |
||||
private String operationMark; |
||||
/** |
||||
* 操作时间 |
||||
*/ |
||||
@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 operationTime; |
||||
/** |
||||
* 操作员id |
||||
*/ |
||||
@Excel(name = "操作员id", width = 15) |
||||
@ApiModelProperty(value = "操作员id") |
||||
private String operatorId; |
||||
/** |
||||
* 操作人名称 |
||||
*/ |
||||
@Excel(name = "操作人名称", width = 15) |
||||
@ApiModelProperty(value = "操作人名称") |
||||
private String operatorName; |
||||
/** |
||||
* 项目书状态 |
||||
*/ |
||||
@Excel(name = "项目书状态", width = 15, dicCode = "project_status") |
||||
@Dict(dicCode = "project_status") |
||||
@ApiModelProperty(value = "项目书状态") |
||||
private String projectStatus; |
||||
/** |
||||
* 预算书状态 |
||||
*/ |
||||
@Excel(name = "预算书状态", width = 15, dicCode = "budget_status") |
||||
@Dict(dicCode = "budget_status") |
||||
@ApiModelProperty(value = "预算书状态") |
||||
private String budgetStatus; |
||||
} |
@ -0,0 +1,17 @@ |
||||
package org.jeecg.modules.demo.projectLog.mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.jeecg.modules.demo.projectLog.entity.ProjectLog; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: 项目操作日志 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-04 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface ProjectLogMapper extends BaseMapper<ProjectLog> { |
||||
|
||||
} |
@ -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="org.jeecg.modules.demo.projectLog.mapper.ProjectLogMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.demo.projectLog.service; |
||||
|
||||
import org.jeecg.modules.demo.projectLog.entity.ProjectLog; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: 项目操作日志 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-04 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IProjectLogService extends IService<ProjectLog> { |
||||
|
||||
} |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.demo.projectLog.service.impl; |
||||
|
||||
import org.jeecg.modules.demo.projectLog.entity.ProjectLog; |
||||
import org.jeecg.modules.demo.projectLog.mapper.ProjectLogMapper; |
||||
import org.jeecg.modules.demo.projectLog.service.IProjectLogService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 项目操作日志 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2024-11-04 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class ProjectLogServiceImpl extends ServiceImpl<ProjectLogMapper, ProjectLog> implements IProjectLogService { |
||||
|
||||
} |
@ -0,0 +1,102 @@ |
||||
import { defHttp } from '/@/utils/http/axios'; |
||||
|
||||
// 获取仪器列表 |
||||
export function getindexcomp(params) { |
||||
return defHttp.request({ |
||||
url: '/instrument/instrument/listcms', |
||||
method: 'GET', |
||||
params, |
||||
}); |
||||
} |
||||
// 获取仪器详情 |
||||
export function getindexnew(params) { |
||||
return defHttp.request({ |
||||
url: '/instrument/instrument/queryByIdCms', |
||||
method: 'GET', |
||||
params, |
||||
}); |
||||
} |
||||
// 获取学科领域 |
||||
export function getindexsubject() { |
||||
return defHttp.request({ |
||||
url: '/disciplinefieid/disciplineFieid/listcms', |
||||
method: 'GET', |
||||
|
||||
}); |
||||
} |
||||
// 获取仪器分类 |
||||
export function getindexclass() { |
||||
return defHttp.request({ |
||||
url: '/instrumenttype/instrumentType/listcms', |
||||
method: 'GET', |
||||
|
||||
}); |
||||
} |
||||
// 获取创新券列表 |
||||
export function getindexaward(params) { |
||||
return defHttp.request({ |
||||
url: '/innovationvoucher/innovationVoucher/listcms', |
||||
method: 'GET', |
||||
params, |
||||
}); |
||||
} |
||||
// 获取文章栏目 |
||||
export function getindexcolumn() { |
||||
return defHttp.request({ |
||||
url: '/cms/front/getColumnList', |
||||
method: 'GET', |
||||
}); |
||||
} |
||||
// 通过栏目获取文章 |
||||
export function getindexarticle(params) { |
||||
return defHttp.request({ |
||||
url: '/cms/front/getArticleListByColumn', |
||||
method: 'GET', |
||||
params, |
||||
}); |
||||
} |
||||
// 获取全部文章 |
||||
export function getindexallarticle() { |
||||
return defHttp.request({ |
||||
url: '/cms/front/cmsfindallnews', |
||||
method: 'GET', |
||||
}); |
||||
} |
||||
// 获取文章详情 |
||||
export function getindexarticleitem(params) { |
||||
return defHttp.request({ |
||||
url: '/cms/front/getByArticleTitle', |
||||
method: 'GET', |
||||
params, |
||||
}); |
||||
} |
||||
// 获取首页新闻 |
||||
export function getindexnews() { |
||||
return defHttp.request({ |
||||
url: '/cms/front/getindexnew', |
||||
method: 'GET', |
||||
}); |
||||
} |
||||
// 获取专家信息 |
||||
export function getindexexpert(params) { |
||||
return defHttp.request({ |
||||
url: '/expert/expert/listadminCMS', |
||||
method: 'GET', |
||||
params |
||||
}); |
||||
} |
||||
// 获取专家详情 |
||||
export function getindexexpertdetail(params) { |
||||
return defHttp.request({ |
||||
url: '/expert/expert/CMSexpinfo', |
||||
method: 'GET', |
||||
params, |
||||
}); |
||||
} |
||||
// 获取专家类型 |
||||
export function getindexexperttype() { |
||||
return defHttp.request({ |
||||
url: '/expert/expert/directioncalListCMS', |
||||
method: 'GET', |
||||
}); |
||||
} |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 743 B |
After Width: | Height: | Size: 709 B |
After Width: | Height: | Size: 895 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 811 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 808 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 529 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 6.3 MiB |
After Width: | Height: | Size: 393 B |
After Width: | Height: | Size: 371 B |
After Width: | Height: | Size: 212 KiB |