This commit is contained in:
parent
55bff3692d
commit
fb43fede78
|
@ -13,7 +13,7 @@ import com.ruoyi.material.domain.material;
|
||||||
import com.ruoyi.material.domain.temp;
|
import com.ruoyi.material.domain.temp;
|
||||||
import com.ruoyi.materialType.domain.CMaterialType;
|
import com.ruoyi.materialType.domain.CMaterialType;
|
||||||
import com.ruoyi.materialType.service.ICMaterialTypeService;
|
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.apache.commons.collections4.ListUtils;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -727,8 +727,8 @@ public class CMaterialController extends BaseController
|
||||||
System.out.println("costs======================="+costs.size());
|
System.out.println("costs======================="+costs.size());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
JDBCBatchInsert.insertMaterialBatch(materials);
|
JDBCBatch.insertMaterialBatch(materials);
|
||||||
JDBCBatchInsert.insertCostBatch(costs);
|
JDBCBatch.insertCostBatch(costs);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
throw new Exception(e.getMessage(), e);
|
throw new Exception(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class JDBCBatchInsert {
|
public class JDBCBatch {
|
||||||
|
|
||||||
private static String databaseURL;
|
private static String databaseURL;
|
||||||
public static String getDatabaseURL() {
|
public static String getDatabaseURL() {
|
||||||
|
@ -23,7 +23,7 @@ public class JDBCBatchInsert {
|
||||||
|
|
||||||
@Value(value = "${spring.datasource.druid.quot.url}")
|
@Value(value = "${spring.datasource.druid.quot.url}")
|
||||||
public void setDatabaseUR(String databaseURL) {
|
public void setDatabaseUR(String databaseURL) {
|
||||||
JDBCBatchInsert.databaseURL = databaseURL;
|
JDBCBatch.databaseURL = databaseURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String username;
|
private static String username;
|
||||||
|
@ -31,7 +31,7 @@ public class JDBCBatchInsert {
|
||||||
|
|
||||||
@Value(value = "${spring.datasource.druid.quot.username}")
|
@Value(value = "${spring.datasource.druid.quot.username}")
|
||||||
public void setUsername(String username) {
|
public void setUsername(String username) {
|
||||||
JDBCBatchInsert.username = username;
|
JDBCBatch.username = username;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String password;
|
private static String password;
|
||||||
|
@ -41,7 +41,7 @@ public class JDBCBatchInsert {
|
||||||
|
|
||||||
@Value(value = "${spring.datasource.druid.quot.password}")
|
@Value(value = "${spring.datasource.druid.quot.password}")
|
||||||
public void setPassword(String password) {
|
public void setPassword(String password) {
|
||||||
JDBCBatchInsert.password = password;
|
JDBCBatch.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void insertMaterialBatch(List<material> list) throws IOException {
|
public static void insertMaterialBatch(List<material> list) throws IOException {
|
|
@ -516,6 +516,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {queryMaterialListByParam, queryRedBCostByParams, queryRedBPriceByParams, queryRedBookVer } from "@/api/quote/quote";
|
import {queryMaterialListByParam, queryRedBCostByParams, queryRedBPriceByParams, queryRedBookVer } from "@/api/quote/quote";
|
||||||
|
import { getMaterial} from "@/api/material/material";
|
||||||
const commonRule = [
|
const commonRule = [
|
||||||
{ required: true, message: '不能为空值,可填0', trigger: 'blur' },
|
{ required: true, message: '不能为空值,可填0', trigger: 'blur' },
|
||||||
{ pattern: /^(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,3})?$/, message: '格式有误,只能为数字格式', trigger: 'blur' }
|
{ pattern: /^(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,3})?$/, message: '格式有误,只能为数字格式', trigger: 'blur' }
|
||||||
|
|
Loading…
Reference in New Issue