Procházet zdrojové kódy

5. 工厂生产管理

liujiankang před 5 roky
rodič
revize
9f4078e87b
16 změnil soubory, kde provedl 2339 přidání a 0 odebrání
  1. 74 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/pts/ProductionEmployees.java
  2. 132 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/pts/ProductionPlan.java
  3. 83 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/pts/ProductionProcess.java
  4. 59 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/pts/ProductionPlanService.java
  5. 137 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/pts/ProductionPlanServiceImpl.java
  6. 51 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/ProductionPlanningMapper.java
  7. 222 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/productionPlanningMapper.xml
  8. 53 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminPtsEmployeeController.java
  9. 317 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/ProductionPlanController.java
  10. 6 0
      watero-rst-web/src/main/resources/watero-rst-orm.xml
  11. 259 0
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/add_productionPlan.ftl
  12. 124 0
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/employee_list.ftl
  13. 267 0
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/perfect_productionPlan.ftl
  14. 141 0
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/productionPlan_List.ftl
  15. 139 0
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/productionPlan_statistical.ftl
  16. 275 0
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/update_productionPlan.ftl

+ 74 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/pts/ProductionEmployees.java

@@ -0,0 +1,74 @@
+package com.iamberry.rst.core.pts;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 生产计划员工项表
+ */
+public class ProductionEmployees implements Serializable {
+    private static final long serialVersionUID = -277668524468599800L;
+    private Integer prpeId;
+    private Integer pePlanId;//工作计划id
+    private Integer peEmployeeId;//员工id
+    private Date peUpdateTime;
+    private Date peCreateTime;
+    private String peEmployeeName;//员工姓名
+    private String peEmployeeNo;//员工编号
+
+    public Integer getPrpeId() {
+        return prpeId;
+    }
+
+    public void setPrpeId(Integer prpeId) {
+        this.prpeId = prpeId;
+    }
+
+    public Integer getPePlanId() {
+        return pePlanId;
+    }
+
+    public void setPePlanId(Integer pePlanId) {
+        this.pePlanId = pePlanId;
+    }
+
+    public Integer getPeEmployeeId() {
+        return peEmployeeId;
+    }
+
+    public void setPeEmployeeId(Integer peEmployeeId) {
+        this.peEmployeeId = peEmployeeId;
+    }
+
+    public Date getPeUpdateTime() {
+        return peUpdateTime;
+    }
+
+    public void setPeUpdateTime(Date peUpdateTime) {
+        this.peUpdateTime = peUpdateTime;
+    }
+
+    public Date getPeCreateTime() {
+        return peCreateTime;
+    }
+
+    public void setPeCreateTime(Date peCreateTime) {
+        this.peCreateTime = peCreateTime;
+    }
+
+    public String getPeEmployeeName() {
+        return peEmployeeName;
+    }
+
+    public void setPeEmployeeName(String peEmployeeName) {
+        this.peEmployeeName = peEmployeeName;
+    }
+
+    public String getPeEmployeeNo() {
+        return peEmployeeNo;
+    }
+
+    public void setPeEmployeeNo(String peEmployeeNo) {
+        this.peEmployeeNo = peEmployeeNo;
+    }
+}

+ 132 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/pts/ProductionPlan.java

@@ -0,0 +1,132 @@
+package com.iamberry.rst.core.pts;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 生产计划表
+ */
+public class ProductionPlan implements Serializable {
+    private static final long serialVersionUID = -7727638297170439411L;
+    private Integer planId;
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
+    private Date planDate;//工作日期
+    private Integer planProcessId;//工序id
+    private String planStay;//拉线
+    private Double planWorkHours;//工作时长
+    private Integer planResults;//工作成果
+    private Date planCreateTime;
+    private Date planUpdateTime;
+
+    private String processName;//工序名称
+    private Integer employeesNum;//员工数量
+    private String employeeString;//员工id集合 _线隔开
+    private Integer processWorkinghours;//每人每小时数量
+    private Integer employeeId;//员工id
+    public Integer getPlanId() {
+        return planId;
+    }
+
+    public void setPlanId(Integer planId) {
+        this.planId = planId;
+    }
+
+    public Date getPlanDate() {
+        return planDate;
+    }
+
+    public void setPlanDate(Date planDate) {
+        this.planDate = planDate;
+    }
+
+    public Integer getPlanProcessId() {
+        return planProcessId;
+    }
+
+    public void setPlanProcessId(Integer planProcessId) {
+        this.planProcessId = planProcessId;
+    }
+
+    public String getPlanStay() {
+        return planStay;
+    }
+
+    public void setPlanStay(String planStay) {
+        this.planStay = planStay;
+    }
+
+    public Double getPlanWorkHours() {
+        return planWorkHours;
+    }
+
+    public void setPlanWorkHours(Double planWorkHours) {
+        this.planWorkHours = planWorkHours;
+    }
+
+    public Integer getPlanResults() {
+        return planResults;
+    }
+
+    public void setPlanResults(Integer planResults) {
+        this.planResults = planResults;
+    }
+    public Date getPlanCreateTime() {
+        return planCreateTime;
+    }
+
+    public void setPlanCreateTime(Date planCreateTime) {
+        this.planCreateTime = planCreateTime;
+    }
+
+    public Date getPlanUpdateTime() {
+        return planUpdateTime;
+    }
+
+    public void setPlanUpdateTime(Date planUpdateTime) {
+        this.planUpdateTime = planUpdateTime;
+    }
+
+    public String getProcessName() {
+        return processName;
+    }
+
+    public void setProcessName(String processName) {
+        this.processName = processName;
+    }
+
+    public Integer getEmployeesNum() {
+        return employeesNum;
+    }
+
+    public void setEmployeesNum(Integer employeesNum) {
+        this.employeesNum = employeesNum;
+    }
+
+    public String getEmployeeString() {
+        return employeeString;
+    }
+
+    public void setEmployeeString(String employeeString) {
+        this.employeeString = employeeString;
+    }
+
+    public Integer getProcessWorkinghours() {
+        return processWorkinghours;
+    }
+
+    public void setProcessWorkinghours(Integer processWorkinghours) {
+        this.processWorkinghours = processWorkinghours;
+    }
+
+    public Integer getEmployeeId() {
+        return employeeId;
+    }
+
+    public void setEmployeeId(Integer employeeId) {
+        this.employeeId = employeeId;
+    }
+}

+ 83 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/pts/ProductionProcess.java

@@ -0,0 +1,83 @@
+package com.iamberry.rst.core.pts;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 生产管理工序表
+ */
+public class ProductionProcess implements Serializable{
+    private static final long serialVersionUID = -3296263203529211154L;
+    private Integer processId;
+    private String processName;//工序名称
+    private Integer processWorkinghours;//每人每小时数量
+    private String processUnit;//单位
+    private Integer processStatus;//工序状态
+    private String processNo;//工序编号
+    private Date processCreateTime;
+    private Date processUpdateTime;
+
+    public Integer getProcessId() {
+        return processId;
+    }
+
+    public void setProcessId(Integer processId) {
+        this.processId = processId;
+    }
+
+    public String getProcessName() {
+        return processName;
+    }
+
+    public void setProcessName(String processName) {
+        this.processName = processName;
+    }
+
+    public Integer getProcessWorkinghours() {
+        return processWorkinghours;
+    }
+
+    public void setProcessWorkinghours(Integer processWorkinghours) {
+        this.processWorkinghours = processWorkinghours;
+    }
+
+    public String getProcessUnit() {
+        return processUnit;
+    }
+
+    public void setProcessUnit(String processUnit) {
+        this.processUnit = processUnit;
+    }
+
+    public Integer getProcessStatus() {
+        return processStatus;
+    }
+
+    public void setProcessStatus(Integer processStatus) {
+        this.processStatus = processStatus;
+    }
+
+    public String getProcessNo() {
+        return processNo;
+    }
+
+    public void setProcessNo(String processNo) {
+        this.processNo = processNo;
+    }
+
+    public Date getProcessCreateTime() {
+        return processCreateTime;
+    }
+
+    public void setProcessCreateTime(Date processCreateTime) {
+        this.processCreateTime = processCreateTime;
+    }
+
+    public Date getProcessUpdateTime() {
+        return processUpdateTime;
+    }
+
+    public void setProcessUpdateTime(Date processUpdateTime) {
+        this.processUpdateTime = processUpdateTime;
+    }
+}

+ 59 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/pts/ProductionPlanService.java

@@ -0,0 +1,59 @@
+package com.iamberry.rst.faces.pts;
+
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.core.pts.ProductionEmployees;
+import com.iamberry.rst.core.pts.ProductionPlan;
+import com.iamberry.rst.core.pts.ProductionProcess;
+
+import java.util.List;
+
+/**
+ * 生产计划管理
+ * Created by LJK on 2019年12月12日14:16:26
+ */
+public interface ProductionPlanService {
+    //获取生产计划
+    ProductionPlan getProductionPlan(Integer planId);
+
+    //添加生产计划
+    Integer addProductionPlan(ProductionPlan productionPlan);
+
+    //查询生产计划列表(分页)
+    PagedResult<ProductionPlan> listProductionPlan(PageRequest<ProductionPlan> pageRequest);
+    //查询生产计划列表
+    List<ProductionPlan> listProductionPlan(ProductionPlan productionPlan);
+
+    //修改生产计划列表
+    Integer updateProductionPlan(ProductionPlan productionPlan);
+
+    //添加生产计划员工
+    Integer addProductionEmployees(ProductionEmployees productionEmployees);
+
+    //删除单个生产计划员工
+    Integer delProductionEmployees(Integer peId);
+
+    //删除生产计划所有员工
+    Integer delProductionEmployeesList(Integer pePlanId);
+
+    //查询生产计划所有员工
+    List<ProductionEmployees> listProductionEmployees(Integer pePlanId);
+
+    //查询生产工序
+    ProductionProcess getProductionProcess(Integer processId);
+
+    //查询生产工序
+    Integer addProductionProcess(ProductionProcess productionProcess);
+
+    //查询所有生产工序
+    List<ProductionProcess> listProductionProcess(ProductionProcess productionProcess);
+
+    //删除生产计划
+    Integer delProductionPlan(Integer planId);
+
+    //获取当日工作计划条数
+    Integer getPlanCount();
+
+    //获取工序重复员工条数
+    Integer getPlanRepeat(ProductionPlan productionPlan);
+}

