This commit is contained in:
JIAL 2024-02-26 09:08:47 +08:00
commit b91aa221db
38 changed files with 1209 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -48,4 +48,9 @@ public class PageRedirectController {
public String redirectZM(){
return "zmquotation/index";
}
@GetMapping("/JN")
public String redirectJN(){
return "jnquotation/index";
}
}

View File

@ -1,7 +1,12 @@
package com.JN.demo.jnzmquatation.controller;
import com.JN.common.R;
import com.JN.demo.jnzmquatation.dto.JnInventoryDto;
import com.JN.demo.jnzmquatation.dto.JnMaterialDto;
import com.JN.demo.jnzmquatation.dto.JnRegionDto;
import com.JN.demo.jnzmquatation.service.JnInventoryService;
import com.JN.demo.jnzmquatation.service.JnMaterialService;
import com.JN.demo.jnzmquatation.service.JnRegionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@ -12,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @ClassName ZMController
* @ClassName JNController
* @Description TODO
* @Author JIAL
* @Date 2024/2/19 8:47
@ -22,7 +27,69 @@ import java.util.List;
@Slf4j
@RequestMapping("/jnquotation")
public class JNController {
@Autowired
JnRegionService regionService;
@Autowired
JnMaterialService materialService;
@Autowired
JnInventoryService inventoryService;
/**
* @title queryRegionList
* @description 查询地区列表信息
* @author JIAL
* @param: regionName
* @updateTime 2024/2/20 16:54
* @return: com.JN.common.R<java.util.List<com.JN.demo.zmquotation.dto.RegionDto>>
*/
@PostMapping("/regionList")
public R queryRegionList(@RequestParam("regionName") String regionName){
List<JnRegionDto> regionList = regionService.queryRegionListByName(regionName);
log.info("查询到的地区列表结果是:{}", regionList);
return R.success(regionList);
}
/**
* @title queryMaterialList
* @description 查询物料信息
* @author JIAL
* @param: precMaterialName
* @param: vagueMaterialName
* @param: vagueModel
* @updateTime 2024/2/20 16:54
* @return: com.JN.common.R<java.util.List<com.JN.demo.zmquotation.dto.MaterialDto>>
*/
@PostMapping("/materialList")
public R queryMaterialList(@RequestParam("precMaterialName") String precMaterialName,
@RequestParam("vagueMaterialName") String vagueMaterialName,
@RequestParam("vagueModel") String vagueModel) {
List<JnMaterialDto> materialList = materialService.queryMaterialListByParam(precMaterialName, vagueMaterialName, vagueModel);
/* Map<String, Object> result = new HashMap<>();
result.put("rows", materialList);
result.put("total", materialNum);*/
return R.success(materialList);
}
/**
* @title queryInventoryList
* @description 获取盘具列表
* @author JIAL
* @updateTime 2024/2/22 10:09
* @return: com.JN.common.R<java.util.List<com.JN.demo.zmquotation.dto.InventoryDto>>
*/
@PostMapping("/inventoryList")
public R queryInventoryList() {
List<JnInventoryDto> inventoryList = inventoryService.queryInventoryList();
return R.success(inventoryList);
}
}

View File

@ -0,0 +1,23 @@
package com.JN.demo.jnzmquatation.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName InventoryDto
* @Description TODO
* @Author JIAL
* @Date 2024/2/22 9:48
* @Version 1.0
*/
@Data
public class JnInventoryDto implements Serializable {
private static final long serialVersionUID = 1L;
private String inventory; //盘具名称
private String invDesc; //盘具描述
private String weighInv; //盘重
}

View File

@ -0,0 +1,51 @@
package com.JN.demo.jnzmquatation.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName MaterialDto
* @Description TODO
* @Author JIAL
* @Date 2024/2/20 16:42
* @Version 1.0
*/
@Data
public class JnMaterialDto implements Serializable {
private static final long serialVersionUID = 1L;
private String materialName; //物料名称
private String model; //型号
private String specification; //规格
private String voltage; //电压
private String standard; //标准
private String costPrice; //成本价
private String factoryPrice; //厂价
private String netVolume; //净种量(物料重量)
private String inventory; //盘具
private String weighInv; //盘重
private String matPrice; //材料价格(去掉铜铝后的价格)
private String totalCopperConsume; //铜导体总消耗
private String totalAluminumConsume; //铝导体总消耗
private String totalLHCost; //人工水电费合计
private String steamFee; //蒸汽费
private int quantity = 1; //数量默认为1
private int invItemCount = 1; //盘具数量默认1
}

