新火炬后端单体项目初始化代码
zhangherong
8 天以前 d1d5454cb3512acb16a0f0e6d68e52f3ebc72e66
art: 生产订单列表、编辑功能修改
已修改3个文件
128 ■■■■ 文件已修改
db/双林新火炬MES数据库设计.pdma.json 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/org/jeecg/modules/mes/controller/MesProductionOrderController.java 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/org/jeecg/modules/mes/entity/MesProductionOrder.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
db/Ë«ÁÖлð¾æMESÊý¾Ý¿âÉè¼Æ.pdma.json
@@ -4,7 +4,7 @@
  "avatar": "",
  "version": "4.9.2",
  "createdTime": "2025-3-10 16:38:19",
  "updatedTime": "2025-8-1 16:49:40",
  "updatedTime": "2025-8-4 15:03:28",
  "dbConns": [],
  "profile": {
    "default": {
@@ -10697,7 +10697,7 @@
        },
        {
          "defKey": "production_unit",
          "defName": "产品单位",
          "defName": "基本计量单位",
          "comment": "",
          "type": "",
          "len": "",
@@ -10732,6 +10732,24 @@
          "id": "EA8BA140-CED8-4B45-8FCC-197817AA3590"
        },
        {
          "defKey": "order_status_name",
          "defName": "订单状态描述",
          "comment": "",
          "type": "",
          "len": "",
          "scale": "",
          "primaryKey": false,
          "notNull": false,
          "autoIncrement": false,
          "defaultValue": "",
          "hideInGraph": false,
          "refDict": "",
          "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
          "extProps": {},
          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
          "id": "F5A7DE2A-A683-4218-A1B5-9CDA18C273B7"
        },
        {
          "defKey": "priority",
          "defName": "优先级",
          "comment": "",
src/main/java/org/jeecg/modules/mes/controller/MesProductionOrderController.java
@@ -14,11 +14,8 @@
import org.jeecg.modules.mes.service.IMesProductionOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
/**
* @Description: SAP生产订单
@@ -28,7 +25,7 @@
*/
@Api(tags="SAP生产订单")
@RestController
@RequestMapping("/mesproductionwork/mesProductionOrder")
@RequestMapping("/mes/productionOrder")
@Slf4j
public class MesProductionOrderController extends JeecgController<MesProductionOrder, IMesProductionOrderService> {
   @Autowired
@@ -43,7 +40,6 @@
    * @param req
    * @return
    */
   //@AutoLog(value = "SAP生产订单-分页列表查询")
   @ApiOperation(value="SAP生产订单-分页列表查询", notes="SAP生产订单-分页列表查询")
   @GetMapping(value = "/list")
   public Result<IPage<MesProductionOrder>> queryPageList(MesProductionOrder mesProductionOrder,
@@ -57,21 +53,6 @@
   }
   /**
    *   æ·»åŠ 
    *
    * @param mesProductionOrder
    * @return
    */
   @AutoLog(value = "SAP生产订单-添加")
   @ApiOperation(value="SAP生产订单-添加", notes="SAP生产订单-添加")
   //@RequiresPermissions("org.jeecg.modules:mes_production_order:add")
   @PostMapping(value = "/add")
   public Result<String> add(@RequestBody MesProductionOrder mesProductionOrder) {
       mesProductionOrderService.save(mesProductionOrder);
       return Result.OK("添加成功!");
   }
   /**
    *  ç¼–辑
    *
    * @param mesProductionOrder
@@ -79,41 +60,10 @@
    */
   @AutoLog(value = "SAP生产订单-编辑")
   @ApiOperation(value="SAP生产订单-编辑", notes="SAP生产订单-编辑")
   //@RequiresPermissions("org.jeecg.modules:mes_production_order:edit")
   @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
   public Result<String> edit(@RequestBody MesProductionOrder mesProductionOrder) {
       mesProductionOrderService.updateById(mesProductionOrder);
       return Result.OK("编辑成功!");
   }
   /**
    *   é€šè¿‡id删除
    *
    * @param id
    * @return
    */
   @AutoLog(value = "SAP生产订单-通过id删除")
   @ApiOperation(value="SAP生产订单-通过id删除", notes="SAP生产订单-通过id删除")
   //@RequiresPermissions("org.jeecg.modules:mes_production_order:delete")
   @DeleteMapping(value = "/delete")
   public Result<String> delete(@RequestParam(name="id",required=true) String id) {
       mesProductionOrderService.removeById(id);
       return Result.OK("删除成功!");
   }
   /**
    *  æ‰¹é‡åˆ é™¤
    *
    * @param ids
    * @return
    */
   @AutoLog(value = "SAP生产订单-批量删除")
   @ApiOperation(value="SAP生产订单-批量删除", notes="SAP生产订单-批量删除")
   //@RequiresPermissions("org.jeecg.modules:mes_production_order:deleteBatch")
   @DeleteMapping(value = "/deleteBatch")
   public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
       this.mesProductionOrderService.removeByIds(Arrays.asList(ids.split(",")));
       return Result.OK("批量删除成功!");
   }
   /**
@@ -122,7 +72,6 @@
    * @param id
    * @return
    */
   //@AutoLog(value = "SAP生产订单-通过id查询")
   @ApiOperation(value="SAP生产订单-通过id查询", notes="SAP生产订单-通过id查询")
   @GetMapping(value = "/queryById")
   public Result<MesProductionOrder> queryById(@RequestParam(name="id",required=true) String id) {
@@ -132,30 +81,4 @@
       }
       return Result.OK(mesProductionOrder);
   }
   /**
   * å¯¼å‡ºexcel
   *
   * @param request
   * @param mesProductionOrder
   */
   //@RequiresPermissions("org.jeecg.modules:mes_production_order:exportXls")
   @RequestMapping(value = "/exportXls")
   public ModelAndView exportXls(HttpServletRequest request, MesProductionOrder mesProductionOrder) {
       return super.exportXls(request, mesProductionOrder, MesProductionOrder.class, "SAP生产订单");
   }
   /**
     * é€šè¿‡excel导入数据
   *
   * @param request
   * @param response
   * @return
   */
   //@RequiresPermissions("mes_production_order:importExcel")
   @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
   public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
       return super.importExcel(request, response, MesProductionOrder.class);
   }
}
src/main/java/org/jeecg/modules/mes/entity/MesProductionOrder.java
@@ -2,7 +2,6 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
@@ -42,27 +41,23 @@
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**创建日期*/
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**更新日期*/
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    /**删除标记*/
    @ApiModelProperty(value = "删除标记")
    @TableLogic
    private Integer delFlag;
    /**生产订单号*/
    @ApiModelProperty(value = "生产订单号")
    private String orderCode;
    /**订单类型*/
    @ApiModelProperty(value = "订单类型")
    @Dict(dicCode = "production_order_category")
    private String orderCategory;
    /**物料编号*/
    @ApiModelProperty(value = "物料编号")
