Merge branch 'master' of http://47.115.223.229:8888/yangjun/hldy_java_monomer
# Conflicts: # nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/employees/mapper/EmployeesOrgMapper.java # nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/employees/mapper/xml/EmployeesOrgMapper.xml # nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/employees/service/IEmployeesOrgService.java
This commit is contained in:
commit
fd5d67f3ee
|
|
@ -2,13 +2,11 @@ package com.nu.modules.suppliers;
|
|||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nu.dto.SuppliersMaterialInfoDto;
|
||||
import com.nu.entity.NuBillEntity;
|
||||
import com.nu.entity.SuppliersApplyEntity;
|
||||
import com.nu.entity.SuppliersOrgAllEntity;
|
||||
import com.nu.entity.SuppliersOrgEntity;
|
||||
import com.nu.entity.*;
|
||||
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ISuppliersApi {
|
||||
|
||||
|
|
@ -37,4 +35,17 @@ public interface ISuppliersApi {
|
|||
SuppliersApplyEntity getSupInfoByApplyId(String id);
|
||||
|
||||
SuppliersApplyEntity getShowInfoByOpenId(String openId);
|
||||
|
||||
List<SysDepartEntity> getSuppliersOrgInfoByOpenId(String openId);
|
||||
|
||||
List<SuppliersMaterialTypeEntity> getSuppliersMaterialType(String orgCode,String suppliersId);
|
||||
|
||||
IPage<SuppliersMaterialInfoDto> getSuppliersMaterialInfo(String orgCode, String materialTypeId,String suppliersId,Integer pageNo,Integer pageSize);
|
||||
|
||||
List<Map<String,Object>> getSuppliersMaterialTypeByCondition(String orgCode, String suppliersId);
|
||||
|
||||
List<SuppliersMaterialInfoDto> addSuppliersMaterialInfo(String orgCode,String suppliersId,List<SuppliersMaterialInfoDto> suppliersMaterialInfoDtos);
|
||||
|
||||
SuppliersMaterialInfoDto editSuppliersMaterialInfo(SuppliersMaterialInfoDto suppliersMaterialInfoDtos);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ public class NuBizAllMaterialInfoController extends JeecgController<NuBizAllMate
|
|||
|
||||
|
||||
@GetMapping("/exportXls")
|
||||
public void exportXls(NuBizAllMaterialInfo nuBizAllMaterialInfo,HttpServletResponse response) {
|
||||
public void exportXls(NuBizAllMaterialInfo nuBizAllMaterialInfo,HttpServletResponse response) throws IOException {
|
||||
nuBizAllMaterialInfoService.exportExcel(nuBizAllMaterialInfo,response);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.nu.modules.allMaterialInfo.entity.NuBizAllMaterialInfo;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @Description: 物料信息汇总
|
||||
|
|
@ -13,5 +14,5 @@ import javax.servlet.http.HttpServletResponse;
|
|||
*/
|
||||
public interface INuBizAllMaterialInfoService extends IService<NuBizAllMaterialInfo> {
|
||||
|
||||
void exportExcel(NuBizAllMaterialInfo nuBizAllMaterialInfo,HttpServletResponse response);
|
||||
void exportExcel(NuBizAllMaterialInfo nuBizAllMaterialInfo,HttpServletResponse response) throws IOException;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.nu.modules.allMaterialInfo.service.impl;
|
||||
|
||||
import com.aliyun.core.utils.IOUtils;
|
||||
import com.nu.modules.allMaterialInfo.entity.NuBizAllMaterialInfo;
|
||||
import com.nu.modules.allMaterialInfo.mapper.NuBizAllMaterialInfoMapper;
|
||||
import com.nu.modules.allMaterialInfo.service.INuBizAllMaterialInfoService;
|
||||
|
|
@ -23,7 +24,12 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
|
|
@ -37,7 +43,7 @@ import java.util.List;
|
|||
public class NuBizAllMaterialInfoServiceImpl extends ServiceImpl<NuBizAllMaterialInfoMapper, NuBizAllMaterialInfo> implements INuBizAllMaterialInfoService {
|
||||
|
||||
@Override
|
||||
public void exportExcel(NuBizAllMaterialInfo nuBizAllMaterialInfo,HttpServletResponse response) {
|
||||
public void exportExcel(NuBizAllMaterialInfo nuBizAllMaterialInfo,HttpServletResponse response) throws IOException {
|
||||
// 1. 查询数据
|
||||
QueryWrapper<NuBizAllMaterialInfo> queryWrapper = new QueryWrapper<>();
|
||||
List<NuBizAllMaterialInfo> dataList = baseMapper.selectList(queryWrapper);
|
||||
|
|
@ -82,37 +88,128 @@ public class NuBizAllMaterialInfoServiceImpl extends ServiceImpl<NuBizAllMateria
|
|||
// 创建可编辑样式
|
||||
CellStyle unlockedStyleRed = workbook.createCellStyle();
|
||||
unlockedStyleRed.setLocked(false);
|
||||
// unlockedStyleRed.setBorderBottom(BorderStyle.THIN);
|
||||
// unlockedStyleRed.setBorderTop(BorderStyle.THIN);
|
||||
// unlockedStyleRed.setBorderLeft(BorderStyle.THIN);
|
||||
// unlockedStyleRed.setBorderRight(BorderStyle.THIN);
|
||||
// unlockedStyleRed.setAlignment(HorizontalAlignment.CENTER);
|
||||
// unlockedStyleRed.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
// 创建红色字体
|
||||
Font redFont = workbook.createFont();
|
||||
redFont.setColor(IndexedColors.RED.getIndex()); // 设置字体颜色为红色
|
||||
// 可选:设置字体大小、加粗等
|
||||
// redFont.setFontHeightInPoints((short) 12);
|
||||
// redFont.setBold(true);
|
||||
|
||||
// 将红色字体应用到样式
|
||||
unlockedStyleRed.setFont(redFont);
|
||||
|
||||
// 6. 创建大标题行(第1行)
|
||||
Row titleOneRow = sheet.createRow(0);
|
||||
Cell materialTitleCellRow = titleOneRow.createCell(0);
|
||||
materialTitleCellRow.setCellValue("供应商物料列表");
|
||||
materialTitleCellRow.setCellStyle(lockedStyle);
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 6)); // 合并 B1:G1
|
||||
// 创建加粗字体
|
||||
Font boldFont = workbook.createFont();
|
||||
boldFont.setBold(true);
|
||||
|
||||
//创建加粗样式
|
||||
CellStyle boldUnlockedStyle = workbook.createCellStyle();
|
||||
boldUnlockedStyle.cloneStyleFrom(unlockedStyle); // 从原有样式克隆
|
||||
boldUnlockedStyle.setFont(boldFont); // 应用加粗字体
|
||||
boldUnlockedStyle.setLocked(false);
|
||||
boldUnlockedStyle.setBorderBottom(BorderStyle.THIN);
|
||||
boldUnlockedStyle.setBorderTop(BorderStyle.THIN);
|
||||
boldUnlockedStyle.setBorderLeft(BorderStyle.THIN);
|
||||
boldUnlockedStyle.setBorderRight(BorderStyle.THIN);
|
||||
|
||||
Font boldFont3 = workbook.createFont();
|
||||
boldFont3.setBold(true);
|
||||
boldFont3.setFontHeightInPoints((short) 20);
|
||||
//创建加粗样式字体放大
|
||||
CellStyle boldUnlockedStyle2 = workbook.createCellStyle();
|
||||
boldUnlockedStyle2.cloneStyleFrom(unlockedStyle); // 从原有样式克隆
|
||||
boldUnlockedStyle2.setFont(boldFont3); // 应用加粗字体
|
||||
boldUnlockedStyle2.setLocked(false);
|
||||
boldUnlockedStyle2.setBorderBottom(BorderStyle.THIN);
|
||||
boldUnlockedStyle2.setBorderTop(BorderStyle.THIN);
|
||||
boldUnlockedStyle2.setBorderLeft(BorderStyle.THIN);
|
||||
boldUnlockedStyle2.setBorderRight(BorderStyle.THIN);
|
||||
|
||||
|
||||
//------------------------插入第一行图片----------------
|
||||
// 创建行和合并单元格
|
||||
Row titleOneRow = sheet.createRow(0);
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 1)); // 合并A1:B1
|
||||
//创建单元格(不设置文字,因为要插入图片)
|
||||
Cell materialTitleCellRow = titleOneRow.createCell(0);
|
||||
materialTitleCellRow.setCellStyle(unlockedStyle);
|
||||
titleOneRow.setHeightInPoints(60.0f);
|
||||
//调用插入图片方法
|
||||
insertImageToCell(sheet, workbook, 0, 0, 2, 1, "https://www.focusnu.com/media/directive/showLogo.png");
|
||||
//------------------------插入第一行图片----------------
|
||||
|
||||
|
||||
//------------------------插入第一行文字----------------
|
||||
Cell materialTitleCellRow2 = titleOneRow.createCell(2);
|
||||
materialTitleCellRow2.setCellValue("XX机构物料合作订购表");
|
||||
materialTitleCellRow2.setCellStyle(boldUnlockedStyle2);
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 2, 6)); // 合并
|
||||
//------------------------插入第一行文字----------------
|
||||
|
||||
|
||||
//------------------------插入第一行说明文字----------------
|
||||
// 添加说明文字
|
||||
CellStyle unlockedStyleShuoming = workbook.createCellStyle();
|
||||
unlockedStyleShuoming.setLocked(false);
|
||||
unlockedStyleShuoming.setBorderBottom(BorderStyle.THIN);
|
||||
unlockedStyleShuoming.setBorderTop(BorderStyle.THIN);
|
||||
unlockedStyleShuoming.setBorderLeft(BorderStyle.THIN);
|
||||
unlockedStyleShuoming.setBorderRight(BorderStyle.THIN);
|
||||
unlockedStyleShuoming.setVerticalAlignment(VerticalAlignment.TOP);
|
||||
// 创建红色字体
|
||||
Font redFont2 = workbook.createFont();
|
||||
redFont2.setColor(IndexedColors.RED.getIndex()); // 设置字体颜色为红色
|
||||
unlockedStyleShuoming.setFont(redFont2);
|
||||
Cell materialTitleCellRow3 = titleOneRow.createCell(7);
|
||||
|
||||
// 创建普通字体
|
||||
Font normalFont = workbook.createFont();
|
||||
normalFont.setColor(IndexedColors.RED.getIndex());
|
||||
// 创建富文本
|
||||
RichTextString richText = workbook.getCreationHelper().createRichTextString(
|
||||
"模板导入说明:\n" +
|
||||
" 1、A列:选择 \"是\":表示该供应商可提供此货品;选择 \"否\":表示该供应商不供应此货品。\n" +
|
||||
" 2、B列、C列、D列、E列:为系统预设基础数据,不可编辑修改,用于统一物料标准。\n" +
|
||||
" 3、F列、G列:a、销售单价:请填写数字,保留 2 位小数,单位:元;b、销售单位:请填写实际供货包装单位, 如 \"包、箱、支、片\" 等,确保与实际供货包装一致。\n" +
|
||||
" 4、模板保存:模板文件请以 \"供应商名称 + 物料列表\" 的格式命名保存。"
|
||||
);
|
||||
|
||||
Font boldFont2 = workbook.createFont();
|
||||
boldFont2.setBold(true);
|
||||
boldFont2.setColor(IndexedColors.RED.getIndex());
|
||||
// 只设置"模板导入说明:"为加粗
|
||||
richText.applyFont(0, 6, boldFont2); // "模板导入说明:"的前6个字符加粗
|
||||
richText.applyFont(6, richText.length(), normalFont); // 其余文字普通字体
|
||||
materialTitleCellRow3.setCellValue(richText);
|
||||
|
||||
// 创建或获取一个样式,并设置自动换行
|
||||
CellStyle wrappedStyle = workbook.createCellStyle();
|
||||
wrappedStyle.cloneStyleFrom(unlockedStyleShuoming); // 从你原有样式克隆
|
||||
wrappedStyle.setWrapText(true); // 关键:设置自动换行
|
||||
// 将样式应用到单元格
|
||||
materialTitleCellRow3.setCellStyle(wrappedStyle);
|
||||
// 合并区域
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 6, 7, 12));
|
||||
//------------------------插入第一行说明文字----------------
|
||||
|
||||
|
||||
//------------------------插入第二行文字----------------
|
||||
Row titleRow = sheet.createRow(1);
|
||||
Cell materialTitleCell = titleRow.createCell(0);
|
||||
materialTitleCell.setCellStyle(boldUnlockedStyle);
|
||||
materialTitleCell.setCellValue("供应商名称:");
|
||||
materialTitleCell.setCellStyle(lockedStyle);
|
||||
Cell materialTitleCell2 = titleRow.createCell(1);
|
||||
materialTitleCell2.setCellValue("请填写供应商名称");
|
||||
materialTitleCell2.setCellStyle(unlockedStyleRed);
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 1, 5)); // 合并 B1:G1
|
||||
materialTitleCell2.setCellStyle(boldUnlockedStyle);
|
||||
materialTitleCell2.setCellValue("");
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 1, 2)); // 合并
|
||||
Cell materialTitleCell3 = titleRow.createCell(3);
|
||||
materialTitleCell3.setCellStyle(boldUnlockedStyle);
|
||||
materialTitleCell3.setCellValue("联系人");
|
||||
Cell materialTitleCell4 = titleRow.createCell(4);
|
||||
materialTitleCell4.setCellStyle(boldUnlockedStyle);
|
||||
materialTitleCell4.setCellValue("");
|
||||
Cell materialTitleCell5 = titleRow.createCell(5);
|
||||
materialTitleCell5.setCellStyle(boldUnlockedStyle);
|
||||
materialTitleCell5.setCellValue("联系电话");
|
||||
Cell materialTitleCell6 = titleRow.createCell(6);
|
||||
materialTitleCell6.setCellStyle(boldUnlockedStyle);
|
||||
materialTitleCell6.setCellValue("");
|
||||
titleRow.setHeightInPoints(30.0f);
|
||||
//------------------------插入第二行文字----------------
|
||||
|
||||
// 7. 创建列名行(第2行)
|
||||
Row headerRow = sheet.createRow(2);
|
||||
|
|
@ -122,6 +219,7 @@ public class NuBizAllMaterialInfoServiceImpl extends ServiceImpl<NuBizAllMateria
|
|||
cell.setCellValue(headers[i]);
|
||||
cell.setCellStyle(lockedStyle);
|
||||
}
|
||||
headerRow.setHeightInPoints(20.0f);
|
||||
|
||||
// 8. 填充数据(从第3行开始)
|
||||
int rowNum = 3;
|
||||
|
|
@ -138,18 +236,17 @@ public class NuBizAllMaterialInfoServiceImpl extends ServiceImpl<NuBizAllMateria
|
|||
// 第5-6列:销售单价、销售单位 - 可编辑
|
||||
setCellValueWithStyle(row, 5, info.getSalesUnitPrice(), unlockedStyle);
|
||||
setCellValueWithStyle(row, 6, info.getSalesUnit(), unlockedStyle);
|
||||
// 第7列:是否提供 - 可编辑
|
||||
// setCellValueWithStyle(row, 6, info.getIsSftg(), unlockedStyle);
|
||||
row.setHeightInPoints(20.0f);
|
||||
}
|
||||
|
||||
// 9. 设置列宽
|
||||
int[] colWidths = {5000, 10000, 7000, 7000,10000, 5000, 5000};
|
||||
int[] colWidths = {5000, 5000, 5000, 5000,5000, 5000, 5000};
|
||||
for (int i = 0; i < colWidths.length; i++) {
|
||||
sheet.setColumnWidth(i, colWidths[i]);
|
||||
}
|
||||
|
||||
// 10. 冻结前两行(大标题 + 列名)
|
||||
sheet.createFreezePane(0, 2, 0, 2);
|
||||
// sheet.createFreezePane(0, 2, 0, 2);
|
||||
|
||||
// 11. 设置“是否提供”列为下拉选(第7列,index=6)
|
||||
String[] options = {"是", "否"};
|
||||
|
|
@ -180,6 +277,101 @@ public class NuBizAllMaterialInfoServiceImpl extends ServiceImpl<NuBizAllMateria
|
|||
}
|
||||
}
|
||||
|
||||
// 修改插入图片方法,支持URL路径
|
||||
public static void insertImageToCell(Sheet sheet, Workbook workbook,
|
||||
int startCol, int startRow,
|
||||
int endCol, int endRow,
|
||||
String imagePathOrUrl) throws IOException {
|
||||
|
||||
byte[] imageBytes;
|
||||
|
||||
// 判断是URL还是本地路径
|
||||
if (imagePathOrUrl.startsWith("http://") || imagePathOrUrl.startsWith("https://")) {
|
||||
// 处理线上图片URL
|
||||
imageBytes = downloadImageFromUrl(imagePathOrUrl);
|
||||
} else {
|
||||
// 处理本地图片路径
|
||||
FileInputStream fis = new FileInputStream(imagePathOrUrl);
|
||||
imageBytes = IOUtils.toByteArray(fis);
|
||||
fis.close();
|
||||
}
|
||||
|
||||
// 确定图片类型
|
||||
int pictureType = getPictureType(imagePathOrUrl);
|
||||
|
||||
// 添加图片到工作簿
|
||||
int pictureIdx = workbook.addPicture(imageBytes, pictureType);
|
||||
|
||||
// 创建绘图工具
|
||||
Drawing<?> drawing = sheet.createDrawingPatriarch();
|
||||
|
||||
// 创建锚点
|
||||
ClientAnchor anchor = workbook.getCreationHelper().createClientAnchor();
|
||||
anchor.setCol1(startCol); // 起始列
|
||||
anchor.setRow1(startRow); // 起始行
|
||||
anchor.setCol2(endCol); // 结束列(不包含)
|
||||
anchor.setRow2(endRow); // 结束行(不包含)
|
||||
|
||||
// 插入图片
|
||||
Picture picture = drawing.createPicture(anchor, pictureIdx);
|
||||
}
|
||||
|
||||
// 从URL下载图片的方法
|
||||
private static byte[] downloadImageFromUrl(String imageUrl) throws IOException {
|
||||
try {
|
||||
// 使用Java内置的HttpURLConnection
|
||||
URL url = new URL(imageUrl);
|
||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
connection.setRequestMethod("GET");
|
||||
connection.setConnectTimeout(10000); // 10秒连接超时
|
||||
connection.setReadTimeout(30000); // 30秒读取超时
|
||||
|
||||
// 检查响应码
|
||||
int responseCode = connection.getResponseCode();
|
||||
if (responseCode != HttpURLConnection.HTTP_OK) {
|
||||
throw new IOException("HTTP请求失败,响应码: " + responseCode);
|
||||
}
|
||||
|
||||
// 读取图片数据
|
||||
try (InputStream inputStream = connection.getInputStream();
|
||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
|
||||
|
||||
byte[] buffer = new byte[8192];
|
||||
int bytesRead;
|
||||
while ((bytesRead = inputStream.read(buffer)) != -1) {
|
||||
outputStream.write(buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
return outputStream.toByteArray();
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new IOException("下载图片失败: " + imageUrl, e);
|
||||
}
|
||||
}
|
||||
|
||||
// 根据URL或路径确定图片类型
|
||||
private static int getPictureType(String path) {
|
||||
String lowerPath = path.toLowerCase();
|
||||
|
||||
if (lowerPath.endsWith(".png")) {
|
||||
return Workbook.PICTURE_TYPE_PNG;
|
||||
} else if (lowerPath.endsWith(".jpg") || lowerPath.endsWith(".jpeg")) {
|
||||
return Workbook.PICTURE_TYPE_JPEG;
|
||||
} else if (lowerPath.endsWith(".bmp") || lowerPath.endsWith(".dib")) {
|
||||
return Workbook.PICTURE_TYPE_DIB;
|
||||
} else if (lowerPath.endsWith(".emf")) {
|
||||
return Workbook.PICTURE_TYPE_EMF;
|
||||
} else if (lowerPath.endsWith(".wmf")) {
|
||||
return Workbook.PICTURE_TYPE_WMF;
|
||||
} else if (lowerPath.endsWith(".gif")) {
|
||||
return Workbook.PICTURE_TYPE_JPEG; // POI不支持GIF,转换为JPEG
|
||||
} else {
|
||||
// 默认或从Content-Type判断
|
||||
return Workbook.PICTURE_TYPE_JPEG;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置单元格值并应用样式
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -79,4 +79,6 @@ public class NuBizSuppliersMaterialInfo implements Serializable {
|
|||
@Excel(name = "销售单位", width = 15)
|
||||
@ApiModelProperty(value = "销售单位")
|
||||
private java.lang.String salesUnit;
|
||||
private java.lang.String orgCode;
|
||||
private java.lang.String manufacturer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.entity.SuppliersApplyEntity;
|
||||
import com.nu.entity.SuppliersOrgAllEntity;
|
||||
import com.nu.dto.SuppliersMaterialInfoDto;
|
||||
import com.nu.entity.*;
|
||||
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersApply;
|
||||
|
|
@ -30,4 +30,12 @@ public interface NuBizSuppliersApplyMapper extends BaseMapper<NuBizSuppliersAppl
|
|||
IPage<NuBizSuppliersApply> listPage(Page<NuBizSuppliersApply> page, @Param(Constants.WRAPPER) QueryWrapper<NuBizSuppliersApply> queryWrapper);
|
||||
|
||||
SuppliersApplyEntity getShowInfoByOpenId(@Param("openId") String openId);
|
||||
|
||||
List<SysDepartEntity> getSuppliersOrgInfoByOpenId(@Param("openId") String openId);
|
||||
|
||||
List<SuppliersMaterialTypeEntity> getSuppliersMaterialType(@Param("suppliersId") String suppliersId);
|
||||
|
||||
IPage<SuppliersMaterialInfoDto> getSuppliersMaterialInfo(@Param("materialTypeId")String materialTypeId,@Param("suppliersId")String suppliersId,IPage<SuppliersMaterialInfoDto> page);
|
||||
|
||||
List<SuppliersMaterialTypeEntity> getCategoryList(@Param("suppliersId")String suppliersId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,4 +19,5 @@ public interface NuBizSuppliersMaterialInfoMapper extends BaseMapper<NuBizSuppli
|
|||
List<NuBizSuppliersMaterialInfo> noList(@Param("list") List<NuBizSuppliersMaterialInfo> list);
|
||||
|
||||
IPage<SuppliersMaterialInfoDto> getSuppliersWlInfo(IPage<SuppliersMaterialInfoDto> page, @Param("title") String title, @Param("suppliersId") String suppliersId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,4 +166,30 @@
|
|||
AND iz_history = 'N'
|
||||
AND opt_type = '入驻' and suppliers_id is null
|
||||
</select>
|
||||
|
||||
<select id="getSuppliersOrgInfoByOpenId" resultType="com.nu.entity.SysDepartEntity">
|
||||
select b.* from nu_biz_suppliers_org a
|
||||
LEFT JOIN sys_depart b on a.org_code = b.org_code
|
||||
where a.open_id = #{openId}
|
||||
</select>
|
||||
<select id="getSuppliersMaterialType" resultType="com.nu.entity.SuppliersMaterialTypeEntity">
|
||||
select a.*,b.type_name from nu_biz_suppliers_material_type a
|
||||
LEFT JOIN nu_config_material_type b on a.material_type_id = b.id
|
||||
where suppliers_id = #{suppliersId}
|
||||
</select>
|
||||
<select id="getSuppliersMaterialInfo" resultType="com.nu.dto.SuppliersMaterialInfoDto">
|
||||
select a.id,a.material_name,a.specification_model,a.brand_type,a.manufacturer,b.category_name,c.type_name
|
||||
from nu_config_material_info a
|
||||
left join nu_config_material_category b on a.category_id = b.id
|
||||
left join nu_config_material_type c on a.type_id = c.id
|
||||
where a.type_id in (select material_type_id from nu_biz_suppliers_material_type where suppliers_id = #{suppliersId} )
|
||||
<if test="materialTypeId != null and materialTypeId != ''">
|
||||
and a.type_id = #{materialTypeId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getCategoryList" resultType="com.nu.entity.SuppliersMaterialTypeEntity">
|
||||
select * from nu_config_material_category where id in (select parent_id from nu_biz_suppliers_material_type where suppliers_id = #{suppliersId} )
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.nu.modules.bizSuppliers.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
|
|
@ -27,11 +29,13 @@ import com.nu.modules.suppliers.ISuppliersApi;
|
|||
import com.nu.modules.wxnotice.IWxNoticeApi;
|
||||
import com.nu.utils.DictUtils;
|
||||
import com.nu.utils.RabbitMQUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
|
@ -47,6 +51,7 @@ import java.util.*;
|
|||
* @Date: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class NuBizSuppliersApplyServiceImpl extends ServiceImpl<NuBizSuppliersApplyMapper, NuBizSuppliersApply> implements INuBizSuppliersApplyService, ISuppliersApi {
|
||||
|
||||
|
|
@ -71,6 +76,10 @@ public class NuBizSuppliersApplyServiceImpl extends ServiceImpl<NuBizSuppliersAp
|
|||
@Autowired
|
||||
private DictUtils dictUtils;
|
||||
|
||||
@Lazy
|
||||
@Autowired
|
||||
private NuBizSuppliersApplyServiceImpl lazyService;
|
||||
|
||||
@Override
|
||||
public SuppliersApplyEntity addSuppliers(SuppliersApplyEntity suppliersApplyEntity) {
|
||||
|
||||
|
|
@ -321,6 +330,104 @@ public class NuBizSuppliersApplyServiceImpl extends ServiceImpl<NuBizSuppliersAp
|
|||
return nuBizSuppliersInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应商机构信息
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SysDepartEntity> getSuppliersOrgInfoByOpenId(String openId) {
|
||||
return baseMapper.getSuppliersOrgInfoByOpenId(openId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应商物料分类
|
||||
* @param orgCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@DS("#orgCode")
|
||||
public List<SuppliersMaterialTypeEntity> getSuppliersMaterialType(String orgCode,String suppliersId) {
|
||||
return baseMapper.getSuppliersMaterialType(suppliersId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应商物料信息
|
||||
* @param orgCode
|
||||
* @param materialTypeId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@DS("#orgCode")
|
||||
public IPage<SuppliersMaterialInfoDto> getSuppliersMaterialInfo(String orgCode, String materialTypeId,String suppliersId,Integer pageNo,Integer pageSize) {
|
||||
IPage<SuppliersMaterialInfoDto> page = new Page<>(pageNo, pageSize);
|
||||
return baseMapper.getSuppliersMaterialInfo(materialTypeId,suppliersId,page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应商物料分类-筛选功能
|
||||
* @param orgCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@DS("#orgCode")
|
||||
public List<Map<String,Object>> getSuppliersMaterialTypeByCondition(String orgCode,String suppliersId) {
|
||||
// 一级分类
|
||||
List<SuppliersMaterialTypeEntity> list = baseMapper.getCategoryList(suppliersId);
|
||||
// 二级分类
|
||||
List<SuppliersMaterialTypeEntity> list2 = baseMapper.getSuppliersMaterialType(suppliersId);
|
||||
List<Map<String,Object>> list3 = new ArrayList<>();
|
||||
for (SuppliersMaterialTypeEntity param1 : list){
|
||||
Map<String ,Object> map = new HashMap<>();
|
||||
map.put("id",param1.getId());
|
||||
map.put("name",param1.getCategoryName());
|
||||
List<Map<String, Object>> map2 = new ArrayList<>();
|
||||
for (SuppliersMaterialTypeEntity param2 : list2){
|
||||
if (param1.getId().equals(param2.getParentId())){
|
||||
Map<String,Object> map3 = new HashMap<>();
|
||||
map3.put("id",param2.getId());
|
||||
map3.put("name",param2.getTypeName());
|
||||
map2.add(map3);
|
||||
}
|
||||
}
|
||||
map.put("children",map2);
|
||||
list3.add(map);
|
||||
}
|
||||
return list3;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加供应商物料信息
|
||||
* @param suppliersMaterialInfoDtos
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SuppliersMaterialInfoDto> addSuppliersMaterialInfo(String orgCode,String suppliersId,List<SuppliersMaterialInfoDto> suppliersMaterialInfoDtos) {
|
||||
List<NuBizSuppliersMaterialInfo> addList = BeanUtil.copyToList(suppliersMaterialInfoDtos, NuBizSuppliersMaterialInfo.class);
|
||||
for (NuBizSuppliersMaterialInfo nuBizSuppliersMaterialInfo : addList){
|
||||
nuBizSuppliersMaterialInfo.setSuppliersId(suppliersId);
|
||||
nuBizSuppliersMaterialInfo.setOrgCode(orgCode);
|
||||
nuBizSuppliersMaterialInfoMapper.insert(nuBizSuppliersMaterialInfo);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改供应商物料信息
|
||||
* @param suppliersMaterialInfoDtos
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SuppliersMaterialInfoDto editSuppliersMaterialInfo(SuppliersMaterialInfoDto suppliersMaterialInfoDtos) {
|
||||
NuBizSuppliersMaterialInfo nuBizSuppliersMaterialInfo = new NuBizSuppliersMaterialInfo();
|
||||
BeanUtils.copyProperties(suppliersMaterialInfoDtos, nuBizSuppliersMaterialInfo);
|
||||
nuBizSuppliersMaterialInfoMapper.updateById(nuBizSuppliersMaterialInfo);
|
||||
SuppliersMaterialInfoDto suppliersInfoMQDto = new SuppliersMaterialInfoDto();
|
||||
BeanUtils.copyProperties(nuBizSuppliersMaterialInfo, suppliersInfoMQDto);
|
||||
rabbitMQUtil.sendToExchange("nu.suppliers.applyStatus", suppliersMaterialInfoDtos.getOrgCode() + ".suppliers.updateMaterialInfo", suppliersInfoMQDto);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<NuBizSuppliersApply> listPage(Page<NuBizSuppliersApply> page, QueryWrapper<NuBizSuppliersApply> queryWrapper) {
|
||||
return baseMapper.listPage(page, queryWrapper);
|
||||
|
|
|
|||
|
|
@ -59,13 +59,9 @@
|
|||
</select>
|
||||
|
||||
<select id="getEmployeeInfoByTel" resultType="com.nu.modules.employees.entity.NuEmployeesAdvisoryInfo">
|
||||
SELECT
|
||||
adinfo.*,
|
||||
concat(CASE WHEN RIGHT(sd.url, 1) = '/' THEN LEFT(sd.url, LENGTH(sd.url) - 1) ELSE sd.url END, sd.context_path ) AS serverUrl
|
||||
FROM nu_biz_employees_advisory_info adinfo
|
||||
LEFT JOIN sys_depart sd
|
||||
ON adinfo.last_login_org = sd.org_code
|
||||
WHERE adinfo.tel = #{tel}
|
||||
SELECT adinfo.tel FROM nu_biz_employees_advisory_info adinfo WHERE adinfo.tel = #{tel}
|
||||
UNION
|
||||
SELECT sd.account_no as tel FROM sys_depart sd WHERE sd.account_no = #{tel}
|
||||
</select>
|
||||
|
||||
<select id="queryEmployeeInfoById" resultType="com.nu.modules.employees.entity.NuEmployeesAdvisoryInfo">
|
||||
|
|
|
|||
|
|
@ -188,8 +188,8 @@ public class EmployeesOrgServiceImpl extends ServiceImpl<EmployeesOrgMapper, Emp
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<EmployeesOrg> getEmployeesOrgListByEmpId(String employeesId){
|
||||
return baseMapper.getEmployeesOrgListByEmpId(employeesId);
|
||||
public List<EmployeesOrg> getEmployeesOrgListByEmpId(String tel){
|
||||
return baseMapper.getEmployeesOrgListByEmpId(tel);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ public class NuEmployeesAdvisoryInfoServiceImpl extends ServiceImpl<NuEmployeesA
|
|||
NuEmployeesAdvisoryInfo entity = baseMapper.getEmployeeInfoByTel(tel);
|
||||
if (entity != null) {
|
||||
resultData.set("data", entity);
|
||||
List<EmployeesOrg> list = employeesOrgService.getEmployeesOrgListByEmpId(entity.getId());
|
||||
List<EmployeesOrg> list = employeesOrgService.getEmployeesOrgListByEmpId(entity.getTel());
|
||||
resultData.set("orgList", list);
|
||||
} else {
|
||||
resultData.set("code", "1");
|
||||
|
|
|
|||
|
|
@ -236,8 +236,11 @@ public class SuppliersMQListener {
|
|||
|
||||
NuBizSuppliersInfo suppliersInfo = suppliersInfoService.getById(suppliersInfoMQDto.getId());
|
||||
|
||||
NuBizSuppliersOrg nuBizSuppliersOrgYuan = nuBizSuppliersOrgService.getById(suppliersInfo.getId());
|
||||
if(nuBizSuppliersOrgYuan==null){
|
||||
QueryWrapper<NuBizSuppliersOrg> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("suppliers_id",suppliersInfoMQDto.getSuppliersId());
|
||||
queryWrapper.eq("org_code",suppliersInfoMQDto.getSysOrgCode());
|
||||
NuBizSuppliersOrg nuBizSuppliersOrg1 =nuBizSuppliersOrgService.getOne(queryWrapper);
|
||||
if(nuBizSuppliersOrg1==null){
|
||||
NuBizSuppliersOrg nuBizSuppliersOrg = new NuBizSuppliersOrg();
|
||||
BeanUtils.copyProperties(suppliersInfoMQDto, nuBizSuppliersOrg);
|
||||
nuBizSuppliersOrg.setSuppliersId(suppliersInfo.getId());
|
||||
|
|
@ -245,6 +248,7 @@ public class SuppliersMQListener {
|
|||
nuBizSuppliersOrg.setStatus("2");//直接审核通过
|
||||
nuBizSuppliersOrg.setOpenId(suppliersInfo.getOpenId());
|
||||
nuBizSuppliersOrg.setOrgCode(suppliersInfoMQDto.getSysOrgCode());
|
||||
//没有合作过才新增数据,否则不新增数据
|
||||
nuBizSuppliersOrgService.save(nuBizSuppliersOrg);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -206,7 +206,9 @@ public class ElderApi {
|
|||
result.setPayableAmount(new BigDecimal(orgInfo.getString("payableAmount")));
|
||||
System.out.println("2222222222222222222222:"+orgInfo);
|
||||
} else {
|
||||
return Result.ok(null);
|
||||
result.setNuCanUse("1");
|
||||
result.setMsg("护理单元暂时无法绑定");
|
||||
return Result.ok(result);
|
||||
}
|
||||
|
||||
NuBaseInfoEntity baseInfo = nuBaseInfoApi.queryInfoByNuId(orgCode, nuId, "1");
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ package com.nu.modules.wechat.suppliers;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nu.dto.SuppliersMaterialInfoDto;
|
||||
import com.nu.entity.EmployeesOrgApiEntity;
|
||||
import com.nu.entity.SuppliersApplyEntity;
|
||||
import com.nu.entity.SuppliersOrgAllEntity;
|
||||
import com.nu.entity.SuppliersOrgEntity;
|
||||
import com.nu.entity.*;
|
||||
import com.nu.modules.orgapplyinfo.entity.EmployeesApiEntity;
|
||||
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
|
||||
import com.nu.modules.suppliers.ISuppliersApi;
|
||||
|
|
@ -15,6 +12,7 @@ import org.jeecg.common.api.vo.Result;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -184,4 +182,64 @@ public class SuppliersApi {
|
|||
return Result.OK(result);
|
||||
}
|
||||
|
||||
|
||||
//查询供应商合作的机构信息
|
||||
@GetMapping(value = "/getSuppliersOrgInfoByOpenId")
|
||||
public Result<List<SysDepartEntity>> getSuppliersOrgInfoByOpenId(@RequestParam(value = "openId",required = true) String openId){
|
||||
List<SysDepartEntity> result = suppliersApi.getSuppliersOrgInfoByOpenId(openId);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
//查询物料分类集合
|
||||
@GetMapping(value = "/getSuppliersMaterialType")
|
||||
public Result<List<SuppliersMaterialTypeEntity>> getSuppliersMaterialType(@RequestParam(value = "orgCode",required = true) String orgCode,@RequestParam(value = "openId",required = true) String openId){
|
||||
SuppliersApplyEntity suppliersApplyEntity = suppliersApi.getShowInfoByOpenId(openId);
|
||||
List<SuppliersMaterialTypeEntity> result = suppliersApi.getSuppliersMaterialType(orgCode,suppliersApplyEntity.getSuppliersId());
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
//查询机构下的物料集合
|
||||
@GetMapping(value = "/getSuppliersMaterialInfo")
|
||||
public Result<IPage<SuppliersMaterialInfoDto>> getSuppliersMaterialInfo(@RequestParam(value = "orgCode",required = true) String orgCode,@RequestParam(value = "materialTypeId",required = false) String materialTypeId,@RequestParam(value = "openId",required = true) String openId,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "8") Integer pageSize){
|
||||
SuppliersApplyEntity suppliersApplyEntity = suppliersApi.getShowInfoByOpenId(openId);
|
||||
IPage<SuppliersMaterialInfoDto> result = suppliersApi.getSuppliersMaterialInfo(orgCode,materialTypeId,suppliersApplyEntity.getSuppliersId(),pageNo, pageSize);
|
||||
// todo 判断物料是否只读
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
//查询筛选条件的物料分类
|
||||
@GetMapping(value = "/getSuppliersMaterialTypeByCondition")
|
||||
public Result<List<Map<String,Object>>> getSuppliersMaterialTypeByCondition(@RequestParam(value = "orgCode",required = true) String orgCode,@RequestParam(value = "openId",required = true) String openId){
|
||||
SuppliersApplyEntity suppliersApplyEntity = suppliersApi.getShowInfoByOpenId(openId);
|
||||
List<Map<String,Object>> result = suppliersApi.getSuppliersMaterialTypeByCondition(orgCode,suppliersApplyEntity.getSuppliersId());
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
//供应商物料批量新增
|
||||
@PostMapping(value = "/addSuppliersMaterialInfo")
|
||||
public Result<Object> addSuppliersMaterialInfo(@RequestBody Map<String,Object> map){
|
||||
String orgCode = map.get("orgCode").toString();
|
||||
String openId = map.get("openId").toString();
|
||||
if (StringUtils.isBlank(openId) || StringUtils.isBlank(orgCode)){
|
||||
return Result.error("参数错误");
|
||||
}
|
||||
List<SuppliersMaterialInfoDto> suppliersMaterialInfoDtos = (List<SuppliersMaterialInfoDto>) map.get("addList");
|
||||
SuppliersApplyEntity suppliersApplyEntity = suppliersApi.getShowInfoByOpenId(openId);
|
||||
List<SuppliersMaterialInfoDto> result = suppliersApi.addSuppliersMaterialInfo(orgCode,suppliersApplyEntity.getSuppliersId(),suppliersMaterialInfoDtos);
|
||||
return Result.OK("添加成功");
|
||||
}
|
||||
|
||||
//供应商修改物料的单位及价格
|
||||
@PostMapping(value = "/editSuppliersMaterialInfo")
|
||||
public Result<Object> editSuppliersMaterialInfo(@RequestBody SuppliersMaterialInfoDto suppliersMaterialInfoDtos){
|
||||
String openId = suppliersMaterialInfoDtos.getOpenId();
|
||||
SuppliersApplyEntity suppliersApplyEntity = suppliersApi.getShowInfoByOpenId(openId);
|
||||
suppliersMaterialInfoDtos.setSuppliersId(suppliersApplyEntity.getSuppliersId());
|
||||
SuppliersMaterialInfoDto result = suppliersApi.editSuppliersMaterialInfo(suppliersMaterialInfoDtos);
|
||||
return Result.OK("编辑成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,4 +78,10 @@ public class SuppliersMaterialInfoDto implements Serializable {
|
|||
@Excel(name = "销售单位", width = 15)
|
||||
@ApiModelProperty(value = "销售单位")
|
||||
private String salesUnit;
|
||||
/**销售单位*/
|
||||
private String orgCode;
|
||||
private String categoryName;
|
||||
private String typeName;
|
||||
private String isRead;
|
||||
private String openId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,100 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 供应商
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-03-12
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ConfigSuppliersInfoEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
/**供应商名称*/
|
||||
@Excel(name = "供应商名称", width = 15)
|
||||
@ApiModelProperty(value = "供应商名称")
|
||||
private String suppliersName;
|
||||
/**供应商性质*/
|
||||
@Excel(name = "供应商性质", width = 15, dicCode = "suppliers_nature")
|
||||
@Dict(dicCode = "suppliers_nature")
|
||||
@ApiModelProperty(value = "供应商性质")
|
||||
private String suppliersNature;
|
||||
/**供应商地址*/
|
||||
@Excel(name = "供应商地址", width = 15)
|
||||
@ApiModelProperty(value = "供应商地址")
|
||||
private String suppliersAddress;
|
||||
/**负责人*/
|
||||
@Excel(name = "负责人", width = 15)
|
||||
@ApiModelProperty(value = "负责人")
|
||||
private String personInCharge;
|
||||
/**联系电话*/
|
||||
@Excel(name = "联系电话", width = 15)
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
private String contactNumber;
|
||||
/**供应状态*/
|
||||
@Excel(name = "供应状态", width = 15, dicCode = "supply_state")
|
||||
@Dict(dicCode = "supply_state")
|
||||
@ApiModelProperty(value = "供应状态")
|
||||
private String supplyState;
|
||||
/**开户行*/
|
||||
@Excel(name = "开户行", width = 15)
|
||||
@ApiModelProperty(value = "开户行")
|
||||
private String openingBank;
|
||||
/**开户行账号*/
|
||||
@Excel(name = "开户行账号", width = 15)
|
||||
@ApiModelProperty(value = "开户行账号")
|
||||
private String openingBankNo;
|
||||
/**微信账号*/
|
||||
@Excel(name = "微信账号", width = 15)
|
||||
@ApiModelProperty(value = "微信账号")
|
||||
private String wechartId;
|
||||
/**资质照片*/
|
||||
@ApiModelProperty(value = "资质照片")
|
||||
private String imgPath;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 供应商对应物料类别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-03-30
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_suppliers_material_type对象", description="供应商对应物料类别")
|
||||
public class SuppliersMaterialTypeEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private Date createTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private Date updateTime;
|
||||
/**供应商id*/
|
||||
@Excel(name = "供应商id", width = 15)
|
||||
@ApiModelProperty(value = "供应商id")
|
||||
private String suppliersId;
|
||||
/**供应商名称*/
|
||||
@Excel(name = "供应商名称", width = 15)
|
||||
@ApiModelProperty(value = "供应商名称")
|
||||
private String suppliersName;
|
||||
/**物料类别*/
|
||||
@Excel(name = "物料类别", width = 15)
|
||||
@ApiModelProperty(value = "物料类别")
|
||||
private String materialTypeId;
|
||||
/**等级*/
|
||||
@Excel(name = "等级", width = 15)
|
||||
@ApiModelProperty(value = "等级")
|
||||
private String level;
|
||||
/**上级*/
|
||||
@Excel(name = "上级", width = 15)
|
||||
@ApiModelProperty(value = "上级")
|
||||
private String parentId;
|
||||
|
||||
private String categoryName;
|
||||
private String typeName;
|
||||
}
|
||||
|
|
@ -0,0 +1,254 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 部门表
|
||||
* <p>
|
||||
*
|
||||
* @Author Steve
|
||||
* @Since 2019-01-22
|
||||
*/
|
||||
@Data
|
||||
public class SysDepartEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
/**
|
||||
* 父机构ID
|
||||
*/
|
||||
private String parentId;
|
||||
/**
|
||||
* 机构/部门名称
|
||||
*/
|
||||
@Excel(name = "机构/部门名称", width = 15)
|
||||
private String departName;
|
||||
/**
|
||||
* 英文名
|
||||
*/
|
||||
@Excel(name = "英文名", width = 15)
|
||||
private String departNameEn;
|
||||
/**
|
||||
* 缩写
|
||||
*/
|
||||
private String departNameAbbr;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Excel(name = "排序", width = 15)
|
||||
private Integer departOrder;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@Excel(name = "描述", width = 15)
|
||||
private String description;
|
||||
/**
|
||||
* 机构类型
|
||||
*/
|
||||
private String orgType;
|
||||
/**
|
||||
* 机构编码
|
||||
*/
|
||||
@Excel(name = "机构编码", width = 15)
|
||||
private String orgCode;
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
@Excel(name = "省份", width = 30)
|
||||
private String province;
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
@Excel(name = "城市", width = 30)
|
||||
private String city;
|
||||
/**
|
||||
* 区县
|
||||
*/
|
||||
@Excel(name = "区县", width = 30)
|
||||
private String district;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@Excel(name = "手机号", width = 15)
|
||||
private String mobile;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@Excel(name = "地址", width = 15)
|
||||
private String address;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 加盟时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "加盟时间")
|
||||
private Date franchiseTime;
|
||||
/**
|
||||
* 回复内容
|
||||
*/
|
||||
private String headPath;
|
||||
/**
|
||||
* 回复时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date replyTime;
|
||||
/**
|
||||
* 回复人
|
||||
*/
|
||||
private String handleBy;
|
||||
|
||||
/**
|
||||
* 微信id
|
||||
*/
|
||||
@Excel(name = "微信id", width = 15)
|
||||
@ApiModelProperty(value = "微信id")
|
||||
private String openId;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Excel(name = "联系电话", width = 15)
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
private String tel;
|
||||
/**
|
||||
* 咨询人姓名
|
||||
*/
|
||||
@Excel(name = "咨询人姓名", width = 15)
|
||||
@ApiModelProperty(value = "咨询人姓名")
|
||||
private String name;
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@Excel(name = "性别", width = 15)
|
||||
@ApiModelProperty(value = "性别")
|
||||
private String sex;
|
||||
/**
|
||||
* 签发机关
|
||||
*/
|
||||
@Excel(name = "签发机关", width = 15)
|
||||
@ApiModelProperty(value = "签发机关")
|
||||
private String issuingAuthority;
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
@Excel(name = "企业名称", width = 15)
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String comName;
|
||||
/**
|
||||
* 企业注册地址
|
||||
*/
|
||||
@Excel(name = "企业注册地址", width = 15)
|
||||
@ApiModelProperty(value = "企业注册地址")
|
||||
private String comRegisterAddress;
|
||||
/**
|
||||
* 企业信用代码
|
||||
*/
|
||||
@Excel(name = "企业信用代码", width = 15)
|
||||
@ApiModelProperty(value = "企业信用代码")
|
||||
private String comCreditCode;
|
||||
/**
|
||||
* 企业法人
|
||||
*/
|
||||
@Excel(name = "企业法人", width = 15)
|
||||
@ApiModelProperty(value = "企业法人")
|
||||
private String comLegalPerson;
|
||||
/**
|
||||
* 机构地址
|
||||
*/
|
||||
@Excel(name = "机构地址", width = 15)
|
||||
@ApiModelProperty(value = "机构地址")
|
||||
private String orgAddress;
|
||||
/**
|
||||
* 机构负责人
|
||||
*/
|
||||
@Excel(name = "机构负责人", width = 15)
|
||||
@ApiModelProperty(value = "机构负责人")
|
||||
private String orgLeader;
|
||||
/**
|
||||
* 机构负责人电话
|
||||
*/
|
||||
@Excel(name = "机构负责人电话", width = 15)
|
||||
@ApiModelProperty(value = "机构负责人电话")
|
||||
private String orgLeaderPhone;
|
||||
/**
|
||||
* 机构楼宇牌号
|
||||
*/
|
||||
@Excel(name = "机构楼宇牌号", width = 15)
|
||||
@ApiModelProperty(value = "机构楼宇牌号")
|
||||
private String orgBuildingNumber;
|
||||
/**
|
||||
* 机构房屋性质
|
||||
*/
|
||||
@Excel(name = "机构房屋性质", width = 15)
|
||||
@ApiModelProperty(value = "机构房屋性质")
|
||||
private String orgPropertyType;
|
||||
/**
|
||||
* 机构建筑面积
|
||||
*/
|
||||
@Excel(name = "机构建筑面积", width = 15)
|
||||
@ApiModelProperty(value = "机构建筑面积")
|
||||
private Double orgBuildingArea;
|
||||
/**
|
||||
* 机构省份 sys_category.id
|
||||
*/
|
||||
@Excel(name = "机构省份", width = 15)
|
||||
@ApiModelProperty(value = "机构省份")
|
||||
@Dict(dictTable = "sys_category", dicCode = "id", dicText = "name")
|
||||
private String orgProvince;
|
||||
/**
|
||||
* 机构城市 sys_category.id
|
||||
*/
|
||||
@Excel(name = "机构城市", width = 15)
|
||||
@ApiModelProperty(value = "机构城市")
|
||||
@Dict(dictTable = "sys_category", dicCode = "id", dicText = "name")
|
||||
private String orgCity;
|
||||
/**
|
||||
* 机构区域 sys_category.id
|
||||
*/
|
||||
@Excel(name = "机构区域", width = 15)
|
||||
@ApiModelProperty(value = "机构区域")
|
||||
@Dict(dictTable = "sys_category", dicCode = "id", dicText = "name")
|
||||
private String orgDistrict;
|
||||
|
||||
//update-begin---author:wangshuai ---date:20200308 for:[JTC-119]在部门管理菜单下设置部门负责人,新增字段负责人ids和旧的负责人ids
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue