Ejemplo n.º 1
0
    /*
     * <summary>
     * 关于发起异常之后节点的显示与隐藏,包含“确认调整意见”,“审批确认”节点。
     * Param: Schema me  本参数是本工序表单的对象
     * 方法的入口参数;
     * Version:1.0
     * Date:2021/6/9
     * Author:zzx
     * </summary>
     */
    protected void abnormalStep(Schema me, H3.SmartForm.SmartFormPostValue postValue, H3.SmartForm.SubmitSmartFormResponse response)
    {
        var row = me.GetRow(this.Request.BizObjectId);
        //  var postValue = me.CurrentPostValue;
        var Code    = this.Request.ActivityCode;
        var actName = this.Request.ActivityTemplate.DisplayName;

        //发起异常
        var startException = this.Request.BizObject["F0000045"] + string.Empty;

        if (startException == "是")
        {
            createLog(me, postValue);
        }

        if (Code == "Activity87")
        {
            updateLog(me, postValue);
        }
        if (Code == "Activity88")
        {
            me.Cell("发起异常", "否");
            // me.Cell("转至工步", "待转运 ");
            me.Cell("异常描述", "操作错误,重新选择节点 ");
            me.Cell("异常类别", "安全异常 ");
            me.Update(false);
        }
    }
Ejemplo n.º 2
0
    /*
     * <summary>
     * 把本表单的以下信息同步到《异常工步记录表中》。
     * Param: Schema me  本参数是本工序表单的对象
     * 方法的入口参数;
     * Version:1.0
     * Date:2021/6/9
     * Author:zzx
     * </summary>
     */
    public void createLog(Schema me, H3.SmartForm.SmartFormPostValue postValue)
    {
        var scmAbnormalType = new Schema(this.Engine, "异常工步记录表");

        scmAbnormalType.GetNew();
        //当前工序
        var currentProcess = me.PostValue("当前工序");
        //  当前工步
        var currentWorkStep = me.PostValue("当前工步");
        //异常类别
        var abNormalType = me.PostValue("异常类别");
        //ID
        var ID = me.PostValue("ID");
        //异常描述
        var abNormalDescibe = me.PostValue("异常描述");

        //ID
        scmAbnormalType.Cell("ID", ID);

        //工步来源
        scmAbnormalType.Cell("工步来源", currentWorkStep);
        //工序来源
        scmAbnormalType.Cell("工序来源", currentProcess);

        //异常类别
        scmAbnormalType.Cell("异常类别", abNormalType);
        //异常描述
        scmAbnormalType.Cell("异常描述", abNormalDescibe);

        scmAbnormalType.Create(true);
    }
Ejemplo n.º 3
0
    protected override void OnSubmit(string actionName, H3.SmartForm.SmartFormPostValue postValue, H3.SmartForm.SubmitSmartFormResponse response)
    {
        me.CurrentPostValue = postValue;
        string code = this.Request.ActivityCode;  //活动节点编码

        updatePR(code, actionName);

        if (code == ActivityRK && actionName == ActionSubmit)
        {
            dp.FillPerson(me, ProcessName);
        }
        if (code == ActivityXJ && actionName == ActionSubmit)
        {
            dp.FillPerson(me, ProcessName);
        }
        if (code == ActivitySJ && actionName == ActionSubmit)
        {
            me["工人"] = this.Request.ParticipantId;
            //this.Request.BizObject[F0000073]=this.Request.ParticipantId;
        }

        base.OnSubmit(actionName, postValue, response);
        //多阶段加工新方案升级机加工任务记录
        UpdateRecordForm(actionName, code);

        if (code == ActivityJY && actionName == "Submit")
        {
            Salary slr = new Salary(me.Engine, me.PostValue("ID"));
            slr.Save(ProcessName, false);
        }
        //异常工步节点日志
        abnormalStep(code, response);
    }
Ejemplo n.º 4
0
 private void mustHaveAName(string actionName, H3.SmartForm.SmartFormPostValue postValue, H3.SmartForm.SubmitSmartFormResponse response)
 {
     if (this.Request.BizObject["F0000075"] == "是")
     {
         this.Request.BizObject["OwnerId"] = this.Request.UserContext.UserId;
     }
 }
Ejemplo n.º 5
0
    /*
     * <summary>
     * 关于发起异常之后节点中内容的显示与隐藏及默认值,包含“确认调整意见”,“审批确认”节点。
     * Param: Schema me  本参数是本工序表单的对象
     * 方法的入口参数;
     * Version:1.0
     * Date:2021/6/9
     * Author:zzx
     */
    protected void abnormalStep(Schema me, H3.SmartForm.SmartFormPostValue postValue, H3.SmartForm.SubmitSmartFormResponse response)
    {
        var row = me.GetRow(this.Request.BizObjectId);
        //  var postValue = me.CurrentPostValue;
        var Code    = this.Request.ActivityCode;
        var actName = this.Request.ActivityTemplate.DisplayName;

        //发起异常
        var startException = this.Request.BizObject["F0000075"] + string.Empty;

        if (startException == "是")
        {
            createLog(me, postValue);
        }

        if (Code == "Activity92")   //???
        {
            createLog(me, postValue);
        }
        if (Code == "Activity93")
        {
            me["发起异常"] = "否";
            me["异常描述"] = "操作错误,重新选择节点";
            me["异常类别"] = "安全异常";
            me.Update(false);
        }
    }
