From 8244de84e7a10819b2ec86596c28b94ca9e2cce9 Mon Sep 17 00:00:00 2001 From: xd Date: Wed, 6 Mar 2024 19:47:59 +0800 Subject: [PATCH] 20240306 --- .../web/controller/system/SysUserController.java | 11 +++++++---- .../resources/mapper/material/CMaterialMapper.xml | 2 +- ruoyi-ui/src/views/material/material/index.vue | 4 +++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java index 2858f30..6e3475a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java @@ -13,7 +13,10 @@ import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.system.domain.cost; import com.ruoyi.system.domain.material; +import com.ruoyi.system.domain.temp; import com.ruoyi.system.service.*; +import com.ruoyi.web.Utils.batchInsert; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -83,7 +86,7 @@ public class SysUserController extends BaseController return getDataTable(list); } - @Log(title = "用户管理", businessType = BusinessType.EXPORT) + /*@Log(title = "用户管理", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('system:user:export')") @PostMapping("/export") public void export(HttpServletResponse response, SysUser user) @@ -91,7 +94,7 @@ public class SysUserController extends BaseController List list = userService.selectUserList(user); ExcelUtil util = new ExcelUtil(SysUser.class); util.exportExcel(response, list, "用户数据"); - } + }*/ @Log(title = "用户管理", businessType = BusinessType.IMPORT) @PreAuthorize("@ss.hasPermi('system:user:import')") @@ -310,7 +313,7 @@ public class SysUserController extends BaseController } /*===============================================测试====================================================*/ - /*@DataSource(DataSourceType.QUOT) + @DataSource(DataSourceType.QUOT) @Log(title = "用户管理", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('system:user:export')") @PostMapping("/export") @@ -882,7 +885,7 @@ public class SysUserController extends BaseController batchInsert.insertMaterialBatch(materials); batchInsert.insertCostBatch(costs); - }*/ + } @DataSource(DataSourceType.QUOT) public void insertMaterialBatch(List temp) { diff --git a/ruoyi-system/src/main/resources/mapper/material/CMaterialMapper.xml b/ruoyi-system/src/main/resources/mapper/material/CMaterialMapper.xml index cc5d2c4..276983f 100644 --- a/ruoyi-system/src/main/resources/mapper/material/CMaterialMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/material/CMaterialMapper.xml @@ -123,7 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into c_material_cost( cost_material_id, cost_cl_id, cost_cl_qty, cost_cl_qty_2) values - ( #{item.costMaterialId}, #{item.costClId}, #{item.costClQty}, #{item.costClQty2}) + ( #{item.costMaterialId}, #{item.costClId}, cast(#{item.costClQty} as decimal(18,4)), cast(#{item.costClQty2} as decimal(18,4))) diff --git a/ruoyi-ui/src/views/material/material/index.vue b/ruoyi-ui/src/views/material/material/index.vue index 0746dab..fe0d7f2 100644 --- a/ruoyi-ui/src/views/material/material/index.vue +++ b/ruoyi-ui/src/views/material/material/index.vue @@ -412,6 +412,7 @@ export default { getMaterial(materialId).then(response => { this.form = response.data; this.cMaterialCostList = response.data.cmaterialCostList; + console.log(response.data.cmaterialCostList) this.open = true; this.title = "修改物料管理"; this.getClMaterials(); @@ -423,7 +424,8 @@ export default { submitForm() { this.$refs["form"].validate(valid => { if (valid) { - this.form.cMaterialCostList = this.cMaterialCostList; + this.form.cmaterialCostList = this.cMaterialCostList; + console.log(this.form.cMaterialCostList) if (this.form.materialId != null) { updateMaterial(this.form).then(response => { this.$modal.msgSuccess("修改成功");