+ 137 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/ProductionPlanServiceImpl.java

@@ -0,0 +1,137 @@
+package com.iamberry.rst.service.pts;
+
+import com.github.pagehelper.PageHelper;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.core.pts.ProductionEmployees;
+import com.iamberry.rst.core.pts.ProductionPlan;
+import com.iamberry.rst.core.pts.ProductionProcess;
+import com.iamberry.rst.faces.pts.ProductionPlanService;
+import com.iamberry.rst.service.pts.mapper.ProductionPlanningMapper;
+import com.iamberry.rst.util.PageUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+
+/**
+ * 生产计划管理
+ * Created by LJK on 2019年12月12日16:04:01
+ */
+@Service
+public class ProductionPlanServiceImpl implements ProductionPlanService {
+
+    @Autowired
+    public ProductionPlanningMapper productionPlanningMapper;
+
+    @Override
+    public ProductionPlan getProductionPlan(Integer planId) {
+        return productionPlanningMapper.getProductionPlan(planId);
+    }
+    @Transactional
+    @Override
+    public Integer addProductionPlan(ProductionPlan productionPlan) {
+        if(productionPlanningMapper.addProductionPlan(productionPlan) > 0){
+            //添加员工项
+            if(productionPlan.getEmployeeString() != null && !productionPlan.getEmployeeString().equals("")){
+                String[] employees = productionPlan.getEmployeeString().split("_");
+                for(String employee : employees){
+                    if(!employee.equals("")){
+                        ProductionEmployees productionEmployees = new ProductionEmployees();
+                        productionEmployees.setPeEmployeeId(Integer.valueOf(employee));
+                        productionEmployees.setPePlanId(productionPlan.getPlanId());
+                        productionPlanningMapper.addProductionEmployees(productionEmployees);
+                    }
+                }
+            }
+        }else{
+            return 0;
+        }
+        return 1;
+    }
+
+    @Override
+    public PagedResult<ProductionPlan> listProductionPlan(PageRequest<ProductionPlan> pageRequest) {
+        PageHelper.startPage(pageRequest.getPageNO(), pageRequest.getPageSize(), pageRequest.isPageTotal());
+        List<ProductionPlan> productionPlanList = productionPlanningMapper.listProductionPlan(pageRequest.getData());
+        return PageUtil.getPage(productionPlanList);
+    }
+    @Override
+    public List<ProductionPlan> listProductionPlan(ProductionPlan productionPlan) {
+        return productionPlanningMapper.listProductionPlan(productionPlan);
+    }
+
+    @Override
+    public Integer updateProductionPlan(ProductionPlan productionPlan) {
+        //删除员工项
+        productionPlanningMapper.delProductionEmployeesList(productionPlan.getPlanId());
+        //添加员工项
+        if(productionPlan.getEmployeeString() != null && !productionPlan.getEmployeeString().equals("")){
+            String[] employees = productionPlan.getEmployeeString().split("_");
+            for(String employee : employees){
+                if(!employee.equals("")){
+                    ProductionEmployees productionEmployees = new ProductionEmployees();
+                    productionEmployees.setPeEmployeeId(Integer.valueOf(employee));
+                    productionEmployees.setPePlanId(productionPlan.getPlanId());
+                    productionPlanningMapper.addProductionEmployees(productionEmployees);
+                }
+            }
+        }
+        return productionPlanningMapper.updateProductionPlan(productionPlan);
+    }
+
+    @Override
+    public Integer addProductionEmployees(ProductionEmployees productionEmployees) {
+        return productionPlanningMapper.addProductionEmployees(productionEmployees);
+    }
+
+    @Override
+    public Integer delProductionEmployees(Integer peId) {
+        return productionPlanningMapper.delProductionEmployees(peId);
+    }
+
+    @Override
+    public Integer delProductionEmployeesList(Integer pePlanId) {
+        return productionPlanningMapper.delProductionEmployeesList(pePlanId);
+    }
+
+    @Override
+    public List<ProductionEmployees> listProductionEmployees(Integer pePlanId) {
+        return productionPlanningMapper.listProductionEmployees(pePlanId);
+    }
+
+    @Override
+    public ProductionProcess getProductionProcess(Integer processId) {
+        return productionPlanningMapper.getProductionProcess(processId);
+    }
+
+    @Override
+    public Integer addProductionProcess(ProductionProcess productionProcess) {
+        return productionPlanningMapper.addProductionProcess(productionProcess);
+    }
+
+    @Override
+    public List<ProductionProcess> listProductionProcess(ProductionProcess productionProcess) {
+        return productionPlanningMapper.listProductionProcess(productionProcess);
+    }
+    @Transactional
+    @Override
+    public Integer delProductionPlan(Integer planId) {
+        if(productionPlanningMapper.delProductionPlan(planId) > 0){
+            productionPlanningMapper.delProductionEmployeesList(planId);
+        }
+        return 1;
+    }
+
+    @Override
+    public Integer getPlanCount() {
+        return productionPlanningMapper.getPlanCount();
+    }
+
+    @Override
+    public Integer getPlanRepeat(ProductionPlan productionPlan) {
+        return productionPlanningMapper.getPlanRepeat(productionPlan);
+    }
+}

+ 51 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/ProductionPlanningMapper.java

@@ -0,0 +1,51 @@
+package com.iamberry.rst.service.pts.mapper;
+
+import com.iamberry.rst.core.pts.ProductionEmployees;
+import com.iamberry.rst.core.pts.ProductionPlan;
+import com.iamberry.rst.core.pts.ProductionProcess;
+
+import java.util.List;
+
+public interface ProductionPlanningMapper {
+        //获取生产计划
+        ProductionPlan getProductionPlan(Integer planId);
+
+        //添加生产计划
+        Integer addProductionPlan(ProductionPlan productionPlan);
+
+        //查询生产计划列表
+        List<ProductionPlan> listProductionPlan(ProductionPlan productionPlan);
+
+        //修改生产计划列表
+        Integer updateProductionPlan(ProductionPlan productionPlan);
+
+        //添加生产计划员工
+        Integer addProductionEmployees(ProductionEmployees productionEmployees);
+
+        //删除单个生产计划员工
+        Integer delProductionEmployees(Integer peId);
+
+        //删除生产计划所有员工
+        Integer delProductionEmployeesList(Integer pePlanId);
+
+        //查询生产计划所有员工
+        List<ProductionEmployees> listProductionEmployees(Integer pePlanId);
+
+        //查询生产工序
+        ProductionProcess getProductionProcess(Integer processId);
+
+        //查询生产工序
+        Integer addProductionProcess(ProductionProcess productionProcess);
+
+        //查询所有生产工序
+        List<ProductionProcess> listProductionProcess(ProductionProcess productionProcess);
+
+        //删除生产计划
+        Integer delProductionPlan(Integer planId);
+
+        //获取当日工作计划条数
+        Integer getPlanCount();
+
+        //获取工序重复员工条数
+        Integer getPlanRepeat(ProductionPlan productionPlan);
+}

+ 222 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/productionPlanningMapper.xml