View File

@ -0,0 +1,36 @@
package com.JN.demo.jnzmquatation.dto;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @ClassName RegionDto
* @Description TODO
* @Author JIAL
* @Date 2024/2/19 10:40
* @Version 1.0
*/
@Data
public class JnRegionDto implements Serializable {
private static final long serialVersionUID = 1L;
private String province;
private String city;
private String district;
private Integer kilometers;
private BigDecimal price01;
private BigDecimal price02;
private BigDecimal price03;
private BigDecimal price04;
private BigDecimal price05;
}

View File

@ -0,0 +1,24 @@
package com.JN.demo.jnzmquatation.mapper;
import com.JN.demo.jnzmquatation.dto.JnInventoryDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @ClassName InventoryMapper
* @Description TODO
* @Author JIAL
* @Date 2024/2/22 9:56
* @Version 1.0
*/
@Mapper
public interface JnInventoryMapper {
@Select("SELECT [cbpj_mc] as inventory,\n" +
" [cbpj_pzjd1] as inv_desc,\n" +
" [cbpj_zl] as weigh_inv\n" +
"FROM [zm_erp2].[dbo].[cb_cbpj]")
List<JnInventoryDto> queryInventoryList();
}

View File

@ -0,0 +1,44 @@
package com.JN.demo.jnzmquatation.mapper;
import com.JN.demo.jnzmquatation.dto.JnMaterialDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @ClassName MaterialMapper
* @Description TODO
* @Author JIAL
* @Date 2024/2/21 8:16
* @Version 1.0
*/
@Mapper
public interface JnMaterialMapper {
@Select(" SELECT [cb_name] as material_name\n" +
" ,[cb_cj] as factory_price\n" +
" ,[cb_cbj] as cost_price\n" +
" ,[cb_zl] as net_volume\n" +
" ,[cb_gspj] as inventory\n" +
" ,[cbpj_zl] as weigh_inv\n" +
" ,[CB_bz] as standard\n" +
" ,[cb_xx] as model\n" +
" ,[cb_gg] as specification\n" +
" ,[cb_dy] as voltage\n" +
" ,[cb_cljg] as mat_price\n" +
" ,[tdtjg] as total_copper_consume\n" +
" ,[ldtjg] as total_aluminum_consume\n" +
" ,[rgsdf] as total_l_h_cost\n" +
" ,[cb_zqf]as steam_fee\n" +
" ,ROW_NUMBER() OVER(Order by [cb_name]) AS RowId\n" +
" FROM [zm_erp2].[dbo].[view_cb_material]\n" +
" WHERE [cb_name] like '${precMaterialName}%' and [cb_name] like '%${vagueMaterialName}%' and [cb_gg] like '%${vagueModel}%'")
List<JnMaterialDto> queryMaterialListByParam(String precMaterialName, String vagueMaterialName, String vagueModel);
@Select(" SELECT \n" +
"\tCOUNT(*) AS total\n" +
" FROM [zm_erp2].[dbo].[view_cb_material]\n" +
" WHERE [cb_name] like '${precMaterialName}%' and [cb_name] like '%${vagueMaterialName}%' and [cb_gg] like '%${vagueModel}%'")
Integer queryMaterialListCount(String precMaterialName, String vagueMaterialName, String vagueModel);
}

View File

