作者 雷海东

Merge remote-tracking branch 'factory-java/dev' into dev

# Conflicts:
#	jeecg-boot-erp/src/main/java/org/jeecg/modules/erp/order_form/entity/TblOrderForm.java
#	jeecg-boot-erp/src/main/java/org/jeecg/modules/erp/salary/controller/TblSalaryBaseController.java
正在显示 31 个修改的文件 包含 973 行增加63 行删除
@@ -20,6 +20,7 @@ import org.jeecg.modules.erp.order_form.entity.TblWorkOrder; @@ -20,6 +20,7 @@ import org.jeecg.modules.erp.order_form.entity.TblWorkOrder;
20 import org.jeecg.modules.erp.order_form.mapper.TblWorkOrderMapper; 20 import org.jeecg.modules.erp.order_form.mapper.TblWorkOrderMapper;
21 import org.springframework.beans.BeanUtils; 21 import org.springframework.beans.BeanUtils;
22 import org.springframework.beans.factory.annotation.Autowired; 22 import org.springframework.beans.factory.annotation.Autowired;
  23 +import org.springframework.core.io.ClassPathResource;
23 import org.springframework.web.bind.annotation.*; 24 import org.springframework.web.bind.annotation.*;
24 25
25 import javax.servlet.http.HttpServletRequest; 26 import javax.servlet.http.HttpServletRequest;
@@ -35,6 +35,11 @@ public class TblBiddingShenq implements Serializable { @@ -35,6 +35,11 @@ public class TblBiddingShenq implements Serializable {
35 @TableId(type = IdType.ASSIGN_ID) 35 @TableId(type = IdType.ASSIGN_ID)
36 @ApiModelProperty(value = "id") 36 @ApiModelProperty(value = "id")
37 private Integer id; 37 private Integer id;
  38 +
  39 + @Excel(name = "订单号", width = 15)
  40 + @ApiModelProperty(value = "订单号")
  41 + private String orderId;
  42 +
38 /**品名*/ 43 /**品名*/
39 @Excel(name = "品名", width = 15) 44 @Excel(name = "品名", width = 15)
40 @ApiModelProperty(value = "品名") 45 @ApiModelProperty(value = "品名")
@@ -51,6 +56,12 @@ public class TblBiddingShenq implements Serializable { @@ -51,6 +56,12 @@ public class TblBiddingShenq implements Serializable {
51 @Excel(name = "单位", width = 15) 56 @Excel(name = "单位", width = 15)
52 @ApiModelProperty(value = "单位") 57 @ApiModelProperty(value = "单位")
53 private String danwei; 58 private String danwei;
  59 +
  60 +
  61 + @Excel(name = "外形尺寸", width = 15)
  62 + @ApiModelProperty(value = "外形尺寸")
  63 + private String appearanceSize;
  64 +
54 /**物料类别*/ 65 /**物料类别*/
55 @Excel(name = "物料类别", width = 15) 66 @Excel(name = "物料类别", width = 15)
56 @ApiModelProperty(value = "物料类别") 67 @ApiModelProperty(value = "物料类别")
@@ -13,5 +13,5 @@ import org.jeecg.modules.erp.bidding_info.entity.TblBiddingShenq; @@ -13,5 +13,5 @@ import org.jeecg.modules.erp.bidding_info.entity.TblBiddingShenq;
13 * @Version: V1.0 13 * @Version: V1.0
14 */ 14 */
15 public interface TblBiddingShenqMapper extends BaseMapper<TblBiddingShenq> { 15 public interface TblBiddingShenqMapper extends BaseMapper<TblBiddingShenq> {
16 - 16 + Integer deleteByOrdeId(String orderId);
17 } 17 }
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 <mapper namespace="org.jeecg.modules.erp.bidding_info.mapper.TblBiddingShenqMapper"> 3 <mapper namespace="org.jeecg.modules.erp.bidding_info.mapper.TblBiddingShenqMapper">
4 - 4 + <delete id="deleteByOrdeId" parameterType="String">
  5 + delete from tbl_bidding_shenq where order_id = #{orderId}
  6 + </delete>
5 </mapper> 7 </mapper>
@@ -11,4 +11,6 @@ import org.jeecg.modules.erp.bidding_info.entity.TblBiddingShenq; @@ -11,4 +11,6 @@ import org.jeecg.modules.erp.bidding_info.entity.TblBiddingShenq;
11 */ 11 */
12 public interface ITblBiddingShenqService extends IService<TblBiddingShenq> { 12 public interface ITblBiddingShenqService extends IService<TblBiddingShenq> {
13 13
  14 + Integer deleteByOrdeId(String orderId);
  15 +
14 } 16 }
@@ -3,6 +3,7 @@ package org.jeecg.modules.erp.bidding_info.service.impl; @@ -3,6 +3,7 @@ package org.jeecg.modules.erp.bidding_info.service.impl;
3 import org.jeecg.modules.erp.bidding_info.entity.TblBiddingShenq; 3 import org.jeecg.modules.erp.bidding_info.entity.TblBiddingShenq;
4 import org.jeecg.modules.erp.bidding_info.mapper.TblBiddingShenqMapper; 4 import org.jeecg.modules.erp.bidding_info.mapper.TblBiddingShenqMapper;
5 import org.jeecg.modules.erp.bidding_info.service.ITblBiddingShenqService; 5 import org.jeecg.modules.erp.bidding_info.service.ITblBiddingShenqService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
6 import org.springframework.stereotype.Service; 7 import org.springframework.stereotype.Service;
7 8
8 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -16,4 +17,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -16,4 +17,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
16 @Service 17 @Service
17 public class TblBiddingShenqServiceImpl extends ServiceImpl<TblBiddingShenqMapper, TblBiddingShenq> implements ITblBiddingShenqService { 18 public class TblBiddingShenqServiceImpl extends ServiceImpl<TblBiddingShenqMapper, TblBiddingShenq> implements ITblBiddingShenqService {
18 19
  20 + @Autowired
  21 + private TblBiddingShenqMapper tblBiddingShenqMapper;
  22 +
  23 + @Override
  24 + public Integer deleteByOrdeId(String orderId) {
  25 + return tblBiddingShenqMapper.deleteByOrdeId(orderId);
  26 + }
19 } 27 }
1 package org.jeecg.modules.erp.order_form.controller; 1 package org.jeecg.modules.erp.order_form.controller;
2 2
  3 +import cn.hutool.core.date.DateUtil;
  4 +import cn.hutool.core.util.NumberUtil;
  5 +import cn.hutool.core.util.StrUtil;
3 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 6 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 import com.baomidou.mybatisplus.core.metadata.IPage; 7 import com.baomidou.mybatisplus.core.metadata.IPage;
5 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 8 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -14,8 +17,10 @@ import org.jeecg.common.system.query.QueryGenerator; @@ -14,8 +17,10 @@ import org.jeecg.common.system.query.QueryGenerator;
14 import org.jeecg.common.system.vo.LoginUser; 17 import org.jeecg.common.system.vo.LoginUser;
15 import org.jeecg.common.util.oConvertUtils; 18 import org.jeecg.common.util.oConvertUtils;
16 import org.jeecg.modules.erp.order_form.entity.TblOrderForm; 19 import org.jeecg.modules.erp.order_form.entity.TblOrderForm;
  20 +import org.jeecg.modules.erp.order_form.entity.TblProductType;
17 import org.jeecg.modules.erp.order_form.entity.TblWorkOrder; 21 import org.jeecg.modules.erp.order_form.entity.TblWorkOrder;
18 import org.jeecg.modules.erp.order_form.entity.TblWorkPrice; 22 import org.jeecg.modules.erp.order_form.entity.TblWorkPrice;
  23 +import org.jeecg.modules.erp.order_form.form.OrderForm;
19 import org.jeecg.modules.erp.order_form.service.ITblOrderFormService; 24 import org.jeecg.modules.erp.order_form.service.ITblOrderFormService;
20 import org.jeecg.modules.erp.order_form.service.ITblWorkOrderService; 25 import org.jeecg.modules.erp.order_form.service.ITblWorkOrderService;
21 import org.jeecg.modules.erp.order_form.service.ITblWorkPriceService; 26 import org.jeecg.modules.erp.order_form.service.ITblWorkPriceService;
@@ -93,7 +98,23 @@ public class TblOrderFormController extends JeecgController<TblOrderForm, ITblOr @@ -93,7 +98,23 @@ public class TblOrderFormController extends JeecgController<TblOrderForm, ITblOr
93 @ApiOperation(value="订单表-添加", notes="订单表-添加") 98 @ApiOperation(value="订单表-添加", notes="订单表-添加")
94 @PostMapping(value = "/add") 99 @PostMapping(value = "/add")
95 public Result<String> add(@RequestBody TblOrderForm tblOrderForm) { 100 public Result<String> add(@RequestBody TblOrderForm tblOrderForm) {
96 - tblOrderFormService.save(tblOrderForm); 101 + // 产品类型
  102 + String type = tblOrderForm.getProductType() + DateUtil.format(new Date(), "YYYYMM");
  103 + Integer count = tblOrderFormService.getCountByType(type);
  104 + log.info("订单编号:"+ count);
  105 + String orderId= type + StrUtil.padPre(String.valueOf(count+1),4, '0');
  106 + tblOrderForm.setOrderId(orderId);
  107 + //任务下达日期
  108 + tblOrderForm.setOrderDate(new Date());
  109 + //是否分派设计 0 未分派 1已分派
  110 + tblOrderForm.setAssignDesignStatus("0");
  111 + //分派状态 0 未分派 1已分派
  112 + tblOrderForm.setDispatchStatus("0");
  113 + //产品设计状态:0未设计 1已设计
  114 + tblOrderForm.setProductDesignStatus("0");
  115 + //检验状态:0未检验 1已检验
  116 + tblOrderForm.setVerifyStatus("0");
  117 + tblOrderFormService.save(tblOrderForm);
97 return Result.OK("添加成功!"); 118 return Result.OK("添加成功!");
98 } 119 }
99 120
@@ -110,6 +131,38 @@ public class TblOrderFormController extends JeecgController<TblOrderForm, ITblOr @@ -110,6 +131,38 @@ public class TblOrderFormController extends JeecgController<TblOrderForm, ITblOr
110 return Result.OK("编辑成功!"); 131 return Result.OK("编辑成功!");
111 } 132 }
112 133
  134 + // 分派设计人员
  135 + @RequestMapping(value = "/updateDesigner", method = {RequestMethod.PUT,RequestMethod.POST})
  136 + public Result<String> updateDesigner(@RequestBody TblOrderForm tblOrderForm) {
  137 +// tblOrderForm.setAssignDesignDate(new Date());
  138 + tblOrderForm.setAssignDesignStatus("1");
  139 + tblOrderFormService.updateDesignerByOrderId(tblOrderForm);
  140 + return Result.OK("分派成功!");
  141 + }
  142 +
  143 + //产品设计订单列表
  144 + @GetMapping(value = "/productDesignList")
  145 + public Result<IPage<TblOrderForm>> getProductDesignList(TblOrderForm tblOrderForm,
  146 + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
  147 + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
  148 + HttpServletRequest req) {
  149 + QueryWrapper<TblOrderForm> queryWrapper = QueryGenerator.initQueryWrapper(tblOrderForm, req.getParameterMap());
  150 + queryWrapper.isNotNull("designer");
  151 + Page<TblOrderForm> page = new Page<TblOrderForm>(pageNo, pageSize);
  152 + IPage<TblOrderForm> pageList = tblOrderFormService.page(page, queryWrapper);
  153 + return Result.OK(pageList);
  154 + }
  155 +
  156 + //通过id查询一条订单
  157 + @GetMapping(value = "/queryById/{id}")
  158 + public Result<TblOrderForm> queryById(@PathVariable(name="id",required=true) String id) {
  159 + TblOrderForm tblOrderForm = tblOrderFormService.selectOneById(id);
  160 + if(tblOrderForm==null) {
  161 + return Result.error("未找到对应数据");
  162 + }
  163 + return Result.OK(tblOrderForm);
  164 + }
  165 +
113 /** 166 /**
114 * 出货 167 * 出货
115 * @param tblOrderForm 168 * @param tblOrderForm
  1 +package org.jeecg.modules.erp.order_form.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 +
  16 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  17 +import com.baomidou.mybatisplus.core.metadata.IPage;
  18 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  19 +import lombok.extern.slf4j.Slf4j;
  20 +
  21 +import org.jeecg.modules.erp.order_form.entity.TblProductType;
  22 +import org.jeecg.modules.erp.order_form.service.ITblProductTypeService;
  23 +import org.jeecgframework.poi.excel.ExcelImportUtil;
  24 +import org.jeecgframework.poi.excel.def.NormalExcelConstants;
  25 +import org.jeecgframework.poi.excel.entity.ExportParams;
  26 +import org.jeecgframework.poi.excel.entity.ImportParams;
  27 +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
  28 +import org.jeecg.common.system.base.controller.JeecgController;
  29 +import org.springframework.beans.factory.annotation.Autowired;
  30 +import org.springframework.web.bind.annotation.*;
  31 +import org.springframework.web.multipart.MultipartFile;
  32 +import org.springframework.web.multipart.MultipartHttpServletRequest;
  33 +import org.springframework.web.servlet.ModelAndView;
  34 +import com.alibaba.fastjson.JSON;
  35 +import io.swagger.annotations.Api;
  36 +import io.swagger.annotations.ApiOperation;
  37 +import org.jeecg.common.aspect.annotation.AutoLog;
  38 +
  39 + /**
  40 + * @Description: 产品类型
  41 + * @Author: jeecg-boot
  42 + * @Date: 2024-05-15
  43 + * @Version: V1.0
  44 + */
  45 +@Api(tags="产品类型")
  46 +@RestController
  47 +@RequestMapping("/order_form/tblProductType")
  48 +@Slf4j
  49 +public class TblProductTypeController extends JeecgController<TblProductType, ITblProductTypeService> {
  50 + @Autowired
  51 + private ITblProductTypeService tblProductTypeService;
  52 +
  53 + /**
  54 + * 分页列表查询
  55 + *
  56 + * @param tblProductType
  57 + * @param pageNo
  58 + * @param pageSize
  59 + * @param req
  60 + * @return
  61 + */
  62 + //@AutoLog(value = "产品类型-分页列表查询")
  63 + @ApiOperation(value="产品类型-分页列表查询", notes="产品类型-分页列表查询")
  64 + @GetMapping(value = "/list")
  65 + public Result<IPage<TblProductType>> queryPageList(TblProductType tblProductType,
  66 + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
  67 + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
  68 + HttpServletRequest req) {
  69 + QueryWrapper<TblProductType> queryWrapper = QueryGenerator.initQueryWrapper(tblProductType, req.getParameterMap());
  70 + Page<TblProductType> page = new Page<TblProductType>(pageNo, pageSize);
  71 + IPage<TblProductType> pageList = tblProductTypeService.page(page, queryWrapper);
  72 + return Result.OK(pageList);
  73 + }
  74 +
  75 + @GetMapping(value = "/listProductType")
  76 + public Result<List<TblProductType>> queryList(TblProductType tblProductType,
  77 + HttpServletRequest req) {
  78 + QueryWrapper<TblProductType> queryWrapper = QueryGenerator.initQueryWrapper(tblProductType, req.getParameterMap());
  79 + Page<TblProductType> page = new Page<TblProductType>();
  80 + List<TblProductType> pageList = tblProductTypeService.list();
  81 + return Result.OK(pageList);
  82 + }
  83 +
  84 + /**
  85 + * 添加
  86 + *
  87 + * @param tblProductType
  88 + * @return
  89 + */
  90 + @AutoLog(value = "产品类型-添加")
  91 + @ApiOperation(value="产品类型-添加", notes="产品类型-添加")
  92 + @PostMapping(value = "/add")
  93 + public Result<String> add(@RequestBody TblProductType tblProductType) {
  94 + tblProductTypeService.save(tblProductType);
  95 + return Result.OK("添加成功!");
  96 + }
  97 +
  98 + /**
  99 + * 编辑
  100 + *
  101 + * @param tblProductType
  102 + * @return
  103 + */
  104 + @AutoLog(value = "产品类型-编辑")
  105 + @ApiOperation(value="产品类型-编辑", notes="产品类型-编辑")
  106 + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
  107 + public Result<String> edit(@RequestBody TblProductType tblProductType) {
  108 + tblProductTypeService.updateById(tblProductType);
  109 + return Result.OK("编辑成功!");
  110 + }
  111 +
  112 + /**
  113 + * 通过id删除
  114 + *
  115 + * @param id
  116 + * @return
  117 + */
  118 + @AutoLog(value = "产品类型-通过id删除")
  119 + @ApiOperation(value="产品类型-通过id删除", notes="产品类型-通过id删除")
  120 + @DeleteMapping(value = "/delete")
  121 + public Result<String> delete(@RequestParam(name="id",required=true) String id) {
  122 + tblProductTypeService.removeById(id);
  123 + return Result.OK("删除成功!");
  124 + }
  125 +
  126 + /**
  127 + * 批量删除
  128 + *
  129 + * @param ids
  130 + * @return
  131 + */
  132 + @AutoLog(value = "产品类型-批量删除")
  133 + @ApiOperation(value="产品类型-批量删除", notes="产品类型-批量删除")
  134 + @DeleteMapping(value = "/deleteBatch")
  135 + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
  136 + this.tblProductTypeService.removeByIds(Arrays.asList(ids.split(",")));
  137 + return Result.OK("批量删除成功!");
  138 + }
  139 +
  140 + /**
  141 + * 通过id查询
  142 + *
  143 + * @param id
  144 + * @return
  145 + */
  146 + //@AutoLog(value = "产品类型-通过id查询")
  147 + @ApiOperation(value="产品类型-通过id查询", notes="产品类型-通过id查询")
  148 + @GetMapping(value = "/queryById")
  149 + public Result<TblProductType> queryById(@RequestParam(name="id",required=true) String id) {
  150 + TblProductType tblProductType = tblProductTypeService.getById(id);
  151 + if(tblProductType==null) {
  152 + return Result.error("未找到对应数据");
  153 + }
  154 + return Result.OK(tblProductType);
  155 + }
  156 +
  157 + /**
  158 + * 导出excel
  159 + *
  160 + * @param request
  161 + * @param tblProductType
  162 + */
  163 + @RequestMapping(value = "/exportXls")
  164 + public ModelAndView exportXls(HttpServletRequest request, TblProductType tblProductType) {
  165 + return super.exportXls(request, tblProductType, TblProductType.class, "产品类型");
  166 + }
  167 +
  168 + /**
  169 + * 通过excel导入数据
  170 + *
  171 + * @param request
  172 + * @param response
  173 + * @return
  174 + */
  175 + @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
  176 + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
  177 + return super.importExcel(request, response, TblProductType.class);
  178 + }
  179 +
  180 +}
