Exemple #1
0
        //导入
        public int import_base_ciqcode(JObject json, string ciq, string ciqname, string ENABLED, string remark, string yearid)
        {
            //停用人
            string stopman = "";

            FormsIdentity identity  = HttpContext.Current.User.Identity as FormsIdentity;
            string        userName  = identity.Name;
            JObject       json_user = Extension.Get_UserInfo(userName);

            if (ENABLED == "1")
            {
                stopman = "";
            }
            else
            {
                stopman = json_user.GetValue("ID").ToString();
            }
            string sql = @"insert into base_ciqcode(
                            id,
                            ciq,ciqname,enabled,createman,
                            stopman,createdate,
                            startdate,enddate,
                            yearid,remark) values(
                            base_ciq_id.nextval,
                            '{0}','{1}','{2}','{3}',
                            '{4}',sysdate,
                            to_date('{5}','yyyy/mm/dd hh24:mi:ss'),to_date('{6}','yyyy/mm/dd hh24:mi:ss'),
                            '{7}','{8}')";

            sql = String.Format(sql,
                                ciq, ciqname, ENABLED, json_user.GetValue("ID"),
                                stopman,
                                json.Value <string>("STARTDATE"), json.Value <string>("ENDDATE"),
                                yearid, remark
                                );

            int i = DBMgrBase.ExecuteNonQuery(sql);

            return(i);
        }
Exemple #2
0
        public void insert_rela_container(string CONTAINERSIZE, string CONTAINERTYPE, string FORMATCODE, string FORMATNAME, string CONTAINERHS, string ENABLED, string REMARK, string stopman, string STARTDATE, string ENDDATE)
        {
            FormsIdentity identity  = HttpContext.Current.User.Identity as FormsIdentity;
            string        userName  = identity.Name;
            JObject       json_user = Extension.Get_UserInfo(userName);
            string        sqlStr    = @"insert into rela_container (id,containersize,containertype,formatcode,formatname,containerhs,enabled,remark,createman,stopman,startdate,enddate,createdate)
                                         values (rela_container_id.nextval,'{0}','{1}','{2}','{3}','{4}','{5}','{6}',
                                         '{7}','{8}',to_date('{9}','yyyy-mm-dd hh24:mi:ss'),to_date('{10}','yyyy-mm-dd hh24:mi:ss'),sysdate)";

            sqlStr = string.Format(sqlStr, CONTAINERSIZE,
                                   CONTAINERTYPE,
                                   FORMATCODE,
                                   FORMATNAME,
                                   CONTAINERHS,
                                   ENABLED,
                                   REMARK,
                                   json_user.GetValue("ID"),
                                   stopman,
                                   STARTDATE,
                                   ENDDATE);
            int i = DBMgrBase.ExecuteNonQuery(sqlStr);
        }
Exemple #3
0
        //增添修改记录
        public int insert_base_alterrecord(JObject json, string content)
        {
            //Tabid
            string Tabid = json.Value <string>("ID");
            //TabKind
            int TabKind = (int)Base_YearKindEnum.Base_Year;
            //AlterMan(id)
            FormsIdentity identity  = HttpContext.Current.User.Identity as FormsIdentity;
            string        userName  = identity.Name;
            JObject       json_user = Extension.Get_UserInfo(userName);
            string        AlterMan  = json_user.GetValue("ID").ToString();
            //AlterDate数据库中的时间
            //Reason
            string Reason = json.Value <string>("REASON");
            //content
            string sql =
                @"insert into base_alterrecord(id,tabid,tabkind,alterman,reason,contentes,alterdate) values(base_alterrecord_id.nextval,'{0}','{1}','{2}','{3}','{4}',
                sysdate)";

            sql = string.Format(sql, Tabid, TabKind, AlterMan, Reason, content);
            return(DBMgrBase.ExecuteNonQuery(sql));
        }
Exemple #4
0
        //新增HS编码
        public int insert_base_insphs(JObject json, string yearid)
        {
            bcm.getCommonInformation(out stopman, out createman, out startdate, out enddate, json);
            string sql = @"insert into base_insphs(id,
                           hscode,hsname,weight,customregulatory,
                           yearid,num,createdate,startdate,
                           enddate,createman,stopman,enabled,
                           remark,inspectionregulatory,legalunit) values(base_insphs_id.nextval,
                           '{0}','{1}','{2}','{3}',
                           '{4}','{5}',sysdate,to_date('{6}','yyyy/mm/dd hh24:mi:ss'),
                           to_date('{7}','yyyy/mm/dd hh24:mi:ss'),'{8}','{9}','{10}',
                           '{11}','{12}','{13}')";

            sql = String.Format(sql,
                                json.Value <string>("HSCODE"), json.Value <string>("HSNAME"), json.Value <string>("WEIGHT"), json.Value <string>("CUSTOMREGULATORY"),
                                yearid, json.Value <string>("NUMNAME"), startdate,
                                enddate, createman, stopman, json.Value <string>("ENABLED"),
                                json.Value <string>("REMARK"), json.Value <string>("INSPECTIONREGULATORY"), json.Value <string>("LEGALUNITNAME"));
            int i = DBMgrBase.ExecuteNonQuery(sql);

            return(i);
        }