@ -0,0 +1,25 @@
package com.JN.demo.jnzmquatation.mapper;
import com.JN.demo.jnzmquatation.dto.JnRegionDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @ClassName RegionMapper
* @Description TODO
* @Author JIAL
* @Date 2024/2/19 10:47
* @Version 1.0
*/
@Mapper
public interface JnRegionMapper {
@Select("with temp as(\n" +
"select pz_place_uid_0,price_0t_5t,price_5t_10t,price_10t_25t,price_25t_100t,price_100t from c_pz_price where date_0=(select max(date_0) from c_pz_price) \n" +
") select distinct a.sheng_0 as province,a.shi_0 as city,a.qu_0 as district,a.km_0 as kilometers,\n" +
"b.price_0t_5t as price_01,b.price_5t_10t as price_02,b.price_10t_25t as price_03,b.price_25t_100t as price_04,b.price_100t as price_05\n" +
"from c_pz_place2019 a left join temp b on a.id_0 = b.pz_place_uid_0 where a.qu_0 not in \n" +
"('江阴市','金坛区','溧阳市','宜兴市') and (sheng_0 like '%${regionName}%' or shi_0 like '%${regionName}%' or qu_0 like '%${regionName}%')")
List<JnRegionDto> queryRegionListByName(String regionName);
}

View File

@ -0,0 +1,16 @@
package com.JN.demo.jnzmquatation.service;
import com.JN.demo.jnzmquatation.dto.JnInventoryDto;
import java.util.List;
/**
* @ClassName InventoryService
* @Description TODO
* @Author JIAL
* @Date 2024/2/22 9:55
* @Version 1.0
*/
public interface JnInventoryService {
List<JnInventoryDto> queryInventoryList();
}

View File

@ -0,0 +1,19 @@
package com.JN.demo.jnzmquatation.service;
import com.JN.demo.jnzmquatation.dto.JnMaterialDto;
import java.util.List;
/**
* @ClassName MaterialService
* @Description TODO
* @Author JIAL
* @Date 2024/2/21 8:15
* @Version 1.0
*/
public interface JnMaterialService {
List<JnMaterialDto> queryMaterialListByParam(String precMaterialName, String vagueMaterialName, String vagueModel);
Integer queryMaterialListCount(String precMaterialName, String vagueMaterialName, String vagueModel);
}

View File

@ -0,0 +1,17 @@
package com.JN.demo.jnzmquatation.service;
import com.JN.demo.jnzmquatation.dto.JnRegionDto;
import java.util.List;
/**
* @ClassName RegionService
* @Description TODO
* @Author JIAL
* @Date 2024/2/19 10:46
* @Version 1.0
*/
public interface JnRegionService {
List<JnRegionDto> queryRegionListByName(String regionName);
}

View File

@ -0,0 +1,35 @@
package com.JN.demo.jnzmquatation.service.impl;
import com.JN.demo.jnzmquatation.dto.JnInventoryDto;
import com.JN.demo.jnzmquatation.mapper.JnInventoryMapper;
import com.JN.demo.jnzmquatation.service.JnInventoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @ClassName InventoryServiceImpl
* @Description TODO
* @Author JIAL
* @Date 2024/2/22 9:55
* @Version 1.0
*/
@Service
public class JnInventoryServiceImpl implements JnInventoryService {
@Autowired
JnInventoryMapper inventoryMapper;
/**
* @title queryInventoryList
* @description 获取盘具列表
* @author JIAL
* @updateTime 2024/2/22 10:06
* @return: java.util.List<com.JN.demo.zmquotation.dto.InventoryDto>
*/
@Override
public List<JnInventoryDto> queryInventoryList() {
return inventoryMapper.queryInventoryList();
}
}

View File

@ -0,0 +1,52 @@
package com.JN.demo.jnzmquatation.service.impl;
import com.JN.demo.jnzmquatation.dto.JnMaterialDto;
import com.JN.demo.jnzmquatation.mapper.JnMaterialMapper;
import com.JN.demo.jnzmquatation.service.JnMaterialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @ClassName MaterialServiceImpl
* @Description TODO
* @Author JIAL
* @Date 2024/2/21 8:15
* @Version 1.0
*/
@Service
public class JnMaterialServiceImpl implements JnMaterialService {
@Autowired
JnMaterialMapper materialMapper;
/**
* @title queryMaterialListByParam
* @description 通过开头精确模糊查询型号三个参数来查询物料列表
* @author JIAL
* @param: precMaterialName
* @param: vagueMaterialName
* @param: vagueModel
* @updateTime 2024/2/21 8:23
* @return: java.util.List<com.JN.demo.zmquotation.dto.MaterialDto>
*/
@Override
public List<JnMaterialDto> queryMaterialListByParam(String precMaterialName, String vagueMaterialName, String vagueModel) {
return materialMapper.queryMaterialListByParam(precMaterialName, vagueMaterialName, vagueModel);
}
/**
* @title queryMaterialListCount
* @description 计算搜索的总数
* @author JIAL
* @param: precMaterialName
* @param: vagueMaterialName
* @param: vagueModel
* @updateTime 2024/2/24 14:36
* @return: java.lang.Integer
*/
@Override
public Integer queryMaterialListCount(String precMaterialName, String vagueMaterialName, String vagueModel) {
return materialMapper.queryMaterialListCount(precMaterialName, vagueMaterialName, vagueModel);
}
}