@@ -0,0 +1,222 @@
+<?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.iamberry.rst.service.pts.mapper.ProductionPlanningMapper">
+
+    <select id="getProductionPlan" parameterType="Integer" resultType="ProductionPlan">
+        SELECT
+        plan_id AS planId,
+        plan_date AS planDate,
+        plan_process_id AS planProcessId,
+        plan_stay AS  planStay,
+        plan_work_hours AS planWorkHours,
+        plan_results AS  planResults,
+        plan_create_time AS planCreateTime,
+        plan_update_time AS planUpdateTime,
+        process_name AS processName,
+        process_workinghours AS processWorkinghours,
+        count(pe.pe_id) AS employeesNum
+        FROM
+        tb_rst_pts_production_plan  pp
+        LEFT JOIN tb_rst_pts_production_process ppp on pp.plan_process_id = ppp.process_id
+        LEFT JOIN tb_rst_pts_production_employees pe on pe.pe_plan_id = pp.plan_id
+        WHERE
+        plan_id = #{planId}
+    </select>
+
+    <insert id="addProductionPlan" parameterType="ProductionPlan" keyProperty="planId" useGeneratedKeys="true">
+        INSERT INTO tb_rst_pts_production_plan
+        (
+        plan_date,
+        plan_process_id,
+        plan_stay,
+        plan_work_hours,
+        plan_results,
+        plan_create_time
+        )
+        VALUES
+        (
+        #{planDate},
+        #{planProcessId},
+        #{planStay},
+        #{planWorkHours},
+        #{planResults},
+        NOW()
+        )
+    </insert>
+
+    <select id="listProductionPlan" parameterType="ProductionPlan" resultType="ProductionPlan">
+        SELECT
+        plan_id AS planId,
+        plan_date AS planDate,
+        plan_process_id AS planProcessId,
+        plan_stay AS  planStay,
+        plan_work_hours AS planWorkHours,
+        plan_results AS  planResults,
+        plan_create_time AS planCreateTime,
+        plan_update_time AS planUpdateTime,
+        process_name AS processName,
+        process_workinghours AS processWorkinghours,
+        count(pe.pe_id) AS employeesNum
+        FROM
+        tb_rst_pts_production_plan  pp
+        LEFT JOIN tb_rst_pts_production_process ppp on pp.plan_process_id = ppp.process_id
+        LEFT JOIN tb_rst_pts_production_employees pe on pe.pe_plan_id = pp.plan_id
+        <where>
+            <if test="planDate != null and planDate != ''">
+                plan_date = #{planDate}
+            </if>
+            <if test="planProcessId != null and planProcessId != ''">
+                AND plan_process_id = #{planProcessId}
+            </if>
+        </where>
+        group by plan_id
+    </select>
+
+    <update id="updateProductionPlan" parameterType="ProductionPlan">
+        UPDATE tb_rst_pts_production_plan
+        <set>
+            <if test="planDate !=null and planDate !=''">
+                plan_date = #{planDate},
+            </if>
+            <if test="planProcessId !=null and planProcessId !=''">
+                plan_process_id = #{planProcessId},
+            </if>
+            <if test="planStay !=null and planStay !=''">
+                plan_stay = #{planStay},
+            </if>
+            <if test="planWorkHours !=null and planWorkHours !=''">
+                plan_work_hours = #{planWorkHours},
+            </if>
+            <if test="planResults !=null">
+                plan_results = #{planResults}
+            </if>
+        </set>
+        WHERE
+        plan_id = #{planId}
+    </update>
+
+    <insert id="addProductionEmployees" parameterType="ProductionEmployees">
+        INSERT INTO tb_rst_pts_production_employees
+        (
+        pe_plan_id,
+        pe_employee_id,
+        pe_create_time
+        )
+        VALUES
+        (
+        #{pePlanId},
+        #{peEmployeeId},
+        NOW()
+        )
+    </insert>
+    <delete id="delProductionEmployees" parameterType="Integer">
+        delete from tb_rst_pts_production_employees
+        where
+        pe_id = #{peId}
+    </delete>
+    <delete id="delProductionEmployeesList" parameterType="Integer">
+        delete from tb_rst_pts_production_employees
+        where
+        pe_plan_id = #{pePlanId}
+    </delete>
+    <select id="listProductionEmployees" parameterType="Integer" resultType="ProductionEmployees">
+        SELECT
+        pe_id AS peId,
+        pe_plan_id AS pePlanId,
+        pe_employee_id AS peEmployeeId,
+        pe_update_time AS  peUpdateTime,
+        pe_create_time AS  pcCreateTime,
+        pee.employee_name AS  peEmployeeName,
+        pee.employee_no AS  peEmployeeNo
+        FROM
+        tb_rst_pts_production_employees pe
+        LEFT  JOIN tb_rst_pts_employee pee on pe.pe_employee_id = pee.employee_id
+        WHERE
+        pe_plan_id = #{planId}
+    </select>
+
+
+    <delete id="delProductionPlan" parameterType="Integer">
+        delete from tb_rst_pts_production_plan
+        where
+        plan_id = #{planId}
+    </delete>
+
+
+
+
+    <select id="getProductionProcess" parameterType="Integer" resultType="ProductionProcess">
+        SELECT
+        process_id AS processId,
+        process_name AS processName,
+        process_workinghours AS processWorkinghours,
+        process_unit AS  processUnit,
+        process_status AS processStatus,
+        process_no AS  processNo,
+        process_create_time AS processCreateTime,
+        process_update_time AS processUpdateTime
+        FROM
+        tb_rst_pts_production_process
+        WHERE
+        process_id = #{processId}
+    </select>
+
+    <insert id="addProductionProcess" parameterType="ProductionProcess" keyProperty="processId" useGeneratedKeys="true">
+        INSERT INTO tb_rst_pts_production_process
+        (
+        process_name,
+        process_workinghours,
+        process_unit,
+        process_status,
+        process_no,
+        process_create_time
+        )
+        VALUES
+        (
+        #{processName},
+        #{processWorkinghours},
+        #{processUnit},
+        #{processStatus},
+        #{processNo},
+        NOW()
+        )
+    </insert>
+    <select id="listProductionProcess" parameterType="ProductionProcess" resultType="ProductionProcess">
+        SELECT
+        process_id AS processId,
+        process_name AS processName,
+        process_workinghours AS processWorkinghours,
+        process_unit AS  processUnit,
+        process_status AS processStatus,
+        process_no AS  processNo,
+        process_create_time AS processCreateTime,
+        process_update_time AS processUpdateTime
+        FROM
+        tb_rst_pts_production_process
+        <where>
+            <if test="processName != null and processName != ''">
+                process_name like CONCAT('%',#{processName},'%')
+            </if>
+            <if test="processWorkinghours != null and processWorkinghours != ''">
+                AND process_workinghours = #{processWorkinghours}
+            </if>
+            <if test="processStatus != null and processStatus != ''">
+                AND process_status = #{processStatus}
+            </if>
+        </where>
+    </select>
+    <select id="getPlanCount" resultType="Integer">
+        select count(1) from tb_rst_pts_production_plan where to_days(plan_date) = to_days(now())
+    </select>
+    <select id="getPlanRepeat" parameterType="ProductionPlan" resultType="Integer">
+        SELECT
+            count(1)
+        FROM
+            tb_rst_pts_production_plan pp
+        LEFT JOIN tb_rst_pts_production_employees pe on pe.pe_plan_id = pp.plan_id
+        WHERE
+            to_days(plan_date) = to_days(#{planDate})
+        AND
+        pe.pe_employee_id = #{employeeId}
+    </select>
+</mapper>

+ 53 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminPtsEmployeeController.java

@@ -213,5 +213,58 @@ public class AdminPtsEmployeeController {
             return new ResponseJson(200, "SUCCESS", 200);
         }
     }
+    /**
+     * 查询单个员工
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value="/get_employee")
+    public ResponseJson getEmployee(PtsEmployee ptsEmployee, HttpServletRequest request) {
+        ResponseJson rs = new ResponseJson(200, "SUCCESS", 200);
+        ptsEmployee = ptsEmployeeService.getPtsEmployee(ptsEmployee);
+        if (ptsEmployee !=null ){
+            rs.addResponseKeyValue("ptsEmployee",ptsEmployee);
+            return rs;
+
+        }else {
+            return new ResponseJson(500, "ERROR", 500);
+        }
+    }
+
 
+    /**
+     * 查询员工列表
+     * @param pageSize
+     * @param pageNO
+     * @param totalNum
+     * @return
+     */
+    @RequestMapping("/employee_list")
+    public ModelAndView getEmployeeLists(HttpServletRequest request,
+                                        @RequestParam(value= "pageSize",defaultValue= "10" ,required=false) Integer pageSize,
+                                        @RequestParam(value = "pageNO", defaultValue = "1",required=false) Integer pageNO,
+                                        @RequestParam(value = "totalNum", defaultValue = "0",required=false) Integer totalNum) {
+        ModelAndView mv = new ModelAndView("pts/productionPlan/employee_list");
+        PtsEmployee employee = new PtsEmployee();
+
+        String employeeName = request.getParameter("employeeName");
+        String employeeNo = request.getParameter("employeeNo");
+        Integer employeeState = null;
+
+        if (employeeName != null && !"".equals(employeeName)) {
+            employee.setEmployeeName(employeeName);
+        }
+        if (employeeNo != null && !"".equals(employeeNo)) {
+            employee.setEmployeeNo(employeeNo);
+        }
+
+        PagedResult<PtsEmployee> pagedResult = ptsEmployeeService.getEmployeeList(pageNO, pageSize, employee, totalNum == 0);
+        if (totalNum != 0){
+            pagedResult.setTotal(totalNum);
+        }
+
+        StitchAttrUtil.getSa().setModelAndView(employee, mv, "/admin/employee/employee_list", pagedResult);
+        return mv;
+    }
 }

+ 317 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/ProductionPlanController.java