Exemple #5
0
        //更新HS编码
        public int update_base_insphs(JObject json, string yearid)
        {
            bcm.getCommonInformation(out stopman, out createman, out startdate, out enddate, json);
            string sql = @"update base_commodityhs set name='{0}',hscode='{1}',extracode='{2}',legalunit='{3}',secondunit='{4}',customregulatory='{5}',inspectionregulatory='{6}',
classcode='{7}',agreetaxfile='{8}',topprice='{9}',lowprice='{10}',generalrate='{11}',favorablerate='{12}',vatrate='{13}',startdate=to_date('{14}','yyyy/mm/dd hh24:mi:ss'),
enddate=to_date('{15}','yyyy/mm/dd hh24:mi:ss'),exportrebatrate='{16}',temprate='{17}',consumerate='{18}',exportrate='{19}',specialmark='{20}',elements='{21}',enabled = '{22}' where id='{23}'";

            sql = String.Format(sql,
                                json.Value <string>("NAME"), json.Value <string>("HSCODE"), json.Value <string>("EXTRACODE"), json.Value <string>("LEGALUNIT"), json.Value <string>("SECONDUNIT"),
                                json.Value <string>("CUSTOMREGULATORY"), json.Value <string>("INSPECTIONREGULATORY"), "", "", json.Value <string>("TOPPRICE"), json.Value <string>("LOWPRICE"), json.Value <string>("GENERALRATE"), json.Value <string>("FAVORABLERATE"), json.Value <string>("VATRATE"),
                                startdate, enddate, json.Value <string>("EXPORTREBATRATE"), json.Value <string>("TEMPRATE"), json.Value <string>("CONSUMERATE"), json.Value <string>("EXPORTRATE"), json.Value <string>("SPECIALMARK"), json.Value <string>("ELEMENTS"), json.Value <string>("ENABLED"), json.Value <string>("ID")
                                );

            string unit1 = "", unit2 = "";

            if (judgeNumOrWeight(json.Value <string>("LEGALUNIT")))//是重量
            {
                unit1 = json.Value <string>("LEGALUNIT");
                unit2 = json.Value <string>("SECONDUNIT");
            }
            else//是数量
            {
                unit1 = json.Value <string>("LEGALUNIT");
                unit2 = json.Value <string>("SECONDUNIT");
            }

            string sql_sub = @"update base_insphs set hsname='{0}',weight='{1}',num='{2}',customregulatory='{3}',inspectionregulatory='{4}',legalunit='{5}' ,remark='{6}' 
where hscode='{7}' and  extracode='{8}' and enabled=1 and yearid = '{9}'";

            sql_sub = String.Format(sql_sub, json.Value <string>("NAME"), unit1, unit2, json.Value <string>("CUSTOMREGULATORY"), json.Value <string>("INSPECTIONREGULATORY"), json.Value <string>("LEGALUNIT"), json.Value <string>("REMARK"),
                                    json.Value <string>("HSCODE"), json.Value <string>("EXTRACODE"), yearid);
            List <string> sqls = new List <string>();

            sqls.Add(sql);
            sqls.Add(sql_sub);
            int i = DBMgrBase.ExecuteNonQuery(sqls);

            return(i);
        }
Exemple #6
0
        //导入sql语句
        public int export_insert_base_company(string incode, string CODE, string INSPCODE, string NAME, string ENGLSHNAME, string GOODSLOCAL, string RECEIVERTYPE, string ENABLED, string REMARK, string STARTDATE, string ENDDATE, string DeclNature, string InspNature, string stopman, string SOCIALCREDITNO)
        {
            FormsIdentity identity  = HttpContext.Current.User.Identity as FormsIdentity;
            string        userName  = identity.Name;
            JObject       json_user = Extension.Get_UserInfo(userName);
            string        sql       = @"insert into base_company(id,
                                                    code,name,remark,enabled,createman,stopman,createdate,
                                                    startdate,enddate,englishname,declnature,incode,
                                                    inspcode,inspnature,goodslocal,receivertype,SOCIALCREDITNO
                                                    ) values(base_company_id.nextval,
                                                    '{0}','{1}','{2}','{3}','{4}','{5}',sysdate,
                                                    to_date('{6}','yyyy/mm/dd hh24:mi:ss'),to_date('{7}','yyyy/mm/dd hh24:mi:ss'),'{8}','{9}','{10}'
                                                    ,'{11}','{12}','{13}','{14}','{15}'
                                                    )";

            sql = String.Format(sql,
                                CODE, NAME, REMARK, ENABLED, json_user.GetValue("ID"), stopman,
                                STARTDATE, ENDDATE, ENGLSHNAME, DeclNature, incode
                                , INSPCODE, InspNature, GOODSLOCAL, RECEIVERTYPE, SOCIALCREDITNO);
            int i = DBMgrBase.ExecuteNonQuery(sql);

            return(i);
        }