@@ -71,28 +66,28 @@
    @ApiModelProperty(value = "物料名称")
    private String materialName;
    /**计划开始日期*/
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "计划开始日期")
    private Date planStart;
    /**计划结束日期*/
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "计划结束日期")
    private Date planEnd;
    /**订单数量*/
    @ApiModelProperty(value = "订单数量")
    private BigDecimal orderQuantity;
    /**产品单位*/
    @Dict(dicCode = "production_unit")
    @ApiModelProperty(value = "产品单位")
    /**基本计量单位*/
    @ApiModelProperty(value = "基本计量单位")
    private String productionUnit;
    /**订单状态*/
    @Dict(dicCode = "order_status")
    @ApiModelProperty(value = "订单状态")
    private String orderStatus;
    /**订单状态描述*/
    @ApiModelProperty(value = "订单状态描述")
    private String orderStatusName;
    /**优先级*/
    @Dict(dicCode = "priority")
    @ApiModelProperty(value = "优先级")
    private String priority;
    /**计划工艺路线*/
@@ -148,6 +143,7 @@
        this.orderQuantity = new BigDecimal(dto.getGAMNG());
        this.productionUnit = dto.getGMEIN();
        this.orderStatus = dto.getTXT04();
        this.orderStatusName = dto.getTXT30();
        this.priority = dto.getAPRIO();
        this.processRoute = dto.getAUFPL();
        this.materialListCode = dto.getSTLNR();
@@ -168,6 +164,7 @@
        this.planEnd = DateUtils.str2Date(dto.getGLTRP(), DateUtils.date_sdf.get());
        this.orderQuantity = new BigDecimal(dto.getGAMNG());
        this.orderStatus = dto.getTXT04();
        this.orderStatusName = dto.getTXT30();
        this.priority = dto.getAPRIO();
        this.orderCreateDate = dto.getUDATE();
        this.orderUpdateDate = dto.getLAEDA();