正在显示
10 个修改的文件
包含
302 行增加
和
30 行删除
jeecg-boot-erp/src/main/java/org/jeecg/modules/erp/trad/controller/TblTradTouController.java
0 → 100644
| 1 | +package org.jeecg.modules.erp.trad.controller; | ||
| 2 | + | ||
| 3 | +import java.util.Arrays; | ||
| 4 | +import java.util.List; | ||
| 5 | +import java.util.Map; | ||
| 6 | +import java.util.stream.Collectors; | ||
| 7 | +import java.io.IOException; | ||
| 8 | +import java.io.UnsupportedEncodingException; | ||
| 9 | +import java.net.URLDecoder; | ||
| 10 | +import javax.servlet.http.HttpServletRequest; | ||
| 11 | +import javax.servlet.http.HttpServletResponse; | ||
| 12 | +import org.jeecg.common.api.vo.Result; | ||
| 13 | +import org.jeecg.common.system.query.QueryGenerator; | ||
| 14 | +import org.jeecg.common.util.oConvertUtils; | ||
| 15 | +import org.jeecg.modules.erp.trad.entity.TblTradTou; | ||
| 16 | +import org.jeecg.modules.erp.trad.service.TblTradTouService; | ||
| 17 | + | ||
| 18 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
| 19 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
| 20 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
| 21 | +import lombok.extern.slf4j.Slf4j; | ||
| 22 | + | ||
| 23 | +import org.jeecg.modules.erp.trad.service.TblTradTouService; | ||
| 24 | +import org.jeecgframework.poi.excel.ExcelImportUtil; | ||
| 25 | +import org.jeecgframework.poi.excel.def.NormalExcelConstants; | ||
| 26 | +import org.jeecgframework.poi.excel.entity.ExportParams; | ||
| 27 | +import org.jeecgframework.poi.excel.entity.ImportParams; | ||
| 28 | +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | ||
| 29 | +import org.jeecg.common.system.base.controller.JeecgController; | ||
| 30 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 31 | +import org.springframework.web.bind.annotation.*; | ||
| 32 | +import org.springframework.web.multipart.MultipartFile; | ||
| 33 | +import org.springframework.web.multipart.MultipartHttpServletRequest; | ||
| 34 | +import org.springframework.web.servlet.ModelAndView; | ||
| 35 | +import com.alibaba.fastjson.JSON; | ||
| 36 | +import io.swagger.annotations.Api; | ||
| 37 | +import io.swagger.annotations.ApiOperation; | ||
| 38 | +import org.jeecg.common.aspect.annotation.AutoLog; | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * @Description: tbl_trad_tou | ||
| 42 | + * @Author: jeecg-boot | ||
| 43 | + * @Date: 2024-04-12 | ||
| 44 | + * @Version: V1.0 | ||
| 45 | + */ | ||
| 46 | +@Api(tags="tbl_trad_tou") | ||
| 47 | +@RestController | ||
| 48 | +@RequestMapping("/trad/tblTradTou") | ||
| 49 | +@Slf4j | ||
| 50 | +public class TblTradTouController extends JeecgController<TblTradTou, TblTradTouService> { | ||
| 51 | + @Autowired | ||
| 52 | + private TblTradTouService tblTradTouService; | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 分页列表查询 | ||
| 56 | + * | ||
| 57 | + * @param tblTradTou | ||
| 58 | + * @param pageNo | ||
| 59 | + * @param pageSize | ||
| 60 | + * @param req | ||
| 61 | + * @return | ||
| 62 | + */ | ||
| 63 | + //@AutoLog(value = "tbl_trad_tou-分页列表查询") | ||
| 64 | + @ApiOperation(value="tbl_trad_tou-分页列表查询", notes="tbl_trad_tou-分页列表查询") | ||
| 65 | + @GetMapping(value = "/list") | ||
| 66 | + public Result<IPage<TblTradTou>> queryPageList(TblTradTou tblTradTou, | ||
| 67 | + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | ||
| 68 | + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | ||
| 69 | + HttpServletRequest req) { | ||
| 70 | + QueryWrapper<TblTradTou> queryWrapper = QueryGenerator.initQueryWrapper(tblTradTou, req.getParameterMap()); | ||
| 71 | + Page<TblTradTou> page = new Page<TblTradTou>(pageNo, pageSize); | ||
| 72 | + IPage<TblTradTou> pageList = tblTradTouService.page(page, queryWrapper); | ||
| 73 | + return Result.OK(pageList); | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + /** | ||
| 77 | + * 添加 | ||
| 78 | + * | ||
| 79 | + * @param tblTradTou | ||
| 80 | + * @return | ||
| 81 | + */ | ||
| 82 | + @AutoLog(value = "tbl_trad_tou-添加") | ||
| 83 | + @ApiOperation(value="tbl_trad_tou-添加", notes="tbl_trad_tou-添加") | ||
| 84 | + @PostMapping(value = "/add") | ||
| 85 | + public Result<String> add(@RequestBody TblTradTou tblTradTou) { | ||
| 86 | + tblTradTouService.save(tblTradTou); | ||
| 87 | + return Result.OK("添加成功!"); | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + /** | ||
| 91 | + * 编辑 | ||
| 92 | + * | ||
| 93 | + * @param tblTradTou | ||
| 94 | + * @return | ||
| 95 | + */ | ||
| 96 | + @AutoLog(value = "tbl_trad_tou-编辑") | ||
| 97 | + @ApiOperation(value="tbl_trad_tou-编辑", notes="tbl_trad_tou-编辑") | ||
| 98 | + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | ||
| 99 | + public Result<String> edit(@RequestBody TblTradTou tblTradTou) { | ||
| 100 | + tblTradTouService.updateById(tblTradTou); | ||
| 101 | + return Result.OK("编辑成功!"); | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + /** | ||
| 105 | + * 通过id删除 | ||
| 106 | + * | ||
| 107 | + * @param id | ||
| 108 | + * @return | ||
| 109 | + */ | ||
| 110 | + @AutoLog(value = "tbl_trad_tou-通过id删除") | ||
| 111 | + @ApiOperation(value="tbl_trad_tou-通过id删除", notes="tbl_trad_tou-通过id删除") | ||
| 112 | + @DeleteMapping(value = "/delete") | ||
| 113 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | ||
| 114 | + tblTradTouService.removeById(id); | ||
| 115 | + return Result.OK("删除成功!"); | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + /** | ||
| 119 | + * 批量删除 | ||
| 120 | + * | ||
| 121 | + * @param ids | ||
| 122 | + * @return | ||
| 123 | + */ | ||
| 124 | + @AutoLog(value = "tbl_trad_tou-批量删除") | ||
| 125 | + @ApiOperation(value="tbl_trad_tou-批量删除", notes="tbl_trad_tou-批量删除") | ||
| 126 | + @DeleteMapping(value = "/deleteBatch") | ||
| 127 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | ||
| 128 | + this.tblTradTouService.removeByIds(Arrays.asList(ids.split(","))); | ||
| 129 | + return Result.OK("批量删除成功!"); | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + /** | ||
| 133 | + * 通过id查询 | ||
| 134 | + * | ||
| 135 | + * @param id | ||
| 136 | + * @return | ||
| 137 | + */ | ||
| 138 | + //@AutoLog(value = "tbl_trad_tou-通过id查询") | ||
| 139 | + @ApiOperation(value="tbl_trad_tou-通过id查询", notes="tbl_trad_tou-通过id查询") | ||
| 140 | + @GetMapping(value = "/queryById") | ||
| 141 | + public Result<TblTradTou> queryById(@RequestParam(name="id",required=true) String id) { | ||
| 142 | + TblTradTou tblTradTou = tblTradTouService.getById(id); | ||
| 143 | + if(tblTradTou==null) { | ||
| 144 | + return Result.error("未找到对应数据"); | ||
| 145 | + } | ||
| 146 | + return Result.OK(tblTradTou); | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + /** | ||
| 150 | + * 导出excel | ||
| 151 | + * | ||
| 152 | + * @param request | ||
| 153 | + * @param tblTradTou | ||
| 154 | + */ | ||
| 155 | + @RequestMapping(value = "/exportXls") | ||
| 156 | + public ModelAndView exportXls(HttpServletRequest request, TblTradTou tblTradTou) { | ||
| 157 | + return super.exportXls(request, tblTradTou, TblTradTou.class, "tbl_trad_tou"); | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + /** | ||
| 161 | + * 通过excel导入数据 | ||
| 162 | + * | ||
| 163 | + * @param request | ||
| 164 | + * @param response | ||
| 165 | + * @return | ||
| 166 | + */ | ||
| 167 | + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | ||
| 168 | + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | ||
| 169 | + return super.importExcel(request, response, TblTradTou.class); | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | +} |
| @@ -35,20 +35,7 @@ public class TblTradFphk implements Serializable { | @@ -35,20 +35,7 @@ public class TblTradFphk implements Serializable { | ||
| 35 | @TableId(type = IdType.ASSIGN_ID) | 35 | @TableId(type = IdType.ASSIGN_ID) |
| 36 | @ApiModelProperty(value = "id") | 36 | @ApiModelProperty(value = "id") |
| 37 | private java.lang.Integer id; | 37 | private java.lang.Integer id; |
| 38 | - /**送货时间*/ | ||
| 39 | - @Excel(name = "送货时间", width = 15, format = "yyyy-MM-dd") | ||
| 40 | - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | ||
| 41 | - @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 42 | - @ApiModelProperty(value = "送货时间") | ||
| 43 | - private java.util.Date deliveryTime; | ||
| 44 | - /**交接人*/ | ||
| 45 | - @Excel(name = "交接人", width = 15) | ||
| 46 | - @ApiModelProperty(value = "交接人") | ||
| 47 | - private java.lang.String jiaojieren; | ||
| 48 | - /**送货单扫描件*/ | ||
| 49 | - @Excel(name = "送货单扫描件", width = 15) | ||
| 50 | - @ApiModelProperty(value = "送货单扫描件") | ||
| 51 | - private java.lang.String scannedCopies; | 38 | + |
| 52 | /**开票时间*/ | 39 | /**开票时间*/ |
| 53 | @Excel(name = "开票时间", width = 15, format = "yyyy-MM-dd") | 40 | @Excel(name = "开票时间", width = 15, format = "yyyy-MM-dd") |
| 54 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | 41 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| @@ -35,22 +35,6 @@ public class TblTradTender implements Serializable { | @@ -35,22 +35,6 @@ public class TblTradTender implements Serializable { | ||
| 35 | @TableId(type = IdType.ASSIGN_ID) | 35 | @TableId(type = IdType.ASSIGN_ID) |
| 36 | @ApiModelProperty(value = "id") | 36 | @ApiModelProperty(value = "id") |
| 37 | private java.lang.Integer id; | 37 | private java.lang.Integer id; |
| 38 | - /**投标价格(不含税)*/ | ||
| 39 | - @Excel(name = "投标价格(不含税)", width = 15) | ||
| 40 | - @ApiModelProperty(value = "投标价格(不含税)") | ||
| 41 | - private java.math.BigDecimal bidPrice; | ||
| 42 | - /**中标单价*/ | ||
| 43 | - @Excel(name = "中标单价", width = 15) | ||
| 44 | - @ApiModelProperty(value = "中标单价") | ||
| 45 | - private java.math.BigDecimal zhongPrice; | ||
| 46 | - /**中标数量*/ | ||
| 47 | - @Excel(name = "中标数量", width = 15) | ||
| 48 | - @ApiModelProperty(value = "中标数量") | ||
| 49 | - private java.lang.Integer zhongNum; | ||
| 50 | - /**中标总价*/ | ||
| 51 | - @Excel(name = "中标总价", width = 15) | ||
| 52 | - @ApiModelProperty(value = "中标总价") | ||
| 53 | - private java.math.BigDecimal totalPrice; | ||
| 54 | /**采购厂商*/ | 38 | /**采购厂商*/ |
| 55 | @Excel(name = "采购厂商", width = 15) | 39 | @Excel(name = "采购厂商", width = 15) |
| 56 | @ApiModelProperty(value = "采购厂商") | 40 | @ApiModelProperty(value = "采购厂商") |
| @@ -103,6 +87,20 @@ public class TblTradTender implements Serializable { | @@ -103,6 +87,20 @@ public class TblTradTender implements Serializable { | ||
| 103 | @Excel(name = "备注", width = 15) | 87 | @Excel(name = "备注", width = 15) |
| 104 | @ApiModelProperty(value = "备注") | 88 | @ApiModelProperty(value = "备注") |
| 105 | private java.lang.String notes; | 89 | private java.lang.String notes; |
| 90 | + /**送货时间*/ | ||
| 91 | + @Excel(name = "送货时间", width = 15, format = "yyyy-MM-dd") | ||
| 92 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | ||
| 93 | + @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 94 | + @ApiModelProperty(value = "送货时间") | ||
| 95 | + private java.util.Date songTime; | ||
| 96 | + /**交接人*/ | ||
| 97 | + @Excel(name = "交接人", width = 15) | ||
| 98 | + @ApiModelProperty(value = "交接人") | ||
| 99 | + private java.lang.String jiaojieren; | ||
| 100 | + /**送货单扫描件*/ | ||
| 101 | + @Excel(name = "送货单扫描件", width = 15) | ||
| 102 | + @ApiModelProperty(value = "送货单扫描件") | ||
| 103 | + private java.lang.String scannedCopies; | ||
| 106 | /**毛利润*/ | 104 | /**毛利润*/ |
| 107 | @Excel(name = "毛利润", width = 15) | 105 | @Excel(name = "毛利润", width = 15) |
| 108 | @ApiModelProperty(value = "毛利润") | 106 | @ApiModelProperty(value = "毛利润") |
| 1 | +package org.jeecg.modules.erp.trad.entity; | ||
| 2 | + | ||
| 3 | +import java.io.Serializable; | ||
| 4 | +import java.io.UnsupportedEncodingException; | ||
| 5 | +import java.util.Date; | ||
| 6 | +import java.math.BigDecimal; | ||
| 7 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
| 8 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
| 9 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
| 10 | +import lombok.Data; | ||
| 11 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 12 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 13 | +import org.jeecgframework.poi.excel.annotation.Excel; | ||
| 14 | +import org.jeecg.common.aspect.annotation.Dict; | ||
| 15 | +import io.swagger.annotations.ApiModel; | ||
| 16 | +import io.swagger.annotations.ApiModelProperty; | ||
| 17 | +import lombok.EqualsAndHashCode; | ||
| 18 | +import lombok.experimental.Accessors; | ||
| 19 | + | ||
| 20 | +/** | ||
| 21 | + * @Description: tbl_trad_tou | ||
| 22 | + * @Author: jeecg-boot | ||
| 23 | + * @Date: 2024-04-12 | ||
| 24 | + * @Version: V1.0 | ||
| 25 | + */ | ||
| 26 | +@Data | ||
| 27 | +@TableName("tbl_trad_tou") | ||
| 28 | +@Accessors(chain = true) | ||
| 29 | +@EqualsAndHashCode(callSuper = false) | ||
| 30 | +@ApiModel(value="tbl_trad_tou对象", description="tbl_trad_tou") | ||
| 31 | +public class TblTradTou implements Serializable { | ||
| 32 | + private static final long serialVersionUID = 1L; | ||
| 33 | + | ||
| 34 | + /**id*/ | ||
| 35 | + @TableId(type = IdType.ASSIGN_ID) | ||
| 36 | + @ApiModelProperty(value = "id") | ||
| 37 | + private Integer id; | ||
| 38 | + /**投标价格(不含税)*/ | ||
| 39 | + @Excel(name = "投标价格(不含税)", width = 15) | ||
| 40 | + @ApiModelProperty(value = "投标价格(不含税)") | ||
| 41 | + private BigDecimal bidPrice; | ||
| 42 | + /**中标单价*/ | ||
| 43 | + @Excel(name = "中标单价", width = 15) | ||
| 44 | + @ApiModelProperty(value = "中标单价") | ||
| 45 | + private BigDecimal zhongPrice; | ||
| 46 | + /**中标数量*/ | ||
| 47 | + @Excel(name = "中标数量", width = 15) | ||
| 48 | + @ApiModelProperty(value = "中标数量") | ||
| 49 | + private Integer zhongNum; | ||
| 50 | + /**中标总价*/ | ||
| 51 | + @Excel(name = "中标总价", width = 15) | ||
| 52 | + @ApiModelProperty(value = "中标总价") | ||
| 53 | + private BigDecimal totalPrice; | ||
| 54 | + /**创建日期*/ | ||
| 55 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | ||
| 56 | + @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 57 | + @ApiModelProperty(value = "创建日期") | ||
| 58 | + private Date createTime; | ||
| 59 | +} |
| 1 | +package org.jeecg.modules.erp.trad.mapper; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 5 | +import org.apache.ibatis.annotations.Param; | ||
| 6 | +import org.jeecg.modules.erp.trad.entity.TblTradTou; | ||
| 7 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Description: tbl_trad_tou | ||
| 11 | + * @Author: jeecg-boot | ||
| 12 | + * @Date: 2024-04-12 | ||
| 13 | + * @Version: V1.0 | ||
| 14 | + */ | ||
| 15 | +public interface TblTradTouMapper extends BaseMapper<TblTradTou> { | ||
| 16 | + | ||
| 17 | +} |
| 1 | +package org.jeecg.modules.erp.trad.service; | ||
| 2 | + | ||
| 3 | +import org.jeecg.modules.erp.trad.entity.TblTradTou; | ||
| 4 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * @Description: tbl_trad_tou | ||
| 8 | + * @Author: jeecg-boot | ||
| 9 | + * @Date: 2024-04-12 | ||
| 10 | + * @Version: V1.0 | ||
| 11 | + */ | ||
| 12 | +public interface TblTradTouService extends IService<TblTradTou> { | ||
| 13 | + | ||
| 14 | +} |
jeecg-boot-erp/src/main/java/org/jeecg/modules/erp/trad/service/impl/TblTradTouServiceImpl.java
0 → 100644
| 1 | +package org.jeecg.modules.erp.trad.service.impl; | ||
| 2 | + | ||
| 3 | +import org.jeecg.modules.erp.trad.entity.TblTradTou; | ||
| 4 | +import org.jeecg.modules.erp.trad.mapper.TblTradTouMapper; | ||
| 5 | +import org.jeecg.modules.erp.trad.service.TblTradTouService; | ||
| 6 | +import org.jeecg.modules.erp.trad.service.TblTradTouService; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | + | ||
| 9 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * @Description: tbl_trad_tou | ||
| 13 | + * @Author: jeecg-boot | ||
| 14 | + * @Date: 2024-04-12 | ||
| 15 | + * @Version: V1.0 | ||
| 16 | + */ | ||
| 17 | +@Service | ||
| 18 | +public class TblTradTouServiceImpl extends ServiceImpl<TblTradTouMapper, TblTradTou> implements TblTradTouService { | ||
| 19 | + | ||
| 20 | +} |
-
请 注册 或 登录 后发表评论