正在显示
22 个修改的文件
包含
916 行增加
和
7 行删除
| @@ -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 | } |
jeecg-boot-erp/src/main/java/org/jeecg/modules/erp/bidding_info/mapper/xml/TblBiddingShenqMapper.xml
| 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> |
jeecg-boot-erp/src/main/java/org/jeecg/modules/erp/bidding_info/service/ITblBiddingShenqService.java
| @@ -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 | } |
jeecg-boot-erp/src/main/java/org/jeecg/modules/erp/order_form/controller/TblOrderFormController.java
| 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,9 +3,12 @@ package org.jeecg.modules.erp.order_form.entity; | @@ -3,9 +3,12 @@ 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.util.List; | ||
| 7 | + | ||
| 6 | import com.baomidou.mybatisplus.annotation.IdType; | 8 | import com.baomidou.mybatisplus.annotation.IdType; |
| 7 | import com.baomidou.mybatisplus.annotation.TableId; | 9 | import com.baomidou.mybatisplus.annotation.TableId; |
| 8 | import com.baomidou.mybatisplus.annotation.TableName; | 10 | import com.baomidou.mybatisplus.annotation.TableName; |
| 11 | +import org.jeecg.modules.erp.bidding_info.entity.TblBiddingShenq; | ||
| 9 | import org.jeecgframework.poi.excel.annotation.Excel; | 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; |
| @@ -57,28 +60,90 @@ public class TblOrderForm implements Serializable { | @@ -57,28 +60,90 @@ public class TblOrderForm implements Serializable { | ||
| 57 | @Excel(name = "订货单位", width = 15) | 60 | @Excel(name = "订货单位", width = 15) |
| 58 | @ApiModelProperty(value = "订货单位") | 61 | @ApiModelProperty(value = "订货单位") |
| 59 | private java.lang.String orderCompany; | 62 | private java.lang.String orderCompany; |
| 63 | + | ||
| 64 | + @Excel(name = "工作令", width = 15) | ||
| 65 | + @ApiModelProperty(value = "工作令") | ||
| 66 | + private java.lang.String workOrder; | ||
| 67 | + | ||
| 68 | + @Excel(name = "产品名称", width = 15) | ||
| 69 | + @ApiModelProperty(value = "产品名称") | ||
| 70 | + private java.lang.String productName; | ||
| 71 | + | ||
| 72 | + @Excel(name = "产品类型", width = 15) | ||
| 73 | + @ApiModelProperty(value = "产品类型") | ||
| 74 | + private java.lang.String productType; | ||
| 75 | + | ||
| 76 | + @Excel(name = "设计人员", width = 15) | ||
| 77 | + @ApiModelProperty(value = "设计人员") | ||
| 78 | + private java.lang.String designer; | ||
| 79 | + | ||
| 80 | + | ||
| 81 | +// @Excel(name = "分派设计任务日期", width = 15, format = "yyyy-MM-dd") | ||
| 82 | +// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | ||
| 83 | +// @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 84 | +// @ApiModelProperty(value = "分派设计任务日期") | ||
| 85 | +// private java.util.Date assignDesignDate; | ||
| 86 | + | ||
| 60 | /**订单日期*/ | 87 | /**订单日期*/ |
| 61 | - @Excel(name = "订单日期", width = 15, format = "yyyy-MM-dd") | 88 | + @Excel(name = "任务下达日期", width = 15, format = "yyyy-MM-dd") |
| 62 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | 89 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| 63 | @DateTimeFormat(pattern="yyyy-MM-dd") | 90 | @DateTimeFormat(pattern="yyyy-MM-dd") |
| 64 | @ApiModelProperty(value = "订单日期") | 91 | @ApiModelProperty(value = "订单日期") |
| 65 | private java.util.Date orderDate; | 92 | private java.util.Date orderDate; |
| 93 | + | ||
| 94 | + @Excel(name = "派工日期", width = 15, format = "yyyy-MM-dd") | ||
| 95 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | ||
| 96 | + @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 97 | + @ApiModelProperty(value = "派工日期") | ||
| 98 | + private java.util.Date dispatchDate; | ||
| 99 | + | ||
| 66 | /**交货日期*/ | 100 | /**交货日期*/ |
| 67 | @Excel(name = "交货日期", width = 15, format = "yyyy-MM-dd") | 101 | @Excel(name = "交货日期", width = 15, format = "yyyy-MM-dd") |
| 68 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | 102 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| 69 | @DateTimeFormat(pattern="yyyy-MM-dd") | 103 | @DateTimeFormat(pattern="yyyy-MM-dd") |
| 70 | @ApiModelProperty(value = "交货日期") | 104 | @ApiModelProperty(value = "交货日期") |
| 71 | private java.util.Date deliveryDate; | 105 | private java.util.Date deliveryDate; |
| 106 | + | ||
| 107 | + @Excel(name = "数量", width = 15) | ||
| 108 | + @ApiModelProperty(value = "数量") | ||
| 109 | + private java.lang.String quantity; | ||
| 110 | + | ||
| 72 | /**状态*/ | 111 | /**状态*/ |
| 73 | @Excel(name = "状态", width = 15) | 112 | @Excel(name = "状态", width = 15) |
| 74 | @ApiModelProperty(value = "状态") | 113 | @ApiModelProperty(value = "状态") |
| 75 | private java.lang.String status; | 114 | private java.lang.String status; |
| 115 | + | ||
| 116 | + @Excel(name = "总工时", width = 15) | ||
| 117 | + @ApiModelProperty(value = "总工时") | ||
| 118 | + private java.lang.String totalWorkingHours; | ||
| 119 | + | ||
| 120 | + @Excel(name = "已派发工时", width = 15) | ||
| 121 | + @ApiModelProperty(value = "已派发工时") | ||
| 122 | + private java.lang.String dispatchedWorkingHours; | ||
| 76 | /**实际完成时间*/ | 123 | /**实际完成时间*/ |
| 77 | @Excel(name = "实际完成时间", width = 15, format = "yyyy-MM-dd") | 124 | @Excel(name = "实际完成时间", width = 15, format = "yyyy-MM-dd") |
| 78 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | 125 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| 79 | @DateTimeFormat(pattern="yyyy-MM-dd") | 126 | @DateTimeFormat(pattern="yyyy-MM-dd") |
| 80 | @ApiModelProperty(value = "实际完成时间") | 127 | @ApiModelProperty(value = "实际完成时间") |
| 81 | private java.util.Date finishDate; | 128 | private java.util.Date finishDate; |
| 129 | + | ||
| 130 | + | ||
| 131 | + @Excel(name = "是否分派设计 0 未分派 1已分派", width = 15) | ||
| 132 | + @ApiModelProperty(value = "是否分派设计 0 未分派 1已分派") | ||
| 133 | + private java.lang.String assignDesignStatus; | ||
| 134 | + | ||
| 135 | + @Excel(name = "分派状态 0 未分派 1已分派", width = 15) | ||
| 136 | + @ApiModelProperty(value = "分派状态 0 未分派 1已分派") | ||
| 137 | + private java.lang.String dispatchStatus; | ||
| 138 | + | ||
| 139 | + @Excel(name = "产品设计状态:0未设计 1已设计", width = 15) | ||
| 140 | + @ApiModelProperty(value = "产品设计状态:0未设计 1已设计") | ||
| 141 | + private java.lang.String productDesignStatus; | ||
| 142 | + | ||
| 143 | + @Excel(name = "检验状态:0未检验 1已检验", width = 15) | ||
| 144 | + @ApiModelProperty(value = "检验状态:0未检验 1已检验") | ||
| 145 | + private java.lang.String verifyStatus; | ||
| 146 | + | ||
| 82 | /**出货检验*/ | 147 | /**出货检验*/ |
| 83 | @Excel(name = "出货检验", width = 15) | 148 | @Excel(name = "出货检验", width = 15) |
| 84 | @ApiModelProperty(value = "出货检验") | 149 | @ApiModelProperty(value = "出货检验") |
| @@ -93,8 +158,13 @@ public class TblOrderForm implements Serializable { | @@ -93,8 +158,13 @@ public class TblOrderForm implements Serializable { | ||
| 93 | @Excel(name = "主料图片", width = 15) | 158 | @Excel(name = "主料图片", width = 15) |
| 94 | @ApiModelProperty(value = "主料图片") | 159 | @ApiModelProperty(value = "主料图片") |
| 95 | private java.lang.String pics; | 160 | private java.lang.String pics; |
| 161 | + | ||
| 162 | + @Excel(name = "主料文件", width = 15) | ||
| 163 | + @ApiModelProperty(value = "主料文件") | ||
| 164 | + private java.lang.String files; | ||
| 165 | + | ||
| 96 | /**收货图片*/ | 166 | /**收货图片*/ |
| 97 | - @Excel(name = "收货图片", width = 15) | ||
| 98 | - @ApiModelProperty(value = "收货图片") | ||
| 99 | - private java.lang.String pics2; | 167 | +// @Excel(name = "收货图片", width = 15) |
| 168 | +// @ApiModelProperty(value = "收货图片") | ||
| 169 | +// private java.lang.String pics2; | ||
| 100 | } | 170 | } |
| 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 | } |
jeecg-boot-erp/src/main/java/org/jeecg/modules/erp/order_form/mapper/TblProductTypeMapper.java
0 → 100644
| 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 | +} |
jeecg-boot-erp/src/main/java/org/jeecg/modules/erp/order_form/service/ITblProductTypeService.java
0 → 100644
| 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 | +} |
| 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 | +} |
jeecg-boot-erp/src/main/java/org/jeecg/modules/erp/product_design/entity/TblProductDesign.java
0 → 100644
| 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 | +} |
jeecg-boot-erp/src/main/java/org/jeecg/modules/erp/product_design/mapper/TblProductDesignMapper.java
0 → 100644
| 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 | +} |
-
请 注册 或 登录 后发表评论