View File

@ -0,0 +1,36 @@
package com.JN.demo.jnzmquatation.service.impl;
import com.JN.demo.jnzmquatation.dto.JnRegionDto;
import com.JN.demo.jnzmquatation.mapper.JnRegionMapper;
import com.JN.demo.jnzmquatation.service.JnRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @ClassName RegionServiceImpl
* @Description TODO
* @Author JIAL
* @Date 2024/2/19 10:46
* @Version 1.0
*/
@Service
public class JnRegionServiceImpl implements JnRegionService {
@Autowired
JnRegionMapper regionMapper;
/**
* @title queryRegionListByName
* @description 根据输入的地区名称查询地区列表
* @author JIAL
* @param: regionName
* @updateTime 2024/2/19 10:59
* @return: java.util.List<com.JN.demo.zmquotation.dto.RegionDto>
*/
@Override
public List<JnRegionDto> queryRegionListByName(String regionName){
return regionMapper.queryRegionListByName(regionName);
}
}

View File

@ -0,0 +1,152 @@
.container {
}
.center-container {
text-align: center;
margin: auto;
padding: 10px;
min-width: 1100px;
}
.el-input {
}
/**找到表头那一行,然后把里面的复选框隐藏掉**/
.regionTable .el-table__header-wrapper .el-table__header .el-checkbox {
display: none;
}
.el-input__inner {
height: 30px;
/*font-family: Roboto, serif;*/
font-size: 12px;
line-height: 14px;
}
/**宽度修改 */
.el-select {
width: 129px;
}
/* 下面设置右侧按钮居中 */
.el-input__suffix {
top: 6px;
}
.el-input__icon {
line-height: inherit;
}
.el-input__suffix-inner {
margin-top: 10px;
}
.el-form-item__label {
min-width: 100px;
text-align: justify;
font-size: 12px;
}
.el-input-group{
margin-top: 6px;
}
.el-input-group__append {
width: 0px;
}
.el-form-item__label::after {
content: "";
display: inline-block;
width: 100%;
}
.form-box .el-form-item {
margin: 0px 15px 0px 15px;
}
.regionDialogTable .el-dialog__header{
padding-bottom: 0px;
}
.regionDialogTable .el-dialog__body{
padding-top: 0px;
}
.materialDialogTable .el-dialog__header{
padding-bottom: 0px;
}
.materialDialogTable .el-dialog__body{
padding-top: 0px;
}
.inventoryDialogTable .el-dialog__header{
padding-bottom: 0px;
}
.inventoryDialogTable .el-dialog__body{
padding-top: 0px;
}
.materialDialogTable .el-table__header-wrapper .el-table__header .el-checkbox {
display: none;
}
.el-table .cell {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.el-col {
height: 42px;
}
.button-box .el-button {
margin: 10px 80px 10px 0px;
}
.form-box {
background-color: #f0f0f0; /* 浅灰色背景 */
border-radius: 10px; /* 可以根据需要调整边框圆角 */
backdrop-filter: blur(10px); /* 调整模糊度 */
-webkit-backdrop-filter: blur(10px); /* 兼容性处理适用于一些WebKit浏览器 */
}
.button-box {
margin: 10px 0px 10px 0px;
background-color: #f0f0f0; /* 浅灰色背景 */
border-radius: 10px; /* 可以根据需要调整边框圆角 */
backdrop-filter: blur(10px); /* 调整模糊度 */
-webkit-backdrop-filter: blur(10px); /* 兼容性处理适用于一些WebKit浏览器 */
}
.table-box {
}
.selected-item {
background-color: #f0f0f0;
border: 1px solid #ccc;
border-radius: 5px;
padding: 5px;
margin-bottom: 5px;
display: flex;
justify-content: space-between;
}
.remove-btn {
padding: 0px;
color: red;
}

View File

@ -0,0 +1,22 @@
const queryRegionListByName = (params) => {
return $axios({
url: '/zmquotation/regionList',
method: 'post',
params
})
}
const queryMaterialListByParam = (params) => {
return $axios({
url: '/zmquotation/materialList',
method: 'post',
params
})
}
const queryInventoryList = () => {
return $axios({
url: '/zmquotation/inventoryList',
method: 'post',
})
}

View File

@ -706,6 +706,10 @@
// 其他逻辑
},
calculatedData() {
},
},
})
</script>