@@ -0,0 +1,317 @@
+package com.iamberry.rst.controllers.pts;
+
+import com.iamberry.rst.core.fm.InventoryInfo;
+import com.iamberry.rst.core.fm.InventoryLog;
+import com.iamberry.rst.core.order.OrderWarehouse;
+import com.iamberry.rst.core.order.Product;
+import com.iamberry.rst.core.order.ProductColor;
+import com.iamberry.rst.core.order.ProductType;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.core.pts.ProductionEmployees;
+import com.iamberry.rst.core.pts.ProductionPlan;
+import com.iamberry.rst.core.pts.ProductionProcess;
+import com.iamberry.rst.core.pts.PtsEmployee;
+import com.iamberry.rst.core.sys.Admin;
+import com.iamberry.rst.faces.cm.InventoryLogService;
+import com.iamberry.rst.faces.cm.InventoryService;
+import com.iamberry.rst.faces.cm.SalesOrderService;
+import com.iamberry.rst.faces.order.OrderWarehouseService;
+import com.iamberry.rst.faces.product.ProductColorService;
+import com.iamberry.rst.faces.product.ProductService;
+import com.iamberry.rst.faces.pts.ProductionPlanService;
+import com.iamberry.rst.faces.pts.PtsEmployeeService;
+import com.iamberry.rst.utils.AdminUtils;
+import com.iamberry.rst.utils.StitchAttrUtil;
+import com.iamberry.wechat.tools.ResponseJson;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by LJK on 2019年12月12日
+ */
+@Controller
+@RequestMapping("/admin/productionPlan")
+public class ProductionPlanController {
+    @Autowired
+    private ProductionPlanService productionPlanService;
+    @Autowired
+    private PtsEmployeeService ptsEmployeeService;
+
+    /**
+     * 查询生产计划列表信息
+     *
+     * @param request
+     * @param pageNO
+     * @param pageTotal
+     * @param pageSize
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("productionPlan:select:productionPlan")
+    @RequestMapping("/select_productionPlan_list")
+    public ModelAndView selectProductionPlanList(HttpServletRequest request,
+                                            @RequestParam(value = "pageNO", defaultValue = "1", required = false) int pageNO,
+                                            @RequestParam(value = "pageTotal", required = false) Integer pageTotal,
+                                            @RequestParam(value = "pageSize", defaultValue = "10", required = false) int pageSize,
+                                            ProductionPlan productionPlan
+    ) throws Exception {
+        ModelAndView mv = new ModelAndView("pts/productionPlan/productionPlan_list");
+        StringBuilder url = new StringBuilder("/admin/productionPlan/select_productionPlan_list?pageSize=" + pageSize);
+        String planDate = request.getParameter("plan_Date");
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        if(planDate != null && !planDate.equals("")){
+            productionPlan.setPlanDate(format.parse(planDate));
+        }
+        // 封装请求数据
+        PageRequest<ProductionPlan> pageRequest = new PageRequest<>(productionPlan, pageNO, pageSize, pageTotal == null);
+        // 查询生产计划列表
+        PagedResult<ProductionPlan> result = productionPlanService.listProductionPlan(pageRequest);
+        ProductionProcess productionProcess = new ProductionProcess();
+        productionProcess.setProcessStatus(1);
+        List<ProductionProcess> listProductionProcess = productionPlanService.listProductionProcess(productionProcess);
+        mv.addObject("listProductionProcess", listProductionProcess);
+        long total = 0;
+        if (pageTotal == null) {
+            total = result.getPages();
+        } else {
+            total = pageTotal;
+            result.setPages(total);
+        }
+        StitchAttrUtil.getSa().setModelAndView(productionPlan, mv, "/admin/productionPlan/select_productionPlan_list", result);
+        return mv;
+    }
+    /**
+     * 查询生产计划统计列表信息
+     *
+     * @param request
+     * @param pageNO
+     * @param pageTotal
+     * @param pageSize
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("productionPlan:statistical:productionPlan")
+    @RequestMapping("/select_productionPlan_statistical")
+    public ModelAndView select_productionPlan_statistical(HttpServletRequest request,
+                                            @RequestParam(value = "pageNO", defaultValue = "1", required = false) int pageNO,
+                                            @RequestParam(value = "pageTotal", required = false) Integer pageTotal,
+                                            @RequestParam(value = "pageSize", defaultValue = "10", required = false) int pageSize,
+                                            ProductionPlan productionPlan
+    ) throws Exception {
+        ModelAndView mv = new ModelAndView("pts/productionPlan/productionPlan_statistical");
+        StringBuilder url = new StringBuilder("/admin/productionPlan/select_productionPlan_statistical?pageSize=" + pageSize);
+        String planDate = request.getParameter("plan_Date");
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        if(planDate != null && !planDate.equals("")){
+            productionPlan.setPlanDate(format.parse(planDate));
+        }
+        // 封装请求数据
+        PageRequest<ProductionPlan> pageRequest = new PageRequest<>(productionPlan, pageNO, pageSize, pageTotal == null);
+        // 查询生产计划列表
+        PagedResult<ProductionPlan> result = productionPlanService.listProductionPlan(pageRequest);
+        ProductionProcess productionProcess = new ProductionProcess();
+        productionProcess.setProcessStatus(1);
+        List<ProductionProcess> listProductionProcess = productionPlanService.listProductionProcess(productionProcess);
+        mv.addObject("listProductionProcess", listProductionProcess);
+        long total = 0;
+        if (pageTotal == null) {
+            total = result.getPages();
+        } else {
+            total = pageTotal;
+            result.setPages(total);
+        }
+        StitchAttrUtil.getSa().setModelAndView(productionPlan, mv, "/admin/productionPlan/select_productionPlan_statistical", result);
+        return mv;
+    }
+
+
+    /**
+     * 进入添加生产计划
+     *
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping("/to_addProductionPlan")
+    public ModelAndView to_addProductionPlan(ProductionPlan productionPlan) throws Exception {
+        ModelAndView mv = new ModelAndView("pts/productionPlan/add_productionPlan");
+        ProductionProcess productionProcess = new ProductionProcess();
+        productionProcess.setProcessStatus(1);
+        List<ProductionProcess> listProductionProcess = productionPlanService.listProductionProcess(productionProcess);
+        mv.addObject("listProductionProcess", listProductionProcess);
+        Integer planCount = productionPlanService.getPlanCount();
+        mv.addObject("planCount", planCount);
+        mv.addObject("plan_date", new Date());
+        return mv;
+    }
+
+    /**
+     * 添加生产计划
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/addProductionPlan")
+    public ResponseJson addProductionPlan(HttpServletRequest request,ProductionPlan productionPlan) throws Exception {
+        ResponseJson msg = new ResponseJson();
+        if(productionPlan == null ){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        String planDate = request.getParameter("plan_date");
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        if(planDate != null && !planDate.equals("")){
+            productionPlan.setPlanDate(format.parse(planDate));
+        }else {
+            msg.setResultCode(500);
+            msg.setReturnCode(501);
+            return msg;
+        }
+        if(productionPlan.getEmployeeString() == null && !productionPlan.getEmployeeString().equals("")){
+            msg.setResultCode(500);
+            msg.setReturnCode(501);
+            return msg;
+        }
+        //判断是否有员工重复工序
+        if(productionPlan.getEmployeeString() != null && !productionPlan.getEmployeeString().equals("")){
+            List<PtsEmployee> employeeList = new ArrayList<>();
+            boolean is = false;
+            ProductionPlan plan = new ProductionPlan();
+            plan.setPlanDate(productionPlan.getPlanDate());
+            String[] employees = productionPlan.getEmployeeString().split("_");
+            for(String employee : employees){
+                if(!employee.equals("")){
+                    plan.setEmployeeId(Integer.valueOf(employee));
+                    Integer s = productionPlanService.getPlanRepeat(plan);
+                    if(s > 0){
+                        is = true;
+                        //查询重复员工姓名
+                        employeeList.add(ptsEmployeeService.getPtsEmployeeById(Integer.valueOf(employee)));
+                    }
+                }
+            }
+            if(is){
+                msg.addResponseKeyValue("employeeList",employeeList);
+                msg.setResultCode(501);
+                msg.setReturnCode(501);
+                return msg;
+            }
+
+        }
+        if(productionPlanService.addProductionPlan(productionPlan) > 0){
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }else{
+            msg.setResultCode(500);
+            msg.setReturnCode(501);
+        }
+        return msg;
+    }
+
+    /**
+     *删除生产计划
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/delProductionPlan")
+    public ResponseJson delProductionPlan(HttpServletRequest request,Integer planId) throws Exception {
+        ResponseJson msg = new ResponseJson();
+        if(planId == null ){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        if(productionPlanService.delProductionPlan(planId) > 0){
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }else{
+            msg.setResultCode(500);
+            msg.setReturnCode(501);
+        }
+        return msg;
+    }
+    /**
+     *进入完善工作计划页面
+     *
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping("/to_perfect_productionPlan")
+    public ModelAndView toPerfectProductionPlan(Integer planId) throws Exception {
+        ModelAndView mv = new ModelAndView("pts/productionPlan/perfect_productionPlan");
+        ProductionPlan productionPlan = productionPlanService.getProductionPlan(planId);
+        List<ProductionEmployees> listProductionEmployees = productionPlanService.listProductionEmployees(planId);
+        mv.addObject("productionPlan", productionPlan);
+        mv.addObject("listProductionEmployees", listProductionEmployees);
+        return mv;
+    }
+    /**
+     *进入修改工作计划页面
+     *
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping("/to_update_productionPlan")
+    public ModelAndView to_update_productionPlan(Integer planId) throws Exception {
+        ModelAndView mv = new ModelAndView("pts/productionPlan/update_productionPlan");
+        ProductionPlan productionPlan = productionPlanService.getProductionPlan(planId);
+        ProductionProcess productionProcess = new ProductionProcess();
+        productionProcess.setProcessStatus(1);
+        List<ProductionProcess> listProductionProcess = productionPlanService.listProductionProcess(productionProcess);
+        mv.addObject("listProductionProcess", listProductionProcess);
+        List<ProductionEmployees> listProductionEmployees = productionPlanService.listProductionEmployees(planId);
+        mv.addObject("productionPlan", productionPlan);
+        mv.addObject("listProductionEmployees", listProductionEmployees);
+        return mv;
+    }
+    /**
+     * 完善生产计划
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/perfect_productionPlan")
+    public ResponseJson perfectProductionPlan(HttpServletRequest request,ProductionPlan productionPlan) throws Exception {
+        ResponseJson msg = new ResponseJson();
+        if(productionPlan == null ){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        String planDate = request.getParameter("plan_date");
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        if(planDate != null && !planDate.equals("")){
+            productionPlan.setPlanDate(format.parse(planDate));
+        }else {
+            msg.setResultCode(500);
+            msg.setReturnCode(501);
+            return msg;
+        }
+        if(productionPlan.getEmployeeString() == null && !productionPlan.getEmployeeString().equals("")){
+            msg.setResultCode(500);
+            msg.setReturnCode(501);
+            return msg;
+        }
+        if(productionPlanService.updateProductionPlan(productionPlan) > 0){
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }else{
+            msg.setResultCode(500);
+            msg.setReturnCode(501);
+        }
+        return msg;
+    }
+}

+ 6 - 0
watero-rst-web/src/main/resources/watero-rst-orm.xml

@@ -233,6 +233,10 @@
 		<typeAlias type="com.iamberry.rst.core.order.OrderStatisticsInfo" alias="OrderStatisticsInfo"/>
 		<!-- 客诉新增-->
 		<typeAlias type="com.iamberry.rst.core.cm.TagInfo" alias="TagInfo"/>
+		<!-- 生成计划-->
+		<typeAlias type="com.iamberry.rst.core.pts.ProductionEmployees" alias="ProductionEmployees"/>
+		<typeAlias type="com.iamberry.rst.core.pts.ProductionProcess" alias="ProductionProcess"/>
+		<typeAlias type="com.iamberry.rst.core.pts.ProductionPlan" alias="ProductionPlan"/>
 	</typeAliases>
 	<!-- PageHelper -->
 	<plugins>
@@ -358,5 +362,7 @@
 		<mapper resource="com/iamberry/rst/service/dm/mapper/supplierProductItemMapper.xml"/>
 		<mapper resource="com/iamberry/rst/service/dm/mapper/supplierProductMapper.xml"/>
 		<mapper resource="com/iamberry/rst/service/dm/mapper/dmChannelTypeMapper.xml"/>
+		<!--生产计划 -->
+		<mapper resource="com/iamberry/rst/service/pts/mapper/productionPlanningMapper.xml"/>
 	</mappers>
 </configuration>

+ 259 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/add_productionPlan.ftl

@@ -0,0 +1,259 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+<#include "/base/add_base.ftl">
+    <title>添加生产计划 - H-ui.filter v2.4</title>
+    <style>
+        .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        .tit-2{position: relative;font-size: 16px;padding-left: 10px;color: #50a2ea;display: inline-block;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 50%;height: 6px;width: 6px;border-radius: 6px;margin-top: -3px; background-color: #32a3d8;}
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 14px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 77%;border:1px solid rgba(0,0,0,.1);margin-left: 12.5%;}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 158px; background-color: #50a2ea;color: #fff;border: 1px solid #50a2ea;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-select {
+            border: 1px solid rgba(0,0,0,.1);
+            padding: 6px 50px 6px 15px;
+            height: 34px;
+            -webkit-appearance: none;
+            appearance: none;
+            background: url(/common/images/pts/select-11.png) right center no-repeat;
+            background-size: auto 100%;
+        }
+        .check-box, .radio-box{padding-left: 0;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        .huanhang{ float:left}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">新建工作计划</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"></label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <span style="font-size: 16px;">这是本日的第<span style="color: #dd0000">${planCount+1}</span>个工作计划</span>
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>工作日期:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input type="text" style="width: 80%;" class="input-text my-input-date Wdate" value="${plan_date?string('yyyy-MM-dd')}" placeholder="工作日期" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" id="plan_date" name="plan_date" readonly="readonly"/>
+            </div>
+        </div>
+        <div class="row cl">
+        <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>工序选择:</label>
+        <div class="formControls col-xs-9 col-sm-9" style="margin: 10px 0px;padding-left: 0;">
+            <select class="my-select" id="planProcessId" name="planProcessId" class="chosen" style="width: 80%;">
+                <option value="">请选择工序</option>
+                    <#if (listProductionProcess?size > 0)>
+                        <#list listProductionProcess as info>
+                                <option  value="${info.processId!""}">${info.processName!""}</option>
+                        </#list>
+                    </#if>
+            </select>
+        </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>拉线:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input class="my-input" type="text"  name="planStay" id="planStay" placeholder="请输入拉线" style="width: 78%;"/>
+            </div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>员工选择</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input type="button" style="color: #32a3d8;border: 1px solid #32a3d8;" class="btn add-order-button" onclick="add_employee()" value="选择员工" >
+                <table class="table table-border table-bordered table-bg table-hover table-sort" style="margin-top: 10px;display: none;width: 80%;" id="all_add_employee">
+                    <thead>
+                    <tr class="text-c" id="table1">
+                        <th style="text-align: center;" width="40" >员工编号</th>
+                        <th style="text-align: center;" width="25" >员工姓名</th>
+                        <th style="text-align: center;" width="10">操作</th>
+                    </tr>
+                    </thead>
+                    <tbody id="add_employee">
+                    </tbody>
+                </table>
+                <input type="hidden" id="employeeString" name="employeeString" value="" >
+            </div>
+            <br>
+        </div>
+        <div class="row cl" >
+            <label class="form-label col-1 col-sm-1"></label>
+            <div id="product_color_error" style="color: red;"></div>
+        </div>
+        <div class="input-box" style="margin-left: 30%">
+
+
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"></label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <span style="color: #6d6d72;">在当日的工作中,同一个员工不允许在多个工序工作</span><br>
+                <button type="button" class="my-btn-submit" onclick="addProductionPlan();" style="margin-top: 20px;">确认新建</button>
+            </div>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+
+    /**
+     * 打开员工列表
+     */
+    function add_employee() {
+        layer_show("员工列表","${path}/admin/employee/employee_list","800","500");
+    }
+    /**
+     * 选择员工回调
+     * @param colorIds
+     */
+    function setSelectEmployee(employeeIds){
+        var index = layer.load(1, {
+            shade: [0.5,'#fff'] //0.1透明度的白色背景
+        });
+
+        $("#all_add_employee").show();
+
+        var employeeIdArray = employeeIds.split("_");
+        for(var j=0;j<employeeIdArray.length;j++){
+            var employeeId = employeeIdArray[j];
+            if(employeeId == ""){
+                break;
+            }
+
+            var flag = true;
+            $("#add_employee").find("tr").each(function (){
+                var emp_Id = $(this).find(".employee_id").eq(0).val();
+                if(emp_Id == employeeId){
+                    flag  = false;
+                }
+            });
+            if(!flag){
+                continue;
+            }
+
+            $.ajax({
+                type: "POST",
+                data: {
+                    employeeId : employeeId
+                },
+                url: "${path}/admin/employee/get_employee",
+                async:false,
+                success: function(data){
+                    var html = "";
+                    if (data.returnCode == 200) {
+                        var employee = data.returnMsg.ptsEmployee;
+                            html += '<tr class="text-c">' +
+                                    '<input type="hidden" class="employee_id" id="" value="'+ employee.employeeId +'" >' +
+                                    ' <td>'+ cufte(employee.employeeNo) +'</td>' +
+                                    ' <td>'+ cufte(employee.employeeName) +'</td>' +
+                                    ' <td><a href="javascript:void(0)" class="del_product all_down" onclick="delEmployee($(this))" >删除</a></td>' +
+                                    ' </tr>';
+
+                    }else{
+                        $("#product_color_error").html(data.resultMsg);
+                        return false;
+                    }
+                    $("#add_employee").append(html);
+                }
+            });
+        }
+        layer.close(index);
+    }
+
+    /**
+     *  删除员工
+     */
+    function delEmployee($this){
+        $this.parents("tr").remove();
+    }
+
+    /**
+     * 添加回访信息
+     */
+    function addProductionPlan() {
+        var plan_date = $("#plan_date").val();
+        if(plan_date == null || plan_date == ""){
+            layer.msg("工作日期不能为空!", {icon: 5, time: 2000});
+            return;
+        }
+        var planStay = $("#planStay").val();
+        if(planStay == null || planStay == ""){
+            layer.msg("拉线不能为空!", {icon: 5, time: 2000});
+            return;
+        }
+        /*封装员工项*/
+        var employeeItem = "";
+        $("#add_employee").find("tr").each(function(){
+            employeeItem += "_"+$(this).find(".employee_id").val();
+            flag = true;
+        });
+        if(!flag){
+            layer.msg("必须要有至少一个员工!", {icon: 5, time: 2000});
+            return false;
+        }
+        $("#employeeString").val(employeeItem);
+        if (flag) {
+            $.ajax({
+                cache: true,
+                type: "POST",
+                data: $('#form-admin-add').serialize(),
+                url: "${path}/admin/productionPlan/addProductionPlan",
+                async: false,
+                success: function(data){
+                    if (data.returnCode == 200) {
+                        layer.msg("添加成功!", {icon: 1, time: 1000},function () {
+                            layer_close();
+                        });
+                    } else if(data.returnCode == 501){
+                        var names = "";
+                        var employeeList = data.returnMsg.employeeList;
+                        $.each(employeeList,function(index,element){
+                            if(names === ""){
+                                names += this.employeeName;
+                            }else{
+                                names += "," + this.employeeName;
+                            }
+                        });
+                        layer.msg("添加失败!工序重复的员工:"+names, {icon: 5, time: 5000});
+                    }
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                    layer.msg("添加失败!", {icon: 5, time: 2000});
+                }
+            });
+        } else {
+            layer.msg(msg, {icon: 5, time: 2000});
+        }
+    }
+
+</script>
+</body>
+</html>

+ 124 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/employee_list.ftl

@@ -0,0 +1,124 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+    <link rel="Bookmark" href="/favicon.ico" >
+    <link rel="Shortcut Icon" href="/favicon.ico" />
+<#include "/base/add_base.ftl">
+    <title>商品列表</title>
+    <style>
+        .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
+        #suggest, #suggest2 {width:200px}
+        .gray {color:gray}
+        .ac_results {background:#fff;border:1px solid #7f9db9;position: absolute;z-index: 10000;display: none}
+        .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
+        .ac_results li {border:1px solid #fff}
+        .ac_over, .ac_results li a:hover {background:#c8e3fc}
+        .ac_results li a span {float:right}
+        .ac_result_tip {border-bottom:1px dashed #666;padding:3px}
+        .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
+        .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 15px;}
+        .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
+        .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
+        .tag em{display:block; border-width:15px; position:absolute; top:30%; left:-30px;border-style:solid dashed dashed; border-color:transparent  #32a3d8 transparent transparent;font-size:0; line-height:0;}
+        .dalog-ask .ask{color: #000;margin: 10px 0 5px 0;}
+        .dalog-ask .answer{color: #666;margin-bottom: 10px;}
+        .dalog-ask .answer:hover{color: #32a3d8;cursor: pointer;}
+        .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
+        .time-line-list>li{position: relative;float: left; text-align: center;width: 100px;overflow: hidden;white-space: nowrap;word-break: break-all;padding: 2px 0;}
+        .time-line-list .number{display: inline-block; padding: 2px; background: #32a3d8;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
+        .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
+        .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
+        .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
+        .time-line-list .arrow{border-width:7px; position:absolute; left:25%; top:9px;border-style:solid dashed dashed; border-color:transparent  transparent  transparent #32a3d8;font-size:0; line-height:0;}
+        .time-line-list>li:first-child .arrow{display: none;}
+        .table-bg th{background-color: #e2f6ff;}
+        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
+
+    </style>
+</head>
+<body>
+<div class="page-container">
+    <div class="order-list">
+        <div class="text-c">
+            <form action="${path}/admin/employee/employee_list" method="post">
+                <div class="row cl" style="margin-left: 0px;">
+
+                    <div class="formControls col-2 col-sm-2"  style="padding: 0px 10px 0px 0px; width: 110px;">
+                        <input type="text" class="input-text" value="<#if PtsEmployee??>${PtsEmployee.employeeName!''}</#if>" placeholder="员工名称" id="employeeName" name="employeeName">
+                    </div>
+                    <div class="formControls  col-2 col-sm-2"  style="padding: 0px 10px 0px 0px; width: 110px;">
+                        <input type="text" class="input-text" value="<#if PtsEmployee??>${PtsEmployee.employeeNo!''}</#if>" placeholder="员工编号" id="employeeNo" name="employeeNo">
+                    </div>
+                     <div class="formControls col-1 col-sm-1" >
+                         <button type="submit" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="searchEmployee" name="">搜索</button>
+                     </div>
+                </div>
+            </form>
+        </div>
+
+        <div class="mt-20" style="height: 330px;overflow: auto;overflow-x: hidden;margin-bottom: 12px;border: 1px solid #ddd;">
+            <table class="table table-border table-bordered table-bg table-hover table-sort">
+                <thead>
+                <tr class="text-c">
+                    <th width="10"><input type="checkbox" ></th>
+                    <th width="50">员工编号</th>
+                    <th width="50">员工名称</th>
+                    <th width="50">员工电话</th>
+                    <th width="100">员工岗位</th>
+                </tr>
+                </thead>
+                <tbody id="employeeHtml">
+                <#if page.dataList?? &&  (page.dataList?size > 0) >
+                    <#list page.dataList as employee>
+                        <tr class="text-c">
+                            <td><input type="checkbox" class="employee_id"   name="employee_Id" value="${employee.employeeId!}" ></td>
+                            <td>${employee.employeeNo!}</td>
+                            <td>${employee.employeeName!}</td>
+                            <td>${employee.employeeTel!}</td>
+                            <td>${employee.employeePost!}</td>
+                        </tr>
+                    </#list>
+                <#else>
+                <tr><td colspan="5" class="td-manage text-c" >暂时没有员工,请添加!</td></tr>
+                </#if>
+                </tbody>
+            </table>
+        </div>
+
+        <div class="formControls col-1 col-sm-1" style="margin-left: 45%;">
+            <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;" id="" name="" onclick="selectEmployee()">确认选择</button>
+        </div>
+    </div>
+
+</div>
+<tfoot>
+<#include "/base/page_util.ftl">
+</tfoot>
+
+<script>
+    /**
+     * 选择订单,返回订单内容到父级
+     */
+    function selectEmployee() {
+        var employeeId = "";
+        $(".employee_id").each(function(){
+            if($(this).is(':checked')){
+                employeeId += $(this).val() + "_";
+            }
+        })
+        parent.setSelectEmployee(employeeId);
+        parent.layer.close(parent.layer.getFrameIndex(window.name));
+    }
+</script>
+
+</body>
+</html>

+ 267 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/perfect_productionPlan.ftl

@@ -0,0 +1,267 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+<#include "/base/add_base.ftl">
+    <title>添加生产计划 - H-ui.filter v2.4</title>
+    <style>
+        .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        .tit-2{position: relative;font-size: 16px;padding-left: 10px;color: #50a2ea;display: inline-block;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 50%;height: 6px;width: 6px;border-radius: 6px;margin-top: -3px; background-color: #32a3d8;}
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 14px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 77%;border:1px solid rgba(0,0,0,.1);margin-left: 12.5%;}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 158px; background-color: #50a2ea;color: #fff;border: 1px solid #50a2ea;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-select {
+            border: 1px solid rgba(0,0,0,.1);
+            padding: 6px 50px 6px 15px;
+            height: 34px;
+            -webkit-appearance: none;
+            appearance: none;
+            background: url(/common/images/pts/select-11.png) right center no-repeat;
+            background-size: auto 100%;
+        }
+        .check-box, .radio-box{padding-left: 0;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        .huanhang{ float:left}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">完善工作计划</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>工序选择:</label>
+            <div class="formControls col-xs-9 col-sm-9" style="margin: 10px 0px;padding-left: 0;">
+                <span style="color: #6d6d72;">${productionPlan.processName!''},标准工时为:每台每人需要${productionPlan.processWorkinghours/60}分钟</span>
+            </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>工作日期:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input type="text" style="width: 80%;" class="input-text my-input-date Wdate" value="${productionPlan.planDate?string('yyyy-MM-dd')}" placeholder="工作日期" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" id="plan_date" name="plan_date" readonly="readonly"/>
+            </div>
+        </div>
+
+    </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>拉线:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input class="my-input" type="text" value="${productionPlan.planStay!''}"  name="planStay" id="planStay" placeholder="请输入拉线名称" style="width: 78%;"/>
+            </div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>员工选择</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input type="button" style="color: #32a3d8;border: 1px solid #32a3d8;" class="btn add-order-button" onclick="add_employee()" value="选择员工" >
+                <table class="table table-border table-bordered table-bg table-hover table-sort" style="margin-top: 10px;width: 80%;" id="all_add_employee">
+                    <thead>
+                    <tr class="text-c" id="table1">
+                        <th style="text-align: center;" width="40" >员工编号</th>
+                        <th style="text-align: center;" width="25" >员工姓名</th>
+                        <th style="text-align: center;" width="10">操作</th>
+                    </tr>
+                    </thead>
+                    <tbody id="add_employee">
+
+                        <#if listProductionEmployees?? &&  (listProductionEmployees?size > 0) >
+                            <#list listProductionEmployees as employee>
+                        <tr class="text-c">
+                            <input type="hidden" class="employee_id" id="" value="${employee.peEmployeeId!''}" >
+                            <td>${employee.peEmployeeNo!''}</td>
+                            <td>${employee.peEmployeeName!''}</td>
+                            <td><a href="javascript:void(0)" class="del_product all_down" onclick="delEmployee($(this))" >删除</a></td>
+                        </tr>
+                            </#list>
+                        <#else>
+                        <tr><td colspan="5" class="td-manage text-c" >暂时没有员工,请添加!</td></tr>
+                        </#if>
+
+                    </tbody>
+                </table>
+                <input type="hidden" id="employeeString" name="employeeString" value="" >
+            </div>
+            <br>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>工作时长:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input class="my-input" type="text" value=""  name="planWorkHours" id="planWorkHours" placeholder="请输入工作时长,单位为小时,精确到两位小数" style="width: 78%;"/>
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>工作成果:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input class="my-input" type="text" value=""  name="planResults" id="planResults" placeholder="请输入在此时长内完成的数量" style="width: 78%;"/>
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"></label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <button type="button" class="my-btn-submit" onclick="perfectProductionPlan();" style="margin-top: 20px;">确认</button>
+                <input type="hidden" value="${productionPlan.planId!''}" id="planId" name="planId">
+            </div>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+
+    /**
+     * 打开员工列表
+     */
+    function add_employee() {
+        layer_show("员工列表","${path}/admin/employee/employee_list","800","500");
+    }
+    /**
+     * 选择员工回调
+     * @param colorIds
+     */
+    function setSelectEmployee(employeeIds){
+        var index = layer.load(1, {
+            shade: [0.5,'#fff'] //0.1透明度的白色背景
+        });
+
+        $("#all_add_employee").show();
+
+        var employeeIdArray = employeeIds.split("_");
+        for(var j=0;j<employeeIdArray.length;j++){
+            var employeeId = employeeIdArray[j];
+            if(employeeId == ""){
+                break;
+            }
+
+            var flag = true;
+            $("#add_employee").find("tr").each(function (){
+                var emp_Id = $(this).find(".employee_id").eq(0).val();
+                if(emp_Id == employeeId){
+                    flag  = false;
+                }
+            });
+            if(!flag){
+                continue;
+            }
+
+            $.ajax({
+                type: "POST",
+                data: {
+                    employeeId : employeeId
+                },
+                url: "${path}/admin/employee/get_employee",
+                async:false,
+                success: function(data){
+                    var html = "";
+                    if (data.returnCode == 200) {
+                        var employee = data.returnMsg.ptsEmployee;
+                            html += '<tr class="text-c">' +
+                                    '<input type="hidden" class="employee_id" id="" value="'+ employee.employeeId +'" >' +
+                                    ' <td>'+ cufte(employee.employeeNo) +'</td>' +
+                                    ' <td>'+ cufte(employee.employeeName) +'</td>' +
+                                    ' <td><a href="javascript:void(0)" class="del_product all_down" onclick="delEmployee($(this))" >删除</a></td>' +
+                                    ' </tr>';
+
+                    }else{
+                        $("#product_color_error").html(data.resultMsg);
+                        return false;
+                    }
+                    $("#add_employee").append(html);
+                }
+            });
+        }
+        layer.close(index);
+    }
+
+    /**
+     *  删除员工
+     */
+    function delEmployee($this){
+        $this.parents("tr").remove();
+    }
+
+    /**
+     * 完善信息
+     */
+    function perfectProductionPlan() {
+        var plan_date = $("#plan_date").val();
+        if(plan_date == null || plan_date == ""){
+            layer.msg("工作日期不能为空!", {icon: 5, time: 2000});
+            return;
+        }
+        var planStay = $("#planStay").val();
+        if(planStay == null || planStay == ""){
+            layer.msg("拉线不能为空!", {icon: 5, time: 2000});
+            return;
+        }
+        var planWorkHours = $("#planWorkHours").val();
+        if(planWorkHours == null || planWorkHours == ""){
+            layer.msg("工作时长不能为空!", {icon: 5, time: 2000});
+            return;
+        }
+        var planResults = $("#planResults").val();
+        if(planResults == null || planResults == ""){
+            layer.msg("工作成果不能为空!", {icon: 5, time: 2000});
+            return;
+        }
+        /*封装员工项*/
+        var employeeItem = "";
+        $("#add_employee").find("tr").each(function(){
+            employeeItem += "_"+$(this).find(".employee_id").val();
+            flag = true;
+        });
+        if(!flag){
+            layer.msg("必须要有至少一个员工!", {icon: 5, time: 2000});
+            return false;
+        }
+        $("#employeeString").val(employeeItem);
+        if (flag) {
+            $.ajax({
+                cache: true,
+                type: "POST",
+                data: $('#form-admin-add').serialize(),
+                url: "${path}/admin/productionPlan/perfect_productionPlan",
+                async: false,
+                success: function(data){
+                    if (data.returnCode == 200) {
+                        layer.msg("完善成功!", {icon: 1, time: 1000},function () {
+                            layer_close();
+                        });
+
+                    } else {
+                        layer.msg("完善失败!", {icon: 5, time: 2000});
+                    }
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                    layer.msg("完善失败!", {icon: 5, time: 2000});
+                }
+            });
+        } else {
+            layer.msg(msg, {icon: 5, time: 2000});
+        }
+    }
+
+</script>
+</body>
+</html>

+ 141 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/productionPlan_List.ftl

@@ -0,0 +1,141 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="UTF-8">
+		<title></title>
+        <#include "/base/list_base.ftl">
+		<style>
+			*{padding: 0;margin: 0;}
+			.my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 32px;margin-right: 10px;}
+			/*.my-input::-webkit-input-placeholder,.my-select{color: #dcdcdc;}*/
+            .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-11.png) right center no-repeat;background-size:auto 100%;}
+            .my-btn-search{border: 1px solid #50a2ea;padding: 1px 25px;height: 32px;background-color: #fff;color: #50a2ea;}
+            .barcodeImg{margin:10px 0px}
+            .table-bg thead th{background-color: #e2f6ff;}
+            input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+            input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+		</style>
+	</head>
+	<body>
+    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
+        <span class="c-gray en">/</span> PST管理
+        <span class="c-gray en">/</span> 生产计划列表
+        <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+    </nav>
+		<div class="text-c" style="margin-top: 20px;">
+			<form action="${path}/admin/productionPlan/select_productionPlan_list" method="post">
+                <button type="button" class="my-btn-search" onclick="add_employee('添加生产计划','${path}/admin/productionPlan/to_addProductionPlan','970','750');" style="cursor:pointer; margin-right: 50px;">添加生产计划</button>
+                <input class="my-input" style="width: 12%;" type="text" value="<#if planDate??>${planDate?string("yyyy-MM-dd")!''}</#if>" name="plan_Date" id="plan_Date" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" placeholder="工作计划日期" readonly="readonly"/>
+                <select class="my-select" id="planProcessId" name="planProcessId"  style="width: 12%;">
+                    <option value="">请选择工序</option>
+                    <#if (listProductionProcess?size > 0)>
+                        <#list listProductionProcess as info>
+                                <option <#if planProcessId??><#if planProcessId == info.processId>selected</#if></#if> value="${info.processId!""}">${info.processName!""}</option>
+                        </#list>
+                    </#if>
+                </select>
+						<button type="submit" style="cursor:pointer; " class="my-btn-search">搜索</button>
+			</form>
+		</div>
+		<div class="mt-20" style="margin: 20px;">
+			<table class="table table-border table-bordered table-bg table-hover table-sort">
+				<thead>
+				<tr class="text-c">
+                    <th width="100">日期</th>
+					<th width="100">拉线</th>
+					<th width="100">工序</th>
+					<th width="100">员工数量</th>
+					<th width="100">更新时间</th>
+					<th width="100">操作</th>
+				</tr>
+				</thead>
+				<tbody id="listid">
+                <#if page.dataList?? &&  (page.dataList?size > 0) >
+					<#list page.dataList as list>
+						<tr>
+                            <td class="text-c" width="140">${(list.planDate?string("yyyy-MM-dd"))!''}</td>
+							<td class="text-c" width="100">${list.planStay!''}</td>
+							<td class="text-c" width="100">${list.processName!''}</td>
+							<td class="text-c" width="100">${list.employeesNum!''}</td>
+							<td class="text-c" width="100">${(list.planUpdateTime?string("yyyy-MM-dd HH:mm:ss"))!''!''}</td>
+							<!-- 遍历操作 -->
+							<td class="td-manage text-c">
+                                <a onclick="add_employee('编辑','${path}/admin/productionPlan/to_update_productionPlan?planId='+${list.planId!''},'970','750');" title="编辑" href="javascript:;"  class="ml-5" style="text-decoration:none">编辑</a>
+                                <a onclick="delProductionPlan(${list.planId!''});" title="删除生产计划" href="javascript:;"  class="ml-5" style="text-decoration:none">删除</a>
+                                <a onclick="add_employee('完善生产计划','${path}/admin/productionPlan/to_perfect_productionPlan?planId='+${list.planId!''},'970','750');" title="完善工作计划" href="javascript:;"  class="ml-5" style="text-decoration:none">完善工作计划</a>
+                            </td>
+						</tr>
+					</#list>
+                <#else>
+                <tr><td id="noMachineTr" colspan="11" class="td-manage text-c" >暂时没有生产计划,请添加!</td></tr>
+                </#if>
+				</tbody>
+			</table>
+			<div  style="display:none;" >
+				<div id="printlist">
+                </div>
+			</div>
+		</div>
+		<#include "/base/page_util.ftl">
+
+        <#--jquery.PrintArea 2.4-->
+        <script type="text/javascript" src="${path}/common/lib/jquery.PrintArea/jquery.PrintArea.js"></script>
+        <script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/jquery-barcode.js"></script>
+
+		<script type="text/javascript">
+
+
+
+            function add_employee(title,url,w,h){
+                layer_show(title,url,w,h);
+            }
+
+            /*删除计划*/
+            function delProductionPlan(planId){
+                layer.confirm('是否确认删除,删除后无法恢复?',function(index) {
+                    if (planId != null) {
+                        $.ajax({
+                            type: "POST",
+                            url: "${path}/admin/productionPlan/delProductionPlan",
+                            async: false,
+                            data: {planId: planId},
+                            success: function (data) {
+                                if (data.returnCode == 200) {
+                                    layer.msg("删除成功!", {icon: 1, time: 2000});
+                                    location.reload();
+                                } else {
+                                    layer.msg("删除失败!", {icon: 5, time: 2000});
+                                }
+                            },
+                            error: function () {
+                                console.log("删除失败!");
+                            }
+                        });
+                    }
+                })
+            }
+            /*编辑计划*/
+            function perfectProductionPlan(planId){
+                    if (planId != null) {
+                        $.ajax({
+                            type: "POST",
+                            url: "${path}/admin/productionPlan/to_product_productionPlan",
+                            async: false,
+                            data: {planId: planId},
+                            success: function (data) {
+                                if (data.returnCode == 200) {
+                                    layer.msg("删除成功!", {icon: 1, time: 2000});
+                                    location.reload();
+                                } else {
+                                    layer.msg("删除失败!", {icon: 5, time: 2000});
+                                }
+                            },
+                            error: function () {
+                                console.log("删除失败!");
+                            }
+                        });
+                    }
+            }
+        </script>
+	</body>
+</html>

+ 139 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/productionPlan_statistical.ftl

@@ -0,0 +1,139 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="UTF-8">
+		<title></title>
+        <#include "/base/list_base.ftl">
+		<style>
+			*{padding: 0;margin: 0;}
+			.my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 32px;margin-right: 10px;}
+			/*.my-input::-webkit-input-placeholder,.my-select{color: #dcdcdc;}*/
+            .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-11.png) right center no-repeat;background-size:auto 100%;}
+            .my-btn-search{border: 1px solid #50a2ea;padding: 1px 25px;height: 32px;background-color: #fff;color: #50a2ea;}
+            .barcodeImg{margin:10px 0px}
+            .table-bg thead th{background-color: #e2f6ff;}
+            input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+            input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+		</style>
+	</head>
+	<body>
+    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
+        <span class="c-gray en">/</span> PST管理
+        <span class="c-gray en">/</span> 生产计划统计列表
+        <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+    </nav>
+		<div class="text-c" style="margin-top: 20px;">
+			<form action="${path}/admin/productionPlan/select_productionPlan_statistical" method="post">
+                <input class="my-input" style="width: 12%;" type="text" value="<#if planDate??>${planDate?string("yyyy-MM-dd")!''}</#if>" name="plan_Date" id="plan_Date" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" placeholder="工作计划日期" readonly="readonly"/>
+                <select class="my-select" id="planProcessId" name="planProcessId"  style="width: 12%;">
+                    <option value="">请选择工序</option>
+                    <#if (listProductionProcess?size > 0)>
+                        <#list listProductionProcess as info>
+                                <option <#if planProcessId??><#if planProcessId == info.processId>selected</#if></#if> value="${info.processId!""}">${info.processName!""}</option>
+                        </#list>
+                    </#if>
+                </select>
+						<button type="submit" style="cursor:pointer; " class="my-btn-search">搜索</button>
+			</form>
+		</div>
+		<div class="mt-20" style="margin: 20px;">
+			<table class="table table-border table-bordered table-bg table-hover table-sort">
+				<thead>
+				<tr class="text-c">
+                    <th width="100">日期</th>
+					<th width="100">工序</th>
+					<th width="100">总人数</th>
+					<th width="100">总工时</th>
+					<th width="100">完成总工作量</th>
+					<th width="100">实际效率<br>(实际完成数量/时间/人数)</th>
+					<th width="100">标准效率</th>
+					<th width="100">实际效率比</th>
+				</tr>
+				</thead>
+				<tbody id="listid">
+                <#if page.dataList?? &&  (page.dataList?size > 0) >
+					<#list page.dataList as list>
+						<tr>
+                            <td class="text-c" width="140">${(list.planDate?string("yyyy-MM-dd"))!''}</td>
+							<td class="text-c" width="100">${list.processName!''}</td>
+							<td class="text-c" width="100">${list.employeesNum!''}</td>
+							<td class="text-c" width="100">${list.planWorkHours!''}</td>
+							<td class="text-c" width="100">${list.planResults!''}</td>
+							<td class="text-c" width="100"><#if list.planResults??><#if list.planWorkHours??><#if list.employeesNum??>${list.planResults/list.planWorkHours/list.employeesNum}</#if></#if></#if></td>
+							<td class="text-c" width="100">${list.processWorkinghours!''}</td>
+							<td class="text-c" width="100"><#if list.planResults??><#if list.planWorkHours??><#if list.employeesNum??>${list.processWorkinghours/(list.planResults/list.planWorkHours/list.employeesNum) * 100}%</#if></#if></#if></td>
+						</tr>
+					</#list>
+                <#else>
+                <tr><td id="noMachineTr" colspan="11" class="td-manage text-c" >暂时没有工作计划,请添加!</td></tr>
+                </#if>
+				</tbody>
+			</table>
+			<div  style="display:none;" >
+				<div id="printlist">
+                </div>
+			</div>
+		</div>
+		<#include "/base/page_util.ftl">
+
+        <#--jquery.PrintArea 2.4-->
+        <script type="text/javascript" src="${path}/common/lib/jquery.PrintArea/jquery.PrintArea.js"></script>
+        <script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/jquery-barcode.js"></script>
+
+		<script type="text/javascript">
+
+
+
+            function add_employee(title,url,w,h){
+                layer_show(title,url,w,h);
+            }
+
+            /*删除计划*/
+            function delProductionPlan(planId){
+                layer.confirm('是否确认删除,删除后无法恢复?',function(index) {
+                    if (planId != null) {
+                        $.ajax({
+                            type: "POST",
+                            url: "${path}/admin/productionPlan/delProductionPlan",
+                            async: false,
+                            data: {planId: planId},
+                            success: function (data) {
+                                if (data.returnCode == 200) {
+                                    layer.msg("删除成功!", {icon: 1, time: 2000});
+                                    location.reload();
+                                } else {
+                                    layer.msg("删除失败!", {icon: 5, time: 2000});
+                                }
+                            },
+                            error: function () {
+                                console.log("删除失败!");
+                            }
+                        });
+                    }
+                })
+            }
+            /*编辑计划*/
+            function perfectProductionPlan(planId){
+                    if (planId != null) {
+                        $.ajax({
+                            type: "POST",
+                            url: "${path}/admin/productionPlan/to_product_productionPlan",
+                            async: false,
+                            data: {planId: planId},
+                            success: function (data) {
+                                if (data.returnCode == 200) {
+                                    layer.msg("删除成功!", {icon: 1, time: 2000});
+                                    location.reload();
+                                } else {
+                                    layer.msg("删除失败!", {icon: 5, time: 2000});
+                                }
+                            },
+                            error: function () {
+                                console.log("删除失败!");
+                            }
+                        });
+                    }
+            }
+        </script>
+	</body>
+</html>

+ 275 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/update_productionPlan.ftl

@@ -0,0 +1,275 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+<#include "/base/add_base.ftl">
+    <title>添加生产计划 - H-ui.filter v2.4</title>
+    <style>
+        .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        .tit-2{position: relative;font-size: 16px;padding-left: 10px;color: #50a2ea;display: inline-block;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 50%;height: 6px;width: 6px;border-radius: 6px;margin-top: -3px; background-color: #32a3d8;}
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 14px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 77%;border:1px solid rgba(0,0,0,.1);margin-left: 12.5%;}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 158px; background-color: #50a2ea;color: #fff;border: 1px solid #50a2ea;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-select {
+            border: 1px solid rgba(0,0,0,.1);
+            padding: 6px 50px 6px 15px;
+            height: 34px;
+            -webkit-appearance: none;
+            appearance: none;
+            background: url(/common/images/pts/select-11.png) right center no-repeat;
+            background-size: auto 100%;
+        }
+        .check-box, .radio-box{padding-left: 0;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        .huanhang{ float:left}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">编辑工作计划</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>工作日期:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input type="text" style="width: 80%;" class="input-text my-input-date Wdate" value="${productionPlan.planDate?string('yyyy-MM-dd')}" placeholder="工作日期" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" id="plan_date" name="plan_date" readonly="readonly"/>
+            </div>
+        </div>
+            <div class="row cl">
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>工序选择:</label>
+                <div class="formControls col-xs-9 col-sm-9" style="margin: 10px 0px;padding-left: 0;">
+                    <select class="my-select" id="planProcessId" name="planProcessId" class="chosen" style="width: 80%;">
+                        <option value="">请选择工序</option>
+                        <#if (listProductionProcess?size > 0)>
+                            <#list listProductionProcess as info>
+                                    <option  <#if productionPlan.planProcessId == info.processId>selected</#if> value="${info.processId!""}">${info.processName!""}</option>
+                            </#list>
+                        </#if>
+                    </select>
+                </div>
+            </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>拉线:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input class="my-input" type="text" value="${productionPlan.planStay!''}"  name="planStay" id="planStay" placeholder="请输入拉线" style="width: 78%;"/>
+            </div>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>员工选择</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input type="button" style="color: #32a3d8;border: 1px solid #32a3d8;" class="btn add-order-button" onclick="add_employee()" value="选择员工" >
+                <table class="table table-border table-bordered table-bg table-hover table-sort" style="margin-top: 10px;width: 80%;" id="all_add_employee">
+                    <thead>
+                    <tr class="text-c" id="table1">
+                        <th style="text-align: center;" width="40" >员工编号</th>
+                        <th style="text-align: center;" width="25" >员工姓名</th>
+                        <th style="text-align: center;" width="10">操作</th>
+                    </tr>
+                    </thead>
+                    <tbody id="add_employee">
+
+                        <#if listProductionEmployees?? &&  (listProductionEmployees?size > 0) >
+                            <#list listProductionEmployees as employee>
+                        <tr class="text-c">
+                            <input type="hidden" class="employee_id" id="" value="${employee.peEmployeeId!''}" >
+                            <td>${employee.peEmployeeNo!''}</td>
+                            <td>${employee.peEmployeeName!''}</td>
+                            <td><a href="javascript:void(0)" class="del_product all_down" onclick="delEmployee($(this))" >删除</a></td>
+                        </tr>
+                            </#list>
+                        <#else>
+                        <tr><td colspan="5" class="td-manage text-c" >暂时没有员工,请添加!</td></tr>
+                        </#if>
+
+                    </tbody>
+                </table>
+                <input type="hidden" id="employeeString" name="employeeString" value="" >
+            </div>
+            <br>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>工作时长:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input class="my-input" type="text" value="${productionPlan.planWorkHours!''}"  name="planWorkHours" id="planWorkHours" placeholder="请输入工作时长" style="width: 78%;"/>
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>工作成果:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input class="my-input" type="text" value="${productionPlan.planResults!''}"  name="planResults" id="planResults" placeholder="请输入工作成果" style="width: 78%;"/>
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"></label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <button type="button" class="my-btn-submit" onclick="perfectProductionPlan();" style="margin-top: 20px;">确认修改</button>
+                <input type="hidden" value="${productionPlan.planId!''}" id="planId" name="planId">
+            </div>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+
+    /**
+     * 打开员工列表
+     */
+    function add_employee() {
+        layer_show("员工列表","${path}/admin/employee/employee_list","800","500");
+    }
+    /**
+     * 选择员工回调
+     * @param colorIds
+     */
+    function setSelectEmployee(employeeIds){
+        var index = layer.load(1, {
+            shade: [0.5,'#fff'] //0.1透明度的白色背景
+        });
+
+        $("#all_add_employee").show();
+
+        var employeeIdArray = employeeIds.split("_");
+        for(var j=0;j<employeeIdArray.length;j++){
+            var employeeId = employeeIdArray[j];
+            if(employeeId == ""){
+                break;
+            }
+
+            var flag = true;
+            $("#add_employee").find("tr").each(function (){
+                var emp_Id = $(this).find(".employee_id").eq(0).val();
+                if(emp_Id == employeeId){
+                    flag  = false;
+                }
+            });
+            if(!flag){
+                continue;
+            }
+
+            $.ajax({
+                type: "POST",
+                data: {
+                    employeeId : employeeId
+                },
+                url: "${path}/admin/employee/get_employee",
+                async:false,
+                success: function(data){
+                    var html = "";
+                    if (data.returnCode == 200) {
+                        var employee = data.returnMsg.ptsEmployee;
+                            html += '<tr class="text-c">' +
+                                    '<input type="hidden" class="employee_id" id="" value="'+ employee.employeeId +'" >' +
+                                    ' <td>'+ cufte(employee.employeeNo) +'</td>' +
+                                    ' <td>'+ cufte(employee.employeeName) +'</td>' +
+                                    ' <td><a href="javascript:void(0)" class="del_product all_down" onclick="delEmployee($(this))" >删除</a></td>' +
+                                    ' </tr>';
+
+                    }else{
+                        $("#product_color_error").html(data.resultMsg);
+                        return false;
+                    }
+                    $("#add_employee").append(html);
+                }
+            });
+        }
+        layer.close(index);
+    }
+
+    /**
+     *  删除员工
+     */
+    function delEmployee($this){
+        $this.parents("tr").remove();
+    }
+
+    /**
+     * 完善信息
+     */
+    function perfectProductionPlan() {
+        var plan_date = $("#plan_date").val();
+        if(plan_date == null || plan_date == ""){
+            layer.msg("工作日期不能为空!", {icon: 5, time: 2000});
+            return;
+        }
+        var planStay = $("#planStay").val();
+        if(planStay == null || planStay == ""){
+            layer.msg("拉线不能为空!", {icon: 5, time: 2000});
+            return;
+        }
+        var planWorkHours = $("#planWorkHours").val();
+        if(planWorkHours == null || planWorkHours == ""){
+            layer.msg("工作时长不能为空!", {icon: 5, time: 2000});
+            return;
+        }
+        var planResults = $("#planResults").val();
+        if(planResults == null || planResults == ""){
+            layer.msg("工作成果不能为空!", {icon: 5, time: 2000});
+            return;
+        }
+        /*封装员工项*/
+        var employeeItem = "";
+        $("#add_employee").find("tr").each(function(){
+            employeeItem += "_"+$(this).find(".employee_id").val();
+            flag = true;
+        });
+        if(!flag){
+            layer.msg("必须要有至少一个员工!", {icon: 5, time: 2000});
+            return false;
+        }
+        $("#employeeString").val(employeeItem);
+        if (flag) {
+            $.ajax({
+                cache: true,
+                type: "POST",
+                data: $('#form-admin-add').serialize(),
+                url: "${path}/admin/productionPlan/perfect_productionPlan",
+                async: false,
+                success: function(data){
+                    if (data.returnCode == 200) {
+                        layer.msg("编辑成功!", {icon: 1, time: 1000},function () {
+                            parent.location.reload();
+                            layer_close();
+
+                        });
+
+                    } else {
+                        layer.msg("编辑失败!", {icon: 5, time: 2000});
+                    }
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                    layer.msg("编辑失败!", {icon: 5, time: 2000});
+                }
+            });
+        } else {
+            layer.msg(msg, {icon: 5, time: 2000});
+        }
+    }
+
+</script>
+</body>
+</html>