Просмотр исходного кода

美大编码规则更新及工单分配接口优化

hu 6 месяцев назад
Родитель
Сommit
9bf0384ea4

+ 3 - 3
src/custom/beans/accountbalance/Accountbalance.java

@@ -210,7 +210,7 @@ public class Accountbalance extends BaseClass {
     public static JSONObject createCashbillPay(DBConnect dbConnect, UserInfo userInfo, long sys_enterpriseid, long sa_accountclassid, CashbillEntity cashbillEntity, boolean ischeck) throws YosException {
         ArrayList<String> sqlList = new ArrayList<>();
         long sa_cashbillid = new BaseClass().createTableID("sa_cashbill");
-        String billcode = new BaseClass().createBillCode(userInfo.getSiteId(), "cashbill");
+        String billcode = new BaseClass().createBillCode(userInfo.getSiteId(), "cashbill1");
         SQLFactory sqlFactory = new SQLFactory(new Accountbalance(), "收支凭证新增");
         sqlFactory.addParameter("billno", billcode);
         sqlFactory.addParameter("sys_enterpriseid", sys_enterpriseid);
@@ -286,7 +286,7 @@ public class Accountbalance extends BaseClass {
     public static JSONObject createCashbillPay2(Controller controller, long sys_enterpriseid, long sa_accountclassid, CashbillEntity cashbillEntity, boolean ischeck) throws YosException {
         ArrayList<String> sqlList = new ArrayList<>();
         long sa_cashbillid = controller.createTableID("sa_cashbill");
-        String billcode = controller.createBillCode("cashbill");
+        String billcode = controller.createBillCode("cashbill1");
         SQLFactory sqlFactory = new SQLFactory(new Accountbalance(), "收支凭证新增");
         sqlFactory.addParameter("billno", billcode);
         sqlFactory.addParameter("sys_enterpriseid", sys_enterpriseid);
@@ -362,7 +362,7 @@ public class Accountbalance extends BaseClass {
     public static JSONObject createCashbillPay(Controller controller, long sys_enterpriseid, long sa_accountclassid, CashbillEntity cashbillEntity, boolean ischeck, Long sa_cashbillid_rebate) throws YosException {
         ArrayList<String> sqlList = new ArrayList<>();
         long sa_cashbillid = controller.createTableID("sa_cashbill");
-        String billcode = controller.createBillCode("cashbill");
+        String billcode = controller.createBillCode("cashbill1");
         SQLFactory sqlFactory = new SQLFactory(new Accountbalance(), "收支凭证新增");
         sqlFactory.addParameter("billno", billcode);
         sqlFactory.addParameter("sys_enterpriseid", sys_enterpriseid);

+ 1 - 1
src/custom/beans/order/Order.java

@@ -293,7 +293,7 @@ public class Order extends BaseClass {
 
     public static ArrayList<String> createRebateBillPay(Controller controller, CashbillEntity cashbillEntity, Long sys_enterpriseid, Long sa_cashbillid_rebate) throws YosException {
         Long sa_cashbillid = controller.createTableID("sa_cashbill");
-        String billcode = controller.createBillCode("cashbill");
+        String billcode = controller.createBillCode("cashbill1");
 
         Rows rows = controller.dbConnect.runSqlQuery("SELECT * from sa_cashbill WHERE sa_cashbillid = " + sa_cashbillid_rebate + "  and siteid = '" + controller.siteid + "'");
         Long sa_accountclassid = 0L;

+ 15 - 3
src/custom/restcontroller/sale/cashbill/cashbill.java

@@ -199,7 +199,7 @@ public class cashbill extends Controller {
                 for (Row row : rowssuc) {
                     SQLFactory sqlFactoryupload = new SQLFactory(this, "收支凭证新增");
                     sqlFactoryupload.addParameter("sa_cashbillid", sa_cashbillid[i]);
-                    sqlFactoryupload.addParameter("billno", createBillCode("cashbill"));
+
                     if (agentRowsMap.containsKey(row.getString("agentnum"))) {
                         sqlFactoryupload.addParameter("sys_enterpriseid", agentRowsMap.get(row.getString("agentnum")).get(0).getLong("sys_enterpriseid"));
                     } else {
@@ -212,8 +212,10 @@ public class cashbill extends Controller {
                     }
                     if (content.getString("type").equals("收入")) {
                         sqlFactoryupload.addParameter("type", 1);
+                        sqlFactoryupload.addParameter("billno", createBillCode("cashbill"));
                     } else {
                         sqlFactoryupload.addParameter("type", 0);
+                        sqlFactoryupload.addParameter("billno", createBillCode("cashbill1"));
                     }
                     sqlFactoryupload.addParameter("siteid", siteid);
                     sqlFactoryupload.addParameter("remarks", row.getString("remarks"));
@@ -304,7 +306,12 @@ public class cashbill extends Controller {
         Long type = content.getLong("type"); //收支类型(1:收;0:支)
         Long sys_enterpriseid = content.getLong("sys_enterpriseid");
         Long sa_accountclassid = content.getLong("sa_accountclassid");
-        String billcode = createBillCode("cashbill");
+        String billcode = "";
+        if(type==1){
+            billcode = createBillCode("cashbill");
+        }else{
+            billcode = createBillCode("cashbill1");
+        }
         String subclass = content.getStringValue("subclass");
         String class1 = content.getStringValue("class");
         String period = content.getStringValue("period");
@@ -1055,7 +1062,12 @@ public class cashbill extends Controller {
         sqlFactory.addParameter("userid", userid);
         sqlFactory.addParameter("username", username);
         sqlFactory.addParameter("sa_cashbillid", offsettingCashbillid);
-        sqlFactory.addParameter("billno", createBillCode("cashbill"));
+        if(rows.get(0).getLong("type")==1){
+            sqlFactory.addParameter("billno", createBillCode("cashbill"));
+        }else{
+            sqlFactory.addParameter("billno", createBillCode("cashbill1"));
+        }
+
         sqlFactory.addParameter("sys_enterpriseid", rows.get(0).getLong("sys_enterpriseid"));
         sqlFactory.addParameter("sa_accountclassid", rows.get(0).getLong("sa_accountclassid"));
         sqlFactory.addParameter("type", rows.get(0).getLong("type"));

+ 10 - 0
src/custom/restcontroller/sale/serviceorder/serviceorder.java

@@ -171,6 +171,8 @@ public class serviceorder extends Controller {
                          updateSQL.setDateValue("allocationdate");
                          updateSQL.setValue("allocationby", username);
                          sqlList.add(updateSQL.getSQL());
+                         sqlList.add(
+                                 DataContrlLog.createLog(this, "sa_serviceorder", sa_serviceorderid, "自动分配", "服务申请单自动分配成功").getSQL());
                      }else if(cityRowsMap.containsKey(rows.get(0).getString("city"))){
                          UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sa_serviceorder");
                          updateSQL.setUniqueid(sa_serviceorderid);
@@ -180,6 +182,8 @@ public class serviceorder extends Controller {
                          updateSQL.setDateValue("allocationdate");
                          updateSQL.setValue("allocationby", username);
                          sqlList.add(updateSQL.getSQL());
+                         sqlList.add(
+                                 DataContrlLog.createLog(this, "sa_serviceorder", sa_serviceorderid, "自动分配", "服务申请单自动分配成功").getSQL());
                      }else if(provinceRowsMap.containsKey(rows.get(0).getString("province"))){
                          UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sa_serviceorder");
                          updateSQL.setUniqueid(sa_serviceorderid);
@@ -189,6 +193,8 @@ public class serviceorder extends Controller {
                          updateSQL.setDateValue("allocationdate");
                          updateSQL.setValue("allocationby", username);
                          sqlList.add(updateSQL.getSQL());
+                         sqlList.add(
+                                 DataContrlLog.createLog(this, "sa_serviceorder", sa_serviceorderid, "自动分配", "服务申请单自动分配成功").getSQL());
                      }
                  }
              }
@@ -236,10 +242,14 @@ public class serviceorder extends Controller {
         updateSQL.setSiteid(siteid);
         updateSQL.setValue("status", "待受理");
         updateSQL.setValue("sys_enterpriseid_service", sys_enterpriseid);
+        updateSQL.setValue("refusereason", "");
+        updateSQL.setValue("refuseremarks", "");
         updateSQL.setDateValue("allocationdate");
         updateSQL.setValue("allocationby", username);
 
         dbConnect.runSqlUpdate(updateSQL.getSQL());
+        dbConnect.runSqlUpdate(
+                DataContrlLog.createLog(this, "sa_serviceorder", sa_serviceorderid, "手工分配", "服务申请单手工分配成功").getSQL());
         return getSucReturnObject().toString();
     }
 

+ 1 - 1
src/custom/restcontroller/webmanage/sale/aftersalesmag/aftersalesmag.java

@@ -535,7 +535,7 @@ public class aftersalesmag extends Controller {
         SQLFactory sqlFactoryupdate;
         if (ischeck) {
             InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "st_stockbill");
-            long st_stockbillid =  createTableID("st_stockbill");
+            long st_stockbillid =  createTableID("STOCKBILL8");
             insertSQL.setUniqueid(st_stockbillid);
             insertSQL.setSiteid(siteid);
             insertSQL.setValue("billno", createBillCode("stockbill"));

+ 3 - 3
src/custom/restcontroller/webmanage/sale/dbstockbill/dbstockbill.java

@@ -48,7 +48,7 @@ public class dbstockbill extends Controller {
             insertSQL.setValue("departmentid", departmentid);
             insertSQL.setValue("remarks", remarks);
             insertSQL.setValue("billdate", billdate);
-            insertSQL.setValue("billno", createBillCode("stockbill"));
+            insertSQL.setValue("billno", createBillCode("DBSTOCKBIL"));
             insertSQL.setValue("instockid", instockid);
             insertSQL.setValue("outstockid", outstockid);
 
@@ -255,7 +255,7 @@ public class dbstockbill extends Controller {
         long st_stockbillid =  createTableID("st_stockbill");
         insertSQL.setUniqueid(st_stockbillid);
         insertSQL.setSiteid(siteid);
-        insertSQL.setValue("billno", createBillCode("stockbill"));
+        insertSQL.setValue("billno", createBillCode("STOCKBILL1"));
         insertSQL.setValue("type", "其他出库");
         insertSQL.setValue("typemx", "调拨出库");
         insertSQL.setValue("sys_enterpriseid",0);
@@ -310,7 +310,7 @@ public class dbstockbill extends Controller {
              st_stockbillid =  createTableID("st_stockbill");
             insertSQL.setUniqueid(st_stockbillid);
             insertSQL.setSiteid(siteid);
-            insertSQL.setValue("billno", createBillCode("stockbill"));
+            insertSQL.setValue("billno", createBillCode("STOCKBILL2"));
             insertSQL.setValue("type", "其他入库");
             insertSQL.setValue("typemx", "调拨入库");
             insertSQL.setValue("rb", 1);

+ 1 - 1
src/custom/restcontroller/webmanage/sale/dbstockbill/dbstockbillreceive.java

@@ -110,7 +110,7 @@ public class dbstockbillreceive extends Controller {
         long st_stockbillid =  createTableID("st_stockbill");
         insertSQL.setUniqueid(st_stockbillid);
         insertSQL.setSiteid(siteid);
-        insertSQL.setValue("billno", createBillCode("stockbill"));
+        insertSQL.setValue("billno", createBillCode("STOCKBILL2"));
         insertSQL.setValue("type", "其他入库");
         insertSQL.setValue("typemx", "调拨入库");
         insertSQL.setValue("rb", 1);

+ 1 - 1
src/custom/restcontroller/webmanage/sale/expressform/expressform.java

@@ -97,7 +97,7 @@ public class expressform extends Controller {
             insertSQL.setValue("expresssdrid", expresssdrid);
             insertSQL.setValue("remarks", remarks);
             insertSQL.setValue("mailno", mailno);
-            insertSQL.setValue("txlogisticid", createBillCode("expressform"));
+            insertSQL.setValue("txlogisticid", createBillCode("logisticsbill"));
 
             insertSQL.setValue("createby", username);
             insertSQL.setDateValue("createdate");

+ 20 - 2
src/custom/restcontroller/webmanage/sale/stockbill/stockbill.java

@@ -93,7 +93,16 @@ public class stockbill extends Controller {
             insertSQL.setValue("rb", content.getString("rb"));
             insertSQL.setValue("remarks", remarks);
             insertSQL.setValue("billdate", billdate);
-            insertSQL.setValue("billno", createBillCode("stockbill"));
+            if(type.equals("销售出库")){
+                insertSQL.setValue("billno", createBillCode("stockbill"));
+            }else if (type.equals("其他出库单")){
+                insertSQL.setValue("billno", createBillCode("STOCKBILL1"));
+            }else if(type.equals("其他入库单")){
+                insertSQL.setValue("billno", createBillCode("STOCKBILL2"));
+            }else{
+                insertSQL.setValue("billno", createBillCode("stockbill"));
+            }
+
             insertSQL.setValue("outplace", outplace);
             insertSQL.setValue("delivery", delivery);
             insertSQL.setValue("invoice_enterprisename", invoice_enterprisename);
@@ -661,7 +670,16 @@ public class stockbill extends Controller {
         insertSQL.setValue("rb", 0);
         insertSQL.setValue("remarks", rows.get(0).getString("remarks"));
         insertSQL.setValue("billdate", getDateTime_Str());
-        insertSQL.setValue("billno", createBillCode("stockbill"));
+        if(rows.get(0).getString("type").equals("销售出库")){
+            insertSQL.setValue("billno", createBillCode("stockbill"));
+        }else  if(rows.get(0).getString("type").equals("其他出库")){
+            insertSQL.setValue("billno", createBillCode("STOCKBILL1"));
+        }else  if(rows.get(0).getString("type").equals("其他入库")){
+            insertSQL.setValue("billno", createBillCode("STOCKBILL2"));
+        }else{
+            insertSQL.setValue("billno", createBillCode("stockbill"));
+        }
+
         insertSQL.setValue("outplace", rows.get(0).getString("outplace"));
         insertSQL.setValue("delivery", rows.get(0).getString("delivery"));
         insertSQL.setValue("invoice_enterprisename", rows.get(0).getString("invoice_enterprisename"));

+ 4 - 4
src/custom/restcontroller/webmanage/sale/u8/u8.java

@@ -204,7 +204,7 @@ public class u8 extends Controller {
         insertSQL.setValue("remarks", "U8单据上传生成");
         insertSQL.setValue("billdate", u8.get(0).getString("billdate"));
         insertSQL.setValue("period",u8.get(0).getString("period"));
-        insertSQL.setValue("billno", createBillCode("stockbill"));
+        insertSQL.setValue("billno", createBillCode("STOCKBILL1"));
         insertSQL.setValue("isconfirm", 0);
         insertSQL.setValue("sourceobject", "u8");
         insertSQL.setValue("sourceid", u8id);
@@ -271,7 +271,7 @@ public class u8 extends Controller {
         insertSQL.setValue("remarks", "U8单据上传生成");
         insertSQL.setValue("billdate", u8.get(0).getString("billdate"));
         insertSQL.setValue("period",u8.get(0).getString("period"));
-        insertSQL.setValue("billno", createBillCode("stockbill"));
+        insertSQL.setValue("billno", createBillCode("STOCKBILL1"));
         insertSQL.setValue("isconfirm", 0);
         insertSQL.setValue("sourceobject", "u8");
         insertSQL.setValue("sourceid", u8id);
@@ -337,7 +337,7 @@ public class u8 extends Controller {
         insertSQL.setValue("remarks", "U8单据上传生成");
         insertSQL.setValue("billdate", u8.get(0).getString("billdate"));
         insertSQL.setValue("period",u8.get(0).getString("period"));
-        insertSQL.setValue("billno", createBillCode("stockbill"));
+        insertSQL.setValue("billno", createBillCode("STOCKBILL2"));
         insertSQL.setValue("isconfirm", 0);
         insertSQL.setValue("sourceobject", "u8");
         insertSQL.setValue("sourceid", u8id);
@@ -404,7 +404,7 @@ public class u8 extends Controller {
         insertSQL.setValue("remarks", "U8单据上传生成");
         insertSQL.setValue("billdate", u8.get(0).getString("billdate"));
         insertSQL.setValue("period",u8.get(0).getString("period"));
-        insertSQL.setValue("billno", createBillCode("stockbill"));
+        insertSQL.setValue("billno", createBillCode("STOCKBILL2"));
         insertSQL.setValue("isconfirm", 0);
         insertSQL.setValue("sourceobject", "u8");
         insertSQL.setValue("sourceid", u8id);