This commit is contained in:
JIAL 2024-03-13 10:07:51 +08:00
parent 55bff3692d
commit fb43fede78
3 changed files with 8 additions and 7 deletions

View File

@ -13,7 +13,7 @@ import com.ruoyi.material.domain.material;
import com.ruoyi.material.domain.temp;
import com.ruoyi.materialType.domain.CMaterialType;
import com.ruoyi.materialType.service.ICMaterialTypeService;
import com.ruoyi.web.utils.JDBCBatchInsert;
import com.ruoyi.web.utils.JDBCBatch;
import org.apache.commons.collections4.ListUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@ -727,8 +727,8 @@ public class CMaterialController extends BaseController
System.out.println("costs======================="+costs.size());
try {
JDBCBatchInsert.insertMaterialBatch(materials);
JDBCBatchInsert.insertCostBatch(costs);
JDBCBatch.insertMaterialBatch(materials);
JDBCBatch.insertCostBatch(costs);
}catch (Exception e) {
throw new Exception(e.getMessage(), e);
}

View File

@ -14,7 +14,7 @@ import java.util.List;
import java.util.Random;
@Component
public class JDBCBatchInsert {
public class JDBCBatch {
private static String databaseURL;
public static String getDatabaseURL() {
@ -23,7 +23,7 @@ public class JDBCBatchInsert {
@Value(value = "${spring.datasource.druid.quot.url}")
public void setDatabaseUR(String databaseURL) {
JDBCBatchInsert.databaseURL = databaseURL;
JDBCBatch.databaseURL = databaseURL;
}
private static String username;
@ -31,7 +31,7 @@ public class JDBCBatchInsert {
@Value(value = "${spring.datasource.druid.quot.username}")
public void setUsername(String username) {
JDBCBatchInsert.username = username;
JDBCBatch.username = username;
}
private static String password;
@ -41,7 +41,7 @@ public class JDBCBatchInsert {
@Value(value = "${spring.datasource.druid.quot.password}")
public void setPassword(String password) {
JDBCBatchInsert.password = password;
JDBCBatch.password = password;
}
public static void insertMaterialBatch(List<material> list) throws IOException {

View File

@ -516,6 +516,7 @@
<script>
import {queryMaterialListByParam, queryRedBCostByParams, queryRedBPriceByParams, queryRedBookVer } from "@/api/quote/quote";
import { getMaterial} from "@/api/material/material";
const commonRule = [
{ required: true, message: '不能为空值可填0', trigger: 'blur' },
{ pattern: /^(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,3})?$/, message: '格式有误,只能为数字格式', trigger: 'blur' }