View File

@ -706,6 +706,10 @@
// 其他逻辑...
},
calculatedData() {
},
},
})
</script>

Binary file not shown.

View File

@ -0,0 +1,152 @@
.container {
}
.center-container {
text-align: center;
margin: auto;
padding: 10px;
min-width: 1100px;
}
.el-input {
}
/**找到表头那一行,然后把里面的复选框隐藏掉**/
.regionTable .el-table__header-wrapper .el-table__header .el-checkbox {
display: none;
}
.el-input__inner {
height: 30px;
/*font-family: Roboto, serif;*/
font-size: 12px;
line-height: 14px;
}
/**宽度修改 */
.el-select {
width: 129px;
}
/* 下面设置右侧按钮居中 */
.el-input__suffix {
top: 6px;
}
.el-input__icon {
line-height: inherit;
}
.el-input__suffix-inner {
margin-top: 10px;
}
.el-form-item__label {
min-width: 100px;
text-align: justify;
font-size: 12px;
}
.el-input-group{
margin-top: 6px;
}
.el-input-group__append {
width: 0px;
}
.el-form-item__label::after {
content: "";
display: inline-block;
width: 100%;
}
.form-box .el-form-item {
margin: 0px 15px 0px 15px;
}
.regionDialogTable .el-dialog__header{
padding-bottom: 0px;
}
.regionDialogTable .el-dialog__body{
padding-top: 0px;
}
.materialDialogTable .el-dialog__header{
padding-bottom: 0px;
}
.materialDialogTable .el-dialog__body{
padding-top: 0px;
}
.inventoryDialogTable .el-dialog__header{
padding-bottom: 0px;
}
.inventoryDialogTable .el-dialog__body{
padding-top: 0px;
}
.materialDialogTable .el-table__header-wrapper .el-table__header .el-checkbox {
display: none;
}
.el-table .cell {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.el-col {
height: 42px;
}
.button-box .el-button {
margin: 10px 80px 10px 0px;
}
.form-box {
background-color: #f0f0f0; /* 浅灰色背景 */
border-radius: 10px; /* 可以根据需要调整边框圆角 */
backdrop-filter: blur(10px); /* 调整模糊度 */
-webkit-backdrop-filter: blur(10px); /* 兼容性处理适用于一些WebKit浏览器 */
}
.button-box {
margin: 10px 0px 10px 0px;
background-color: #f0f0f0; /* 浅灰色背景 */
border-radius: 10px; /* 可以根据需要调整边框圆角 */
backdrop-filter: blur(10px); /* 调整模糊度 */
-webkit-backdrop-filter: blur(10px); /* 兼容性处理适用于一些WebKit浏览器 */
}
.table-box {
}
.selected-item {
background-color: #f0f0f0;
border: 1px solid #ccc;
border-radius: 5px;
padding: 5px;
margin-bottom: 5px;
display: flex;
justify-content: space-between;
}
.remove-btn {
padding: 0px;
color: red;
}

View File

@ -0,0 +1,22 @@
const queryRegionListByName = (params) => {
return $axios({
url: '/zmquotation/regionList',
method: 'post',
params
})
}
const queryMaterialListByParam = (params) => {
return $axios({
url: '/zmquotation/materialList',
method: 'post',
params
})
}
const queryInventoryList = () => {
return $axios({
url: '/zmquotation/inventoryList',
method: 'post',
})
}

View File

@ -706,6 +706,10 @@
// 其他逻辑
},
calculatedData() {
},
},
})
</script>

View File

@ -706,6 +706,10 @@
// 其他逻辑...
},
calculatedData() {
},
},
})
</script>