public static Boolean UpData裁剪条码打印生产工序(String orderid)
        {
            String STYLE_BAR_CODE;
            String ORDERNO;
            String PRODUCTION_ID = "0";

            try
            {
                ORDERNO        = OrderService.GetOrderNoWithOrderid(orderid);
                STYLE_BAR_CODE = OrderService.GetSBCWithOrderid(orderid);
                #region 定制款式款式生产工序表更新
                SQLerp.DoUpdate("s_style_operating_s", new string[] { "OPERATING_STATUS", "UPDATE_USER" }, new string[] { "OPERATING_STATUS-OS_10", "429" }, new string[] { "STYLE_BAR_CODE", "OPERATING_ITME_ID" }, new string[] { STYLE_BAR_CODE, "3" });
                #endregion

                #region 通过barCode从生产制单信息管理表里面获取PRODUCTION_ID
                String sql = "SELECT\n" +
                             "CASE\n" +
                             "		\n"+
                             "	WHEN\n"+
                             "		(\n"+
                             "		SELECT\n"+
                             "			pp.PRODUCTION_ID \n"+
                             "		FROM\n"+
                             "			p_production_p pp\n"+
                             "			LEFT JOIN p_notice_production_r notice_production ON pp.PRODUCTION_ID = notice_production.PRODUCTION_ID\n"+
                             "			LEFT JOIN p_plan_notice_order_r notice_order ON notice_order.NOTICE_ID = notice_production.NOTICE_ID \n"+
                             "		WHERE\n"+
                             "			notice_order.ORDER_ID = "+ orderid + " \n" +
                             "			) IS NOT NULL THEN\n"+
                             "			(\n"+
                             "			SELECT\n"+
                             "				pp.PRODUCTION_ID \n"+
                             "			FROM\n"+
                             "				p_production_p pp\n"+
                             "				LEFT JOIN p_notice_production_r notice_production ON pp.PRODUCTION_ID = notice_production.PRODUCTION_ID\n"+
                             "				LEFT JOIN p_plan_notice_order_r notice_order ON notice_order.NOTICE_ID = notice_production.NOTICE_ID \n"+
                             "			WHERE\n"+
                             "				notice_order.ORDER_ID = "+ orderid + " \n" +
                             "			) ELSE ( SELECT pp.PRODUCTION_ID FROM p_production_p pp LEFT JOIN c_contract_custom_order_r cco ON cco.CONTRACT_ID = pp.CONTRACT_ID WHERE cco.ORDER_ID = "+ orderid + " ) \n" +
                             "	END productionId";
                #endregion
                DataRow dr = SQLerp.GetDataRow(sql);
                if (dr == null)
                {
                    PRODUCTION_ID = "0";
                }
                else
                {
                    PRODUCTION_ID = "1";
                }
                #region p_production_item_s增加一条数据
                SQLerp.DoInsert("p_production_item_s", new string[] { "PRODUCTION_ID", "ORDER_ID", "ORDER_NO", "BAR_CODE", "OPERATING_ID", "PROCESS_NUMBER", "PROCESS_STATUS", "SETTLE_FLAG", "VERSION", "DEL_FLG", "CREATE_USER_ID", "UPDATE_USER_ID" }, new string[] { PRODUCTION_ID, orderid, ORDERNO, STYLE_BAR_CODE, "3", "1", "OPERATING_STATUS-OS_10", "0", "1", "0", "429", "429" });
                #endregion
                return(true);
            }
            catch
            {
                return(false);
            }
        }
示例#2
0
 /// <summary>
 /// 文档存入erp
 /// </summary>
 /// <param name="TaskDTOS"></param>
 /// <returns></returns>
 public static Boolean SaveFileToErp(TaskDTOS TaskDTOS)
 {
     try
     {
         foreach (TaskDTO taskDTo in TaskDTOS.taskDTOs)
         {
             if (SQLerp.GetDataRow("SELECT * FROM t_remark WHERE remark_id='" + taskDTo.remark_id + "'") != null)
             {
                 SQLerp.DoInsert("t_remark", new string[] { "remark_id", "order_id", "remark", "file_name", "template_id", "data", "style_id", "ref_style_id", "serial_number", "status" }, new string[] { taskDTo.remark_id, taskDTo.order_id, taskDTo.remark, taskDTo.file_name, taskDTo.template_id, taskDTo.data, taskDTo.style_id, taskDTo.ref_style_id, taskDTo.serial_number, taskDTo.status });
             }
         }
         return(true);
     }
     catch
     {
         return(false);
     }
 }
示例#3
0
        /// <summary>
        /// 获取裁剪条码
        /// </summary>
        /// <param name="BarCode"></param>
        /// <returns></returns>
        public static DataRow Get裁剪条码信息(String BarCode)
        {
            String sql = "SELECT\n" +
                         "	QR_ID,\n"+
                         "	QR_TYPE,\n"+
                         "	QR_BAR_CODE,\n"+
                         "	QR_CODE,\n"+
                         "	QR_NAME,\n"+
                         "	QR_OTHER1,\n"+
                         "	QR_OTHER2,\n"+
                         "	QR_OTHER3,\n"+
                         "	QR_OTHER4,\n"+
                         "	QR_OTHER5,\n"+
                         "	QR_OTHER6,\n"+
                         "	QR_OTHER7,\n"+
                         "	QR_OTHER8,\n"+
                         "	QR_OTHER9,\n"+
                         "	QR_OTHER0,\n"+
                         "	QR_OTHER10,\n"+
                         "	QR_OTHER11,\n"+
                         "	QR_OTHER12,\n"+
                         "	QR_OTHER13,\n"+
                         "	QR_OTHER14,\n"+
                         "	QR_OTHER15,\n"+
                         "	QR_OTHER16,\n"+
                         "	QR_OTHER17,\n"+
                         "	QR_OTHER18,\n"+
                         "	QR_OTHER19,\n"+
                         "	QR_OTHER20,\n"+
                         "	QR_OTHER21,\n"+
                         "	QR_OTHER22,\n"+
                         "	QR_OTHER23,\n"+
                         "	QR_OTHER24,\n"+
                         "	QR_OTHER25,\n"+
                         "	PRINT_FLAG,\n"+
                         "	ENABLE_FLAG,\n"+
                         "	DELETE_FLAG,\n"+
                         "	REMARKS,\n"+
                         "	VERSION,\n"+
                         "	CREATE_DATE,\n"+
                         "	CREATE_USER,\n"+
                         "	UPDATE_DATE,\n"+
                         "	UPDATE_USER,\n"+
                         "	QR_OTHER26,\n"+
                         "	QR_OTHER27,\n"+
                         "	QR_OTHER28,\n"+
                         "	QR_OTHER29,\n"+
                         "	QR_OTHER30,\n"+
                         "	QR_OTHER31,\n"+
                         "	QR_OTHER32,\n"+
                         "	QR_OTHER33,\n"+
                         "	QR_OTHER34,\n"+
                         "	QR_OTHER35 \n"+
                         "FROM\n" +
                         "	a_bar_code_p \n"+
                         "WHERE\n" +
                         "	QR_TYPE = 5 \n"+
                         "	AND QR_BAR_CODE = '"+ BarCode + "' \n" +
                         "ORDER BY\n" +
                         "	QR_OTHER0,\n"+
                         "	QR_OTHER9";

            return(SQLerp.GetDataRow(sql));
        }