Ejemplo n.º 6
0
    /*
     * <summary>
     * 把本表单的以下信息同步到《异常工步记录表中》。
     * Param: Schema me  本参数是本工序表单的对象
     * 方法的入口参数;
     * Version:1.0
     * Date:2021/6/9
     * Author:zzx
     * </summary>
     */
    public void createLog(Schema me, H3.SmartForm.SmartFormPostValue postValue)
    {
        var yc = new Schema(this.Engine, "异常工步记录表");

        yc.GetNew();
        yc["ID"]   = me.PostValue("ID");
        yc["工步来源"] = me.PostValue("当前工步");
        yc["工序来源"] = me.PostValue("当前工序");
        yc["异常类别"] = me.PostValue("异常类别");
        yc["异常描述"] = me.PostValue("异常描述");
        yc.Create(true);
    }
Ejemplo n.º 7
0
    public Schema(H3.IEngine Engine, H3.DataModel.BizObject bizObject, H3.SmartForm.SmartFormPostValue postData)
    {
        this.Engine           = Engine;
        CurrentRow            = bizObject;
        this.tableID          = bizObject.Schema.SchemaCode;
        this.IsLongID         = true;
        TableSchema           = bizObject.Schema;
        this.CurrentPostValue = postData;
        var shortID = IsLongID ? tableID.Substring(appID.Length) : tableID;

        this.tableName = GetTableName(shortID);
        Init(false);
    }
Ejemplo n.º 8
0
    /*
     * <summary>
     * 根据本表单的修改更新到,《异常工步记录表》。
     * Param: Schema me  本参数是本工序表单的对象
     * 方法的入口参数;
     * Version:1.0
     * Date:2021/6/9
     * Author:zzx
     * </summary>
     */
    public void updateLog(Schema me, H3.SmartForm.SmartFormPostValue postValue)
    {
        var yc = new Schema(this.Engine, "异常工步记录表");
        var ID = me.PostValue("ID");
        var currentWorkStep = me.PostValue("当前工步");

        yc.ClearFilter()
        .And("ID", "=", ID)
        .And("工步来源", "=", currentWorkStep)
        .GetFirst(true);
        yc["异常描述"] = me.PostValue("异常描述");
        yc.Update(true);
    }
Ejemplo n.º 9
0
    /*
     * <summary>
     * 根据本表单的修改更新到,《异常工步记录表》。
     * Param: Schema me  本参数是本工序表单的对象
     * 方法的入口参数;
     * Version:1.0
     * Date:2021/6/9
     * Author:zzx
     * </summary>
     */
    public void updateLog(Schema me, H3.SmartForm.SmartFormPostValue postValue)
    {
        //异常工步记录表
        var scmAbnormalType = new Schema(this.Engine, "异常工步记录表");
        //ID
        var ID = me.PostValue("ID");
        //  当前工步
        var currentWorkStep = me.PostValue("当前工步");
        var exceptDscribe   = me.PostValue("异常描述");

        scmAbnormalType.ClearFilter()
        .And("ID", "=", ID)
        .And("工步来源", "=", currentWorkStep)
        .GetFirst(true);
        scmAbnormalType.Cell("异常描述", exceptDscribe);
        scmAbnormalType.Update(true);
    }
Ejemplo n.º 10
0
    protected override void OnSubmit(string actionName, H3.SmartForm.SmartFormPostValue postValue, H3.SmartForm.SubmitSmartFormResponse response)
    {
        me.CurrentPostValue = postValue;
        mustHaveAName(actionName, postValue, response);
        updatePR(activityCode, actionName);
        me.CurrentRow = this.Request.BizObject;
        Dispatcher(activityCode, actionName);
        ProcessRecord(activityCode, actionName);//加工记录

        base.OnSubmit(actionName, postValue, response);
        //多阶段加工新方案升级机加工任务记录
        UpdateRecordForm(actionName, activityCode);

        if (activityCode == ActivityJY && actionName == "Submit")
        {
            Salary slr = new Salary(me.Engine, me.PostValue("ID"));
            slr.Save(ProcessName);
            slr.Save("四面光");
        }
        abnormalStep(me, postValue, response);
    }
Ejemplo n.º 11
0
    protected override void OnSubmit(string actionName, H3.SmartForm.SmartFormPostValue postValue, H3.SmartForm.SubmitSmartFormResponse response)
    {
        me.CurrentPostValue = postValue;

        string activityCode = this.Request.ActivityCode;  //活动节点编码

        if (activityCode == ActivityRK && actionName == "Submit")
        {
            dp.FillPerson(me, ProcessName);
        }
        if (activityCode == ActivityXJ && actionName == "Submit")
        {
            dp.FillPerson(me, ProcessName);
        }
        if (activityCode == ActivitySJ && actionName == "Submit")
        {
            me["工人"] = this.Request.ParticipantId;
        }

        updatePR(activityCode, actionName);
        //发起异常 是
        if (me["发起异常"] == "是")
        {
            me["OwnerId"] = this.Request.UserContext.UserId;
        }

        base.OnSubmit(actionName, postValue, response);
        //多阶段加工新方案升级机加工任务记录
        UpdateRecordForm(actionName, activityCode);

        if (activityCode == ActivityJY && actionName == "Submit")
        {
            Salary slr = new Salary(me.Engine, me.PostValue("ID"));
            slr.Save(ProcessName, false);
        }
        abnormalStep(me, postValue, response);
    }