@@ -3,24 +3,24 @@ package org.jeecg.modules.erp.order_form.entity; @@ -3,24 +3,24 @@ package org.jeecg.modules.erp.order_form.entity;
3 import java.io.Serializable; 3 import java.io.Serializable;
4 import java.io.UnsupportedEncodingException; 4 import java.io.UnsupportedEncodingException;
5 import java.util.Date; 5 import java.util.Date;
6 -import java.math.BigDecimal; 6 +import java.util.List;
  7 +
7 import com.baomidou.mybatisplus.annotation.IdType; 8 import com.baomidou.mybatisplus.annotation.IdType;
8 import com.baomidou.mybatisplus.annotation.TableId; 9 import com.baomidou.mybatisplus.annotation.TableId;
9 import com.baomidou.mybatisplus.annotation.TableName; 10 import com.baomidou.mybatisplus.annotation.TableName;
  11 +import org.jeecg.modules.erp.bidding_info.entity.TblBiddingShenq;
  12 +import org.jeecgframework.poi.excel.annotation.Excel;
10 import lombok.Data; 13 import lombok.Data;
11 import com.fasterxml.jackson.annotation.JsonFormat; 14 import com.fasterxml.jackson.annotation.JsonFormat;
12 import org.springframework.format.annotation.DateTimeFormat; 15 import org.springframework.format.annotation.DateTimeFormat;
13 -import org.jeecgframework.poi.excel.annotation.Excel;  
14 import org.jeecg.common.aspect.annotation.Dict; 16 import org.jeecg.common.aspect.annotation.Dict;
15 import io.swagger.annotations.ApiModel; 17 import io.swagger.annotations.ApiModel;
16 import io.swagger.annotations.ApiModelProperty; 18 import io.swagger.annotations.ApiModelProperty;
17 -import lombok.EqualsAndHashCode;  
18 -import lombok.experimental.Accessors;  
19 19
20 /** 20 /**
21 - * @Description: tbl_order_form 21 + * @Description: 订单表
22 * @Author: jeecg-boot 22 * @Author: jeecg-boot
23 - * @Date: 2024-05-21 23 + * @Date: 2022-07-12
24 * @Version: V1.0 24 * @Version: V1.0
25 */ 25 */
26 @Data 26 @Data
@@ -29,34 +29,34 @@ import lombok.experimental.Accessors; @@ -29,34 +29,34 @@ import lombok.experimental.Accessors;
29 public class TblOrderForm implements Serializable { 29 public class TblOrderForm implements Serializable {
30 private static final long serialVersionUID = 1L; 30 private static final long serialVersionUID = 1L;
31 31
32 - /**主键*/  
33 - @TableId(type = IdType.ASSIGN_ID) 32 + /**主键*/
  33 + @TableId(type = IdType.ASSIGN_ID)
34 @ApiModelProperty(value = "主键") 34 @ApiModelProperty(value = "主键")
35 private java.lang.String id; 35 private java.lang.String id;
36 - /**创建人*/ 36 + /**创建人*/
37 @ApiModelProperty(value = "创建人") 37 @ApiModelProperty(value = "创建人")
38 private java.lang.String createBy; 38 private java.lang.String createBy;
39 - /**创建日期*/  
40 - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") 39 + /**创建日期*/
  40 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
41 @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 41 @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
42 @ApiModelProperty(value = "创建日期") 42 @ApiModelProperty(value = "创建日期")
43 private java.util.Date createTime; 43 private java.util.Date createTime;
44 - /**更新人*/ 44 + /**更新人*/
45 @ApiModelProperty(value = "更新人") 45 @ApiModelProperty(value = "更新人")
46 private java.lang.String updateBy; 46 private java.lang.String updateBy;
47 - /**更新日期*/  
48 - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") 47 + /**更新日期*/
  48 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
49 @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 49 @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
50 @ApiModelProperty(value = "更新日期") 50 @ApiModelProperty(value = "更新日期")
51 private java.util.Date updateTime; 51 private java.util.Date updateTime;
52 - /**所属部门*/ 52 + /**所属部门*/
53 @ApiModelProperty(value = "所属部门") 53 @ApiModelProperty(value = "所属部门")
54 private java.lang.String sysOrgCode; 54 private java.lang.String sysOrgCode;
55 - /**主料号*/ 55 + /**主料号*/
56 @Excel(name = "主料号", width = 15) 56 @Excel(name = "主料号", width = 15)
57 @ApiModelProperty(value = "主料号") 57 @ApiModelProperty(value = "主料号")
58 private java.lang.String orderId; 58 private java.lang.String orderId;
59 - /**订货单位*/ 59 + /**订货单位*/
60 @Excel(name = "订货单位", width = 15) 60 @Excel(name = "订货单位", width = 15)
61 @ApiModelProperty(value = "订货单位") 61 @ApiModelProperty(value = "订货单位")
62 private java.lang.String orderCompany; 62 private java.lang.String orderCompany;
@@ -84,9 +84,9 @@ public class TblOrderForm implements Serializable { @@ -84,9 +84,9 @@ public class TblOrderForm implements Serializable {
84 // @ApiModelProperty(value = "分派设计任务日期") 84 // @ApiModelProperty(value = "分派设计任务日期")
85 // private java.util.Date assignDesignDate; 85 // private java.util.Date assignDesignDate;
86 86
87 - /**订单日期*/ 87 + /**订单日期*/
88 @Excel(name = "任务下达日期", width = 15, format = "yyyy-MM-dd") 88 @Excel(name = "任务下达日期", width = 15, format = "yyyy-MM-dd")
89 - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") 89 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
90 @DateTimeFormat(pattern="yyyy-MM-dd") 90 @DateTimeFormat(pattern="yyyy-MM-dd")
91 @ApiModelProperty(value = "订单日期") 91 @ApiModelProperty(value = "订单日期")
92 private java.util.Date orderDate; 92 private java.util.Date orderDate;
@@ -97,9 +97,9 @@ public class TblOrderForm implements Serializable { @@ -97,9 +97,9 @@ public class TblOrderForm implements Serializable {
97 @ApiModelProperty(value = "派工日期") 97 @ApiModelProperty(value = "派工日期")
98 private java.util.Date dispatchDate; 98 private java.util.Date dispatchDate;
99 99
100 - /**交货日期*/ 100 + /**交货日期*/
101 @Excel(name = "交货日期", width = 15, format = "yyyy-MM-dd") 101 @Excel(name = "交货日期", width = 15, format = "yyyy-MM-dd")
102 - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") 102 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
103 @DateTimeFormat(pattern="yyyy-MM-dd") 103 @DateTimeFormat(pattern="yyyy-MM-dd")
104 @ApiModelProperty(value = "交货日期") 104 @ApiModelProperty(value = "交货日期")
105 private java.util.Date deliveryDate; 105 private java.util.Date deliveryDate;
@@ -108,7 +108,7 @@ public class TblOrderForm implements Serializable { @@ -108,7 +108,7 @@ public class TblOrderForm implements Serializable {
108 @ApiModelProperty(value = "数量") 108 @ApiModelProperty(value = "数量")
109 private java.lang.String quantity; 109 private java.lang.String quantity;
110 110
111 - /**状态*/ 111 + /**状态*/
112 @Excel(name = "状态", width = 15) 112 @Excel(name = "状态", width = 15)
113 @ApiModelProperty(value = "状态") 113 @ApiModelProperty(value = "状态")
114 private java.lang.String status; 114 private java.lang.String status;
@@ -120,9 +120,9 @@ public class TblOrderForm implements Serializable { @@ -120,9 +120,9 @@ public class TblOrderForm implements Serializable {
120 @Excel(name = "已派发工时", width = 15) 120 @Excel(name = "已派发工时", width = 15)
121 @ApiModelProperty(value = "已派发工时") 121 @ApiModelProperty(value = "已派发工时")
122 private java.lang.String dispatchedWorkingHours; 122 private java.lang.String dispatchedWorkingHours;
123 - /**实际完成时间*/ 123 + /**实际完成时间*/
124 @Excel(name = "实际完成时间", width = 15, format = "yyyy-MM-dd") 124 @Excel(name = "实际完成时间", width = 15, format = "yyyy-MM-dd")
125 - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") 125 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
126 @DateTimeFormat(pattern="yyyy-MM-dd") 126 @DateTimeFormat(pattern="yyyy-MM-dd")
127 @ApiModelProperty(value = "实际完成时间") 127 @ApiModelProperty(value = "实际完成时间")
128 private java.util.Date finishDate; 128 private java.util.Date finishDate;
@@ -144,17 +144,17 @@ public class TblOrderForm implements Serializable { @@ -144,17 +144,17 @@ public class TblOrderForm implements Serializable {
144 @ApiModelProperty(value = "检验状态:0未检验 1已检验") 144 @ApiModelProperty(value = "检验状态:0未检验 1已检验")
145 private java.lang.String verifyStatus; 145 private java.lang.String verifyStatus;
146 146
147 - /**出货检验*/ 147 + /**出货检验*/
148 @Excel(name = "出货检验", width = 15) 148 @Excel(name = "出货检验", width = 15)
149 @ApiModelProperty(value = "出货检验") 149 @ApiModelProperty(value = "出货检验")
150 private java.lang.String verifyResult; 150 private java.lang.String verifyResult;
151 - /**出货日期*/ 151 + /**出货日期*/
152 @Excel(name = "出货日期", width = 15, format = "yyyy-MM-dd") 152 @Excel(name = "出货日期", width = 15, format = "yyyy-MM-dd")
153 - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") 153 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
154 @DateTimeFormat(pattern="yyyy-MM-dd") 154 @DateTimeFormat(pattern="yyyy-MM-dd")
155 @ApiModelProperty(value = "出货日期") 155 @ApiModelProperty(value = "出货日期")
156 private java.util.Date deliveryDate1; 156 private java.util.Date deliveryDate1;
157 - /**主料图片*/ 157 + /**主料图片*/
158 @Excel(name = "主料图片", width = 15) 158 @Excel(name = "主料图片", width = 15)
159 @ApiModelProperty(value = "主料图片") 159 @ApiModelProperty(value = "主料图片")
160 private java.lang.String pics; 160 private java.lang.String pics;
  1 +package org.jeecg.modules.erp.order_form.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: 产品类型
  22 + * @Author: jeecg-boot
  23 + * @Date: 2024-05-15
  24 + * @Version: V1.0
  25 + */
  26 +@Data
  27 +@TableName("tbl_product_type")
  28 +@Accessors(chain = true)
  29 +@EqualsAndHashCode(callSuper = false)
  30 +@ApiModel(value="tbl_product_type对象", description="产品类型")
  31 +public class TblProductType implements Serializable {
  32 + private static final long serialVersionUID = 1L;
  33 +
  34 + /**主键*/
  35 + @TableId(type = IdType.ASSIGN_ID)
  36 + @ApiModelProperty(value = "主键")
  37 + private java.lang.String id;
  38 + /**产品类型id*/
  39 + @Excel(name = "产品类型id", width = 15)
  40 + @ApiModelProperty(value = "产品类型id")
  41 + private java.lang.String productTypeId;
  42 + /**产品类型名称*/
  43 + @Excel(name = "产品类型名称", width = 15)
  44 + @ApiModelProperty(value = "产品类型名称")
  45 + private java.lang.String productTypeName;
  46 +}
  1 +package org.jeecg.modules.erp.order_form.form;
  2 +
  3 +import java.io.Serializable;
  4 +import java.util.List;
  5 +
  6 +import com.fasterxml.jackson.annotation.JsonFormat;
  7 +import org.jeecg.modules.erp.bidding_info.entity.TblBiddingShenq;
  8 +import lombok.Data;
  9 +import org.springframework.format.annotation.DateTimeFormat;
  10 +
  11 +/**
  12 + * @Description: 订单表
  13 + * @Author: jeecg-boot
  14 + * @Date: 2022-07-12
  15 + * @Version: V1.0
  16 + */
  17 +@Data
  18 +public class OrderForm implements Serializable {
  19 + private static final long serialVersionUID = 1L;
  20 +
  21 + /**主键*/
  22 + private java.lang.String id;
  23 + /**创建人*/
  24 + private java.lang.String createBy;
  25 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
  26 + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
  27 + private java.util.Date createTime;
  28 + /**更新人*/
  29 + private java.lang.String updateBy;
  30 + /**更新日期*/
  31 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
  32 + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
  33 + private java.util.Date updateTime;
  34 + /**所属部门*/
  35 + private java.lang.String sysOrgCode;
  36 + /**主料号*/
  37 + private java.lang.String orderId;
  38 + /**订货单位*/
  39 + private java.lang.String orderCompany;
  40 +
  41 + private java.lang.String workOrder;
  42 +
  43 + private java.lang.String productName;
  44 +
  45 + private java.lang.String productType;
  46 +
  47 + private java.lang.String designer;
  48 +
  49 +
  50 +// @Excel(name = "分派设计任务日期", width = 15, format = "yyyy-MM-dd")
  51 +// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  52 +// @DateTimeFormat(pattern="yyyy-MM-dd")
  53 +// @ApiModelProperty(value = "分派设计任务日期")
  54 +// private java.util.Date assignDesignDate;
  55 +
  56 + /**订单日期*/
  57 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  58 + @DateTimeFormat(pattern="yyyy-MM-dd")
  59 + private java.util.Date orderDate;
  60 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  61 + @DateTimeFormat(pattern="yyyy-MM-dd")
  62 + private java.util.Date dispatchDate;
  63 +
  64 + /**交货日期*/
  65 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  66 + @DateTimeFormat(pattern="yyyy-MM-dd")
  67 + private java.util.Date deliveryDate;
  68 +
  69 + private java.lang.String quantity;
  70 +
  71 + /**状态*/
  72 + private java.lang.String status;
  73 +
  74 + private java.lang.String totalWorkingHours;
  75 +
  76 + private java.lang.String dispatchedWorkingHours;
  77 + /**实际完成时间*/
  78 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  79 + @DateTimeFormat(pattern="yyyy-MM-dd")
  80 + private java.util.Date finishDate;
  81 +
  82 +
  83 + private java.lang.String assignDesignStatus;
  84 +
  85 + private java.lang.String dispatchStatus;
  86 +
  87 + private java.lang.String productDesignStatus;
  88 +
  89 + private java.lang.String verifyStatus;
  90 +
  91 + /**出货检验*/
  92 + private java.lang.String verifyResult;
  93 + /**出货日期*/
  94 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  95 + @DateTimeFormat(pattern="yyyy-MM-dd")
  96 + private java.util.Date deliveryDate1;
  97 + /**主料图片*/
  98 + private java.lang.String pics;
  99 +
  100 + private java.lang.String files;
  101 +
  102 + private List<TblBiddingShenq> biddingSqList;
  103 + /**收货图片*/
  104 +// @Excel(name = "收货图片", width = 15)
  105 +// @ApiModelProperty(value = "收货图片")
  106 +// private java.lang.String pics2;
  107 +}
@@ -15,4 +15,11 @@ public interface TblOrderFormMapper extends BaseMapper<TblOrderForm> { @@ -15,4 +15,11 @@ public interface TblOrderFormMapper extends BaseMapper<TblOrderForm> {
15 15
16 List<TblOrderForm> pageTblOrderFormDate(Integer integer); 16 List<TblOrderForm> pageTblOrderFormDate(Integer integer);
17 17
  18 + Integer getCountByType(String productType);
  19 +
  20 + TblOrderForm selectOneById(String id);
  21 +
  22 + Integer updateDesignerByOrderId(TblOrderForm tblOrderForm);
  23 + Integer updateProductDesignStatusByOrderId(TblOrderForm tblOrderForm);
  24 +
18 } 25 }
  1 +package org.jeecg.modules.erp.order_form.mapper;
  2 +
  3 +import java.util.List;
  4 +
  5 +import org.apache.ibatis.annotations.Param;
  6 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  7 +import org.jeecg.modules.erp.order_form.entity.TblProductType;
  8 +
  9 +/**
  10 + * @Description: 产品类型
  11 + * @Author: jeecg-boot
  12 + * @Date: 2024-05-15
  13 + * @Version: V1.0
  14 + */
  15 +public interface TblProductTypeMapper extends BaseMapper<TblProductType> {
  16 +
  17 +}
@@ -20,4 +20,39 @@ @@ -20,4 +20,39 @@
20 NOW())>= 0 20 NOW())>= 0
21 AND STATUS = '生产中' 21 AND STATUS = '生产中'
22 </select> 22 </select>
  23 + <select id="selectAll" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">
  24 + SELECT
  25 + a.id,a.create_by,a.create_time,a.update_by,a.update_time,a.sys_org_code,a.order_id,a.order_company,
  26 + a.work_order,a.product_name,b.product_type_name as product_type,a.order_date,a.designer,
  27 + a.dispatch_date,a.delivery_date,a.quantity,a.total_working_hours,a.dispatched_working_hours,a.STATUS,
  28 + a.finish_date,a.dispatch_status,a.product_design_status,a.verify_status,a.verify_result,a.delivery_date1,a.pics,a.pics2
  29 + FROM
  30 + tbl_order_form a
  31 + LEFT JOIN tbl_product_type b on a.product_type = b.product_type_id
  32 + </select>
  33 + <select id="getCountByType" parameterType="java.lang.String" resultType="java.lang.Integer">
  34 + SELECT
  35 + count(product_type)
  36 + FROM
  37 + tbl_order_form
  38 + WHERE
  39 + order_id like CONCAT( #{productType}, '%')
  40 + </select>
  41 + <select id="selectOneById" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">
  42 + SELECT
  43 + a.id,a.create_by,a.create_time,a.update_by,a.update_time,a.sys_org_code,a.order_id,a.order_company,
  44 + a.work_order,a.product_name,b.product_type_name as product_type,a.order_date,a.designer,
  45 + a.dispatch_date,a.delivery_date,a.quantity,a.total_working_hours,a.dispatched_working_hours,a.STATUS,
  46 + a.finish_date,a.dispatch_status,a.product_design_status,a.verify_status,a.verify_result,a.delivery_date1,a.pics,a.pics2
  47 + FROM
  48 + tbl_order_form a
  49 + LEFT JOIN tbl_product_type b on a.product_type = b.product_type_id where a.id =#{id}
  50 + </select>
  51 + <update id="updateDesignerByOrderId" parameterType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">
  52 + update tbl_order_form set designer = #{designer},assign_design_status = #{assignDesignStatus},dispatch_date=#{dispatchDate} where order_id =#{orderId}
  53 + </update>
  54 +
  55 + <update id="updateProductDesignStatusByOrderId" parameterType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">
  56 + update tbl_order_form set product_design_status = #{productDesignStatus} where order_id =#{orderId}
  57 + </update>
23 </mapper> 58 </mapper>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="org.jeecg.modules.erp.order_form.mapper.TblProductTypeMapper">
  4 +
  5 +</mapper>
@@ -31,4 +31,12 @@ public interface ITblOrderFormService extends IService<TblOrderForm> { @@ -31,4 +31,12 @@ public interface ITblOrderFormService extends IService<TblOrderForm> {
31 31
32 32
33 List<TblOrderForm> pageTblOrderFormDate(Integer integer); 33 List<TblOrderForm> pageTblOrderFormDate(Integer integer);
  34 +
  35 + Integer getCountByType(String productType);
  36 +
  37 + TblOrderForm selectOneById(String id);
  38 +
  39 + Integer updateDesignerByOrderId(TblOrderForm tblOrderForm);
  40 + Integer updateProductDesignStatusByOrderId(TblOrderForm tblOrderForm);
  41 +
34 } 42 }
  1 +package org.jeecg.modules.erp.order_form.service;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import org.jeecg.modules.erp.order_form.entity.TblProductType;
  5 +
  6 +/**
  7 + * @Description: 产品类型
  8 + * @Author: jeecg-boot
  9 + * @Date: 2024-05-15
  10 + * @Version: V1.0
  11 + */
  12 +public interface ITblProductTypeService extends IService<TblProductType> {
  13 +
  14 +}
@@ -48,4 +48,24 @@ public class TblOrderFormServiceImpl extends ServiceImpl<TblOrderFormMapper, Tbl @@ -48,4 +48,24 @@ public class TblOrderFormServiceImpl extends ServiceImpl<TblOrderFormMapper, Tbl
48 return tblOrderFormMapper.pageTblOrderFormDate(integer); 48 return tblOrderFormMapper.pageTblOrderFormDate(integer);
49 } 49 }
50 50
  51 + @Override
  52 + public Integer getCountByType(String productType) {
  53 + return tblOrderFormMapper.getCountByType(productType);
  54 + }
  55 +
  56 + @Override
  57 + public TblOrderForm selectOneById(String id) {
  58 + return tblOrderFormMapper.selectOneById(id);
  59 + }
  60 +
  61 + @Override
  62 + public Integer updateDesignerByOrderId(TblOrderForm tblOrderForm) {
  63 + return tblOrderFormMapper.updateDesignerByOrderId(tblOrderForm);
  64 + }
  65 +
  66 + @Override
  67 + public Integer updateProductDesignStatusByOrderId(TblOrderForm tblOrderForm) {
  68 + return tblOrderFormMapper.updateProductDesignStatusByOrderId(tblOrderForm);
  69 + }
  70 +
51 } 71 }
  1 +package org.jeecg.modules.erp.order_form.service.impl;
  2 +
  3 +import org.jeecg.modules.erp.order_form.entity.TblProductType;
  4 +import org.jeecg.modules.erp.order_form.mapper.TblProductTypeMapper;
  5 +import org.jeecg.modules.erp.order_form.service.ITblProductTypeService;
  6 +import org.springframework.stereotype.Service;
  7 +
  8 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  9 +
  10 +/**
  11 + * @Description: 产品类型
  12 + * @Author: jeecg-boot
  13 + * @Date: 2024-05-15
  14 + * @Version: V1.0
  15 + */
  16 +@Service
  17 +public class TblProductTypeServiceImpl extends ServiceImpl<TblProductTypeMapper, TblProductType> implements ITblProductTypeService {
  18 +
  19 +}
  1 +package org.jeecg.modules.erp.product_design.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.bidding_info.service.ITblBiddingShenqService;
  16 +import org.jeecg.modules.erp.order_form.entity.TblOrderForm;
  17 +import org.jeecg.modules.erp.order_form.form.OrderForm;
  18 +import org.jeecg.modules.erp.order_form.service.ITblOrderFormService;
  19 +import org.jeecg.modules.erp.product_design.entity.TblProductDesign;
  20 +import org.jeecg.modules.erp.product_design.service.ITblProductDesignService;
  21 +
  22 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  23 +import com.baomidou.mybatisplus.core.metadata.IPage;
  24 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  25 +import lombok.extern.slf4j.Slf4j;
  26 +
  27 +import org.jeecgframework.poi.excel.ExcelImportUtil;
  28 +import org.jeecgframework.poi.excel.def.NormalExcelConstants;
  29 +import org.jeecgframework.poi.excel.entity.ExportParams;
  30 +import org.jeecgframework.poi.excel.entity.ImportParams;
  31 +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
  32 +import org.jeecg.common.system.base.controller.JeecgController;
  33 +import org.springframework.beans.factory.annotation.Autowired;
  34 +import org.springframework.transaction.annotation.Transactional;
  35 +import org.springframework.web.bind.annotation.*;
  36 +import org.springframework.web.multipart.MultipartFile;
  37 +import org.springframework.web.multipart.MultipartHttpServletRequest;
  38 +import org.springframework.web.servlet.ModelAndView;
  39 +import com.alibaba.fastjson.JSON;
  40 +import io.swagger.annotations.Api;
  41 +import io.swagger.annotations.ApiOperation;
  42 +import org.jeecg.common.aspect.annotation.AutoLog;
  43 +
  44 + /**
  45 + * @Description: 产品设计图
  46 + * @Author: jeecg-boot
  47 + * @Date: 2024-05-17
  48 + * @Version: V1.0
  49 + */
  50 +@Api(tags="产品设计图")
  51 +@RestController
  52 +@RequestMapping("/product_design/tblProductDesign")
  53 +@Slf4j
  54 +public class TblProductDesignController extends JeecgController<TblProductDesign, ITblProductDesignService> {
  55 + @Autowired
  56 + private ITblProductDesignService tblProductDesignService;
  57 +
  58 + @Autowired
  59 + private ITblBiddingShenqService tblBiddingShenqService;
  60 +
  61 + @Autowired
  62 + private ITblOrderFormService tblOrderFormService;
  63 +
  64 + /**
  65 + * 分页列表查询
  66 + *
  67 + * @param tblProductDesign
  68 + * @param pageNo
  69 + * @param pageSize
  70 + * @param req
  71 + * @return
  72 + */
  73 + //@AutoLog(value = "产品设计图-分页列表查询")
  74 + @ApiOperation(value="产品设计图-分页列表查询", notes="产品设计图-分页列表查询")
  75 + @GetMapping(value = "/list")
  76 + public Result<IPage<TblProductDesign>> queryPageList(TblProductDesign tblProductDesign,
  77 + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
  78 + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
  79 + HttpServletRequest req) {
  80 + QueryWrapper<TblProductDesign> queryWrapper = QueryGenerator.initQueryWrapper(tblProductDesign, req.getParameterMap());
  81 + Page<TblProductDesign> page = new Page<TblProductDesign>(pageNo, pageSize);
  82 + IPage<TblProductDesign> pageList = tblProductDesignService.page(page, queryWrapper);
  83 + return Result.OK(pageList);
  84 + }
  85 +
  86 + /**
  87 + * 添加
  88 + *
  89 + * @param tblOrderForm
  90 + * @return
  91 + */
  92 + @Transactional(rollbackFor = Exception.class)
  93 + @AutoLog(value = "产品设计图-添加")
  94 + @ApiOperation(value="产品设计图-添加", notes="产品设计图-添加")
  95 + @PostMapping(value = "/add")
  96 + public Result<String> add(@RequestBody OrderForm tblOrderForm) {
  97 + //保存产品设计
  98 + TblProductDesign tblProductDesign = new TblProductDesign();
  99 + tblProductDesign.setOrderId(tblOrderForm.getOrderId());
  100 + tblProductDesign.setDesignPic(tblOrderForm.getPics());
  101 + tblProductDesign.setDesignFile(tblOrderForm.getFiles());
  102 + tblProductDesignService.save(tblProductDesign);
  103 + //批量保存材料及外购件
  104 + tblBiddingShenqService.saveBatch(tblOrderForm.getBiddingSqList());
  105 + //更新生产订单表中产品设计状态
  106 + TblOrderForm tblOrderForm1 = new TblOrderForm();
  107 + tblOrderForm1.setProductDesignStatus("1");
  108 + tblOrderForm1.setOrderId(tblOrderForm.getOrderId());
  109 + tblOrderFormService.updateProductDesignStatusByOrderId(tblOrderForm1);
  110 + return Result.OK("添加成功!");
  111 + }
  112 +
  113 + /**
  114 + * 编辑
  115 + *
  116 + * @param tblOrderForm
  117 + * @return
  118 + */
  119 + @Transactional(rollbackFor = Exception.class)
  120 + @AutoLog(value = "产品设计图-编辑")
  121 + @ApiOperation(value="产品设计图-编辑", notes="产品设计图-编辑")
  122 + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
  123 + public Result<String> edit(@RequestBody OrderForm tblOrderForm) {
  124 + //删除材料及外购件
  125 + tblBiddingShenqService.deleteByOrdeId(tblOrderForm.getOrderId());
  126 + //批量保存材料及外购件
  127 + tblBiddingShenqService.saveBatch(tblOrderForm.getBiddingSqList());
  128 +
  129 +
  130 + //保存产品设计
  131 + TblProductDesign tblProductDesign = new TblProductDesign();
  132 + //前端处理把产品设计的id传给生产订单id
  133 + tblProductDesign.setId(tblOrderForm.getId());
  134 + tblProductDesign.setOrderId(tblOrderForm.getOrderId());
  135 + tblProductDesign.setDesignPic(tblOrderForm.getPics());
  136 + tblProductDesign.setDesignFile(tblOrderForm.getFiles());
  137 + tblProductDesignService.updateById(tblProductDesign);
  138 +// tblProductDesignService.updateByOrderId(tblProductDesign);
  139 + return Result.OK("编辑成功!");
  140 + }
  141 +
  142 + /**
  143 + * 通过id删除
  144 + *
  145 + * @param id
  146 + * @return
  147 + */
  148 + @AutoLog(value = "产品设计图-通过id删除")
  149 + @ApiOperation(value="产品设计图-通过id删除", notes="产品设计图-通过id删除")
  150 + @DeleteMapping(value = "/delete")
  151 + public Result<String> delete(@RequestParam(name="id",required=true) String id) {
  152 + tblProductDesignService.removeById(id);
  153 + return Result.OK("删除成功!");
  154 + }
  155 +
  156 + /**
  157 + * 批量删除
  158 + *
  159 + * @param ids
  160 + * @return
  161 + */
  162 + @AutoLog(value = "产品设计图-批量删除")
  163 + @ApiOperation(value="产品设计图-批量删除", notes="产品设计图-批量删除")
  164 + @DeleteMapping(value = "/deleteBatch")
  165 + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
  166 + this.tblProductDesignService.removeByIds(Arrays.asList(ids.split(",")));
  167 + return Result.OK("批量删除成功!");
  168 + }
  169 +
  170 + /**
  171 + * 通过id查询
  172 + *
  173 + * @param id
  174 + * @return
  175 + */
  176 + //@AutoLog(value = "产品设计图-通过id查询")
  177 + @ApiOperation(value="产品设计图-通过id查询", notes="产品设计图-通过id查询")
  178 + @GetMapping(value = "/queryById")
  179 + public Result<TblProductDesign> queryById(@RequestParam(name="id",required=true) String id) {
  180 + TblProductDesign tblProductDesign = tblProductDesignService.getById(id);
  181 + if(tblProductDesign==null) {
  182 + return Result.error("未找到对应数据");
  183 + }
  184 + return Result.OK(tblProductDesign);
  185 + }
  186 +
  187 + @GetMapping(value = "/queryByOrderId/{orderId}")
  188 + public Result<TblProductDesign> queryByOrderId(@PathVariable(name="orderId",required=true) String orderId) {
  189 + TblProductDesign tblProductDesign = tblProductDesignService.getByOrderId(orderId);
  190 + if(tblProductDesign==null) {
  191 + return Result.error("未找到对应数据");
  192 + }
  193 + return Result.OK(tblProductDesign);
  194 + }
  195 + /**
  196 + * 导出excel
  197 + *
  198 + * @param request
  199 + * @param tblProductDesign
  200 + */
  201 + @RequestMapping(value = "/exportXls")
  202 + public ModelAndView exportXls(HttpServletRequest request, TblProductDesign tblProductDesign) {
  203 + return super.exportXls(request, tblProductDesign, TblProductDesign.class, "产品设计图");
  204 + }
  205 +
  206 + /**
  207 + * 通过excel导入数据
  208 + *
  209 + * @param request
  210 + * @param response
  211 + * @return
  212 + */
  213 + @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
  214 + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
  215 + return super.importExcel(request, response, TblProductDesign.class);
  216 + }
  217 +
  218 +}
  1 +package org.jeecg.modules.erp.product_design.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: 产品设计图
  22 + * @Author: jeecg-boot
  23 + * @Date: 2024-05-17
  24 + * @Version: V1.0
  25 + */
  26 +@Data
  27 +@TableName("tbl_product_design")
  28 +@Accessors(chain = true)
  29 +@EqualsAndHashCode(callSuper = false)
  30 +@ApiModel(value="tbl_product_design对象", description="产品设计图")
  31 +public class TblProductDesign implements Serializable {
  32 + private static final long serialVersionUID = 1L;
  33 +
  34 + /**主键*/
  35 + @TableId(type = IdType.ASSIGN_ID)
  36 + @ApiModelProperty(value = "主键")
  37 + private String id;
  38 + /**订单编号*/
  39 + @Excel(name = "订单编号", width = 15)
  40 + @ApiModelProperty(value = "订单编号")
  41 + private String orderId;
  42 + /**设计图片*/
  43 + @Excel(name = "设计图片", width = 15)
  44 + @ApiModelProperty(value = "设计图片")
  45 + private String designPic;
  46 + /**设计文件*/
  47 + @Excel(name = "设计文件", width = 15)
  48 + @ApiModelProperty(value = "设计文件")
  49 + private String designFile;
  50 + /**创建人*/
  51 + @ApiModelProperty(value = "创建人")
  52 + private String createBy;
  53 + /**创建日期*/
  54 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
  55 + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
  56 + @ApiModelProperty(value = "创建日期")
  57 + private Date createTime;
  58 + /**更新人*/
  59 + @ApiModelProperty(value = "更新人")
  60 + private String updateBy;
  61 + /**更新日期*/
  62 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
  63 + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
  64 + @ApiModelProperty(value = "更新日期")
  65 + private Date updateTime;
  66 + /**所属部门*/
  67 + @ApiModelProperty(value = "所属部门")
  68 + private String sysOrgCode;
  69 +}
  1 +package org.jeecg.modules.erp.product_design.mapper;
  2 +
  3 +import java.util.List;
  4 +
  5 +import org.apache.ibatis.annotations.Param;
  6 +import org.jeecg.modules.erp.bidding_info.entity.TblBiddingShenq;
  7 +import org.jeecg.modules.erp.product_design.entity.TblProductDesign;
  8 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  9 +
  10 +/**
  11 + * @Description: 产品设计图
  12 + * @Author: jeecg-boot
  13 + * @Date: 2024-05-17
  14 + * @Version: V1.0
  15 + */
  16 +public interface TblProductDesignMapper extends BaseMapper<TblProductDesign> {
  17 +
  18 + TblProductDesign getByOrderId(String orderId);
  19 + Integer updateByOrderId(TblProductDesign tblProductDesign);
  20 +
  21 +}
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="org.jeecg.modules.erp.product_design.mapper.TblProductDesignMapper">
  4 + <select id="getByOrderId" resultType="org.jeecg.modules.erp.product_design.entity.TblProductDesign">
  5 + select * from tbl_product_design where order_id = #{orderId}
  6 + </select>
  7 + <update id="updateByOrderId" parameterType="org.jeecg.modules.erp.product_design.entity.TblProductDesign">
  8 + update tbl_product_design set design_pic = #{designPic}, design_file = #{designFile} where order_id = #{orderId}
  9 + </update>
  10 +</mapper>
  1 +package org.jeecg.modules.erp.product_design.service;
  2 +
  3 +import org.jeecg.modules.erp.product_design.entity.TblProductDesign;
  4 +import com.baomidou.mybatisplus.extension.service.IService;
  5 +
  6 +/**
  7 + * @Description: 产品设计图
  8 + * @Author: jeecg-boot
  9 + * @Date: 2024-05-17
  10 + * @Version: V1.0
  11 + */
  12 +public interface ITblProductDesignService extends IService<TblProductDesign> {
  13 +
  14 + TblProductDesign getByOrderId(String orderId);
  15 +
  16 + Integer updateByOrderId(TblProductDesign tblProductDesign);
  17 +}
  1 +package org.jeecg.modules.erp.product_design.service.impl;
  2 +
  3 +import org.jeecg.modules.erp.product_design.entity.TblProductDesign;
  4 +import org.jeecg.modules.erp.product_design.mapper.TblProductDesignMapper;
  5 +import org.jeecg.modules.erp.product_design.service.ITblProductDesignService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.stereotype.Service;
  8 +
  9 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  10 +
  11 +/**
  12 + * @Description: 产品设计图
  13 + * @Author: jeecg-boot
  14 + * @Date: 2024-05-17
  15 + * @Version: V1.0
  16 + */
  17 +@Service
  18 +public class TblProductDesignServiceImpl extends ServiceImpl<TblProductDesignMapper, TblProductDesign> implements ITblProductDesignService {
  19 +
  20 + @Autowired
  21 + private TblProductDesignMapper tblProductDesignMapper;
  22 +
  23 + @Override
  24 + public TblProductDesign getByOrderId(String orderId) {
  25 + return tblProductDesignMapper.getByOrderId(orderId);
  26 + }
  27 +
  28 + @Override
  29 + public Integer updateByOrderId(TblProductDesign tblProductDesign) {
  30 + return tblProductDesignMapper.updateByOrderId(tblProductDesign);
  31 + }
  32 +}
@@ -7,22 +7,19 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -7,22 +7,19 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7 import io.swagger.annotations.Api; 7 import io.swagger.annotations.Api;
8 import io.swagger.annotations.ApiOperation; 8 import io.swagger.annotations.ApiOperation;
9 import lombok.extern.slf4j.Slf4j; 9 import lombok.extern.slf4j.Slf4j;
  10 +import org.apache.poi.ss.formula.functions.T;
10 import org.jeecg.common.api.vo.Result; 11 import org.jeecg.common.api.vo.Result;
11 import org.jeecg.common.aspect.annotation.AutoLog; 12 import org.jeecg.common.aspect.annotation.AutoLog;
12 -import org.jeecg.common.system.base.controller.JeecgController; 13 +import org.jeecg.common.constant.CommonConstant;
13 import org.jeecg.common.system.query.QueryGenerator; 14 import org.jeecg.common.system.query.QueryGenerator;
14 import org.jeecg.modules.erp.salary.entity.TblSalaryBase; 15 import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
15 -import org.jeecg.modules.erp.salary.entity.TblSalarySuanfa;  
16 -import org.jeecg.modules.erp.salary.service.ITblSalarySuanfaService;  
17 import org.jeecg.modules.erp.salary.service.TblSalaryBaseService; 16 import org.jeecg.modules.erp.salary.service.TblSalaryBaseService;
18 import org.jeecg.modules.erp.trad.entity.TblTradTender; 17 import org.jeecg.modules.erp.trad.entity.TblTradTender;
19 import org.springframework.beans.factory.annotation.Autowired; 18 import org.springframework.beans.factory.annotation.Autowired;
20 import org.springframework.web.bind.annotation.*; 19 import org.springframework.web.bind.annotation.*;
21 -import org.springframework.web.servlet.ModelAndView;  
22 20
23 import javax.servlet.http.HttpServletRequest; 21 import javax.servlet.http.HttpServletRequest;
24 -import javax.servlet.http.HttpServletResponse;  
25 -import java.util.Arrays; 22 +import java.util.*;
26 23
27 /** 24 /**
28 * @Description: tbl_salary_base 25 * @Description: tbl_salary_base
@@ -34,7 +31,7 @@ import java.util.Arrays; @@ -34,7 +31,7 @@ import java.util.Arrays;
34 @RestController 31 @RestController
35 @RequestMapping("/salary/base") 32 @RequestMapping("/salary/base")
36 @Slf4j 33 @Slf4j
37 -public class TblSalaryBaseController extends JeecgController<TblSalaryBase, TblSalaryBaseService> { 34 +public class TblSalaryBaseController {
38 35
39 @Autowired 36 @Autowired
40 private TblSalaryBaseService tblSalaryBaseService; 37 private TblSalaryBaseService tblSalaryBaseService;
@@ -61,6 +58,13 @@ public class TblSalaryBaseController extends JeecgController<TblSalaryBase, TblS @@ -61,6 +58,13 @@ public class TblSalaryBaseController extends JeecgController<TblSalaryBase, TblS
61 return Result.OK(pageList); 58 return Result.OK(pageList);
62 } 59 }
63 60
  61 + //人员下拉
  62 + @GetMapping(value = "/listSalary")
  63 + public Result<List<Map<String,String>>> listSalary(){
  64 + List<Map<String,String>> list = tblSalaryBaseService.selectUserAll();
  65 + return Result.ok(list);
  66 + }
  67 +
64 @ApiOperation(value = "tbl_salary_base-手机号验证") 68 @ApiOperation(value = "tbl_salary_base-手机号验证")
65 @GetMapping(value = "/listphone") 69 @GetMapping(value = "/listphone")
66 public Result<?> listphone(@RequestParam(name = "phone", required = true) String phone){ 70 public Result<?> listphone(@RequestParam(name = "phone", required = true) String phone){
@@ -141,27 +145,4 @@ public class TblSalaryBaseController extends JeecgController<TblSalaryBase, TblS @@ -141,27 +145,4 @@ public class TblSalaryBaseController extends JeecgController<TblSalaryBase, TblS
141 } 145 }
142 return Result.OK(tblSalaryBase); 146 return Result.OK(tblSalaryBase);
143 } 147 }
144 -  
145 - /**  
146 - * 导出excel  
147 - *  
148 - * @param request  
149 - * @param tblSalaryBase  
150 - */  
151 - @RequestMapping(value = "/exportXls")  
152 - public ModelAndView exportXls(HttpServletRequest request, TblSalaryBase tblSalaryBase) {  
153 - return super.exportXls(request, tblSalaryBase, TblSalaryBase.class, "tbl_salary_base");  
154 - }  
155 -  
156 - /**  
157 - * 通过excel导入数据  
158 - *  
159 - * @param request  
160 - * @param response  
161 - * @return  
162 - */  
163 - @RequestMapping(value = "/importExcel", method = RequestMethod.POST)  
164 - public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {  
165 - return super.importExcel(request, response, TblSalaryBase.class);  
166 - }  
167 } 148 }
@@ -3,6 +3,9 @@ package org.jeecg.modules.erp.salary.mapper; @@ -3,6 +3,9 @@ package org.jeecg.modules.erp.salary.mapper;
3 import com.baomidou.mybatisplus.core.mapper.BaseMapper; 3 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 import org.jeecg.modules.erp.salary.entity.TblSalaryBase; 4 import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
5 5
  6 +import java.util.List;
  7 +import java.util.Map;
  8 +
6 9
7 /** 10 /**
8 * @author Administrator 11 * @author Administrator
@@ -12,6 +15,7 @@ import org.jeecg.modules.erp.salary.entity.TblSalaryBase; @@ -12,6 +15,7 @@ import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
12 */ 15 */
13 public interface TblSalaryBaseMapper extends BaseMapper<TblSalaryBase> { 16 public interface TblSalaryBaseMapper extends BaseMapper<TblSalaryBase> {
14 17
  18 + List<Map<String,String>> selectUserAll();
15 } 19 }
16 20
17 21
@@ -29,4 +29,7 @@ @@ -29,4 +29,7 @@
29 social_person,notes,create_by, 29 social_person,notes,create_by,
30 create_time,update_by,update_time 30 create_time,update_by,update_time
31 </sql> 31 </sql>
  32 + <select id="selectUserAll" resultType="java.util.Map">
  33 + SELECT a.job_id jobId,CONCAT(a.user_name,'(',b.job_title,')') as userName from tbl_salary_base a left join tbl_salary_suanfa b on a.job_title = b.job_id
  34 + </select>
32 </mapper> 35 </mapper>
@@ -3,6 +3,9 @@ package org.jeecg.modules.erp.salary.service; @@ -3,6 +3,9 @@ package org.jeecg.modules.erp.salary.service;
3 import com.baomidou.mybatisplus.extension.service.IService; 3 import com.baomidou.mybatisplus.extension.service.IService;
4 import org.jeecg.modules.erp.salary.entity.TblSalaryBase; 4 import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
5 5
  6 +import java.util.List;
  7 +import java.util.Map;
  8 +
6 9
7 /** 10 /**
8 * @author Administrator 11 * @author Administrator
@@ -11,4 +14,5 @@ import org.jeecg.modules.erp.salary.entity.TblSalaryBase; @@ -11,4 +14,5 @@ import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
11 */ 14 */
12 public interface TblSalaryBaseService extends IService<TblSalaryBase> { 15 public interface TblSalaryBaseService extends IService<TblSalaryBase> {
13 16
  17 + List<Map<String,String>> selectUserAll();
14 } 18 }
@@ -6,8 +6,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -6,8 +6,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
6 import org.jeecg.modules.erp.salary.entity.TblSalaryBase; 6 import org.jeecg.modules.erp.salary.entity.TblSalaryBase;
7 import org.jeecg.modules.erp.salary.mapper.TblSalaryBaseMapper; 7 import org.jeecg.modules.erp.salary.mapper.TblSalaryBaseMapper;
8 import org.jeecg.modules.erp.salary.service.TblSalaryBaseService; 8 import org.jeecg.modules.erp.salary.service.TblSalaryBaseService;
  9 +import org.springframework.beans.factory.annotation.Autowired;
9 import org.springframework.stereotype.Service; 10 import org.springframework.stereotype.Service;
10 11
  12 +import java.util.List;
  13 +import java.util.Map;
  14 +
11 /** 15 /**
12 * @author Administrator 16 * @author Administrator
13 * @description 针对表【tbl_salary_base】的数据库操作Service实现 17 * @description 针对表【tbl_salary_base】的数据库操作Service实现
@@ -17,6 +21,13 @@ import org.springframework.stereotype.Service; @@ -17,6 +21,13 @@ import org.springframework.stereotype.Service;
17 public class TblSalaryBaseServiceImpl extends ServiceImpl<TblSalaryBaseMapper, TblSalaryBase> 21 public class TblSalaryBaseServiceImpl extends ServiceImpl<TblSalaryBaseMapper, TblSalaryBase>
18 implements TblSalaryBaseService { 22 implements TblSalaryBaseService {
19 23
  24 + @Autowired
  25 + private TblSalaryBaseMapper tblSalaryBaseMapper;
  26 +
  27 + @Override
  28 + public List<Map<String, String>> selectUserAll() {
  29 + return tblSalaryBaseMapper.selectUserAll();
  30 + }
20 } 31 }
21 32
22 33
@@ -138,10 +138,15 @@ public class CommonController { @@ -138,10 +138,15 @@ public class CommonController {
138 // 获取文件名 138 // 获取文件名
139 String orgName = mf.getOriginalFilename(); 139 String orgName = mf.getOriginalFilename();
140 orgName = CommonUtils.getFileName(orgName); 140 orgName = CommonUtils.getFileName(orgName);
  141 +// if(orgName.indexOf(".")!=-1){
  142 +// fileName = orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.lastIndexOf("."));
  143 +// }else{
  144 +// fileName = orgName+ "_" + System.currentTimeMillis();
  145 +// }
141 if(orgName.indexOf(".")!=-1){ 146 if(orgName.indexOf(".")!=-1){
142 - fileName = orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.lastIndexOf(".")); 147 + fileName = System.currentTimeMillis() + orgName.substring(orgName.lastIndexOf("."));
143 }else{ 148 }else{
144 - fileName = orgName+ "_" + System.currentTimeMillis(); 149 + fileName = System.currentTimeMillis()+"";
145 } 150 }
146 String savePath = file.getPath() + File.separator + fileName; 151 String savePath = file.getPath() + File.separator + fileName;
147 File savefile = new File(savePath); 152 File savefile = new File(savePath);