春风项目四线(合箱线、总装线)
hdy
2024-01-10 e82830dc4a5b8ebff1f2cf8506c9c8ee06867760
Merge remote-tracking branch 'origin/master'
已修改1个文件
已添加8个文件
1132 ■■■■■ 文件已修改
jcdm-admin/src/main/resources/application-druid.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java 234 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/mapper/BsOrderSchedulingMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/IBsOrderSchedulingService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/orderScheduling/orderScheduling.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/orderScheduling/index.vue 409 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-admin/src/main/resources/application-druid.yml
@@ -16,7 +16,7 @@
        druid:
            # ä¸»åº“数据源
            master:
                url: jdbc:sqlserver://192.168.0.189:1433;DataBaseName=jcdm-mes
                url: jdbc:sqlserver://192.168.0.189:1433;DataBaseName=Jcdm041-Mes
                username: sa
                password: JCDM@2023
            # ä»Žåº“数据源
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.bs.orderScheduling.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.jcdm.common.annotation.Log;
import com.jcdm.common.core.controller.BaseController;
import com.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.enums.BusinessType;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * è®¢å•æŽ’产Controller
 *
 * @author jiang
 * @date 2024-01-09
 */
@RestController
@RequestMapping("/bs/orderScheduling")
public class BsOrderSchedulingController extends BaseController
{
    @Autowired
    private IBsOrderSchedulingService bsOrderSchedulingService;
    /**
     * æŸ¥è¯¢è®¢å•æŽ’产列表
     */
    @PreAuthorize("@ss.hasPermi('bs:orderScheduling:list')")
    @GetMapping("/list")
    public TableDataInfo list(BsOrderScheduling bsOrderScheduling)
    {
        startPage();
        List<BsOrderScheduling> list = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºè®¢å•æŽ’产列表
     */
    @PreAuthorize("@ss.hasPermi('bs:orderScheduling:export')")
    @Log(title = "订单排产", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, BsOrderScheduling bsOrderScheduling)
    {
        List<BsOrderScheduling> list = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling);
        ExcelUtil<BsOrderScheduling> util = new ExcelUtil<BsOrderScheduling>(BsOrderScheduling.class);
        util.exportExcel(response, list, "订单排产数据");
    }
    /**
     * èŽ·å–订单排产详细信息
     */
    @PreAuthorize("@ss.hasPermi('bs:orderScheduling:query')")
    @GetMapping(value = "/{orderNumber}")
    public AjaxResult getInfo(@PathVariable("orderNumber") String orderNumber)
    {
        return success(bsOrderSchedulingService.selectBsOrderSchedulingByOrderNumber(orderNumber));
    }
    /**
     * æ–°å¢žè®¢å•æŽ’产
     */
    @PreAuthorize("@ss.hasPermi('bs:orderScheduling:add')")
    @Log(title = "订单排产", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody BsOrderScheduling bsOrderScheduling)
    {
        return toAjax(bsOrderSchedulingService.insertBsOrderScheduling(bsOrderScheduling));
    }
    /**
     * ä¿®æ”¹è®¢å•æŽ’产
     */
    @PreAuthorize("@ss.hasPermi('bs:orderScheduling:edit')")
    @Log(title = "订单排产", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody BsOrderScheduling bsOrderScheduling)
    {
        return toAjax(bsOrderSchedulingService.updateBsOrderScheduling(bsOrderScheduling));
    }
    /**
     * åˆ é™¤è®¢å•æŽ’产
     */
    @PreAuthorize("@ss.hasPermi('bs:orderScheduling:remove')")
    @Log(title = "订单排产", businessType = BusinessType.DELETE)
    @DeleteMapping("/{orderNumbers}")
    public AjaxResult remove(@PathVariable String[] orderNumbers)
    {
        return toAjax(bsOrderSchedulingService.deleteBsOrderSchedulingByOrderNumbers(orderNumbers));
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,234 @@
package com.jcdm.main.bs.orderScheduling.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jcdm.common.annotation.Excel;
import com.jcdm.common.core.domain.BaseEntity;
/**
 * è®¢å•æŽ’产对象 bs_order_scheduling
 *
 * @author jiang
 * @date 2024-01-09
 */
public class BsOrderScheduling extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** è®¢å•ç¼–号 */
    @Excel(name = "订单编号")
    private String orderNumber;
    /** å‘动机号 */
    @Excel(name = "发动机号")
    private String engineNo;
    /** äº§å“ç±»åž‹ */
    @Excel(name = "产品类型")
    private String productType;
    /** æœºåž‹ */
    @Excel(name = "机型")
    private String model;
    /** ç”Ÿäº§çŠ¶æ€ */
    @Excel(name = "生产状态")
    private String productionStatus;
    /** å·¥æ—¶ */
    @Excel(name = "工时")
    private String workingHours;
    /** å½“前工位 */
    @Excel(name = "当前工位")
    private String currentWorkstation;
    /** è´¨é‡çŠ¶æ€ */
    @Excel(name = "质量状态")
    private String qualityStatus;
    /** æ˜¯å¦æ‰“印 */
    @Excel(name = "是否打印")
    private String whetherOrPrint;
    /** 10报工 */
    @Excel(name = "10报工")
    private String report10;
    /** 20报工 */
    @Excel(name = "20报工")
    private String report20;
    /** åˆç®±ä¸Šçº¿ */
    @Excel(name = "合箱上线")
    private String combinedBoxLaunch;
    /** æ€»è£…下线 */
    @Excel(name = "总装下线")
    private String finalAssemblyOffline;
    /** æ“ä½œäºº */
    @Excel(name = "操作人")
    private String operator;
    /** æ“ä½œæ—¶é—´ */
    @Excel(name = "操作时间")
    private String operateTime;
    public void setOrderNumber(String orderNumber)
    {
        this.orderNumber = orderNumber;
    }
    public String getOrderNumber()
    {
        return orderNumber;
    }
    public void setEngineNo(String engineNo)
    {
        this.engineNo = engineNo;
    }
    public String getEngineNo()
    {
        return engineNo;
    }
    public void setProductType(String productType)
    {
        this.productType = productType;
    }
    public String getProductType()
    {
        return productType;
    }
    public void setModel(String model)
    {
        this.model = model;
    }
    public String getModel()
    {
        return model;
    }
    public void setProductionStatus(String productionStatus)
    {
        this.productionStatus = productionStatus;
    }
    public String getProductionStatus()
    {
        return productionStatus;
    }
    public void setWorkingHours(String workingHours)
    {
        this.workingHours = workingHours;
    }
    public String getWorkingHours()
    {
        return workingHours;
    }
    public void setCurrentWorkstation(String currentWorkstation)
    {
        this.currentWorkstation = currentWorkstation;
    }
    public String getCurrentWorkstation()
    {
        return currentWorkstation;
    }
    public void setQualityStatus(String qualityStatus)
    {
        this.qualityStatus = qualityStatus;
    }
    public String getQualityStatus()
    {
        return qualityStatus;
    }
    public void setWhetherOrPrint(String whetherOrPrint)
    {
        this.whetherOrPrint = whetherOrPrint;
    }
    public String getWhetherOrPrint()
    {
        return whetherOrPrint;
    }
    public void setReport10(String report10)
    {
        this.report10 = report10;
    }
    public String getReport10()
    {
        return report10;
    }
    public void setReport20(String report20)
    {
        this.report20 = report20;
    }
    public String getReport20()
    {
        return report20;
    }
    public void setCombinedBoxLaunch(String combinedBoxLaunch)
    {
        this.combinedBoxLaunch = combinedBoxLaunch;
    }
    public String getCombinedBoxLaunch()
    {
        return combinedBoxLaunch;
    }
    public void setFinalAssemblyOffline(String finalAssemblyOffline)
    {
        this.finalAssemblyOffline = finalAssemblyOffline;
    }
    public String getFinalAssemblyOffline()
    {
        return finalAssemblyOffline;
    }
    public void setOperator(String operator)
    {
        this.operator = operator;
    }
    public String getOperator()
    {
        return operator;
    }
    public void setOperateTime(String operateTime)
    {
        this.operateTime = operateTime;
    }
    public String getOperateTime()
    {
        return operateTime;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderNumber", getOrderNumber())
            .append("engineNo", getEngineNo())
            .append("productType", getProductType())
            .append("model", getModel())
            .append("productionStatus", getProductionStatus())
            .append("workingHours", getWorkingHours())
            .append("currentWorkstation", getCurrentWorkstation())
            .append("qualityStatus", getQualityStatus())
            .append("whetherOrPrint", getWhetherOrPrint())
            .append("report10", getReport10())
            .append("report20", getReport20())
            .append("combinedBoxLaunch", getCombinedBoxLaunch())
            .append("finalAssemblyOffline", getFinalAssemblyOffline())
            .append("operator", getOperator())
            .append("operateTime", getOperateTime())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/mapper/BsOrderSchedulingMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.bs.orderScheduling.mapper;
import java.util.List;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
/**
 * è®¢å•æŽ’产Mapper接口
 *
 * @author jiang
 * @date 2024-01-09
 */
public interface BsOrderSchedulingMapper
{
    /**
     * æŸ¥è¯¢è®¢å•æŽ’产
     *
     * @param orderNumber è®¢å•æŽ’产主键
     * @return è®¢å•æŽ’产
     */
    public BsOrderScheduling selectBsOrderSchedulingByOrderNumber(String orderNumber);
    /**
     * æŸ¥è¯¢è®¢å•æŽ’产列表
     *
     * @param bsOrderScheduling è®¢å•æŽ’产
     * @return è®¢å•æŽ’产集合
     */
    public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling);
    /**
     * æ–°å¢žè®¢å•æŽ’产
     *
     * @param bsOrderScheduling è®¢å•æŽ’产
     * @return ç»“æžœ
     */
    public int insertBsOrderScheduling(BsOrderScheduling bsOrderScheduling);
    /**
     * ä¿®æ”¹è®¢å•æŽ’产
     *
     * @param bsOrderScheduling è®¢å•æŽ’产
     * @return ç»“æžœ
     */
    public int updateBsOrderScheduling(BsOrderScheduling bsOrderScheduling);
    /**
     * åˆ é™¤è®¢å•æŽ’产
     *
     * @param orderNumber è®¢å•æŽ’产主键
     * @return ç»“æžœ
     */
    public int deleteBsOrderSchedulingByOrderNumber(String orderNumber);
    /**
     * æ‰¹é‡åˆ é™¤è®¢å•æŽ’产
     *
     * @param orderNumbers éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteBsOrderSchedulingByOrderNumbers(String[] orderNumbers);
}
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/IBsOrderSchedulingService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.bs.orderScheduling.service;
import java.util.List;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
/**
 * è®¢å•æŽ’产Service接口
 *
 * @author jiang
 * @date 2024-01-09
 */
public interface IBsOrderSchedulingService
{
    /**
     * æŸ¥è¯¢è®¢å•æŽ’产
     *
     * @param orderNumber è®¢å•æŽ’产主键
     * @return è®¢å•æŽ’产
     */
    public BsOrderScheduling selectBsOrderSchedulingByOrderNumber(String orderNumber);
    /**
     * æŸ¥è¯¢è®¢å•æŽ’产列表
     *
     * @param bsOrderScheduling è®¢å•æŽ’产
     * @return è®¢å•æŽ’产集合
     */
    public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling);
    /**
     * æ–°å¢žè®¢å•æŽ’产
     *
     * @param bsOrderScheduling è®¢å•æŽ’产
     * @return ç»“æžœ
     */
    public int insertBsOrderScheduling(BsOrderScheduling bsOrderScheduling);
    /**
     * ä¿®æ”¹è®¢å•æŽ’产
     *
     * @param bsOrderScheduling è®¢å•æŽ’产
     * @return ç»“æžœ
     */
    public int updateBsOrderScheduling(BsOrderScheduling bsOrderScheduling);
    /**
     * æ‰¹é‡åˆ é™¤è®¢å•æŽ’产
     *
     * @param orderNumbers éœ€è¦åˆ é™¤çš„订单排产主键集合
     * @return ç»“æžœ
     */
    public int deleteBsOrderSchedulingByOrderNumbers(String[] orderNumbers);
    /**
     * åˆ é™¤è®¢å•æŽ’产信息
     *
     * @param orderNumber è®¢å•æŽ’产主键
     * @return ç»“æžœ
     */
    public int deleteBsOrderSchedulingByOrderNumber(String orderNumber);
}
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,93 @@
package com.jcdm.main.bs.orderScheduling.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService;
/**
 * è®¢å•æŽ’产Service业务层处理
 *
 * @author jiang
 * @date 2024-01-09
 */
@Service
public class BsOrderSchedulingServiceImpl implements IBsOrderSchedulingService
{
    @Autowired
    private BsOrderSchedulingMapper bsOrderSchedulingMapper;
    /**
     * æŸ¥è¯¢è®¢å•æŽ’产
     *
     * @param orderNumber è®¢å•æŽ’产主键
     * @return è®¢å•æŽ’产
     */
    @Override
    public BsOrderScheduling selectBsOrderSchedulingByOrderNumber(String orderNumber)
    {
        return bsOrderSchedulingMapper.selectBsOrderSchedulingByOrderNumber(orderNumber);
    }
    /**
     * æŸ¥è¯¢è®¢å•æŽ’产列表
     *
     * @param bsOrderScheduling è®¢å•æŽ’产
     * @return è®¢å•æŽ’产
     */
    @Override
    public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling)
    {
        return bsOrderSchedulingMapper.selectBsOrderSchedulingList(bsOrderScheduling);
    }
    /**
     * æ–°å¢žè®¢å•æŽ’产
     *
     * @param bsOrderScheduling è®¢å•æŽ’产
     * @return ç»“æžœ
     */
    @Override
    public int insertBsOrderScheduling(BsOrderScheduling bsOrderScheduling)
    {
        return bsOrderSchedulingMapper.insertBsOrderScheduling(bsOrderScheduling);
    }
    /**
     * ä¿®æ”¹è®¢å•æŽ’产
     *
     * @param bsOrderScheduling è®¢å•æŽ’产
     * @return ç»“æžœ
     */
    @Override
    public int updateBsOrderScheduling(BsOrderScheduling bsOrderScheduling)
    {
        return bsOrderSchedulingMapper.updateBsOrderScheduling(bsOrderScheduling);
    }
    /**
     * æ‰¹é‡åˆ é™¤è®¢å•æŽ’产
     *
     * @param orderNumbers éœ€è¦åˆ é™¤çš„订单排产主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsOrderSchedulingByOrderNumbers(String[] orderNumbers)
    {
        return bsOrderSchedulingMapper.deleteBsOrderSchedulingByOrderNumbers(orderNumbers);
    }
    /**
     * åˆ é™¤è®¢å•æŽ’产信息
     *
     * @param orderNumber è®¢å•æŽ’产主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsOrderSchedulingByOrderNumber(String orderNumber)
    {
        return bsOrderSchedulingMapper.deleteBsOrderSchedulingByOrderNumber(orderNumber);
    }
}
jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper">
    <resultMap type="BsOrderScheduling" id="BsOrderSchedulingResult">
        <result property="orderNumber"    column="order_number"    />
        <result property="engineNo"    column="engine_no"    />
        <result property="productType"    column="product_type"    />
        <result property="model"    column="model"    />
        <result property="productionStatus"    column="production_status"    />
        <result property="workingHours"    column="working_hours"    />
        <result property="currentWorkstation"    column="current_workstation"    />
        <result property="qualityStatus"    column="quality_status"    />
        <result property="whetherOrPrint"    column="whether_or_print"    />
        <result property="report10"    column="report_10"    />
        <result property="report20"    column="report_20"    />
        <result property="combinedBoxLaunch"    column="combined_box_launch"    />
        <result property="finalAssemblyOffline"    column="final_assembly_offline"    />
        <result property="operator"    column="operator"    />
        <result property="operateTime"    column="operate_time"    />
    </resultMap>
    <sql id="selectBsOrderSchedulingVo">
        select order_number, engine_no, product_type, model, production_status, working_hours, current_workstation, quality_status, whether_or_print, report_10, report_20, combined_box_launch, final_assembly_offline, operator, operate_time from bs_order_scheduling
    </sql>
    <select id="selectBsOrderSchedulingList" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
        <include refid="selectBsOrderSchedulingVo"/>
        <where>
            <if test="orderNumber != null  and orderNumber != ''"> and order_number = #{orderNumber}</if>
            <if test="engineNo != null  and engineNo != ''"> and engine_no = #{engineNo}</if>
            <if test="productType != null  and productType != ''"> and product_type = #{productType}</if>
            <if test="model != null  and model != ''"> and model = #{model}</if>
            <if test="productionStatus != null  and productionStatus != ''"> and production_status = #{productionStatus}</if>
            <if test="workingHours != null  and workingHours != ''"> and working_hours = #{workingHours}</if>
            <if test="currentWorkstation != null  and currentWorkstation != ''"> and current_workstation = #{currentWorkstation}</if>
            <if test="qualityStatus != null  and qualityStatus != ''"> and quality_status = #{qualityStatus}</if>
            <if test="whetherOrPrint != null  and whetherOrPrint != ''"> and whether_or_print = #{whetherOrPrint}</if>
            <if test="report10 != null  and report10 != ''"> and report_10 = #{report10}</if>
            <if test="report20 != null  and report20 != ''"> and report_20 = #{report20}</if>
            <if test="combinedBoxLaunch != null  and combinedBoxLaunch != ''"> and combined_box_launch = #{combinedBoxLaunch}</if>
            <if test="finalAssemblyOffline != null  and finalAssemblyOffline != ''"> and final_assembly_offline = #{finalAssemblyOffline}</if>
            <if test="operator != null  and operator != ''"> and operator = #{operator}</if>
            <if test="operateTime != null  and operateTime != ''"> and operate_time = #{operateTime}</if>
        </where>
    </select>
    <select id="selectBsOrderSchedulingByOrderNumber" parameterType="String" resultMap="BsOrderSchedulingResult">
        <include refid="selectBsOrderSchedulingVo"/>
        where order_number = #{orderNumber}
    </select>
    <insert id="insertBsOrderScheduling" parameterType="BsOrderScheduling">
        insert into bs_order_scheduling
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="orderNumber != null">order_number,</if>
            <if test="engineNo != null">engine_no,</if>
            <if test="productType != null">product_type,</if>
            <if test="model != null">model,</if>
            <if test="productionStatus != null">production_status,</if>
            <if test="workingHours != null">working_hours,</if>
            <if test="currentWorkstation != null">current_workstation,</if>
            <if test="qualityStatus != null">quality_status,</if>
            <if test="whetherOrPrint != null">whether_or_print,</if>
            <if test="report10 != null">report_10,</if>
            <if test="report20 != null">report_20,</if>
            <if test="combinedBoxLaunch != null">combined_box_launch,</if>
            <if test="finalAssemblyOffline != null">final_assembly_offline,</if>
            <if test="operator != null">operator,</if>
            <if test="operateTime != null">operate_time,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="orderNumber != null">#{orderNumber},</if>
            <if test="engineNo != null">#{engineNo},</if>
            <if test="productType != null">#{productType},</if>
            <if test="model != null">#{model},</if>
            <if test="productionStatus != null">#{productionStatus},</if>
            <if test="workingHours != null">#{workingHours},</if>
            <if test="currentWorkstation != null">#{currentWorkstation},</if>
            <if test="qualityStatus != null">#{qualityStatus},</if>
            <if test="whetherOrPrint != null">#{whetherOrPrint},</if>
            <if test="report10 != null">#{report10},</if>
            <if test="report20 != null">#{report20},</if>
            <if test="combinedBoxLaunch != null">#{combinedBoxLaunch},</if>
            <if test="finalAssemblyOffline != null">#{finalAssemblyOffline},</if>
            <if test="operator != null">#{operator},</if>
            <if test="operateTime != null">#{operateTime},</if>
         </trim>
    </insert>
    <update id="updateBsOrderScheduling" parameterType="BsOrderScheduling">
        update bs_order_scheduling
        <trim prefix="SET" suffixOverrides=",">
            <if test="engineNo != null">engine_no = #{engineNo},</if>
            <if test="productType != null">product_type = #{productType},</if>
            <if test="model != null">model = #{model},</if>
            <if test="productionStatus != null">production_status = #{productionStatus},</if>
            <if test="workingHours != null">working_hours = #{workingHours},</if>
            <if test="currentWorkstation != null">current_workstation = #{currentWorkstation},</if>
            <if test="qualityStatus != null">quality_status = #{qualityStatus},</if>
            <if test="whetherOrPrint != null">whether_or_print = #{whetherOrPrint},</if>
            <if test="report10 != null">report_10 = #{report10},</if>
            <if test="report20 != null">report_20 = #{report20},</if>
            <if test="combinedBoxLaunch != null">combined_box_launch = #{combinedBoxLaunch},</if>
            <if test="finalAssemblyOffline != null">final_assembly_offline = #{finalAssemblyOffline},</if>
            <if test="operator != null">operator = #{operator},</if>
            <if test="operateTime != null">operate_time = #{operateTime},</if>
        </trim>
        where order_number = #{orderNumber}
    </update>
    <delete id="deleteBsOrderSchedulingByOrderNumber" parameterType="String">
        delete from bs_order_scheduling where order_number = #{orderNumber}
    </delete>
    <delete id="deleteBsOrderSchedulingByOrderNumbers" parameterType="String">
        delete from bs_order_scheduling where order_number in
        <foreach item="orderNumber" collection="array" open="(" separator="," close=")">
            #{orderNumber}
        </foreach>
    </delete>
</mapper>
jcdm-ui/src/api/main/bs/orderScheduling/orderScheduling.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢è®¢å•æŽ’产列表
export function listOrderScheduling(query) {
  return request({
    url: '/bs/orderScheduling/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢è®¢å•æŽ’产详细
export function getOrderScheduling(orderNumber) {
  return request({
    url: '/bs/orderScheduling/' + orderNumber,
    method: 'get'
  })
}
// æ–°å¢žè®¢å•æŽ’产
export function addOrderScheduling(data) {
  return request({
    url: '/bs/orderScheduling',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹è®¢å•æŽ’产
export function updateOrderScheduling(data) {
  return request({
    url: '/bs/orderScheduling',
    method: 'put',
    data: data
  })
}
// åˆ é™¤è®¢å•æŽ’产
export function delOrderScheduling(orderNumber) {
  return request({
    url: '/bs/orderScheduling/' + orderNumber,
    method: 'delete'
  })
}
jcdm-ui/src/views/main/bs/orderScheduling/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,409 @@
<template>
  <div class="app-container">
    <el-card class="box-card">
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
          <el-form-item label="订单编号" prop="orderNumber">
            <el-input
              v-model="queryParams.orderNumber"
              placeholder="请输入订单编号"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="发动机号" prop="engineNo">
            <el-input
              v-model="queryParams.engineNo"
              placeholder="请输入发动机号"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="机型" prop="model">
            <el-input
              v-model="queryParams.model"
              placeholder="请输入机型"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="工时" prop="workingHours">
            <el-input
              v-model="queryParams.workingHours"
              placeholder="请输入工时"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="当前工位" prop="currentWorkstation">
            <el-input
              v-model="queryParams.currentWorkstation"
              placeholder="请输入当前工位"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="是否打印" prop="whetherOrPrint">
            <el-input
              v-model="queryParams.whetherOrPrint"
              placeholder="请输入是否打印"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="10报工" prop="report10">
            <el-input
              v-model="queryParams.report10"
              placeholder="请输入10报工"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="20报工" prop="report20">
            <el-input
              v-model="queryParams.report20"
              placeholder="请输入20报工"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="操作人" prop="operator">
            <el-input
              v-model="queryParams.operator"
              placeholder="请输入操作人"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item style="float: right">
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-form>
    </el-card>
    <el-card style="margin-top: 10px" class="box-card">
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-plus"
              size="mini"
              @click="handleAdd"
              v-hasPermi="['bs:orderScheduling:add']"
            >新增</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="success"
              plain
              icon="el-icon-edit"
              size="mini"
              :disabled="single"
              @click="handleUpdate"
              v-hasPermi="['bs:orderScheduling:edit']"
            >修改</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="danger"
              plain
              icon="el-icon-delete"
              size="mini"
              :disabled="multiple"
              @click="handleDelete"
              v-hasPermi="['bs:orderScheduling:remove']"
            >删除</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="warning"
              plain
              icon="el-icon-download"
              size="mini"
              @click="handleExport"
              v-hasPermi="['bs:orderScheduling:export']"
            >导出</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table border v-loading="loading" :data="orderSchedulingList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="订单编号" align="center" prop="orderNumber">
          </el-table-column>
          <el-table-column label="发动机号" align="center" prop="engineNo">
          </el-table-column>
          <el-table-column label="产品类型" align="center" prop="productType">
<!--            <template slot-scope="scope">-->
<!--              <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.productType"/>-->
<!--            </template>-->
          </el-table-column>
          <el-table-column label="机型" align="center" prop="model">
          </el-table-column>
          <el-table-column label="生产状态" align="center" prop="productionStatus">
          </el-table-column>
          <el-table-column label="工时" align="center" prop="workingHours">
          </el-table-column>
          <el-table-column label="当前工位" align="center" prop="currentWorkstation">
          </el-table-column>
          <el-table-column label="质量状态" align="center" prop="qualityStatus">
          </el-table-column>
          <el-table-column label="是否打印" align="center" prop="whetherOrPrint">
          </el-table-column>
          <el-table-column label="10报工" align="center" prop="report10">
          </el-table-column>
          <el-table-column label="20报工" align="center" prop="report20">
          </el-table-column>
          <el-table-column label="合箱上线" align="center" prop="combinedBoxLaunch">
          </el-table-column>
          <el-table-column label="总装下线" align="center" prop="finalAssemblyOffline">
          </el-table-column>
          <el-table-column label="操作人" align="center" prop="operator">
          </el-table-column>
          <el-table-column label="操作时间" align="center" prop="operateTime">
          </el-table-column>
          <el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="success"
                plain
                style="width: 72px"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                v-hasPermi="['bs:orderScheduling:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="danger"
                plain
                style="width: 72px"
                icon="el-icon-delete"
                @click="handleDelete(scope.row)"
                v-hasPermi="['bs:orderScheduling:remove']"
              >删除</el-button>
            </template>
          </el-table-column>
        </el-table>
    </el-card>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- æ·»åŠ æˆ–修改订单排产对话框 -->
    <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body>
      <span slot="title">
        <i class="el-icon-s-order"></i>
        {{titleName}}
      </span>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="订单编号" prop="orderNumber">
          <el-input v-model="form.orderNumber" placeholder="请输入订单编号" />
        </el-form-item>
        <el-form-item label="发动机号" prop="engineNo">
          <el-input v-model="form.engineNo" placeholder="请输入发动机号" />
        </el-form-item>
        <el-form-item label="机型" prop="model">
          <el-input v-model="form.model" placeholder="请输入机型" />
        </el-form-item>
        <el-form-item label="工时" prop="workingHours">
          <el-input v-model="form.workingHours" placeholder="请输入工时" />
        </el-form-item>
        <el-form-item label="当前工位" prop="currentWorkstation">
          <el-input v-model="form.currentWorkstation" placeholder="请输入当前工位" />
        </el-form-item>
        <el-form-item label="是否打印" prop="whetherOrPrint">
          <el-input v-model="form.whetherOrPrint" placeholder="请输入是否打印" />
        </el-form-item>
        <el-form-item label="10报工" prop="report10">
          <el-input v-model="form.report10" placeholder="请输入10报工" />
        </el-form-item>
        <el-form-item label="20报工" prop="report20">
          <el-input v-model="form.report20" placeholder="请输入20报工" />
        </el-form-item>
        <el-form-item label="操作人" prop="operator">
          <el-input v-model="form.operator" placeholder="请输入操作人" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { listOrderScheduling, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling } from "@/api/main/bs/orderScheduling/orderScheduling";
export default {
  name: "OrderScheduling",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      titleName: "",
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // è®¢å•æŽ’产表格数据
      orderSchedulingList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        orderNumber: null,
        engineNo: null,
        productType: null,
        model: null,
        productionStatus: null,
        workingHours: null,
        currentWorkstation: null,
        qualityStatus: null,
        whetherOrPrint: null,
        report10: null,
        report20: null,
        combinedBoxLaunch: null,
        finalAssemblyOffline: null,
        operator: null,
        operateTime: null
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** æŸ¥è¯¢è®¢å•æŽ’产列表 */
    getList() {
      this.loading = true;
      listOrderScheduling(this.queryParams).then(response => {
        this.orderSchedulingList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        orderNumber: null,
        engineNo: null,
        productType: null,
        model: null,
        productionStatus: null,
        workingHours: null,
        currentWorkstation: null,
        qualityStatus: null,
        whetherOrPrint: null,
        report10: null,
        report20: null,
        combinedBoxLaunch: null,
        finalAssemblyOffline: null,
        operator: null,
        operateTime: null
      };
      this.resetForm("form");
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.orderNumber)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    handleAdd() {
      this.reset();
      this.open = true;
      this.titleName = "添加订单排产";
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.reset();
      const orderNumber = row.orderNumber || this.ids
      getOrderScheduling(orderNumber).then(response => {
        this.form = response.data;
        this.open = true;
        this.titleName = "修改订单排产";
      });
    },
    /** æäº¤æŒ‰é’® */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.orderNumber != null) {
            updateOrderScheduling(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addOrderScheduling(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const orderNumbers = row.orderNumber || this.ids;
      this.$modal.confirm('是否确认删除订单排产编号为"' + orderNumbers + '"的数据项?').then(function() {
        return delOrderScheduling(orderNumbers);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('bs/orderScheduling/export', {
        ...this.queryParams
      }, `orderScheduling_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>